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