]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
mediatek: dts: bring mt7988a.dtsi closer to upstream
authorDaniel Golle <daniel@makrotopia.org>
Thu, 8 May 2025 16:48:27 +0000 (17:48 +0100)
committerDaniel Golle <daniel@makrotopia.org>
Mon, 26 May 2025 15:58:03 +0000 (16:58 +0100)
In preparation of using the upstream mt7988a.dtsi when switching
to Linux 6.12 prepare by bringing our downstream version closer to
what went upstream.
 * rename 'xphy' -> 'xsphy'
 * rename 'uart[012]' -> 'serial[012]'
 * only list pinctrl settings directly used in mt7988a.dtsi there,
   leave it to boards to define all additional pinctrl settings
   they need.
 * move fan and thermal-zone to board level

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
target/linux/mediatek/dts/mt7988a-arcadyan-mozart.dts
target/linux/mediatek/dts/mt7988a-smartrg-mt-stuart.dtsi
target/linux/mediatek/dts/mt7988d-asus-zenwifi-bt8.dts
target/linux/mediatek/dts/mt7988d-asus-zenwifi-bt8.dtsi
target/linux/mediatek/dts/mt7988d-smartrg-SDG-8733A.dts
target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dtsi
target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a-rfb.dts
target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a.dtsi
target/linux/mediatek/filogic/base-files/etc/board.d/01_leds

index f6752e340aabb47262b43ba5e0204ade50d92731..f6ee498ae062414e90571f470986ef354c2af220 100644 (file)
@@ -11,7 +11,7 @@
        model = "MediaTek / Arcadyan - Mozart";
 
        aliases {
-               serial0 = &uart0;
+               serial0 = &serial0;
                led-boot = &led_status_blue;
                led-failsafe = &led_status_red;
                led-running = &led_status_green;
                        gpios = <&pio 13 GPIO_ACTIVE_LOW>;
                };
        };
-};
 
-&pio {
-       mdio0_pins: mdio0-pins {
-               mux {
-                       function = "eth";
-                       groups = "mdc_mdio0";
-               };
+       fan: pwm-fan {
+               compatible = "pwm-fan";
+               #cooling-cells = <2>;
+               #thermal-sensor-cells = <1>;
+               /* cooling level (0, 1, 2) : (0% duty, 50% duty, 100% duty) */
+               cooling-levels = <0 128 255>;
+               pwms = <&pwm 1 40000 0>;
 
-               conf {
-                       groups = "mdc_mdio0";
-                       drive-strength = <MTK_DRIVE_10mA>;
-               };
-       };
-
-       spic_pins: spi1-pins {
-               mux {
-                       function = "spi";
-                       groups = "spi1";
-               };
+               status = "okay";
        };
 };
 
        };
 };
 
-&uart1 {
-       status = "okay";
-};
-
-&fan {
-       pwms = <&pwm 1 40000 0>;
+&serial1 {
        status = "okay";
 };
 
 &spi1 {
        pinctrl-names = "default";
        /* pin shared with snfi */
-       pinctrl-0 = <&spic_pins>;
+       pinctrl-0 = <&spi1_pins>;
        status = "disabled";
 };
 
index 058a96f253c74e497ec220ac8652b447a8422b27..302e8a810116d24aa7e6238dc00a074943eaea8a 100644 (file)
@@ -14,7 +14,7 @@
 
 / {
        aliases {
-               serial0 = &uart0;
+               serial0 = &serial0;
                label-mac-device = &gmac1;
                led-boot = &led_sys_green;
                led-failsafe = &led_sys_blue;
@@ -23,7 +23,7 @@
        };
 
        chosen {
-               stdout-path = &uart0;
+               stdout-path = &serial0;
                bootargs = "console=ttyS0,115200n1 loglevel=8 pci=pcie_bus_perf root=PARTLABEL=rootfs";
        };
 
                        gpios = <&pio 63 GPIO_ACTIVE_HIGH>;
                };
        };
+
+       fan: pwm-fan {
+               compatible = "pwm-fan";
+               #cooling-cells = <2>;
+               #thermal-sensor-cells = <1>;
+
+               pwms = <&pwm 0 40000 0>;
+
+               /**
+                * set fan speed
+                *
+                * 0 = off
+                * 61 = 24% duty cycle
+                * 77 = 30% duty cycle
+                * 102 = 40% duty cycle
+                * 128 - 50% duty cycle
+                * 255 = 100% duty cycle
+                */
+               cooling-levels = <61 77 102 128>;
+
+               interrupt-parent = <&pio>;
+               interrupts = <21 IRQ_TYPE_EDGE_FALLING>;
+               pulses-per-revolution = <2>;
+
+               status = "okay";
+       };
 };
 
 &cpu0 {
        status = "okay";
 };
 
