ath79: add support for Compex WPJ531 (16M)
[openwrt/staging/dedeckeh.git] / target / linux / ath79 / dts / ar7242_buffalo_wzr-bhr.dtsi
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 #include "ar7242.dtsi"
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 = "buffalo:red:diag";
44 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
45 };
46
47 usb {
48 label = "buffalo: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 cs-gpios = <0>, <0>;
111 num-cs = <2>;
112
113 flash0: flash@0 {
114 compatible = "jedec,spi-nor";
115 reg = <0>;
116 spi-max-frequency = <25000000>;
117 };
118
119 flash1: flash@1 {
120 compatible = "jedec,spi-nor";
121 reg = <1>;
122 spi-max-frequency = <25000000>;
123 };
124 };
125
126 &mdio0 {
127 status = "okay";
128
129 phy-mask = <0x1>;
130
131 phy0: ethernet-phy@0 {
132 reg = <0>;
133 phy-mode = "rgmii";
134 };
135 };
136
137 &eth0 {
138 status = "okay";
139
140 phy-mode = "rgmii";
141 phy-handle = <&phy0>;
142 };
143
144 &pll {
145 clocks = <&extosc>;
146 };
147
148 &uart {
149 status = "okay";
150 };
151
152 &usb_phy {
153 status = "okay";
154 };
155
156 &usb {
157 #address-cells = <1>;
158 #size-cells = <0>;
159 status = "okay";
160
161 hub_port: port@1 {
162 reg = <1>;
163 #trigger-source-cells = <0>;
164 };
165 };