mediatek: fix PWM fan on BPi-R4
[openwrt/openwrt.git] / target / linux / ath79 / dts / ar9344_zbtlink_zbt-wd323.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2 /dts-v1/;
3
4 #include <dt-bindings/gpio/gpio.h>
5 #include <dt-bindings/input/input.h>
6
7 #include "ar9344.dtsi"
8
9 / {
10 model = "ZBT WD323";
11 compatible = "zbtlink,zbt-wd323", "qca,ar9344";
12
13 keys {
14 compatible = "gpio-keys";
15
16 reset {
17 label = "reset";
18 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
19 linux,code = <KEY_RESTART>;
20 };
21 };
22
23 i2c {
24 compatible = "i2c-gpio";
25 #address-cells = <1>;
26 #size-cells = <0>;
27
28 pinctrl-names = "default";
29 pinctrl-0 = <&enable_gpio15 &enable_gpio19>;
30
31 sda-gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
32 scl-gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
33
34 /* can be removed on 4.19 */
35 gpios = <&gpio 19 GPIO_ACTIVE_LOW>,
36 <&gpio 15 GPIO_ACTIVE_LOW>;
37
38 pcf8563: pcf8563@51 {
39 compatible = "nxp,pcf8563";
40 reg = <0x51>;
41 #clock-cells = <0>;
42 };
43 };
44
45 leds {
46 compatible = "gpio-leds";
47
48 pinctrl-names = "default";
49 pinctrl-0 = <&enable_gpio20_gpio22>;
50
51 wifi {
52 label = "zbt-wd323:green:wifi";
53 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
54 linux,default-trigger = "phy0tpt";
55 };
56
57 lan1 {
58 label = "zbt-wd323:orange:lan1";
59 gpios = <&gpio 20 GPIO_ACTIVE_LOW>;
60 };
61
62 lan2 {
63 label = "zbt-wd323:orange:lan2";
64 gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
65 };
66 };
67 };
68
69 &wdt {
70 status = "okay";
71
72 pinctrl-names = "default";
73 pinctrl-0 = <&enable_gpio21>;
74 };
75
76 &uart {
77 status = "okay";
78 };
79
80 &gpio {
81 pinctrl-names = "default";
82 pinctrl-0 = <&jtag_disable_pins>;
83 };
84
85 &usb {
86 status = "okay";
87 };
88
89 &usb_phy {
90 status = "okay";
91 };
92
93 &eth0 {
94 status = "okay";
95 phy-handle = <&swphy4>;
96 mtd-mac-address = <&art 0x0>;
97 };
98
99 &eth1 {
100 status = "okay";
101 mtd-mac-address = <&art 0x6>;
102 };
103
104 &spi {
105 num-chipselects = <1>;
106 status = "okay";
107
108 flash@0 {
109 compatible = "jedec,spi-nor";
110 spi-max-frequency = <22000000>;
111 reg = <0>;
112
113 partitions {
114 compatible = "fixed-partitions";
115 #address-cells = <1>;
116 #size-cells = <1>;
117
118 uboot@0 {
119 reg = <0x0 0x40000>;
120 read-only;
121 };
122
123 uboot-env@40000 {
124 reg = <0x40000 0x10000>;
125 read-only;
126 };
127
128 firmware@50000 {
129 compatible = "denx,uimage";
130 reg = <0x50000 0xfa0000>;
131 };
132
133 art: art@ff0000 {
134 reg = <0xff0000 0x10000>;
135 read-only;
136 };
137 };
138 };
139 };
140
141 &wmac {
142 status = "okay";
143 mtd-cal-data = <&art 0x1000>;
144 };
145
146 &pinmux {
147 enable_gpio15: pinmux_enable_gpio15 {
148 pinctrl-single,bits = <0xc 0x0 0xff000000>;
149 };
150
151 enable_gpio19: pinmux_enable_gpio19 {
152 pinctrl-single,bits = <0x10 0x0 0xff000000>;
153 };
154
155 enable_gpio20_gpio22: pinmux_enable_gpio20_gpio22 {
156 pinctrl-single,bits = <0x14 0x0 0xff00ff>;
157 };
158
159 enable_gpio21: pinmux_enable_gpio21 {
160 pinctrl-single,bits = <0x14 0x0 0xff00>;
161 };
162 };