0576aa0a8bd7692b6bee7ce659089860e7bd34a3
[openwrt/staging/wigyori.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 aliases {
13 led-status = &led_status;
14 };
15
16 memory@0 {
17 device_type = "memory";
18 reg = <0x0 0x1c000000>, <0x20000000 0x4000000>;
19 };
20
21 chosen {
22 bootargs = "console=ttyS0,57600";
23 };
24
25 gpio-keys-polled {
26 compatible = "gpio-keys-polled";
27 #address-cells = <1>;
28 #size-cells = <0>;
29 poll-interval = <20>;
30
31 reset {
32 label = "reset";
33 gpios = <&gpio0 18 GPIO_ACTIVE_HIGH>;
34 linux,code = <KEY_RESTART>;
35 };
36 };
37
38 gpio-leds {
39 compatible = "gpio-leds";
40
41 system {
42 label = "gb-pc2:green:system";
43 gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
44 };
45
46 led_status: status {
47 label = "gb-pc2:green:status";
48 gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
49 };
50
51 lan1 {
52 label = "gb-pc2:green:lan1";
53 gpios = <&gpio0 24 GPIO_ACTIVE_LOW>;
54 };
55
56 lan2 {
57 label = "gb-pc2:green:lan2";
58 gpios = <&gpio0 25 GPIO_ACTIVE_LOW>;
59 };
60
61 lan3-yellow {
62 label = "gb-pc2:yellow:lan3";
63 gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
64 };
65
66 lan3-green {
67 label = "gb-pc2:green:lan3";
68 gpios = <&gpio0 15 GPIO_ACTIVE_LOW>;
69 };
70
71 };
72 };
73
74 &sdhci {
75 status = "okay";
76
77 pinctrl-names = "default";
78 pinctrl-0 = <&sdhci_pins>;
79 };
80
81 &spi0 {
82 status = "okay";
83
84 m25p80@0 {
85 #address-cells = <1>;
86 #size-cells = <1>;
87 compatible = "jedec,spi-nor";
88 reg = <0>;
89 spi-max-frequency = <10000000>;
90 m25p,chunked-io = <32>;
91
92 partition@0 {
93 label = "u-boot";
94 reg = <0x0 0x30000>;
95 read-only;
96 };
97
98 partition@30000 {
99 label = "u-boot-env";
100 reg = <0x30000 0x10000>;
101 read-only;
102 };
103
104 factory: partition@40000 {
105 label = "factory";
106 reg = <0x40000 0x10000>;
107 read-only;
108 };
109
110 partition@50000 {
111 label = "firmware";
112 reg = <0x50000 0x1fb0000>;
113 };
114 };
115 };
116
117 &cpuclock {
118 compatible = "fixed-clock";
119 clock-frequency = <900000000>;
120 };
121
122 &pcie {
123 status = "okay";
124 };
125
126 &ethernet {
127 mtd-mac-address = <&factory 0xe000>;
128 };
129
130 &pinctrl {
131 state_default: pinctrl0 {
132 gpio {
133 ralink,group = "jtag", "rgmii2", "uart3", "wdt";
134 ralink,function = "gpio";
135 };
136 };
137 };
138