fa000ab90c7ced443c8e0bd032375db8bed02472
[openwrt/staging/hauke.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 compatible = "nvmem-cells";
81 reg = <0x10000 0x10000>;
82 label = "bdinfo";
83 read-only;
84
85 nvmem-layout {
86 compatible = "fixed-layout";
87 #address-cells = <1>;
88 #size-cells = <1>;
89
90 macaddr_bdinfo_18a: macaddr@18a {
91 compatible = "mac-base";
92 reg = <0x18a 0x11>;
93 #nvmem-cell-cells = <1>;
94 };
95 };
96 };
97
98 firmware: partition@20000 {
99 compatible = "denx,uimage";
100 reg = <0x20000 0xfc0000>;
101 label = "firmware";
102 };
103
104 backup: partition@fe0000 {
105 reg = <0xfe0000 0x10000>;
106 label = "backup";
107 read-only;
108 };
109
110 art: partition@ff0000 {
111 reg = <0xff0000 0x10000>;
112 label = "art";
113 read-only;
114 };
115 };
116 };
117 };
118
119 &gpio {
120 status = "okay";
121 };
122
123 &uart {
124 status = "okay";
125 };
126
127 &usb {
128 status = "okay";
129 dr_mode = "host";
130 vbus-supply = <&reg_usb_vbus>;
131 };
132
133 &usb_phy {
134 status = "okay";
135 };
136
137 &eth0 {
138 status = "okay";
139
140 nvmem-cells = <&macaddr_bdinfo_18a 1>;
141 nvmem-cell-names = "mac-address";
142 };
143
144 &eth1 {
145 status = "okay";
146
147 nvmem-cells = <&macaddr_bdinfo_18a 0>;
148 nvmem-cell-names = "mac-address";
149 };
150
151 &wmac {
152 status = "okay";
153 mtd-cal-data = <&art 0x1000>;
154
155 nvmem-cells = <&macaddr_bdinfo_18a 2>;
156 nvmem-cell-names = "mac-address";
157 };