9a2cffeb97cfaeeebef1bc9ee8c85b3f90038a8f
[openwrt/staging/wigyori.git] / target / linux / ramips / dts / mt7621_gnubee_gb-pc2.dts
1 #include "mt7621.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 / {
7 compatible = "gnubee,gb-pc2", "mediatek,mt7621-soc";
8 model = "GnuBee GB-PC2";
9
10 aliases {
11 led-boot = &led_system;
12 led-failsafe = &led_system;
13 led-running = &led_system;
14 led-upgrade = &led_system;
15 };
16
17 keys {
18 compatible = "gpio-keys";
19
20 reset {
21 label = "reset";
22 gpios = <&gpio 18 GPIO_ACTIVE_HIGH>;
23 linux,code = <KEY_RESTART>;
24 };
25 };
26
27 leds {
28 compatible = "gpio-leds";
29
30 ethblack-green {
31 label = "green:ethblack";
32 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
33 };
34
35 ethblue-green {
36 label = "green:ethblue";
37 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
38 };
39
40 ethyellow-green {
41 label = "green:ethyellow";
42 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
43 };
44
45 ethyellow-orange {
46 label = "orange:ethyellow";
47 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
48 };
49
50 power {
51 label = "green:power";
52 gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
53 linux,default-trigger = "default-on";
54 };
55
56 led_system: system {
57 label = "green:system";
58 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
59 linux,default-trigger = "disk-activity";
60 };
61 };
62 };
63
64 &sdhci {
65 status = "okay";
66 };
67
68 &spi0 {
69 status = "okay";
70
71 flash@0 {
72 compatible = "jedec,spi-nor";
73 reg = <0>;
74 spi-max-frequency = <50000000>;
75 broken-flash-reset;
76
77 partitions {
78 compatible = "fixed-partitions";
79 #address-cells = <1>;
80 #size-cells = <1>;
81
82 partition@0 {
83 label = "u-boot";
84 reg = <0x0 0x30000>;
85 read-only;
86 };
87
88 partition@30000 {
89 label = "u-boot-env";
90 reg = <0x30000 0x10000>;
91 read-only;
92 };
93
94 factory: partition@40000 {
95 label = "factory";
96 reg = <0x40000 0x10000>;
97 read-only;
98
99 nvmem-layout {
100 compatible = "fixed-layout";
101 #address-cells = <1>;
102 #size-cells = <1>;
103
104 macaddr_factory_e000: macaddr@e000 {
105 reg = <0xe000 0x6>;
106 };
107 };
108 };
109
110 partition@50000 {
111 compatible = "denx,uimage";
112 label = "firmware";
113 reg = <0x50000 0x1fb0000>;
114 };
115 };
116 };
117 };
118
119 &pcie {
120 status = "okay";
121 };
122
123 &gmac0 {
124 nvmem-cells = <&macaddr_factory_e000>;
125 nvmem-cell-names = "mac-address";
126 };
127
128 &gmac1 {
129 status = "okay";
130 label = "ethyellow";
131 phy-mode = "rgmii-rxid";
132 phy-handle = <&ethphy5>;
133
134 nvmem-cells = <&macaddr_factory_e000>;
135 nvmem-cell-names = "mac-address";
136 };
137
138 &mdio {
139 ethphy5: ethernet-phy@5 {
140 reg = <5>;
141 };
142 };
143
144 &switch0 {
145 ports {
146 port@0 {
147 status = "okay";
148 label = "ethblack";
149 };
150
151 port@4 {
152 status = "okay";
153 label = "ethblue";
154 };
155 };
156 };
157
158 &state_default {
159 gpio {
160 groups = "jtag", "uart3", "wdt";
161 function = "gpio";
162 };
163 };