Messages in this thread | | | Date | Tue, 13 Sep 2016 21:07:08 +0200 | From | Andrew Lunn <> | Subject | Re: [PATCH 3/3] net-next: dsa: add new driver for qca8xxx family |
| |
> Since the former alternative is prefered, we may want to remove the > latter soon from DSA. If this phy_port_map is needed for that case, it'd > be preferable not to add it.
O.K, so maybe we should solve it the device tree way:
&mdio0 { phy_port1: phy@0 { reg = <0>; };
phy_port2: phy@1 { reg = <1>; };
phy_port3: phy@2 { reg = <2>; };
phy_port4: phy@3 { reg = <3>; };
phy_port5: phy@4 { reg = <4>; };
switch@0 { compatible = "qca,qca8337";
#address-cells = <1>; #size-cells = <0>; reg = <30>;
ports { port@11 { reg = <11>; label = "cpu"; ethernet = <&gmac1>; phy-mode = "rgmii"; };
port@1 { reg = <1>; label = "lan1"; phy-handle = <&phy_port1>; };
port@2 { reg = <2>; label = "lan2"; phy-handle = <&phy_port2>; };
port@3 { reg = <3>; label = "lan3"; phy-handle = <&phy_port3>; };
port@4 { reg = <4>; label = "lan4"; phy-handle = <&phy_port4>; }; }; }; };
and remove the phy_read() and phy_write() functions.
Andrew
| |