1// SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2/dts-v1/;
3
4#include "mt7621.dtsi"
5
6#include <dt-bindings/gpio/gpio.h>
7#include <dt-bindings/input/input.h>
8
9/ {
10	compatible = "gnubee,gb-pc1", "mediatek,mt7621-soc";
11	model = "GB-PC1";
12
13	memory@0 {
14		device_type = "memory";
15		reg = <0x0 0x1c000000>, <0x20000000 0x4000000>;
16	};
17
18	chosen {
19		bootargs = "console=ttyS0,57600";
20	};
21
22	palmbus: palmbus@1e000000 {
23		i2c@900 {
24			status = "okay";
25		};
26	};
27
28	gpio-keys {
29		compatible = "gpio-keys";
30
31		reset {
32			label = "reset";
33			gpios = <&gpio 18 GPIO_ACTIVE_HIGH>;
34			linux,code = <KEY_RESTART>;
35		};
36	};
37
38	gpio-leds {
39		compatible = "gpio-leds";
40
41		system {
42			label = "gb-pc1:green:system";
43			gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
44		};
45
46		status {
47			label = "gb-pc1:green:status";
48			gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
49		};
50
51		lan1 {
52			label = "gb-pc1:green:lan1";
53			gpios = <&gpio 24 GPIO_ACTIVE_LOW>;
54		};
55
56		lan2 {
57			label = "gb-pc1:green:lan2";
58			gpios = <&gpio 25 GPIO_ACTIVE_LOW>;
59		};
60	};
61};
62
63&sdhci {
64	status = "okay";
65};
66
67&spi0 {
68	status = "okay";
69
70	m25p80@0 {
71		#address-cells = <1>;
72		#size-cells = <1>;
73		compatible = "jedec,spi-nor";
74		reg = <0>;
75		spi-max-frequency = <50000000>;
76		broken-flash-reset;
77
78		partition@0 {
79			label = "u-boot";
80			reg = <0x0 0x30000>;
81			read-only;
82		};
83
84		partition@30000 {
85			label = "u-boot-env";
86			reg = <0x30000 0x10000>;
87			read-only;
88		};
89
90		factory: partition@40000 {
91			label = "factory";
92			reg = <0x40000 0x10000>;
93			read-only;
94		};
95
96		partition@50000 {
97			label = "firmware";
98			reg = <0x50000 0x1FB0000>;
99		};
100
101	};
102};
103
104&pcie {
105	status = "okay";
106};
107
108&pinctrl {
109	state_default: pinctrl0 {
110		default_gpio: gpio {
111			groups = "wdt", "rgmii2", "uart3";
112			function = "gpio";
113		};
114	};
115};
116
117&switch0 {
118	ports {
119		port@0 {
120			label = "ethblack";
121			status = "ok";
122		};
123		port@4 {
124			label = "ethblue";
125			status = "ok";
126		};
127	};
128};
129