e4a4cce8167111ae515e21dab1da045ad9ad40f6
[openwrt/openwrt.git] / target / linux / ramips / dts / HC5861B.dts
1 /dts-v1/;
2
3 #include "mt7628an.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "hiwifi,hc5861b", "mediatek,mt7628an-soc";
10 model = "HiWiFi HC5861B";
11
12 aliases {
13 led-status = &led_system;
14 };
15
16 chosen {
17 bootargs = "console=ttyS0,115200";
18 };
19
20 memory@0 {
21 device_type = "memory";
22 reg = <0x0 0x8000000>;
23 };
24
25 gpio-leds {
26 compatible = "gpio-leds";
27
28 led_system: system {
29 label = "hc5861b:green:system";
30 gpios = <&gpio1 5 GPIO_ACTIVE_LOW>;
31 };
32 wlan2g {
33 label = "hc5861b:green:wlan2g";
34 gpios = <&gpio1 12 GPIO_ACTIVE_LOW>;
35 };
36 };
37
38 gpio-keys {
39 compatible = "gpio-keys-polled";
40 poll-interval = <20>;
41
42 reset {
43 label = "reset";
44 gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
45 linux,code = <KEY_RESTART>;
46 };
47 };
48 };
49
50 &pinctrl {
51 state_default: pinctrl0 {
52 gpio {
53 ralink,group = "refclk", "wdt", "wled_an";
54 ralink,function = "gpio";
55 };
56 };
57 };
58
59 &spi0 {
60 status = "okay";
61
62 flash@0 {
63 compatible = "jedec,spi-nor";
64 reg = <0>;
65 spi-max-frequency = <10000000>;
66 m25p,chunked-io = <32>;
67
68 partitions {
69 compatible = "fixed-partitions";
70 #address-cells = <1>;
71 #size-cells = <1>;
72
73 partition@0 {
74 label = "u-boot";
75 reg = <0x0 0x30000>;
76 read-only;
77 };
78
79 partition@30000 {
80 label = "hw_panic";
81 reg = <0x30000 0x10000>;
82 read-only;
83 };
84
85 factory: partition@40000 {
86 label = "factory";
87 reg = <0x40000 0x10000>;
88 read-only;
89 };
90
91 partition@50000 {
92 label = "firmware";
93 reg = <0x50000 0xf70000>;
94 };
95
96 partition@fc0000 {
97 label = "oem";
98 reg = <0xfc0000 0x20000>;
99 read-only;
100 };
101
102 bdinfo: partition@fe0000 {
103 label = "bdinfo";
104 reg = <0xfe0000 0x10000>;
105 read-only;
106 };
107
108 partition@ff0000 {
109 label = "backup";
110 reg = <0xff0000 0x10000>;
111 read-only;
112 };
113 };
114 };
115 };
116
117 &ethernet {
118 mtd-mac-address = <&factory 0x4>;
119 };
120
121 &wmac {
122 status = "okay";
123 };
124
125 &pcie {
126 status = "okay";
127 };
128
129 &pcie0 {
130 wifi@0,0 {
131 reg = <0x0000 0 0 0 0>;
132 mediatek,mtd-eeprom = <&factory 0x8000>;
133 mtd-mac-address = <&factory 0x2e>;
134 ieee80211-freq-limit = <5000000 6000000>;
135
136 led {
137 led-sources = <2>;
138 led-active-low;
139 };
140 };
141 };