ath79: create common DTSI for Senao ar934x APs
[openwrt/openwrt.git] / target / linux / ath79 / dts / ar9331_hak5_wifi-pineapple-nano.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "ar9331.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 model = "Hak5 WiFi Pineapple NANO";
10 compatible = "hak5,wifi-pineapple-nano", "qca,ar9331";
11
12 aliases {
13 label-mac-device = &wmac;
14 led-boot = &led_system;
15 led-failsafe = &led_system;
16 led-upgrade = &led_system;
17 };
18
19 gpio-export {
20 compatible = "gpio-export";
21 #size-cells = <0>;
22
23 microsd-detect {
24 gpio-export,name = "microsd-detect";
25 gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
26 };
27
28 usb-alarm {
29 gpio-export,name = "usb-alarm";
30 gpios = <&gpio 20 GPIO_ACTIVE_LOW>;
31 };
32
33 usb-power {
34 gpio-export,name = "usb-power";
35 gpio-export,output = <0>;
36 gpios = <&gpio 23 GPIO_ACTIVE_LOW>;
37 };
38 };
39
40 keys {
41 compatible = "gpio-keys";
42
43 reset {
44 label = "reset";
45 linux,code = <KEY_RESTART>;
46 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
47 debounce-interval = <60>;
48 };
49 };
50
51 leds {
52 compatible = "gpio-leds";
53
54 led_system: system {
55 label = "blue:system";
56 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
57 linux,default-trigger = "phy0tpt";
58 };
59 };
60 };
61
62 &eth0 {
63 status = "okay";
64
65 mtd-mac-address = <&art 0x6>;
66 };
67
68 &eth1 {
69 status = "okay";
70
71 compatible = "syscon", "simple-mfd";
72 };
73
74 &spi {
75 status = "okay";
76
77 flash@0 {
78 compatible = "jedec,spi-nor";
79 reg = <0>;
80 spi-max-frequency = <50000000>;
81 m25p,fast-read;
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 0x020000>;
91 read-only;
92 };
93
94 partition@20000 {
95 label = "firmware";
96 reg = <0x020000 0xfd0000>;
97 compatible = "tplink,firmware";
98 };
99
100 art: partition@ff0000 {
101 label = "art";
102 reg = <0xff0000 0x010000>;
103 read-only;
104 };
105 };
106 };
107 };
108
109 &usb {
110 status = "okay";
111 };
112
113 &usb_phy {
114 status = "okay";
115 };
116
117 &wmac {
118 status = "okay";
119
120 mtd-cal-data = <&art 0x1000>;
121 };