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