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