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