3751374af679fb50f99189ecfa8225727c5c84ce
[openwrt/staging/jow.git] / target / linux / ath79 / dts / ar9331_hiwifi_hc6361.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 = "HiWiFi HC6361";
10 compatible = "hiwifi,hc6361", "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 11 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 1 GPIO_ACTIVE_LOW>;
37 default-state = "on";
38 };
39 wlan {
40 label = "blue:wlan";
41 gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
42 };
43 wan {
44 label = "blue:wan";
45 gpios = <&gpio 27 GPIO_ACTIVE_LOW>;
46 };
47 };
48
49 reg_usb_vbus: regulator {
50 compatible = "regulator-fixed";
51 regulator-name = "usb_vbus";
52 regulator-min-microvolt = <5000000>;
53 regulator-max-microvolt = <5000000>;
54 enable-active-high;
55 gpio = <&gpio 20 GPIO_ACTIVE_HIGH>;
56 };
57 };
58
59 &spi {
60 status = "okay";
61 num-cs = <1>;
62
63 flash@0 {
64 compatible = "jedec,spi-nor";
65 reg = <0>;
66 spi-max-frequency = <25000000>;
67
68 partitions {
69 compatible = "fixed-partitions";
70 #address-cells = <1>;
71 #size-cells = <1>;
72
73 uboot: partition@0 {
74 reg = <0x0 0x10000>;
75 label = "u-boot";
76 read-only;
77 };
78
79 bdinfo: partition@10000 {
80 reg = <0x10000 0x10000>;
81 label = "bdinfo";
82 read-only;
83
84 nvmem-layout {
85 compatible = "fixed-layout";
86 #address-cells = <1>;
87 #size-cells = <1>;
88
89 macaddr_bdinfo_18a: macaddr@18a {
90 compatible = "mac-base";
91 reg = <0x18a 0x11>;
92 #nvmem-cell-cells = <1>;
93 };
94 };
95 };
96
97 firmware: partition@20000 {
98 compatible = "denx,uimage";
99 reg = <0x20000 0xfc0000>;
100 label = "firmware";
101 };
102
103 backup: partition@fe0000 {
104 reg = <0xfe0000 0x10000>;
105 label = "backup";
106 read-only;
107 };
108
109 art: partition@ff0000 {
110 reg = <0xff0000 0x10000>;
111 label = "art";
112 read-only;
113 };
114 };
115 };
116 };
117
118 &gpio {
119 status = "okay";
120 };
121
122 &uart {
123 status = "okay";
124 };
125
126 &usb {
127 status = "okay";
128 dr_mode = "host";
129 vbus-supply = <&reg_usb_vbus>;
130 };
131
132 &usb_phy {
133 status = "okay";
134 };
135
136 &eth0 {
137 status = "okay";
138
139 nvmem-cells = <&macaddr_bdinfo_18a 1>;
140 nvmem-cell-names = "mac-address";
141 };
142
143 &eth1 {
144 status = "okay";
145
146 nvmem-cells = <&macaddr_bdinfo_18a 0>;
147 nvmem-cell-names = "mac-address";
148 };
149
150 &wmac {
151 status = "okay";
152 mtd-cal-data = <&art 0x1000>;
153
154 nvmem-cells = <&macaddr_bdinfo_18a 2>;
155 nvmem-cell-names = "mac-address";
156 };