ramips: add support for D-Link DAP-1325-A1
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7628an_dlink_dap-1325-a1.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "mt7628an.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "dlink,dap-1325-a1", "mediatek,mt7628an-soc";
10 model = "D-Link DAP-1325 A1";
11
12 aliases {
13 led-boot = &led_status_green;
14 led-failsafe = &led_status_green;
15 led-running = &led_status_green;
16 led-upgrade = &led_status_red;
17 };
18
19 leds {
20 compatible = "gpio-leds";
21
22 led_status_red: status_red {
23 label = "red:status";
24 gpios = <&gpio 37 GPIO_ACTIVE_LOW>;
25 };
26
27 led_status_green: status_green {
28 label = "green:status";
29 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
30 };
31
32 wifi-high {
33 label = "green:wifi-high";
34 gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
35 };
36
37 wifi-mid {
38 label = "green:wifi-mid";
39 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
40 };
41
42 wifi-low {
43 label = "green:wifi-low";
44 gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
45 };
46
47 wifi-verylow {
48 label = "red:wifi-verylow";
49 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
50 };
51 };
52
53 keys {
54 compatible = "gpio-keys";
55
56 wps {
57 label = "wps";
58 gpios = <&gpio 45 GPIO_ACTIVE_LOW>;
59 linux,code = <KEY_WPS_BUTTON>;
60 };
61
62 reset {
63 label = "reset";
64 gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
65 linux,code = <KEY_RESTART>;
66 };
67 };
68 };
69
70 &state_default {
71 gpio {
72 groups = "refclk", "gpio", "wled_an", "i2s", "uart1", "wdt";
73 function = "gpio";
74 };
75 };
76
77 &ethernet {
78 nvmem-cells = <&macaddr_factory_28>;
79 nvmem-cell-names = "mac-address";
80 };
81
82 &wmac {
83 status = "okay";
84
85 mediatek,mtd-eeprom = <&factory 0x0>;
86
87 nvmem-cells = <&macaddr_factory_28>;
88 nvmem-cell-names = "mac-address";
89 };
90
91 &spi0 {
92 status = "okay";
93
94 flash@0 {
95 compatible = "jedec,spi-nor";
96 reg = <0>;
97 spi-max-frequency = <50000000>;
98
99 partitions {
100 compatible = "fixed-partitions";
101 #address-cells = <1>;
102 #size-cells = <1>;
103
104 partition@0 {
105 label = "u-boot";
106 reg = <0x0 0x30000>;
107 read-only;
108 };
109
110 partition@30000 {
111 label = "u-boot-env";
112 reg = <0x30000 0x10000>;
113 read-only;
114 };
115
116 factory: partition@40000 {
117 label = "factory";
118 reg = <0x40000 0x10000>;
119 read-only;
120 };
121
122 partition@50000 {
123 compatible = "denx,uimage";
124 label = "firmware";
125 reg = <0x50000 0x7b0000>;
126 };
127 };
128 };
129 };
130
131 &factory {
132 compatible = "nvmem-cells";
133 #address-cells = <1>;
134 #size-cells = <1>;
135
136 macaddr_factory_28: macaddr@28 {
137 reg = <0x28 0x6>;
138 };
139 };