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