ramips: DTS rework
[lede.git] / target / linux / ramips / dts / DIR-645.dts
1 /dts-v1/;
2
3 #include "rt3883.dtsi"
4
5 / {
6         compatible = "DIR-645", "ralink,rt3883-soc";
7         model = "D-Link DIR-645";
8
9         rtl8367b {
10                 compatible = "realtek,rtl8367b";
11                 gpio-sda = <&gpio0 1 0>;
12                 gpio-sck = <&gpio0 2 0>;
13                 realtek,extif1 = <1 0 1 1 1 1 1 1 2>;
14         };
15
16         gpio-keys-polled {
17                 compatible = "gpio-keys-polled";
18                 #address-cells = <1>;
19                 #size-cells = <0>;
20                 poll-interval = <100>;
21
22                 reset {
23                         label = "reset";
24                         gpios = <&gpio0 9 0>;
25                         linux,code = <0x198>;
26                 };
27
28                 wps {
29                         label = "wps";
30                         gpios = <&gpio0 14 0>;
31                         linux,code = <0x211>;
32                 };
33         };
34
35         gpio-leds {
36                 compatible = "gpio-leds";
37
38                 inet {
39                         label = "dir-645:green:inet";
40                         gpios = <&gpio0 0 1>;
41                 };
42
43                 wps {
44                         label = "dir-645:green:wps";
45                         gpios = <&gpio1 2 0>;
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 = <&gpio1 6 0>;
57                 };
58         };
59 };
60
61 &gpio1 {
62         status = "okay";
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";
74                 spi-max-frequency = <25000000>;
75
76                 partition@0 {
77                         label = "uboot";
78                         reg = <0x0 0x30000>;
79                         read-only;
80                 };
81
82                 partition@30000 {
83                         label = "uboot-env";
84                         reg = <0x30000 0x4000>;
85                         read-only;
86                 };
87
88                 factory: partition@34000 {
89                         label = "factory";
90                         reg = <0x34000 0x4000>;
91                         read-only;
92                 };
93
94                 partition@38000 {
95                         label = "nvram";
96                         reg = <0x38000 0x8000>;
97                         read-only;
98                 };
99
100                 partition@40000 {
101                         label = "devdata";
102                         reg = <0x40000 0x10000>;
103                 };
104
105                 partition@50000 {
106                         label = "firmware";
107                         reg = <0x50000 0x7b0000>;
108                 };
109         };
110 };
111
112 &pinctrl {
113         state_default: pinctrl0 {
114                 gpio {
115                         ralink,group = "i2c", "jtag", "uartf";
116                         ralink,function = "gpio";
117                 };
118         };
119 };
120
121 &ethernet {
122         mtd-mac-address = <&factory 0x4>;
123
124         port@0 {
125                 mediatek,fixed-link = <1000 1 1 0>;
126         };
127 };
128
129 &wmac {
130         ralink,5ghz = <0>;
131         ralink,mtd-eeprom = <&factory 0>;
132 };
133
134 &ehci {
135         status = "okay";
136 };
137
138 &ohci {
139         status = "okay";
140 };