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