lkml.org 
[lkml]   [2016]   [Sep]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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

\
 
 \ /
  Last update: 2016-09-17 09:59    [W:0.043 / U:0.748 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site