ath79: use gpios for switch management in WZR-HP-G300NH variants
[openwrt/openwrt.git] / target / linux / ath79 / dts / qca9531_8dev_lima.dts
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 compatible = "8dev,lima", "qca,qca9531";
10 model = "8devices Lima";
11
12 keys {
13 compatible = "gpio-keys";
14
15 reset {
16 label = "reset";
17 linux,code = <KEY_RESTART>;
18 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
19 };
20 };
21 };
22
23 &pcie0 {
24 status = "okay";
25 };
26
27 &usb0 {
28 status = "okay";
29
30 dr_mode = "host";
31 };
32
33 &usb_phy {
34 status = "okay";
35 };
36
37 &wdt {
38 status = "okay";
39 };
40
41 &spi {
42 status = "okay";
43
44 /* Winbond W25Q256 SPI flash */
45 flash@0 {
46 compatible = "jedec,spi-nor";
47 reg = <0>;
48 spi-max-frequency = <45000000>;
49
50 partitions {
51 compatible = "fixed-partitions";
52 #address-cells = <1>;
53 #size-cells = <1>;
54
55 partition@0 {
56 label = "u-boot";
57 reg = <0x000000 0x040000>;
58 read-only;
59 };
60
61 partition@40000 {
62 label = "u-boot-env";
63 reg = <0x040000 0x040000>;
64 };
65
66 art: partition@80000 {
67 label = "art";
68 reg = <0x080000 0x040000>;
69 read-only;
70 };
71
72 partition@c0000 {
73 compatible = "denx,uimage";
74 label = "firmware";
75 reg = <0x0c0000 0xf40000>;
76 };
77 };
78 };
79 };
80
81 &mdio0 {
82 status = "okay";
83 };
84
85 &eth0 {
86 status = "okay";
87
88 phy-handle = <&swphy0>;
89
90 nvmem-cells = <&macaddr_art_6>;
91 nvmem-cell-names = "mac-address";
92
93 gmac-config {
94 device = <&gmac>;
95
96 switch-phy-addr-swap = <1>;
97 switch-phy-swap = <1>;
98 };
99 };
100
101 &eth1 {
102 nvmem-cells = <&macaddr_art_0>;
103 nvmem-cell-names = "mac-address";
104 };
105
106 &wmac {
107 status = "okay";
108
109 mtd-cal-data = <&art 0x1000>;
110 };
111
112 &art {
113 compatible = "nvmem-cells";
114 #address-cells = <1>;
115 #size-cells = <1>;
116
117 macaddr_art_0: macaddr@0 {
118 reg = <0x0 0x6>;
119 };
120
121 macaddr_art_6: macaddr@6 {
122 reg = <0x6 0x6>;
123 };
124 };