Hi everyone
I am using ksz8895 and spi .My connection is as below.
Should I have to use dsa drivers.Is my dts file correct?
&ecspi1{
id = <1>;
status = "okay";
ksz8895: ksz8895@0 {
compatible = "microchip,ksz8895";
reg = <0>;
spi-max-frequency = <40000000>;
spi-cpha;
spi-cpol;
status = "okay";
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
label = "lan1";
};
port@1 {
reg = <1>;
label = "lan2";
};
port@2 {
reg = <2>;
label = "lan3";
};
port@3 {
reg = <3>;
label = "lan4";
};
port@4 {
reg = <4>;
label = "cpu";
ethernet = <ðphy0>;
fixed-link {
speed = <100>;
full-duplex;
};
};
};
};
};
&fec1 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_enet1>;
//pinctrl-assert-gpios = <&gpio7 15 GPIO_ACTIVE_LOW>;
clocks = <&clks IMX7D_ENET_AXI_ROOT_CLK>,
<&clks IMX7D_ENET_AXI_ROOT_CLK>,
<&clks IMX7D_ENET1_TIME_ROOT_CLK>,
<&clks IMX7D_PLL_ENET_MAIN_50M_CLK>,
<&clks IMX7D_ENET1_REF_ROOT_CLK>;
clock-names = "ipg", "ahb", "ptp","enet_clk_ref", "no_enet_out";
assigned-clocks = <&clks IMX7D_ENET1_TIME_ROOT_SRC>,
<&clks IMX7D_ENET1_TIME_ROOT_CLK>;
assigned-clock-parents = <&clks IMX7D_PLL_ENET_MAIN_100M_CLK>;
assigned-clock-rates = <0>, <100000000>;
phy-mode = "rmii";
phy-handle = <ðphy0>;
fsl,magic-packet;
status = "okay";
fixed-link {
speed = <100>;
full-duplex;
};
/*mdio {*/
#address-cells = <1>;
#size-cells = <0>;
ethphy0: ethernet-phy@0 {
compatible = "microchip,ksz8895";
reg = <0>;
};
ethphy1: ethernet-phy@1 {
compatible = "microchip,ksz8895";
reg = <1>;
};
/*};*/
};
&fec2 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_enet2>;
clocks = <&clks IMX7D_ENET_AXI_ROOT_CLK>,
<&clks IMX7D_ENET_AXI_ROOT_CLK>,
<&clks IMX7D_ENET1_TIME_ROOT_CLK>,
<&clks IMX7D_PLL_ENET_MAIN_50M_CLK>,
<&clks IMX7D_ENET1_REF_ROOT_CLK>;
clock-names = "ipg", "ahb", "ptp","enet_clk_ref", "no_enet_out";
assigned-clocks = <&clks IMX7D_ENET2_TIME_ROOT_SRC>,
<&clks IMX7D_ENET2_TIME_ROOT_CLK>;
assigned-clock-parents = <&clks IMX7D_PLL_ENET_MAIN_100M_CLK>;
assigned-clock-rates = <0>, <100000000>;
phy-mode = "rmii";
phy-handle = <ðphy1>;
fsl,magic-packet;
status = "okay";
};