ath79: Add support for OpenMesh OM2P v4
[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 = "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
53 flash@0 {
54 compatible = "jedec,spi-nor";
55 reg = <0>;
56 spi-max-frequency = <25000000>;
57
58 partitions {
59 compatible = "fixed-partitions";
60 #address-cells = <1>;
61 #size-cells = <1>;
62
63 uboot: partition@0 {
64 reg = <0x0 0x20000>;
65 label = "u-boot";
66 read-only;
67 };
68
69 firmware: partition@20000 {
70 compatible = "tplink,firmware";
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 &uart {
103 status = "okay";
104 };
105
106 &usb {
107 dr_mode = "host";
108 vbus-supply = <&reg_usb_vbus>;
109 status = "okay";
110 };
111
112 &usb_phy {
113 status = "okay";
114 };
115
116 &wmac {
117 status = "okay";
118 mtd-cal-data = <&art 0x1000>;
119 mtd-mac-address = <&uboot 0x1fc00>;
120 };