903cbc6125f026012493f83b1f822ac98870077d
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_ubnt_unifi-nanohd.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2 /dts-v1/;
3
4 #include "mt7621.dtsi"
5
6 #include <dt-bindings/gpio/gpio.h>
7 #include <dt-bindings/input/input.h>
8
9 / {
10 compatible = "ubnt,unifi-nanohd", "mediatek,mt7621-soc";
11 model = "Ubiquiti UniFi nanoHD";
12
13 aliases {
14 led-boot = &led_white;
15 led-failsafe = &led_white;
16 led-running = &led_blue;
17 led-upgrade = &led_blue;
18
19 label-mac-device = &ethernet;
20 };
21
22 chosen {
23 bootargs = "console=ttyS0,115200";
24 };
25
26 leds {
27 compatible = "gpio-leds";
28
29 led_blue: dome_blue {
30 label = "nanohd:blue:dome";
31 gpios = <&gpio0 3 GPIO_ACTIVE_HIGH>;
32 };
33
34 led_white: dome_white {
35 label = "nanohd:white:dome";
36 gpios = <&gpio0 4 GPIO_ACTIVE_HIGH>;
37 };
38 };
39
40 keys {
41 compatible = "gpio-keys";
42
43 reset {
44 label = "reset";
45 gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
46 linux,code = <KEY_RESTART>;
47 };
48 };
49 };
50
51 &spi0 {
52 status = "okay";
53
54 flash@0 {
55 compatible = "mx25l25635f", "jedec,spi-nor";
56 reg = <0>;
57 spi-max-frequency = <50000000>;
58
59 partitions {
60 compatible = "fixed-partitions";
61 #address-cells = <1>;
62 #size-cells = <1>;
63
64 partition@0 {
65 label = "u-boot";
66 reg = <0x0 0x60000>;
67 read-only;
68 };
69
70 partition@60000 {
71 label = "u-boot-env";
72 reg = <0x60000 0x10000>;
73 read-only;
74 };
75
76 factory: partition@70000 {
77 label = "factory";
78 reg = <0x70000 0x10000>;
79 read-only;
80 };
81
82 eeprom: partition@80000 {
83 label = "eeprom";
84 reg = <0x80000 0x10000>;
85 read-only;
86 };
87
88 partition@90000 {
89 label = "bs";
90 reg = <0x90000 0x10000>;
91 };
92
93 partition@a0000 {
94 label = "cfg";
95 reg = <0xa0000 0x100000>;
96 read-only;
97 };
98
99 partition@1a0000 {
100 compatible = "denx,uimage";
101 label = "firmware";
102 reg = <0x1a0000 0xf30000>;
103 };
104
105 partition@10d0000 {
106 label = "kernel1";
107 reg = <0x10d0000 0xf30000>;
108 read-only;
109 };
110 };
111 };
112 };
113
114 &pcie {
115 status = "okay";
116 };
117
118 &pcie0 {
119 wifi@0,0 {
120 reg = <0x0 0 0 0 0>;
121 mediatek,mtd-eeprom = <&factory 0x0000>;
122 };
123 };
124
125 &pcie1 {
126 wifi@0,0 {
127 reg = <0x0 0 0 0 0>;
128 mediatek,mtd-eeprom = <&factory 0x8000>;
129 };
130 };
131
132 &ethernet {
133 mtd-mac-address = <&eeprom 0x0>;
134 };
135
136 &state_default {
137 gpio {
138 ralink,group = "i2c", "uart2";
139 ralink,function = "gpio";
140 };
141 };