ath79: add support for Pisen WMM003N (Cloud Easy Power)
[oweals/openwrt.git] / target / linux / ath79 / dts / ar9331_pisen_wmm003n.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 "ar9331.dtsi"
8
9 / {
10         model = "Pisen WMM003N";
11         compatible = "pisen,wmm003n", "qca,ar9331";
12
13         aliases {
14                 serial0 = &uart;
15                 led-status = &led_system;
16         };
17
18         gpio-keys-polled {
19                 compatible = "gpio-keys-polled";
20                 poll-interval = <20>;
21
22                 reset {
23                         label = "reset";
24                         linux,code = <KEY_RESTART>;
25                         gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
26                         debounce-interval = <60>;
27                 };
28         };
29
30         gpio-leds {
31                 compatible = "gpio-leds";
32
33                 led_system: system {
34                         label = "pisen:blue:system";
35                         gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
36                 };
37         };
38
39         reg_usb_vbus: reg_usb_vbus {
40                 compatible = "regulator-fixed";
41                 regulator-name = "usb_vbus";
42                 regulator-min-microvolt = <5000000>;
43                 regulator-max-microvolt = <5000000>;
44                 gpio = <&gpio 8 GPIO_ACTIVE_HIGH>;
45                 enable-active-high;
46         };
47
48 };
49
50 &spi {
51         status = "okay";
52         num-cs = <1>;
53
54         flash@0 {
55                 compatible = "jedec,spi-nor";
56                 reg = <0>;
57                 spi-max-frequency = <25000000>;
58
59                 partitions {
60                         compatible = "fixed-partitions";
61                         #address-cells = <1>;
62                         #size-cells = <1>;
63
64                         uboot: partition@0 {
65                                 reg = <0x0 0x20000>;
66                                 label = "u-boot";
67                                 read-only;
68                         };
69
70                         firmware: partition@20000 {
71                                 reg = <0x20000 0x7d0000>;
72                                 label = "firmware";
73                         };
74
75                         art: partition@7f0000 {
76                                 reg = <0x7f0000 0x10000>;
77                                 label = "art";
78                                 read-only;
79                         };
80                 };
81         };
82 };
83
84 &eth0 {
85         status = "okay";
86
87         mtd-mac-address = <&uboot 0x1fc00>;
88
89         gmac-config {
90                 device = <&gmac>;
91
92                 switch-phy-addr-swap = <0>;
93                 switch-phy-swap = <0>;
94         };
95 };
96
97 &eth1 {
98         status = "okay";
99         compatible = "syscon", "simple-mfd";
100 };
101
102 &gpio {
103         status = "okay";
104 };
105
106 &uart {
107         status = "okay";
108 };
109
110 &usb {
111         dr_mode = "host";
112         vbus-supply = <&reg_usb_vbus>;
113         status = "okay";
114 };
115
116 &usb_phy {
117         status = "okay";
118 };
119
120 &wmac {
121         status = "okay";
122         mtd-cal-data = <&art 0x1000>;
123         mtd-mac-address = <&uboot 0x1fc00>;
124 };