ath79: qca: convert to nvmem-layout
[openwrt/openwrt.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 nvmem-layout {
88 compatible = "fixed-layout";
89 #address-cells = <1>;
90 #size-cells = <1>;
91
92 macaddr_art_lan: macaddr@0 {
93 reg = <0x0 0x6>;
94 };
95
96 macaddr_art_wan: macaddr@6 {
97 reg = <0x6 0x6>;
98 };
99
100 calibration_art_wlan: calibration@1000 {
101 reg = <0x1000 0x440>;
102 };
103 };
104 };
105 };
106 };
107 };
108
109 &mdio0 {
110 status = "okay";
111
112 switch {
113 compatible = "qca,ar8327";
114 reg = <0>;
115
116 qca,ar8327-initvals = <
117 0x04 0x07600000 /* PORT0 PAD MODE CTRL */
118 0x58 0xffb7ffb7 /* LED_CTRL2 */
119 0x5c 0x03ffff00 /* LED_CTRL3 */
120 0x7c 0x0000007e /* PORT0_STATUS */
121 0x0c 0x00080080 /* PORT6 PAD MODE CTRL */
122 0x94 0x0000007e /* PORT6_STATUS */
123 >;
124 };
125 };
126
127 &eth0 {
128 status = "okay";
129
130 nvmem-cells = <&macaddr_art_wan>;
131 nvmem-cell-names = "mac-address";
132
133 pll-data = <0xae000000 0x80000101 0x80001313>;
134
135 fixed-link {
136 speed = <1000>;
137 full-duplex;
138 };
139
140 gmac_config: gmac-config {
141 device = <&gmac>;
142
143 rxdv-delay = <3>;
144 rxd-delay = <3>;
145 txen-delay = <0>;
146 txd-delay = <0>;
147 rgmii-enabled = <1>;
148 };
149 };
150
151 &eth1 {
152 status = "okay";
153
154 nvmem-cells = <&macaddr_art_lan>;
155 nvmem-cell-names = "mac-address";
156
157 pll-data = <0x03000101 0x00000101 0x00001313>;
158
159 fixed-link {
160 speed = <1000>;
161 full-duplex;
162 };
163 };
164
165 &wmac {
166 status = "okay";
167 nvmem-cells = <&calibration_art_wlan>;
168 nvmem-cell-names = "calibration";
169 };
170
171 &usb_phy0 {
172 status = "okay";
173 };
174
175 &usb0 {
176 status = "okay";
177 };
178
179 &usb_phy1 {
180 status = "okay";
181 };
182
183 &usb1 {
184 status = "okay";
185 };