-&fan {
-       pwms = <&pwm 0 40000 0>;
-
-       /**
-        * set fan speed
-        *
-        * 0 = off
-        * 61 = 24% duty cycle
-        * 77 = 30% duty cycle
-        * 102 = 40% duty cycle
-        * 128 - 50% duty cycle
-        * 255 = 100% duty cycle
-        */
-       cooling-levels = <61 77 102 128>;
-
-       interrupt-parent = <&pio>;
-       interrupts = <21 IRQ_TYPE_EDGE_FALLING>;
-       pulses-per-revolution = <2>;
-
-       status = "okay";
-};
-
 &gmac0 {
        nvmem-cells = <&macaddr 1>;
        nvmem-cell-names = "mac-address";
 
 &gsw_phy1_led0 {
        status = "okay";
+       function = LED_FUNCTION_LAN;
        color = <LED_COLOR_ID_GREEN>;
 };
 
 &gsw_phy1_led1 {
        status = "okay";
+       function = LED_FUNCTION_LAN;
        color = <LED_COLOR_ID_AMBER>;
 };
 
 
 &gsw_phy2_led0 {
        status = "okay";
+       function = LED_FUNCTION_LAN;
        color = <LED_COLOR_ID_GREEN>;
 };
 
 &gsw_phy2_led1 {
        status = "okay";
+       function = LED_FUNCTION_LAN;
        color = <LED_COLOR_ID_AMBER>;
 };
 
 
 &gsw_phy3_led0 {
        status = "okay";
+       function = LED_FUNCTION_LAN;
        color = <LED_COLOR_ID_GREEN>;
 };
 
 &gsw_phy3_led1 {
        status = "okay";
+       function = LED_FUNCTION_LAN;
        color = <LED_COLOR_ID_AMBER>;
 };
 
                mediatek,pull-down-adv = <0>; /* bias-disable */
        };
 
+       gbe1_led0_pins: gbe1-led0-pins {
+               mux {
+                       function = "led";
+                       groups = "gbe1_led0";
+               };
+       };
+
+       gbe2_led0_pins: gbe2-led0-pins {
+               mux {
+                       function = "led";
+                       groups = "gbe2_led0";
+               };
+       };
+
+       gbe3_led0_pins: gbe3-led0-pins {
+               mux {
+                       function = "led";
+                       groups = "gbe3_led0";
+               };
+       };
+
+       gbe1_led1_pins: gbe1-led1-pins {
+               mux {
+                       function = "led";
+                       groups = "gbe1_led1";
+               };
+       };
+
+       gbe2_led1_pins: gbe2-led1-pins {
+               mux {
+                       function = "led";
+                       groups = "gbe2_led1";
+               };
+       };
+
+       gbe3_led1_pins: gbe3-led1-pins {
+               mux {
+                       function = "led";
+                       groups = "gbe3_led1";
+               };
+       };
+
+       i2c0_pins: i2c0-g0-pins {
+               mux {
+                       function = "i2c";
+                       groups = "i2c0_1";
+               };
+       };
+
+       i2c1_pins: i2c1-g0-pins {
+               mux {
+                       function = "i2c";
+                       groups = "i2c1_0";
+               };
+       };
+
+       mdio0_pins: mdio0-pins {
+               mux {
+                       function = "eth";
+                       groups = "mdc_mdio0";
+               };
+
+               conf {
+                       groups = "mdc_mdio0";
+                       drive-strength = <MTK_DRIVE_8mA>;
+               };
+       };
+
+       mmc0_pins_emmc_51: mmc0-emmc-51-pins {
+               mux {
+                       function = "flash";
+                       groups = "emmc_51";
+               };
+       };
+
        pcie0_1_pins: pcie0-pins-g1 {
                mux {
                        function = "pcie";
                };
        };
 
+       spi0_flash_pins: spi0-flash-pins {
+               mux {
+                       function = "spi";
+                       groups = "spi0", "spi0_wp_hold";
+               };
+       };
+
        sfp_i2c_pins: sfp-i2c-pins {
                conf-scl {
                        pins = "LED_A";
                        groups = "uart2";
                };
        };
+
+
 };
 
 &pwm {
        status = "okay";
 };
 
