ramips: mt7621-wdt: use phandle to access system controller registers
[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
96 partition@ff0000 {
97 label = "reserve";
98 reg = <0xff0000 0x10000>;
99 read-only;
100 };
101 };
102 };
103 };
104
105 &state_default {
106 gpio {
107 groups = "jtag", "wdt";
108 function = "gpio";
109 };
110 };
111
112 &ethernet {
113 nvmem-cells = <&macaddr_bdinfo_9>;
114 nvmem-cell-names = "mac-address";
115 };
116
117 &wmac {
118 status = "okay";
119 };
120
121 &bdinfo {
122 compatible = "nvmem-cells";
123 #address-cells = <1>;
124 #size-cells = <1>;
125
126 macaddr_bdinfo_9: macaddr@9 {
127 reg = <0x9 0x6>;
128 };
129 };