ramips: add support for D-Link DRA-1360
[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
80 partition@50000 {
81 compatible = "denx,uimage";
82 label = "firmware";
83 reg = <0x50000 0x1fb0000>;
84 };
85 };
86 };
87 };
88
89 &pcie {
90 status = "okay";
91 };
92
93 &gmac0 {
94 nvmem-cells = <&macaddr_factory_e000>;
95 nvmem-cell-names = "mac-address";
96 };
97
98 &gmac1 {
99 status = "okay";
100 label = "ethblue";
101 phy-handle = <&ethphy4>;
102
103 nvmem-cells = <&macaddr_factory_e000>;
104 nvmem-cell-names = "mac-address";
105 };
106
107 &mdio {
108 ethphy4: ethernet-phy@4 {
109 reg = <4>;
110 };
111 };
112
113 &switch0 {
114 ports {
115 port@0 {
116 status = "okay";
117 label = "ethblack";
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 };