|
|
@@ -0,0 +1,222 @@
|
|
|
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
|
|
|
+
|
|
|
+/dts-v1/;
|
|
|
+
|
|
|
+#include <dt-bindings/gpio/gpio.h>
|
|
|
+#include <dt-bindings/input/input.h>
|
|
|
+#include <dt-bindings/leds/common.h>
|
|
|
+
|
|
|
+#include "mt7981b.dtsi"
|
|
|
+
|
|
|
+/ {
|
|
|
+ model = "Airpi AP3000M";
|
|
|
+ compatible = "airpi,ap3000m", "mediatek,mt7981";
|
|
|
+
|
|
|
+ aliases {
|
|
|
+ ethernet0 = &gmac0;
|
|
|
+ ethernet1 = &gmac1;
|
|
|
+ serial0 = &uart0;
|
|
|
+
|
|
|
+ led-boot = &led_sys_blue;
|
|
|
+ led-failsafe = &led_sys_blue;
|
|
|
+ led-running = &led_sys_blue;
|
|
|
+ led-upgrade = &led_sys_blue;
|
|
|
+ };
|
|
|
+
|
|
|
+ chosen {
|
|
|
+ stdout-path = "serial0:115200n8";
|
|
|
+ bootargs = "root=PARTLABEL=rootfs rootwait";
|
|
|
+ };
|
|
|
+
|
|
|
+ memory {
|
|
|
+ reg = <0 0x40000000 0 0x40000000>;
|
|
|
+ device_type = "memory";
|
|
|
+ };
|
|
|
+
|
|
|
+ gpio-keys {
|
|
|
+ compatible = "gpio-keys";
|
|
|
+
|
|
|
+ reset {
|
|
|
+ label = "reset";
|
|
|
+ linux,code = <KEY_RESTART>;
|
|
|
+ gpios = <&pio 1 GPIO_ACTIVE_LOW>;
|
|
|
+ };
|
|
|
+
|
|
|
+ wps {
|
|
|
+ label = "wps";
|
|
|
+ linux,code = <KEY_WPS_BUTTON>;
|
|
|
+ gpios = <&pio 0 GPIO_ACTIVE_LOW>;
|
|
|
+ };
|
|
|
+ };
|
|
|
+
|
|
|
+ gpio-leds {
|
|
|
+ compatible = "gpio-leds";
|
|
|
+
|
|
|
+ led_sys_blue: led-0 {
|
|
|
+ function = LED_FUNCTION_STATUS;
|
|
|
+ color = <LED_COLOR_ID_BLUE>;
|
|
|
+ gpios = <&pio 13 GPIO_ACTIVE_LOW>;
|
|
|
+ };
|
|
|
+
|
|
|
+ led-1 {
|
|
|
+ function = LED_FUNCTION_WLAN_2GHZ;
|
|
|
+ color = <LED_COLOR_ID_ORANGE>;
|
|
|
+ gpios = <&pio 34 GPIO_ACTIVE_LOW>;
|
|
|
+ linux,default-trigger = "phy0tpt";
|
|
|
+ };
|
|
|
+
|
|
|
+ led-2 {
|
|
|
+ function = LED_FUNCTION_WLAN_5GHZ;
|
|
|
+ color = <LED_COLOR_ID_WHITE>;
|
|
|
+ gpios = <&pio 35 GPIO_ACTIVE_LOW>;
|
|
|
+ linux,default-trigger = "phy1tpt";
|
|
|
+ };
|
|
|
+ };
|
|
|
+
|
|
|
+ reg_3p3v: regulator-3p3v {
|
|
|
+ compatible = "regulator-fixed";
|
|
|
+ regulator-name = "fixed-3.3V";
|
|
|
+ regulator-min-microvolt = <3300000>;
|
|
|
+ regulator-max-microvolt = <3300000>;
|
|
|
+ regulator-boot-on;
|
|
|
+ regulator-always-on;
|
|
|
+ };
|
|
|
+
|
|
|
+ reg_5v: regulator-5v {
|
|
|
+ compatible = "regulator-fixed";
|
|
|
+ regulator-name = "fixed-5V";
|
|
|
+ regulator-min-microvolt = <5000000>;
|
|
|
+ regulator-max-microvolt = <5000000>;
|
|
|
+ regulator-boot-on;
|
|
|
+ regulator-always-on;
|
|
|
+ };
|
|
|
+};
|
|
|
+
|
|
|
+&mmc0 {
|
|
|
+ pinctrl-names = "default", "state_uhs";
|
|
|
+ pinctrl-0 = <&mmc0_pins_default>;
|
|
|
+ pinctrl-1 = <&mmc0_pins_uhs>;
|
|
|
+ bus-width = <8>;
|
|
|
+ cap-mmc-highspeed;
|
|
|
+ max-frequency = <52000000>;
|
|
|
+ vmmc-supply = <®_3p3v>;
|
|
|
+ no-sd;
|
|
|
+ no-sdio;
|
|
|
+ non-removable;
|
|
|
+ status = "okay";
|
|
|
+
|
|
|
+ card@0 {
|
|
|
+ compatible = "mmc-card";
|
|
|
+ reg = <0>;
|
|
|
+
|
|
|
+ block {
|
|
|
+ compatible = "block-device";
|
|
|
+
|
|
|
+ partitions {
|
|
|
+ block-partition-factory {
|
|
|
+ partname = "factory";
|
|
|
+
|
|
|
+ nvmem-layout {
|
|
|
+ compatible = "fixed-layout";
|
|
|
+ #address-cells = <1>;
|
|
|
+ #size-cells = <1>;
|
|
|
+
|
|
|
+ eeprom_factory_0: eeprom@0 {
|
|
|
+ reg = <0x0 0x1000>;
|
|
|
+ };
|
|
|
+ };
|
|
|
+ };
|
|
|
+ };
|
|
|
+ };
|
|
|
+ };
|
|
|
+};
|
|
|
+
|
|
|
+ð {
|
|
|
+ pinctrl-names = "default";
|
|
|
+ pinctrl-0 = <&mdio_pins>;
|
|
|
+ status = "okay";
|
|
|
+
|
|
|
+ gmac0: mac@0 {
|
|
|
+ compatible = "mediatek,eth-mac";
|
|
|
+ reg = <0>;
|
|
|
+ phy-mode = "2500base-x";
|
|
|
+ phy-handle = <&phy1>;
|
|
|
+ };
|
|
|
+
|
|
|
+ gmac1: mac@1 {
|
|
|
+ compatible = "mediatek,eth-mac";
|
|
|
+ reg = <1>;
|
|
|
+ phy-mode = "gmii";
|
|
|
+ phy-handle = <&int_gbe_phy>;
|
|
|
+ };
|
|
|
+};
|
|
|
+
|
|
|
+&mdio_bus {
|
|
|
+ phy1: ethernet-phy@1 {
|
|
|
+ compatible = "ethernet-phy-ieee802.3-c45";
|
|
|
+ reg = <1>;
|
|
|
+ reset-assert-us = <100000>;
|
|
|
+ reset-deassert-us = <100000>;
|
|
|
+ reset-gpios = <&pio 39 GPIO_ACTIVE_LOW>;
|
|
|
+ interrupts = <38 IRQ_TYPE_LEVEL_LOW>;
|
|
|
+ interrupt-parent = <&pio>;
|
|
|
+ realtek,aldps-enable;
|
|
|
+ };
|
|
|
+};
|
|
|
+
|
|
|
+&pio {
|
|
|
+ mmc0_pins_default: mmc0-pins-default {
|
|
|
+ mux {
|
|
|
+ function = "flash";
|
|
|
+ groups = "emmc_45";
|
|
|
+ };
|
|
|
+ };
|
|
|
+
|
|
|
+ mmc0_pins_uhs: mmc0-pins-uhs {
|
|
|
+ mux {
|
|
|
+ function = "flash";
|
|
|
+ groups = "emmc_45";
|
|
|
+ };
|
|
|
+ };
|
|
|
+
|
|
|
+ pwm2_pins: pwm2-pins {
|
|
|
+ mux {
|
|
|
+ function = "pwm";
|
|
|
+ groups = "pwm2";
|
|
|
+ };
|
|
|
+ };
|
|
|
+};
|
|
|
+
|
|
|
+&pwm {
|
|
|
+ pinctrl-names = "default";
|
|
|
+ pinctrl-0 = <&pwm2_pins>;
|
|
|
+ status = "okay";
|
|
|
+};
|
|
|
+
|
|
|
+&fan {
|
|
|
+ pwms = <&pwm 2 40000 0>;
|
|
|
+ status = "okay";
|
|
|
+};
|
|
|
+
|
|
|
+&uart0 {
|
|
|
+ status = "okay";
|
|
|
+};
|
|
|
+
|
|
|
+&usb_phy {
|
|
|
+ status = "okay";
|
|
|
+};
|
|
|
+
|
|
|
+&watchdog {
|
|
|
+ status = "okay";
|
|
|
+};
|
|
|
+
|
|
|
+&xhci {
|
|
|
+ vbus-supply = <®_5v>;
|
|
|
+ status = "okay";
|
|
|
+};
|
|
|
+
|
|
|
+&wifi {
|
|
|
+ nvmem-cells = <&eeprom_factory_0>;
|
|
|
+ nvmem-cell-names = "eeprom";
|
|
|
+ status = "okay";
|
|
|
+};
|