ramips: fix dtc warnings
[openwrt/openwrt.git] / target / linux / ramips / dts / DIR-320-B1.dts
1 /dts-v1/;
2
3 #include "rt5350.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "dlink,dir-320-b1", "ralink,rt5350-soc";
10 model = "D-Link DIR-320 B1";
11
12 aliases {
13 led-status = &led_status;
14 };
15
16 gpio-leds {
17 compatible = "gpio-leds";
18
19 led_status: status {
20 label = "dir-320-b1:green:status";
21 gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
22 };
23
24 usb {
25 label = "dir-320-b1:green:usb";
26 gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
27 };
28
29 wps {
30 label = "dir-320-b1:green:wps";
31 gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
32 };
33 };
34
35 gpio-keys-polled {
36 compatible = "gpio-keys-polled";
37 poll-interval = <20>;
38
39 reset {
40 label = "reset";
41 gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
42 linux,code = <KEY_RESTART>;
43 };
44
45 wps {
46 label = "wps";
47 gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
48 linux,code = <KEY_WPS_BUTTON>;
49 };
50 };
51
52 gpio_export {
53 compatible = "gpio-export";
54 #size-cells = <0>;
55
56 usb {
57 gpio-export,name = "usb";
58 gpio-export,output = <1>;
59 gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
60 };
61
62 root_hub {
63 gpio-export,name = "root_hub";
64 gpio-export,output = <1>;
65 gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
66 };
67 };
68 };
69
70 &spi0 {
71 status = "okay";
72
73 m25p80@0 {
74 #address-cells = <1>;
75 #size-cells = <1>;
76 compatible = "jedec,spi-nor";
77 reg = <0>;
78 spi-max-frequency = <10000000>;
79
80 partition@0 {
81 label = "u-boot";
82 reg = <0x0 0x30000>;
83 read-only;
84 };
85
86 partition@30000 {
87 label = "u-boot-env";
88 reg = <0x30000 0x10000>;
89 read-only;
90 };
91
92 factory: partition@40000 {
93 label = "factory";
94 reg = <0x40000 0x10000>;
95 read-only;
96 };
97
98 partition@50000 {
99 label = "firmware";
100 reg = <0x50000 0x7b0000>;
101 };
102 };
103 };
104
105 &pinctrl {
106 state_default: pinctrl0 {
107 gpio {
108 ralink,group = "i2c", "jtag", "rgmii", "mdio", "uartf";
109 ralink,function = "gpio";
110 };
111 };
112 };
113
114 &ethernet {
115 mtd-mac-address = <&factory 0x4>;
116 };
117
118 &esw {
119 mediatek,portmap = <0x2f>;
120 mediatek,led_polarity = <0x17>;
121 };
122
123 &wmac {
124 ralink,mtd-eeprom = <&factory 0>;
125 };
126
127 &ehci {
128 status = "okay";
129 };
130
131 &ohci {
132 status = "okay";
133 };