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