1c9ccf3a3SEmmanuel Vadot// SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2c9ccf3a3SEmmanuel Vadot/dts-v1/;
3c9ccf3a3SEmmanuel Vadot
4c9ccf3a3SEmmanuel Vadot#include "mt7621.dtsi"
5c9ccf3a3SEmmanuel Vadot
6c9ccf3a3SEmmanuel Vadot#include <dt-bindings/gpio/gpio.h>
7c9ccf3a3SEmmanuel Vadot#include <dt-bindings/input/input.h>
8c9ccf3a3SEmmanuel Vadot
9c9ccf3a3SEmmanuel Vadot/ {
10c9ccf3a3SEmmanuel Vadot	compatible = "gnubee,gb-pc2", "mediatek,mt7621-soc";
11*84943d6fSEmmanuel Vadot	model = "GnuBee GB-PC2";
12c9ccf3a3SEmmanuel Vadot
13c9ccf3a3SEmmanuel Vadot	memory@0 {
14c9ccf3a3SEmmanuel Vadot		device_type = "memory";
15c9ccf3a3SEmmanuel Vadot		reg = <0x00000000 0x1c000000>,
16c9ccf3a3SEmmanuel Vadot		      <0x20000000 0x04000000>;
17c9ccf3a3SEmmanuel Vadot	};
18c9ccf3a3SEmmanuel Vadot
19c9ccf3a3SEmmanuel Vadot	chosen {
20c9ccf3a3SEmmanuel Vadot		bootargs = "console=ttyS0,57600";
21c9ccf3a3SEmmanuel Vadot	};
22c9ccf3a3SEmmanuel Vadot
23c9ccf3a3SEmmanuel Vadot	gpio-keys {
24c9ccf3a3SEmmanuel Vadot		compatible = "gpio-keys";
25c9ccf3a3SEmmanuel Vadot
26b97ee269SEmmanuel Vadot		key-reset {
27c9ccf3a3SEmmanuel Vadot			label = "reset";
28c9ccf3a3SEmmanuel Vadot			gpios = <&gpio 18 GPIO_ACTIVE_HIGH>;
29c9ccf3a3SEmmanuel Vadot			linux,code = <KEY_RESTART>;
30c9ccf3a3SEmmanuel Vadot		};
31c9ccf3a3SEmmanuel Vadot	};
327ef62cebSEmmanuel Vadot
337ef62cebSEmmanuel Vadot	gpio-leds {
347ef62cebSEmmanuel Vadot		compatible = "gpio-leds";
357ef62cebSEmmanuel Vadot
36cb7aa33aSEmmanuel Vadot		led-ethblack-green {
377ef62cebSEmmanuel Vadot			label = "green:ethblack";
387ef62cebSEmmanuel Vadot			gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
39c9ccf3a3SEmmanuel Vadot		};
40c9ccf3a3SEmmanuel Vadot
41cb7aa33aSEmmanuel Vadot		led-ethblue-green {
427ef62cebSEmmanuel Vadot			label = "green:ethblue";
437ef62cebSEmmanuel Vadot			gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
447ef62cebSEmmanuel Vadot		};
457ef62cebSEmmanuel Vadot
46cb7aa33aSEmmanuel Vadot		led-ethyellow-green {
477ef62cebSEmmanuel Vadot			label = "green:ethyellow";
487ef62cebSEmmanuel Vadot			gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
497ef62cebSEmmanuel Vadot		};
507ef62cebSEmmanuel Vadot
51cb7aa33aSEmmanuel Vadot		led-ethyellow-orange {
527ef62cebSEmmanuel Vadot			label = "orange:ethyellow";
537ef62cebSEmmanuel Vadot			gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
547ef62cebSEmmanuel Vadot		};
557ef62cebSEmmanuel Vadot
56cb7aa33aSEmmanuel Vadot		led-power {
577ef62cebSEmmanuel Vadot			label = "green:power";
587ef62cebSEmmanuel Vadot			gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
597ef62cebSEmmanuel Vadot			linux,default-trigger = "default-on";
607ef62cebSEmmanuel Vadot		};
617ef62cebSEmmanuel Vadot
62cb7aa33aSEmmanuel Vadot		led-system {
637ef62cebSEmmanuel Vadot			label = "green:system";
647ef62cebSEmmanuel Vadot			gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
657ef62cebSEmmanuel Vadot			linux,default-trigger = "disk-activity";
667ef62cebSEmmanuel Vadot		};
677ef62cebSEmmanuel Vadot	};
687ef62cebSEmmanuel Vadot};
697ef62cebSEmmanuel Vadot
707ef62cebSEmmanuel Vadot&mmc {
71c9ccf3a3SEmmanuel Vadot	status = "okay";
72c9ccf3a3SEmmanuel Vadot};
73c9ccf3a3SEmmanuel Vadot
74c9ccf3a3SEmmanuel Vadot&spi0 {
75c9ccf3a3SEmmanuel Vadot	status = "okay";
76c9ccf3a3SEmmanuel Vadot
77d5b0e70fSEmmanuel Vadot	flash@0 {
78c9ccf3a3SEmmanuel Vadot		#address-cells = <1>;
79c9ccf3a3SEmmanuel Vadot		#size-cells = <1>;
80c9ccf3a3SEmmanuel Vadot		compatible = "jedec,spi-nor";
81c9ccf3a3SEmmanuel Vadot		reg = <0>;
82c9ccf3a3SEmmanuel Vadot		spi-max-frequency = <50000000>;
83c9ccf3a3SEmmanuel Vadot		broken-flash-reset;
84c9ccf3a3SEmmanuel Vadot
85c9ccf3a3SEmmanuel Vadot		partition@0 {
86c9ccf3a3SEmmanuel Vadot			label = "u-boot";
87c9ccf3a3SEmmanuel Vadot			reg = <0x0 0x30000>;
88c9ccf3a3SEmmanuel Vadot			read-only;
89c9ccf3a3SEmmanuel Vadot		};
90c9ccf3a3SEmmanuel Vadot
91c9ccf3a3SEmmanuel Vadot		partition@30000 {
92c9ccf3a3SEmmanuel Vadot			label = "u-boot-env";
93c9ccf3a3SEmmanuel Vadot			reg = <0x30000 0x10000>;
94c9ccf3a3SEmmanuel Vadot			read-only;
95c9ccf3a3SEmmanuel Vadot		};
96c9ccf3a3SEmmanuel Vadot
97c9ccf3a3SEmmanuel Vadot		factory: partition@40000 {
98c9ccf3a3SEmmanuel Vadot			label = "factory";
99c9ccf3a3SEmmanuel Vadot			reg = <0x40000 0x10000>;
100c9ccf3a3SEmmanuel Vadot			read-only;
101c9ccf3a3SEmmanuel Vadot		};
102c9ccf3a3SEmmanuel Vadot
103c9ccf3a3SEmmanuel Vadot		partition@50000 {
104c9ccf3a3SEmmanuel Vadot			label = "firmware";
105c9ccf3a3SEmmanuel Vadot			reg = <0x50000 0x1fb0000>;
106c9ccf3a3SEmmanuel Vadot		};
107c9ccf3a3SEmmanuel Vadot	};
108c9ccf3a3SEmmanuel Vadot};
109c9ccf3a3SEmmanuel Vadot
110c9ccf3a3SEmmanuel Vadot&pcie {
111c9ccf3a3SEmmanuel Vadot	status = "okay";
112c9ccf3a3SEmmanuel Vadot};
113c9ccf3a3SEmmanuel Vadot
114d5b0e70fSEmmanuel Vadot&gmac1 {
1158bab661aSEmmanuel Vadot	phy-mode = "rgmii-rxid";
1167ef62cebSEmmanuel Vadot	phy-handle = <&ethphy5>;
117cb7aa33aSEmmanuel Vadot
118cb7aa33aSEmmanuel Vadot	fixed-link {
119cb7aa33aSEmmanuel Vadot		status = "disabled";
120cb7aa33aSEmmanuel Vadot	};
121c9ccf3a3SEmmanuel Vadot};
122c9ccf3a3SEmmanuel Vadot
123d5b0e70fSEmmanuel Vadot&mdio {
1247ef62cebSEmmanuel Vadot	ethphy5: ethernet-phy@5 {
1257ef62cebSEmmanuel Vadot		reg = <5>;
126c9ccf3a3SEmmanuel Vadot	};
127c9ccf3a3SEmmanuel Vadot};
128c9ccf3a3SEmmanuel Vadot
129c9ccf3a3SEmmanuel Vadot&switch0 {
130c9ccf3a3SEmmanuel Vadot	ports {
131c9ccf3a3SEmmanuel Vadot		port@0 {
132c9ccf3a3SEmmanuel Vadot			status = "okay";
133c9ccf3a3SEmmanuel Vadot			label = "ethblack";
134c9ccf3a3SEmmanuel Vadot		};
135c9ccf3a3SEmmanuel Vadot
136c9ccf3a3SEmmanuel Vadot		port@4 {
137c9ccf3a3SEmmanuel Vadot			status = "okay";
138c9ccf3a3SEmmanuel Vadot			label = "ethblue";
139c9ccf3a3SEmmanuel Vadot		};
140cb7aa33aSEmmanuel Vadot
141cb7aa33aSEmmanuel Vadot		port@5 {
142cb7aa33aSEmmanuel Vadot			status = "disabled";
143cb7aa33aSEmmanuel Vadot		};
144c9ccf3a3SEmmanuel Vadot	};
145c9ccf3a3SEmmanuel Vadot};
146