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