d4f8b26aea88e33a0270679af733911d9b1bd0ba
[openwrt/staging/jow.git] / target / linux / ramips / dts / mt7628an_alfa-network_awusfree1.dts
1 // SPDX-License-Identifier: BSD-3-Clause
2 /*
3 * Copyright (C) 2018 Piotr Dymacz <pepe2k@gmail.com>
4 * All rights reserved.
5 */
6
7 #include "mt7628an.dtsi"
8
9 #include <dt-bindings/gpio/gpio.h>
10 #include <dt-bindings/input/input.h>
11 #include <dt-bindings/leds/common.h>
12
13 / {
14 compatible = "alfa-network,awusfree1", "mediatek,mt7628an-soc";
15 model = "ALFA Network AWUSFREE1";
16
17 aliases {
18 led-boot = &led_system;
19 led-failsafe = &led_system;
20 led-running = &led_system;
21 led-upgrade = &led_system;
22 };
23
24 chosen {
25 bootargs = "console=ttyS0,115200";
26 };
27
28 keys {
29 compatible = "gpio-keys";
30
31 reset {
32 label = "reset";
33 gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
34 linux,code = <KEY_RESTART>;
35 };
36 };
37
38 leds {
39 compatible = "gpio-leds";
40
41 led_system: system {
42 label = "orange:system";
43 gpios = <&gpio 43 GPIO_ACTIVE_LOW>;
44 };
45
46 wlan {
47 function = LED_FUNCTION_WLAN;
48 color = <LED_COLOR_ID_BLUE>;
49 gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
50 };
51 };
52 };
53
54 &ehci {
55 status = "disabled";
56 };
57
58 &esw {
59 mediatek,portdisable = <0x1e>;
60 };
61
62 &ethernet {
63 nvmem-cells = <&macaddr_factory_2e>;
64 nvmem-cell-names = "mac-address";
65 };
66
67 &ohci {
68 status = "disabled";
69 };
70
71 &state_default {
72 gpio {
73 groups = "p0led_an", "wdt", "wled_an";
74 function = "gpio";
75 };
76
77 ext_lna {
78 groups = "uart1";
79 function = "sw_r";
80 };
81
82 ext_pa {
83 groups = "i2s";
84 function = "antenna";
85 };
86 };
87
88 &spi0 {
89 status = "okay";
90
91 flash@0 {
92 compatible = "jedec,spi-nor";
93 reg = <0>;
94 spi-max-frequency = <10000000>;
95
96 partitions {
97 compatible = "fixed-partitions";
98 #address-cells = <1>;
99 #size-cells = <1>;
100
101 partition@0 {
102 label = "u-boot";
103 reg = <0x0 0x30000>;
104 read-only;
105 };
106
107 partition@30000 {
108 label = "u-boot-env";
109 reg = <0x30000 0x1000>;
110 };
111
112 partition@31000 {
113 label = "config";
114 reg = <0x31000 0xf000>;
115 read-only;
116 };
117
118 factory: partition@40000 {
119 label = "factory";
120 reg = <0x40000 0x10000>;
121 read-only;
122
123 nvmem-layout {
124 compatible = "fixed-layout";
125 #address-cells = <1>;
126 #size-cells = <1>;
127
128 eeprom_factory_0: eeprom@0 {
129 reg = <0x0 0x400>;
130 };
131
132 macaddr_factory_2e: macaddr@2e {
133 reg = <0x2e 0x6>;
134 };
135 };
136 };
137
138 partition@50000 {
139 compatible = "denx,uimage";
140 label = "firmware";
141 reg = <0x50000 0x7b0000>;
142 };
143 };
144 };
145 };
146
147 &wmac {
148 status = "okay";
149
150 nvmem-cells = <&eeprom_factory_0>;
151 nvmem-cell-names = "eeprom";
152 };