-&uart0 {
+&serial0 {
        status = "okay";
 };
 
-&uart1 {
+&serial1 {
        pinctrl-names = "default";
        pinctrl-0 = <&uart1_pins>;
        status = "okay";
        /* Airoha AG3352 GPS */
 };
 
-&uart2 {
+&serial2 {
        pinctrl-names = "default";
        pinctrl-0 = <&uart2_pins>;
        status = "okay";
        status = "okay";
 };
 
-&xphy {
+&xsphy {
        status = "okay";
 };
index 02c1be1457ef3b66c604420ef6e5ad956cbfb282..1f95a01fbe00ecf982d553f7534dc4b3e9213510 100644 (file)
@@ -21,8 +21,8 @@
                compatible = "u-boot-dont-touch-spi-nand";
                reg = <0>;
                spi-max-frequency = <52000000>;
-               spi-tx-buswidth = <4>;
-               spi-rx-buswidth = <4>;
+               spi-tx-bus-width = <4>;
+               spi-rx-bus-width = <4>;
 
                partitions {
                        compatible = "fixed-partitions";
index e865f2a678ade21100025f30bce9869fb8691e47..20e7a3839c6b8a25283964e59a24c09a61a8a036 100644 (file)
@@ -78,7 +78,7 @@
 
 / {
        aliases {
-               serial0 = &uart0;
+               serial0 = &serial0;
                label-mac-device = &gmac0;
                led-boot = &led_status_green;
                led-failsafe = &led_status_red;
        status = "okay";
 };
 
-&int_2p5g_phy {
-       pinctrl-names = "i2p5gbe-led";
-       pinctrl-0 = <&i2p5gbe_led0_pins>;
-};
-
 &gmac2 {
        phy-mode = "2500base-x";
        phy = <&phy5>;
                mediatek,pull-down-adv = <0>; /* bias-disable */
        };
 
+       mdio0_pins: mdio0-pins {
+               mux {
+                       function = "eth";
+                       groups = "mdc_mdio0";
+               };
+
+               conf {
+                       groups = "mdc_mdio0";
+                       drive-strength = <MTK_DRIVE_8mA>;
+               };
+       };
+
+       i2c0_pins: i2c0-g0-pins {
+               mux {
+                       function = "i2c";
+                       groups = "i2c0_1";
+               };
+       };
+
+       spi0_flash_pins: spi0-flash-pins {
+               mux {
+                       function = "spi";
+                       groups = "spi0", "spi0_wp_hold";
+               };
+       };
+
        pcie0_1_pins: pcie0-pins-g1 {
                mux {
                        function = "pcie";
        status = "okay";
 };
 
-&uart0 {
+&serial0 {
        status = "okay";
 };
 
        status = "okay";
 };
 
-&xphy {
+&xsphy {
        status = "okay";
 };
 
index b72ef48bea7fafdc8e7d3c6cffdbdf88c457a748..0d0ecddfae24b64a2e5e5928bde7207ee2c9912c 100644 (file)
 };
 
 &pio {
+       i2p5gbe_led0_pins: 2p5gbe-led0-pins {
+               mux {
+                       function = "led";
+                       groups = "2p5gbe_led0";
+               };
+       };
+
        pcie3_1_pins: pcie3-pins-g1 {
                mux {
                        function = "pcie";
 
 &i2p5gbe_led0 {
        color = <LED_COLOR_ID_GREEN>;
+       function = LED_FUNCTION_LAN;
        status = "okay";
 };
 
        status = "disabled";
 };
 
-&uart1 {
+&serial1 {
        status = "disabled";
 };
 
-&xphy {
+&xsphy {
        status = "disabled";
 };
index 8dba5b4275fbcad2f2a88f0093c774cfe4f98ce2..a1ff582961acd4cc3063666de5099f7b435218be 100644 (file)
                led-failsafe = &led_green;
                led-running = &led_green;
                led-upgrade = &led_green;
-               serial0 = &uart0;
+               serial0 = &serial0;
        };
 
        chosen {
-               stdout-path = &uart0;
+               stdout-path = &serial0;
                bootargs = "console=ttyS0,115200n1 loglevel=8 pci=pcie_bus_perf ubi.block=0,fit root=/dev/fit0 rootwait";
                rootdisk-spim-nand = <&ubi_rootfs>;
        };
                        default-state = "off";
                };
        };
+
+       reg_1p8v: regulator-1p8v {
+               compatible = "regulator-fixed";
+               regulator-name = "fixed-1.8V";
+               regulator-min-microvolt = <1800000>;
+               regulator-max-microvolt = <1800000>;
+               regulator-boot-on;
+               regulator-always-on;
+       };
+
+       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;
+       };
 };
 
 &eth {
 
 &gsw_phy0_led0 {
        status = "okay";
+       function = LED_FUNCTION_WAN;
        color = <LED_COLOR_ID_GREEN>;
 };
 
        pinctrl-0 = <&gbe1_led0_pins>;
 };
 
+&gsw_port1 {
+       label = "lan1";
+};
+
 &gsw_phy1_led0 {
        status = "okay";
+       function = LED_FUNCTION_LAN;
        color = <LED_COLOR_ID_GREEN>;
 };
 
        pinctrl-0 = <&gbe2_led0_pins>;
 };
 
+&gsw_port2 {
+       label = "lan2";
+};
+
 &gsw_phy2_led0 {
        status = "okay";
+       function = LED_FUNCTION_LAN;
        color = <LED_COLOR_ID_GREEN>;
 };
 
        pinctrl-0 = <&gbe3_led0_pins>;
 };
 
+&gsw_port3 {
+       label = "lan3";
+};
+
 &gsw_phy3_led0 {
        status = "okay";
+       function = LED_FUNCTION_LAN;
        color = <LED_COLOR_ID_GREEN>;
 };
 
 };
 
 &pio {
+       mdio0_pins: mdio0-pins {
+               mux {
+                       function = "eth";
+                       groups = "mdc_mdio0";
+               };
+
+               conf {
+                       groups = "mdc_mdio0";
+                       drive-strength = <MTK_DRIVE_8mA>;
+               };
+       };
+
+       i2c0_pins: i2c0-pins-g0 {
+               mux {
+                       function = "i2c";
+                       groups = "i2c0_1";
+               };
+       };
+
+       i2c2_1_pins: i2c2-pins-g1 {
+               mux {
+                       function = "i2c";
+                       groups = "i2c2_1";
+               };
+       };
+
+       gbe0_led0_pins: gbe0-led0-pins {
+               mux {
+                       function = "led";
+                       groups = "gbe0_led0";
+               };
+       };
+
+       gbe1_led0_pins: gbe1-led0-pins {
+               mux {
+                       function = "led";
+                       groups = "gbe1_led0";
+               };
+       };
+
+       gbe2_led0_pins: gbe2-led0-pins {
+               mux {
+                       function = "led";
+                       groups = "gbe2_led0";
+               };
+       };
+
+       gbe3_led0_pins: gbe3-led0-pins {
+               mux {
+                       function = "led";
+                       groups = "gbe3_led0";
+               };
+       };
+
+       i2p5gbe_led0_pins: 2p5gbe-led0-pins {
+               mux {
+                       function = "led";
+                       groups = "2p5gbe_led0";
+               };
+       };
+
+       mmc0_pins_emmc_51: mmc0-pins-emmc-51 {
+               mux {
+                       function = "flash";
+                       groups = "emmc_51";
+               };
+       };
+
+       mmc0_pins_sdcard: mmc0-pins-sdcard {
+               mux {
+                       function = "flash";
+                       groups = "sdcard";
+               };
+       };
+
        pwm0_pins: pwm0-pins {
                mux {
                        groups = "pwm0";
                        function = "pwm";
                };
        };
+
+       uart0_pins: uart0-pins {
+               mux {
+                       function = "uart";
+                       groups =  "uart0";
+               };
+       };
+
+       uart1_2_lite_pins: uart1-2-lite-pins {
+               mux {
+                       function = "uart";
+                       groups =  "uart1_2_lite";
+               };
+       };
+
+       uart2_3_pins: uart2-3-pins {
+               mux {
+                       function = "uart";
+                       groups =  "uart2_3";
+               };
+       };
+
+       spi0_flash_pins: spi0-flash-pins {
+               mux {
+                       function = "spi";
+                       groups = "spi0", "spi0_wp_hold";
+               };
+       };
+
+       fan: pwm-fan {
+               compatible = "pwm-fan";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pwm0_pins>;
+               pwms = <&pwm 0 50000>;
+               /* cooling level (0, 1, 2, 3) : (0% duty, 30% duty, 50% duty, 100% duty) */
+               cooling-levels = <0 80 128 255>;
+               #cooling-cells = <2>;
+               #thermal-sensor-cells = <1>;
+
+               status = "okay";
+       };
 };
 
 &pwm {
        status = "okay";
 };
 
-&fan {
-       pinctrl-names = "default";
-       pinctrl-0 = <&pwm0_pins>;
-       pwms = <&pwm 0 50000>;
-       status = "okay";
+&cpu_thermal {
+       trips {
+               cpu_trip_hot: hot {
+                       temperature = <120000>;
+                       hysteresis = <2000>;
+                       type = "hot";
+               };
+
+               cpu_trip_active_high: active-high {
+                       temperature = <115000>;
+                       hysteresis = <2000>;
+                       type = "active";
+               };
+
+               cpu_trip_active_med: active-med {
+                       temperature = <85000>;
+                       hysteresis = <2000>;
+                       type = "active";
+               };
+
+               cpu_trip_active_low: active-low {
+                       temperature = <40000>;
+                       hysteresis = <2000>;
+                       type = "active";
+               };
+       };
+
+       cooling-maps {
+               cpu-active-high {
+               /* active: set fan to cooling level 2 */
+                       cooling-device = <&fan 3 3>;
+                       trip = <&cpu_trip_active_high>;
+               };
+
+               cpu-active-low {
+               /* active: set fan to cooling level 1 */
+                       cooling-device = <&fan 2 2>;
+                       trip = <&cpu_trip_active_med>;
+               };
+
+               cpu-passive {
+               /* passive: set fan to cooling level 0 */
+                       cooling-device = <&fan 1 1>;
+                       trip = <&cpu_trip_active_low>;
+               };
+       };
 };
 
 &ssusb1 {
        };
 };
 
-&uart0 {
+&serial0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart0_pins>;
        status = "okay";
 };
 
-&uart1 {
+&serial1 {
        status = "okay";
        pinctrl-names = "default";
        pinctrl-0 = <&uart1_2_lite_pins>;
 };
 
-&uart2 {
+&serial2 {
        status = "okay";
        pinctrl-names = "default";
        pinctrl-0 = <&uart2_3_pins>;
        status = "okay";
 };
 
-&xphy {
+&xsphy {
        status = "okay";
 };
index 5012e7a49899e81f491a551a36335e272c2f9b67..a2a45f801c45637c8216972c68c9eae7d997a84c 100644 (file)
        memory {
                reg = <0 0x40000000 0 0x40000000>;
        };
+
+       reg_1p8v: regulator-1p8v {
+               compatible = "regulator-fixed";
+               regulator-name = "fixed-1.8V";
+               regulator-min-microvolt = <1800000>;
+               regulator-max-microvolt = <1800000>;
+               regulator-boot-on;
+               regulator-always-on;
+       };
+
+       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;
+       };
+};
+
+&pio {
+       mdio0_pins: mdio0-pins {
+               mux {
+                       function = "eth";
+                       groups = "mdc_mdio0";
+               };
+
+               conf {
+                       groups = "mdc_mdio0";
+                       drive-strength = <MTK_DRIVE_8mA>;
+               };
+       };
+
+       gbe0_led0_pins: gbe0-led0-pins {
+               mux {
+                       function = "led";
+                       groups = "gbe0_led0";
+               };
+       };
+
+       gbe1_led0_pins: gbe1-led0-pins {
+               mux {
+                       function = "led";
+                       groups = "gbe1_led0";
+               };
+       };
+
+       gbe2_led0_pins: gbe2-led0-pins {
+               mux {
+                       function = "led";
+                       groups = "gbe2_led0";
+               };
+       };
+
+       gbe3_led0_pins: gbe3-led0-pins {
+               mux {
+                       function = "led";
+                       groups = "gbe3_led0";
+               };
+       };
+
+       i2c1_sfp_pins: i2c1-sfp-pins-g0 {
+               mux {
+                       function = "i2c";
+                       groups = "i2c1_sfp";
+               };
+       };
+
+       i2c2_0_pins: i2c2-pins-g0 {
+               mux {
+                       function = "i2c";
+                       groups = "i2c2_0";
+               };
+       };
+
+       i2c0_pins: i2c0-pins-g0 {
+               mux {
+                       function = "i2c";
+                       groups = "i2c0_1";
+               };
+       };
+
+       i2c1_pins: i2c1-pins-g0 {
+               mux {
+                       function = "i2c";
+                       groups = "i2c1_0";
+               };
+       };
+
+       i2p5gbe_led0_pins: 2p5gbe-led0-pins {
+               mux {
+                       function = "led";
+                       groups = "2p5gbe_led0";
+               };
+       };
+
+       mmc0_pins_emmc_51: mmc0-pins-emmc-51 {
+               mux {
+                       function = "flash";
+                       groups = "emmc_51";
+               };
+       };
+
+       mmc0_pins_sdcard: mmc0-pins-sdcard {
+               mux {
+                       function = "flash";
+                       groups = "sdcard";
+               };
+       };
+
+       uart0_pins: uart0-pins {
+               mux {
+                       function = "uart";
+                       groups =  "uart0";
+               };
+       };
+
+       spi0_flash_pins: spi0-flash-pins {
+               mux {
+                       function = "spi";
+                       groups = "spi0", "spi0_wp_hold";
+               };
+       };
+
+       spi1_pins: spi1-pins {
+               mux {
+                       function = "spi";
+                       groups = "spi1";
+               };
+       };
 };
 
 &eth {
        pinctrl-0 = <&gbe0_led0_pins>;
 };
 
+&gsw_port0 {
+       label = "lan0";
+};
+
 &gsw_phy0_led0 {
        status = "okay";
+       function = LED_FUNCTION_LAN;
        color = <LED_COLOR_ID_GREEN>;
 };
 
        pinctrl-0 = <&gbe1_led0_pins>;
 };
 
+&gsw_port1 {
+       label = "lan1";
+};
+
 &gsw_phy1_led0 {
        status = "okay";
+       function = LED_FUNCTION_LAN;
        color = <LED_COLOR_ID_GREEN>;
 };
 
        pinctrl-0 = <&gbe2_led0_pins>;
 };
 
+&gsw_port2 {
+       label = "lan2";
+};
+
 &gsw_phy2_led0 {
        status = "okay";
+       function = LED_FUNCTION_LAN;
        color = <LED_COLOR_ID_GREEN>;
 };
 
        pinctrl-0 = <&gbe3_led0_pins>;
 };
 
+&gsw_port3 {
+       label = "lan3";
+};
+
 &gsw_phy3_led0 {
        status = "okay";
+       function = LED_FUNCTION_LAN;
        color = <LED_COLOR_ID_GREEN>;
 };
 
        status = "okay";
 };
 
