7a19da82e36ee889b92446e512278d7a2f122e50
[openwrt/staging/hauke.git] / target / linux / ath79 / dts / ar7161_meraki_mr16.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 = "meraki,mr16", "qca,ar7161";
10 model = "Meraki MR16";
11
12 aliases {
13 led-boot = &led_power_orange;
14 led-failsafe = &led_power_orange;
15 led-running = &led_power_green;
16 led-upgrade = &led_power_orange;
17 };
18
19 leds {
20 compatible = "gpio-leds";
21
22 wifi1 {
23 label = "green:wifi1";
24 gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
25 };
26
27 wifi2 {
28 label = "green:wifi2";
29 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
30 };
31
32 wifi3 {
33 label = "green:wifi3";
34 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
35 };
36
37 wifi4 {
38 label = "green:wifi4";
39 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
40 };
41
42 wan {
43 label = "green:wan";
44 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
45 };
46
47 led_power_orange: power_orange {
48 label = "orange:power";
49 gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
50 panic-indicator;
51 };
52
53 led_power_green: power_green {
54 label = "green:power";
55 gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
56 };
57 };
58
59 keys {
60 compatible = "gpio-keys";
61
62 reset {
63 label = "reset";
64 linux,code = <KEY_RESTART>;
65 gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
66 };
67 };
68 };
69
70 &pcie0 {
71 status = "okay";
72
73 ath9k0: wifi@0,11 { /* 2.4 GHz */
74 compatible = "pci168c,0029";
75 reg = <0x8800 0 0 0 0>;
76 qca,no-eeprom;
77 nvmem-cells = <&macaddr_config_66>;
78 nvmem-cell-names = "mac-address";
79 mac-address-increment = <1>;
80 #gpio-cells = <2>;
81 gpio-controller;
82 };
83
84 ath9k1: wifi@0,12 { /* 5 GHz */
85 compatible = "pci168c,0029";
86 reg = <0x9000 0 0 0 0>;
87 qca,no-eeprom;
88 nvmem-cells = <&macaddr_config_66>;
89 nvmem-cell-names = "mac-address";
90 mac-address-increment = <2>;
91 #gpio-cells = <2>;
92 gpio-controller;
93 };
94 };
95
96 &mdio0 {
97 status = "okay";
98
99 phy0: ethernet-phy@0 {
100 reg = <0>;
101 };
102 };
103
104 &eth0 {
105 status = "okay";
106 nvmem-cells = <&macaddr_config_66>;
107 nvmem-cell-names = "mac-address";
108
109 pll-data = <0x00110000 0x00001099 0x00991099>;
110
111 phy-mode = "rgmii";
112 phy-handle = <&phy0>;
113 };
114
115 &spi {
116 status = "okay";
117
118 flash@0 {
119 compatible = "jedec,spi-nor";
120 reg = <0>;
121 spi-max-frequency = <25000000>;
122
123 partitions {
124 compatible = "fixed-partitions";
125 #address-cells = <1>;
126 #size-cells = <1>;
127
128 partition@0 {
129 label = "u-boot";
130 reg = <0x000000 0x40000>;
131 read-only;
132 };
133
134 partition@40000 {
135 label = "u-boot-env";
136 reg = <0x40000 0x40000>;
137 read-only;
138 };
139
140 config: partition@80000 {
141 label = "config";
142 reg = <0x80000 0x20000>;
143 read-only;
144 };
145
146 partition@a0000 {
147 label = "firmware";
148 reg = <0xa0000 0xf40000>;
149 compatible = "denx,uimage";
150 };
151
152 partition@fe0000 {
153 label = "art";
154 reg = <0xfe0000 0x20000>;
155 read-only;
156 };
157 };
158 };
159 };
160
161 &config {
162 compatible = "nvmem-cells";
163 #address-cells = <1>;
164 #size-cells = <1>;
165
166 macaddr_config_66: macaddr@66 {
167 reg = <0x66 0x6>;
168 };
169 };