ramips: fix GB-PC1 and GB-PC2 device support
[openwrt/staging/jow.git] / target / linux / ramips / dts / mt7621_gnubee_gb-pc1.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-pc1", "mediatek,mt7621-soc";
8 model = "GB-PC1";
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_act {
31 label = "green:ethblack_act";
32 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
33 };
34
35 ethblue_act {
36 label = "green:ethblue_act";
37 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
38 };
39
40 power {
41 label = "green:power";
42 gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
43 linux,default-trigger = "default-on";
44 };
45
46 led_system: system {
47 label = "green:system";
48 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
49 linux,default-trigger = "disk-activity";
50 };
51 };
52 };
53
54 &sdhci {
55 status = "okay";
56 };
57
58 &spi0 {
59 status = "okay";
60
61 flash@0 {
62 compatible = "jedec,spi-nor";
63 reg = <0>;
64 spi-max-frequency = <50000000>;
65 broken-flash-reset;
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 compatible = "denx,uimage";
92 label = "firmware";
93 reg = <0x50000 0x1fb0000>;
94 };
95 };
96 };
97 };
98
99 &pcie {
100 status = "okay";
101 };
102
103 &gmac0 {
104 nvmem-cells = <&macaddr_factory_e000>;
105 nvmem-cell-names = "mac-address";
106 };
107
108 &switch0 {
109 ports {
110 port@0 {
111 status = "okay";
112 label = "ethblack";
113 };
114
115 port@4 {
116 status = "okay";
117 label = "ethblue";
118 };
119 };
120 };
121
122 &state_default {
123 gpio {
124 groups = "jtag", "uart3", "wdt";
125 function = "gpio";
126 };
127 };
128
129 &factory {
130 compatible = "nvmem-cells";
131 #address-cells = <1>;
132 #size-cells = <1>;
133
134 macaddr_factory_e000: macaddr@e000 {
135 reg = <0xe000 0x6>;
136 };
137 };