ramips: move partitions into partition table node
[openwrt/staging/wigyori.git] / target / linux / ramips / dts / OY-0001.dts
1 /dts-v1/;
2
3 #include "mt7620a.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "ohyeah,oy-0001", "ralink,mt7620a-soc";
10 model = "OY-0001";
11
12 aliases {
13 led-status = &led_power;
14 };
15
16 chosen {
17 bootargs = "console=ttyS0,115200";
18 };
19
20 gpio-leds {
21 compatible = "gpio-leds";
22
23 led_power: powerled {
24 label = "oy-0001:green:power";
25 gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
26 };
27
28 wifiled {
29 label = "oy-0001:green:wifi";
30 gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
31 };
32 };
33
34 gpio-keys-polled {
35 compatible = "gpio-keys-polled";
36 poll-interval = <20>;
37
38 s1 {
39 label = "reset";
40 gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
41 linux,code = <KEY_RESTART>;
42 };
43 };
44 };
45
46 &gpio2 {
47 status = "okay";
48 };
49
50 &gpio3 {
51 status = "okay";
52 };
53
54 &spi0 {
55 status = "okay";
56
57 m25p80@0 {
58 compatible = "jedec,spi-nor";
59 reg = <0>;
60 spi-max-frequency = <10000000>;
61
62 partitions {
63 compatible = "fixed-partitions";
64 #address-cells = <1>;
65 #size-cells = <1>;
66
67 partition@0 {
68 label = "u-boot";
69 reg = <0x0 0x30000>;
70 read-only;
71 };
72
73 partition@30000 {
74 label = "u-boot-env";
75 reg = <0x30000 0x10000>;
76 read-only;
77 };
78
79 factory: partition@40000 {
80 label = "factory";
81 reg = <0x40000 0x10000>;
82 read-only;
83 };
84
85 partition@50000 {
86 label = "firmware";
87 reg = <0x50000 0xfb0000>;
88 };
89 };
90 };
91 };
92
93 &pinctrl {
94 state_default: pinctrl0 {
95 gpio {
96 ralink,group = "i2c", "uartf", "rgmii1", "rgmii2", "wled", "nd_sd";
97 ralink,function = "gpio";
98 };
99 };
100 };
101
102 &ethernet {
103 pinctrl-names = "default";
104 pinctrl-0 = <&ephy_pins>;
105 mediatek,portmap = "llllw";
106 };
107
108 &gsw {
109 mediatek,port4 = "ephy";
110 };
111
112 &wmac {
113 ralink,mtd-eeprom = <&factory 0>;
114 };
115
116 &sdhci {
117 status = "okay";
118 };
119
120 &ehci {
121 status = "okay";
122 };
123
124 &ohci {
125 status = "okay";
126 };
127
128 &pcie {
129 status = "okay";
130 };