12cf47f5a798e7b579f0c73d0003823019ecbf6b
[openwrt/staging/wigyori.git] / target / linux / ramips / dts / mt7628an_minew_g1-c.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 model = "Minew G1-C";
10 compatible = "minew,g1-c", "mediatek,mt7628an-soc";
11
12 aliases {
13 led-boot = &led_system;
14 led-failsafe = &led_system;
15 led-running = &led_system;
16 led-upgrade = &led_system;
17 };
18
19 memory@0 {
20 device_type = "memory";
21 reg = <0x0 0x8000000>;
22 };
23
24 keys {
25 compatible = "gpio-keys-polled";
26 poll-interval = <20>;
27
28 reset {
29 label = "reset";
30 gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
31 linux,code = <KEY_RESTART>;
32 };
33 };
34
35 leds {
36 compatible = "gpio-leds";
37
38 led_system: system {
39 label = "red:system";
40 gpios = <&gpio 43 GPIO_ACTIVE_HIGH>;
41 default-state = "on";
42 };
43 };
44
45 gpio-export {
46 compatible = "gpio-export";
47 #size-cells = <0>;
48
49 ws2812 {
50 gpio-export,name = "ws2812";
51 gpio-export,output = <1>;
52 gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
53 };
54
55 nrf_power {
56 gpio-export,name = "nrf_power";
57 gpio-export,output = <1>;
58 gpios = <&gpio 45 GPIO_ACTIVE_HIGH>;
59 };
60 };
61 };
62
63 &state_default {
64 gpio {
65 groups = "gpio";
66 function = "gpio";
67 };
68
69 p0led_an {
70 groups = "p0led_an";
71 function = "gpio";
72 };
73
74 uart1 {
75 groups = "uart1";
76 function = "gpio";
77 };
78
79 wdt {
80 groups = "wdt";
81 function = "gpio";
82 };
83 };
84
85 &spi0 {
86 status = "okay";
87
88 pinctrl-names = "default";
89 pinctrl-0 = <&spi_pins>, <&spi_cs1_pins>;
90
91 m25p80@0 {
92 compatible = "jedec,spi-nor";
93 reg = <0>;
94 spi-max-frequency = <40000000>;
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 0x10000>;
110 };
111
112 factory: partition@40000 {
113 label = "factory";
114 reg = <0x40000 0x10000>;
115 read-only;
116 };
117
118 partition@50000 {
119 compatible = "denx,uimage";
120 label = "firmware";
121 reg = <0x50000 0xfb0000>;
122 };
123 };
124 };
125 };
126
127 &ethernet {
128 mtd-mac-address = <&factory 0x28>;
129 };
130
131 &esw {
132 mediatek,portmap = <0x3e>;
133 };
134
135 &wmac {
136 status = "okay";
137 };
138
139 &sdhci {
140 status = "okay";
141 mediatek,cd-high;
142 };