ramips: convert to new LED color/function format where possible
[openwrt/staging/wigyori.git] / target / linux / ramips / dts / mt7628an_oraybox_x1.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later
2
3 #include "mt7628an.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7 #include <dt-bindings/leds/common.h>
8
9 / {
10 compatible = "oraybox,x1", "mediatek,mt7628an-soc";
11 model = "OrayBox X1";
12
13 aliases {
14 led-boot = &led_status_white;
15 led-failsafe = &led_status_red;
16 led-running = &led_status_white;
17 led-upgrade = &led_status_red;
18 };
19
20 chosen {
21 bootargs = "console=ttyS0,115200";
22 };
23
24 leds {
25 compatible = "gpio-leds";
26
27 led_status_blue: status-blue {
28 function = LED_FUNCTION_STATUS;
29 color = <LED_COLOR_ID_BLUE>;
30 gpios = <&gpio 37 GPIO_ACTIVE_HIGH>;
31 };
32
33 led_status_red: status-red {
34 function = LED_FUNCTION_STATUS;
35 color = <LED_COLOR_ID_RED>;
36 gpios = <&gpio 1 GPIO_ACTIVE_HIGH>;
37 };
38
39 led_status_white: status-white {
40 function = LED_FUNCTION_STATUS;
41 color = <LED_COLOR_ID_WHITE>;
42 gpios = <&gpio 44 GPIO_ACTIVE_HIGH>;
43 };
44 };
45
46 keys {
47 compatible = "gpio-keys";
48
49 reset {
50 label = "reset";
51 gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
52 linux,code = <KEY_RESTART>;
53 };
54 };
55 };
56
57 &spi0 {
58 status = "okay";
59
60 flash@0 {
61 compatible = "jedec,spi-nor";
62 reg = <0>;
63 spi-max-frequency = <40000000>;
64
65 partitions {
66 compatible = "fixed-partitions";
67 #address-cells = <1>;
68 #size-cells = <1>;
69
70 partition@0 {
71 label = "u-boot";
72 reg = <0x0 0x30000>;
73 read-only;
74 };
75
76 partition@30000 {
77 label = "kpanic";
78 reg = <0x30000 0x10000>;
79 read-only;
80 };
81
82 partition@40000 {
83 label = "factory";
84 reg = <0x40000 0x10000>;
85 read-only;
86 };
87
88 partition@50000 {
89 compatible = "denx,uimage";
90 label = "firmware";
91 reg = <0x50000 0xf00000>;
92 };
93
94 bdinfo: partition@fe0000 {
95 label = "bdinfo";
96 reg = <0xfe0000 0x10000>;
97 read-only;
98
99 nvmem-layout {
100 compatible = "fixed-layout";
101 #address-cells = <1>;
102 #size-cells = <1>;
103
104 macaddr_bdinfo_9: macaddr@9 {
105 reg = <0x9 0x6>;
106 };
107 };
108 };
109
110 partition@ff0000 {
111 label = "reserve";
112 reg = <0xff0000 0x10000>;
113 read-only;
114 };
115 };
116 };
117 };
118
119 &state_default {
120 gpio {
121 groups = "jtag", "wdt";
122 function = "gpio";
123 };
124 };
125
126 &ethernet {
127 nvmem-cells = <&macaddr_bdinfo_9>;
128 nvmem-cell-names = "mac-address";
129 };
130
131 &wmac {
132 status = "okay";
133 };