ath79: Define firmware partition format to all boards where applicable
[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                                 compatible = "denx,uimage";
113                                 label = "firmware";
114                                 reg = <0x070000 0x780000>;
115                         };
116
117                         partition@7f0000 {
118                                 label = "CONF";
119                                 reg = <0x7f0000 0x010000>;
120                                 read-only;
121                         };
122                 };
123         };
124 };
125
126 &eth0 {
127         status = "okay";
128
129         mtd-mac-address = <&art 0x1002>;
130
131         gmac-config {
132                 device = <&gmac>;
133
134                 switch-phy-addr-swap = <0>;
135                 switch-phy-swap = <0>;
136         };
137 };
138
139 &eth1 {
140         status = "okay";
141         compatible = "syscon", "simple-mfd";
142 };
143
144 &wmac {
145         status = "okay";
146         mtd-cal-data = <&art 0x1000>;
147         mtd-mac-address = <&art 0x2>;
148 };