Part Number: AM3354
CPSW switch configuration failure (4.19.38) - cant get it into switch mode. ETH0 and ETH1 work fine, just not the extra switch port. Original configuration came from Linux 3.12 version device tree that worked perfectly. Now, not so much:
Using KSZ8041 Ethernet phy and KSZ886X Switch on an Exor "USOM1".
Kernel boot shows:
[ 1.264511] davinci_mdio 4a101000.mdio: phy[0]: device 4a101000.mdio:00, driver Micrel KSZ8041
[ 1.273658] davinci_mdio 4a101000.mdio: phy[1]: device 4a101000.mdio:01, driver Micrel KSZ886X Switch
[ 1.283381] davinci_mdio 4a101000.mdio: phy[2]: device 4a101000.mdio:02, driver Micrel KSZ886X Switch
[ 1.293036] davinci_mdio 4a101000.mdio: phy[3]: device 4a101000.mdio:03, driver Micrel KSZ886X Switch
[ 1.302689] davinci_mdio 4a101000.mdio: phy[5]: device 4a101000.mdio:05, driver Micrel KSZ8041
[ 1.312511] cpsw 4a100000.ethernet: Detected MACID = 68:c9:0b:b4:8c:df
[ 1.319487] cpsw 4a100000.ethernet: initialized cpsw ale version 1.4
[ 1.326114] cpsw 4a100000.ethernet: ALE Table size 1024
[ 1.331614] cpsw 4a100000.ethernet: cpts: overflow check period 500 (jiffies)
[ 1.339907] cpsw 4a100000.ethernet: cpsw: Detected MACID = 68:c9:0b:b4:8c:e1
Relevant device tree entries are:
mac: ethernet@4a100000 {
compatible = "ti,am335x-cpsw","ti,cpsw";
ti,hwmods = "cpgmac0";
clocks = <&cpsw_125mhz_gclk>, <&cpsw_cpts_rft_clk>;
clock-names = "fck", "cpts";
cpdma_channels = <8>;
ale_entries = <1024>;
bd_ram_size = <0x2000>;
mac_control = <0x20>;
slaves = <2>;
active_slave = <1>;
cpts_clock_mult = <0x80000000>;
cpts_clock_shift = <29>;
reg = <0x4a100000 0x800
0x4a101200 0x100>;
#address-cells = <1>;
#size-cells = <1>;
/*
* c0_rx_thresh_pend
* c0_rx_pend
* c0_tx_pend
* c0_misc_pend
*/
interrupts = <40 41 42 43>;
ranges;
syscon = <&scm_conf>;
dual_emac;
status = "disabled";
davinci_mdio: mdio@4a101000 {
compatible = "ti,cpsw-mdio","ti,davinci_mdio";
#address-cells = <1>;
#size-cells = <0>;
ti,hwmods = "davinci_mdio";
bus_freq = <1000000>;
reg = <0x4a101000 0x100>;
status = "disabled";
};
cpsw_emac0: slave@4a100200 {
/* Filled in by U-Boot */
mac-address = [ 00 00 00 00 00 00 ];
};
cpsw_emac1: slave@4a100300 {
/* Filled in by U-Boot */
mac-address = [ 00 00 00 00 00 00 ];
};
phy_sel: cpsw-phy-sel@44e10650 {
compatible = "ti,am3352-cpsw-phy-sel";
reg= <0x44e10650 0x4>;
reg-names = "gmii-sel";
};
...
&mac {
pinctrl-names = "default", "sleep";
pinctrl-0 = <&cpsw_default>;
pinctrl-1 = <&cpsw_sleep>;
/*active_slave = <0>;*/
status = "okay";
};
&davinci_mdio {
pinctrl-names = "default", "sleep";
pinctrl-0 = <&davinci_mdio_default>;
pinctrl-1 = <&davinci_mdio_sleep>;
status = "okay";
};
&cpsw_emac0 {
phy_id = <&davinci_mdio>, <1>;
phy-mode = "rmii";
dual_emac_res_vlan = <1>;
ifname = "eth1";
};
&cpsw_emac1 {
phy_id = <&davinci_mdio>, <5>;
phy-mode = "rmii";
dual_emac_res_vlan = <2>;
ifname = "eth0";
};
&phy_sel {
rmii-clock-ext;
};
I played with all settings from "dual-emac" (which when I removed, I lost an Ethernet port - so I put it back). I am also not sure of "slaves" and "active-slaves" definitions, cant seem to find a definitive resource...
Any help please. Let me know if there is more info needed.