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