ramips: move partitions into partition table node
[openwrt/staging/wigyori.git] / target / linux / ramips / dts / M3.dts
1 /dts-v1/;
2
3 #include "rt5350.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "poray,m3", "ralink,rt5350-soc";
10 model = "Poray M3";
11
12 aliases {
13 led-status = &led_status;
14 };
15
16 gpio-leds {
17 compatible = "gpio-leds";
18
19 led_status: status {
20 label = "m3:blue:status";
21 gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
22 };
23 };
24
25 gpio-keys-polled {
26 compatible = "gpio-keys-polled";
27 poll-interval = <20>;
28
29 reset {
30 label = "reset";
31 gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
32 linux,code = <KEY_RESTART>;
33 };
34
35 mode {
36 label = "mode";
37 gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
38 linux,code = <BTN_0>;
39 linux,input-type = <EV_SW>;
40 };
41 };
42 };
43
44 &spi0 {
45 status = "okay";
46
47 m25p80@0 {
48 compatible = "jedec,spi-nor";
49 reg = <0>;
50 spi-max-frequency = <10000000>;
51
52 partitions {
53 compatible = "fixed-partitions";
54 #address-cells = <1>;
55 #size-cells = <1>;
56
57 partition@0 {
58 label = "u-boot";
59 reg = <0x0 0x30000>;
60 read-only;
61 };
62
63 partition@30000 {
64 label = "u-boot-env";
65 reg = <0x30000 0x10000>;
66 read-only;
67 };
68
69 factory: partition@40000 {
70 label = "factory";
71 reg = <0x40000 0x10000>;
72 read-only;
73 };
74
75 partition@50000 {
76 label = "firmware";
77 reg = <0x50000 0x3b0000>;
78 };
79 };
80 };
81 };
82
83 &pinctrl {
84 state_default: pinctrl0 {
85 gpio {
86 ralink,group = "i2c", "jtag", "uartf";
87 ralink,function = "gpio";
88 };
89 };
90 };
91
92 &ethernet {
93 mtd-mac-address = <&factory 0x4>;
94 };
95
96 &esw {
97 mediatek,portmap = <0x2f>;
98 mediatek,led_polarity = <1>;
99 };
100
101 &wmac {
102 ralink,mtd-eeprom = <&factory 0>;
103 ralink,led-polarity = <1>;
104 };
105
106 &ehci {
107 status = "okay";
108 };
109
110 &ohci {
111 status = "okay";
112 };