d4998113456d7c8ace5a300810bbcf44639ddba0
[openwrt/staging/hauke.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
100 partition@50000 {
101 compatible = "denx,uimage";
102 label = "firmware";
103 reg = <0x50000 0x1fb0000>;
104 };
105 };
106 };
107 };
108
109 &pcie {
110 status = "okay";
111 };
112
113 &gmac0 {
114 nvmem-cells = <&macaddr_factory_e000>;
115 nvmem-cell-names = "mac-address";
116 };
117
118 &gmac1 {
119 status = "okay";
120 label = "ethyellow";
121 phy-mode = "rgmii-rxid";
122 phy-handle = <&ethphy5>;
123
124 nvmem-cells = <&macaddr_factory_e000>;
125 nvmem-cell-names = "mac-address";
126 };
127
128 &mdio {
129 ethphy5: ethernet-phy@5 {
130 reg = <5>;
131 };
132 };
133
134 &switch0 {
135 ports {
136 port@0 {
137 status = "okay";
138 label = "ethblack";
139 };
140
141 port@4 {
142 status = "okay";
143 label = "ethblue";
144 };
145 };
146 };
147
148 &state_default {
149 gpio {
150 groups = "jtag", "uart3", "wdt";
151 function = "gpio";
152 };
153 };
154
155 &factory {
156 compatible = "nvmem-cells";
157 #address-cells = <1>;
158 #size-cells = <1>;
159
160 macaddr_factory_e000: macaddr@e000 {
161 reg = <0xe000 0x6>;
162 };
163 };