159013066f62963c24df6c6e76dd64781ace4d36
[openwrt/staging/hauke.git] / target / linux / ath79 / dts / qca9558_jjplus_jwap230.dts
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 #include <dt-bindings/leds/common.h>
8
9 / {
10 model = "jjPlus JWAP230";
11 compatible = "jjplus,jwap230", "qca,qca9558";
12
13 aliases {
14 led-boot = &led_power;
15 led-failsafe = &led_power;
16 led-running = &led_power;
17 led-upgrade = &led_power;
18 };
19
20 leds {
21 compatible = "gpio-leds";
22
23 led_power: led-0 {
24 label = "green:power";
25 color = <LED_COLOR_ID_GREEN>;
26 function = LED_FUNCTION_POWER;
27 gpios = <&gpio 23 GPIO_ACTIVE_LOW>;
28 };
29
30 led-1 {
31 color = <LED_COLOR_ID_GREEN>;
32 function-enumerator = <0>;
33 gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
34 };
35
36 led-2 {
37 color = <LED_COLOR_ID_GREEN>;
38 function-enumerator = <1>;
39 gpios = <&gpio 21 GPIO_ACTIVE_LOW>;
40 };
41 };
42 };
43
44 &pcie0 {
45 status = "okay";
46 };
47
48 &pcie1 {
49 status = "okay";
50 };
51
52 &spi {
53 status = "okay";
54
55 flash@0 {
56 compatible = "jedec,spi-nor";
57 reg = <0>;
58 spi-max-frequency = <25000000>;
59
60 partitions {
61 compatible = "fixed-partitions";
62 #address-cells = <1>;
63 #size-cells = <1>;
64
65 partition@0 {
66 label = "u-boot";
67 reg = <0x000000 0x040000>;
68 read-only;
69 };
70
71 partition@40000 {
72 label = "u-boot-env";
73 reg = <0x040000 0x010000>;
74 };
75
76 partition@50000 {
77 compatible = "denx,uimage";
78 label = "firmware";
79 reg = <0x050000 0xfa0000>;
80 };
81
82 art: partition@ff0000 {
83 label = "art";
84 reg = <0xff0000 0x010000>;
85 read-only;
86
87 compatible = "nvmem-cells";
88 #address-cells = <1>;
89 #size-cells = <1>;
90
91 macaddr_art_lan: macaddr@0 {
92 reg = <0x0 0x6>;
93 };
94
95 macaddr_art_wan: macaddr@6 {
96 reg = <0x6 0x6>;
97 };
98
99 calibration_art_wlan: calibration@1000 {
100 reg = <0x1000 0x440>;
101 };
102 };
103 };
104 };
105 };
106
107 &mdio0 {
108 status = "okay";
109
110 switch {
111 compatible = "qca,ar8327";
112 reg = <0>;
113
114 qca,ar8327-initvals = <
115 0x04 0x07600000 /* PORT0 PAD MODE CTRL */
116 0x58 0xffb7ffb7 /* LED_CTRL2 */
117 0x5c 0x03ffff00 /* LED_CTRL3 */
118 0x7c 0x0000007e /* PORT0_STATUS */
119 0x0c 0x00080080 /* PORT6 PAD MODE CTRL */
120 0x94 0x0000007e /* PORT6_STATUS */
121 >;
122 };
123 };
124
125 &eth0 {
126 status = "okay";
127
128 nvmem-cells = <&macaddr_art_wan>;
129 nvmem-cell-names = "mac-address";
130
131 pll-data = <0xae000000 0x80000101 0x80001313>;
132
133 fixed-link {
134 speed = <1000>;
135 full-duplex;
136 };
137
138 gmac_config: gmac-config {
139 device = <&gmac>;
140
141 rxdv-delay = <3>;
142 rxd-delay = <3>;
143 txen-delay = <0>;
144 txd-delay = <0>;
145 rgmii-enabled = <1>;
146 };
147 };
148
149 &eth1 {
150 status = "okay";
151
152 nvmem-cells = <&macaddr_art_lan>;
153 nvmem-cell-names = "mac-address";
154
155 pll-data = <0x03000101 0x00000101 0x00001313>;
156
157 fixed-link {
158 speed = <1000>;
159 full-duplex;
160 };
161 };
162
163 &wmac {
164 status = "okay";
165 nvmem-cells = <&calibration_art_wlan>;
166 nvmem-cell-names = "calibration";
167 };
168
169 &usb_phy0 {
170 status = "okay";
171 };
172
173 &usb0 {
174 status = "okay";
175 };
176
177 &usb_phy1 {
178 status = "okay";
179 };
180
181 &usb1 {
182 status = "okay";
183 };