From b992aa119cde02dc468d1bb3b7f6c2795503e9df Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Thu, 8 May 2025 17:48:27 +0100 Subject: [PATCH] mediatek: dts: bring mt7988a.dtsi closer to upstream 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 --- .../mediatek/dts/mt7988a-arcadyan-mozart.dts | 37 +- .../dts/mt7988a-smartrg-mt-stuart.dtsi | 150 ++++++-- .../mediatek/dts/mt7988d-asus-zenwifi-bt8.dts | 4 +- .../dts/mt7988d-asus-zenwifi-bt8.dtsi | 37 +- .../dts/mt7988d-smartrg-SDG-8733A.dts | 12 +- .../dts/mediatek/mt7988a-bananapi-bpi-r4.dtsi | 215 ++++++++++- .../arm64/boot/dts/mediatek/mt7988a-rfb.dts | 156 +++++++- .../arch/arm64/boot/dts/mediatek/mt7988a.dtsi | 359 +----------------- .../filogic/base-files/etc/board.d/01_leds | 2 +- 9 files changed, 544 insertions(+), 428 deletions(-) diff --git a/target/linux/mediatek/dts/mt7988a-arcadyan-mozart.dts b/target/linux/mediatek/dts/mt7988a-arcadyan-mozart.dts index f6752e340aa..f6ee498ae06 100644 --- a/target/linux/mediatek/dts/mt7988a-arcadyan-mozart.dts +++ b/target/linux/mediatek/dts/mt7988a-arcadyan-mozart.dts @@ -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; @@ -59,26 +59,16 @@ 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 = ; - }; - }; - - spic_pins: spi1-pins { - mux { - function = "spi"; - groups = "spi1"; - }; + status = "okay"; }; }; @@ -173,12 +163,7 @@ }; }; -&uart1 { - status = "okay"; -}; - -&fan { - pwms = <&pwm 1 40000 0>; +&serial1 { status = "okay"; }; @@ -189,7 +174,7 @@ &spi1 { pinctrl-names = "default"; /* pin shared with snfi */ - pinctrl-0 = <&spic_pins>; + pinctrl-0 = <&spi1_pins>; status = "disabled"; }; diff --git a/target/linux/mediatek/dts/mt7988a-smartrg-mt-stuart.dtsi b/target/linux/mediatek/dts/mt7988a-smartrg-mt-stuart.dtsi index 058a96f253c..302e8a81011 100644 --- a/target/linux/mediatek/dts/mt7988a-smartrg-mt-stuart.dtsi +++ b/target/linux/mediatek/dts/mt7988a-smartrg-mt-stuart.dtsi @@ -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"; }; @@ -129,6 +129,32 @@ 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 { @@ -226,28 +252,6 @@ 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"; @@ -286,11 +290,13 @@ &gsw_phy1_led0 { status = "okay"; + function = LED_FUNCTION_LAN; color = ; }; &gsw_phy1_led1 { status = "okay"; + function = LED_FUNCTION_LAN; color = ; }; @@ -301,11 +307,13 @@ &gsw_phy2_led0 { status = "okay"; + function = LED_FUNCTION_LAN; color = ; }; &gsw_phy2_led1 { status = "okay"; + function = LED_FUNCTION_LAN; color = ; }; @@ -316,11 +324,13 @@ &gsw_phy3_led0 { status = "okay"; + function = LED_FUNCTION_LAN; color = ; }; &gsw_phy3_led1 { status = "okay"; + function = LED_FUNCTION_LAN; color = ; }; @@ -603,6 +613,81 @@ 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 = ; + }; + }; + + mmc0_pins_emmc_51: mmc0-emmc-51-pins { + mux { + function = "flash"; + groups = "emmc_51"; + }; + }; + pcie0_1_pins: pcie0-pins-g1 { mux { function = "pcie"; @@ -617,6 +702,13 @@ }; }; + 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"; @@ -643,6 +735,8 @@ groups = "uart2"; }; }; + + }; &pwm { @@ -700,11 +794,11 @@ status = "okay"; }; -&uart0 { +&serial0 { status = "okay"; }; -&uart1 { +&serial1 { pinctrl-names = "default"; pinctrl-0 = <&uart1_pins>; status = "okay"; @@ -712,7 +806,7 @@ /* Airoha AG3352 GPS */ }; -&uart2 { +&serial2 { pinctrl-names = "default"; pinctrl-0 = <&uart2_pins>; status = "okay"; @@ -724,6 +818,6 @@ status = "okay"; }; -&xphy { +&xsphy { status = "okay"; }; diff --git a/target/linux/mediatek/dts/mt7988d-asus-zenwifi-bt8.dts b/target/linux/mediatek/dts/mt7988d-asus-zenwifi-bt8.dts index 02c1be1457e..1f95a01fbe0 100644 --- a/target/linux/mediatek/dts/mt7988d-asus-zenwifi-bt8.dts +++ b/target/linux/mediatek/dts/mt7988d-asus-zenwifi-bt8.dts @@ -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"; diff --git a/target/linux/mediatek/dts/mt7988d-asus-zenwifi-bt8.dtsi b/target/linux/mediatek/dts/mt7988d-asus-zenwifi-bt8.dtsi index e865f2a678a..20e7a3839c6 100644 --- a/target/linux/mediatek/dts/mt7988d-asus-zenwifi-bt8.dtsi +++ b/target/linux/mediatek/dts/mt7988d-asus-zenwifi-bt8.dtsi @@ -78,7 +78,7 @@ / { aliases { - serial0 = &uart0; + serial0 = &serial0; label-mac-device = &gmac0; led-boot = &led_status_green; led-failsafe = &led_status_red; @@ -189,11 +189,6 @@ status = "okay"; }; -&int_2p5g_phy { - pinctrl-names = "i2p5gbe-led"; - pinctrl-0 = <&i2p5gbe_led0_pins>; -}; - &gmac2 { phy-mode = "2500base-x"; phy = <&phy5>; @@ -307,6 +302,32 @@ mediatek,pull-down-adv = <0>; /* bias-disable */ }; + mdio0_pins: mdio0-pins { + mux { + function = "eth"; + groups = "mdc_mdio0"; + }; + + conf { + groups = "mdc_mdio0"; + drive-strength = ; + }; + }; + + 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"; @@ -352,7 +373,7 @@ status = "okay"; }; -&uart0 { +&serial0 { status = "okay"; }; @@ -360,7 +381,7 @@ status = "okay"; }; -&xphy { +&xsphy { status = "okay"; }; diff --git a/target/linux/mediatek/dts/mt7988d-smartrg-SDG-8733A.dts b/target/linux/mediatek/dts/mt7988d-smartrg-SDG-8733A.dts index b72ef48bea7..0d0ecddfae2 100644 --- a/target/linux/mediatek/dts/mt7988d-smartrg-SDG-8733A.dts +++ b/target/linux/mediatek/dts/mt7988d-smartrg-SDG-8733A.dts @@ -88,6 +88,13 @@ }; &pio { + i2p5gbe_led0_pins: 2p5gbe-led0-pins { + mux { + function = "led"; + groups = "2p5gbe_led0"; + }; + }; + pcie3_1_pins: pcie3-pins-g1 { mux { function = "pcie"; @@ -129,6 +136,7 @@ &i2p5gbe_led0 { color = ; + function = LED_FUNCTION_LAN; status = "okay"; }; @@ -148,10 +156,10 @@ status = "disabled"; }; -&uart1 { +&serial1 { status = "disabled"; }; -&xphy { +&xsphy { status = "disabled"; }; diff --git a/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dtsi b/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dtsi index 8dba5b4275f..a1ff582961a 100644 --- a/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dtsi +++ b/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dtsi @@ -23,11 +23,11 @@ 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>; }; @@ -75,6 +75,24 @@ 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; + }; }; ð { @@ -108,6 +126,7 @@ &gsw_phy0_led0 { status = "okay"; + function = LED_FUNCTION_WAN; color = ; }; @@ -116,8 +135,13 @@ pinctrl-0 = <&gbe1_led0_pins>; }; +&gsw_port1 { + label = "lan1"; +}; + &gsw_phy1_led0 { status = "okay"; + function = LED_FUNCTION_LAN; color = ; }; @@ -126,8 +150,13 @@ pinctrl-0 = <&gbe2_led0_pins>; }; +&gsw_port2 { + label = "lan2"; +}; + &gsw_phy2_led0 { status = "okay"; + function = LED_FUNCTION_LAN; color = ; }; @@ -136,8 +165,13 @@ pinctrl-0 = <&gbe3_led0_pins>; }; +&gsw_port3 { + label = "lan3"; +}; + &gsw_phy3_led0 { status = "okay"; + function = LED_FUNCTION_LAN; color = ; }; @@ -299,23 +333,180 @@ }; &pio { + mdio0_pins: mdio0-pins { + mux { + function = "eth"; + groups = "mdc_mdio0"; + }; + + conf { + groups = "mdc_mdio0"; + drive-strength = ; + }; + }; + + 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 { @@ -380,17 +571,19 @@ }; }; -&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>; @@ -400,6 +593,6 @@ status = "okay"; }; -&xphy { +&xsphy { status = "okay"; }; diff --git a/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a-rfb.dts b/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a-rfb.dts index 5012e7a4989..a2a45f801c4 100644 --- a/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a-rfb.dts +++ b/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a-rfb.dts @@ -24,6 +24,136 @@ 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 = ; + }; + }; + + 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"; + }; + }; }; ð { @@ -68,8 +198,13 @@ pinctrl-0 = <&gbe0_led0_pins>; }; +&gsw_port0 { + label = "lan0"; +}; + &gsw_phy0_led0 { status = "okay"; + function = LED_FUNCTION_LAN; color = ; }; @@ -78,8 +213,13 @@ pinctrl-0 = <&gbe1_led0_pins>; }; +&gsw_port1 { + label = "lan1"; +}; + &gsw_phy1_led0 { status = "okay"; + function = LED_FUNCTION_LAN; color = ; }; @@ -88,8 +228,13 @@ pinctrl-0 = <&gbe2_led0_pins>; }; +&gsw_port2 { + label = "lan2"; +}; + &gsw_phy2_led0 { status = "okay"; + function = LED_FUNCTION_LAN; color = ; }; @@ -98,8 +243,13 @@ pinctrl-0 = <&gbe3_led0_pins>; }; +&gsw_port3 { + label = "lan3"; +}; + &gsw_phy3_led0 { status = "okay"; + function = LED_FUNCTION_LAN; color = ; }; @@ -187,7 +337,9 @@ status = "okay"; }; -&uart0 { +&serial0 { + pinctrl-names = "default"; + pinctrl-0 = <&uart0_pins>; status = "okay"; }; @@ -195,6 +347,6 @@ status = "okay"; }; -&xphy { +&xsphy { status = "okay"; }; diff --git a/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a.dtsi b/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a.dtsi index 39f8fd2ab14..6d8953c873f 100644 --- a/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a.dtsi +++ b/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a.dtsi @@ -147,15 +147,6 @@ 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>; @@ -167,24 +158,6 @@ 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>; @@ -296,263 +269,6 @@ interrupt-parent = <&gic>; #interrupt-cells = <2>; - mdio0_pins: mdio0-pins { - mux { - function = "eth"; - groups = "mdc_mdio0"; - }; - - conf { - groups = "mdc_mdio0"; - drive-strength = ; - }; - }; - - 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"; @@ -584,6 +300,13 @@ "pcie_wake_n3_0"; }; }; + + snfi_pins: snfi-pins { + mux { + function = "flash"; + groups = "snfi"; + }; + }; }; pwm: pwm@10048000 { @@ -661,7 +384,7 @@ #clock-cells = <1>; }; - uart0: serial@11000000 { + serial0: serial@11000000 { compatible = "mediatek,mt7986-uart", "mediatek,mt6577-uart"; reg = <0 0x11000000 0 0x100>; @@ -678,12 +401,10 @@ <&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>; @@ -703,7 +424,7 @@ status = "disabled"; }; - uart2: serial@11000200 { + serial2: serial@11000200 { compatible = "mediatek,mt7986-uart", "mediatek,mt6577-uart"; reg = <0 0x11000200 0 0x100>; @@ -824,8 +545,6 @@ "hclk"; #address-cells = <1>; #size-cells = <0>; - pinctrl-names = "default"; - pinctrl-0 = <&spi1_pins>; status = "disabled"; }; @@ -1154,7 +873,7 @@ #size-cells = <0>; }; - xphy: xphy@11e10000 { + xsphy: xphy@11e10000 { compatible = "mediatek,mt7988", "mediatek,xsphy"; ranges; @@ -1303,28 +1022,24 @@ 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>; }; @@ -1361,13 +1076,11 @@ 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"; }; }; @@ -1387,13 +1100,11 @@ 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"; }; }; @@ -1413,13 +1124,11 @@ 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"; }; }; @@ -1439,13 +1148,11 @@ 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"; }; }; @@ -1670,50 +1377,6 @@ 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>; - }; }; }; }; diff --git a/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds b/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds index c5ac708c28a..d6a2eb523b5 100644 --- a/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds +++ b/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds @@ -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" -- 2.47.2