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