dfd7e18d819f0ec73cdfa2a6da687ba68e914baf
[openwrt/staging/hauke.git] / target / linux / ath79 / dts / qca9533_plasmacloud_pa300.dtsi
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "qca953x.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 chosen {
10 /delete-property/ bootargs;
11 };
12
13 aliases {
14 led-boot = &led_status_green;
15 led-failsafe = &led_status_green;
16 led-running = &led_status_green;
17 led-upgrade = &led_status_green;
18 label-mac-device = &eth0;
19 };
20
21 keys {
22 compatible = "gpio-keys";
23
24 pinctrl-names = "default";
25
26 reset {
27 label = "reset";
28 linux,code = <KEY_RESTART>;
29 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
30 };
31 };
32
33 leds {
34 compatible = "gpio-leds";
35
36 status_red {
37 label = "red:status";
38 gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
39 };
40
41 led_status_green: status_green {
42 label = "green:status";
43 gpios = <&gpio 2 GPIO_ACTIVE_HIGH>;
44 };
45
46 status_blue {
47 label = "blue:status";
48 gpios = <&gpio 3 GPIO_ACTIVE_HIGH>;
49 };
50 };
51
52 watchdog {
53 compatible = "linux,wdt-gpio";
54 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
55 hw_algo = "toggle";
56 /* hw_margin_ms is actually 300s but driver limits it to 60s */
57 hw_margin_ms = <60000>;
58 always-running;
59 };
60 };
61
62 &spi {
63 status = "okay";
64
65 flash@0 {
66 compatible = "jedec,spi-nor";
67 reg = <0>;
68 spi-max-frequency = <25000000>;
69
70 /* partitions are passed via bootloader */
71 partitions {
72 compatible = "fixed-partitions";
73 #address-cells = <1>;
74 #size-cells = <1>;
75
76 partition@0 {
77 label = "u-boot";
78 reg = <0x000000 0x040000>;
79 read-only;
80 };
81
82 partition@40000 {
83 label = "u-boot-env";
84 reg = <0x040000 0x040000>;
85 };
86
87 partition@80000 {
88 label = "custom";
89 reg = <0x080000 0x140000>;
90 read-only;
91 };
92
93 partition@1c0000 {
94 label = "inactive";
95 reg = <0x1c0000 0x700000>;
96 };
97
98 partition@8c0000 {
99 label = "inactive2";
100 reg = <0x8c0000 0x700000>;
101 };
102
103 art: partition@fc0000 {
104 label = "ART";
105 reg = <0xfc0000 0x040000>;
106 read-only;
107
108 nvmem-layout {
109 compatible = "fixed-layout";
110 #address-cells = <1>;
111 #size-cells = <1>;
112
113 macaddr_art_0: macaddr@0 {
114 reg = <0x0 0x6>;
115 };
116 };
117 };
118 };
119 };
120 };
121
122 &eth0 {
123 status = "okay";
124
125 phy-handle = <&swphy4>;
126
127 nvmem-cells = <&macaddr_art_0>;
128 nvmem-cell-names = "mac-address";
129 };
130
131 &eth1 {
132 /* Workaround: keep the Ethernet interfaces order/mapping correct
133 * (GMAC0 -> eth0, GMAC1 -> eth1, same as in old ar71xx target)
134 */
135 compatible = "qca,qca9530-eth", "syscon", "simple-mfd";
136
137 nvmem-cells = <&macaddr_art_0>;
138 nvmem-cell-names = "mac-address";
139 mac-address-increment = <1>;
140 };
141
142 &wmac {
143 status = "okay";
144
145 mtd-cal-data = <&art 0x1000>;
146 nvmem-cells = <&macaddr_art_0>;
147 nvmem-cell-names = "mac-address";
148 mac-address-increment = <2>;
149 };