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