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