Other Parts Discussed in Thread: TMDS64EVM, DP83869
Tool/software:
Hi experts,
I'm currently trying to get an DP83826E to work with ICSSG on a custom board with an AM642.
I built the Kernel based on version 10.01.10 from ti-linux-kernel repository.
I previously tested the two interfaces in MII mode on the evaluation board (TMDS64EVM) without any issues with the same built Kernel.
The evaluation board uses two DP83869 PHYs, so I assumed that the following adaptions in device tree and config would suffice.
Config change:
CONFIG_DP83822_PHY=m
Device Tree change on board level:
// ... / { compatible = "ti,am642-custom", "ti,am642"; model = "Texas Instruments AM642 Custom"; chosen { stdout-path = &main_uart0; }; aliases { serial0 = &mcu_uart0; serial1 = &main_uart1; serial2 = &main_uart0; serial3 = &main_uart3; i2c0 = &main_i2c0; i2c1 = &main_i2c1; mmc0 = &sdhci0; ethernet0 = &icssg1_emac0; }; // ... icssg1_eth: icssg1-eth { compatible = "ti,am642-icssg-prueth"; pinctrl-names = "default"; //pinctrl-0 = <&icssg1_rgmii1_pins_default>; pinctrl-0 = <&icssg1_mii1_pins_default>; sram = <&oc_sram>; ti,prus = <&pru1_0>, <&rtu1_0>, <&tx_pru1_0>, <&pru1_1>, <&rtu1_1>, <&tx_pru1_1>; firmware-name = "ti-pruss/am64x-sr2-pru0-prueth-fw.elf", "ti-pruss/am64x-sr2-rtu0-prueth-fw.elf", "ti-pruss/am64x-sr2-txpru0-prueth-fw.elf", "ti-pruss/am64x-sr2-pru1-prueth-fw.elf", "ti-pruss/am64x-sr2-rtu1-prueth-fw.elf", "ti-pruss/am64x-sr2-txpru1-prueth-fw.elf"; ti,pruss-gp-mux-sel = <2>, /* MII mode */ <2>, <2>, <2>, /* MII mode */ <2>, <2>; ti,mii-g-rt = <&icssg1_mii_g_rt>; ti,mii-rt = <&icssg1_mii_rt>; ti,iep = <&icssg1_iep0>, <&icssg1_iep1>; ti,pa-stats = <&icssg1_pa_stats>; interrupt-parent = <&icssg1_intc>; interrupts = <24 0 2>, <25 1 3>; interrupt-names = "tx_ts0", "tx_ts1"; dmas = <&main_pktdma 0xc200 15>, /* egress slice 0 */ <&main_pktdma 0xc201 15>, /* egress slice 0 */ <&main_pktdma 0xc202 15>, /* egress slice 0 */ <&main_pktdma 0xc203 15>, /* egress slice 0 */ <&main_pktdma 0xc204 15>, /* egress slice 1 */ <&main_pktdma 0xc205 15>, /* egress slice 1 */ <&main_pktdma 0xc206 15>, /* egress slice 1 */ <&main_pktdma 0xc207 15>, /* egress slice 1 */ <&main_pktdma 0x4200 15>, /* ingress slice 0 */ <&main_pktdma 0x4201 15>; /* ingress slice 1 */ dma-names = "tx0-0", "tx0-1", "tx0-2", "tx0-3", "tx1-0", "tx1-1", "tx1-2", "tx1-3", "rx0", "rx1"; ethernet-ports { #address-cells = <1>; #size-cells = <0>; icssg1_emac0: port@0 { reg = <0>; phy-handle = <&icssg1_phy1>; //phy-mode = "rgmii-id"; phy-mode = "mii"; /* Filled in by bootloader */ local-mac-address = [00 00 00 00 00 00]; }; icssg1_emac1: port@1 { reg = <1>; //phy-handle = <&icssg1_phy2>; /* Filled in by bootloader */ local-mac-address = [00 00 00 00 00 00]; status = "disabled"; }; }; }; }; &main_pmx0 { icssg1_mdio1_pins_default: icssg1-mdio1-default-pins { pinctrl-single,pins = < AM64X_IOPAD(0x015c, PIN_OUTPUT, 0) /* (Y6) PRG1_MDIO0_MDC */ AM64X_IOPAD(0x0158, PIN_INPUT, 0) /* (AA6) PRG1_MDIO0_MDIO */ >; }; icssg1_mii1_pins_default: icssg1-mii1-default-pins { pinctrl-single,pins = < AM64X_IOPAD(0x00f8, PIN_INPUT, 1) /* (V9) PRG1_PRU0_GPO16.PR1_MII_MT0_CLK */ AM64X_IOPAD(0x00f4, PIN_OUTPUT, 0) /* (Y9) PRG1_PRU0_GPO15.PR1_MII0_TXEN */ AM64X_IOPAD(0x00f0, PIN_OUTPUT, 0) /* (AA9) PRG1_PRU0_GPO14.PR1_MII0_TXD3 */ AM64X_IOPAD(0x00ec, PIN_OUTPUT, 0) /* (W9) PRG1_PRU0_GPO13.PR1_MII0_TXD2 */ AM64X_IOPAD(0x00e8, PIN_OUTPUT, 0) /* (U9) PRG1_PRU0_GPO12.PR1_MII0_TXD1 */ AM64X_IOPAD(0x00e4, PIN_OUTPUT, 0) /* (AA8) PRG1_PRU0_GPO11.PR1_MII0_TXD0 */ AM64X_IOPAD(0x00c8, PIN_INPUT, 1) /* (Y8) PRG1_PRU0_GPO4.PR1_MII0_RXDV */ AM64X_IOPAD(0x00d0, PIN_INPUT, 1) /* (AA7) PRG1_PRU0_GPO6.PR1_MII_MR0_CLK */ AM64X_IOPAD(0x00c4, PIN_INPUT, 1) /* (V8) PRG1_PRU0_GPO3.PR1_MII0_RXD3 */ AM64X_IOPAD(0x00c0, PIN_INPUT, 1) /* (W8) PRG1_PRU0_GPO2.PR1_MII0_RXD2 */ AM64X_IOPAD(0x00cc, PIN_INPUT, 1) /* (V13) PRG1_PRU0_GPO5.PR1_MII0_RXER */ AM64X_IOPAD(0x00bc, PIN_INPUT, 1) /* (U8) PRG1_PRU0_GPO1.PR1_MII0_RXD1 */ AM64X_IOPAD(0x00b8, PIN_INPUT, 1) /* (Y7) PRG1_PRU0_GPO0.PR1_MII0_RXD0 */ AM64X_IOPAD(0x00d8, PIN_INPUT, 1) /* (W13) PRG1_PRU0_GPO8.PR1_MII0_RXLINK */ >; }; // ... }; &cpsw3g { status = "disabled"; }; // ... &icssg1_mdio { status = "okay"; pinctrl-names = "default"; pinctrl-0 = <&icssg1_mdio1_pins_default>; icssg1_phy1: ethernet-phy@1f { reg = <0x1f>; tx-internal-delay-ps = <250>; rx-internal-delay-ps = <2000>; }; };
With the adjustments I get always the following error from the mdio driver:
[ 7.091610] davinci_mdio 300b2400.mdio: Configuring MDIO in manual mode [ 7.365821] davinci_mdio 300b2400.mdio: davinci mdio revision 1.7, bus freq 1000000 [ 7.396256] mdio_bus 300b2400.mdio: MDIO device at address 31 is missing. ... [ 10.239699] icssg-prueth icssg1-eth: port 1: using random MAC addr: 82:6c:f2:4a:06:1a [ 10.591384] icssg-prueth icssg1-eth: couldn't connect to phy ethernet-phy@1 [ 10.600669] icssg-prueth icssg1-eth: can't connect to MII0 PHY, error --19
I also checked the PHY IDs inside the driver and saw that the following two IDs are defined:
#define DP83826C_PHY_ID 0x2000a130 #define DP83826NC_PHY_ID 0x2000a110
I get the same error message when adding the PHY ID 0x2000a131, which I think should be the correct one for my case.
Adding a compatible to the ethernet-phy node seems to work first, but no link is detected.
compatible = "ethernet-phy-id2000.a131", "ethernet-phy-ieee802.3-c22";
[ 7.452274] davinci_mdio 300b2400.mdio: Configuring MDIO in manual mode [ 7.533461] davinci_mdio 300b2400.mdio: davinci mdio revision 1.7, bus freq 1000000 [ 7.651433] davinci_mdio 300b2400.mdio: phy[2]: device 300b2400.mdio:1f, driver TI DP83826E [ 10.326676] TI DP83826E 300b2400.mdio:1f: attached PHY driver (mii_bus:phy_addr=300b2400.mdio:1f, irq=POLL) [ 10.193498] icssg-prueth icssg1-eth: port 1: using random MAC addr: ea:2e:14:59:20:d8 [ 10.349487] icssg-prueth icssg1-eth: TI PRU ethernet driver initialized: single EMAC mode
I'm quite inexperienced with this topic and unsure what I should look for.
Could you tell me, if the DP83826E can be used with ICSSG and the dp83822.c driver?
And if yes, do you see something I missed?