186f8e16edd6836de34efd840472e1260ae01dbd
[openwrt/staging/hauke.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 compatible = "nvmem-cells";
69 label = "factory";
70 reg = <0x40000 0x10000>;
71 #address-cells = <1>;
72 #size-cells = <1>;
73
74 eeprom_factory_0: eeprom@0 {
75 reg = <0x0 0x400>;
76 };
77
78 macaddr_factory_4: macaddr@4 {
79 reg = <0x4 0x6>;
80 };
81 };
82
83 partition@50000 {
84 compatible = "denx,uimage";
85 label = "firmware";
86 reg = <0x50000 0xfb0000>;
87 };
88 };
89 };
90 };
91
92 &state_default {
93 gpio_reset {
94 groups = "wdt";
95 function = "gpio";
96 };
97
98 p0led_an {
99 groups = "p0led_an";
100 function = "p0led_an";
101 };
102 };
103
104 &ethernet {
105 nvmem-cells = <&macaddr_factory_4>;
106 nvmem-cell-names = "mac-address";
107 };
108
109 &wmac {
110 status = "okay";
111
112 nvmem-cells = <&eeprom_factory_0>;
113 nvmem-cell-names = "eeprom";
114 };
115
116 &uart1 {
117 status = "okay";
118 };