ath79: enable gpio on ar933x by default
[openwrt/staging/chunkeey.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 &usb {
59 dr_mode = "host";
60 status = "okay";
61 };
62
63 &usb_phy {
64 status = "okay";
65 };
66
67 &spi {
68 status = "okay";
69
70 num-cs = <1>;
71
72 flash@0 {
73 compatible = "jedec,spi-nor";
74 spi-max-frequency = <50000000>;
75 reg = <0>;
76
77 partitions {
78 compatible = "fixed-partitions";
79 #address-cells = <1>;
80 #size-cells = <1>;
81
82 partition@0 {
83 label = "u-boot";
84 reg = <0x000000 0x040000>;
85 read-only;
86 };
87
88 partition@40000 {
89 label = "u-boot-env";
90 reg = <0x040000 0x010000>;
91 };
92
93 art: partition@50000 {
94 label = "art";
95 reg = <0x050000 0x010000>;
96 read-only;
97 };
98
99 partition@60000 {
100 label = "NVRAM";
101 reg = <0x060000 0x010000>;
102 read-only;
103 };
104
105 partition@70000 {
106 compatible = "denx,uimage";
107 label = "firmware";
108 reg = <0x070000 0x780000>;
109 };
110
111 partition@7f0000 {
112 label = "CONF";
113 reg = <0x7f0000 0x010000>;
114 read-only;
115 };
116 };
117 };
118 };
119
120 &eth0 {
121 status = "okay";
122
123 mtd-mac-address = <&art 0x1002>;
124
125 gmac-config {
126 device = <&gmac>;
127
128 switch-phy-addr-swap = <0>;
129 switch-phy-swap = <0>;
130 };
131 };
132
133 &eth1 {
134 status = "okay";
135
136 compatible = "syscon", "simple-mfd";
137 };
138
139 &wmac {
140 status = "okay";
141
142 mtd-cal-data = <&art 0x1000>;
143 mtd-mac-address = <&art 0x2>;
144 };