ath79: AP105: use fixed layout cell "mac-base"
[openwrt/staging/nbd.git] / target / linux / ath79 / dts / ar7161_aruba_ap-105.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "ar7100.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "aruba,ap-105", "qca,ar7161";
10 model = "Aruba AP-105";
11
12 chosen {
13 bootargs = "console=ttyS0,9600";
14 };
15
16 aliases {
17 led-boot = &led_power_green;
18 led-failsafe = &led_power_red;
19 led-running = &led_power_green;
20 led-upgrade = &led_power_green;
21 label-mac-device = &eth0;
22 };
23
24 leds {
25 compatible = "gpio-leds";
26
27 led_power_green: power_green {
28 label = "green:power";
29 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
30 };
31
32 led_power_red: power_red {
33 label = "red:power";
34 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
35 panic-indicator;
36 };
37
38 wifi_2g_red {
39 label = "red:wlan2g";
40 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
41 };
42
43 wifi_5g_red {
44 label = "red:wlan5g";
45 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
46 };
47 };
48
49 ath9k-leds {
50 compatible = "gpio-leds";
51
52 wifi_2g_green {
53 label = "green:wlan2g";
54 gpios = <&ath9k0 5 GPIO_ACTIVE_LOW>;
55 linux,default-trigger = "phy0tpt";
56 };
57
58 wifi_5g_green {
59 label = "green:wlan5g";
60 gpios = <&ath9k1 5 GPIO_ACTIVE_LOW>;
61 linux,default-trigger = "phy1tpt";
62 };
63 };
64
65 keys {
66 compatible = "gpio-keys";
67
68 reset {
69 label = "reset";
70 linux,code = <KEY_RESTART>;
71 gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
72 };
73 };
74
75 i2c {
76 compatible = "i2c-gpio";
77
78 sda-gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
79 scl-gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
80
81 #address-cells = <1>;
82 #size-cells = <0>;
83
84 tpm@29 {
85 compatible = "atmel,at97sc3203s";
86 reg = <0x29>;
87
88 /* triggering it, will also kill system */
89 reset-gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
90 };
91 };
92 };
93
94 &pcie0 {
95 status = "okay";
96
97 ath9k0: wifi@0,11 { /* 2.4 GHz */
98 compatible = "pci168c,0029";
99 nvmem-cells = <&macaddr_hwinfo_1c 1>;
100 nvmem-cell-names = "mac-address";
101 reg = <0x8800 0 0 0 0>;
102 #gpio-cells = <2>;
103 gpio-controller;
104 };
105
106 ath9k1: wifi@0,12 { /* 5 GHz */
107 compatible = "pci168c,0029";
108 nvmem-cells = <&macaddr_hwinfo_1c 2>;
109 nvmem-cell-names = "mac-address";
110 reg = <0x9000 0 0 0 0>;
111 #gpio-cells = <2>;
112 gpio-controller;
113 };
114 };
115
116 &mdio0 {
117 status = "okay";
118
119 phy0: ethernet-phy@0 {
120 reg = <0>;
121 };
122 };
123
124 &eth0 {
125 status = "okay";
126 nvmem-cells = <&macaddr_hwinfo_1c 0>;
127 nvmem-cell-names = "mac-address";
128
129 pll-data = <0x00110000 0x00001099 0x00991099>;
130
131 phy-mode = "rgmii";
132 phy-handle = <&phy0>;
133 };
134
135 &spi {
136 status = "okay";
137
138 flash@0 {
139 compatible = "jedec,spi-nor";
140 reg = <0>;
141 spi-max-frequency = <25000000>;
142
143 partitions {
144 compatible = "fixed-partitions";
145 #address-cells = <1>;
146 #size-cells = <1>;
147
148 partition@0 {
149 label = "u-boot";
150 reg = <0x000000 0x40000>;
151 read-only;
152 };
153
154 partition@40000 {
155 label = "firmware";
156 reg = <0x40000 0xfa0000>;
157 compatible = "denx,uimage";
158 };
159
160 hwinfo: partition@fe0000 {
161 reg = <0xfe0000 0x10000>;
162 compatible = "nvmem-cells";
163 label = "hwinfo";
164 read-only;
165
166 nvmem-layout {
167 compatible = "fixed-layout";
168 #address-cells = <1>;
169 #size-cells = <1>;
170
171 macaddr_hwinfo_1c: mac-address@1c {
172 compatible = "mac-base";
173 reg = <0x1c 0x6>;
174 #nvmem-cell-cells = <1>;
175 };
176 };
177 };
178
179 partition@ff0000 {
180 label = "u-boot-env";
181 reg = <0xff0000 0x10000>;
182 read-only;
183 };
184 };
185 };
186 };