linux - Device Tree for PHY-less connection to a DSA switch -


we have little problem creating device tree our configuration of marvell dsa switch , xilinx zynq processor. connected this:

|——————————————|               |——————————————————————————————| |     e000b000—|———— sgmii ————|—port6 (0x16)      port3 —— phy3 | zynq         |               |         mv88e6321            | |     e000c000—|—x           x—|—port5             port4 —— phy4 |——————————————|               |——————————————————————————————|         |___________ mdio _______________| 

and have device tree linux kernel, looks this:

ps7_ethernet_0: ps7-ethernet@e000b000 {             #address-cells = <1>;             #size-cells = <0>;             clock-names = "ref_clk", "aper_clk";             clocks = <&clkc 13>, <&clkc 30>;             compatible = "xlnx,ps7-ethernet-1.00.a";             interrupt-parent = <&ps7_scugic_0>;             interrupts = <0 22 4>;             local-mac-address = [00 0a 35 00 00 00];             phy-handle = <&phy0>;             phy-mode = "gmii";             reg = <0xe000b000 0x1000>;             xlnx,ptp-enet-clock = <0x69f6bcb>;             xlnx,enet-reset = "";             xlnx,eth-mode = <0x0>;             xlnx,has-mdio = <0x1>;             mdio_0: mdio {                 #address-cells = <1>;                 #size-cells = <0>;                 phy0: phy@16 {                     compatiable = "marvell,dsa";                     reg = <0x16>;                 } ;             } ;  } ;      dsa@0 {             compatible = "marvell,dsa";              #address-cells = <2>;             #size-cells = <0>;              interrupts = <10>;              dsa,ethernet = <&ps7_ethernet_0>;             dsa,mii-bus = <&mdio_0>;              switch@0 {                 #address-cells = <1>;                 #size-cells = <0>;                 reg = <0 0>;              port@3 {                     reg = <3>;                     label = "lan0";                              };              port@4 {                     reg = <4>;                     label = "lan1";              };              port@5 {                     reg = <5>;                     label = "lan2";              };              port@6 {                     reg = <6>;                     label = "cpu";                     };         };         };      } ; 

the problem is, can see picture, there no phy attached port 6, i.e. connection between zynq , switch phy-less, had specify <phy0> in device tree make dsa driver see switch. tries talk non-existent phy , fails, obviously.

so question is: how create proper device tree dsa switch connected processor this?

thank help!

(there similar question p1010 mac switch port direct connection without phy cannot comment on , there no answer, unfortunately)

instead of specifying &phy0 when there none, can write fixed-link

fixed-link = <0 1 1000 0 0>;

where 0 emulated phy id, 1-> full-duplex , speed 1000 mb/s. want disable autonegotiation processor port switch port 6 connected.

ps7_ethernet_0: ps7-ethernet@e000b000 {         #address-cells = <1>;         #size-cells = <0>;         clock-names = "ref_clk", "aper_clk";         clocks = <&clkc 13>, <&clkc 30>;         compatible = "xlnx,ps7-ethernet-1.00.a";         interrupt-parent = <&ps7_scugic_0>;         interrupts = <0 22 4>;         local-mac-address = [00 0a 35 00 00 00];         fixed-link = <0 1 1000 0 0>;         phy-mode = "gmii";         reg = <0xe000b000 0x1000>;         xlnx,ptp-enet-clock = <0x69f6bcb>;         xlnx,enet-reset = "";         xlnx,eth-mode = <0x0>;         xlnx,has-mdio = <0x1>;         mdio_0: mdio {             #address-cells = <1>;             #size-cells = <0>;         } ; 

} ;

dsa@0 {         compatible = "marvell,dsa";          #address-cells = <2>;         #size-cells = <0>;          interrupts = <10>;          dsa,ethernet = <&ps7_ethernet_0>;         dsa,mii-bus = <&mdio_0>;          switch@0 {             #address-cells = <1>;             #size-cells = <0>;             reg = <22 0>;          port@3 {                 reg = <3>;                 label = "lan0";                          };          port@4 {                 reg = <4>;                 label = "lan1";          };          port@5 {                 reg = <5>;                 label = "lan2";          };          port@6 {                 reg = <6>;                 label = "cpu";                 };     };     };      

} ;

i'm assuming switch chip smi address 0x16; if not make reg = <22,0> <0,0> before under switch@0. may need add mdio driver reg address , compatible property , not specified in device tree.


Comments

Popular posts from this blog

How has firefox/gecko HTML+CSS rendering changed in version 38? -

javascript - Complex json ng-repeat -

jquery - Cloning of rows and columns from the old table into the new with colSpan and rowSpan -