2018-02-04 16:24:15 -08:00
|
|
|
#include "mt7621.dtsi"
|
|
|
|
|
|
|
|
#include <dt-bindings/gpio/gpio.h>
|
|
|
|
#include <dt-bindings/input/input.h>
|
|
|
|
|
|
|
|
/ {
|
|
|
|
compatible = "gnubee,gb-pc2", "mediatek,mt7621-soc";
|
|
|
|
model = "GB-PC2";
|
|
|
|
|
2018-07-16 16:27:22 +08:00
|
|
|
aliases {
|
2022-07-05 17:10:43 +03:00
|
|
|
led-boot = &led_system;
|
|
|
|
led-failsafe = &led_system;
|
|
|
|
led-running = &led_system;
|
|
|
|
led-upgrade = &led_system;
|
2018-07-16 16:27:22 +08:00
|
|
|
};
|
|
|
|
|
2018-12-30 12:17:25 +01:00
|
|
|
keys {
|
2019-09-20 14:03:02 +02:00
|
|
|
compatible = "gpio-keys";
|
2018-02-04 16:24:15 -08:00
|
|
|
|
|
|
|
reset {
|
|
|
|
label = "reset";
|
2020-03-04 05:22:24 +08:00
|
|
|
gpios = <&gpio 18 GPIO_ACTIVE_HIGH>;
|
2018-02-04 16:24:15 -08:00
|
|
|
linux,code = <KEY_RESTART>;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2018-12-30 12:42:53 +01:00
|
|
|
leds {
|
2018-02-04 16:24:15 -08:00
|
|
|
compatible = "gpio-leds";
|
|
|
|
|
2022-09-14 21:30:59 +03:00
|
|
|
ethblack-green {
|
|
|
|
label = "green:ethblack";
|
2022-07-05 17:10:43 +03:00
|
|
|
gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
|
2018-02-04 16:24:15 -08:00
|
|
|
};
|
|
|
|
|
2022-09-14 21:30:59 +03:00
|
|
|
ethblue-green {
|
|
|
|
label = "green:ethblue";
|
2022-07-05 17:10:43 +03:00
|
|
|
gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
|
2018-02-04 16:24:15 -08:00
|
|
|
};
|
|
|
|
|
2022-09-14 21:30:59 +03:00
|
|
|
ethyellow-green {
|
|
|
|
label = "green:ethyellow";
|
|
|
|
gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
|
|
|
|
};
|
|
|
|
|
|
|
|
ethyellow-orange {
|
|
|
|
label = "orange:ethyellow";
|
|
|
|
gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
|
|
|
|
};
|
|
|
|
|
2022-07-05 17:10:43 +03:00
|
|
|
power {
|
|
|
|
label = "green:power";
|
|
|
|
gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
|
|
|
|
linux,default-trigger = "default-on";
|
2018-02-04 16:24:15 -08:00
|
|
|
};
|
|
|
|
|
2022-07-05 17:10:43 +03:00
|
|
|
led_system: system {
|
|
|
|
label = "green:system";
|
|
|
|
gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
|
|
|
|
linux,default-trigger = "disk-activity";
|
2018-02-04 16:24:15 -08:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
&sdhci {
|
|
|
|
status = "okay";
|
|
|
|
};
|
|
|
|
|
|
|
|
&spi0 {
|
|
|
|
status = "okay";
|
|
|
|
|
2020-05-07 23:15:27 +09:00
|
|
|
flash@0 {
|
2018-02-04 16:24:15 -08:00
|
|
|
compatible = "jedec,spi-nor";
|
|
|
|
reg = <0>;
|
2022-07-05 17:10:43 +03:00
|
|
|
spi-max-frequency = <50000000>;
|
2020-04-06 18:33:30 +08:00
|
|
|
broken-flash-reset;
|
2018-02-04 16:24:15 -08:00
|
|
|
|
2018-08-01 21:32:34 +01:00
|
|
|
partitions {
|
|
|
|
compatible = "fixed-partitions";
|
|
|
|
#address-cells = <1>;
|
|
|
|
#size-cells = <1>;
|
|
|
|
|
|
|
|
partition@0 {
|
|
|
|
label = "u-boot";
|
|
|
|
reg = <0x0 0x30000>;
|
|
|
|
read-only;
|
|
|
|
};
|
|
|
|
|
|
|
|
partition@30000 {
|
|
|
|
label = "u-boot-env";
|
|
|
|
reg = <0x30000 0x10000>;
|
|
|
|
read-only;
|
|
|
|
};
|
|
|
|
|
|
|
|
factory: partition@40000 {
|
|
|
|
label = "factory";
|
|
|
|
reg = <0x40000 0x10000>;
|
|
|
|
read-only;
|
|
|
|
};
|
|
|
|
|
|
|
|
partition@50000 {
|
2018-11-28 12:28:35 +09:00
|
|
|
compatible = "denx,uimage";
|
2018-08-01 21:32:34 +01:00
|
|
|
label = "firmware";
|
|
|
|
reg = <0x50000 0x1fb0000>;
|
|
|
|
};
|
2018-02-04 16:24:15 -08:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
&pcie {
|
|
|
|
status = "okay";
|
|
|
|
};
|
|
|
|
|
2022-07-05 17:10:43 +03:00
|
|
|
&gmac0 {
|
|
|
|
nvmem-cells = <&macaddr_factory_e000>;
|
|
|
|
nvmem-cell-names = "mac-address";
|
2022-02-14 10:00:40 +03:00
|
|
|
};
|
|
|
|
|
2022-07-05 17:10:43 +03:00
|
|
|
&gmac1 {
|
|
|
|
status = "okay";
|
|
|
|
label = "ethyellow";
|
2022-11-29 00:33:37 +03:00
|
|
|
phy-mode = "rgmii-rxid";
|
2022-07-05 17:10:43 +03:00
|
|
|
phy-handle = <ðphy5>;
|
|
|
|
|
2021-04-02 23:50:02 +02:00
|
|
|
nvmem-cells = <&macaddr_factory_e000>;
|
|
|
|
nvmem-cell-names = "mac-address";
|
2018-02-04 16:24:15 -08:00
|
|
|
};
|
|
|
|
|
2022-07-05 17:10:43 +03:00
|
|
|
&mdio {
|
|
|
|
ethphy5: ethernet-phy@5 {
|
|
|
|
reg = <5>;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2020-03-18 23:38:58 +08:00
|
|
|
&switch0 {
|
|
|
|
ports {
|
|
|
|
port@0 {
|
|
|
|
status = "okay";
|
2022-07-05 17:10:43 +03:00
|
|
|
label = "ethblack";
|
2020-03-18 23:38:58 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
port@4 {
|
|
|
|
status = "okay";
|
2022-07-05 17:10:43 +03:00
|
|
|
label = "ethblue";
|
2020-03-18 23:38:58 +08:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2019-12-22 21:26:01 +01:00
|
|
|
&state_default {
|
|
|
|
gpio {
|
2022-07-05 17:10:43 +03:00
|
|
|
groups = "jtag", "uart3", "wdt";
|
2020-03-13 21:27:03 +08:00
|
|
|
function = "gpio";
|
2018-02-04 16:24:15 -08:00
|
|
|
};
|
|
|
|
};
|
2021-04-02 23:50:02 +02:00
|
|
|
|
|
|
|
&factory {
|
|
|
|
compatible = "nvmem-cells";
|
|
|
|
#address-cells = <1>;
|
|
|
|
#size-cells = <1>;
|
|
|
|
|
|
|
|
macaddr_factory_e000: macaddr@e000 {
|
|
|
|
reg = <0xe000 0x6>;
|
|
|
|
};
|
|
|
|
};
|