ramips: Add support for the GnuBee Personal Cloud Two
[openwrt/openwrt.git] / target / linux / ramips / dts / GB-PC2.dts
1 /dts-v1/;
2
3 #include "mt7621.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "gnubee,gb-pc2", "mediatek,mt7621-soc";
10 model = "GB-PC2";
11
12 memory@0 {
13 device_type = "memory";
14 reg = <0x0 0x1c000000>, <0x20000000 0x4000000>;
15 };
16
17 chosen {
18 bootargs = "console=ttyS0,57600";
19 };
20
21 palmbus: palmbus@1E000000 {
22 i2c@900 {
23 status = "okay";
24 };
25 };
26
27 gpio-keys-polled {
28 compatible = "gpio-keys-polled";
29 #address-cells = <1>;
30 #size-cells = <0>;
31 poll-interval = <20>;
32
33 reset {
34 label = "reset";
35 gpios = <&gpio0 18 GPIO_ACTIVE_HIGH>;
36 linux,code = <KEY_RESTART>;
37 };
38 };
39
40 gpio-leds {
41 compatible = "gpio-leds";
42
43 system {
44 label = "gb-pc2:green:system";
45 gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
46 };
47
48 status {
49 label = "gb-pc2:green:status";
50 gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
51 };
52
53 lan {
54 label = "gb-pc2:green:lan";
55 gpios = <&gpio0 24 GPIO_ACTIVE_LOW>;
56 };
57
58 wan {
59 label = "gb-pc2:green:wan";
60 gpios = <&gpio0 25 GPIO_ACTIVE_LOW>;
61 };
62
63 eth1-y {
64 label = "gb-pc2:yellow:eth1-y";
65 gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
66 };
67
68 eth1-g {
69 label = "gb-pc2:green:eth1-g";
70 gpios = <&gpio0 15 GPIO_ACTIVE_LOW>;
71 };
72
73 };
74 };
75
76 &sdhci {
77 status = "okay";
78 };
79
80 &spi0 {
81 status = "okay";
82
83 m25p80@0 {
84 #address-cells = <1>;
85 #size-cells = <1>;
86 compatible = "jedec,spi-nor";
87 reg = <0>;
88 spi-max-frequency = <10000000>;
89 m25p,chunked-io = <32>;
90
91 partition@0 {
92 label = "u-boot";
93 reg = <0x0 0x30000>;
94 read-only;
95 };
96
97 partition@30000 {
98 label = "u-boot-env";
99 reg = <0x30000 0x10000>;
100 read-only;
101 };
102
103 factory: partition@40000 {
104 label = "factory";
105 reg = <0x40000 0x10000>;
106 read-only;
107 };
108
109 partition@50000 {
110 label = "firmware";
111 reg = <0x50000 0x1fb0000>;
112 };
113 };
114 };
115
116 &cpuclock {
117 compatible = "fixed-clock";
118 clock-frequency = <900000000>;
119 };
120
121 &pcie {
122 status = "okay";
123 };
124
125 &ethernet {
126 mtd-mac-address = <&factory 0xe000>;
127 };
128
129 &pinctrl {
130 state_default: pinctrl0 {
131 gpio {
132 ralink,group = "uart3";
133 ralink,function = "gpio";
134 };
135 };
136 };
137