In DRA72x EVM, by default slave 1 is connected to the onboard phy, but slave 2 pins are also muxed with video input module which is controlled by pcf857x gpio and currently to select slave 0 to connect to phy gpio hogging is used, but with omap2plus_defconfig the pcf857x gpio is built as module. So when using NFS on DRA72x EVM, board doesn't boot as gpio hogging do not set proper gpio state to connect slave 0 to phy as it is built as module and you do not see any errors for not setting gpio and just mentions dhcp reply not got. To solve this issue, introducing "mode-gpios" in DT when gpio based muxing is required. This will throw a warning when gpio get fails and returns probe defer. When gpio-pcf857x module is installed, cpsw probes again and ethernet becomes functional. Verified this on DRA72x with pcf as module and ramdisk. Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: David S. Miller <davem@davemloft.net>
116 lines
3.6 KiB
Plaintext
116 lines
3.6 KiB
Plaintext
TI SoC Ethernet Switch Controller Device Tree Bindings
|
|
------------------------------------------------------
|
|
|
|
Required properties:
|
|
- compatible : Should be one of the below:-
|
|
"ti,cpsw" for backward compatible
|
|
"ti,am335x-cpsw" for AM335x controllers
|
|
"ti,am4372-cpsw" for AM437x controllers
|
|
"ti,dra7-cpsw" for DRA7x controllers
|
|
- reg : physical base address and size of the cpsw
|
|
registers map
|
|
- interrupts : property with a value describing the interrupt
|
|
number
|
|
- interrupt-parent : The parent interrupt controller
|
|
- cpdma_channels : Specifies number of channels in CPDMA
|
|
- ale_entries : Specifies No of entries ALE can hold
|
|
- bd_ram_size : Specifies internal descriptor RAM size
|
|
- rx_descs : Specifies number of Rx descriptors
|
|
- mac_control : Specifies Default MAC control register content
|
|
for the specific platform
|
|
- slaves : Specifies number for slaves
|
|
- active_slave : Specifies the slave to use for time stamping,
|
|
ethtool and SIOCGMIIPHY
|
|
- cpts_clock_mult : Numerator to convert input clock ticks into nanoseconds
|
|
- cpts_clock_shift : Denominator to convert input clock ticks into nanoseconds
|
|
|
|
Optional properties:
|
|
- ti,hwmods : Must be "cpgmac0"
|
|
- no_bd_ram : Must be 0 or 1
|
|
- dual_emac : Specifies Switch to act as Dual EMAC
|
|
- syscon : Phandle to the system control device node, which is
|
|
the control module device of the am33x
|
|
- mode-gpios : Should be added if one/multiple gpio lines are
|
|
required to be driven so that cpsw data lines
|
|
can be connected to the phy via selective mux.
|
|
For example in dra72x-evm, pcf gpio has to be
|
|
driven low so that cpsw slave 0 and phy data
|
|
lines are connected via mux.
|
|
|
|
|
|
Slave Properties:
|
|
Required properties:
|
|
- phy_id : Specifies slave phy id
|
|
- phy-mode : See ethernet.txt file in the same directory
|
|
|
|
Optional properties:
|
|
- dual_emac_res_vlan : Specifies VID to be used to segregate the ports
|
|
- mac-address : See ethernet.txt file in the same directory
|
|
|
|
Note: "ti,hwmods" field is used to fetch the base address and irq
|
|
resources from TI, omap hwmod data base during device registration.
|
|
Future plan is to migrate hwmod data base contents into device tree
|
|
blob so that, all the required data will be used from device tree dts
|
|
file.
|
|
|
|
Examples:
|
|
|
|
mac: ethernet@4A100000 {
|
|
compatible = "ti,cpsw";
|
|
reg = <0x4A100000 0x1000>;
|
|
interrupts = <55 0x4>;
|
|
interrupt-parent = <&intc>;
|
|
cpdma_channels = <8>;
|
|
ale_entries = <1024>;
|
|
bd_ram_size = <0x2000>;
|
|
no_bd_ram = <0>;
|
|
rx_descs = <64>;
|
|
mac_control = <0x20>;
|
|
slaves = <2>;
|
|
active_slave = <0>;
|
|
cpts_clock_mult = <0x80000000>;
|
|
cpts_clock_shift = <29>;
|
|
syscon = <&cm>;
|
|
cpsw_emac0: slave@0 {
|
|
phy_id = <&davinci_mdio>, <0>;
|
|
phy-mode = "rgmii-txid";
|
|
/* Filled in by U-Boot */
|
|
mac-address = [ 00 00 00 00 00 00 ];
|
|
};
|
|
cpsw_emac1: slave@1 {
|
|
phy_id = <&davinci_mdio>, <1>;
|
|
phy-mode = "rgmii-txid";
|
|
/* Filled in by U-Boot */
|
|
mac-address = [ 00 00 00 00 00 00 ];
|
|
};
|
|
};
|
|
|
|
(or)
|
|
mac: ethernet@4A100000 {
|
|
compatible = "ti,cpsw";
|
|
ti,hwmods = "cpgmac0";
|
|
cpdma_channels = <8>;
|
|
ale_entries = <1024>;
|
|
bd_ram_size = <0x2000>;
|
|
no_bd_ram = <0>;
|
|
rx_descs = <64>;
|
|
mac_control = <0x20>;
|
|
slaves = <2>;
|
|
active_slave = <0>;
|
|
cpts_clock_mult = <0x80000000>;
|
|
cpts_clock_shift = <29>;
|
|
syscon = <&cm>;
|
|
cpsw_emac0: slave@0 {
|
|
phy_id = <&davinci_mdio>, <0>;
|
|
phy-mode = "rgmii-txid";
|
|
/* Filled in by U-Boot */
|
|
mac-address = [ 00 00 00 00 00 00 ];
|
|
};
|
|
cpsw_emac1: slave@1 {
|
|
phy_id = <&davinci_mdio>, <1>;
|
|
phy-mode = "rgmii-txid";
|
|
/* Filled in by U-Boot */
|
|
mac-address = [ 00 00 00 00 00 00 ];
|
|
};
|
|
};
|