6bdba25b2b4ce63361a19601f27c581868291493
[openwrt/openwrt.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 = "GnuBee 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 power {
31 label = "green:power";
32 gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
33 linux,default-trigger = "default-on";
34 };
35
36 led_system: system {
37 label = "green:system";
38 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
39 linux,default-trigger = "disk-activity";
40 };
41 };
42 };
43
44 &sdhci {
45 status = "okay";
46 };
47
48 &spi0 {
49 status = "okay";
50
51 flash@0 {
52 compatible = "jedec,spi-nor";
53 reg = <0>;
54 spi-max-frequency = <50000000>;
55 broken-flash-reset;
56
57 partitions {
58 compatible = "fixed-partitions";
59 #address-cells = <1>;
60 #size-cells = <1>;
61
62 partition@0 {
63 label = "u-boot";
64 reg = <0x0 0x30000>;
65 read-only;
66 };
67
68 partition@30000 {
69 label = "u-boot-env";
70 reg = <0x30000 0x10000>;
71 read-only;
72 };
73
74 factory: partition@40000 {
75 label = "factory";
76 reg = <0x40000 0x10000>;
77 read-only;
78
79 nvmem-layout {
80 compatible = "fixed-layout";
81 #address-cells = <1>;
82 #size-cells = <1>;
83
84 macaddr_factory_e000: macaddr@e000 {
85 reg = <0xe000 0x6>;
86 };
87 };
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 &gmac1 {
109 status = "okay";
110 label = "ethblue";
111 phy-handle = <&ethphy4>;
112
113 nvmem-cells = <&macaddr_factory_e000>;
114 nvmem-cell-names = "mac-address";
115 };
116
117 &mdio {
118 ethphy4: ethernet-phy@4 {
119 reg = <4>;
120 };
121 };
122
123 &switch0 {
124 ports {
125 port@0 {
126 status = "okay";
127 label = "ethblack";
128 };
129 };
130 };
131
132 &state_default {
133 gpio {
134 groups = "jtag", "uart3", "wdt";
135 function = "gpio";
136 };
137 };