mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-06-17 04:01:38 +00:00
Merge branch 'network_master' of https://source.denx.de/u-boot/custodians/u-boot-net into next
- Fix some non-NULL terminated strings in the networking subsystem - net: tsec: Mark tsec_get_interface as __maybe_unused
This commit is contained in:
commit
6eecaf5d0f
86 changed files with 277 additions and 255 deletions
|
@ -1147,7 +1147,7 @@ int arch_early_init_r(void)
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_SYS_FSL_HAS_RGMII
|
#ifdef CONFIG_SYS_FSL_HAS_RGMII
|
||||||
/* some dpmacs in armv8a based freescale layerscape SOCs can be
|
/* some dpmacs in armv8a based freescale layerscape SOCs can be
|
||||||
* configured via both serdes(sgmii, xfi, xlaui etc) bits and via
|
* configured via both serdes(sgmii, 10gbase-r, xlaui etc) bits and via
|
||||||
* EC*_PMUX(rgmii) bits in RCW.
|
* EC*_PMUX(rgmii) bits in RCW.
|
||||||
* e.g. dpmac 17 and 18 in LX2160A can be configured as SGMII from
|
* e.g. dpmac 17 and 18 in LX2160A can be configured as SGMII from
|
||||||
* serdes bits and as RGMII via EC1_PMUX/EC2_PMUX bits
|
* serdes bits and as RGMII via EC1_PMUX/EC2_PMUX bits
|
||||||
|
|
|
@ -31,7 +31,7 @@ The LS1043A SoC includes the following function and features:
|
||||||
- Hardware buffer management for buffer allocation and de-allocation (BMan)
|
- Hardware buffer management for buffer allocation and de-allocation (BMan)
|
||||||
- Cryptography acceleration (SEC)
|
- Cryptography acceleration (SEC)
|
||||||
- Ethernet interfaces by FMan
|
- Ethernet interfaces by FMan
|
||||||
- Up to 1 x XFI supporting 10G interface
|
- Up to 1 x 10GBase-R supporting 10G interface
|
||||||
- Up to 1 x QSGMII
|
- Up to 1 x QSGMII
|
||||||
- Up to 4 x SGMII supporting 1000Mbps
|
- Up to 4 x SGMII supporting 1000Mbps
|
||||||
- Up to 2 x SGMII supporting 2500Mbps
|
- Up to 2 x SGMII supporting 2500Mbps
|
||||||
|
@ -190,7 +190,7 @@ The LS1046A SoC includes the following function and features:
|
||||||
- Two PLLs per four-lane SerDes
|
- Two PLLs per four-lane SerDes
|
||||||
- Support for 10G operation
|
- Support for 10G operation
|
||||||
- Ethernet interfaces by FMan
|
- Ethernet interfaces by FMan
|
||||||
- Up to 2 x XFI supporting 10G interface (MAC 9, 10)
|
- Up to 2 x 10GBase-R supporting 10G interface (MAC 9, 10)
|
||||||
- Up to 1 x QSGMII (MAC 5, 6, 10, 1)
|
- Up to 1 x QSGMII (MAC 5, 6, 10, 1)
|
||||||
- Up to 4 x SGMII supporting 1000Mbps (MAC 5, 6, 9, 10)
|
- Up to 4 x SGMII supporting 1000Mbps (MAC 5, 6, 9, 10)
|
||||||
- Up to 3 x SGMII supporting 2500Mbps (MAC 5, 9, 10)
|
- Up to 3 x SGMII supporting 2500Mbps (MAC 5, 9, 10)
|
||||||
|
@ -295,7 +295,7 @@ The LX2160A SoC includes the following function and features:
|
||||||
Single WRIOP tile supporting 130Gbps using 18 MACs
|
Single WRIOP tile supporting 130Gbps using 18 MACs
|
||||||
Support for 10G-SXGMII (aka USXGMII).
|
Support for 10G-SXGMII (aka USXGMII).
|
||||||
Support for SGMII (and 1000Base-KX)
|
Support for SGMII (and 1000Base-KX)
|
||||||
Support for XFI (and 10GBase-KR)
|
Support for 10GBase-R (and 10GBase-KR)
|
||||||
Support for CAUI4 (100G); CAUI2 (50G) and 25G-AUI(25G).
|
Support for CAUI4 (100G); CAUI2 (50G) and 25G-AUI(25G).
|
||||||
Support for XLAUI (and 40GBase-KR4) for 40G.
|
Support for XLAUI (and 40GBase-KR4) for 40G.
|
||||||
Support for two RGMII parallel interfaces.
|
Support for two RGMII parallel interfaces.
|
||||||
|
@ -400,7 +400,7 @@ The LX2162A SoC includes the following function and features:
|
||||||
Ethernet interfaces
|
Ethernet interfaces
|
||||||
Support for 10G-SXGMII (aka USXGMII).
|
Support for 10G-SXGMII (aka USXGMII).
|
||||||
Support for SGMII (and 1000Base-KX)
|
Support for SGMII (and 1000Base-KX)
|
||||||
Support for XFI (and 10GBase-KR)
|
Support for 10GBase-R (and 10GBase-KR)
|
||||||
Support for CAUI2 (50G) and 25G-AUI(25G).
|
Support for CAUI2 (50G) and 25G-AUI(25G).
|
||||||
Support for XLAUI (and 40GBase-KR4) for 40G.
|
Support for XLAUI (and 40GBase-KR4) for 40G.
|
||||||
Support for two RGMII parallel interfaces.
|
Support for two RGMII parallel interfaces.
|
||||||
|
|
|
@ -100,7 +100,7 @@ enum srds_prtcl serdes_get_prtcl(int serdes, int cfg, int lane)
|
||||||
if (serdes >= ARRAY_SIZE(serdes_cfg_tbl))
|
if (serdes >= ARRAY_SIZE(serdes_cfg_tbl))
|
||||||
return 0;
|
return 0;
|
||||||
/*
|
/*
|
||||||
* LS1044A/1048A support only one XFI port
|
* LS1044A/1048A support only one 10GBase-R port
|
||||||
* Disable MAC1 for LS1044A/1048A
|
* Disable MAC1 for LS1044A/1048A
|
||||||
*/
|
*/
|
||||||
if (serdes == FSL_SRDS_1 && lane == 2) {
|
if (serdes == FSL_SRDS_1 && lane == 2) {
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
/*
|
/*
|
||||||
* NXP LS1028A-QDS device tree fragment for RCW 1xxx
|
* NXP LS1028A-QDS device tree fragment for RCW 1xxx
|
||||||
*
|
*
|
||||||
* Copyright 2019-2021 NXP Semiconductors
|
* Copyright 2019-2021 NXP
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
/*
|
/*
|
||||||
* NXP LS1028A-QDS device tree fragment for RCW 6xxx
|
* NXP LS1028A-QDS device tree fragment for RCW 6xxx
|
||||||
*
|
*
|
||||||
* Copyright 2019-2021 NXP Semiconductors
|
* Copyright 2019-2021 NXP
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -14,6 +14,6 @@
|
||||||
|
|
||||||
&enetc0 {
|
&enetc0 {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
phy-mode = "sgmii-2500";
|
phy-mode = "2500base-x";
|
||||||
phy-handle = <&{/i2c@2000000/fpga@66/mux-mdio@54/mdio@40/phy@02}>;
|
phy-handle = <&{/i2c@2000000/fpga@66/mux-mdio@54/mdio@40/phy@02}>;
|
||||||
};
|
};
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
/*
|
/*
|
||||||
* NXP LS1028A-QDS device tree fragment for RCW 7777
|
* NXP LS1028A-QDS device tree fragment for RCW 7777
|
||||||
*
|
*
|
||||||
* Copyright 2019-2021 NXP Semiconductors
|
* Copyright 2019-2021 NXP
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -30,25 +30,25 @@
|
||||||
|
|
||||||
&mscc_felix_port0 {
|
&mscc_felix_port0 {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
phy-mode = "sgmii-2500";
|
phy-mode = "2500base-x";
|
||||||
phy-handle = <&{/i2c@2000000/fpga@66/mux-mdio@54/mdio@40/phy@00}>;
|
phy-handle = <&{/i2c@2000000/fpga@66/mux-mdio@54/mdio@40/phy@00}>;
|
||||||
};
|
};
|
||||||
|
|
||||||
&mscc_felix_port1 {
|
&mscc_felix_port1 {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
phy-mode = "sgmii-2500";
|
phy-mode = "2500base-x";
|
||||||
phy-handle = <&{/i2c@2000000/fpga@66/mux-mdio@54/mdio@40/phy@01}>;
|
phy-handle = <&{/i2c@2000000/fpga@66/mux-mdio@54/mdio@40/phy@01}>;
|
||||||
};
|
};
|
||||||
|
|
||||||
&mscc_felix_port2 {
|
&mscc_felix_port2 {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
phy-mode = "sgmii-2500";
|
phy-mode = "2500base-x";
|
||||||
phy-handle = <&{/i2c@2000000/fpga@66/mux-mdio@54/mdio@40/phy@02}>;
|
phy-handle = <&{/i2c@2000000/fpga@66/mux-mdio@54/mdio@40/phy@02}>;
|
||||||
};
|
};
|
||||||
|
|
||||||
&mscc_felix_port3 {
|
&mscc_felix_port3 {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
phy-mode = "sgmii-2500";
|
phy-mode = "2500base-x";
|
||||||
phy-handle = <&{/i2c@2000000/fpga@66/mux-mdio@54/mdio@40/phy@03}>;
|
phy-handle = <&{/i2c@2000000/fpga@66/mux-mdio@54/mdio@40/phy@03}>;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
/*
|
/*
|
||||||
* NXP LS1028A-QDS device tree fragment for RCW 7xx7
|
* NXP LS1028A-QDS device tree fragment for RCW 7xx7
|
||||||
*
|
*
|
||||||
* Copyright 2019-2021 NXP Semiconductors
|
* Copyright 2019-2021 NXP
|
||||||
*/
|
*/
|
||||||
|
|
||||||
&slot1 {
|
&slot1 {
|
||||||
|
@ -19,13 +19,13 @@
|
||||||
|
|
||||||
&mscc_felix_port0 {
|
&mscc_felix_port0 {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
phy-mode = "sgmii-2500";
|
phy-mode = "2500base-x";
|
||||||
phy-handle = <&{/i2c@2000000/fpga@66/mux-mdio@54/mdio@40/phy@02}>;
|
phy-handle = <&{/i2c@2000000/fpga@66/mux-mdio@54/mdio@40/phy@02}>;
|
||||||
};
|
};
|
||||||
|
|
||||||
&mscc_felix_port3 {
|
&mscc_felix_port3 {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
phy-mode = "sgmii-2500";
|
phy-mode = "2500base-x";
|
||||||
phy-handle = <&{/i2c@2000000/fpga@66/mux-mdio@54/mdio@40/phy@03}>;
|
phy-handle = <&{/i2c@2000000/fpga@66/mux-mdio@54/mdio@40/phy@03}>;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
/*
|
/*
|
||||||
* NXP LS1028A-QDS device tree fragment for RCW 8xxx
|
* NXP LS1028A-QDS device tree fragment for RCW 8xxx
|
||||||
*
|
*
|
||||||
* Copyright 2019-2021 NXP Semiconductors
|
* Copyright 2019-2021 NXP
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
/*
|
/*
|
||||||
* NXP LS1028A-QDS device tree fragment for RCW 9999
|
* NXP LS1028A-QDS device tree fragment for RCW 9999
|
||||||
*
|
*
|
||||||
* Copyright 2019-2021 NXP Semiconductors
|
* Copyright 2019-2021 NXP
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
/*
|
/*
|
||||||
* NXP LS1028A-QDS device tree fragment for RCW 9999
|
* NXP LS1028A-QDS device tree fragment for RCW 9999
|
||||||
*
|
*
|
||||||
* Copyright 2019-2021 NXP Semiconductors
|
* Copyright 2019-2021 NXP
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
/*
|
/*
|
||||||
* NXP LS1028A-QDS device tree fragment for RCW x3xx
|
* NXP LS1028A-QDS device tree fragment for RCW x3xx
|
||||||
*
|
*
|
||||||
* Copyright 2019-2021 NXP Semiconductors
|
* Copyright 2019-2021 NXP
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
/*
|
/*
|
||||||
* NXP LS1028A-QDS device tree fragment for RCW x5xx
|
* NXP LS1028A-QDS device tree fragment for RCW x5xx
|
||||||
*
|
*
|
||||||
* Copyright 2019-2021 NXP Semiconductors
|
* Copyright 2019-2021 NXP
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
/*
|
/*
|
||||||
* NXP LS1028A-QDS device tree fragment for RCW 7777
|
* NXP LS1028A-QDS device tree fragment for RCW 7777
|
||||||
*
|
*
|
||||||
* Copyright 2019-2021 NXP Semiconductors
|
* Copyright 2019-2021 NXP
|
||||||
*/
|
*/
|
||||||
|
|
||||||
&slot2 {
|
&slot2 {
|
||||||
|
@ -19,7 +19,7 @@
|
||||||
|
|
||||||
&mscc_felix_port1 {
|
&mscc_felix_port1 {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
phy-mode = "sgmii-2500";
|
phy-mode = "2500base-x";
|
||||||
phy-handle = <&{/i2c@2000000/fpga@66/mux-mdio@54/mdio@50/phy@02}>;
|
phy-handle = <&{/i2c@2000000/fpga@66/mux-mdio@54/mdio@50/phy@02}>;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
/*
|
/*
|
||||||
* NXP LS1028A-QDS device tree fragment for RCW 7777
|
* NXP LS1028A-QDS device tree fragment for RCW 7777
|
||||||
*
|
*
|
||||||
* Copyright 2019-2021 NXP Semiconductors
|
* Copyright 2019-2021 NXP
|
||||||
*/
|
*/
|
||||||
|
|
||||||
&slot3 {
|
&slot3 {
|
||||||
|
@ -19,7 +19,7 @@
|
||||||
|
|
||||||
&mscc_felix_port2 {
|
&mscc_felix_port2 {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
phy-mode = "sgmii-2500";
|
phy-mode = "2500base-x";
|
||||||
phy-handle = <&{/i2c@2000000/fpga@66/mux-mdio@54/mdio@60/phy@02}>;
|
phy-handle = <&{/i2c@2000000/fpga@66/mux-mdio@54/mdio@60/phy@02}>;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -9,12 +9,12 @@
|
||||||
|
|
||||||
&dpmac1 {
|
&dpmac1 {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
phy-connection-type = "xfi";
|
phy-connection-type = "10gbase-r";
|
||||||
};
|
};
|
||||||
|
|
||||||
&dpmac2 {
|
&dpmac2 {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
phy-connection-type = "xfi";
|
phy-connection-type = "10gbase-r";
|
||||||
};
|
};
|
||||||
|
|
||||||
&dpmac4 {
|
&dpmac4 {
|
||||||
|
|
|
@ -9,10 +9,10 @@
|
||||||
|
|
||||||
&dpmac1 {
|
&dpmac1 {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
phy-connection-type = "xfi";
|
phy-connection-type = "10gbase-r";
|
||||||
};
|
};
|
||||||
|
|
||||||
&dpmac2 {
|
&dpmac2 {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
phy-connection-type = "xfi";
|
phy-connection-type = "10gbase-r";
|
||||||
};
|
};
|
||||||
|
|
|
@ -9,40 +9,40 @@
|
||||||
|
|
||||||
&dpmac1 {
|
&dpmac1 {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
phy-connection-type = "xfi";
|
phy-connection-type = "10gbase-r";
|
||||||
};
|
};
|
||||||
|
|
||||||
&dpmac2 {
|
&dpmac2 {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
phy-connection-type = "xfi";
|
phy-connection-type = "10gbase-r";
|
||||||
};
|
};
|
||||||
|
|
||||||
&dpmac3 {
|
&dpmac3 {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
phy-connection-type = "xfi";
|
phy-connection-type = "10gbase-r";
|
||||||
};
|
};
|
||||||
|
|
||||||
&dpmac4 {
|
&dpmac4 {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
phy-connection-type = "xfi";
|
phy-connection-type = "10gbase-r";
|
||||||
};
|
};
|
||||||
|
|
||||||
&dpmac5 {
|
&dpmac5 {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
phy-connection-type = "xfi";
|
phy-connection-type = "10gbase-r";
|
||||||
};
|
};
|
||||||
|
|
||||||
&dpmac6 {
|
&dpmac6 {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
phy-connection-type = "xfi";
|
phy-connection-type = "10gbase-r";
|
||||||
};
|
};
|
||||||
|
|
||||||
&dpmac7 {
|
&dpmac7 {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
phy-connection-type = "xfi";
|
phy-connection-type = "10gbase-r";
|
||||||
};
|
};
|
||||||
|
|
||||||
&dpmac8 {
|
&dpmac8 {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
phy-connection-type = "xfi";
|
phy-connection-type = "10gbase-r";
|
||||||
};
|
};
|
||||||
|
|
|
@ -24,49 +24,49 @@
|
||||||
&dpmac1 {
|
&dpmac1 {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
phy-handle = <&mdio1_phy1>;
|
phy-handle = <&mdio1_phy1>;
|
||||||
phy-connection-type = "xfi";
|
phy-connection-type = "10gbase-r";
|
||||||
};
|
};
|
||||||
|
|
||||||
&dpmac2 {
|
&dpmac2 {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
phy-handle = <&mdio1_phy2>;
|
phy-handle = <&mdio1_phy2>;
|
||||||
phy-connection-type = "xfi";
|
phy-connection-type = "10gbase-r";
|
||||||
};
|
};
|
||||||
|
|
||||||
&dpmac3 {
|
&dpmac3 {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
phy-handle = <&mdio1_phy3>;
|
phy-handle = <&mdio1_phy3>;
|
||||||
phy-connection-type = "xfi";
|
phy-connection-type = "10gbase-r";
|
||||||
};
|
};
|
||||||
|
|
||||||
&dpmac4 {
|
&dpmac4 {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
phy-handle = <&mdio1_phy4>;
|
phy-handle = <&mdio1_phy4>;
|
||||||
phy-connection-type = "xfi";
|
phy-connection-type = "10gbase-r";
|
||||||
};
|
};
|
||||||
|
|
||||||
&dpmac5 {
|
&dpmac5 {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
phy-handle = <&mdio2_phy1>;
|
phy-handle = <&mdio2_phy1>;
|
||||||
phy-connection-type = "xfi";
|
phy-connection-type = "10gbase-r";
|
||||||
};
|
};
|
||||||
|
|
||||||
&dpmac6 {
|
&dpmac6 {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
phy-handle = <&mdio2_phy2>;
|
phy-handle = <&mdio2_phy2>;
|
||||||
phy-connection-type = "xfi";
|
phy-connection-type = "10gbase-r";
|
||||||
};
|
};
|
||||||
|
|
||||||
&dpmac7 {
|
&dpmac7 {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
phy-handle = <&mdio2_phy3>;
|
phy-handle = <&mdio2_phy3>;
|
||||||
phy-connection-type = "xfi";
|
phy-connection-type = "10gbase-r";
|
||||||
};
|
};
|
||||||
|
|
||||||
&dpmac8 {
|
&dpmac8 {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
phy-handle = <&mdio2_phy4>;
|
phy-handle = <&mdio2_phy4>;
|
||||||
phy-connection-type = "xfi";
|
phy-connection-type = "10gbase-r";
|
||||||
};
|
};
|
||||||
|
|
||||||
&emdio1 {
|
&emdio1 {
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
/*
|
/*
|
||||||
* Device tree fragment for RCW SCH-24801 card
|
* Device tree fragment for RCW SCH-24801 card
|
||||||
*
|
*
|
||||||
* Copyright 2019-2021 NXP Semiconductors
|
* Copyright 2019-2021 NXP
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
/*
|
/*
|
||||||
* Device tree fragment for RCW SCH-28021 card
|
* Device tree fragment for RCW SCH-28021 card
|
||||||
*
|
*
|
||||||
* Copyright 2019-2021 NXP Semiconductors
|
* Copyright 2019-2021 NXP
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -2,14 +2,14 @@
|
||||||
/*
|
/*
|
||||||
* Device tree fragment for RCW SCH-30841 card
|
* Device tree fragment for RCW SCH-30841 card
|
||||||
*
|
*
|
||||||
* Copyright 2019-2021 NXP Semiconductors
|
* Copyright 2019-2021 NXP
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* SCH-30841 is a 4 port add-on card used with various FSL QDS boards.
|
* SCH-30841 is a 4 port add-on card used with various FSL QDS boards.
|
||||||
* It integrates a AQR412C quad PHY which supports 4 interfaces either muxed
|
* It integrates a AQR412C quad PHY which supports 4 interfaces either muxed
|
||||||
* together on a single lane or mapped 1:1 to serdes lanes.
|
* together on a single lane or mapped 1:1 to serdes lanes.
|
||||||
* It supports several protocols - SGMII, SGMII-2500, USXGMII, M-USX, XFI.
|
* It supports several protocols - SGMII, 2500base-X, USXGMII, M-USX, 10GBase-R.
|
||||||
* PHY addresses are 0x00 - 0x03.
|
* PHY addresses are 0x00 - 0x03.
|
||||||
* On the card the first port is the bottom port (closest to PEX connector).
|
* On the card the first port is the bottom port (closest to PEX connector).
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -2,13 +2,13 @@
|
||||||
/*
|
/*
|
||||||
* Device tree fragment for RCW SCH-30842 card
|
* Device tree fragment for RCW SCH-30842 card
|
||||||
*
|
*
|
||||||
* Copyright 2019-2021 NXP Semiconductors
|
* Copyright 2019-2021 NXP
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* SCH-30842 is a single port add-on card used with various FSL QDS boards.
|
* SCH-30842 is a single port add-on card used with various FSL QDS boards.
|
||||||
* It integrates a AQR112 PHY, which supports several protocols - SGMII,
|
* It integrates a AQR112 PHY, which supports several protocols - SGMII,
|
||||||
* SGMII-2500, USXGMII, XFI.
|
* 2500base-x, USXGMII, 10GBase-R.
|
||||||
* PHY address is 0x02.
|
* PHY address is 0x02.
|
||||||
*/
|
*/
|
||||||
phy@02 {
|
phy@02 {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// SPDX-License-Identifier: GPL-2.0
|
// SPDX-License-Identifier: GPL-2.0
|
||||||
/* Copyright 2016-2018 NXP Semiconductors
|
/* Copyright 2016-2018 NXP
|
||||||
* Copyright 2019 Vladimir Oltean <olteanv@gmail.com>
|
* Copyright 2019 Vladimir Oltean <olteanv@gmail.com>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -339,7 +339,7 @@ void __fixup_fdt(void)
|
||||||
case CVMX_QLM_MODE_XFI:
|
case CVMX_QLM_MODE_XFI:
|
||||||
case CVMX_QLM_MODE_RGMII_XFI:
|
case CVMX_QLM_MODE_RGMII_XFI:
|
||||||
case CVMX_QLM_MODE_RGMII_XFI_1X1:
|
case CVMX_QLM_MODE_RGMII_XFI_1X1:
|
||||||
type_str = "xfi";
|
type_str = "10gbase-r";
|
||||||
break;
|
break;
|
||||||
case CVMX_QLM_MODE_10G_KR:
|
case CVMX_QLM_MODE_10G_KR:
|
||||||
case CVMX_QLM_MODE_RGMII_10G_KR:
|
case CVMX_QLM_MODE_RGMII_10G_KR:
|
||||||
|
@ -393,7 +393,7 @@ void __fixup_fdt(void)
|
||||||
if (pmd_control.s.train_en)
|
if (pmd_control.s.train_en)
|
||||||
type_str = "10G_KR";
|
type_str = "10G_KR";
|
||||||
else
|
else
|
||||||
type_str = "xfi";
|
type_str = "10gbase-r";
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
if (pmd_control.s.train_en)
|
if (pmd_control.s.train_en)
|
||||||
|
@ -618,7 +618,7 @@ static void board_configure_qlms(void)
|
||||||
speed[qlm] = 103125;
|
speed[qlm] = 103125;
|
||||||
}
|
}
|
||||||
printf("QLM %d: XLAUI\n", qlm);
|
printf("QLM %d: XLAUI\n", qlm);
|
||||||
} else if (!strncmp(mode_str, "xfi", 3)) {
|
} else if (!strncmp(mode_str, "10gbase-r", 3)) {
|
||||||
bool rgmii = false;
|
bool rgmii = false;
|
||||||
|
|
||||||
speed[qlm] = 103125;
|
speed[qlm] = 103125;
|
||||||
|
|
|
@ -244,7 +244,7 @@ int pfe_eth_board_init(struct udevice *dev)
|
||||||
bus = miiphy_get_dev_by_name(mdio_name);
|
bus = miiphy_get_dev_by_name(mdio_name);
|
||||||
pfe_set_mdio(1, bus);
|
pfe_set_mdio(1, bus);
|
||||||
pfe_set_phy_address_mode(1, CONFIG_PFE_SGMII_2500_PHY2_ADDR,
|
pfe_set_phy_address_mode(1, CONFIG_PFE_SGMII_2500_PHY2_ADDR,
|
||||||
PHY_INTERFACE_MODE_SGMII_2500);
|
PHY_INTERFACE_MODE_2500BASEX);
|
||||||
|
|
||||||
data8 = QIXIS_READ(brdcfg[12]);
|
data8 = QIXIS_READ(brdcfg[12]);
|
||||||
data8 |= 0x20;
|
data8 |= 0x20;
|
||||||
|
@ -263,7 +263,7 @@ int pfe_eth_board_init(struct udevice *dev)
|
||||||
pfe_set_mdio(0, bus);
|
pfe_set_mdio(0, bus);
|
||||||
pfe_set_phy_address_mode(0,
|
pfe_set_phy_address_mode(0,
|
||||||
CONFIG_PFE_SGMII_2500_PHY1_ADDR,
|
CONFIG_PFE_SGMII_2500_PHY1_ADDR,
|
||||||
PHY_INTERFACE_MODE_SGMII_2500);
|
PHY_INTERFACE_MODE_2500BASEX);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
@ -265,7 +265,7 @@ static void fdt_fsl_fixup_of_pfe(void *blob)
|
||||||
ETH_1_2_5G_MDIO_MUX);
|
ETH_1_2_5G_MDIO_MUX);
|
||||||
prop_val.phy_mask = cpu_to_fdt32(
|
prop_val.phy_mask = cpu_to_fdt32(
|
||||||
ETH_2_5G_MDIO_PHY_MASK);
|
ETH_2_5G_MDIO_PHY_MASK);
|
||||||
prop_val.phy_mode = "sgmii-2500";
|
prop_val.phy_mode = "2500base-x";
|
||||||
pfe_set_properties(l_blob, prop_val, ETH_1_PATH,
|
pfe_set_properties(l_blob, prop_val, ETH_1_PATH,
|
||||||
ETH_1_MDIO);
|
ETH_1_MDIO);
|
||||||
} else {
|
} else {
|
||||||
|
@ -277,7 +277,7 @@ static void fdt_fsl_fixup_of_pfe(void *blob)
|
||||||
ETH_2_2_5G_MDIO_MUX);
|
ETH_2_2_5G_MDIO_MUX);
|
||||||
prop_val.phy_mask = cpu_to_fdt32(
|
prop_val.phy_mask = cpu_to_fdt32(
|
||||||
ETH_2_5G_MDIO_PHY_MASK);
|
ETH_2_5G_MDIO_PHY_MASK);
|
||||||
prop_val.phy_mode = "sgmii-2500";
|
prop_val.phy_mode = "2500base-x";
|
||||||
pfe_set_properties(l_blob, prop_val, ETH_2_PATH,
|
pfe_set_properties(l_blob, prop_val, ETH_2_PATH,
|
||||||
ETH_2_MDIO);
|
ETH_2_MDIO);
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
#define ETH_1_2_5G_PHY_ID 0x1
|
#define ETH_1_2_5G_PHY_ID 0x1
|
||||||
#define ETH_1_2_5G_MDIO_MUX 0x2
|
#define ETH_1_2_5G_MDIO_MUX 0x2
|
||||||
#define ETH_2_5G_MDIO_PHY_MASK 0xFFFFFFF9
|
#define ETH_2_5G_MDIO_PHY_MASK 0xFFFFFFF9
|
||||||
#define ETH_2_5G_PHY_MODE "sgmii-2500"
|
#define ETH_2_5G_PHY_MODE "2500base-x"
|
||||||
#define ETH_2_2_5G_BUS_ID 0x1
|
#define ETH_2_2_5G_BUS_ID 0x1
|
||||||
#define ETH_2_2_5G_PHY_ID 0x2
|
#define ETH_2_2_5G_PHY_ID 0x2
|
||||||
#define ETH_2_2_5G_MDIO_MUX 0x3
|
#define ETH_2_2_5G_MDIO_MUX 0x3
|
||||||
|
|
|
@ -121,12 +121,12 @@ int pfe_eth_board_init(struct udevice *dev)
|
||||||
/* MAC1 */
|
/* MAC1 */
|
||||||
pfe_set_phy_address_mode(priv->gemac_port,
|
pfe_set_phy_address_mode(priv->gemac_port,
|
||||||
CONFIG_PFE_EMAC1_PHY_ADDR,
|
CONFIG_PFE_EMAC1_PHY_ADDR,
|
||||||
PHY_INTERFACE_MODE_SGMII_2500);
|
PHY_INTERFACE_MODE_2500BASEX);
|
||||||
} else {
|
} else {
|
||||||
/* MAC2 */
|
/* MAC2 */
|
||||||
pfe_set_phy_address_mode(priv->gemac_port,
|
pfe_set_phy_address_mode(priv->gemac_port,
|
||||||
CONFIG_PFE_EMAC2_PHY_ADDR,
|
CONFIG_PFE_EMAC2_PHY_ADDR,
|
||||||
PHY_INTERFACE_MODE_SGMII_2500);
|
PHY_INTERFACE_MODE_2500BASEX);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// SPDX-License-Identifier: GPL-2.0
|
// SPDX-License-Identifier: GPL-2.0
|
||||||
/* Copyright 2016-2019 NXP Semiconductors
|
/* Copyright 2016-2019 NXP
|
||||||
*/
|
*/
|
||||||
#include <common.h>
|
#include <common.h>
|
||||||
#include <clock_legacy.h>
|
#include <clock_legacy.h>
|
||||||
|
|
|
@ -18,7 +18,7 @@ SoC overview.
|
||||||
- SGMII, SGMII 2.5
|
- SGMII, SGMII 2.5
|
||||||
- QSGMII
|
- QSGMII
|
||||||
- SATA 3.0
|
- SATA 3.0
|
||||||
- XFI
|
- 10GBase-R
|
||||||
- DDR Controller
|
- DDR Controller
|
||||||
- 2GB 40bits (8-bits ECC) DDR4 SDRAM. Support rates of up to 1600MT/s
|
- 2GB 40bits (8-bits ECC) DDR4 SDRAM. Support rates of up to 1600MT/s
|
||||||
-IFC/Local Bus
|
-IFC/Local Bus
|
||||||
|
|
|
@ -176,7 +176,7 @@ void board_ft_fman_fixup_port(void *fdt, char *compat, phys_addr_t addr,
|
||||||
"sgmii-riser-s4-p1");
|
"sgmii-riser-s4-p1");
|
||||||
}
|
}
|
||||||
} else if (fm_info_get_enet_if(port) ==
|
} else if (fm_info_get_enet_if(port) ==
|
||||||
PHY_INTERFACE_MODE_SGMII_2500) {
|
PHY_INTERFACE_MODE_2500BASEX) {
|
||||||
/* 2.5G SGMII interface */
|
/* 2.5G SGMII interface */
|
||||||
f_link.phy_id = cpu_to_fdt32(port);
|
f_link.phy_id = cpu_to_fdt32(port);
|
||||||
f_link.duplex = cpu_to_fdt32(1);
|
f_link.duplex = cpu_to_fdt32(1);
|
||||||
|
@ -187,7 +187,7 @@ void board_ft_fman_fixup_port(void *fdt, char *compat, phys_addr_t addr,
|
||||||
fdt_delprop(fdt, offset, "phy-handle");
|
fdt_delprop(fdt, offset, "phy-handle");
|
||||||
fdt_setprop(fdt, offset, "fixed-link", &f_link, sizeof(f_link));
|
fdt_setprop(fdt, offset, "fixed-link", &f_link, sizeof(f_link));
|
||||||
fdt_setprop_string(fdt, offset, "phy-connection-type",
|
fdt_setprop_string(fdt, offset, "phy-connection-type",
|
||||||
"sgmii-2500");
|
"2500base-x");
|
||||||
} else if (fm_info_get_enet_if(port) == PHY_INTERFACE_MODE_QSGMII) {
|
} else if (fm_info_get_enet_if(port) == PHY_INTERFACE_MODE_QSGMII) {
|
||||||
switch (mdio_mux[port]) {
|
switch (mdio_mux[port]) {
|
||||||
case EMI1_SLOT1:
|
case EMI1_SLOT1:
|
||||||
|
@ -242,13 +242,13 @@ void board_ft_fman_fixup_port(void *fdt, char *compat, phys_addr_t addr,
|
||||||
"qsgmii");
|
"qsgmii");
|
||||||
} else if (fm_info_get_enet_if(port) == PHY_INTERFACE_MODE_XGMII &&
|
} else if (fm_info_get_enet_if(port) == PHY_INTERFACE_MODE_XGMII &&
|
||||||
port == FM1_10GEC1) {
|
port == FM1_10GEC1) {
|
||||||
/* XFI interface */
|
/* 10GBase-R interface */
|
||||||
f_link.phy_id = cpu_to_fdt32(port);
|
f_link.phy_id = cpu_to_fdt32(port);
|
||||||
f_link.duplex = cpu_to_fdt32(1);
|
f_link.duplex = cpu_to_fdt32(1);
|
||||||
f_link.link_speed = cpu_to_fdt32(10000);
|
f_link.link_speed = cpu_to_fdt32(10000);
|
||||||
f_link.pause = 0;
|
f_link.pause = 0;
|
||||||
f_link.asym_pause = 0;
|
f_link.asym_pause = 0;
|
||||||
/* no PHY for XFI */
|
/* no PHY for 10GBase-R */
|
||||||
fdt_delprop(fdt, offset, "phy-handle");
|
fdt_delprop(fdt, offset, "phy-handle");
|
||||||
fdt_setprop(fdt, offset, "fixed-link", &f_link, sizeof(f_link));
|
fdt_setprop(fdt, offset, "fixed-link", &f_link, sizeof(f_link));
|
||||||
fdt_setprop_string(fdt, offset, "phy-connection-type", "xgmii");
|
fdt_setprop_string(fdt, offset, "phy-connection-type", "xgmii");
|
||||||
|
@ -430,12 +430,12 @@ int board_eth_init(struct bd_info *bis)
|
||||||
interface = fm_info_get_enet_if(i);
|
interface = fm_info_get_enet_if(i);
|
||||||
switch (interface) {
|
switch (interface) {
|
||||||
case PHY_INTERFACE_MODE_SGMII:
|
case PHY_INTERFACE_MODE_SGMII:
|
||||||
case PHY_INTERFACE_MODE_SGMII_2500:
|
case PHY_INTERFACE_MODE_2500BASEX:
|
||||||
case PHY_INTERFACE_MODE_QSGMII:
|
case PHY_INTERFACE_MODE_QSGMII:
|
||||||
if (interface == PHY_INTERFACE_MODE_SGMII) {
|
if (interface == PHY_INTERFACE_MODE_SGMII) {
|
||||||
lane = serdes_get_first_lane(FSL_SRDS_1,
|
lane = serdes_get_first_lane(FSL_SRDS_1,
|
||||||
SGMII_FM1_DTSEC1 + idx);
|
SGMII_FM1_DTSEC1 + idx);
|
||||||
} else if (interface == PHY_INTERFACE_MODE_SGMII_2500) {
|
} else if (interface == PHY_INTERFACE_MODE_2500BASEX) {
|
||||||
lane = serdes_get_first_lane(FSL_SRDS_1,
|
lane = serdes_get_first_lane(FSL_SRDS_1,
|
||||||
SGMII_2500_FM1_DTSEC1 + idx);
|
SGMII_2500_FM1_DTSEC1 + idx);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -17,7 +17,7 @@ SoC overview.
|
||||||
- PCI Express 2.0 with two PCIe connectors supporting: miniPCIe card and
|
- PCI Express 2.0 with two PCIe connectors supporting: miniPCIe card and
|
||||||
standard PCIe card
|
standard PCIe card
|
||||||
- QSGMII with x4 RJ45 connector
|
- QSGMII with x4 RJ45 connector
|
||||||
- XFI with x1 RJ45 connector
|
- 10GBase-R with x1 RJ45 connector
|
||||||
- DDR Controller
|
- DDR Controller
|
||||||
- 2GB 32bits DDR4 SDRAM. Support rates of up to 1600MT/s
|
- 2GB 32bits DDR4 SDRAM. Support rates of up to 1600MT/s
|
||||||
-IFC/Local Bus
|
-IFC/Local Bus
|
||||||
|
|
|
@ -65,7 +65,7 @@ int board_eth_init(struct bd_info *bis)
|
||||||
for (i = FM1_DTSEC1; i < FM1_DTSEC1 + CONFIG_SYS_NUM_FM1_DTSEC; i++)
|
for (i = FM1_DTSEC1; i < FM1_DTSEC1 + CONFIG_SYS_NUM_FM1_DTSEC; i++)
|
||||||
fm_info_set_mdio(i, dev);
|
fm_info_set_mdio(i, dev);
|
||||||
|
|
||||||
/* XFI on lane A, MAC 9 */
|
/* 10GBase-R on lane A, MAC 9 */
|
||||||
fm_info_set_phy_address(FM1_10GEC1, FM1_10GEC1_PHY_ADDR);
|
fm_info_set_phy_address(FM1_10GEC1, FM1_10GEC1_PHY_ADDR);
|
||||||
dev = miiphy_get_dev_by_name(DEFAULT_FM_TGEC_MDIO_NAME);
|
dev = miiphy_get_dev_by_name(DEFAULT_FM_TGEC_MDIO_NAME);
|
||||||
fm_info_set_mdio(FM1_10GEC1, dev);
|
fm_info_set_mdio(FM1_10GEC1, dev);
|
||||||
|
|
|
@ -18,7 +18,7 @@ SoC overview.
|
||||||
- SGMII, SGMII 2.5
|
- SGMII, SGMII 2.5
|
||||||
- QSGMII
|
- QSGMII
|
||||||
- SATA 3.0
|
- SATA 3.0
|
||||||
- XFI
|
- 10GBase-R
|
||||||
- DDR Controller
|
- DDR Controller
|
||||||
- 8GB 64bits DDR4 SDRAM. Support rates of up to 2133MT/s
|
- 8GB 64bits DDR4 SDRAM. Support rates of up to 2133MT/s
|
||||||
-IFC/Local Bus
|
-IFC/Local Bus
|
||||||
|
|
|
@ -178,7 +178,7 @@ void board_ft_fman_fixup_port(void *fdt, char *compat, phys_addr_t addr,
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} else if (fm_info_get_enet_if(port) == PHY_INTERFACE_MODE_SGMII_2500) {
|
} else if (fm_info_get_enet_if(port) == PHY_INTERFACE_MODE_2500BASEX) {
|
||||||
/* 2.5G SGMII interface */
|
/* 2.5G SGMII interface */
|
||||||
f_link.phy_id = cpu_to_fdt32(port);
|
f_link.phy_id = cpu_to_fdt32(port);
|
||||||
f_link.duplex = cpu_to_fdt32(1);
|
f_link.duplex = cpu_to_fdt32(1);
|
||||||
|
@ -189,7 +189,7 @@ void board_ft_fman_fixup_port(void *fdt, char *compat, phys_addr_t addr,
|
||||||
fdt_delprop(fdt, offset, "phy-handle");
|
fdt_delprop(fdt, offset, "phy-handle");
|
||||||
fdt_setprop(fdt, offset, "fixed-link", &f_link, sizeof(f_link));
|
fdt_setprop(fdt, offset, "fixed-link", &f_link, sizeof(f_link));
|
||||||
fdt_setprop_string(fdt, offset, "phy-connection-type",
|
fdt_setprop_string(fdt, offset, "phy-connection-type",
|
||||||
"sgmii-2500");
|
"2500base-x");
|
||||||
} else if (fm_info_get_enet_if(port) == PHY_INTERFACE_MODE_QSGMII) {
|
} else if (fm_info_get_enet_if(port) == PHY_INTERFACE_MODE_QSGMII) {
|
||||||
switch (port) {
|
switch (port) {
|
||||||
case FM1_DTSEC1:
|
case FM1_DTSEC1:
|
||||||
|
@ -217,13 +217,13 @@ void board_ft_fman_fixup_port(void *fdt, char *compat, phys_addr_t addr,
|
||||||
/* Backplane KR mode: skip fixups */
|
/* Backplane KR mode: skip fixups */
|
||||||
printf("Interface %d in backplane KR mode\n", port);
|
printf("Interface %d in backplane KR mode\n", port);
|
||||||
} else {
|
} else {
|
||||||
/* XFI interface */
|
/* 10GBase-R interface */
|
||||||
f_link.phy_id = cpu_to_fdt32(port);
|
f_link.phy_id = cpu_to_fdt32(port);
|
||||||
f_link.duplex = cpu_to_fdt32(1);
|
f_link.duplex = cpu_to_fdt32(1);
|
||||||
f_link.link_speed = cpu_to_fdt32(10000);
|
f_link.link_speed = cpu_to_fdt32(10000);
|
||||||
f_link.pause = 0;
|
f_link.pause = 0;
|
||||||
f_link.asym_pause = 0;
|
f_link.asym_pause = 0;
|
||||||
/* no PHY for XFI */
|
/* no PHY for 10GBase-R */
|
||||||
fdt_delprop(fdt, offset, "phy-handle");
|
fdt_delprop(fdt, offset, "phy-handle");
|
||||||
fdt_setprop(fdt, offset, "fixed-link", &f_link,
|
fdt_setprop(fdt, offset, "fixed-link", &f_link,
|
||||||
sizeof(f_link));
|
sizeof(f_link));
|
||||||
|
|
|
@ -14,8 +14,8 @@ SoC overview.
|
||||||
LS1046ARDB board Overview
|
LS1046ARDB board Overview
|
||||||
-----------------------
|
-----------------------
|
||||||
- SERDES1 Connections, 4 lanes supporting:
|
- SERDES1 Connections, 4 lanes supporting:
|
||||||
- Lane0: XFI with x1 RJ45 connector
|
- Lane0: 10GBase-R with x1 RJ45 connector
|
||||||
- Lane1: XFI Cage
|
- Lane1: 10GBase-R Cage
|
||||||
- Lane2: SGMII.5
|
- Lane2: SGMII.5
|
||||||
- Lane3: SGMII.6
|
- Lane3: SGMII.6
|
||||||
- SERDES2 Connections, 4 lanes supporting:
|
- SERDES2 Connections, 4 lanes supporting:
|
||||||
|
|
|
@ -67,7 +67,7 @@ int board_eth_init(struct bd_info *bis)
|
||||||
for (i = FM1_DTSEC1; i < FM1_DTSEC1 + CONFIG_SYS_NUM_FM1_DTSEC; i++)
|
for (i = FM1_DTSEC1; i < FM1_DTSEC1 + CONFIG_SYS_NUM_FM1_DTSEC; i++)
|
||||||
fm_info_set_mdio(i, dev);
|
fm_info_set_mdio(i, dev);
|
||||||
|
|
||||||
/* XFI on lane A, MAC 9 */
|
/* 10GBase-R on lane A, MAC 9 */
|
||||||
dev = miiphy_get_dev_by_name(DEFAULT_FM_TGEC_MDIO_NAME);
|
dev = miiphy_get_dev_by_name(DEFAULT_FM_TGEC_MDIO_NAME);
|
||||||
fm_info_set_mdio(FM1_10GEC1, dev);
|
fm_info_set_mdio(FM1_10GEC1, dev);
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,7 @@ Alternately you can use this command to switch from QSPI to SD
|
||||||
- SERDES Connections, 16 lanes supporting:
|
- SERDES Connections, 16 lanes supporting:
|
||||||
- PCI Express - 3.0
|
- PCI Express - 3.0
|
||||||
- SATA 3.0
|
- SATA 3.0
|
||||||
- XFI
|
- 10GBase-R
|
||||||
- QSGMII
|
- QSGMII
|
||||||
- DDR Controller
|
- DDR Controller
|
||||||
- One ports of 72-bits (8-bits ECC, 64-bits DATA) DDR4. Each port supports four
|
- One ports of 72-bits (8-bits ECC, 64-bits DATA) DDR4. Each port supports four
|
||||||
|
@ -106,7 +106,7 @@ SW12 1111 1111
|
||||||
- SERDES Connections, 16 lanes supporting:
|
- SERDES Connections, 16 lanes supporting:
|
||||||
- PCI Express - 3.0
|
- PCI Express - 3.0
|
||||||
- SATA 3.0
|
- SATA 3.0
|
||||||
- 2 XFI
|
- 2 10GBase-R
|
||||||
- QSGMII, SGMII with help for Riser card
|
- QSGMII, SGMII with help for Riser card
|
||||||
- 2 RGMII
|
- 2 RGMII
|
||||||
- 5 slot for Riser card or PCIe NIC
|
- 5 slot for Riser card or PCIe NIC
|
||||||
|
|
|
@ -52,9 +52,9 @@ int board_eth_init(struct bd_info *bis)
|
||||||
switch (srds_s1) {
|
switch (srds_s1) {
|
||||||
case 0x1D:
|
case 0x1D:
|
||||||
/*
|
/*
|
||||||
* XFI does not need a PHY to work, but to avoid U-boot use
|
* 10GBase-R does not need a PHY to work, but to avoid U-boot
|
||||||
* default PHY address which is zero to a MAC when it found
|
* use default PHY address which is zero to a MAC when it found
|
||||||
* a MAC has no PHY address, we give a PHY address to XFI
|
* a MAC has no PHY address, we give a PHY address to 10GBase-R
|
||||||
* MAC error.
|
* MAC error.
|
||||||
*/
|
*/
|
||||||
wriop_set_phy_address(WRIOP1_DPMAC1, 0, 0x0a);
|
wriop_set_phy_address(WRIOP1_DPMAC1, 0, 0x0a);
|
||||||
|
|
|
@ -19,7 +19,7 @@ LS2088A SoC overview.
|
||||||
- QSGMII
|
- QSGMII
|
||||||
- SATA 3.0
|
- SATA 3.0
|
||||||
- XAUI
|
- XAUI
|
||||||
- XFI
|
- 10GBase-R
|
||||||
- DDR Controller
|
- DDR Controller
|
||||||
- Two ports of 72-bits (8-bits ECC) DDR4. Each port supports four
|
- Two ports of 72-bits (8-bits ECC) DDR4. Each port supports four
|
||||||
chip-selects and two DIMM connectors. Support is up to 2133MT/s.
|
chip-selects and two DIMM connectors. Support is up to 2133MT/s.
|
||||||
|
|
|
@ -874,13 +874,12 @@ void ls2080a_handle_phy_interface_xsgmii(int i)
|
||||||
case 0x4B:
|
case 0x4B:
|
||||||
case 0x4C:
|
case 0x4C:
|
||||||
/*
|
/*
|
||||||
* XFI does not need a PHY to work, but to avoid U-Boot use
|
* 10GBase-R does not need a PHY to work, but to avoid U-Boot
|
||||||
* default PHY address which is zero to a MAC when it found
|
* use default PHY address which is zero to a MAC when it found
|
||||||
* a MAC has no PHY address, we give a PHY address to XFI
|
* a MAC has no PHY address, we give a PHY address to 10GBase-R
|
||||||
* MAC, and should not use a real XAUI PHY address, since
|
* MAC, and should not use a real XAUI PHY address, since MDIO
|
||||||
* MDIO can access it successfully, and then MDIO thinks
|
* can access it successfully, and then MDIO thinks the XAUI
|
||||||
* the XAUI card is used for the XFI MAC, which will cause
|
* card is used for the 10GBase-R MAC, which will cause error.
|
||||||
* error.
|
|
||||||
*/
|
*/
|
||||||
wriop_set_phy_address(i, 0, i + 4);
|
wriop_set_phy_address(i, 0, i + 4);
|
||||||
ls2080a_qds_enable_SFP_TX(SFP_TX);
|
ls2080a_qds_enable_SFP_TX(SFP_TX);
|
||||||
|
|
|
@ -18,7 +18,7 @@ LS2081A, LS2088A SoC overview.
|
||||||
- SERDES Connections, 16 lanes supporting:
|
- SERDES Connections, 16 lanes supporting:
|
||||||
- PCI Express - 3.0
|
- PCI Express - 3.0
|
||||||
- SATA 3.0
|
- SATA 3.0
|
||||||
- XFI
|
- 10GBase-R
|
||||||
- DDR Controller
|
- DDR Controller
|
||||||
- Two ports of 72-bits (8-bits ECC) DDR4. Each port supports four
|
- Two ports of 72-bits (8-bits ECC) DDR4. Each port supports four
|
||||||
chip-selects and two DIMM connectors. Support is up to 2133MT/s.
|
chip-selects and two DIMM connectors. Support is up to 2133MT/s.
|
||||||
|
|
|
@ -39,7 +39,7 @@ The T1024 SoC includes the following function and features:
|
||||||
- One QSGMII interface
|
- One QSGMII interface
|
||||||
- Four SGMII interface supporting 1000 Mbps
|
- Four SGMII interface supporting 1000 Mbps
|
||||||
- Three SGMII interfaces supporting up to 2500 Mbps
|
- Three SGMII interfaces supporting up to 2500 Mbps
|
||||||
- 10GbE XFI or 10Base-KR interface
|
- 10GBase-R or 10Base-KR interface
|
||||||
- Additional peripheral interfaces
|
- Additional peripheral interfaces
|
||||||
- Two USB 2.0 controllers with integrated PHY
|
- Two USB 2.0 controllers with integrated PHY
|
||||||
- SD/eSDHC/eMMC
|
- SD/eSDHC/eMMC
|
||||||
|
|
|
@ -64,7 +64,7 @@ int board_eth_init(struct bd_info *bis)
|
||||||
/* set the on-board RGMII2 PHY */
|
/* set the on-board RGMII2 PHY */
|
||||||
fm_info_set_phy_address(FM1_DTSEC3, RGMII_PHY2_ADDR);
|
fm_info_set_phy_address(FM1_DTSEC3, RGMII_PHY2_ADDR);
|
||||||
|
|
||||||
/* set 10G XFI with Aquantia AQR105 PHY */
|
/* set 10GBase-R with Aquantia AQR105 PHY */
|
||||||
fm_info_set_phy_address(FM1_10GEC1, FM1_10GEC1_PHY_ADDR);
|
fm_info_set_phy_address(FM1_10GEC1, FM1_10GEC1_PHY_ADDR);
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
@ -103,7 +103,7 @@ int board_eth_init(struct bd_info *bis)
|
||||||
#endif
|
#endif
|
||||||
fm_info_set_mdio(i, dev);
|
fm_info_set_mdio(i, dev);
|
||||||
break;
|
break;
|
||||||
case PHY_INTERFACE_MODE_SGMII_2500:
|
case PHY_INTERFACE_MODE_2500BASEX:
|
||||||
dev = miiphy_get_dev_by_name(DEFAULT_FM_TGEC_MDIO_NAME);
|
dev = miiphy_get_dev_by_name(DEFAULT_FM_TGEC_MDIO_NAME);
|
||||||
fm_info_set_mdio(i, dev);
|
fm_info_set_mdio(i, dev);
|
||||||
break;
|
break;
|
||||||
|
@ -133,12 +133,12 @@ void board_ft_fman_fixup_port(void *fdt, char *compat, phys_addr_t addr,
|
||||||
enum fm_port port, int offset)
|
enum fm_port port, int offset)
|
||||||
{
|
{
|
||||||
#if defined(CONFIG_TARGET_T1024RDB)
|
#if defined(CONFIG_TARGET_T1024RDB)
|
||||||
if (((fm_info_get_enet_if(port) == PHY_INTERFACE_MODE_SGMII_2500) ||
|
if (((fm_info_get_enet_if(port) == PHY_INTERFACE_MODE_2500BASEX) ||
|
||||||
(fm_info_get_enet_if(port) == PHY_INTERFACE_MODE_SGMII)) &&
|
(fm_info_get_enet_if(port) == PHY_INTERFACE_MODE_SGMII)) &&
|
||||||
(port == FM1_DTSEC3)) {
|
(port == FM1_DTSEC3)) {
|
||||||
fdt_set_phy_handle(fdt, compat, addr, "sg_2500_aqr105_phy4");
|
fdt_set_phy_handle(fdt, compat, addr, "sg_2500_aqr105_phy4");
|
||||||
fdt_setprop_string(fdt, offset, "phy-connection-type",
|
fdt_setprop_string(fdt, offset, "phy-connection-type",
|
||||||
"sgmii-2500");
|
"2500base-x");
|
||||||
fdt_status_disabled_by_alias(fdt, "xg_aqr105_phy3");
|
fdt_status_disabled_by_alias(fdt, "xg_aqr105_phy3");
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -55,14 +55,14 @@ Memory:
|
||||||
- Two DDR3 DIMMs up to 4GB, Dual rank @ 2133MT/s and ECC support
|
- Two DDR3 DIMMs up to 4GB, Dual rank @ 2133MT/s and ECC support
|
||||||
Ethernet interfaces:
|
Ethernet interfaces:
|
||||||
- Two 1Gbps RGMII on-board ports
|
- Two 1Gbps RGMII on-board ports
|
||||||
- Four 10Gbps XFI on-board cages
|
- Four 10GBase-R on-board cages
|
||||||
- 1Gbps/2.5Gbps SGMII Riser card
|
- 1Gbps/2.5Gbps SGMII Riser card
|
||||||
- 10Gbps XAUI Riser card
|
- 10Gbps XAUI Riser card
|
||||||
Accelerator:
|
Accelerator:
|
||||||
- DPAA components consist of FMan, BMan, QMan, PME, DCE and SEC
|
- DPAA components consist of FMan, BMan, QMan, PME, DCE and SEC
|
||||||
SerDes:
|
SerDes:
|
||||||
- 16 lanes up to 10.3125GHz
|
- 16 lanes up to 10.3125GHz
|
||||||
- Supports Aurora debug, PEX, SATA, SGMII, sRIO, HiGig, XFI and XAUI
|
- Supports Aurora debug, PEX, SATA, SGMII, sRIO, HiGig, 10GBase-R and XAUI
|
||||||
IFC:
|
IFC:
|
||||||
- 128MB NOR Flash, 512MB NAND Flash, PromJet debug port and FPGA
|
- 128MB NOR Flash, 512MB NAND Flash, PromJet debug port and FPGA
|
||||||
eSPI:
|
eSPI:
|
||||||
|
@ -85,14 +85,14 @@ System Logic:
|
||||||
- QIXIS-II FPGA system controll
|
- QIXIS-II FPGA system controll
|
||||||
Debug Features:
|
Debug Features:
|
||||||
- Support Legacy, COP/JTAG, Aurora, Event and EVT
|
- Support Legacy, COP/JTAG, Aurora, Event and EVT
|
||||||
XFI:
|
10GBase-R:
|
||||||
- XFI is supported on T2080QDS through Lane A/B/C/D on Serdes 1 routed to
|
- 10GBase-R is supported on T2080QDS through Lane A/B/C/D on Serdes 1 routed to
|
||||||
a on-board SFP+ cages, which to house optical module (fiber cable) or
|
a on-board SFP+ cages, which to house optical module (fiber cable) or
|
||||||
direct attach cable(copper), the copper cable is used to emulate
|
direct attach cable(copper), the copper cable is used to emulate
|
||||||
10GBASE-KR scenario.
|
10GBASE-KR scenario.
|
||||||
So, for XFI usage, there are two scenarios, one will use fiber cable,
|
So, for 10GBase-R usage, there are two scenarios, one will use fiber cable,
|
||||||
another will use copper cable. An hwconfig env "fsl_10gkr_copper" is
|
another will use copper cable. An hwconfig env "fsl_10gkr_copper" is
|
||||||
introduced to indicate a XFI port will use copper cable, and U-Boot
|
introduced to indicate a 10GBase-R port will use copper cable, and U-Boot
|
||||||
will fixup the dtb accordingly.
|
will fixup the dtb accordingly.
|
||||||
It's used as: fsl_10gkr_copper:<10g_mac_name>
|
It's used as: fsl_10gkr_copper:<10g_mac_name>
|
||||||
The <10g_mac_name> can be fm1_10g1, fm1_10g2, fm1_10g3, fm1_10g4, they
|
The <10g_mac_name> can be fm1_10g1, fm1_10g2, fm1_10g3, fm1_10g4, they
|
||||||
|
@ -100,10 +100,10 @@ XFI:
|
||||||
"fsl_10gkr_copper", it will use copper cable, otherwise, fiber cable
|
"fsl_10gkr_copper", it will use copper cable, otherwise, fiber cable
|
||||||
will be used by default.
|
will be used by default.
|
||||||
for ex. set "fsl_10gkr_copper:fm1_10g1,fm1_10g2,fm1_10g3,fm1_10g4" in
|
for ex. set "fsl_10gkr_copper:fm1_10g1,fm1_10g2,fm1_10g3,fm1_10g4" in
|
||||||
hwconfig, then both four XFI ports will use copper cable.
|
hwconfig, then both four 10GBase-R ports will use copper cable.
|
||||||
set "fsl_10gkr_copper:fm1_10g1,fm1_10g2" in hwconfig, then first two
|
set "fsl_10gkr_copper:fm1_10g1,fm1_10g2" in hwconfig, then first two
|
||||||
XFI ports will use copper cable, the other two XFI ports will use fiber
|
10GBase-R ports will use copper cable, the other two 10GBase-R ports will use
|
||||||
cable.
|
fiber cable.
|
||||||
1000BASE-KX(1G-KX):
|
1000BASE-KX(1G-KX):
|
||||||
- T2080QDS can support 1G-KX by using SGMII protocol, but serdes lane
|
- T2080QDS can support 1G-KX by using SGMII protocol, but serdes lane
|
||||||
runs in 1G-KX mode. By default, the lane runs in SGMII mode, to set a lane
|
runs in 1G-KX mode. By default, the lane runs in SGMII mode, to set a lane
|
||||||
|
|
|
@ -310,15 +310,15 @@ void board_ft_fman_fixup_port(void *fdt, char *compat, phys_addr_t addr,
|
||||||
|
|
||||||
} else if (fm_info_get_enet_if(port) == PHY_INTERFACE_MODE_XGMII) {
|
} else if (fm_info_get_enet_if(port) == PHY_INTERFACE_MODE_XGMII) {
|
||||||
switch (srds_s1) {
|
switch (srds_s1) {
|
||||||
case 0x66: /* XFI interface */
|
case 0x66: /* 10GBase-R interface */
|
||||||
case 0x6b:
|
case 0x6b:
|
||||||
case 0x6c:
|
case 0x6c:
|
||||||
case 0x6d:
|
case 0x6d:
|
||||||
case 0x71:
|
case 0x71:
|
||||||
/*
|
/*
|
||||||
* if the 10G is XFI, check hwconfig to see what is the
|
* Check hwconfig to see what is the media type, there
|
||||||
* media type, there are two types, fiber or copper,
|
* are two types, fiber or copper, fix the dtb
|
||||||
* fix the dtb accordingly.
|
* accordingly.
|
||||||
*/
|
*/
|
||||||
switch (port) {
|
switch (port) {
|
||||||
case FM1_10GEC1:
|
case FM1_10GEC1:
|
||||||
|
@ -378,7 +378,7 @@ void board_ft_fman_fixup_port(void *fdt, char *compat, phys_addr_t addr,
|
||||||
printf("Interface %d in backplane KR mode\n",
|
printf("Interface %d in backplane KR mode\n",
|
||||||
port);
|
port);
|
||||||
} else {
|
} else {
|
||||||
/* fixed-link for XFI fiber cable */
|
/* fixed-link for 10GBase-R fiber cable */
|
||||||
f_link.phy_id = port;
|
f_link.phy_id = port;
|
||||||
f_link.duplex = 1;
|
f_link.duplex = 1;
|
||||||
f_link.link_speed = 10000;
|
f_link.link_speed = 10000;
|
||||||
|
@ -538,12 +538,12 @@ int board_eth_init(struct bd_info *bis)
|
||||||
case 0x66:
|
case 0x66:
|
||||||
case 0x67:
|
case 0x67:
|
||||||
/*
|
/*
|
||||||
* XFI does not need a PHY to work, but to avoid U-Boot use
|
* 10GBase-R does not need a PHY to work, but to avoid U-Boot
|
||||||
* default PHY address which is zero to a MAC when it found
|
* use default PHY address which is zero to a MAC when it found
|
||||||
* a MAC has no PHY address, we give a PHY address to XFI
|
* a MAC has no PHY address, we give a PHY address to 10GBase-R
|
||||||
* MAC, and should not use a real XAUI PHY address, since
|
* MAC, and should not use a real XAUI PHY address, since
|
||||||
* MDIO can access it successfully, and then MDIO thinks
|
* MDIO can access it successfully, and then MDIO thinks
|
||||||
* the XAUI card is used for the XFI MAC, which will cause
|
* the XAUI card is used for the 10GBase-R MAC, which will cause
|
||||||
* error.
|
* error.
|
||||||
*/
|
*/
|
||||||
fm_info_set_phy_address(FM1_10GEC1, 4);
|
fm_info_set_phy_address(FM1_10GEC1, 4);
|
||||||
|
@ -701,7 +701,7 @@ int board_eth_init(struct bd_info *bis)
|
||||||
(srds_s1 == 0x6a) || (srds_s1 == 0x70) ||
|
(srds_s1 == 0x6a) || (srds_s1 == 0x70) ||
|
||||||
(srds_s1 == 0x6c) || (srds_s1 == 0x6d) ||
|
(srds_s1 == 0x6c) || (srds_s1 == 0x6d) ||
|
||||||
(srds_s1 == 0x71)) {
|
(srds_s1 == 0x71)) {
|
||||||
/* As XFI is in cage intead of a slot, so
|
/* As 10GBase-R is in cage intead of a slot, so
|
||||||
* ensure doesn't disable the corresponding port
|
* ensure doesn't disable the corresponding port
|
||||||
*/
|
*/
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -136,14 +136,14 @@ int brd_mux_lane_to_slot(void)
|
||||||
break;
|
break;
|
||||||
case 0x66:
|
case 0x66:
|
||||||
case 0x67:
|
case 0x67:
|
||||||
/* SD1(A:D) => XFI cage
|
/* SD1(A:D) => 10GBase-R cage
|
||||||
* SD1(E:H) => SLOT1 PCIe4
|
* SD1(E:H) => SLOT1 PCIe4
|
||||||
*/
|
*/
|
||||||
QIXIS_WRITE(brdcfg[12], 0xfe);
|
QIXIS_WRITE(brdcfg[12], 0xfe);
|
||||||
break;
|
break;
|
||||||
case 0x6a:
|
case 0x6a:
|
||||||
case 0x6b:
|
case 0x6b:
|
||||||
/* SD1(A:D) => XFI cage
|
/* SD1(A:D) => 10GBase-R cage
|
||||||
* SD1(E) => SLOT1 PCIe4
|
* SD1(E) => SLOT1 PCIe4
|
||||||
* SD1(F:H) => SLOT2 SGMII
|
* SD1(F:H) => SLOT2 SGMII
|
||||||
*/
|
*/
|
||||||
|
@ -151,14 +151,14 @@ int brd_mux_lane_to_slot(void)
|
||||||
break;
|
break;
|
||||||
case 0x6c:
|
case 0x6c:
|
||||||
case 0x6d:
|
case 0x6d:
|
||||||
/* SD1(A:B) => XFI cage
|
/* SD1(A:B) => 10GBase-R cage
|
||||||
* SD1(C:D) => SLOT3 SGMII
|
* SD1(C:D) => SLOT3 SGMII
|
||||||
* SD1(E:H) => SLOT1 PCIe4
|
* SD1(E:H) => SLOT1 PCIe4
|
||||||
*/
|
*/
|
||||||
QIXIS_WRITE(brdcfg[12], 0xda);
|
QIXIS_WRITE(brdcfg[12], 0xda);
|
||||||
break;
|
break;
|
||||||
case 0x6e:
|
case 0x6e:
|
||||||
/* SD1(A:B) => SFP Module, XFI
|
/* SD1(A:B) => SFP Module, 10GBase-R
|
||||||
* SD1(C:D) => SLOT3 SGMII
|
* SD1(C:D) => SLOT3 SGMII
|
||||||
* SD1(E:F) => SLOT1 PCIe4 x2
|
* SD1(E:F) => SLOT1 PCIe4 x2
|
||||||
* SD1(G:H) => SLOT2 SGMII
|
* SD1(G:H) => SLOT2 SGMII
|
||||||
|
|
|
@ -54,7 +54,7 @@ Differences between T2080 and T2081
|
||||||
T2080PCIe-RDB board Overview
|
T2080PCIe-RDB board Overview
|
||||||
----------------------------
|
----------------------------
|
||||||
- SERDES Configuration
|
- SERDES Configuration
|
||||||
- SerDes-1 Lane A-B: to two 10G XFI fiber (MAC9 & MAC10)
|
- SerDes-1 Lane A-B: to two 10GBase-R fiber (MAC9 & MAC10)
|
||||||
- SerDes-1 Lane C-D: to two 10G Base-T (MAC1 & MAC2)
|
- SerDes-1 Lane C-D: to two 10G Base-T (MAC1 & MAC2)
|
||||||
- SerDes-1 Lane E-H: to PCIe Goldfinger (PCIe4 x4, Gen3)
|
- SerDes-1 Lane E-H: to PCIe Goldfinger (PCIe4 x4, Gen3)
|
||||||
- SerDes-2 Lane A-D: to PCIe Slot (PCIe1 x4, Gen2)
|
- SerDes-2 Lane A-D: to PCIe Slot (PCIe1 x4, Gen2)
|
||||||
|
@ -62,7 +62,7 @@ T2080PCIe-RDB board Overview
|
||||||
- SerDes-2 Lane G-H: to SATA1 & SATA2
|
- SerDes-2 Lane G-H: to SATA1 & SATA2
|
||||||
- Ethernet
|
- Ethernet
|
||||||
- Two on-board 10M/100M/1G RGMII ethernet ports
|
- Two on-board 10M/100M/1G RGMII ethernet ports
|
||||||
- Two on-board 10Gbps XFI fiber ports
|
- Two on-board 10GBase-R fiber ports
|
||||||
- Two on-board 10Gbps Base-T copper ports
|
- Two on-board 10Gbps Base-T copper ports
|
||||||
- DDR Memory
|
- DDR Memory
|
||||||
- Supports 72bit 4GB DDR3-LP SODIMM
|
- Supports 72bit 4GB DDR3-LP SODIMM
|
||||||
|
|
|
@ -106,7 +106,7 @@ int board_eth_init(struct bd_info *bis)
|
||||||
|
|
||||||
#if (CONFIG_SYS_NUM_FMAN == 2)
|
#if (CONFIG_SYS_NUM_FMAN == 2)
|
||||||
if ((srds_prtcl_s2 == 56) || (srds_prtcl_s2 == 55)) {
|
if ((srds_prtcl_s2 == 56) || (srds_prtcl_s2 == 55)) {
|
||||||
/* SGMII && XFI */
|
/* SGMII && 10GBase-R */
|
||||||
fm_info_set_phy_address(FM2_DTSEC1, SGMII_PHY_ADDR5);
|
fm_info_set_phy_address(FM2_DTSEC1, SGMII_PHY_ADDR5);
|
||||||
fm_info_set_phy_address(FM2_DTSEC2, SGMII_PHY_ADDR6);
|
fm_info_set_phy_address(FM2_DTSEC2, SGMII_PHY_ADDR6);
|
||||||
fm_info_set_phy_address(FM2_DTSEC3, SGMII_PHY_ADDR7);
|
fm_info_set_phy_address(FM2_DTSEC3, SGMII_PHY_ADDR7);
|
||||||
|
|
|
@ -110,9 +110,7 @@ int register_miiphy_bus(uint k, struct mii_dev **bus)
|
||||||
|
|
||||||
if (!mdiodev)
|
if (!mdiodev)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
strncpy(mdiodev->name,
|
strlcpy(mdiodev->name, name, MDIO_NAME_LEN);
|
||||||
name,
|
|
||||||
MDIO_NAME_LEN);
|
|
||||||
mdiodev->read = bb_miiphy_read;
|
mdiodev->read = bb_miiphy_read;
|
||||||
mdiodev->write = bb_miiphy_write;
|
mdiodev->write = bb_miiphy_write;
|
||||||
|
|
||||||
|
|
|
@ -41,7 +41,17 @@ Documentation/devicetree/bindings/phy/phy-bindings.txt.
|
||||||
* "2500base-x",
|
* "2500base-x",
|
||||||
* "rxaui"
|
* "rxaui"
|
||||||
* "xaui"
|
* "xaui"
|
||||||
* "10gbase-kr" (10GBASE-KR, XFI, SFI)
|
* "10gbase-r" (This is the IEEE 802.3 Clause 49 defined 10GBASE-R protocol
|
||||||
|
used with various different mediums. Please refer to the IEEE standard for
|
||||||
|
a definition of this. Note: 10GBASE-R is just one protocol that can be used
|
||||||
|
with XFI and SFI. XFI and SFI permit multiple protocols over a single
|
||||||
|
SERDES lane, and also defines the electrical characteristics of the signals
|
||||||
|
with a host compliance board plugged into the host XFP/SFP connector.
|
||||||
|
Therefore, XFI and SFI are not PHY interface types in their own right.)
|
||||||
|
* "10gbase-kr" (This is the IEEE 802.3 Clause 49 defined 10GBASE-R with
|
||||||
|
Clause 73 autonegotiation. Please refer to the IEEE standard for further
|
||||||
|
information. Note: due to legacy usage, some 10GBASE-R usage incorrectly
|
||||||
|
makes use of this definition).
|
||||||
- phy-connection-type: the same as "phy-mode" property but described in the
|
- phy-connection-type: the same as "phy-mode" property but described in the
|
||||||
Devicetree Specification;
|
Devicetree Specification;
|
||||||
- phy-handle: phandle, specifies a reference to a node representing a PHY
|
- phy-handle: phandle, specifies a reference to a node representing a PHY
|
||||||
|
|
|
@ -717,7 +717,7 @@ int armada100_fec_register(unsigned long base_addr)
|
||||||
struct mii_dev *mdiodev = mdio_alloc();
|
struct mii_dev *mdiodev = mdio_alloc();
|
||||||
if (!mdiodev)
|
if (!mdiodev)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
strncpy(mdiodev->name, dev->name, MDIO_NAME_LEN);
|
strlcpy(mdiodev->name, dev->name, MDIO_NAME_LEN);
|
||||||
mdiodev->read = smi_reg_read;
|
mdiodev->read = smi_reg_read;
|
||||||
mdiodev->write = smi_reg_write;
|
mdiodev->write = smi_reg_write;
|
||||||
|
|
||||||
|
|
|
@ -250,7 +250,7 @@ int bcm_sf2_eth_register(struct bd_info *bis, u8 dev_num)
|
||||||
|
|
||||||
if (!mdiodev)
|
if (!mdiodev)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
strncpy(mdiodev->name, dev->name, MDIO_NAME_LEN);
|
strlcpy(mdiodev->name, dev->name, MDIO_NAME_LEN);
|
||||||
mdiodev->read = eth->miiphy_read;
|
mdiodev->read = eth->miiphy_read;
|
||||||
mdiodev->write = eth->miiphy_write;
|
mdiodev->write = eth->miiphy_write;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// SPDX-License-Identifier: GPL-2.0+
|
// SPDX-License-Identifier: GPL-2.0+
|
||||||
/*
|
/*
|
||||||
* Copyright 2019-2021 NXP Semiconductors
|
* Copyright 2019-2021 NXP
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <asm/eth.h>
|
#include <asm/eth.h>
|
||||||
|
|
|
@ -493,7 +493,7 @@ static int eepro100_initialize_mii(struct eepro100_priv *priv)
|
||||||
if (!mdiodev)
|
if (!mdiodev)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
strncpy(mdiodev->name, priv->name, MDIO_NAME_LEN);
|
strlcpy(mdiodev->name, priv->name, MDIO_NAME_LEN);
|
||||||
mdiodev->read = eepro100_miiphy_read;
|
mdiodev->read = eepro100_miiphy_read;
|
||||||
mdiodev->write = eepro100_miiphy_write;
|
mdiodev->write = eepro100_miiphy_write;
|
||||||
mdiodev->priv = priv;
|
mdiodev->priv = priv;
|
||||||
|
|
|
@ -427,7 +427,7 @@ int ep93xx_miiphy_initialize(struct bd_info * const bd)
|
||||||
struct mii_dev *mdiodev = mdio_alloc();
|
struct mii_dev *mdiodev = mdio_alloc();
|
||||||
if (!mdiodev)
|
if (!mdiodev)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
strncpy(mdiodev->name, "ep93xx_eth0", MDIO_NAME_LEN);
|
strlcpy(mdiodev->name, "ep93xx_eth0", MDIO_NAME_LEN);
|
||||||
mdiodev->read = ep93xx_miiphy_read;
|
mdiodev->read = ep93xx_miiphy_read;
|
||||||
mdiodev->write = ep93xx_miiphy_write;
|
mdiodev->write = ep93xx_miiphy_write;
|
||||||
|
|
||||||
|
|
|
@ -100,7 +100,7 @@ phy_interface_t fman_port_enet_if(enum fm_port port)
|
||||||
env_get_f("hwconfig", buffer, sizeof(buffer));
|
env_get_f("hwconfig", buffer, sizeof(buffer));
|
||||||
buf = buffer;
|
buf = buffer;
|
||||||
|
|
||||||
/* check if XFI interface enable in hwconfig for 10g */
|
/* check if 10GBase-R interface enable in hwconfig for 10g */
|
||||||
if (hwconfig_subarg_cmp_f("fsl_b4860_serdes2",
|
if (hwconfig_subarg_cmp_f("fsl_b4860_serdes2",
|
||||||
"sfp_amc", "sfp", buf)) {
|
"sfp_amc", "sfp", buf)) {
|
||||||
if ((port == FM1_10GEC1 ||
|
if ((port == FM1_10GEC1 ||
|
||||||
|
|
|
@ -50,7 +50,7 @@ static void dtsec_configure_serdes(struct fm_eth *priv)
|
||||||
u32 value;
|
u32 value;
|
||||||
struct mii_dev bus;
|
struct mii_dev bus;
|
||||||
bool sgmii_2500 = (priv->enet_if ==
|
bool sgmii_2500 = (priv->enet_if ==
|
||||||
PHY_INTERFACE_MODE_SGMII_2500) ? true : false;
|
PHY_INTERFACE_MODE_2500BASEX) ? true : false;
|
||||||
int i = 0, j;
|
int i = 0, j;
|
||||||
|
|
||||||
#ifndef CONFIG_DM_ETH
|
#ifndef CONFIG_DM_ETH
|
||||||
|
@ -133,7 +133,7 @@ static void dtsec_init_phy(struct fm_eth *fm_eth)
|
||||||
|
|
||||||
if (fm_eth->enet_if == PHY_INTERFACE_MODE_SGMII ||
|
if (fm_eth->enet_if == PHY_INTERFACE_MODE_SGMII ||
|
||||||
fm_eth->enet_if == PHY_INTERFACE_MODE_QSGMII ||
|
fm_eth->enet_if == PHY_INTERFACE_MODE_QSGMII ||
|
||||||
fm_eth->enet_if == PHY_INTERFACE_MODE_SGMII_2500)
|
fm_eth->enet_if == PHY_INTERFACE_MODE_2500BASEX)
|
||||||
dtsec_configure_serdes(fm_eth);
|
dtsec_configure_serdes(fm_eth);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -432,7 +432,7 @@ static int fm_eth_startup(struct fm_eth *fm_eth)
|
||||||
|
|
||||||
/* For some reason we need to set SPEED_100 */
|
/* For some reason we need to set SPEED_100 */
|
||||||
if (((fm_eth->enet_if == PHY_INTERFACE_MODE_SGMII) ||
|
if (((fm_eth->enet_if == PHY_INTERFACE_MODE_SGMII) ||
|
||||||
(fm_eth->enet_if == PHY_INTERFACE_MODE_SGMII_2500) ||
|
(fm_eth->enet_if == PHY_INTERFACE_MODE_2500BASEX) ||
|
||||||
(fm_eth->enet_if == PHY_INTERFACE_MODE_QSGMII)) &&
|
(fm_eth->enet_if == PHY_INTERFACE_MODE_QSGMII)) &&
|
||||||
mac->set_if_mode)
|
mac->set_if_mode)
|
||||||
mac->set_if_mode(mac, fm_eth->enet_if, SPEED_100);
|
mac->set_if_mode(mac, fm_eth->enet_if, SPEED_100);
|
||||||
|
@ -829,7 +829,7 @@ static int init_phy(struct fm_eth *fm_eth)
|
||||||
|
|
||||||
if (fm_eth->type == FM_ETH_10G_E)
|
if (fm_eth->type == FM_ETH_10G_E)
|
||||||
supported = PHY_10G_FEATURES;
|
supported = PHY_10G_FEATURES;
|
||||||
if (fm_eth->enet_if == PHY_INTERFACE_MODE_SGMII_2500)
|
if (fm_eth->enet_if == PHY_INTERFACE_MODE_2500BASEX)
|
||||||
supported |= SUPPORTED_2500baseX_Full;
|
supported |= SUPPORTED_2500baseX_Full;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -1090,7 +1090,7 @@ static int fm_eth_probe(struct udevice *dev)
|
||||||
if (fm_eth->num != 0)
|
if (fm_eth->num != 0)
|
||||||
break;
|
break;
|
||||||
case PHY_INTERFACE_MODE_SGMII:
|
case PHY_INTERFACE_MODE_SGMII:
|
||||||
case PHY_INTERFACE_MODE_SGMII_2500:
|
case PHY_INTERFACE_MODE_2500BASEX:
|
||||||
fm_eth->pcs_mdio = fm_get_internal_mdio(dev);
|
fm_eth->pcs_mdio = fm_get_internal_mdio(dev);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -79,7 +79,7 @@ phy_interface_t fman_port_enet_if(enum fm_port port)
|
||||||
case FM1_DTSEC2:
|
case FM1_DTSEC2:
|
||||||
if ((port == FM1_DTSEC2) &&
|
if ((port == FM1_DTSEC2) &&
|
||||||
is_serdes_configured(SGMII_2500_FM1_DTSEC2))
|
is_serdes_configured(SGMII_2500_FM1_DTSEC2))
|
||||||
return PHY_INTERFACE_MODE_SGMII_2500;
|
return PHY_INTERFACE_MODE_2500BASEX;
|
||||||
case FM1_DTSEC5:
|
case FM1_DTSEC5:
|
||||||
case FM1_DTSEC6:
|
case FM1_DTSEC6:
|
||||||
case FM1_DTSEC9:
|
case FM1_DTSEC9:
|
||||||
|
@ -87,7 +87,7 @@ phy_interface_t fman_port_enet_if(enum fm_port port)
|
||||||
return PHY_INTERFACE_MODE_SGMII;
|
return PHY_INTERFACE_MODE_SGMII;
|
||||||
else if ((port == FM1_DTSEC9) &&
|
else if ((port == FM1_DTSEC9) &&
|
||||||
is_serdes_configured(SGMII_2500_FM1_DTSEC9))
|
is_serdes_configured(SGMII_2500_FM1_DTSEC9))
|
||||||
return PHY_INTERFACE_MODE_SGMII_2500;
|
return PHY_INTERFACE_MODE_2500BASEX;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -99,7 +99,7 @@ phy_interface_t fman_port_enet_if(enum fm_port port)
|
||||||
case FM1_DTSEC10:
|
case FM1_DTSEC10:
|
||||||
if (is_serdes_configured(SGMII_2500_FM1_DTSEC5 +
|
if (is_serdes_configured(SGMII_2500_FM1_DTSEC5 +
|
||||||
port - FM1_DTSEC5))
|
port - FM1_DTSEC5))
|
||||||
return PHY_INTERFACE_MODE_SGMII_2500;
|
return PHY_INTERFACE_MODE_2500BASEX;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -93,12 +93,12 @@ static void memac_set_interface_mode(struct fsl_enet_mac *mac,
|
||||||
if_mode |= (IF_MODE_GMII | IF_MODE_RM);
|
if_mode |= (IF_MODE_GMII | IF_MODE_RM);
|
||||||
break;
|
break;
|
||||||
case PHY_INTERFACE_MODE_SGMII:
|
case PHY_INTERFACE_MODE_SGMII:
|
||||||
case PHY_INTERFACE_MODE_SGMII_2500:
|
case PHY_INTERFACE_MODE_2500BASEX:
|
||||||
case PHY_INTERFACE_MODE_QSGMII:
|
case PHY_INTERFACE_MODE_QSGMII:
|
||||||
if_mode &= ~IF_MODE_MASK;
|
if_mode &= ~IF_MODE_MASK;
|
||||||
if_mode |= (IF_MODE_GMII);
|
if_mode |= (IF_MODE_GMII);
|
||||||
break;
|
break;
|
||||||
case PHY_INTERFACE_MODE_XFI:
|
case PHY_INTERFACE_MODE_10GBASER:
|
||||||
case PHY_INTERFACE_MODE_XGMII:
|
case PHY_INTERFACE_MODE_XGMII:
|
||||||
if_mode &= ~IF_MODE_MASK;
|
if_mode &= ~IF_MODE_MASK;
|
||||||
if_mode |= IF_MODE_XGMII;
|
if_mode |= IF_MODE_XGMII;
|
||||||
|
@ -107,7 +107,7 @@ static void memac_set_interface_mode(struct fsl_enet_mac *mac,
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
/* Enable automatic speed selection for Non-XGMII */
|
/* Enable automatic speed selection for Non-XGMII */
|
||||||
if (type != PHY_INTERFACE_MODE_XGMII && type != PHY_INTERFACE_MODE_XFI)
|
if (type != PHY_INTERFACE_MODE_XGMII && type != PHY_INTERFACE_MODE_10GBASER)
|
||||||
if_mode |= IF_MODE_EN_AUTO;
|
if_mode |= IF_MODE_EN_AUTO;
|
||||||
|
|
||||||
if (type == PHY_INTERFACE_MODE_RGMII ||
|
if (type == PHY_INTERFACE_MODE_RGMII ||
|
||||||
|
|
|
@ -63,7 +63,7 @@ phy_interface_t fman_port_enet_if(enum fm_port port)
|
||||||
return PHY_INTERFACE_MODE_SGMII;
|
return PHY_INTERFACE_MODE_SGMII;
|
||||||
else if (is_serdes_configured(SGMII_2500_FM1_DTSEC1
|
else if (is_serdes_configured(SGMII_2500_FM1_DTSEC1
|
||||||
+ port - FM1_DTSEC1))
|
+ port - FM1_DTSEC1))
|
||||||
return PHY_INTERFACE_MODE_SGMII_2500;
|
return PHY_INTERFACE_MODE_2500BASEX;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -144,7 +144,7 @@ static int enetc_init_sgmii(struct udevice *dev)
|
||||||
if (!enetc_has_imdio(dev))
|
if (!enetc_has_imdio(dev))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (priv->if_type == PHY_INTERFACE_MODE_SGMII_2500)
|
if (priv->if_type == PHY_INTERFACE_MODE_2500BASEX)
|
||||||
is2500 = true;
|
is2500 = true;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -226,9 +226,8 @@ static void enetc_setup_mac_iface(struct udevice *dev,
|
||||||
case PHY_INTERFACE_MODE_RGMII_TXID:
|
case PHY_INTERFACE_MODE_RGMII_TXID:
|
||||||
enetc_init_rgmii(dev, phydev);
|
enetc_init_rgmii(dev, phydev);
|
||||||
break;
|
break;
|
||||||
case PHY_INTERFACE_MODE_XGMII:
|
|
||||||
case PHY_INTERFACE_MODE_USXGMII:
|
case PHY_INTERFACE_MODE_USXGMII:
|
||||||
case PHY_INTERFACE_MODE_XFI:
|
case PHY_INTERFACE_MODE_10GBASER:
|
||||||
/* set ifmode to (US)XGMII */
|
/* set ifmode to (US)XGMII */
|
||||||
if_mode = enetc_read_port(priv, ENETC_PM_IF_MODE);
|
if_mode = enetc_read_port(priv, ENETC_PM_IF_MODE);
|
||||||
if_mode &= ~ENETC_PM_IF_IFMODE_MASK;
|
if_mode &= ~ENETC_PM_IF_IFMODE_MASK;
|
||||||
|
@ -270,7 +269,7 @@ static void enetc_start_pcs(struct udevice *dev)
|
||||||
priv->imdio.read = enetc_mdio_read;
|
priv->imdio.read = enetc_mdio_read;
|
||||||
priv->imdio.write = enetc_mdio_write;
|
priv->imdio.write = enetc_mdio_write;
|
||||||
priv->imdio.priv = priv->port_regs + ENETC_PM_IMDIO_BASE;
|
priv->imdio.priv = priv->port_regs + ENETC_PM_IMDIO_BASE;
|
||||||
strncpy(priv->imdio.name, dev->name, MDIO_NAME_LEN);
|
strlcpy(priv->imdio.name, dev->name, MDIO_NAME_LEN);
|
||||||
if (!miiphy_get_dev_by_name(priv->imdio.name))
|
if (!miiphy_get_dev_by_name(priv->imdio.name))
|
||||||
mdio_register(&priv->imdio);
|
mdio_register(&priv->imdio);
|
||||||
}
|
}
|
||||||
|
@ -291,12 +290,11 @@ static void enetc_start_pcs(struct udevice *dev)
|
||||||
|
|
||||||
switch (priv->if_type) {
|
switch (priv->if_type) {
|
||||||
case PHY_INTERFACE_MODE_SGMII:
|
case PHY_INTERFACE_MODE_SGMII:
|
||||||
case PHY_INTERFACE_MODE_SGMII_2500:
|
case PHY_INTERFACE_MODE_2500BASEX:
|
||||||
enetc_init_sgmii(dev);
|
enetc_init_sgmii(dev);
|
||||||
break;
|
break;
|
||||||
case PHY_INTERFACE_MODE_XGMII:
|
|
||||||
case PHY_INTERFACE_MODE_USXGMII:
|
case PHY_INTERFACE_MODE_USXGMII:
|
||||||
case PHY_INTERFACE_MODE_XFI:
|
case PHY_INTERFACE_MODE_10GBASER:
|
||||||
enetc_init_sxgmii(dev);
|
enetc_init_sxgmii(dev);
|
||||||
break;
|
break;
|
||||||
};
|
};
|
||||||
|
|
|
@ -541,7 +541,7 @@ static int mcdmafec_probe(struct udevice *dev)
|
||||||
info->bus = mdio_alloc();
|
info->bus = mdio_alloc();
|
||||||
if (!info->bus)
|
if (!info->bus)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
strncpy(info->bus->name, dev->name, MDIO_NAME_LEN);
|
strlcpy(info->bus->name, dev->name, MDIO_NAME_LEN);
|
||||||
info->bus->read = mcffec_miiphy_read;
|
info->bus->read = mcffec_miiphy_read;
|
||||||
info->bus->write = mcffec_miiphy_write;
|
info->bus->write = mcffec_miiphy_write;
|
||||||
|
|
||||||
|
|
|
@ -476,7 +476,7 @@ int ftmac110_initialize(struct bd_info *bis)
|
||||||
struct mii_dev *mdiodev = mdio_alloc();
|
struct mii_dev *mdiodev = mdio_alloc();
|
||||||
if (!mdiodev)
|
if (!mdiodev)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
strncpy(mdiodev->name, dev->name, MDIO_NAME_LEN);
|
strlcpy(mdiodev->name, dev->name, MDIO_NAME_LEN);
|
||||||
mdiodev->read = ftmac110_mdio_read;
|
mdiodev->read = ftmac110_mdio_read;
|
||||||
mdiodev->write = ftmac110_mdio_write;
|
mdiodev->write = ftmac110_mdio_write;
|
||||||
|
|
||||||
|
|
|
@ -638,7 +638,7 @@ int lpc32xx_eth_initialize(struct bd_info *bis)
|
||||||
struct mii_dev *mdiodev = mdio_alloc();
|
struct mii_dev *mdiodev = mdio_alloc();
|
||||||
if (!mdiodev)
|
if (!mdiodev)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
strncpy(mdiodev->name, dev->name, MDIO_NAME_LEN);
|
strlcpy(mdiodev->name, dev->name, MDIO_NAME_LEN);
|
||||||
mdiodev->read = mii_reg_read;
|
mdiodev->read = mii_reg_read;
|
||||||
mdiodev->write = mii_reg_write;
|
mdiodev->write = mii_reg_write;
|
||||||
|
|
||||||
|
|
|
@ -1245,7 +1245,7 @@ int macb_eth_initialize(int id, void *regs, unsigned int phy_addr)
|
||||||
struct mii_dev *mdiodev = mdio_alloc();
|
struct mii_dev *mdiodev = mdio_alloc();
|
||||||
if (!mdiodev)
|
if (!mdiodev)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
strncpy(mdiodev->name, netdev->name, MDIO_NAME_LEN);
|
strlcpy(mdiodev->name, netdev->name, MDIO_NAME_LEN);
|
||||||
mdiodev->read = macb_miiphy_read;
|
mdiodev->read = macb_miiphy_read;
|
||||||
mdiodev->write = macb_miiphy_write;
|
mdiodev->write = macb_miiphy_write;
|
||||||
|
|
||||||
|
@ -1403,7 +1403,7 @@ static int macb_eth_probe(struct udevice *dev)
|
||||||
macb->bus = mdio_alloc();
|
macb->bus = mdio_alloc();
|
||||||
if (!macb->bus)
|
if (!macb->bus)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
strncpy(macb->bus->name, dev->name, MDIO_NAME_LEN);
|
strlcpy(macb->bus->name, dev->name, MDIO_NAME_LEN);
|
||||||
macb->bus->read = macb_miiphy_read;
|
macb->bus->read = macb_miiphy_read;
|
||||||
macb->bus->write = macb_miiphy_write;
|
macb->bus->write = macb_miiphy_write;
|
||||||
|
|
||||||
|
|
|
@ -160,7 +160,7 @@ int fec_initialize(struct bd_info *bis)
|
||||||
struct mii_dev *mdiodev = mdio_alloc();
|
struct mii_dev *mdiodev = mdio_alloc();
|
||||||
if (!mdiodev)
|
if (!mdiodev)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
strncpy(mdiodev->name, dev->name, MDIO_NAME_LEN);
|
strlcpy(mdiodev->name, dev->name, MDIO_NAME_LEN);
|
||||||
mdiodev->read = fec8xx_miiphy_read;
|
mdiodev->read = fec8xx_miiphy_read;
|
||||||
mdiodev->write = fec8xx_miiphy_write;
|
mdiodev->write = fec8xx_miiphy_write;
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause
|
// SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause
|
||||||
/*
|
/*
|
||||||
* Felix (VSC9959) Ethernet switch driver
|
* Felix (VSC9959) Ethernet switch driver
|
||||||
* Copyright 2018-2021 NXP Semiconductors
|
* Copyright 2018-2021 NXP
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -213,17 +213,16 @@ static void felix_start_pcs(struct udevice *dev, int port,
|
||||||
bool autoneg = true;
|
bool autoneg = true;
|
||||||
|
|
||||||
if (phy->phy_id == PHY_FIXED_ID ||
|
if (phy->phy_id == PHY_FIXED_ID ||
|
||||||
phy->interface == PHY_INTERFACE_MODE_SGMII_2500)
|
phy->interface == PHY_INTERFACE_MODE_2500BASEX)
|
||||||
autoneg = false;
|
autoneg = false;
|
||||||
|
|
||||||
switch (phy->interface) {
|
switch (phy->interface) {
|
||||||
case PHY_INTERFACE_MODE_SGMII:
|
case PHY_INTERFACE_MODE_SGMII:
|
||||||
case PHY_INTERFACE_MODE_SGMII_2500:
|
case PHY_INTERFACE_MODE_2500BASEX:
|
||||||
case PHY_INTERFACE_MODE_QSGMII:
|
case PHY_INTERFACE_MODE_QSGMII:
|
||||||
felix_init_sgmii(imdio, port, autoneg);
|
felix_init_sgmii(imdio, port, autoneg);
|
||||||
break;
|
break;
|
||||||
case PHY_INTERFACE_MODE_XGMII:
|
case PHY_INTERFACE_MODE_10GBASER:
|
||||||
case PHY_INTERFACE_MODE_XFI:
|
|
||||||
case PHY_INTERFACE_MODE_USXGMII:
|
case PHY_INTERFACE_MODE_USXGMII:
|
||||||
if (felix_init_sxgmii(imdio, port))
|
if (felix_init_sxgmii(imdio, port))
|
||||||
dev_err(dev, "PCS reset timeout on port %d\n", port);
|
dev_err(dev, "PCS reset timeout on port %d\n", port);
|
||||||
|
@ -233,7 +232,7 @@ static void felix_start_pcs(struct udevice *dev, int port,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void felix_init(struct udevice *dev)
|
static void felix_init(struct udevice *dev)
|
||||||
{
|
{
|
||||||
struct dsa_pdata *pdata = dev_get_uclass_plat(dev);
|
struct dsa_pdata *pdata = dev_get_uclass_plat(dev);
|
||||||
struct felix_priv *priv = dev_get_priv(dev);
|
struct felix_priv *priv = dev_get_priv(dev);
|
||||||
|
@ -258,7 +257,7 @@ void felix_init(struct udevice *dev)
|
||||||
priv->imdio.read = felix_mdio_read;
|
priv->imdio.read = felix_mdio_read;
|
||||||
priv->imdio.write = felix_mdio_write;
|
priv->imdio.write = felix_mdio_write;
|
||||||
priv->imdio.priv = priv->imdio_base + FELIX_PM_IMDIO_BASE;
|
priv->imdio.priv = priv->imdio_base + FELIX_PM_IMDIO_BASE;
|
||||||
strncpy(priv->imdio.name, dev->name, MDIO_NAME_LEN);
|
strlcpy(priv->imdio.name, dev->name, MDIO_NAME_LEN);
|
||||||
|
|
||||||
/* set up CPU port */
|
/* set up CPU port */
|
||||||
out_le32(base + FELIX_QSYS_SYSTEM_EXT_CPU_CFG,
|
out_le32(base + FELIX_QSYS_SYSTEM_EXT_CPU_CFG,
|
||||||
|
@ -276,6 +275,7 @@ void felix_init(struct udevice *dev)
|
||||||
static int felix_probe(struct udevice *dev)
|
static int felix_probe(struct udevice *dev)
|
||||||
{
|
{
|
||||||
struct felix_priv *priv = dev_get_priv(dev);
|
struct felix_priv *priv = dev_get_priv(dev);
|
||||||
|
int err;
|
||||||
|
|
||||||
if (ofnode_valid(dev_ofnode(dev)) &&
|
if (ofnode_valid(dev_ofnode(dev)) &&
|
||||||
!ofnode_is_available(dev_ofnode(dev))) {
|
!ofnode_is_available(dev_ofnode(dev))) {
|
||||||
|
@ -300,11 +300,18 @@ static int felix_probe(struct udevice *dev)
|
||||||
struct mii_dev *mii_bus;
|
struct mii_dev *mii_bus;
|
||||||
|
|
||||||
mii_bus = mdio_alloc();
|
mii_bus = mdio_alloc();
|
||||||
|
if (!mii_bus)
|
||||||
|
return -ENOMEM;
|
||||||
|
|
||||||
mii_bus->read = felix_mdio_read;
|
mii_bus->read = felix_mdio_read;
|
||||||
mii_bus->write = felix_mdio_write;
|
mii_bus->write = felix_mdio_write;
|
||||||
mii_bus->priv = priv->imdio_base + FELIX_PM_IMDIO_BASE;
|
mii_bus->priv = priv->imdio_base + FELIX_PM_IMDIO_BASE;
|
||||||
strncpy(mii_bus->name, dev->name, MDIO_NAME_LEN);
|
strlcpy(mii_bus->name, dev->name, MDIO_NAME_LEN);
|
||||||
mdio_register(mii_bus);
|
err = mdio_register(mii_bus);
|
||||||
|
if (err) {
|
||||||
|
mdio_free(mii_bus);
|
||||||
|
return err;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dm_pci_clrset_config16(dev, PCI_COMMAND, 0, PCI_COMMAND_MEMORY);
|
dm_pci_clrset_config16(dev, PCI_COMMAND, 0, PCI_COMMAND_MEMORY);
|
||||||
|
@ -317,11 +324,24 @@ static int felix_probe(struct udevice *dev)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int felix_port_enable(struct udevice *dev, int port,
|
static int felix_port_probe(struct udevice *dev, int port,
|
||||||
struct phy_device *phy)
|
struct phy_device *phy)
|
||||||
{
|
{
|
||||||
int supported = PHY_GBIT_FEATURES | SUPPORTED_2500baseX_Full;
|
int supported = PHY_GBIT_FEATURES | SUPPORTED_2500baseX_Full;
|
||||||
struct felix_priv *priv = dev_get_priv(dev);
|
struct felix_priv *priv = dev_get_priv(dev);
|
||||||
|
|
||||||
|
phy->supported &= supported;
|
||||||
|
phy->advertising &= supported;
|
||||||
|
|
||||||
|
felix_start_pcs(dev, port, phy, &priv->imdio);
|
||||||
|
|
||||||
|
return phy_config(phy);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int felix_port_enable(struct udevice *dev, int port,
|
||||||
|
struct phy_device *phy)
|
||||||
|
{
|
||||||
|
struct felix_priv *priv = dev_get_priv(dev);
|
||||||
void *base = priv->regs_base;
|
void *base = priv->regs_base;
|
||||||
|
|
||||||
/* Set up MAC registers */
|
/* Set up MAC registers */
|
||||||
|
@ -339,15 +359,7 @@ static int felix_port_enable(struct udevice *dev, int port,
|
||||||
FELIX_QSYS_SYSTEM_SW_PORT_LOSSY |
|
FELIX_QSYS_SYSTEM_SW_PORT_LOSSY |
|
||||||
FELIX_QSYS_SYSTEM_SW_PORT_SCH(1));
|
FELIX_QSYS_SYSTEM_SW_PORT_SCH(1));
|
||||||
|
|
||||||
felix_start_pcs(dev, port, phy, &priv->imdio);
|
return phy_startup(phy);
|
||||||
|
|
||||||
phy->supported &= supported;
|
|
||||||
phy->advertising &= supported;
|
|
||||||
phy_config(phy);
|
|
||||||
|
|
||||||
phy_startup(phy);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void felix_port_disable(struct udevice *dev, int pidx,
|
static void felix_port_disable(struct udevice *dev, int pidx,
|
||||||
|
@ -392,6 +404,7 @@ static int felix_rcv(struct udevice *dev, int *pidx, void *packet, int length)
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct dsa_ops felix_dsa_ops = {
|
static const struct dsa_ops felix_dsa_ops = {
|
||||||
|
.port_probe = felix_port_probe,
|
||||||
.port_enable = felix_port_enable,
|
.port_enable = felix_port_enable,
|
||||||
.port_disable = felix_port_disable,
|
.port_disable = felix_port_disable,
|
||||||
.xmit = felix_xmit,
|
.xmit = felix_xmit,
|
||||||
|
|
|
@ -883,7 +883,7 @@ int mvgbe_initialize(struct bd_info *bis)
|
||||||
struct mii_dev *mdiodev = mdio_alloc();
|
struct mii_dev *mdiodev = mdio_alloc();
|
||||||
if (!mdiodev)
|
if (!mdiodev)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
strncpy(mdiodev->name, dev->name, MDIO_NAME_LEN);
|
strlcpy(mdiodev->name, dev->name, MDIO_NAME_LEN);
|
||||||
mdiodev->read = smi_reg_read;
|
mdiodev->read = smi_reg_read;
|
||||||
mdiodev->write = smi_reg_write;
|
mdiodev->write = smi_reg_write;
|
||||||
|
|
||||||
|
|
|
@ -161,7 +161,7 @@ static void pfe_configure_serdes(struct pfe_eth_dev *priv)
|
||||||
int value, sgmii_2500 = 0;
|
int value, sgmii_2500 = 0;
|
||||||
struct gemac_s *gem = priv->gem;
|
struct gemac_s *gem = priv->gem;
|
||||||
|
|
||||||
if (gem->phy_mode == PHY_INTERFACE_MODE_SGMII_2500)
|
if (gem->phy_mode == PHY_INTERFACE_MODE_2500BASEX)
|
||||||
sgmii_2500 = 1;
|
sgmii_2500 = 1;
|
||||||
|
|
||||||
|
|
||||||
|
@ -220,7 +220,7 @@ int pfe_phy_configure(struct pfe_eth_dev *priv, int dev_id, int phy_id)
|
||||||
|
|
||||||
/* Configure SGMII PCS */
|
/* Configure SGMII PCS */
|
||||||
if (gem->phy_mode == PHY_INTERFACE_MODE_SGMII ||
|
if (gem->phy_mode == PHY_INTERFACE_MODE_SGMII ||
|
||||||
gem->phy_mode == PHY_INTERFACE_MODE_SGMII_2500) {
|
gem->phy_mode == PHY_INTERFACE_MODE_2500BASEX) {
|
||||||
out_be32(&scfg->mdioselcr, 0x00000000);
|
out_be32(&scfg->mdioselcr, 0x00000000);
|
||||||
pfe_configure_serdes(priv);
|
pfe_configure_serdes(priv);
|
||||||
}
|
}
|
||||||
|
|
|
@ -308,9 +308,9 @@ struct {
|
||||||
} aquantia_syscfg[PHY_INTERFACE_MODE_COUNT] = {
|
} aquantia_syscfg[PHY_INTERFACE_MODE_COUNT] = {
|
||||||
[PHY_INTERFACE_MODE_SGMII] = {0x04b, AQUANTIA_VND1_GSYSCFG_1G,
|
[PHY_INTERFACE_MODE_SGMII] = {0x04b, AQUANTIA_VND1_GSYSCFG_1G,
|
||||||
AQUANTIA_VND1_GSTART_RATE_1G},
|
AQUANTIA_VND1_GSTART_RATE_1G},
|
||||||
[PHY_INTERFACE_MODE_SGMII_2500] = {0x144, AQUANTIA_VND1_GSYSCFG_2_5G,
|
[PHY_INTERFACE_MODE_2500BASEX] = {0x144, AQUANTIA_VND1_GSYSCFG_2_5G,
|
||||||
AQUANTIA_VND1_GSTART_RATE_2_5G},
|
AQUANTIA_VND1_GSTART_RATE_2_5G},
|
||||||
[PHY_INTERFACE_MODE_XFI] = {0x100, AQUANTIA_VND1_GSYSCFG_10G,
|
[PHY_INTERFACE_MODE_10GBASER] = {0x100, AQUANTIA_VND1_GSYSCFG_10G,
|
||||||
AQUANTIA_VND1_GSTART_RATE_10G},
|
AQUANTIA_VND1_GSTART_RATE_10G},
|
||||||
[PHY_INTERFACE_MODE_USXGMII] = {0x080, AQUANTIA_VND1_GSYSCFG_10G,
|
[PHY_INTERFACE_MODE_USXGMII] = {0x080, AQUANTIA_VND1_GSYSCFG_10G,
|
||||||
AQUANTIA_VND1_GSTART_RATE_10G},
|
AQUANTIA_VND1_GSTART_RATE_10G},
|
||||||
|
@ -443,18 +443,18 @@ int aquantia_config(struct phy_device *phydev)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
* for backward compatibility convert XGMII into either XFI or USX based
|
* for backward compatibility convert XGMII into either 10GBase-R or
|
||||||
* on FW config
|
* USXGMII based on FW config
|
||||||
*/
|
*/
|
||||||
if (interface == PHY_INTERFACE_MODE_XGMII) {
|
if (interface == PHY_INTERFACE_MODE_XGMII) {
|
||||||
debug("use XFI or USXGMII SI protos, XGMII is not valid\n");
|
debug("use 10GBase-R or USXGMII SI protos, XGMII is not valid\n");
|
||||||
|
|
||||||
reg_val1 = phy_read(phydev, MDIO_MMD_PHYXS,
|
reg_val1 = phy_read(phydev, MDIO_MMD_PHYXS,
|
||||||
AQUANTIA_SYSTEM_INTERFACE_SR);
|
AQUANTIA_SYSTEM_INTERFACE_SR);
|
||||||
if ((reg_val1 & AQUANTIA_SI_IN_USE_MASK) == AQUANTIA_SI_USXGMII)
|
if ((reg_val1 & AQUANTIA_SI_IN_USE_MASK) == AQUANTIA_SI_USXGMII)
|
||||||
interface = PHY_INTERFACE_MODE_USXGMII;
|
interface = PHY_INTERFACE_MODE_USXGMII;
|
||||||
else
|
else
|
||||||
interface = PHY_INTERFACE_MODE_XFI;
|
interface = PHY_INTERFACE_MODE_10GBASER;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -494,7 +494,7 @@ int aquantia_config(struct phy_device *phydev)
|
||||||
case PHY_INTERFACE_MODE_USXGMII:
|
case PHY_INTERFACE_MODE_USXGMII:
|
||||||
usx_an = 1;
|
usx_an = 1;
|
||||||
/* FALLTHROUGH */
|
/* FALLTHROUGH */
|
||||||
case PHY_INTERFACE_MODE_XFI:
|
case PHY_INTERFACE_MODE_10GBASER:
|
||||||
/* 10GBASE-T mode */
|
/* 10GBASE-T mode */
|
||||||
phydev->advertising = SUPPORTED_10000baseT_Full;
|
phydev->advertising = SUPPORTED_10000baseT_Full;
|
||||||
phydev->supported = phydev->advertising;
|
phydev->supported = phydev->advertising;
|
||||||
|
@ -515,14 +515,14 @@ int aquantia_config(struct phy_device *phydev)
|
||||||
phydev->dev->name);
|
phydev->dev->name);
|
||||||
} else {
|
} else {
|
||||||
reg_val1 &= ~AQUANTIA_USX_AUTONEG_CONTROL_ENA;
|
reg_val1 &= ~AQUANTIA_USX_AUTONEG_CONTROL_ENA;
|
||||||
debug("%s: system interface XFI\n",
|
debug("%s: system interface 10GBase-R\n",
|
||||||
phydev->dev->name);
|
phydev->dev->name);
|
||||||
}
|
}
|
||||||
|
|
||||||
phy_write(phydev, MDIO_MMD_PHYXS,
|
phy_write(phydev, MDIO_MMD_PHYXS,
|
||||||
AQUANTIA_VENDOR_PROVISIONING_REG, reg_val1);
|
AQUANTIA_VENDOR_PROVISIONING_REG, reg_val1);
|
||||||
break;
|
break;
|
||||||
case PHY_INTERFACE_MODE_SGMII_2500:
|
case PHY_INTERFACE_MODE_2500BASEX:
|
||||||
/* 2.5GBASE-T mode */
|
/* 2.5GBASE-T mode */
|
||||||
phydev->advertising = SUPPORTED_1000baseT_Full;
|
phydev->advertising = SUPPORTED_1000baseT_Full;
|
||||||
phydev->supported = phydev->advertising;
|
phydev->supported = phydev->advertising;
|
||||||
|
|
|
@ -463,7 +463,7 @@ static struct phy_driver genphy_driver = {
|
||||||
.shutdown = genphy_shutdown,
|
.shutdown = genphy_shutdown,
|
||||||
};
|
};
|
||||||
|
|
||||||
int genphy_init(void)
|
static int genphy_init(void)
|
||||||
{
|
{
|
||||||
return phy_register(&genphy_driver);
|
return phy_register(&genphy_driver);
|
||||||
}
|
}
|
||||||
|
|
|
@ -657,7 +657,7 @@ int sh_eth_initialize(struct bd_info *bd)
|
||||||
mdiodev = mdio_alloc();
|
mdiodev = mdio_alloc();
|
||||||
if (!mdiodev)
|
if (!mdiodev)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
strncpy(mdiodev->name, dev->name, MDIO_NAME_LEN);
|
strlcpy(mdiodev->name, dev->name, MDIO_NAME_LEN);
|
||||||
mdiodev->read = bb_miiphy_read;
|
mdiodev->read = bb_miiphy_read;
|
||||||
mdiodev->write = bb_miiphy_write;
|
mdiodev->write = bb_miiphy_write;
|
||||||
|
|
||||||
|
|
|
@ -425,7 +425,7 @@ static int smc911x_initialize_mii(struct smc911x_priv *priv)
|
||||||
if (!mdiodev)
|
if (!mdiodev)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
strncpy(mdiodev->name, priv->dev.name, MDIO_NAME_LEN);
|
strlcpy(mdiodev->name, priv->dev.name, MDIO_NAME_LEN);
|
||||||
mdiodev->read = smc911x_miiphy_read;
|
mdiodev->read = smc911x_miiphy_read;
|
||||||
mdiodev->write = smc911x_miiphy_write;
|
mdiodev->write = smc911x_miiphy_write;
|
||||||
|
|
||||||
|
|
|
@ -816,7 +816,7 @@ static int davinci_emac_probe(struct udevice *dev)
|
||||||
struct mii_dev *mdiodev = mdio_alloc();
|
struct mii_dev *mdiodev = mdio_alloc();
|
||||||
if (!mdiodev)
|
if (!mdiodev)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
strncpy(mdiodev->name, phy[i].name, MDIO_NAME_LEN);
|
strlcpy(mdiodev->name, phy[i].name, MDIO_NAME_LEN);
|
||||||
mdiodev->read = davinci_mii_phy_read;
|
mdiodev->read = davinci_mii_phy_read;
|
||||||
mdiodev->write = davinci_mii_phy_write;
|
mdiodev->write = davinci_mii_phy_write;
|
||||||
|
|
||||||
|
|
|
@ -638,7 +638,7 @@ static int tsec_init(struct udevice *dev)
|
||||||
return priv->phydev->link ? 0 : -1;
|
return priv->phydev->link ? 0 : -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static phy_interface_t tsec_get_interface(struct tsec_private *priv)
|
static phy_interface_t __maybe_unused tsec_get_interface(struct tsec_private *priv)
|
||||||
{
|
{
|
||||||
struct tsec __iomem *regs = priv->regs;
|
struct tsec __iomem *regs = priv->regs;
|
||||||
u32 ecntrl;
|
u32 ecntrl;
|
||||||
|
@ -701,8 +701,6 @@ static int init_phy(struct tsec_private *priv)
|
||||||
/* Assign a Physical address to the TBI */
|
/* Assign a Physical address to the TBI */
|
||||||
out_be32(®s->tbipa, priv->tbiaddr);
|
out_be32(®s->tbipa, priv->tbiaddr);
|
||||||
|
|
||||||
priv->interface = tsec_get_interface(priv);
|
|
||||||
|
|
||||||
if (priv->interface == PHY_INTERFACE_MODE_SGMII)
|
if (priv->interface == PHY_INTERFACE_MODE_SGMII)
|
||||||
tsec_configure_serdes(priv);
|
tsec_configure_serdes(priv);
|
||||||
|
|
||||||
|
@ -886,12 +884,13 @@ int tsec_probe(struct udevice *dev)
|
||||||
priv->tbiaddr = tbiaddr;
|
priv->tbiaddr = tbiaddr;
|
||||||
|
|
||||||
phy_mode = dev_read_prop(dev, "phy-connection-type", NULL);
|
phy_mode = dev_read_prop(dev, "phy-connection-type", NULL);
|
||||||
|
if (!phy_mode)
|
||||||
|
phy_mode = dev_read_prop(dev, "phy-mode", NULL);
|
||||||
if (phy_mode)
|
if (phy_mode)
|
||||||
pdata->phy_interface = phy_get_interface_by_name(phy_mode);
|
pdata->phy_interface = phy_get_interface_by_name(phy_mode);
|
||||||
if (pdata->phy_interface == -1) {
|
if (pdata->phy_interface == -1)
|
||||||
printf("Invalid PHY interface '%s'\n", phy_mode);
|
pdata->phy_interface = tsec_get_interface(priv);
|
||||||
return -EINVAL;
|
|
||||||
}
|
|
||||||
priv->interface = pdata->phy_interface;
|
priv->interface = pdata->phy_interface;
|
||||||
|
|
||||||
/* Check for speed limit, default is 1000Mbps */
|
/* Check for speed limit, default is 1000Mbps */
|
||||||
|
|
|
@ -1407,7 +1407,7 @@ int uec_initialize(struct bd_info *bis, struct uec_inf *uec_info)
|
||||||
|
|
||||||
if (!mdiodev)
|
if (!mdiodev)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
strncpy(mdiodev->name, dev->name, MDIO_NAME_LEN);
|
strlcpy(mdiodev->name, dev->name, MDIO_NAME_LEN);
|
||||||
mdiodev->read = uec_miiphy_read;
|
mdiodev->read = uec_miiphy_read;
|
||||||
mdiodev->write = uec_miiphy_write;
|
mdiodev->write = uec_miiphy_write;
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* SPDX-License-Identifier: GPL-2.0
|
/* SPDX-License-Identifier: GPL-2.0
|
||||||
* Copyright 2016-2019 NXP Semiconductors
|
* Copyright 2016-2019 NXP
|
||||||
* Copyright 2019 Vladimir Oltean <olteanv@gmail.com>
|
* Copyright 2019 Vladimir Oltean <olteanv@gmail.com>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* SPDX-License-Identifier: GPL-2.0+ */
|
/* SPDX-License-Identifier: GPL-2.0+ */
|
||||||
/*
|
/*
|
||||||
* Copyright 2019-2021 NXP Semiconductors
|
* Copyright 2019-2021 NXP
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __DSA_H__
|
#ifndef __DSA_H__
|
||||||
|
@ -57,7 +57,8 @@
|
||||||
/**
|
/**
|
||||||
* struct dsa_ops - DSA operations
|
* struct dsa_ops - DSA operations
|
||||||
*
|
*
|
||||||
* @port_enable: Initialize a switch port for I/O.
|
* @port_probe: Initialize a switch port.
|
||||||
|
* @port_enable: Enable I/O for a port.
|
||||||
* @port_disable: Disable I/O for a port.
|
* @port_disable: Disable I/O for a port.
|
||||||
* @xmit: Insert the DSA tag for transmission.
|
* @xmit: Insert the DSA tag for transmission.
|
||||||
* DSA drivers receive a copy of the packet with headroom and
|
* DSA drivers receive a copy of the packet with headroom and
|
||||||
|
@ -69,6 +70,8 @@
|
||||||
* master including any additional headers.
|
* master including any additional headers.
|
||||||
*/
|
*/
|
||||||
struct dsa_ops {
|
struct dsa_ops {
|
||||||
|
int (*port_probe)(struct udevice *dev, int port,
|
||||||
|
struct phy_device *phy);
|
||||||
int (*port_enable)(struct udevice *dev, int port,
|
int (*port_enable)(struct udevice *dev, int port,
|
||||||
struct phy_device *phy);
|
struct phy_device *phy);
|
||||||
void (*port_disable)(struct udevice *dev, int port,
|
void (*port_disable)(struct udevice *dev, int port,
|
||||||
|
|
|
@ -368,7 +368,7 @@ static inline int is_10g_interface(phy_interface_t interface)
|
||||||
{
|
{
|
||||||
return interface == PHY_INTERFACE_MODE_XGMII ||
|
return interface == PHY_INTERFACE_MODE_XGMII ||
|
||||||
interface == PHY_INTERFACE_MODE_USXGMII ||
|
interface == PHY_INTERFACE_MODE_USXGMII ||
|
||||||
interface == PHY_INTERFACE_MODE_XFI;
|
interface == PHY_INTERFACE_MODE_10GBASER;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -37,7 +37,7 @@ typedef enum {
|
||||||
PHY_INTERFACE_MODE_CAUI2,
|
PHY_INTERFACE_MODE_CAUI2,
|
||||||
PHY_INTERFACE_MODE_CAUI4,
|
PHY_INTERFACE_MODE_CAUI4,
|
||||||
PHY_INTERFACE_MODE_NCSI,
|
PHY_INTERFACE_MODE_NCSI,
|
||||||
PHY_INTERFACE_MODE_XFI,
|
PHY_INTERFACE_MODE_10GBASER,
|
||||||
PHY_INTERFACE_MODE_USXGMII,
|
PHY_INTERFACE_MODE_USXGMII,
|
||||||
PHY_INTERFACE_MODE_NONE, /* Must be last */
|
PHY_INTERFACE_MODE_NONE, /* Must be last */
|
||||||
|
|
||||||
|
@ -69,7 +69,7 @@ static const char * const phy_interface_strings[] = {
|
||||||
[PHY_INTERFACE_MODE_CAUI2] = "caui2",
|
[PHY_INTERFACE_MODE_CAUI2] = "caui2",
|
||||||
[PHY_INTERFACE_MODE_CAUI4] = "caui4",
|
[PHY_INTERFACE_MODE_CAUI4] = "caui4",
|
||||||
[PHY_INTERFACE_MODE_NCSI] = "NC-SI",
|
[PHY_INTERFACE_MODE_NCSI] = "NC-SI",
|
||||||
[PHY_INTERFACE_MODE_XFI] = "xfi",
|
[PHY_INTERFACE_MODE_10GBASER] = "10gbase-r",
|
||||||
[PHY_INTERFACE_MODE_USXGMII] = "usxgmii",
|
[PHY_INTERFACE_MODE_USXGMII] = "usxgmii",
|
||||||
[PHY_INTERFACE_MODE_NONE] = "",
|
[PHY_INTERFACE_MODE_NONE] = "",
|
||||||
};
|
};
|
||||||
|
|
|
@ -100,7 +100,7 @@ static void dsa_port_stop(struct udevice *pdev)
|
||||||
|
|
||||||
port_pdata = dev_get_parent_plat(pdev);
|
port_pdata = dev_get_parent_plat(pdev);
|
||||||
ops->port_disable(dev, port_pdata->index, port_pdata->phy);
|
ops->port_disable(dev, port_pdata->index, port_pdata->phy);
|
||||||
ops->port_disable(dev, priv->cpu_port, NULL);
|
ops->port_disable(dev, priv->cpu_port, priv->cpu_port_fixed_phy);
|
||||||
}
|
}
|
||||||
|
|
||||||
eth_get_ops(master)->stop(master);
|
eth_get_ops(master)->stop(master);
|
||||||
|
@ -199,9 +199,7 @@ static int dsa_port_free_pkt(struct udevice *pdev, uchar *packet, int length)
|
||||||
static int dsa_port_of_to_pdata(struct udevice *pdev)
|
static int dsa_port_of_to_pdata(struct udevice *pdev)
|
||||||
{
|
{
|
||||||
struct dsa_port_pdata *port_pdata;
|
struct dsa_port_pdata *port_pdata;
|
||||||
struct dsa_pdata *dsa_pdata;
|
|
||||||
struct eth_pdata *eth_pdata;
|
struct eth_pdata *eth_pdata;
|
||||||
struct udevice *dev;
|
|
||||||
const char *label;
|
const char *label;
|
||||||
u32 index;
|
u32 index;
|
||||||
int err;
|
int err;
|
||||||
|
@ -213,15 +211,12 @@ static int dsa_port_of_to_pdata(struct udevice *pdev)
|
||||||
if (err)
|
if (err)
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
dev = dev_get_parent(pdev);
|
|
||||||
dsa_pdata = dev_get_uclass_plat(dev);
|
|
||||||
|
|
||||||
port_pdata = dev_get_parent_plat(pdev);
|
port_pdata = dev_get_parent_plat(pdev);
|
||||||
port_pdata->index = index;
|
port_pdata->index = index;
|
||||||
|
|
||||||
label = ofnode_read_string(dev_ofnode(pdev), "label");
|
label = ofnode_read_string(dev_ofnode(pdev), "label");
|
||||||
if (label)
|
if (label)
|
||||||
strncpy(port_pdata->name, label, DSA_PORT_NAME_LENGTH);
|
strlcpy(port_pdata->name, label, DSA_PORT_NAME_LENGTH);
|
||||||
|
|
||||||
eth_pdata = dev_get_plat(pdev);
|
eth_pdata = dev_get_plat(pdev);
|
||||||
eth_pdata->priv_pdata = port_pdata;
|
eth_pdata->priv_pdata = port_pdata;
|
||||||
|
@ -240,18 +235,42 @@ static const struct eth_ops dsa_port_ops = {
|
||||||
.free_pkt = dsa_port_free_pkt,
|
.free_pkt = dsa_port_free_pkt,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Inherit port's hwaddr from the DSA master, unless the port already has a
|
||||||
|
* unique MAC address specified in the environment.
|
||||||
|
*/
|
||||||
|
static void dsa_port_set_hwaddr(struct udevice *pdev, struct udevice *master)
|
||||||
|
{
|
||||||
|
struct eth_pdata *eth_pdata, *master_pdata;
|
||||||
|
unsigned char env_enetaddr[ARP_HLEN];
|
||||||
|
|
||||||
|
eth_env_get_enetaddr_by_index("eth", dev_seq(pdev), env_enetaddr);
|
||||||
|
if (!is_zero_ethaddr(env_enetaddr)) {
|
||||||
|
/* individual port mac addrs require master to be promisc */
|
||||||
|
struct eth_ops *eth_ops = eth_get_ops(master);
|
||||||
|
|
||||||
|
if (eth_ops->set_promisc)
|
||||||
|
eth_ops->set_promisc(master, 1);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
master_pdata = dev_get_plat(master);
|
||||||
|
eth_pdata = dev_get_plat(pdev);
|
||||||
|
memcpy(eth_pdata->enetaddr, master_pdata->enetaddr, ARP_HLEN);
|
||||||
|
eth_env_set_enetaddr_by_index("eth", dev_seq(pdev),
|
||||||
|
master_pdata->enetaddr);
|
||||||
|
}
|
||||||
|
|
||||||
static int dsa_port_probe(struct udevice *pdev)
|
static int dsa_port_probe(struct udevice *pdev)
|
||||||
{
|
{
|
||||||
struct udevice *dev = dev_get_parent(pdev);
|
struct udevice *dev = dev_get_parent(pdev);
|
||||||
struct eth_pdata *eth_pdata, *master_pdata;
|
struct dsa_ops *ops = dsa_get_ops(dev);
|
||||||
unsigned char env_enetaddr[ARP_HLEN];
|
|
||||||
struct dsa_port_pdata *port_pdata;
|
struct dsa_port_pdata *port_pdata;
|
||||||
struct dsa_priv *dsa_priv;
|
|
||||||
struct udevice *master;
|
struct udevice *master;
|
||||||
int ret;
|
int err;
|
||||||
|
|
||||||
port_pdata = dev_get_parent_plat(pdev);
|
port_pdata = dev_get_parent_plat(pdev);
|
||||||
dsa_priv = dev_get_uclass_priv(dev);
|
|
||||||
|
|
||||||
port_pdata->phy = dm_eth_phy_connect(pdev);
|
port_pdata->phy = dm_eth_phy_connect(pdev);
|
||||||
if (!port_pdata->phy)
|
if (!port_pdata->phy)
|
||||||
|
@ -268,42 +287,25 @@ static int dsa_port_probe(struct udevice *pdev)
|
||||||
* TODO: we assume the master device is always there and doesn't get
|
* TODO: we assume the master device is always there and doesn't get
|
||||||
* removed during runtime.
|
* removed during runtime.
|
||||||
*/
|
*/
|
||||||
ret = device_probe(master);
|
err = device_probe(master);
|
||||||
if (ret)
|
if (err)
|
||||||
return ret;
|
return err;
|
||||||
|
|
||||||
/*
|
dsa_port_set_hwaddr(pdev, master);
|
||||||
* Inherit port's hwaddr from the DSA master, unless the port already
|
|
||||||
* has a unique MAC address specified in the environment.
|
|
||||||
*/
|
|
||||||
eth_env_get_enetaddr_by_index("eth", dev_seq(pdev), env_enetaddr);
|
|
||||||
if (!is_zero_ethaddr(env_enetaddr)) {
|
|
||||||
/* individual port mac addrs require master to be promisc */
|
|
||||||
struct eth_ops *eth_ops = eth_get_ops(master);
|
|
||||||
|
|
||||||
if (eth_ops->set_promisc)
|
if (ops->port_probe) {
|
||||||
eth_ops->set_promisc(master, 1);
|
err = ops->port_probe(dev, port_pdata->index,
|
||||||
|
port_pdata->phy);
|
||||||
return 0;
|
if (err)
|
||||||
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
master_pdata = dev_get_plat(master);
|
|
||||||
eth_pdata = dev_get_plat(pdev);
|
|
||||||
memcpy(eth_pdata->enetaddr, master_pdata->enetaddr, ARP_HLEN);
|
|
||||||
eth_env_set_enetaddr_by_index("eth", dev_seq(pdev),
|
|
||||||
master_pdata->enetaddr);
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int dsa_port_remove(struct udevice *pdev)
|
static int dsa_port_remove(struct udevice *pdev)
|
||||||
{
|
{
|
||||||
struct udevice *dev = dev_get_parent(pdev);
|
struct dsa_port_pdata *port_pdata = dev_get_parent_plat(pdev);
|
||||||
struct dsa_port_pdata *port_pdata;
|
|
||||||
struct dsa_priv *dsa_priv;
|
|
||||||
|
|
||||||
port_pdata = dev_get_parent_plat(pdev);
|
|
||||||
dsa_priv = dev_get_uclass_priv(dev);
|
|
||||||
|
|
||||||
port_pdata->phy = NULL;
|
port_pdata->phy = NULL;
|
||||||
|
|
||||||
|
@ -419,7 +421,7 @@ static int dsa_post_bind(struct udevice *dev)
|
||||||
struct dsa_port_pdata *port_pdata;
|
struct dsa_port_pdata *port_pdata;
|
||||||
|
|
||||||
port_pdata = dev_get_parent_plat(pdev);
|
port_pdata = dev_get_parent_plat(pdev);
|
||||||
strncpy(port_pdata->name, name, DSA_PORT_NAME_LENGTH);
|
strlcpy(port_pdata->name, name, DSA_PORT_NAME_LENGTH);
|
||||||
pdev->name = port_pdata->name;
|
pdev->name = port_pdata->name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -101,7 +101,7 @@ static int dm_mdio_post_probe(struct udevice *dev)
|
||||||
pdata->mii_bus->write = mdio_write;
|
pdata->mii_bus->write = mdio_write;
|
||||||
pdata->mii_bus->reset = mdio_reset;
|
pdata->mii_bus->reset = mdio_reset;
|
||||||
pdata->mii_bus->priv = dev;
|
pdata->mii_bus->priv = dev;
|
||||||
strncpy(pdata->mii_bus->name, dev->name, MDIO_NAME_LEN - 1);
|
strlcpy(pdata->mii_bus->name, dev->name, MDIO_NAME_LEN);
|
||||||
|
|
||||||
return mdio_register(pdata->mii_bus);
|
return mdio_register(pdata->mii_bus);
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,12 +16,12 @@ identifier readfunc, writefunc;
|
||||||
- miiphy_register(devname, readfunc, writefunc);
|
- miiphy_register(devname, readfunc, writefunc);
|
||||||
+ struct mii_dev *mdiodev = mdio_alloc();
|
+ struct mii_dev *mdiodev = mdio_alloc();
|
||||||
+ if (!mdiodev) return -ENOMEM;
|
+ if (!mdiodev) return -ENOMEM;
|
||||||
+ strncpy(mdiodev->name, devname, MDIO_NAME_LEN);
|
+ strlcpy(mdiodev->name, devname, MDIO_NAME_LEN);
|
||||||
+ mdiodev->read = readfunc;
|
+ mdiodev->read = readfunc;
|
||||||
+ mdiodev->write = writefunc;
|
+ mdiodev->write = writefunc;
|
||||||
+
|
+
|
||||||
+ retval = mdio_register(mdiodev);
|
+ retval = mdio_register(mdiodev);
|
||||||
+ if (retval < 0) return retval;
|
+ if (retval < 0) { mdio_free(mdiodev); return retval; }
|
||||||
|
|
||||||
@ update_read_sig @
|
@ update_read_sig @
|
||||||
identifier mii_reg.readfunc;
|
identifier mii_reg.readfunc;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// SPDX-License-Identifier: GPL-2.0
|
// SPDX-License-Identifier: GPL-2.0
|
||||||
/*
|
/*
|
||||||
* Copyright 2020-2021 NXP Semiconductors
|
* Copyright 2020-2021 NXP
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <net/dsa.h>
|
#include <net/dsa.h>
|
||||||
|
|
Loading…
Add table
Reference in a new issue