ramips: move partitions into partition table node
[openwrt/staging/wigyori.git] / target / linux / ramips / dts / MIWIFI-NANO.dts
1 /dts-v1/;
2
3 #include "mt7628an.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "xiaomi,miwifi-nano", "mediatek,mt7628an-soc";
10 model = "MiWiFi Nano";
11
12 aliases {
13 led-status = &led_blue;
14 };
15
16 chosen {
17 bootargs = "console=ttyS0,115200";
18 };
19
20 memory@0 {
21 device_type = "memory";
22 reg = <0x0 0x4000000>;
23 };
24
25 gpio-leds {
26 compatible = "gpio-leds";
27
28 led_blue: status_blue {
29 label = "miwifi-nano:blue:status";
30 gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
31 };
32 status_red {
33 label = "miwifi-nano:red:status";
34 gpios = <&gpio1 5 GPIO_ACTIVE_LOW>;
35 };
36 status_amber {
37 label = "miwifi-nano:amber:status";
38 gpios = <&gpio1 12 GPIO_ACTIVE_LOW>;
39 };
40 };
41
42 gpio-keys {
43 compatible = "gpio-keys-polled";
44 poll-interval = <20>;
45
46 reset {
47 label = "reset";
48 gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
49 linux,code = <KEY_RESTART>;
50 };
51 };
52 };
53
54 &pinctrl {
55 state_default: pinctrl0 {
56 gpio {
57 ralink,group = "refclk", "wled_an", "gpio";
58 ralink,function = "gpio";
59 };
60 };
61 };
62
63 &wmac {
64 status = "okay";
65 ralink,mtd-eeprom = <&factory 0x4>;
66 };
67
68 &ethernet {
69 mtd-mac-address = <&factory 0x28>;
70 };
71
72 &spi0 {
73 status = "okay";
74
75 m25p80@0 {
76 compatible = "jedec,spi-nor";
77 reg = <0>;
78 spi-max-frequency = <10000000>;
79 m25p,chunked-io = <32>;
80
81 partitions {
82 compatible = "fixed-partitions";
83 #address-cells = <1>;
84 #size-cells = <1>;
85
86 partition@0 {
87 label = "u-boot";
88 reg = <0x0 0x30000>;
89 read-only;
90 };
91
92 partition@30000 {
93 label = "u-boot-env";
94 reg = <0x30000 0x10000>;
95 read-only;
96 };
97
98 factory: partition@40000 {
99 label = "factory";
100 reg = <0x40000 0x10000>;
101 read-only;
102 };
103
104 partition@50000 {
105 label = "firmware";
106 reg = <0x50000 0xfb0000>;
107 };
108 };
109 };
110 };