-&uart0 {
+&serial0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart0_pins>;
        status = "okay";
 };
 
        status = "okay";
 };
 
-&xphy {
+&xsphy {
        status = "okay";
 };
index 39f8fd2ab14fcfc52d9834178c660b57f6cd9a18..6d8953c873f0f3d88734fca01548d725819f69e8 100644 (file)
                clock-output-names = "clkxtal";
        };
 
-       fan: pwm-fan {
-               compatible = "pwm-fan";
-               /* cooling level (0, 1, 2, 3) : (0% duty, 30% duty, 50% duty, 100% duty) */
-               cooling-levels = <0 80 128 255>;
-               #cooling-cells = <2>;
-               #thermal-sensor-cells = <1>;
-               status = "disabled";
-       };
-
        pmu {
                compatible = "arm,cortex-a73-pmu";
                interrupt-parent = <&gic>;
                method = "smc";
        };
 
-       reg_1p8v: regulator-1p8v {
-               compatible = "regulator-fixed";
-               regulator-name = "fixed-1.8V";
-               regulator-min-microvolt = <1800000>;
-               regulator-max-microvolt = <1800000>;
-               regulator-boot-on;
-               regulator-always-on;
-       };
-
-       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;
-       };
-
        reserved-memory {
                ranges;
                #address-cells = <2>;
                        interrupt-parent = <&gic>;
                        #interrupt-cells = <2>;
 
-                       mdio0_pins: mdio0-pins {
-                               mux {
-                                       function = "eth";
-                                       groups = "mdc_mdio0";
-                               };
-
-                               conf {
-                                       groups = "mdc_mdio0";
-                                       drive-strength = <MTK_DRIVE_8mA>;
-                               };
-                       };
-
-                       i2c0_pins: i2c0-pins-g0 {
-                               mux {
-                                       function = "i2c";
-                                       groups = "i2c0_1";
-                               };
-                       };
-
-                       i2c1_pins: i2c1-pins-g0 {
-                               mux {
-                                       function = "i2c";
-                                       groups = "i2c1_0";
-                               };
-                       };
-
-                       i2c1_sfp_pins: i2c1-sfp-pins-g0 {
-                               mux {
-                                       function = "i2c";
-                                       groups = "i2c1_sfp";
-                               };
-                       };
-
-                       i2c2_pins: i2c2-pins {
-                               mux {
-                                       function = "i2c";
-                                       groups = "i2c2";
-                               };
-                       };
-
-                       i2c2_0_pins: i2c2-pins-g0 {
-                               mux {
-                                       function = "i2c";
-                                       groups = "i2c2_0";
-                               };
-                       };
-
-                       i2c2_1_pins: i2c2-pins-g1 {
-                               mux {
-                                       function = "i2c";
-                                       groups = "i2c2_1";
-                               };
-                       };
-
-                       gbe0_led0_pins: gbe0-led0-pins {
-                               mux {
-                                       function = "led";
-                                       groups = "gbe0_led0";
-                               };
-                       };
-
-                       gbe1_led0_pins: gbe1-led0-pins {
-                               mux {
-                                       function = "led";
-                                       groups = "gbe1_led0";
-                               };
-                       };
-
-                       gbe2_led0_pins: gbe2-led0-pins {
-                               mux {
-                                       function = "led";
-                                       groups = "gbe2_led0";
-                               };
-                       };
-
-                       gbe3_led0_pins: gbe3-led0-pins {
-                               mux {
-                                       function = "led";
-                                       groups = "gbe3_led0";
-                               };
-                       };
-
-                       gbe0_led1_pins: gbe0-led1-pins {
-                               mux {
-                                       function = "led";
-                                       groups = "gbe0_led1";
-                               };
-                       };
-
-                       gbe1_led1_pins: gbe1-led1-pins {
-                               mux {
-                                       function = "led";
-                                       groups = "gbe1_led1";
-                               };
-                       };
-
-                       gbe2_led1_pins: gbe2-led1-pins {
-                               mux {
-                                       function = "led";
-                                       groups = "gbe2_led1";
-                               };
-                       };
-
-                       gbe3_led1_pins: gbe3-led1-pins {
-                               mux {
-                                       function = "led";
-                                       groups = "gbe3_led1";
-                               };
-                       };
-
-                       i2p5gbe_led0_pins: 2p5gbe-led0-pins {
-                               mux {
-                                       function = "led";
-                                       groups = "2p5gbe_led0";
-                               };
-                       };
-
-                       i2p5gbe_led1_pins: 2p5gbe-led1-pins {
-                               mux {
-                                       function = "led";
-                                       groups = "2p5gbe_led1";
-                               };
-                       };
-
-                       mmc0_pins_emmc_45: mmc0-pins-emmc-45 {
-                               mux {
-                                       function = "flash";
-                                       groups = "emmc_45";
-                               };
-                       };
-
-                       mmc0_pins_emmc_51: mmc0-pins-emmc-51 {
-                               mux {
-                                       function = "flash";
-                                       groups = "emmc_51";
-                               };
-                       };
-
-                       mmc0_pins_sdcard: mmc0-pins-sdcard {
-                               mux {
-                                       function = "flash";
-                                       groups = "sdcard";
-                               };
-                       };
-
-                       uart0_pins: uart0-pins {
-                               mux {
-                                       function = "uart";
-                                       groups =  "uart0";
-                               };
-                       };
-
-                       uart1_0_pins: uart1-0-pins {
-                               mux {
-                                       function = "uart";
-                                       groups =  "uart1_0";
-                               };
-                       };
-
-                       uart1_1_pins: uart1-1-pins {
-                               mux {
-                                       function = "uart";
-                                       groups =  "uart1_1";
-                               };
-                       };
-
-                       uart1_2_pins: uart1-2-pins {
-                               mux {
-                                       function = "uart";
-                                       groups =  "uart1_2";
-                               };
-                       };
-
-                       uart1_2_lite_pins: uart1-2-lite-pins {
-                               mux {
-                                       function = "uart";
-                                       groups =  "uart1_2_lite";
-                               };
-                       };
-
-                       uart2_pins: uart2-pins {
-                               mux {
-                                       function = "uart";
-                                       groups =  "uart2";
-                               };
-                       };
-
-                       uart2_0_pins: uart2-0-pins {
-                               mux {
-                                       function = "uart";
-                                       groups =  "uart2_0";
-                               };
-                       };
-
-                       uart2_1_pins: uart2-1-pins {
-                               mux {
-                                       function = "uart";
-                                       groups =  "uart2_1";
-                               };
-                       };
-
-                       uart2_2_pins: uart2-2-pins {
-                               mux {
-                                       function = "uart";
-                                       groups =  "uart2_2";
-                               };
-                       };
-
-                       uart2_3_pins: uart2-3-pins {
-                               mux {
-                                       function = "uart";
-                                       groups =  "uart2_3";
-                               };
-                       };
-
-                       snfi_pins: snfi-pins {
-                               mux {
-                                       function = "flash";
-                                       groups = "snfi";
-                               };
-                       };
-
-                       spi0_pins: spi0-pins {
-                               mux {
-                                       function = "spi";
-                                       groups = "spi0";
-                               };
-                       };
-
-                       spi0_flash_pins: spi0-flash-pins {
-                               mux {
-                                       function = "spi";
-                                       groups = "spi0", "spi0_wp_hold";
-                               };
-                       };
-
-                       spi1_pins: spi1-pins {
-                               mux {
-                                       function = "spi";
-                                       groups = "spi1";
-                               };
-                       };
-
-                       spi2_pins: spi2-pins {
-                               mux {
-                                       function = "spi";
-                                       groups = "spi2";
-                               };
-                       };
-
-                       spi2_flash_pins: spi2-flash-pins {
-                               mux {
-                                       function = "spi";
-                                       groups = "spi2", "spi2_wp_hold";
-                               };
-                       };
-
                        pcie0_pins: pcie0-pins {
                                mux {
                                        function = "pcie";
                                                 "pcie_wake_n3_0";
                                };
                        };
+
+                       snfi_pins: snfi-pins {
+                               mux {
+                                       function = "flash";
+                                       groups = "snfi";
+                               };
+                       };
                };
 
                pwm: pwm@10048000 {
                        #clock-cells = <1>;
                };
 
