f438567e52c83f869561a1ae012079fdba89bd04
[openwrt/staging/hauke.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 led-boot = &led_system;
14 led-failsafe = &led_system;
15 led-running = &led_system;
16 led-upgrade = &led_system;
17 };
18
19 keys {
20 compatible = "gpio-keys";
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 leds {
31 compatible = "gpio-leds";
32
33 led_system: system {
34 label = "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 &spi {
50 status = "okay";
51
52 flash@0 {
53 compatible = "jedec,spi-nor";
54 reg = <0>;
55 spi-max-frequency = <25000000>;
56
57 partitions {
58 compatible = "fixed-partitions";
59 #address-cells = <1>;
60 #size-cells = <1>;
61
62 uboot: partition@0 {
63 reg = <0x0 0x20000>;
64 label = "u-boot";
65 read-only;
66 };
67
68 firmware: partition@20000 {
69 compatible = "tplink,firmware";
70 reg = <0x20000 0x7d0000>;
71 label = "firmware";
72 };
73
74 art: partition@7f0000 {
75 reg = <0x7f0000 0x10000>;
76 label = "art";
77 read-only;
78 };
79 };
80 };
81 };
82
83 &eth0 {
84 status = "okay";
85
86 nvmem-cells = <&macaddr_uboot_1fc00>;
87 nvmem-cell-names = "mac-address";
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 &usb {
103 dr_mode = "host";
104 vbus-supply = <&reg_usb_vbus>;
105 status = "okay";
106 };
107
108 &usb_phy {
109 status = "okay";
110 };
111
112 &wmac {
113 status = "okay";
114 mtd-cal-data = <&art 0x1000>;
115 nvmem-cells = <&macaddr_uboot_1fc00>;
116 nvmem-cell-names = "mac-address";
117 };
118
119 &uboot {
120 compatible = "nvmem-cells";
121 #address-cells = <1>;
122 #size-cells = <1>;
123
124 macaddr_uboot_1fc00: macaddr@1fc00 {
125 reg = <0x1fc00 0x6>;
126 };
127 };