rockchip: add driver for hardware RNG
[openwrt/openwrt.git] / target / linux / ath79 / dts / qca9558_openmesh_mr.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 #include <dt-bindings/leds/common.h>
8
9 / {
10 chosen {
11 /delete-property/ bootargs;
12 };
13
14 aliases {
15 led-boot = &led_power_blue;
16 led-failsafe = &led_power_blue;
17 led-running = &led_power_blue;
18 led-upgrade = &led_power_blue;
19 label-mac-device = &eth0;
20 };
21
22 keys {
23 compatible = "gpio-keys";
24
25 reset {
26 label = "reset";
27 linux,code = <KEY_RESTART>;
28 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
29 };
30 };
31
32 leds {
33 compatible = "gpio-leds";
34
35 lan_blue {
36 function = LED_FUNCTION_LAN;
37 color = <LED_COLOR_ID_BLUE>;
38 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
39 };
40
41 led_wifi2g: wifi2g {
42 label = "blue:wifi2g";
43 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
44 };
45
46 status_green {
47 function = LED_FUNCTION_STATUS;
48 color = <LED_COLOR_ID_GREEN>;
49 gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
50 };
51
52 status_red {
53 function = LED_FUNCTION_STATUS;
54 color = <LED_COLOR_ID_RED>;
55 gpios = <&gpio 21 GPIO_ACTIVE_LOW>;
56 };
57
58 led_power_blue: power_blue {
59 function = LED_FUNCTION_POWER;
60 color = <LED_COLOR_ID_BLUE>;
61 gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
62 default-state = "on";
63 };
64
65 led_wifi5g: wifi5g {
66 label = "blue:wifi5g";
67 gpios = <&gpio 23 GPIO_ACTIVE_LOW>;
68 };
69 };
70
71 watchdog {
72 compatible = "linux,wdt-gpio";
73 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
74 hw_algo = "toggle";
75 /* hw_margin_ms is actually 300s but driver limits it to 60s */
76 hw_margin_ms = <60000>;
77 always-running;
78 };
79 };
80
81 &spi {
82 status = "okay";
83
84 flash@0 {
85 compatible = "jedec,spi-nor";
86 reg = <0>;
87 spi-max-frequency = <40000000>;
88
89 /* partitions are passed via bootloader */
90 partitions {
91 compatible = "fixed-partitions";
92 #address-cells = <1>;
93 #size-cells = <1>;
94
95 partition@0 {
96 label = "u-boot";
97 reg = <0x000000 0x040000>;
98 read-only;
99 };
100
101 partition@40000 {
102 label = "u-boot-env";
103 reg = <0x040000 0x010000>;
104 };
105
106 partition@50000 {
107 label = "custom";
108 reg = <0x050000 0x060000>;
109 read-only;
110 };
111
112 partition@b0000 {
113 label = "inactive";
114 reg = <0x0b0000 0x7a0000>;
115 };
116
117 partition@850000 {
118 label = "inactive2";
119 reg = <0x850000 0x7a0000>;
120 };
121
122 art: partition@ff0000 {
123 label = "ART";
124 reg = <0xff0000 0x010000>;
125 read-only;
126
127 nvmem-layout {
128 compatible = "fixed-layout";
129 #address-cells = <1>;
130 #size-cells = <1>;
131
132 macaddr_art_0: macaddr@0 {
133 compatible = "mac-base";
134 reg = <0x0 0x6>;
135 #nvmem-cell-cells = <1>;
136 };
137
138 cal_art_5000: calibration@5000 {
139 reg = <0x5000 0x844>;
140 };
141 };
142 };
143 };
144 };
145 };
146
147 &mdio0 {
148 status = "okay";
149
150 phy5: ethernet-phy@5 {
151 reg = <5>;
152 eee-broken-100tx;
153 eee-broken-1000t;
154 };
155 };
156
157 &eth0 {
158 status = "okay";
159
160 pll-data = <0x82000000 0x80000101 0x80001313>;
161
162 nvmem-cells = <&macaddr_art_0 0>;
163 nvmem-cell-names = "mac-address";
164
165 phy-mode = "rgmii-id";
166 phy-handle = <&phy5>;
167
168 gmac-config {
169 device = <&gmac>;
170 rgmii-enabled = <1>;
171 };
172 };
173
174 &wmac {
175 status = "okay";
176
177 mtd-cal-data = <&art 0x1000>;
178 nvmem-cells = <&macaddr_art_0 1>;
179 nvmem-cell-names = "mac-address";
180 };
181
182 &pcie0 {
183 status = "okay";
184
185 wifi@0,0 {
186 compatible = "qcom,ath10k";
187 reg = <0x0000 0 0 0 0>;
188 nvmem-cells = <&cal_art_5000>, <&macaddr_art_0 16>;
189 nvmem-cell-names = "calibration", "mac-address";
190 };
191 };