-               uart0: serial@11000000 {
+               serial0: serial@11000000 {
                        compatible = "mediatek,mt7986-uart",
                                     "mediatek,mt6577-uart";
                        reg = <0 0x11000000 0 0x100>;
                                          <&infracfg CLK_INFRA_MUX_UART0_SEL>;
                        assigned-clock-parents = <&topckgen CLK_TOP_XTAL>,
                                                 <&topckgen CLK_TOP_UART_SEL>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&uart0_pins>;
                        status = "disabled";
                };
 
-               uart1: serial@11000100 {
+               serial1: serial@11000100 {
                        compatible = "mediatek,mt7986-uart",
                                     "mediatek,mt6577-uart";
                        reg = <0 0x11000100 0 0x100>;
                        status = "disabled";
                };
 
-               uart2: serial@11000200 {
+               serial2: serial@11000200 {
                        compatible = "mediatek,mt7986-uart",
                                     "mediatek,mt6577-uart";
                        reg = <0 0x11000200 0 0x100>;
                                      "hclk";
                        #address-cells = <1>;
                        #size-cells = <0>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&spi1_pins>;
                        status = "disabled";
                };
 
                        #size-cells = <0>;
                };
 
-               xphy: xphy@11e10000 {
+               xsphy: xphy@11e10000 {
                        compatible = "mediatek,mt7988",
                                     "mediatek,xsphy";
                        ranges;
 
                                gsw_port0: port@0 {
                                        reg = <0>;
-                                       label = "lan0";
                                        phy-mode = "internal";
                                        phy-handle = <&gsw_phy0>;
                                };
 
                                gsw_port1: port@1 {
                                        reg = <1>;
-                                       label = "lan1";
                                        phy-mode = "internal";
                                        phy-handle = <&gsw_phy1>;
                                };
 
                                gsw_port2: port@2 {
                                        reg = <2>;
-                                       label = "lan2";
                                        phy-mode = "internal";
                                        phy-handle = <&gsw_phy2>;
                                };
 
                                gsw_port3: port@3 {
                                        reg = <3>;
-                                       label = "lan3";
                                        phy-mode = "internal";
                                        phy-handle = <&gsw_phy3>;
                                };
 
                                                gsw_phy0_led0: gsw-phy0-led0@0 {
                                                        reg = <0>;
-                                                       function = LED_FUNCTION_LAN;
                                                        status = "disabled";
                                                };
 
                                                gsw_phy0_led1: gsw-phy0-led1@1 {
                                                        reg = <1>;
-                                                       function = LED_FUNCTION_LAN;
                                                        status = "disabled";
                                                };
                                        };
 
                                                gsw_phy1_led0: gsw-phy1-led0@0 {
                                                        reg = <0>;
-                                                       function = LED_FUNCTION_LAN;
                                                        status = "disabled";
                                                };
 
                                                gsw_phy1_led1: gsw-phy1-led1@1 {
                                                        reg = <1>;
-                                                       function = LED_FUNCTION_LAN;
                                                        status = "disabled";
                                                };
                                        };
 
                                                gsw_phy2_led0: gsw-phy2-led0@0 {
                                                        reg = <0>;
-                                                       function = LED_FUNCTION_LAN;
                                                        status = "disabled";
                                                };
 
                                                gsw_phy2_led1: gsw-phy2-led1@1 {
                                                        reg = <1>;
-                                                       function = LED_FUNCTION_LAN;
                                                        status = "disabled";
                                                };
                                        };
 
                                                gsw_phy3_led0: gsw-phy3-led0@0 {
                                                        reg = <0>;
-                                                       function = LED_FUNCTION_LAN;
                                                        status = "disabled";
                                                };
 
                                                gsw_phy3_led1: gsw-phy3-led1@1 {
                                                        reg = <1>;
-                                                       function = LED_FUNCTION_LAN;
                                                        status = "disabled";
                                                };
                                        };
                                        hysteresis = <2000>;
                                        type = "critical";
                                };
