ath79: ar: convert to nvmem-layout
[openwrt/staging/hauke.git] / target / linux / ath79 / dts / ar9330_pqi_air-pen.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "ar9330.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 model = "PQI Air-Pen";
10 compatible = "pqi,air-pen", "qca,ar9330";
11
12 aliases {
13 led-boot = &led_wlan;
14 led-failsafe = &led_wlan;
15 led-upgrade = &led_wlan;
16 };
17
18 leds {
19 compatible = "gpio-leds";
20
21 led_wlan: wlan {
22 label = "blue:wlan";
23 gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
24 linux,default-trigger = "phy0tpt";
25 };
26
27 wps {
28 label = "blue:wps";
29 gpios = <&gpio 23 GPIO_ACTIVE_HIGH>;
30 };
31 };
32
33 keys {
34 compatible = "gpio-keys";
35
36 wps {
37 label = "wps";
38 linux,code = <KEY_WPS_BUTTON>;
39 gpios = <&gpio 22 GPIO_ACTIVE_HIGH>;
40 debounce-interval = <60>;
41 };
42
43 reset {
44 label = "reset";
45 linux,code = <KEY_RESTART>;
46 gpios = <&gpio 12 GPIO_ACTIVE_HIGH>;
47 debounce-interval = <60>;
48 };
49 };
50 };
51
52 &usb {
53 dr_mode = "host";
54 status = "okay";
55 };
56
57 &usb_phy {
58 status = "okay";
59 };
60
61 &spi {
62 status = "okay";
63
64 flash@0 {
65 compatible = "jedec,spi-nor";
66 spi-max-frequency = <50000000>;
67 reg = <0>;
68
69 partitions {
70 compatible = "fixed-partitions";
71 #address-cells = <1>;
72 #size-cells = <1>;
73
74 partition@0 {
75 label = "u-boot";
76 reg = <0x000000 0x040000>;
77 read-only;
78 };
79
80 partition@40000 {
81 label = "u-boot-env";
82 reg = <0x040000 0x010000>;
83 };
84
85 art: partition@50000 {
86 label = "art";
87 reg = <0x050000 0x010000>;
88 read-only;
89
90 nvmem-layout {
91 compatible = "fixed-layout";
92 #address-cells = <1>;
93 #size-cells = <1>;
94
95 macaddr_art_2: macaddr@2 {
96 reg = <0x2 0x6>;
97 };
98
99 macaddr_art_1002: macaddr@1002 {
100 reg = <0x1002 0x6>;
101 };
102 };
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 nvmem-cells = <&macaddr_art_1002>;
130 nvmem-cell-names = "mac-address";
131
132 gmac-config {
133 device = <&gmac>;
134
135 switch-phy-addr-swap = <0>;
136 switch-phy-swap = <0>;
137 };
138 };
139
140 &eth1 {
141 status = "okay";
142
143 compatible = "syscon", "simple-mfd";
144 };
145
146 &wmac {
147 status = "okay";
148
149 mtd-cal-data = <&art 0x1000>;
150 nvmem-cells = <&macaddr_art_2>;
151 nvmem-cell-names = "mac-address";
152 };