lantiq: dts: assign the MDIO pins to the gsw node
[oweals/openwrt.git] / target / linux / lantiq / files / arch / mips / boot / dts / VG3503J.dts
1 /dts-v1/;
2
3 #include "vr9.dtsi"
4
5 #include <dt-bindings/input/input.h>
6 #include <dt-bindings/mips/lantiq_rcu_gphy.h>
7
8 / {
9         compatible = "arcadyan,vg3503j", "lantiq,xway", "lantiq,vr9";
10         model = "BT OpenReach VDSL Modem";
11
12         chosen {
13                 bootargs = "console=ttyLTQ0,115200";
14         };
15
16         aliases {
17                 led-boot = &power_green;
18                 led-failsafe = &power_red;
19                 led-running = &power_green;
20                 led-upgrade = &power_green;
21
22                 led-dsl = &dsl;
23         };
24
25         memory@0 {
26                 device_type = "memory";
27                 reg = <0x0 0x2000000>;
28         };
29
30         keys {
31                 compatible = "gpio-keys-polled";
32                 poll-interval = <100>;
33                 reset {
34                         label = "reset";
35                         gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
36                         linux,code = <KEY_RESTART>;
37                 };
38         };
39
40         leds {
41                 compatible = "gpio-leds";
42
43                 power_red: power2 {
44                         label = "vg3503j:red:power";
45                         gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
46                 };
47                 dsl: dsl {
48                         label = "vg3503j:green:dsl";
49                         gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
50                 };
51                 power_green: power {
52                         label = "vg3503j:green:power";
53                         gpios = <&gpio 28 GPIO_ACTIVE_LOW>;
54                         default-state = "keep";
55                 };
56         };
57 };
58
59 &eth0 {
60         interface@0 {
61                 compatible = "lantiq,xrx200-pdi";
62                 #address-cells = <1>;
63                 #size-cells = <0>;
64                 reg = <0>;
65
66                 lantiq,switch;
67                 ethernet@2 {
68                         compatible = "lantiq,xrx200-pdi-port";
69                         reg = <2>;
70                         phy-mode = "mii";
71                         phy-handle = <&phy11>;
72                 };
73                 ethernet@4 {
74                         compatible = "lantiq,xrx200-pdi-port";
75                         reg = <4>;
76                         phy-mode = "mii";
77                         phy-handle = <&phy13>;
78                 };
79         };
80
81         mdio {
82                 #address-cells = <1>;
83                 #size-cells = <0>;
84                 compatible = "lantiq,xrx200-mdio";
85
86                 phy11: ethernet-phy@11 {
87                         reg = <0x11>;
88                         compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
89                         lantiq,led1h = <0x70>;
90                         lantiq,led1l = <0x00>;
91                         lantiq,led2h = <0x00>;
92                         lantiq,led2l = <0x03>;
93                 };
94                 phy13: ethernet-phy@13 {
95                         reg = <0x13>;
96                         compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
97                         lantiq,led1h = <0x70>;
98                         lantiq,led1l = <0x00>;
99                         lantiq,led2h = <0x00>;
100                         lantiq,led2l = <0x03>;
101                 };
102         };
103 };
104
105 &gphy0 {
106         lantiq,gphy-mode = <GPHY_MODE_GE>;
107 };
108
109 &gphy1 {
110         lantiq,gphy-mode = <GPHY_MODE_GE>;
111 };
112
113 &gpio {
114         pinctrl-names = "default";
115         pinctrl-0 = <&state_default>;
116
117         state_default: pinmux {
118                 gphy-leds {
119                         lantiq,groups = "gphy0 led0", "gphy0 led1",
120                                         "gphy0 led2", "gphy1 led0",
121                                         "gphy1 led1", "gphy1 led2";
122                         lantiq,function = "gphy";
123                         lantiq,pull = <2>;
124                         lantiq,open-drain = <0>;
125                         lantiq,output = <1>;
126                 };
127         };
128 };
129
130 &localbus {
131         flash@0 {
132                 compatible = "lantiq,nor";
133                 bank-width = <2>;
134                 reg = <0 0x0 0x2000000>;
135
136                 partitions {
137                         compatible = "fixed-partitions";
138                         #address-cells = <1>;
139                         #size-cells = <1>;
140
141                         partition@0 {
142                                 label = "uboot";
143                                 reg = <0x00000 0x20000>;
144                         };
145
146                         partition@20000 {
147                                 label = "firmware";
148                                 reg = <0x20000 0x7d0000>;
149                         };
150
151                         partition@7f0000 {
152                                 label = "uboot-env";
153                                 reg = <0x7f0000 0x10000>;
154                         };
155                 };
156         };
157 };