ramips: convert MT7628 EEPROM to NVMEM format
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7628an_unielec_u7628-01.dtsi
1 // SPDX-License-Identifier: BSD-3-Clause
2 /*
3 * Copyright(c) 2017 Kristian Evensen <kristian.evensen@gmail.com>.
4 * Copyright(c) 2017 Piotr Dymacz <pepe2k@gmail.com>.
5 * All rights reserved.
6 */
7
8 #include "mt7628an.dtsi"
9
10 #include <dt-bindings/gpio/gpio.h>
11 #include <dt-bindings/input/input.h>
12
13 / {
14 compatible = "unielec,u7628-01", "mediatek,mt7628an-soc";
15
16 aliases {
17 led-boot = &led_power;
18 led-failsafe = &led_power;
19 led-running = &led_power;
20 led-upgrade = &led_power;
21 };
22
23 chosen {
24 bootargs = "console=ttyS0,115200";
25 };
26
27 keys {
28 compatible = "gpio-keys";
29
30 reset {
31 label = "reset";
32 gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
33 linux,code = <KEY_RESTART>;
34 };
35 };
36
37 leds {
38 compatible = "gpio-leds";
39
40 led_power: power {
41 label = "green:power";
42 gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
43 };
44
45 wlan {
46 label = "green:wlan";
47 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
48 };
49
50 wan {
51 label = "green:wan";
52 gpios = <&gpio 43 GPIO_ACTIVE_LOW>;
53 };
54
55 lan1 {
56 label = "green:lan1";
57 gpios = <&gpio 42 GPIO_ACTIVE_LOW>;
58 };
59
60 lan2 {
61 label = "green:lan2";
62 gpios = <&gpio 41 GPIO_ACTIVE_LOW>;
63 };
64
65 lan3 {
66 label = "green:lan3";
67 gpios = <&gpio 40 GPIO_ACTIVE_LOW>;
68 };
69
70 lan4 {
71 label = "green:lan4";
72 gpios = <&gpio 39 GPIO_ACTIVE_LOW>;
73 };
74
75 usb {
76 label = "green:usb";
77 gpios = <&gpio 37 GPIO_ACTIVE_LOW>;
78 trigger-sources = <&ohci_port1>, <&ehci_port1>;
79 linux,default-trigger = "usbport";
80 };
81 };
82 };
83
84 &pcie {
85 status = "okay";
86 };
87
88 &wmac {
89 status = "okay";
90
91 nvmem-cells = <&eeprom_factory_0>;
92 nvmem-cell-names = "eeprom";
93 };
94
95 &state_default {
96 gpio {
97 groups = "gpio", "p0led_an", "p1led_an", "p2led_an", "p3led_an", "p4led_an", "refclk", "wdt", "wled_an";
98 function = "gpio";
99 };
100 };