-
-                               cpu_trip_hot: hot {
-                                       temperature = <120000>;
-                                       hysteresis = <2000>;
-                                       type = "hot";
-                               };
-
-                               cpu_trip_active_high: active-high {
-                                       temperature = <115000>;
-                                       hysteresis = <2000>;
-                                       type = "active";
-                               };
-
-                               cpu_trip_active_med: active-med {
-                                       temperature = <85000>;
-                                       hysteresis = <2000>;
-                                       type = "active";
-                               };
-
-                               cpu_trip_active_low: active-low {
-                                       temperature = <40000>;
-                                       hysteresis = <2000>;
-                                       type = "active";
-                               };
-                       };
-
-                       cooling-maps {
-                               cpu-active-high {
-                               /* active: set fan to cooling level 2 */
-                                       cooling-device = <&fan 3 3>;
-                                       trip = <&cpu_trip_active_high>;
-                               };
-
-                               cpu-active-low {
-                               /* active: set fan to cooling level 1 */
-                                       cooling-device = <&fan 2 2>;
-                                       trip = <&cpu_trip_active_med>;
-                               };
-
-                               cpu-passive {
-                               /* passive: set fan to cooling level 0 */
-                                       cooling-device = <&fan 1 1>;
-                                       trip = <&cpu_trip_active_low>;
-                               };
                        };
                };
        };
index c5ac708c28a6a00bc17090bd7784bed6e3e778d4..d6a2eb523b58760ac7a5b43bdc342a2966641c19 100644 (file)
@@ -43,7 +43,7 @@ bananapi,bpi-r3-mini)
        ;;
 bananapi,bpi-r4|\
 bananapi,bpi-r4-poe)
-       ucidef_set_led_netdev "wan" "wan" "mt7530-0:00:green:lan" "wan" "link tx rx"
+       ucidef_set_led_netdev "wan" "wan" "mt7530-0:00:green:wan" "wan" "link tx rx"
        ucidef_set_led_netdev "lan1" "lan1" "mt7530-0:01:green:lan" "lan1" "link tx rx"
        ucidef_set_led_netdev "lan2" "lan2" "mt7530-0:02:green:lan" "lan2" "link tx rx"
        ucidef_set_led_netdev "lan3" "lan3" "mt7530-0:03:green:lan" "lan3" "link tx rx"