ramips: move partitions into partition table node
[oweals/openwrt.git] / target / linux / ramips / dts / ZBT-CPE102.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-cpe102", "ralink,mt7620n-soc";
10         model = "Zbtlink ZBT-CPE102";
11
12         chosen {
13                 bootargs = "console=ttyS0,115200";
14         };
15
16         gpio-leds {
17                 compatible = "gpio-leds";
18
19                 4g-0 {
20                         label = "zbt-cpe102:green:4g-0";
21                         gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
22                 };
23
24                 4g-1 {
25                         label = "zbt-cpe102:green:4g-1";
26                         gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
27                 };
28
29                 4g-2 {
30                         label = "zbt-cpe102:green:4g-2";
31                         gpios = <&gpio1 15 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 &gpio2 {
52         status = "okay";
53 };
54
55 &gpio3 {
56         status = "okay";
57 };
58
59 &spi0 {
60         status = "okay";
61
62         en25q64@0 {
63                 compatible = "jedec,spi-nor";
64                 reg = <0>;
65                 spi-max-frequency = <10000000>;
66
67                 partitions {
68                         compatible = "fixed-partitions";
69                         #address-cells = <1>;
70                         #size-cells = <1>;
71
72                         partition@0 {
73                                 label = "u-boot";
74                                 reg = <0x0 0x30000>;
75                                 read-only;
76                         };
77
78                         partition@30000 {
79                                 label = "u-boot-env";
80                                 reg = <0x30000 0x10000>;
81                                 read-only;
82                         };
83
84                         factory: partition@40000 {
85                                 label = "factory";
86                                 reg = <0x40000 0x10000>;
87                                 read-only;
88                         };
89
90                         partition@50000 {
91                                 label = "firmware";
92                                 reg = <0x50000 0x760000>;
93                         };
94                 };
95         };
96 };
97
98 &ehci {
99         status = "okay";
100 };
101
102 &ohci {
103         status = "okay";
104 };
105
106 &ethernet {
107         mtd-mac-address = <&factory 0x4>;
108         mediatek,portmap = "wllll";
109 };
110
111 &wmac {
112         ralink,mtd-eeprom = <&factory 0>;
113 };
114
115 &pinctrl {
116         state_default: pinctrl0 {
117                 default {
118                         ralink,group = "i2c", "spi refclk", "wled";
119                         ralink,function = "gpio";
120                 };
121         };
122 };