4ef9323b6e8a274bc7602e513eb126b55f41ec22
[openwrt/openwrt.git] / target / linux / ath79 / dts / ar7242_buffalo_wzr-bhr.dtsi
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2 /dts-v1/;
3
4 #include <dt-bindings/gpio/gpio.h>
5 #include <dt-bindings/input/input.h>
6
7 #include "ar7242.dtsi"
8
9 / {
10 aliases {
11 led-boot = &diag;
12 led-failsafe = &diag;
13 led-upgrade = &diag;
14 };
15
16 extosc: ref {
17 compatible = "fixed-clock";
18 #clock-cells = <0>;
19 clock-frequency = <40000000>;
20 };
21
22 keys: keys {
23 compatible = "gpio-keys-polled";
24 poll-interval = <20>;
25
26 usb {
27 label = "usb";
28 linux,code = <BTN_2>;
29 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
30 debounce-interval = <60>;
31 };
32
33 reset {
34 label = "reset";
35 linux,code = <KEY_RESTART>;
36 gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
37 debounce-interval = <60>;
38 };
39 };
40
41 leds {
42 compatible = "gpio-leds";
43
44 sec_vpn: sec_vpn {
45 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
46 default-state = "off";
47 };
48
49 diag: diag {
50 label = "buffalo:red:diag";
51 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
52 default-state = "off";
53 };
54
55 usb {
56 label = "buffalo:green:usb";
57 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
58 default-state = "off";
59 trigger-sources = <&hub_port>;
60 linux,default-trigger = "usbport";
61 };
62 };
63
64 gpio-export {
65 compatible = "gpio-export";
66 #size-cells = <0>;
67
68 gpio_usb_power {
69 gpio-export,name = "buffalo:usb-power";
70 gpio-export,output = <1>;
71 gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
72 };
73 };
74
75 virtual_flash {
76 compatible = "mtd-concat";
77 devices = <&flash0 &flash1>;
78
79 partitions {
80 compatible = "fixed-partitions";
81 #address-cells = <1>;
82 #size-cells = <1>;
83
84 partition@0 {
85 reg = <0x0 0x40000>;
86 label = "u-boot";
87 read-only;
88 };
89
90 partition@40000 {
91 reg = <0x40000 0x10000>;
92 label = "u-boot-env";
93 };
94
95 ART: partition@50000 {
96 reg = <0x50000 0x10000>;
97 label = "ART";
98 read-only;
99 };
100
101 partition@60000 {
102 compatible = "denx,uimage";
103 reg = <0x60000 0x1f80000>;
104 label = "firmware";
105 };
106
107 partition@1fe0000 {
108 reg = <0x1fe0000 0x20000>;
109 label = "user_property";
110 read-only;
111 };
112 };
113 };
114 };
115
116 &spi {
117 status = "okay";
118 cs-gpios = <0>, <0>;
119 num-cs = <2>;
120
121 flash0: flash@0 {
122 compatible = "jedec,spi-nor";
123 reg = <0>;
124 spi-max-frequency = <25000000>;
125 };
126
127 flash1: flash@1 {
128 compatible = "jedec,spi-nor";
129 reg = <1>;
130 spi-max-frequency = <25000000>;
131 };
132 };
133
134 &mdio0 {
135 status = "okay";
136
137 phy-mask = <0x1>;
138
139 phy0: ethernet-phy@0 {
140 reg = <0>;
141 phy-mode = "rgmii";
142 };
143 };
144
145 &eth0 {
146 status = "okay";
147
148 phy-mode = "rgmii";
149 phy-handle = <&phy0>;
150 };
151
152 &pll {
153 clocks = <&extosc>;
154 };
155
156 &uart {
157 status = "okay";
158 };
159
160 &usb_phy {
161 status = "okay";
162 };
163
164 &usb {
165 #address-cells = <1>;
166 #size-cells = <0>;
167 status = "okay";
168
169 hub_port: port@1 {
170 reg = <1>;
171 #trigger-source-cells = <0>;
172 };
173 };