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