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