From 6388ac148945525e895253fd7e3fb993716698b5 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 17 Dec 2023 20:05:20 +0100 Subject: [PATCH] [DTS] Update with latest VisionFive 2 commits and enable staging drivers, required for Star64 onboard WiFi. Signed-off-by: MichaIng --- .github/workflows/build.yml | 2 +- .../dts/starfive/jh7110-pine64-star64.dtsi | 99 +++++++++++++++++++ dietpi_star64_defconfig | 1 + 3 files changed, 101 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 329cfc26b81fd..4018869f5ddc8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -26,7 +26,7 @@ jobs: - name: Build Linux run: | > .scmversion # Avoid Git commit version suffix - mv dietpi_star64_defconfig arch/riscv/configs/ + mv -v dietpi_star64_defconfig arch/riscv/configs/ make dietpi_star64_defconfig make -j$(nproc) make install INSTALL_PATH='linux-image-star64/boot' diff --git a/arch/riscv/boot/dts/starfive/jh7110-pine64-star64.dtsi b/arch/riscv/boot/dts/starfive/jh7110-pine64-star64.dtsi index daf8ccb3e534d..1a35d2a470b11 100755 --- a/arch/riscv/boot/dts/starfive/jh7110-pine64-star64.dtsi +++ b/arch/riscv/boot/dts/starfive/jh7110-pine64-star64.dtsi @@ -87,6 +87,42 @@ }; }; + thermal-zones { + cpu-thermal { + polling-delay-passive = <250>; + polling-delay = <15000>; + + thermal-sensors = <&sfctemp>; + + trips { + cpu_alert0: cpu_alert0 { + /* milliCelsius */ + temperature = <85000>; + hysteresis = <2000>; + type = "passive"; + }; + + cpu_crit: cpu_crit { + /* milliCelsius */ + temperature = <100000>; + hysteresis = <0>; + type = "critical"; + }; + }; + + cooling-maps { + map0 { + trip = <&cpu_alert0>; + cooling-device = + <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; + }; + }; + rfkill_bt { compatible = "rfkill-gpio"; label = "BlueTooth"; @@ -561,6 +597,21 @@ status = "okay"; #address-cells = <1>; #size-cells = <0>; + clock-names = "gtx", + "tx", + "ptp_ref", + "stmmaceth", + "pclk", + "gtxc", + "rmii_rtx"; + clocks = <&clkgen JH7110_GMAC0_GTXCLK>, + <&clkgen JH7110_U0_GMAC5_CLK_TX>, + <&clkgen JH7110_GMAC0_PTP>, + <&clkgen JH7110_U0_GMAC5_CLK_AHB>, + <&clkgen JH7110_U0_GMAC5_CLK_AXI>, + <&clkgen JH7110_GMAC0_GTXC>, + <&clkgen JH7110_GMAC0_RMII_RTX>; + phy0: ethernet-phy@0 { rgmii_sw_dr_2 = <0x0>; rgmii_sw_dr = <0x3>; @@ -579,6 +630,21 @@ #address-cells = <1>; #size-cells = <0>; status = "okay"; + clock-names = "gtx", + "tx", + "ptp_ref", + "stmmaceth", + "pclk", + "gtxc", + "rmii_rtx"; + clocks = <&clkgen JH7110_GMAC1_GTXCLK>, + <&clkgen JH7110_GMAC5_CLK_TX>, + <&clkgen JH7110_GMAC5_CLK_PTP>, + <&clkgen JH7110_GMAC5_CLK_AHB>, + <&clkgen JH7110_GMAC5_CLK_AXI>, + <&clkgen JH7110_GMAC1_GTXC>, + <&clkgen JH7110_GMAC1_RMII_RTX>; + phy1: ethernet-phy@1 { rgmii_sw_dr_2 = <0x0>; rgmii_sw_dr = <0x3>; @@ -792,3 +858,36 @@ pinctrl-0 = <&pwm_pins>; status = "okay"; }; + +&qspi { + nor_flash: nor-flash@0 { + compatible = "jedec,spi-nor"; + reg=<0>; + cdns,read-delay = <5>; + spi-max-frequency = <100000000>; + cdns,tshsl-ns = <1>; + cdns,tsd2d-ns = <1>; + cdns,tchsh-ns = <1>; + cdns,tslch-ns = <1>; + status = "okay"; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + spl@0 { + reg = <0x0 0x40000>; + }; + uboot-env@100000 { + reg = <0xf0000 0x10000>; + }; + uboot@100000 { + reg = <0x100000 0x300000>; + }; + data@f00000 { + reg = <0xf00000 0x100000>; + }; + }; + }; +}; diff --git a/dietpi_star64_defconfig b/dietpi_star64_defconfig index b504cd336d8b9..d72d7d7e01142 100644 --- a/dietpi_star64_defconfig +++ b/dietpi_star64_defconfig @@ -241,6 +241,7 @@ CONFIG_RPMSG_VIRTIO=n CONFIG_RTC_CLASS=y CONFIG_RTC_DRV_GOLDFISH=y CONFIG_RTC_DRV_STARFIVE=y +CONFIG_STAGING=y CONFIG_RTL8852BU=m CONFIG_SATA_AHCI=y CONFIG_SCSI_VIRTIO=y