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