ath79: fix dts of Teltonika RUT9xx devices
[openwrt/staging/wigyori.git] / target / linux / ath79 / dts / ar9330_pqi_air-pen.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 "ar9330.dtsi"
8
9 / {
10 model = "PQI Air-Pen";
11 compatible = "pqi,air-pen", "qca,ar9330";
12
13 aliases {
14 serial0 = &uart;
15 led-boot = &led_wlan;
16 led-failsafe = &led_wlan;
17 led-upgrade = &led_wlan;
18 };
19
20 leds {
21 compatible = "gpio-leds";
22
23 led_wlan: wlan {
24 label = "air-pen:blue:wlan";
25 gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
26 linux,default-trigger = "phy0tpt";
27 };
28
29 wps {
30 label = "air-pen:blue:wps";
31 gpios = <&gpio 23 GPIO_ACTIVE_HIGH>;
32 };
33 };
34
35 keys {
36 compatible = "gpio-keys";
37
38 wps {
39 label = "wps";
40 linux,code = <KEY_WPS_BUTTON>;
41 gpios = <&gpio 22 GPIO_ACTIVE_HIGH>;
42 debounce-interval = <60>;
43 };
44
45 reset {
46 label = "reset";
47 linux,code = <KEY_RESTART>;
48 gpios = <&gpio 12 GPIO_ACTIVE_HIGH>;
49 debounce-interval = <60>;
50 };
51 };
52 };
53
54 &uart {
55 status = "okay";
56 };
57
58 &gpio {
59 status = "okay";
60 };
61
62 &usb {
63 dr_mode = "host";
64 status = "okay";
65 };
66
67 &usb_phy {
68 status = "okay";
69 };
70
71 &spi {
72 status = "okay";
73
74 num-cs = <1>;
75
76 flash@0 {
77 compatible = "jedec,spi-nor";
78 spi-max-frequency = <50000000>;
79 reg = <0>;
80
81 partitions {
82 compatible = "fixed-partitions";
83 #address-cells = <1>;
84 #size-cells = <1>;
85
86 partition@0 {
87 label = "u-boot";
88 reg = <0x000000 0x040000>;
89 read-only;
90 };
91
92 partition@40000 {
93 label = "u-boot-env";
94 reg = <0x040000 0x010000>;
95 };
96
97 art: partition@50000 {
98 label = "art";
99 reg = <0x050000 0x010000>;
100 read-only;
101 };
102
103 partition@60000 {
104 label = "NVRAM";
105 reg = <0x060000 0x010000>;
106 read-only;
107 };
108
109 partition@70000 {
110 compatible = "denx,uimage";
111 label = "firmware";
112 reg = <0x070000 0x780000>;
113 };
114
115 partition@7f0000 {
116 label = "CONF";
117 reg = <0x7f0000 0x010000>;
118 read-only;
119 };
120 };
121 };
122 };
123
124 &eth0 {
125 status = "okay";
126
127 mtd-mac-address = <&art 0x1002>;
128
129 gmac-config {
130 device = <&gmac>;
131
132 switch-phy-addr-swap = <0>;
133 switch-phy-swap = <0>;
134 };
135 };
136
137 &eth1 {
138 status = "okay";
139
140 compatible = "syscon", "simple-mfd";
141 };
142
143 &wmac {
144 status = "okay";
145
146 mtd-cal-data = <&art 0x1000>;
147 mtd-mac-address = <&art 0x2>;
148 };