rockchip: add Radxa CM3 IO board support
[openwrt/staging/jow.git] / target / linux / ramips / dts / mt7628an_kroks.dtsi
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "mt7628an.dtsi"
4
5 #include <dt-bindings/input/input.h>
6 #include <dt-bindings/gpio/gpio.h>
7
8 / {
9 aliases {
10 led-boot = &led_status;
11 led-failsafe = &led_status;
12 led-running = &led_status;
13 led-upgrade = &led_status;
14 serial1 = &uart1;
15 };
16
17 leds {
18 compatible = "gpio-leds";
19
20 led_status: status {
21 label = "led:status";
22 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
23 };
24
25 wifi {
26 label = "led:wifi";
27 gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
28 linux,default-trigger = "phy0tpt";
29 };
30 };
31
32 keys {
33 compatible = "gpio-keys";
34
35 reset {
36 label = "reset";
37 gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
38 linux,code = <KEY_RESTART>;
39 };
40 };
41 };
42
43 &spi0 {
44 status = "okay";
45
46 flash@0 {
47 compatible = "jedec,spi-nor";
48 reg = <0>;
49 spi-max-frequency = <25000000>;
50 m25p,fast-read;
51
52 partitions: partitions {
53 compatible = "fixed-partitions";
54 #address-cells = <1>;
55 #size-cells = <1>;
56
57 partition@0 {
58 label = "u-boot";
59 reg = <0x0 0x30000>;
60 };
61
62 partition@30000 {
63 label = "u-boot-env";
64 reg = <0x30000 0x10000>;
65 };
66
67 factory: partition@40000 {
68 label = "factory";
69 reg = <0x40000 0x10000>;
70
71 nvmem-layout {
72 compatible = "fixed-layout";
73 #address-cells = <1>;
74 #size-cells = <1>;
75
76 eeprom_factory_0: eeprom@0 {
77 reg = <0x0 0x400>;
78 };
79
80 macaddr_factory_4: macaddr@4 {
81 reg = <0x4 0x6>;
82 };
83 };
84 };
85
86 partition@50000 {
87 compatible = "denx,uimage";
88 label = "firmware";
89 reg = <0x50000 0xfb0000>;
90 };
91 };
92 };
93 };
94
95 &state_default {
96 gpio_reset {
97 groups = "wdt";
98 function = "gpio";
99 };
100
101 p0led_an {
102 groups = "p0led_an";
103 function = "p0led_an";
104 };
105 };
106
107 &ethernet {
108 nvmem-cells = <&macaddr_factory_4>;
109 nvmem-cell-names = "mac-address";
110 };
111
112 &wmac {
113 status = "okay";
114
115 nvmem-cells = <&eeprom_factory_0>;
116 nvmem-cell-names = "eeprom";
117 };
118
119 &uart1 {
120 status = "okay";
121 };