812b5b0ec7e5f6ce2e3d1bf2b8b3ec7449df55ae
[openwrt/openwrt.git] / target / linux / ath79 / dts / ar9331_pisen_wmm003n.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "ar9331.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 model = "Pisen WMM003N";
10 compatible = "pisen,wmm003n", "qca,ar9331";
11
12 aliases {
13 serial0 = &uart;
14 led-boot = &led_system;
15 led-failsafe = &led_system;
16 led-running = &led_system;
17 led-upgrade = &led_system;
18 };
19
20 keys {
21 compatible = "gpio-keys";
22
23 reset {
24 label = "reset";
25 linux,code = <KEY_RESTART>;
26 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
27 debounce-interval = <60>;
28 };
29 };
30
31 leds {
32 compatible = "gpio-leds";
33
34 led_system: system {
35 label = "pisen:blue:system";
36 gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
37 };
38 };
39
40 reg_usb_vbus: reg_usb_vbus {
41 compatible = "regulator-fixed";
42 regulator-name = "usb_vbus";
43 regulator-min-microvolt = <5000000>;
44 regulator-max-microvolt = <5000000>;
45 gpio = <&gpio 8 GPIO_ACTIVE_HIGH>;
46 enable-active-high;
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 compatible = "tplink,firmware";
72 reg = <0x20000 0x7d0000>;
73 label = "firmware";
74 };
75
76 art: partition@7f0000 {
77 reg = <0x7f0000 0x10000>;
78 label = "art";
79 read-only;
80 };
81 };
82 };
83 };
84
85 &eth0 {
86 status = "okay";
87
88 mtd-mac-address = <&uboot 0x1fc00>;
89
90 gmac-config {
91 device = <&gmac>;
92
93 switch-phy-addr-swap = <0>;
94 switch-phy-swap = <0>;
95 };
96 };
97
98 &eth1 {
99 status = "okay";
100 compatible = "syscon", "simple-mfd";
101 };
102
103 &uart {
104 status = "okay";
105 };
106
107 &usb {
108 dr_mode = "host";
109 vbus-supply = <&reg_usb_vbus>;
110 status = "okay";
111 };
112
113 &usb_phy {
114 status = "okay";
115 };
116
117 &wmac {
118 status = "okay";
119 mtd-cal-data = <&art 0x1000>;
120 mtd-mac-address = <&uboot 0x1fc00>;
121 };