ath79: add Embedded Wireless Balin Platform
[openwrt/openwrt.git] / target / linux / ath79 / dts / qca9557_dongwon_dw02-412h.dtsi
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "qca955x.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 aliases {
10 led-boot = &led_wan;
11 led-failsafe = &led_wan;
12 led-upgrade = &led_wan;
13 };
14
15 keys {
16 compatible = "gpio-keys";
17
18 wps {
19 label = "WPS button";
20 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
21 linux,code = <KEY_WPS_BUTTON>;
22 };
23
24 reset {
25 label = "Reset button";
26 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
27 linux,code = <KEY_RESTART>;
28 };
29 };
30
31 leds {
32 compatible = "gpio-leds";
33
34 led_wan: wan {
35 label = "green:wan";
36 gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
37 };
38
39 wlan {
40 label = "green:wlan";
41 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
42 };
43 };
44 };
45
46 &spi {
47 status = "okay";
48
49 flash@0 {
50 compatible = "jedec,spi-nor";
51 reg = <0>;
52 spi-max-frequency = <50000000>;
53
54 partitions {
55 compatible = "fixed-partitions";
56 #address-cells = <1>;
57 #size-cells = <1>;
58
59 partition@0 {
60 label = "u-boot";
61 reg = <0x000000 0x040000>;
62 read-only;
63 };
64
65 partition@40000 {
66 label = "u-boot-env";
67 reg = <0x040000 0x010000>;
68 };
69
70 partition@50000 {
71 label = "log";
72 reg = <0x050000 0x010000>;
73 read-only;
74 };
75
76 partition@60000 {
77 label = "recoverk";
78 reg = <0x060000 0x0e0000>;
79 read-only;
80 };
81
82 partition@140000 {
83 label = "recoverr";
84 reg = <0x140000 0x090000>;
85 read-only;
86 };
87
88 partition@1d0000 {
89 label = "nvram";
90 reg = <0x1d0000 0x010000>;
91 read-only;
92 };
93
94 partition@1e0000 {
95 label = "nvbackup";
96 reg = <0x1e0000 0x010000>;
97 read-only;
98 };
99
100 art: partition@1f0000 {
101 label = "art";
102 reg = <0x1f0000 0x010000>;
103 read-only;
104 };
105 };
106 };
107 };
108
109 &pcie0 {
110 status = "okay";
111
112 wifi@0,0 {
113 compatible = "qcom,ath10k";
114 reg = <0 0 0 0 0>;
115 };
116 };
117
118 &wmac {
119 status = "okay";
120
121 mtd-cal-data = <&art 0x1000>;
122 nvmem-cells = <&macaddr_art_0>;
123 nvmem-cell-names = "mac-address";
124 mac-address-increment = <3>;
125 };
126
127 &usb_phy0 {
128 status = "okay";
129 };
130
131 &usb0 {
132 status = "okay";
133 };
134
135 &mdio0 {
136 status = "okay";
137
138 phy0: ethernet-phy@0 {
139 reg = <0>;
140
141 qca,ar8327-initvals = <
142 0x04 0x07600000 /* PORT0 PAD MODE CTRL */
143 0x50 0xcf37cf37 /* LED Control Register 0 */
144 0x54 0x00000000 /* LED Control Register 1 */
145 0x58 0x00000000 /* LED Control Register 2 */
146 0x5c 0x0030c300 /* LED Control Register 3 */
147 0x7c 0x0000007e /* PORT0_STATUS */
148 >;
149 };
150 };
151
152 &eth0 {
153 status = "okay";
154
155 nvmem-cells = <&macaddr_art_0>;
156 nvmem-cell-names = "mac-address";
157 mac-address-increment = <1>;
158 phy-handle = <&phy0>;
159 pll-data = <0xa6000000 0x00000101 0x00001616>;
160
161 gmac-config {
162 device = <&gmac>;
163 rgmii-enabled = <1>;
164 };
165 };
166
167 &art {
168 compatible = "nvmem-cells";
169 #address-cells = <1>;
170 #size-cells = <1>;
171
172 macaddr_art_0: macaddr@0 {
173 reg = <0x0 0x6>;
174 };
175 };