ath79: add Cisco Meraki Z1
[openwrt/staging/chunkeey.git] / target / linux / ath79 / dts / ar9344_meraki_z1.dts
1 // SPDX-License-Identifier: GPL-2.0-only
2
3 #include "ar9344.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "meraki,z1", "qca,ar9344";
10 model = "Cisco Meraki Z1";
11
12 aliases {
13 led-boot = &led_power_orange;
14 led-failsafe = &led_power_orange;
15 led-upgrade = &led_power_orange;
16 label-mac-device = &eth0;
17 };
18
19 chosen {
20 bootargs = "console=ttyS0,115200n8";
21 };
22
23 keys {
24 compatible = "gpio-keys";
25
26 reset {
27 label = "Reset button";
28 linux,code = <KEY_RESTART>;
29 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
30 debounce-interval = <60>;
31 };
32 };
33
34 leds {
35 compatible = "gpio-leds";
36
37 led_power_orange: power_orange {
38 label = "orange:power";
39 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
40 };
41 };
42 };
43
44 &ref {
45 clock-frequency = <40000000>;
46 };
47
48 &gpio {
49 pinctrl-names = "default";
50 pinctrl-0 = <&jtag_disable_pins>;
51
52 gpio_ext_lna0 {
53 gpio-hog;
54 gpios = <18 0>;
55 output-low;
56 line-name = "z1:ext:lna0";
57 };
58
59 gpio_ext_lna1 {
60 gpio-hog;
61 gpios = <19 0>;
62 output-low;
63 line-name = "z1:ext:lna1";
64 };
65 };
66
67 &usb {
68 status = "okay";
69 };
70
71 &usb_phy {
72 status = "okay";
73 };
74
75 &pcie {
76 status = "okay";
77
78 ath9k: wifi@0,0 {
79 compatible = "pci168c,002a"; /* check the pciid - AR9283 */
80 reg = <0x0000 0 0 0 0>;
81 qca,no-eeprom;
82 };
83 };
84
85 &wmac {
86 status = "okay";
87 };
88
89 &nand {
90 status = "okay";
91
92 partitions {
93 compatible = "fixed-partitions";
94 #address-cells = <1>;
95 #size-cells = <1>;
96
97 partition@0 {
98 label = "loader1";
99 reg = <0x0 0x20000>;
100 read-only;
101 };
102
103 partition@20000 {
104 label = "kernel";
105 reg = <0x20000 0x7e0000>;
106 };
107
108 partition@800000 {
109 label = "loader2";
110 reg = <0x800000 0x20000>;
111 read-only;
112 };
113
114 partition@820000 {
115 label = "recovery";
116 reg = <0x820000 0x7e0000>;
117 };
118
119 partition@1000000 {
120 label = "ubi";
121 reg = <0x1000000 0x6fe0000>;
122 };
123
124 partition@7fe0000 {
125 label = "origcaldata";
126 reg = <0x7fe0000 0x20000>;
127 read-only;
128 };
129 };
130 };
131
132 &mdio0 {
133 status = "okay";
134
135 phy0: ethernet-phy@0 {
136 reg = <0>;
137
138 #if 0
139 /* dummy values */
140 qca,ar8327-initvals = <
141 0x04 0x87600000 /* PORT0 PAD MODE CTRL */
142 0x7c 0x0000007e /* PORT0_STATUS */
143 >;
144 #endif
145 };
146 };
147
148 &eth0 {
149 status = "okay";
150
151 pll-data = <0x06000000 0x00000101 0x00001313>;
152 phy-mode = "rgmii-id";
153
154 fixed-link {
155 speed = <1000>;
156 full-duplex;
157 };
158
159 gmac-config {
160 device = <&gmac>;
161 rgmii-gmac0 = <1>;
162 switch-only-mode = <1>;
163 };
164 };