ramips: mt7621: convert to nvmem-layout
[openwrt/staging/stintel.git] / target / linux / ramips / dts / mt7621_thunder_timecloud.dts
1 #include "mt7621.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 / {
7 compatible = "thunder,timecloud", "mediatek,mt7621-soc";
8 model = "Thunder Timecloud";
9
10 aliases {
11 led-boot = &led_statuso;
12 led-failsafe = &led_statuso;
13 led-running = &led_statuso;
14 led-upgrade = &led_statuso;
15 };
16
17 chosen {
18 bootargs = "console=ttyS0,115200";
19 };
20
21 leds {
22 compatible = "gpio-leds";
23
24 statw {
25 label = "white:status";
26 gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
27 };
28
29 led_statuso: stato {
30 label = "orange:status";
31 gpios = <&gpio 8 GPIO_ACTIVE_HIGH>;
32 };
33 };
34
35 keys {
36 compatible = "gpio-keys";
37
38 reset {
39 label = "reset";
40 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
41 linux,code = <KEY_RESTART>;
42 };
43
44 BTN_0 {
45 label = "BTN_0";
46 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
47 linux,code = <BTN_0>;
48 };
49 };
50 };
51
52 &sdhci {
53 status = "okay";
54 };
55
56 &spi0 {
57 status = "okay";
58
59 flash@0 {
60 compatible = "jedec,spi-nor";
61 reg = <0>;
62 spi-max-frequency = <10000000>;
63
64 partitions {
65 compatible = "fixed-partitions";
66 #address-cells = <1>;
67 #size-cells = <1>;
68
69 partition@0 {
70 label = "u-boot";
71 reg = <0x0 0x30000>;
72 read-only;
73 };
74
75 partition@30000 {
76 label = "u-boot-env";
77 reg = <0x30000 0x10000>;
78 read-only;
79 };
80
81 factory: partition@40000 {
82 label = "factory";
83 reg = <0x40000 0x10000>;
84 read-only;
85
86 nvmem-layout {
87 compatible = "fixed-layout";
88 #address-cells = <1>;
89 #size-cells = <1>;
90
91 macaddr_factory_e000: macaddr@e000 {
92 reg = <0xe000 0x6>;
93 };
94 };
95 };
96
97 partition@50000 {
98 compatible = "denx,uimage";
99 label = "firmware";
100 reg = <0x50000 0xfb0000>;
101 };
102 };
103 };
104 };
105
106 &gmac0 {
107 nvmem-cells = <&macaddr_factory_e000>;
108 nvmem-cell-names = "mac-address";
109 };
110
111 &switch0 {
112 ports {
113 port@4 {
114 status = "okay";
115 label = "lan";
116 };
117 };
118 };
119
120 &state_default {
121 gpio {
122 groups = "i2c", "uart2", "jtag";
123 function = "gpio";
124 };
125 };