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