ath79: DTS file style update and harmonization
[oweals/openwrt.git] / target / linux / ath79 / dts / ar9331_tplink_tl-wr703n_tl-mr10u.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 "ar9331.dtsi"
8
9 / {
10         aliases {
11                 serial0 = &uart;
12                 led-boot = &led_system;
13                 led-failsafe = &led_system;
14                 led-running = &led_system;
15                 led-upgrade = &led_system;
16                 label-mac-device = &eth0;
17         };
18
19         keys {
20                 compatible = "gpio-keys";
21
22                 reset {
23                         label = "reset";
24                         linux,code = <KEY_RESTART>;
25                         gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
26                         debounce-interval = <60>;
27                 };
28         };
29
30         leds {
31                 compatible = "gpio-leds";
32
33                 led_system: system {
34                         label = "tl-wr703n:blue:system";
35                         gpios = <&gpio 27 GPIO_ACTIVE_LOW>;
36                 };
37         };
38
39         reg_usb_vbus: reg_usb_vbus {
40                 compatible = "regulator-fixed";
41                 regulator-name = "usb_vbus";
42                 regulator-min-microvolt = <5000000>;
43                 regulator-max-microvolt = <5000000>;
44                 enable-active-high;
45         };
46 };
47
48 &spi {
49         status = "okay";
50
51         num-cs = <1>;
52
53         flash@0 {
54                 compatible = "jedec,spi-nor";
55                 reg = <0>;
56                 spi-max-frequency = <25000000>;
57
58                 partitions {
59                         compatible = "fixed-partitions";
60                         #address-cells = <1>;
61                         #size-cells = <1>;
62
63                         uboot: partition@0 {
64                                 reg = <0x0 0x20000>;
65                                 label = "u-boot";
66                                 read-only;
67                         };
68
69                         partition@20000 {
70                                 compatible = "tplink,firmware";
71                                 reg = <0x20000 0x3d0000>;
72                                 label = "firmware";
73                         };
74
75                         art: partition@3f0000 {
76                                 reg = <0x3f0000 0x10000>;
77                                 label = "art";
78                                 read-only;
79                         };
80                 };
81         };
82 };
83
84 &eth0 {
85         status = "okay";
86
87         mtd-mac-address = <&uboot 0x1fc00>;
88
89         gmac-config {
90                 device = <&gmac>;
91
92                 switch-phy-addr-swap = <0>;
93                 switch-phy-swap = <0>;
94         };
95 };
96
97 &eth1 {
98         status = "okay";
99
100         compatible = "syscon", "simple-mfd";
101 };
102
103 &gpio {
104         status = "okay";
105 };
106
107 &uart {
108         status = "okay";
109 };
110
111 &usb {
112         dr_mode = "host";
113         vbus-supply = <&reg_usb_vbus>;
114         status = "okay";
115 };
116
117 &usb_phy {
118         status = "okay";
119 };
120
121 &wmac {
122         status = "okay";
123
124         mtd-cal-data = <&art 0x1000>;
125         mtd-mac-address = <&uboot 0x1fc00>;
126 };