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