ath79: enable UART in SoC DTSI files
[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 cs-gpios = <0>, <0>;
111
112 flash0: flash@0 {
113 compatible = "jedec,spi-nor";
114 reg = <0>;
115 spi-max-frequency = <25000000>;
116 };
117
118 flash1: flash@1 {
119 compatible = "jedec,spi-nor";
120 reg = <1>;
121 spi-max-frequency = <25000000>;
122 };
123 };
124
125 &mdio0 {
126 status = "okay";
127
128 phy-mask = <0x1>;
129
130 phy0: ethernet-phy@0 {
131 reg = <0>;
132 phy-mode = "rgmii";
133 };
134 };
135
136 &eth0 {
137 status = "okay";
138
139 phy-mode = "rgmii";
140 phy-handle = <&phy0>;
141 };
142
143 &pll {
144 clocks = <&extosc>;
145 };
146
147 &usb_phy {
148 status = "okay";
149 };
150
151 &usb {
152 #address-cells = <1>;
153 #size-cells = <0>;
154 status = "okay";
155
156 hub_port: port@1 {
157 reg = <1>;
158 #trigger-source-cells = <0>;
159 };
160 };