ath79: fix TP-Link TL-WR1043ND v1 image build
[oweals/openwrt.git] / target / linux / ath79 / dts / ar9331_embeddedwireless_dorin.dts
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         model = "Embedded Wireless Dorin";
11         compatible = "embeddedwireless,dorin", "qca,ar9331";
12
13         aliases {
14                 serial0 = &uart;
15         };
16
17         memory@0 {
18                 device_type = "memory";
19                 reg = <0x0 0x4000000>;
20         };
21
22         leds {
23                 compatible = "gpio-leds";
24
25                 status {
26                         label = "dorin:green:status";
27                         gpios = <&gpio 21 GPIO_ACTIVE_LOW>;
28                         default-state = "off";
29                 };
30         };
31
32         keys {
33                 compatible = "gpio-keys-polled";
34                 #address-cells = <1>;
35                 #size-cells = <0>;
36                 poll-interval = <100>;
37
38                 wps {
39                         label = "wps";
40                         linux,code = <KEY_WPS_BUTTON>;
41                         gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
42                 };
43
44                 reset {
45                         label = "reset";
46                         linux,code = <KEY_RESTART>;
47                         gpios = <&gpio 6 GPIO_ACTIVE_HIGH>;
48                 };
49         };
50 };
51
52 &uart {
53         status = "okay";
54 };
55
56 &gpio {
57         status = "okay";
58 };
59
60 &usb {
61         dr_mode = "host";
62         status = "okay";
63 };
64
65 &usb_phy {
66         status = "okay";
67 };
68
69 &spi {
70         num-chipselects = <1>;
71         status = "okay";
72
73         spiflash {
74                 #address-cells = <1>;
75                 #size-cells = <1>;
76                 compatible = "jedec,spi-nor";
77                 spi-max-frequency = <104000000>;
78                 reg = <0>;
79
80                 partitions {
81                         compatible = "fixed-partitions";
82                         #address-cells = <1>;
83                         #size-cells = <1>;
84
85                         partition@0 {
86                                 label = "u-boot";
87                                 reg = <0x000000 0x040000>;
88                                 read-only;
89                         };
90
91                         partition@1 {
92                                 label = "u-boot-env";
93                                 reg = <0x040000 0x010000>;
94                         };
95
96                         partition@2 {
97                                 label = "firmware";
98                                 reg = <0x050000 0xfa0000>;
99                         };
100
101                         art: partition@3 {
102                                 label = "ART";
103                                 reg = <0xff0000 0x010000>;
104                                 read-only;
105                         };
106                 };
107         };
108 };
109
110 &eth1 {
111         status = "okay";
112
113         mtd-mac-address = <&art 0x1002>;
114
115         fixed-link {
116                 speed = <1000>;
117                 full-duplex;
118         };
119
120         gmac-config {
121                 device = <&gmac>;
122
123                 switch-phy-addr-swap = <1>;
124                 switch-phy-swap = <1>;
125         };
126 };
127
128 &mdio1 {
129         status = "okay";
130 };