Commit 4eb7ae7a authored by Oleksij Rempel's avatar Oleksij Rempel Committed by David S. Miller

MIPS: ath79: ar9331: add ar9331-switch node

Add switch node supported by dsa ar9331 driver.
Signed-off-by: default avatarOleksij Rempel <o.rempel@pengutronix.de>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent dba261f3
...@@ -126,6 +126,9 @@ eth0: ethernet@19000000 { ...@@ -126,6 +126,9 @@ eth0: ethernet@19000000 {
clocks = <&pll ATH79_CLK_AHB>, <&pll ATH79_CLK_AHB>; clocks = <&pll ATH79_CLK_AHB>, <&pll ATH79_CLK_AHB>;
clock-names = "eth", "mdio"; clock-names = "eth", "mdio";
phy-mode = "mii";
phy-handle = <&phy_port4>;
status = "disabled"; status = "disabled";
}; };
...@@ -133,13 +136,127 @@ eth1: ethernet@1a000000 { ...@@ -133,13 +136,127 @@ eth1: ethernet@1a000000 {
compatible = "qca,ar9330-eth"; compatible = "qca,ar9330-eth";
reg = <0x1a000000 0x200>; reg = <0x1a000000 0x200>;
interrupts = <5>; interrupts = <5>;
resets = <&rst 13>, <&rst 23>; resets = <&rst 13>, <&rst 23>;
reset-names = "mac", "mdio"; reset-names = "mac", "mdio";
clocks = <&pll ATH79_CLK_AHB>, <&pll ATH79_CLK_AHB>; clocks = <&pll ATH79_CLK_AHB>, <&pll ATH79_CLK_AHB>;
clock-names = "eth", "mdio"; clock-names = "eth", "mdio";
phy-mode = "gmii";
status = "disabled"; status = "disabled";
fixed-link {
speed = <1000>;
full-duplex;
};
mdio {
#address-cells = <1>;
#size-cells = <0>;
switch10: switch@10 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "qca,ar9331-switch";
reg = <0x10>;
resets = <&rst 8>;
reset-names = "switch";
interrupt-parent = <&miscintc>;
interrupts = <12>;
interrupt-controller;
#interrupt-cells = <1>;
ports {
#address-cells = <1>;
#size-cells = <0>;
switch_port0: port@0 {
reg = <0x0>;
label = "cpu";
ethernet = <&eth1>;
phy-mode = "gmii";
fixed-link {
speed = <1000>;
full-duplex;
};
};
switch_port1: port@1 {
reg = <0x1>;
phy-handle = <&phy_port0>;
phy-mode = "internal";
status = "disabled";
};
switch_port2: port@2 {
reg = <0x2>;
phy-handle = <&phy_port1>;
phy-mode = "internal";
status = "disabled";
};
switch_port3: port@3 {
reg = <0x3>;
phy-handle = <&phy_port2>;
phy-mode = "internal";
status = "disabled";
};
switch_port4: port@4 {
reg = <0x4>;
phy-handle = <&phy_port3>;
phy-mode = "internal";
status = "disabled";
};
};
mdio {
#address-cells = <1>;
#size-cells = <0>;
interrupt-parent = <&switch10>;
phy_port0: phy@0 {
reg = <0x0>;
interrupts = <0>;
status = "disabled";
};
phy_port1: phy@1 {
reg = <0x1>;
interrupts = <0>;
status = "disabled";
};
phy_port2: phy@2 {
reg = <0x2>;
interrupts = <0>;
status = "disabled";
};
phy_port3: phy@3 {
reg = <0x3>;
interrupts = <0>;
status = "disabled";
};
phy_port4: phy@4 {
reg = <0x4>;
interrupts = <0>;
status = "disabled";
};
};
};
};
}; };
usb: usb@1b000100 { usb: usb@1b000100 {
......
...@@ -84,3 +84,16 @@ &eth0 { ...@@ -84,3 +84,16 @@ &eth0 {
&eth1 { &eth1 {
status = "okay"; status = "okay";
}; };
&switch_port1 {
label = "lan0";
status = "okay";
};
&phy_port0 {
status = "okay";
};
&phy_port4 {
status = "okay";
};
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment