Fresh pull from upstream
[librecmc/librecmc.git] / target / linux / ramips / dts / PBR-D1.dts
1 /dts-v1/;
2
3 #include "mt7628an.dtsi"
4
5 #include <dt-bindings/input/input.h>
6
7 / {
8         compatible = "mediatek,pbr-d1", "mediatek,mt7628an-soc";
9         model = "PBR-D1";
10
11         chosen {
12                 bootargs = "console=ttyS0,115200";
13         };
14
15         aliases {
16                 serial0 = &uart2;
17         };
18
19         memory@0 {
20                 device_type = "memory";
21                 reg = <0x0 0x8000000>;
22         };
23
24         gpio-leds {
25                 compatible = "gpio-leds";
26
27                 usb {
28                         label = "pbr-d1:orange:usb";
29                         gpios = <&gpio0 0 1>;
30                         default-state = "off";
31                 };
32
33                 power {
34                         label = "pbr-d1:orange:power";
35                         gpios = <&gpio0 14 1>;
36                         default-state = "on";
37                 };
38         };
39
40         gpio-keys-polled {
41                 compatible = "gpio-keys-polled";
42                 #address-cells = <1>;
43                 #size-cells = <0>;
44                 poll-interval = <20>;
45
46                 reset {
47                         label = "reset";
48                         gpios = <&gpio1 38 1>;
49                         linux,code = <KEY_RESTART>;
50                 };
51         };
52
53         wgpio: gpio-wifi {
54                 compatible = "mediatek,gpio-wifi";
55                 #address-cells = <1>;
56                 #size-cells = <0>;
57                 gpio-controller;
58                 #gpio-cells = <2>;
59         };
60 };
61
62 &pinctrl {
63         state_default: pinctrl0 {
64                 gpio {
65                         ralink,group = "gpio";
66                         ralink,function = "gpio";
67                 };
68
69                 i2c {
70                         ralink,group = "i2c";
71                         ralink,function = "gpio";
72                 };
73
74                 i2s {
75                         ralink,group = "i2s";
76                         ralink,function = "gpio";
77                 };
78
79                 spis {
80                         ralink,group = "spis";
81                         ralink,function = "gpio";
82                 };
83
84                 wdt {
85                         ralink,group = "wdt";
86                         ralink,function = "gpio";
87                 };
88         };
89 };
90
91 &spi0 {
92         status = "okay";
93
94         pinctrl-names = "default";
95         pinctrl-0 = <&spi_pins>, <&spi_cs1_pins>;
96
97         m25p80@0 {
98                 #address-cells = <1>;
99                 #size-cells = <1>;
100                 compatible = "jedec,spi-nor";
101                 reg = <0>;
102                 linux,modalias = "m25p80", "w25q128";
103                 spi-max-frequency = <40000000>;
104                 m25p,chunked-io = <31>;
105
106                 partition@0 {
107                         label = "u-boot";
108                         reg = <0x0 0x30000>;
109                         read-only;
110                 };
111
112                 partition@30000 {
113                         label = "u-boot-env";
114                         reg = <0x30000 0x10000>;
115                 };
116
117                 factory: partition@40000 {
118                         label = "factory";
119                         reg = <0x40000 0x10000>;
120                         read-only;
121                 };
122
123                 partition@50000 {
124                         label = "firmware";
125                         reg = <0x50000 0x0fb0000>;
126                 };
127         };
128
129         spidev@1 {
130                 #address-cells = <1>;
131                 #size-cells = <1>;
132                 compatible = "linux,spidev";
133                 reg = <1>;
134                 spi-max-frequency = <40000000>;
135         };
136 };
137
138 &i2c {
139         status = "okay";
140 };
141
142 &uart1 {
143         status = "okay";
144 };
145
146 &uart2 {
147         status = "okay";
148 };
149
150 &pwm {
151         status = "okay";
152 };
153
154 &ethernet {
155         mtd-mac-address = <&factory 0x28>;
156 };
157
158 &sdhci {
159         status = "okay";
160         mediatek,cd-high;
161 };