ramips: fix dtc warnings
[openwrt/openwrt.git] / target / linux / ramips / dts / kng_rc.dts
1 /dts-v1/;
2
3 #include "mt7620a.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "zyxel,keenetic-viva", "ralink,mt7620a-soc";
10 model = "ZyXEL Keenetic Viva";
11
12 aliases {
13 led-status = &led_power_green;
14 };
15
16 gpio-leds {
17 compatible = "gpio-leds";
18
19 wan {
20 label = "kng_rc:green:wan";
21 gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
22 };
23
24 usb {
25 label = "kng_rc:green:usb";
26 gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
27 };
28
29 power_alert {
30 label = "kng_rc:red:power";
31 gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
32 };
33
34 wifi {
35 label = "kng_rc:green:wifi";
36 gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
37 };
38
39 led_power_green: power {
40 label = "kng_rc:green:power";
41 gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
42 };
43 };
44
45 gpio-keys-polled {
46 compatible = "gpio-keys";
47 poll-interval = <20>;
48
49 reset {
50 label = "reset";
51 gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
52 linux,code = <KEY_RESTART>;
53 };
54
55 wps {
56 label = "wps";
57 gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
58 linux,code = <KEY_WPS_BUTTON>;
59 };
60
61 fn {
62 label = "fn";
63 gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
64 linux,code = <BTN_0>;
65 };
66 };
67
68 gpio_export {
69 compatible = "gpio-export";
70 #size-cells = <0>;
71
72 usb_power {
73 gpio-export,name = "usb";
74 gpio-export,output = <1>;
75 gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
76 };
77 };
78
79 rtl8367rb {
80 compatible = "realtek,rtl8367b";
81 cpu_port = <7>;
82 realtek,extif2 = <1 0 1 1 1 1 1 1 2>;
83 mii-bus = <&mdio0>;
84 };
85 };
86
87 &spi0 {
88 status = "okay";
89
90 m25p80@0 {
91 #address-cells = <1>;
92 #size-cells = <1>;
93 compatible = "jedec,spi-nor";
94 reg = <0>;
95 spi-max-frequency = <10000000>;
96
97 partition@0 {
98 label = "u-boot";
99 reg = <0x0 0x30000>;
100 read-only;
101 };
102
103 partition@30000 {
104 label = "u-boot-env";
105 reg = <0x30000 0x10000>;
106 read-only;
107 };
108
109 factory: partition@40000 {
110 label = "factory";
111 reg = <0x40000 0x10000>;
112 read-only;
113 };
114
115 partition@50000 {
116 label = "firmware";
117 reg = <0x50000 0xfb0000>;
118 };
119 };
120 };
121
122 &pinctrl {
123 state_default: pinctrl0 {
124 gpio {
125 ralink,group = "i2c", "uartf";
126 ralink,function = "gpio";
127 };
128 };
129 };
130
131 &ethernet {
132 status = "okay";
133 pinctrl-names = "default";
134 pinctrl-0 = <&rgmii2_pins &mdio_pins>;
135 mtd-mac-address = <&factory 0x00004>;
136
137 port@4 {
138 status = "okay";
139 mediatek,fixed-link = <1000 1 1 1>;
140 phy-mode = "rgmii";
141 phy-handle = <&phy4>;
142 };
143
144 mdio0: mdio-bus {
145 status = "okay";
146
147 phy4: ethernet-phy@4 {
148 reg = <4>;
149 phy-mode = "rgmii";
150 };
151 };
152 };
153
154 &gsw {
155 mediatek,port4 = "gmac";
156 };
157
158 &wmac {
159 ralink,mtd-eeprom = <&factory 0>;
160 };
161
162 &ehci {
163 status = "okay";
164 };
165
166 &ohci {
167 status = "okay";
168 };