ramips: move partitions into partition table node
[oweals/openwrt.git] / target / linux / ramips / dts / DB-WRT01.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 = "planex,db-wrt01", "ralink,mt7620a-soc";
10         model = "Planex DB-WRT01";
11
12         aliases {
13                 led-status = &led_power;
14         };
15
16         gpio-leds {
17                 compatible = "gpio-leds";
18
19                 led_power: power {
20                         label = "db-wrt01:orange:power";
21                         gpios = <&gpio1 1 GPIO_ACTIVE_LOW>;
22                 };
23         };
24
25         gpio-keys-polled {
26                 compatible = "gpio-keys-polled";
27                 poll-interval = <20>;
28
29                 s1 {
30                         label = "wps";
31                         gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
32                         linux,code = <KEY_WPS_BUTTON>;
33                 };
34         };
35 };
36
37 &gpio1 {
38         status = "okay";
39 };
40
41 &spi0 {
42         status = "okay";
43
44         m25p80@0 {
45                 compatible = "jedec,spi-nor";
46                 reg = <0>;
47                 spi-max-frequency = <10000000>;
48
49                 partitions {
50                         compatible = "fixed-partitions";
51                         #address-cells = <1>;
52                         #size-cells = <1>;
53
54                         partition@0 {
55                                 label = "u-boot";
56                                 reg = <0x0 0x30000>;
57                                 read-only;
58                         };
59
60                         partition@30000 {
61                                 label = "u-boot-env";
62                                 reg = <0x30000 0x10000>;
63                                 read-only;
64                         };
65
66                         factory: partition@40000 {
67                                 label = "factory";
68                                 reg = <0x40000 0x10000>;
69                                 read-only;
70                         };
71
72                         partition@50000 {
73                                 label = "firmware";
74                                 reg = <0x50000 0x7b0000>;
75                         };
76                 };
77         };
78 };
79
80 &pinctrl {
81         state_default: pinctrl0 {
82                 gpio {
83                         ralink,group = "i2c", "spi refclk", "rgmii1";
84                         ralink,function = "gpio";
85                 };
86         };
87 };
88
89 &ethernet {
90         pinctrl-names = "default";
91         pinctrl-0 = <&ephy_pins>;
92         mtd-mac-address = <&factory 0x4>;
93         mediatek,portmap = "llllw";
94 };
95
96 &gsw {
97         mediatek,port4 = "ephy";
98 };
99
100 &wmac {
101         ralink,mtd-eeprom = <&factory 0>;
102 };
103
104 &pcie {
105         status = "okay";
106 };