xref: /rk3399_rockchip-uboot/include/vsc9953.h (revision a2477924cd302cfae730ebefb431814eb99ad861)
16706b115SCodrin Ciubotariu /*
26706b115SCodrin Ciubotariu  *  vsc9953.h
36706b115SCodrin Ciubotariu  *
46706b115SCodrin Ciubotariu  *  Driver for the Vitesse VSC9953 L2 Switch
56706b115SCodrin Ciubotariu  *
66706b115SCodrin Ciubotariu  *  This software may be used and distributed according to the
76706b115SCodrin Ciubotariu  *  terms of the GNU Public License, Version 2, incorporated
86706b115SCodrin Ciubotariu  *  herein by reference.
96706b115SCodrin Ciubotariu  *
106706b115SCodrin Ciubotariu  * Copyright 2013  Freescale Semiconductor, Inc.
116706b115SCodrin Ciubotariu  *
126706b115SCodrin Ciubotariu  */
136706b115SCodrin Ciubotariu 
146706b115SCodrin Ciubotariu #ifndef _VSC9953_H_
156706b115SCodrin Ciubotariu #define _VSC9953_H_
166706b115SCodrin Ciubotariu 
176706b115SCodrin Ciubotariu #include <config.h>
186706b115SCodrin Ciubotariu #include <miiphy.h>
196706b115SCodrin Ciubotariu #include <asm/types.h>
206706b115SCodrin Ciubotariu 
216706b115SCodrin Ciubotariu #define VSC9953_OFFSET			(CONFIG_SYS_CCSRBAR_DEFAULT + 0x800000)
226706b115SCodrin Ciubotariu 
236706b115SCodrin Ciubotariu #define VSC9953_SYS_OFFSET		0x010000
249de05987SCodrin Ciubotariu #define VSC9953_REW_OFFSET		0x030000
256706b115SCodrin Ciubotariu #define VSC9953_DEV_GMII_OFFSET		0x100000
266706b115SCodrin Ciubotariu #define VSC9953_QSYS_OFFSET		0x200000
276706b115SCodrin Ciubotariu #define VSC9953_ANA_OFFSET		0x280000
286706b115SCodrin Ciubotariu #define VSC9953_DEVCPU_GCB		0x070000
296706b115SCodrin Ciubotariu #define VSC9953_ES0			0x040000
306706b115SCodrin Ciubotariu #define VSC9953_IS1			0x050000
316706b115SCodrin Ciubotariu #define VSC9953_IS2			0x060000
326706b115SCodrin Ciubotariu 
336706b115SCodrin Ciubotariu #define T1040_SWITCH_GMII_DEV_OFFSET	0x010000
346706b115SCodrin Ciubotariu #define VSC9953_PHY_REGS_OFFST		0x0000AC
356706b115SCodrin Ciubotariu 
363cc8cfffSCodrin Ciubotariu /* Macros for vsc9953_chip_regs.soft_rst register */
37c4390486SCodrin Ciubotariu #define VSC9953_SOFT_SWC_RST_ENA	0x00000001
383cc8cfffSCodrin Ciubotariu 
393cc8cfffSCodrin Ciubotariu /* Macros for vsc9953_sys_sys.reset_cfg register */
40c4390486SCodrin Ciubotariu #define VSC9953_CORE_ENABLE		0x80
41c4390486SCodrin Ciubotariu #define VSC9953_MEM_ENABLE		0x40
42c4390486SCodrin Ciubotariu #define VSC9953_MEM_INIT		0x20
436706b115SCodrin Ciubotariu 
443cc8cfffSCodrin Ciubotariu /* Macros for vsc9953_dev_gmii_mac_cfg_status.mac_ena_cfg register */
45c4390486SCodrin Ciubotariu #define VSC9953_MAC_ENA_CFG		0x00000011
463cc8cfffSCodrin Ciubotariu 
473cc8cfffSCodrin Ciubotariu /* Macros for vsc9953_dev_gmii_mac_cfg_status.mac_mode_cfg register */
48c4390486SCodrin Ciubotariu #define VSC9953_MAC_MODE_CFG		0x00000011
493cc8cfffSCodrin Ciubotariu 
503cc8cfffSCodrin Ciubotariu /* Macros for vsc9953_dev_gmii_mac_cfg_status.mac_ifg_cfg register */
51c4390486SCodrin Ciubotariu #define VSC9953_MAC_IFG_CFG		0x00000515
523cc8cfffSCodrin Ciubotariu 
533cc8cfffSCodrin Ciubotariu /* Macros for vsc9953_dev_gmii_mac_cfg_status.mac_hdx_cfg register */
54c4390486SCodrin Ciubotariu #define VSC9953_MAC_HDX_CFG		0x00001043
553cc8cfffSCodrin Ciubotariu 
563cc8cfffSCodrin Ciubotariu /* Macros for vsc9953_dev_gmii_mac_cfg_status.mac_maxlen_cfg register */
57c4390486SCodrin Ciubotariu #define VSC9953_MAC_MAX_LEN		0x000005ee
586706b115SCodrin Ciubotariu 
593cc8cfffSCodrin Ciubotariu /* Macros for vsc9953_dev_gmii_port_mode.clock_cfg register */
603cc8cfffSCodrin Ciubotariu #define VSC9953_CLOCK_CFG		0x00000001
613cc8cfffSCodrin Ciubotariu #define VSC9953_CLOCK_CFG_1000M		0x00000001
623cc8cfffSCodrin Ciubotariu 
633cc8cfffSCodrin Ciubotariu /* Macros for vsc9953_sys_sys.front_port_mode register */
643cc8cfffSCodrin Ciubotariu #define VSC9953_FRONT_PORT_MODE	0x00000000
653cc8cfffSCodrin Ciubotariu 
663cc8cfffSCodrin Ciubotariu /* Macros for vsc9953_ana_pfc.pfc_cfg register */
673cc8cfffSCodrin Ciubotariu #define VSC9953_PFC_FC			0x00000001
683cc8cfffSCodrin Ciubotariu #define VSC9953_PFC_FC_QSGMII		0x00000000
693cc8cfffSCodrin Ciubotariu 
703cc8cfffSCodrin Ciubotariu /* Macros for vsc9953_sys_pause_cfg.mac_fc_cfg register */
713cc8cfffSCodrin Ciubotariu #define VSC9953_MAC_FC_CFG		0x04700000
723cc8cfffSCodrin Ciubotariu #define VSC9953_MAC_FC_CFG_QSGMII	0x00700000
733cc8cfffSCodrin Ciubotariu 
743cc8cfffSCodrin Ciubotariu /* Macros for vsc9953_sys_pause_cfg.pause_cfg register */
753cc8cfffSCodrin Ciubotariu #define VSC9953_PAUSE_CFG		0x001ffffe
763cc8cfffSCodrin Ciubotariu 
773cc8cfffSCodrin Ciubotariu /* Macros for vsc9953_sys_pause_cfgtot_tail_drop_lvl register */
783cc8cfffSCodrin Ciubotariu #define VSC9953_TOT_TAIL_DROP_LVL	0x000003ff
793cc8cfffSCodrin Ciubotariu 
8086719f0cSCodrin Ciubotariu /* Macros for vsc9953_sys_sys.stat_cfg register */
8186719f0cSCodrin Ciubotariu #define VSC9953_STAT_CLEAR_RX		0x00000400
8286719f0cSCodrin Ciubotariu #define VSC9953_STAT_CLEAR_TX		0x00000800
8386719f0cSCodrin Ciubotariu #define VSC9953_STAT_CLEAR_DR		0x00001000
8486719f0cSCodrin Ciubotariu 
853cc8cfffSCodrin Ciubotariu /* Macros for vsc9953_vcap_core_cfg.vcap_mv_cfg register */
86c4390486SCodrin Ciubotariu #define VSC9953_VCAP_MV_CFG		0x0000ffff
87c4390486SCodrin Ciubotariu #define VSC9953_VCAP_UPDATE_CTRL	0x01000004
883cc8cfffSCodrin Ciubotariu 
8922449858SCodrin Ciubotariu /* Macros for register vsc9953_ana_ana_tables.mac_access register */
9022449858SCodrin Ciubotariu #define VSC9953_MAC_CMD_IDLE		0x00000000
9122449858SCodrin Ciubotariu #define VSC9953_MAC_CMD_LEARN		0x00000001
9222449858SCodrin Ciubotariu #define VSC9953_MAC_CMD_FORGET		0x00000002
9322449858SCodrin Ciubotariu #define VSC9953_MAC_CMD_AGE		0x00000003
9422449858SCodrin Ciubotariu #define VSC9953_MAC_CMD_NEXT		0x00000004
9522449858SCodrin Ciubotariu #define VSC9953_MAC_CMD_READ		0x00000006
9622449858SCodrin Ciubotariu #define VSC9953_MAC_CMD_WRITE		0x00000007
9722449858SCodrin Ciubotariu #define VSC9953_MAC_CMD_MASK		0x00000007
9822449858SCodrin Ciubotariu #define VSC9953_MAC_CMD_VALID		0x00000800
9922449858SCodrin Ciubotariu #define VSC9953_MAC_ENTRYTYPE_NORMAL	0x00000000
10022449858SCodrin Ciubotariu #define VSC9953_MAC_ENTRYTYPE_LOCKED	0x00000200
10122449858SCodrin Ciubotariu #define VSC9953_MAC_ENTRYTYPE_IPV4MCAST	0x00000400
10222449858SCodrin Ciubotariu #define VSC9953_MAC_ENTRYTYPE_IPV6MCAST	0x00000600
10322449858SCodrin Ciubotariu #define VSC9953_MAC_ENTRYTYPE_MASK	0x00000600
10422449858SCodrin Ciubotariu #define VSC9953_MAC_DESTIDX_MASK	0x000001f8
10522449858SCodrin Ciubotariu #define VSC9953_MAC_VID_MASK		0x1fff0000
10622449858SCodrin Ciubotariu #define VSC9953_MAC_MACH_MASK		0x0000ffff
10722449858SCodrin Ciubotariu 
1089de05987SCodrin Ciubotariu /* Macros for vsc9953_ana_port.vlan_cfg register */
1099de05987SCodrin Ciubotariu #define VSC9953_VLAN_CFG_AWARE_ENA	0x00100000
1109de05987SCodrin Ciubotariu #define VSC9953_VLAN_CFG_POP_CNT_MASK	0x000c0000
111*a2477924SCodrin Ciubotariu #define VSC9953_VLAN_CFG_POP_CNT_NONE	0x00000000
112*a2477924SCodrin Ciubotariu #define VSC9953_VLAN_CFG_POP_CNT_ONE	0x00040000
1139de05987SCodrin Ciubotariu #define VSC9953_VLAN_CFG_VID_MASK	0x00000fff
1149de05987SCodrin Ciubotariu 
1159de05987SCodrin Ciubotariu /* Macros for vsc9953_rew_port.port_vlan_cfg register */
1169de05987SCodrin Ciubotariu #define VSC9953_PORT_VLAN_CFG_VID_MASK	0x00000fff
1179de05987SCodrin Ciubotariu 
1189de05987SCodrin Ciubotariu /* Macros for vsc9953_ana_ana_tables.vlan_tidx register */
1199de05987SCodrin Ciubotariu #define VSC9953_ANA_TBL_VID_MASK	0x00000fff
1209de05987SCodrin Ciubotariu 
1219de05987SCodrin Ciubotariu /* Macros for vsc9953_ana_ana_tables.vlan_access register */
1229de05987SCodrin Ciubotariu #define VSC9953_VLAN_PORT_MASK		0x00001ffc
1239de05987SCodrin Ciubotariu #define VSC9953_VLAN_CMD_MASK		0x00000003
1249de05987SCodrin Ciubotariu #define VSC9953_VLAN_CMD_IDLE		0x00000000
1259de05987SCodrin Ciubotariu #define VSC9953_VLAN_CMD_READ		0x00000001
1269de05987SCodrin Ciubotariu #define VSC9953_VLAN_CMD_WRITE		0x00000002
1279de05987SCodrin Ciubotariu #define VSC9953_VLAN_CMD_INIT		0x00000003
1289de05987SCodrin Ciubotariu 
12968c929daSCodrin Ciubotariu /* Macros for vsc9953_ana_port.port_cfg register */
13068c929daSCodrin Ciubotariu #define VSC9953_PORT_CFG_LEARN_ENA	0x00000080
13168c929daSCodrin Ciubotariu #define VSC9953_PORT_CFG_LEARN_AUTO	0x00000100
13268c929daSCodrin Ciubotariu #define VSC9953_PORT_CFG_LEARN_CPU	0x00000200
13368c929daSCodrin Ciubotariu #define VSC9953_PORT_CFG_LEARN_DROP	0x00000400
13468c929daSCodrin Ciubotariu 
1353cc8cfffSCodrin Ciubotariu /* Macros for vsc9953_qsys_sys.switch_port_mode register */
136fe91095bSCodrin Ciubotariu #define VSC9953_PORT_ENA		0x00002000
1373cc8cfffSCodrin Ciubotariu 
1389de05987SCodrin Ciubotariu /* Macros for vsc9953_ana_ana.adv_learn register */
1399de05987SCodrin Ciubotariu #define VSC9953_VLAN_CHK		0x00000400
1409de05987SCodrin Ciubotariu 
1419de05987SCodrin Ciubotariu /* Macros for vsc9953_rew_port.port_tag_cfg register */
1429de05987SCodrin Ciubotariu #define VSC9953_TAG_CFG_MASK		0x00000180
1439de05987SCodrin Ciubotariu #define VSC9953_TAG_CFG_NONE		0x00000000
1449de05987SCodrin Ciubotariu #define VSC9953_TAG_CFG_ALL_BUT_PVID_ZERO	0x00000080
1459de05987SCodrin Ciubotariu #define VSC9953_TAG_CFG_ALL_BUT_ZERO		0x00000100
1469de05987SCodrin Ciubotariu #define VSC9953_TAG_CFG_ALL		0x00000180
147*a2477924SCodrin Ciubotariu #define VSC9953_TAG_VID_PVID		0x00000010
1489de05987SCodrin Ciubotariu 
14922449858SCodrin Ciubotariu /* Macros for vsc9953_ana_ana.anag_efil register */
15022449858SCodrin Ciubotariu #define VSC9953_AGE_PORT_EN		0x00080000
15122449858SCodrin Ciubotariu #define VSC9953_AGE_PORT_MASK		0x0007c000
15222449858SCodrin Ciubotariu #define VSC9953_AGE_VID_EN		0x00002000
15322449858SCodrin Ciubotariu #define VSC9953_AGE_VID_MASK		0x00001fff
15422449858SCodrin Ciubotariu 
15522449858SCodrin Ciubotariu /* Macros for vsc9953_ana_ana_tables.mach_data register */
15622449858SCodrin Ciubotariu #define VSC9953_MACHDATA_VID_MASK	0x1fff0000
15722449858SCodrin Ciubotariu 
1586706b115SCodrin Ciubotariu #define VSC9953_MAX_PORTS		10
1596706b115SCodrin Ciubotariu #define VSC9953_PORT_CHECK(port)	\
1606706b115SCodrin Ciubotariu 	(((port) < 0 || (port) >= VSC9953_MAX_PORTS) ? 0 : 1)
1616706b115SCodrin Ciubotariu #define VSC9953_INTERNAL_PORT_CHECK(port) ( \
1626706b115SCodrin Ciubotariu 	( \
1636706b115SCodrin Ciubotariu 		(port) < VSC9953_MAX_PORTS - 2 || (port) >= VSC9953_MAX_PORTS \
1646706b115SCodrin Ciubotariu 	) ? 0 : 1 \
1656706b115SCodrin Ciubotariu )
1669de05987SCodrin Ciubotariu #define VSC9953_MAX_VLAN		4096
1679de05987SCodrin Ciubotariu #define VSC9953_VLAN_CHECK(vid)	\
1689de05987SCodrin Ciubotariu 	(((vid) < 0 || (vid) >= VSC9953_MAX_VLAN) ? 0 : 1)
1696706b115SCodrin Ciubotariu 
1706706b115SCodrin Ciubotariu #define DEFAULT_VSC9953_MDIO_NAME	"VSC9953_MDIO0"
1716706b115SCodrin Ciubotariu 
1726706b115SCodrin Ciubotariu #define MIIMIND_OPR_PEND		0x00000004
1736706b115SCodrin Ciubotariu 
1746706b115SCodrin Ciubotariu struct vsc9953_mdio_info {
1756706b115SCodrin Ciubotariu 	struct vsc9953_mii_mng	*regs;
1766706b115SCodrin Ciubotariu 	char	*name;
1776706b115SCodrin Ciubotariu };
1786706b115SCodrin Ciubotariu 
1793cc8cfffSCodrin Ciubotariu /* VSC9953 ANA structure */
1806706b115SCodrin Ciubotariu 
1816706b115SCodrin Ciubotariu struct vsc9953_ana_port {
1826706b115SCodrin Ciubotariu 	u32	vlan_cfg;
1836706b115SCodrin Ciubotariu 	u32	drop_cfg;
1846706b115SCodrin Ciubotariu 	u32	qos_cfg;
1856706b115SCodrin Ciubotariu 	u32	vcap_cfg;
1866706b115SCodrin Ciubotariu 	u32	vcap_s1_key_cfg[3];
1876706b115SCodrin Ciubotariu 	u32	vcap_s2_cfg;
1886706b115SCodrin Ciubotariu 	u32	qos_pcp_dei_map_cfg[16];
1896706b115SCodrin Ciubotariu 	u32	cpu_fwd_cfg;
1906706b115SCodrin Ciubotariu 	u32	cpu_fwd_bpdu_cfg;
1916706b115SCodrin Ciubotariu 	u32	cpu_fwd_garp_cfg;
1926706b115SCodrin Ciubotariu 	u32	cpu_fwd_ccm_cfg;
1936706b115SCodrin Ciubotariu 	u32	port_cfg;
1946706b115SCodrin Ciubotariu 	u32	pol_cfg;
1956706b115SCodrin Ciubotariu 	u32	reserved[34];
1966706b115SCodrin Ciubotariu };
1976706b115SCodrin Ciubotariu 
1986706b115SCodrin Ciubotariu struct vsc9953_ana_pol {
1996706b115SCodrin Ciubotariu 	u32	pol_pir_cfg;
2006706b115SCodrin Ciubotariu 	u32	pol_cir_cfg;
2016706b115SCodrin Ciubotariu 	u32	pol_mode_cfg;
2026706b115SCodrin Ciubotariu 	u32	pol_pir_state;
2036706b115SCodrin Ciubotariu 	u32	pol_cir_state;
2046706b115SCodrin Ciubotariu 	u32	reserved1[3];
2056706b115SCodrin Ciubotariu };
2066706b115SCodrin Ciubotariu 
2076706b115SCodrin Ciubotariu struct vsc9953_ana_ana_tables {
2086706b115SCodrin Ciubotariu 	u32	entry_lim[11];
2096706b115SCodrin Ciubotariu 	u32	an_moved;
2106706b115SCodrin Ciubotariu 	u32	mach_data;
2116706b115SCodrin Ciubotariu 	u32	macl_data;
2126706b115SCodrin Ciubotariu 	u32	mac_access;
2136706b115SCodrin Ciubotariu 	u32	mact_indx;
2146706b115SCodrin Ciubotariu 	u32	vlan_access;
2156706b115SCodrin Ciubotariu 	u32	vlan_tidx;
2166706b115SCodrin Ciubotariu };
2176706b115SCodrin Ciubotariu 
2186706b115SCodrin Ciubotariu struct vsc9953_ana_ana {
2196706b115SCodrin Ciubotariu 	u32	adv_learn;
2206706b115SCodrin Ciubotariu 	u32	vlan_mask;
221440873dfSCodrin Ciubotariu 	u32	reserved;
2226706b115SCodrin Ciubotariu 	u32	anag_efil;
2236706b115SCodrin Ciubotariu 	u32	an_events;
2246706b115SCodrin Ciubotariu 	u32	storm_limit_burst;
2256706b115SCodrin Ciubotariu 	u32	storm_limit_cfg[4];
2266706b115SCodrin Ciubotariu 	u32	isolated_prts;
2276706b115SCodrin Ciubotariu 	u32	community_ports;
2286706b115SCodrin Ciubotariu 	u32	auto_age;
2296706b115SCodrin Ciubotariu 	u32	mac_options;
2306706b115SCodrin Ciubotariu 	u32	learn_disc;
2316706b115SCodrin Ciubotariu 	u32	agen_ctrl;
2326706b115SCodrin Ciubotariu 	u32	mirror_ports;
2336706b115SCodrin Ciubotariu 	u32	emirror_ports;
2346706b115SCodrin Ciubotariu 	u32	flooding;
2356706b115SCodrin Ciubotariu 	u32	flooding_ipmc;
2366706b115SCodrin Ciubotariu 	u32	sflow_cfg[11];
2376706b115SCodrin Ciubotariu 	u32	port_mode[12];
2386706b115SCodrin Ciubotariu };
2396706b115SCodrin Ciubotariu 
2406706b115SCodrin Ciubotariu struct vsc9953_ana_pgid {
2416706b115SCodrin Ciubotariu 	u32	port_grp_id[91];
2426706b115SCodrin Ciubotariu };
2436706b115SCodrin Ciubotariu 
2446706b115SCodrin Ciubotariu struct vsc9953_ana_pfc {
2456706b115SCodrin Ciubotariu 	u32	pfc_cfg;
2466706b115SCodrin Ciubotariu 	u32	reserved1[15];
2476706b115SCodrin Ciubotariu };
2486706b115SCodrin Ciubotariu 
2496706b115SCodrin Ciubotariu struct vsc9953_ana_pol_misc {
2506706b115SCodrin Ciubotariu 	u32	pol_flowc[10];
2516706b115SCodrin Ciubotariu 	u32	reserved1[17];
2526706b115SCodrin Ciubotariu 	u32	pol_hyst;
2536706b115SCodrin Ciubotariu };
2546706b115SCodrin Ciubotariu 
2556706b115SCodrin Ciubotariu struct vsc9953_ana_common {
2566706b115SCodrin Ciubotariu 	u32	aggr_cfg;
2576706b115SCodrin Ciubotariu 	u32	cpuq_cfg;
2586706b115SCodrin Ciubotariu 	u32	cpuq_8021_cfg;
2596706b115SCodrin Ciubotariu 	u32	dscp_cfg;
2606706b115SCodrin Ciubotariu 	u32	dscp_rewr_cfg;
2616706b115SCodrin Ciubotariu 	u32	vcap_rng_type_cfg;
2626706b115SCodrin Ciubotariu 	u32	vcap_rng_val_cfg;
2636706b115SCodrin Ciubotariu 	u32	discard_cfg;
2646706b115SCodrin Ciubotariu 	u32	fid_cfg;
2656706b115SCodrin Ciubotariu };
2666706b115SCodrin Ciubotariu 
2676706b115SCodrin Ciubotariu struct vsc9953_analyzer {
2686706b115SCodrin Ciubotariu 	struct vsc9953_ana_port	port[11];
2696706b115SCodrin Ciubotariu 	u32	reserved1[9536];
2706706b115SCodrin Ciubotariu 	struct vsc9953_ana_pol	pol[164];
2716706b115SCodrin Ciubotariu 	struct vsc9953_ana_ana_tables	ana_tables;
2726706b115SCodrin Ciubotariu 	u32	reserved2[14];
2736706b115SCodrin Ciubotariu 	struct vsc9953_ana_ana	ana;
2746706b115SCodrin Ciubotariu 	u32	reserved3[22];
2756706b115SCodrin Ciubotariu 	struct vsc9953_ana_pgid	port_id_tbl;
2766706b115SCodrin Ciubotariu 	u32	reserved4[549];
2776706b115SCodrin Ciubotariu 	struct vsc9953_ana_pfc	pfc[10];
2786706b115SCodrin Ciubotariu 	struct vsc9953_ana_pol_misc	pol_misc;
2796706b115SCodrin Ciubotariu 	u32	reserved5[196];
2806706b115SCodrin Ciubotariu 	struct vsc9953_ana_common	common;
2816706b115SCodrin Ciubotariu };
2823cc8cfffSCodrin Ciubotariu /* END VSC9953 ANA structure t*/
2836706b115SCodrin Ciubotariu 
2843cc8cfffSCodrin Ciubotariu /* VSC9953 DEV_GMII structure */
2856706b115SCodrin Ciubotariu 
2866706b115SCodrin Ciubotariu struct vsc9953_dev_gmii_port_mode {
2876706b115SCodrin Ciubotariu 	u32	clock_cfg;
2886706b115SCodrin Ciubotariu 	u32	port_misc;
2896706b115SCodrin Ciubotariu 	u32	reserved1;
2906706b115SCodrin Ciubotariu 	u32	eee_cfg;
2916706b115SCodrin Ciubotariu };
2926706b115SCodrin Ciubotariu 
2936706b115SCodrin Ciubotariu struct vsc9953_dev_gmii_mac_cfg_status {
2946706b115SCodrin Ciubotariu 	u32	mac_ena_cfg;
2956706b115SCodrin Ciubotariu 	u32	mac_mode_cfg;
2966706b115SCodrin Ciubotariu 	u32	mac_maxlen_cfg;
2976706b115SCodrin Ciubotariu 	u32	mac_tags_cfg;
2986706b115SCodrin Ciubotariu 	u32	mac_adv_chk_cfg;
2996706b115SCodrin Ciubotariu 	u32	mac_ifg_cfg;
3006706b115SCodrin Ciubotariu 	u32	mac_hdx_cfg;
3016706b115SCodrin Ciubotariu 	u32	mac_fc_mac_low_cfg;
3026706b115SCodrin Ciubotariu 	u32	mac_fc_mac_high_cfg;
3036706b115SCodrin Ciubotariu 	u32	mac_sticky;
3046706b115SCodrin Ciubotariu };
3056706b115SCodrin Ciubotariu 
3066706b115SCodrin Ciubotariu struct vsc9953_dev_gmii {
3076706b115SCodrin Ciubotariu 	struct vsc9953_dev_gmii_port_mode	port_mode;
3086706b115SCodrin Ciubotariu 	struct vsc9953_dev_gmii_mac_cfg_status	mac_cfg_status;
3096706b115SCodrin Ciubotariu };
3106706b115SCodrin Ciubotariu 
3113cc8cfffSCodrin Ciubotariu /* END VSC9953 DEV_GMII structure */
3126706b115SCodrin Ciubotariu 
3133cc8cfffSCodrin Ciubotariu /* VSC9953 QSYS structure */
3146706b115SCodrin Ciubotariu 
3156706b115SCodrin Ciubotariu struct vsc9953_qsys_hsch {
3166706b115SCodrin Ciubotariu 	u32	cir_cfg;
3176706b115SCodrin Ciubotariu 	u32	reserved1;
3186706b115SCodrin Ciubotariu 	u32	se_cfg;
3196706b115SCodrin Ciubotariu 	u32	se_dwrr_cfg[8];
3206706b115SCodrin Ciubotariu 	u32	cir_state;
3216706b115SCodrin Ciubotariu 	u32	reserved2[20];
3226706b115SCodrin Ciubotariu };
3236706b115SCodrin Ciubotariu 
3246706b115SCodrin Ciubotariu struct vsc9953_qsys_sys {
3256706b115SCodrin Ciubotariu 	u32	port_mode[12];
3266706b115SCodrin Ciubotariu 	u32	switch_port_mode[11];
3276706b115SCodrin Ciubotariu 	u32	stat_cnt_cfg;
3286706b115SCodrin Ciubotariu 	u32	eee_cfg[10];
3296706b115SCodrin Ciubotariu 	u32	eee_thrs;
3306706b115SCodrin Ciubotariu 	u32	igr_no_sharing;
3316706b115SCodrin Ciubotariu 	u32	egr_no_sharing;
3326706b115SCodrin Ciubotariu 	u32	sw_status[11];
3336706b115SCodrin Ciubotariu 	u32	ext_cpu_cfg;
3346706b115SCodrin Ciubotariu 	u32	cpu_group_map;
3356706b115SCodrin Ciubotariu 	u32	reserved1[23];
3366706b115SCodrin Ciubotariu };
3376706b115SCodrin Ciubotariu 
3386706b115SCodrin Ciubotariu struct vsc9953_qsys_qos_cfg {
3396706b115SCodrin Ciubotariu 	u32	red_profile[16];
3406706b115SCodrin Ciubotariu 	u32	res_qos_mode;
3416706b115SCodrin Ciubotariu };
3426706b115SCodrin Ciubotariu 
3436706b115SCodrin Ciubotariu struct vsc9953_qsys_drop_cfg {
3446706b115SCodrin Ciubotariu 	u32	egr_drop_mode;
3456706b115SCodrin Ciubotariu };
3466706b115SCodrin Ciubotariu 
3476706b115SCodrin Ciubotariu struct vsc9953_qsys_mmgt {
3486706b115SCodrin Ciubotariu 	u32	eq_cntrl;
3496706b115SCodrin Ciubotariu 	u32	reserved1;
3506706b115SCodrin Ciubotariu };
3516706b115SCodrin Ciubotariu 
3526706b115SCodrin Ciubotariu struct vsc9953_qsys_hsch_misc {
3536706b115SCodrin Ciubotariu 	u32	hsch_misc_cfg;
3546706b115SCodrin Ciubotariu 	u32	reserved1[546];
3556706b115SCodrin Ciubotariu };
3566706b115SCodrin Ciubotariu 
3576706b115SCodrin Ciubotariu struct vsc9953_qsys_res_ctrl {
3586706b115SCodrin Ciubotariu 	u32	res_cfg;
3596706b115SCodrin Ciubotariu 	u32	res_stat;
3606706b115SCodrin Ciubotariu 
3616706b115SCodrin Ciubotariu };
3626706b115SCodrin Ciubotariu 
3636706b115SCodrin Ciubotariu struct vsc9953_qsys_reg {
3646706b115SCodrin Ciubotariu 	struct vsc9953_qsys_hsch	hsch[108];
3656706b115SCodrin Ciubotariu 	struct vsc9953_qsys_sys	sys;
3666706b115SCodrin Ciubotariu 	struct vsc9953_qsys_qos_cfg	qos_cfg;
3676706b115SCodrin Ciubotariu 	struct vsc9953_qsys_drop_cfg	drop_cfg;
3686706b115SCodrin Ciubotariu 	struct vsc9953_qsys_mmgt	mmgt;
3696706b115SCodrin Ciubotariu 	struct vsc9953_qsys_hsch_misc	hsch_misc;
3706706b115SCodrin Ciubotariu 	struct vsc9953_qsys_res_ctrl	res_ctrl[1024];
3716706b115SCodrin Ciubotariu };
3726706b115SCodrin Ciubotariu 
3733cc8cfffSCodrin Ciubotariu /* END VSC9953 QSYS structure */
3746706b115SCodrin Ciubotariu 
3753cc8cfffSCodrin Ciubotariu /* VSC9953 SYS structure */
3766706b115SCodrin Ciubotariu 
37786719f0cSCodrin Ciubotariu struct vsc9953_rx_cntrs {
37886719f0cSCodrin Ciubotariu 	u32	c_rx_oct;
37986719f0cSCodrin Ciubotariu 	u32	c_rx_uc;
38086719f0cSCodrin Ciubotariu 	u32	c_rx_mc;
38186719f0cSCodrin Ciubotariu 	u32	c_rx_bc;
38286719f0cSCodrin Ciubotariu 	u32	c_rx_short;
38386719f0cSCodrin Ciubotariu 	u32	c_rx_frag;
38486719f0cSCodrin Ciubotariu 	u32	c_rx_jabber;
38586719f0cSCodrin Ciubotariu 	u32	c_rx_crc;
38686719f0cSCodrin Ciubotariu 	u32	c_rx_symbol_err;
38786719f0cSCodrin Ciubotariu 	u32	c_rx_sz_64;
38886719f0cSCodrin Ciubotariu 	u32	c_rx_sz_65_127;
38986719f0cSCodrin Ciubotariu 	u32	c_rx_sz_128_255;
39086719f0cSCodrin Ciubotariu 	u32	c_rx_sz_256_511;
39186719f0cSCodrin Ciubotariu 	u32	c_rx_sz_512_1023;
39286719f0cSCodrin Ciubotariu 	u32	c_rx_sz_1024_1526;
39386719f0cSCodrin Ciubotariu 	u32	c_rx_sz_jumbo;
39486719f0cSCodrin Ciubotariu 	u32	c_rx_pause;
39586719f0cSCodrin Ciubotariu 	u32	c_rx_control;
39686719f0cSCodrin Ciubotariu 	u32	c_rx_long;
39786719f0cSCodrin Ciubotariu 	u32	c_rx_cat_drop;
39886719f0cSCodrin Ciubotariu 	u32	c_rx_red_prio_0;
39986719f0cSCodrin Ciubotariu 	u32	c_rx_red_prio_1;
40086719f0cSCodrin Ciubotariu 	u32	c_rx_red_prio_2;
40186719f0cSCodrin Ciubotariu 	u32	c_rx_red_prio_3;
40286719f0cSCodrin Ciubotariu 	u32	c_rx_red_prio_4;
40386719f0cSCodrin Ciubotariu 	u32	c_rx_red_prio_5;
40486719f0cSCodrin Ciubotariu 	u32	c_rx_red_prio_6;
40586719f0cSCodrin Ciubotariu 	u32	c_rx_red_prio_7;
40686719f0cSCodrin Ciubotariu 	u32	c_rx_yellow_prio_0;
40786719f0cSCodrin Ciubotariu 	u32	c_rx_yellow_prio_1;
40886719f0cSCodrin Ciubotariu 	u32	c_rx_yellow_prio_2;
40986719f0cSCodrin Ciubotariu 	u32	c_rx_yellow_prio_3;
41086719f0cSCodrin Ciubotariu 	u32	c_rx_yellow_prio_4;
41186719f0cSCodrin Ciubotariu 	u32	c_rx_yellow_prio_5;
41286719f0cSCodrin Ciubotariu 	u32	c_rx_yellow_prio_6;
41386719f0cSCodrin Ciubotariu 	u32	c_rx_yellow_prio_7;
41486719f0cSCodrin Ciubotariu 	u32	c_rx_green_prio_0;
41586719f0cSCodrin Ciubotariu 	u32	c_rx_green_prio_1;
41686719f0cSCodrin Ciubotariu 	u32	c_rx_green_prio_2;
41786719f0cSCodrin Ciubotariu 	u32	c_rx_green_prio_3;
41886719f0cSCodrin Ciubotariu 	u32	c_rx_green_prio_4;
41986719f0cSCodrin Ciubotariu 	u32	c_rx_green_prio_5;
42086719f0cSCodrin Ciubotariu 	u32	c_rx_green_prio_6;
42186719f0cSCodrin Ciubotariu 	u32	c_rx_green_prio_7;
42286719f0cSCodrin Ciubotariu 	u32	reserved[20];
42386719f0cSCodrin Ciubotariu };
42486719f0cSCodrin Ciubotariu 
42586719f0cSCodrin Ciubotariu struct vsc9953_tx_cntrs {
42686719f0cSCodrin Ciubotariu 	u32	c_tx_oct;
42786719f0cSCodrin Ciubotariu 	u32	c_tx_uc;
42886719f0cSCodrin Ciubotariu 	u32	c_tx_mc;
42986719f0cSCodrin Ciubotariu 	u32	c_tx_bc;
43086719f0cSCodrin Ciubotariu 	u32	c_tx_col;
43186719f0cSCodrin Ciubotariu 	u32	c_tx_drop;
43286719f0cSCodrin Ciubotariu 	u32	c_tx_pause;
43386719f0cSCodrin Ciubotariu 	u32	c_tx_sz_64;
43486719f0cSCodrin Ciubotariu 	u32	c_tx_sz_65_127;
43586719f0cSCodrin Ciubotariu 	u32	c_tx_sz_128_255;
43686719f0cSCodrin Ciubotariu 	u32	c_tx_sz_256_511;
43786719f0cSCodrin Ciubotariu 	u32	c_tx_sz_512_1023;
43886719f0cSCodrin Ciubotariu 	u32	c_tx_sz_1024_1526;
43986719f0cSCodrin Ciubotariu 	u32	c_tx_sz_jumbo;
44086719f0cSCodrin Ciubotariu 	u32	c_tx_yellow_prio_0;
44186719f0cSCodrin Ciubotariu 	u32	c_tx_yellow_prio_1;
44286719f0cSCodrin Ciubotariu 	u32	c_tx_yellow_prio_2;
44386719f0cSCodrin Ciubotariu 	u32	c_tx_yellow_prio_3;
44486719f0cSCodrin Ciubotariu 	u32	c_tx_yellow_prio_4;
44586719f0cSCodrin Ciubotariu 	u32	c_tx_yellow_prio_5;
44686719f0cSCodrin Ciubotariu 	u32	c_tx_yellow_prio_6;
44786719f0cSCodrin Ciubotariu 	u32	c_tx_yellow_prio_7;
44886719f0cSCodrin Ciubotariu 	u32	c_tx_green_prio_0;
44986719f0cSCodrin Ciubotariu 	u32	c_tx_green_prio_1;
45086719f0cSCodrin Ciubotariu 	u32	c_tx_green_prio_2;
45186719f0cSCodrin Ciubotariu 	u32	c_tx_green_prio_3;
45286719f0cSCodrin Ciubotariu 	u32	c_tx_green_prio_4;
45386719f0cSCodrin Ciubotariu 	u32	c_tx_green_prio_5;
45486719f0cSCodrin Ciubotariu 	u32	c_tx_green_prio_6;
45586719f0cSCodrin Ciubotariu 	u32	c_tx_green_prio_7;
45686719f0cSCodrin Ciubotariu 	u32	c_tx_aged;
45786719f0cSCodrin Ciubotariu 	u32	reserved[33];
45886719f0cSCodrin Ciubotariu };
45986719f0cSCodrin Ciubotariu 
46086719f0cSCodrin Ciubotariu struct vsc9953_drop_cntrs {
46186719f0cSCodrin Ciubotariu 	u32	c_dr_local;
46286719f0cSCodrin Ciubotariu 	u32	c_dr_tail;
46386719f0cSCodrin Ciubotariu 	u32	c_dr_yellow_prio_0;
46486719f0cSCodrin Ciubotariu 	u32	c_dr_yellow_prio_1;
46586719f0cSCodrin Ciubotariu 	u32	c_dr_yellow_prio_2;
46686719f0cSCodrin Ciubotariu 	u32	c_dr_yellow_prio_3;
46786719f0cSCodrin Ciubotariu 	u32	c_dr_yellow_prio_4;
46886719f0cSCodrin Ciubotariu 	u32	c_dr_yellow_prio_5;
46986719f0cSCodrin Ciubotariu 	u32	c_dr_yellow_prio_6;
47086719f0cSCodrin Ciubotariu 	u32	c_dr_yellow_prio_7;
47186719f0cSCodrin Ciubotariu 	u32	c_dr_green_prio_0;
47286719f0cSCodrin Ciubotariu 	u32	c_dr_green_prio_1;
47386719f0cSCodrin Ciubotariu 	u32	c_dr_green_prio_2;
47486719f0cSCodrin Ciubotariu 	u32	c_dr_green_prio_3;
47586719f0cSCodrin Ciubotariu 	u32	c_dr_green_prio_4;
47686719f0cSCodrin Ciubotariu 	u32	c_dr_green_prio_5;
47786719f0cSCodrin Ciubotariu 	u32	c_dr_green_prio_6;
47886719f0cSCodrin Ciubotariu 	u32	c_dr_green_prio_7;
47986719f0cSCodrin Ciubotariu 	u32	reserved[46];
48086719f0cSCodrin Ciubotariu };
48186719f0cSCodrin Ciubotariu 
4826706b115SCodrin Ciubotariu struct vsc9953_sys_stat {
48386719f0cSCodrin Ciubotariu 	struct vsc9953_rx_cntrs	rx_cntrs;
48486719f0cSCodrin Ciubotariu 	struct vsc9953_tx_cntrs	tx_cntrs;
48586719f0cSCodrin Ciubotariu 	struct vsc9953_drop_cntrs	drop_cntrs;
4866706b115SCodrin Ciubotariu 	u32	reserved1[6];
4876706b115SCodrin Ciubotariu };
4886706b115SCodrin Ciubotariu 
4896706b115SCodrin Ciubotariu struct vsc9953_sys_sys {
4906706b115SCodrin Ciubotariu 	u32	reset_cfg;
4916706b115SCodrin Ciubotariu 	u32	reserved1;
4926706b115SCodrin Ciubotariu 	u32	vlan_etype_cfg;
4936706b115SCodrin Ciubotariu 	u32	port_mode[12];
4946706b115SCodrin Ciubotariu 	u32	front_port_mode[10];
4956706b115SCodrin Ciubotariu 	u32	frame_aging;
4966706b115SCodrin Ciubotariu 	u32	stat_cfg;
4976706b115SCodrin Ciubotariu 	u32	reserved2[50];
4986706b115SCodrin Ciubotariu };
4996706b115SCodrin Ciubotariu 
5006706b115SCodrin Ciubotariu struct vsc9953_sys_pause_cfg {
5016706b115SCodrin Ciubotariu 	u32	pause_cfg[11];
5026706b115SCodrin Ciubotariu 	u32	pause_tot_cfg;
5036706b115SCodrin Ciubotariu 	u32	tail_drop_level[11];
5046706b115SCodrin Ciubotariu 	u32	tot_tail_drop_lvl;
5056706b115SCodrin Ciubotariu 	u32	mac_fc_cfg[10];
5066706b115SCodrin Ciubotariu };
5076706b115SCodrin Ciubotariu 
5086706b115SCodrin Ciubotariu struct vsc9953_sys_mmgt {
5096706b115SCodrin Ciubotariu 	u16	free_cnt;
5106706b115SCodrin Ciubotariu };
5116706b115SCodrin Ciubotariu 
5126706b115SCodrin Ciubotariu struct vsc9953_system_reg {
5136706b115SCodrin Ciubotariu 	struct vsc9953_sys_stat	stat;
5146706b115SCodrin Ciubotariu 	struct vsc9953_sys_sys	sys;
5156706b115SCodrin Ciubotariu 	struct vsc9953_sys_pause_cfg	pause_cfg;
5166706b115SCodrin Ciubotariu 	struct vsc9953_sys_mmgt	mmgt;
5176706b115SCodrin Ciubotariu };
5186706b115SCodrin Ciubotariu 
5193cc8cfffSCodrin Ciubotariu /* END VSC9953 SYS structure */
5206706b115SCodrin Ciubotariu 
5219de05987SCodrin Ciubotariu /* VSC9953 REW structure */
5229de05987SCodrin Ciubotariu 
5239de05987SCodrin Ciubotariu struct	vsc9953_rew_port {
5249de05987SCodrin Ciubotariu 	u32	port_vlan_cfg;
5259de05987SCodrin Ciubotariu 	u32	port_tag_cfg;
5269de05987SCodrin Ciubotariu 	u32	port_port_cfg;
5279de05987SCodrin Ciubotariu 	u32	port_dscp_cfg;
5289de05987SCodrin Ciubotariu 	u32	port_pcp_dei_qos_map_cfg[16];
5299de05987SCodrin Ciubotariu 	u32	reserved[12];
5309de05987SCodrin Ciubotariu };
5319de05987SCodrin Ciubotariu 
5329de05987SCodrin Ciubotariu struct	vsc9953_rew_common {
5339de05987SCodrin Ciubotariu 	u32	reserve[4];
5349de05987SCodrin Ciubotariu 	u32	dscp_remap_dp1_cfg[64];
5359de05987SCodrin Ciubotariu 	u32	dscp_remap_cfg[64];
5369de05987SCodrin Ciubotariu };
5379de05987SCodrin Ciubotariu 
5389de05987SCodrin Ciubotariu struct	vsc9953_rew_reg {
5399de05987SCodrin Ciubotariu 	struct vsc9953_rew_port	port[12];
5409de05987SCodrin Ciubotariu 	struct vsc9953_rew_common	common;
5419de05987SCodrin Ciubotariu };
5429de05987SCodrin Ciubotariu 
5439de05987SCodrin Ciubotariu /* END VSC9953 REW structure */
5446706b115SCodrin Ciubotariu 
5453cc8cfffSCodrin Ciubotariu /* VSC9953 DEVCPU_GCB structure */
5466706b115SCodrin Ciubotariu 
5476706b115SCodrin Ciubotariu struct vsc9953_chip_regs {
5486706b115SCodrin Ciubotariu 	u32	chipd_id;
5496706b115SCodrin Ciubotariu 	u32	gpr;
5506706b115SCodrin Ciubotariu 	u32	soft_rst;
5516706b115SCodrin Ciubotariu };
5526706b115SCodrin Ciubotariu 
5536706b115SCodrin Ciubotariu struct vsc9953_gpio {
5546706b115SCodrin Ciubotariu 	u32	gpio_out_set[10];
5556706b115SCodrin Ciubotariu 	u32	gpio_out_clr[10];
5566706b115SCodrin Ciubotariu 	u32	gpio_out[10];
5576706b115SCodrin Ciubotariu 	u32	gpio_in[10];
5586706b115SCodrin Ciubotariu };
5596706b115SCodrin Ciubotariu 
5606706b115SCodrin Ciubotariu struct vsc9953_mii_mng {
5616706b115SCodrin Ciubotariu 	u32	miimstatus;
5626706b115SCodrin Ciubotariu 	u32	reserved1;
5636706b115SCodrin Ciubotariu 	u32	miimcmd;
5646706b115SCodrin Ciubotariu 	u32	miimdata;
5656706b115SCodrin Ciubotariu 	u32	miimcfg;
5666706b115SCodrin Ciubotariu 	u32	miimscan_0;
5676706b115SCodrin Ciubotariu 	u32	miimscan_1;
5686706b115SCodrin Ciubotariu 	u32	miiscan_lst_rslts;
5696706b115SCodrin Ciubotariu 	u32	miiscan_lst_rslts_valid;
5706706b115SCodrin Ciubotariu };
5716706b115SCodrin Ciubotariu 
5726706b115SCodrin Ciubotariu struct vsc9953_mii_read_scan {
5736706b115SCodrin Ciubotariu 	u32	mii_scan_results_sticky[2];
5746706b115SCodrin Ciubotariu };
5756706b115SCodrin Ciubotariu 
5766706b115SCodrin Ciubotariu struct vsc9953_devcpu_gcb {
5776706b115SCodrin Ciubotariu 	struct vsc9953_chip_regs	chip_regs;
5786706b115SCodrin Ciubotariu 	struct vsc9953_gpio		gpio;
5796706b115SCodrin Ciubotariu 	struct vsc9953_mii_mng	mii_mng[2];
5806706b115SCodrin Ciubotariu 	struct vsc9953_mii_read_scan	mii_read_scan;
5816706b115SCodrin Ciubotariu };
5826706b115SCodrin Ciubotariu 
5833cc8cfffSCodrin Ciubotariu /* END VSC9953 DEVCPU_GCB structure */
5846706b115SCodrin Ciubotariu 
5853cc8cfffSCodrin Ciubotariu /* VSC9953 IS* structure */
5866706b115SCodrin Ciubotariu 
5876706b115SCodrin Ciubotariu struct vsc9953_vcap_core_cfg {
5886706b115SCodrin Ciubotariu 	u32	vcap_update_ctrl;
5896706b115SCodrin Ciubotariu 	u32	vcap_mv_cfg;
5906706b115SCodrin Ciubotariu };
5916706b115SCodrin Ciubotariu 
5926706b115SCodrin Ciubotariu struct vsc9953_vcap {
5936706b115SCodrin Ciubotariu 	struct vsc9953_vcap_core_cfg	vcap_core_cfg;
5946706b115SCodrin Ciubotariu };
5956706b115SCodrin Ciubotariu 
5963cc8cfffSCodrin Ciubotariu /* END VSC9953 IS* structure */
5976706b115SCodrin Ciubotariu 
5986706b115SCodrin Ciubotariu #define VSC9953_PORT_INFO_INITIALIZER(idx) \
5996706b115SCodrin Ciubotariu {									\
6006706b115SCodrin Ciubotariu 	.enabled	= 0,						\
6016706b115SCodrin Ciubotariu 	.phyaddr	= 0,						\
6026706b115SCodrin Ciubotariu 	.index		= idx,						\
6036706b115SCodrin Ciubotariu 	.phy_regs	= NULL,						\
6046706b115SCodrin Ciubotariu 	.enet_if	= PHY_INTERFACE_MODE_NONE,			\
6056706b115SCodrin Ciubotariu 	.bus		= NULL,						\
6066706b115SCodrin Ciubotariu 	.phydev		= NULL,						\
6076706b115SCodrin Ciubotariu }
6086706b115SCodrin Ciubotariu 
6096706b115SCodrin Ciubotariu /* Structure to describe a VSC9953 port */
6106706b115SCodrin Ciubotariu struct vsc9953_port_info {
6116706b115SCodrin Ciubotariu 	u8	enabled;
6126706b115SCodrin Ciubotariu 	u8	phyaddr;
6136706b115SCodrin Ciubotariu 	int	index;
6146706b115SCodrin Ciubotariu 	void	*phy_regs;
6156706b115SCodrin Ciubotariu 	phy_interface_t	enet_if;
6166706b115SCodrin Ciubotariu 	struct mii_dev	*bus;
6176706b115SCodrin Ciubotariu 	struct phy_device	*phydev;
6186706b115SCodrin Ciubotariu };
6196706b115SCodrin Ciubotariu 
6206706b115SCodrin Ciubotariu /* Structure to describe a VSC9953 switch */
6216706b115SCodrin Ciubotariu struct vsc9953_info {
6226706b115SCodrin Ciubotariu 	struct vsc9953_port_info	port[VSC9953_MAX_PORTS];
6236706b115SCodrin Ciubotariu };
6246706b115SCodrin Ciubotariu 
6256706b115SCodrin Ciubotariu void vsc9953_init(bd_t *bis);
6266706b115SCodrin Ciubotariu 
6273cc8cfffSCodrin Ciubotariu void vsc9953_port_info_set_mdio(int port_no, struct mii_dev *bus);
6283cc8cfffSCodrin Ciubotariu void vsc9953_port_info_set_phy_address(int port_no, int address);
6293cc8cfffSCodrin Ciubotariu void vsc9953_port_enable(int port_no);
6303cc8cfffSCodrin Ciubotariu void vsc9953_port_disable(int port_no);
6313cc8cfffSCodrin Ciubotariu void vsc9953_port_info_set_phy_int(int port_no, phy_interface_t phy_int);
6326706b115SCodrin Ciubotariu 
6336706b115SCodrin Ciubotariu #endif /* _VSC9953_H_ */
634