From 455580abf4fac41ed1c5422c45b28024bd99bd1e Mon Sep 17 00:00:00 2001 From: Gunjan Gupta Date: Tue, 20 Feb 2024 10:17:00 +0530 Subject: [PATCH 01/13] BigTreeTech CB1: fix mmc probe failure due to regulator not being available --- ...rm64-dts-sun50i-h616-bigtreetech-cb1.patch | 4 +- ...rm64-dts-sun50i-h616-bigtreetech-cb1.patch | 67 +++++++++++++------ 2 files changed, 48 insertions(+), 23 deletions(-) diff --git a/patch/kernel/archive/sunxi-6.6/patches.armbian/arm64-dts-sun50i-h616-bigtreetech-cb1.patch b/patch/kernel/archive/sunxi-6.6/patches.armbian/arm64-dts-sun50i-h616-bigtreetech-cb1.patch index 86309a131c9e..77a359375ee4 100644 --- a/patch/kernel/archive/sunxi-6.6/patches.armbian/arm64-dts-sun50i-h616-bigtreetech-cb1.patch +++ b/patch/kernel/archive/sunxi-6.6/patches.armbian/arm64-dts-sun50i-h616-bigtreetech-cb1.patch @@ -358,7 +358,7 @@ index 000000000000..8a18476307ff + regulator-always-on; + }; + -+ reg_aldo1: ldo1 { ++ reg_aldo1: aldo1 { + regulator-name = "axp313a-aldo1"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; @@ -367,7 +367,7 @@ index 000000000000..8a18476307ff + regulator-always-on; + }; + -+ reg_dldo1: ldo2 { ++ reg_dldo1: dldo1 { + regulator-name = "axp313a-dldo1"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; diff --git a/patch/kernel/archive/sunxi-6.7/patches.armbian/arm64-dts-sun50i-h616-bigtreetech-cb1.patch b/patch/kernel/archive/sunxi-6.7/patches.armbian/arm64-dts-sun50i-h616-bigtreetech-cb1.patch index 4a4dcf739e1e..87c406e3e5ba 100644 --- a/patch/kernel/archive/sunxi-6.7/patches.armbian/arm64-dts-sun50i-h616-bigtreetech-cb1.patch +++ b/patch/kernel/archive/sunxi-6.7/patches.armbian/arm64-dts-sun50i-h616-bigtreetech-cb1.patch @@ -1,14 +1,46 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Your Name -Date: Tue, 30 May 2023 10:18:55 +0800 -Subject: add bigtreetech-cb1 dts +From: Alan +Date: Tue, 30 May 2023 17:36:29 +0800 +Subject: [ARCHEOLOGY] Patches: add current(6.1) & edge(6.2) patch for + BigTreeTech CB1 +> X-Git-Archeology: > recovered message: > Signed-off-by: Alan.Ma from BigTreeTech tech@biqu3d.com +> X-Git-Archeology: - Revision 9d69bb1da699f5729dc5c1dcc2d8d5f4590152fd: https://github.com/armbian/build/commit/9d69bb1da699f5729dc5c1dcc2d8d5f4590152fd +> X-Git-Archeology: Date: Tue, 30 May 2023 17:36:29 +0800 +> X-Git-Archeology: From: Alan +> X-Git-Archeology: Subject: Patches: add current(6.1) & edge(6.2) patch for BigTreeTech CB1 +> X-Git-Archeology: +> X-Git-Archeology: - Revision 8562428877003ddd46045cb3429d7fdc9df4acee: https://github.com/armbian/build/commit/8562428877003ddd46045cb3429d7fdc9df4acee +> X-Git-Archeology: Date: Sat, 02 Sep 2023 03:34:28 +0518 +> X-Git-Archeology: From: Gunjan Gupta +> X-Git-Archeology: Subject: Allwinner: Kernel patches for 6.5-rc7 kernel +> X-Git-Archeology: +> X-Git-Archeology: - Revision bb78fac2fadb40a43a9ccb36266dbd21746c2eb6: https://github.com/armbian/build/commit/bb78fac2fadb40a43a9ccb36266dbd21746c2eb6 +> X-Git-Archeology: Date: Fri, 29 Sep 2023 08:46:52 +0200 +> X-Git-Archeology: From: Ricardo Pardini +> X-Git-Archeology: Subject: `sunxi`/`sunxi64` `edge` 6.5.y: rebase/rewrite all patches for v6.5.5; fix UTF-8 "From:" encoding +> X-Git-Archeology: +> X-Git-Archeology: - Revision d1186b8a0e3d44d5b285e94772ebe2c17a014193: https://github.com/armbian/build/commit/d1186b8a0e3d44d5b285e94772ebe2c17a014193 +> X-Git-Archeology: Date: Mon, 30 Oct 2023 22:46:11 +0518 +> X-Git-Archeology: From: Gunjan Gupta +> X-Git-Archeology: Subject: kernel: sunxi: Add patches for 6.6 kernel +> X-Git-Archeology: +> X-Git-Archeology: - Revision a269c9a1c5784bd89630df1652923f0d76278b61: https://github.com/armbian/build/commit/a269c9a1c5784bd89630df1652923f0d76278b61 +> X-Git-Archeology: Date: Sun, 24 Dec 2023 09:13:08 +0100 +> X-Git-Archeology: From: Gunjan Gupta +> X-Git-Archeology: Subject: Refreshed patches using rewrite-kernel-patches command +> X-Git-Archeology: +> X-Git-Archeology: - Revision 30ef1a3e149f96200bffaf1c3138a4467b6f0aa7: https://github.com/armbian/build/commit/30ef1a3e149f96200bffaf1c3138a4467b6f0aa7 +> X-Git-Archeology: Date: Sun, 24 Dec 2023 09:13:08 +0100 +> X-Git-Archeology: From: Gunjan Gupta +> X-Git-Archeology: Subject: Allwinner: Add kernel patches for 6.7 kernel +> X-Git-Archeology: --- arch/arm64/boot/dts/allwinner/Makefile | 2 + arch/arm64/boot/dts/allwinner/sun50i-h616-bigtreetech-cb1-emmc.dts | 44 ++ arch/arm64/boot/dts/allwinner/sun50i-h616-bigtreetech-cb1-sd.dts | 35 ++ - arch/arm64/boot/dts/allwinner/sun50i-h616-bigtreetech-cb1.dtsi | 241 +++++++++- - 4 files changed, 296 insertions(+), 26 deletions(-) + arch/arm64/boot/dts/allwinner/sun50i-h616-bigtreetech-cb1.dtsi | 227 +++++++++- + 4 files changed, 289 insertions(+), 19 deletions(-) diff --git a/arch/arm64/boot/dts/allwinner/Makefile b/arch/arm64/boot/dts/allwinner/Makefile index db00a538d7ca..fc37dd819137 100644 @@ -115,7 +147,7 @@ index 000000000000..e18dd854d74b + <&pio 2 13 GPIO_ACTIVE_HIGH>; /* PC13 */ +}; diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h616-bigtreetech-cb1.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h616-bigtreetech-cb1.dtsi -index 1fed2b46cfe8..8a18476307ff 100644 +index 1fed2b46cfe8..b7bc079be521 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-h616-bigtreetech-cb1.dtsi +++ b/arch/arm64/boot/dts/allwinner/sun50i-h616-bigtreetech-cb1.dtsi @@ -1,33 +1,53 @@ @@ -324,7 +356,7 @@ index 1fed2b46cfe8..8a18476307ff 100644 }; }; -@@ -90,49 +205,123 @@ &r_i2c { +@@ -90,29 +205,34 @@ &r_i2c { axp313a: pmic@36 { compatible = "x-powers,axp313a"; reg = <0x36>; @@ -334,10 +366,9 @@ index 1fed2b46cfe8..8a18476307ff 100644 regulators{ reg_dcdc1: dcdc1 { -- regulator-name = "vdd-gpu-sys"; + regulator-name = "vdd-gpu-sys"; - regulator-min-microvolt = <810000>; - regulator-max-microvolt = <990000>; -+ regulator-name = "axp313a-dcdc1"; + regulator-min-microvolt = <500000>; + regulator-max-microvolt = <3400000>; + regulator-step-delay-us = <25>; @@ -346,10 +377,9 @@ index 1fed2b46cfe8..8a18476307ff 100644 }; reg_dcdc2: dcdc2 { -- regulator-name = "vdd-cpu"; + regulator-name = "vdd-cpu"; - regulator-min-microvolt = <810000>; - regulator-max-microvolt = <1100000>; -+ regulator-name = "axp313a-dcdc2"; + regulator-min-microvolt = <500000>; + regulator-max-microvolt = <1540000>; + regulator-step-delay-us = <25>; @@ -359,10 +389,9 @@ index 1fed2b46cfe8..8a18476307ff 100644 }; reg_dcdc3: dcdc3 { -- regulator-name = "vcc-dram"; + regulator-name = "vcc-dram"; - regulator-min-microvolt = <1350000>; - regulator-max-microvolt = <1500000>; -+ regulator-name = "axp313a-dcdc3"; + regulator-min-microvolt = <500000>; + regulator-max-microvolt = <1840000>; + regulator-step-delay-us = <25>; @@ -370,10 +399,8 @@ index 1fed2b46cfe8..8a18476307ff 100644 regulator-always-on; }; -- reg_aldo1: aldo1 { -- regulator-name = "vcc-1v8-pll"; -+ reg_aldo1: ldo1 { -+ regulator-name = "axp313a-aldo1"; +@@ -120,6 +240,8 @@ reg_aldo1: aldo1 { + regulator-name = "vcc-1v8-pll"; regulator-min-microvolt = <1800000>; regulator-max-microvolt = <1800000>; + regulator-step-delay-us = <25>; @@ -381,10 +408,8 @@ index 1fed2b46cfe8..8a18476307ff 100644 regulator-always-on; }; -- reg_dldo1: dldo1 { -- regulator-name = "vcc-3v3-io"; -+ reg_dldo1: ldo2 { -+ regulator-name = "axp313a-dldo1"; +@@ -127,12 +249,79 @@ reg_dldo1: dldo1 { + regulator-name = "vcc-3v3-io"; regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; + regulator-step-delay-us = <25>; From 33715e91bc3d4d04e3cc99accb3dc69189ccc4b0 Mon Sep 17 00:00:00 2001 From: Gunjan Gupta Date: Tue, 20 Feb 2024 10:23:54 +0530 Subject: [PATCH 02/13] Test current and edge branches as well for BigTreeTech CB1 --- config/boards/bigtreetech-cb1.conf | 1 - 1 file changed, 1 deletion(-) diff --git a/config/boards/bigtreetech-cb1.conf b/config/boards/bigtreetech-cb1.conf index a521e467caab..14301df6575f 100644 --- a/config/boards/bigtreetech-cb1.conf +++ b/config/boards/bigtreetech-cb1.conf @@ -6,7 +6,6 @@ BOOTCONFIG="bigtreetech_cb1_defconfig" DEFAULT_CONSOLE="serial" SERIALCON="ttyS0" KERNEL_TARGET="legacy,current,edge" -KERNEL_TEST_TARGET="legacy" FORCE_BOOTSCRIPT_UPDATE="yes" BOOTFS_TYPE="fat" BOOT_FS_LABEL="BOOT" From 0cba1d16bf7c54750811775b3376dc80ae58f28c Mon Sep 17 00:00:00 2001 From: SteeManMI <36392828+SteeManMI@users.noreply.github.com> Date: Tue, 20 Feb 2024 16:49:29 -0500 Subject: [PATCH 03/13] Fix ddbr to handle current lsblk output (#6290) Changes to be committed: modified: packages/bsp/common/usr/sbin/ddbr --- packages/bsp/common/usr/sbin/ddbr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/bsp/common/usr/sbin/ddbr b/packages/bsp/common/usr/sbin/ddbr index 36a7bfdf9584..c66bb4021bea 100755 --- a/packages/bsp/common/usr/sbin/ddbr +++ b/packages/bsp/common/usr/sbin/ddbr @@ -207,7 +207,7 @@ then echo "$_r UNABLE TO FIND ANY DRIVES ON THIS SYSTEM!!! $_x" exit 1 fi -runfrom=$(lsblk | grep / | grep -oE '(mmcblk[0-9]|sda[0-9])') +runfrom=$(lsblk | grep / | grep -oE '(mmcblk[0-9]|sda[0-9])' | sort | uniq) if [ "$runfrom" = "" ] then echo "$_r UNABLE TO FIND ROOT OF THE RUNNING SYSTEM!!! $_x" From 14ce06c5da7bdeb18bd1a3e04032e2cc0e83a061 Mon Sep 17 00:00:00 2001 From: SteeManMI <36392828+SteeManMI@users.noreply.github.com> Date: Tue, 20 Feb 2024 16:50:08 -0500 Subject: [PATCH 04/13] Fix upgrades of armbian-bsp-cli-aml-s9xx-box-current (#6287) - dpkg fails upgrading files on a fat filesystem as it tries to create a link - Move to using standard extlinux.conf instead of installing a custom one Changes to be committed: modified: config/boards/aml-s9xx-box.tvb deleted: packages/bsp/aml-s9xx-box/boot/extlinux/extlinux.conf new file: packages/bsp/aml-s9xx-box/boot/extlinux/extlinux.conf.template --- config/boards/aml-s9xx-box.tvb | 22 +++++++++++++++++++ .../aml-s9xx-box/boot/extlinux/extlinux.conf | 11 ---------- .../boot/extlinux/extlinux.conf.template | 14 ++++++++++++ 3 files changed, 36 insertions(+), 11 deletions(-) delete mode 100644 packages/bsp/aml-s9xx-box/boot/extlinux/extlinux.conf create mode 100644 packages/bsp/aml-s9xx-box/boot/extlinux/extlinux.conf.template diff --git a/config/boards/aml-s9xx-box.tvb b/config/boards/aml-s9xx-box.tvb index 3f2a25cb780e..b47f3fda6e83 100644 --- a/config/boards/aml-s9xx-box.tvb +++ b/config/boards/aml-s9xx-box.tvb @@ -10,8 +10,27 @@ SERIALCON="ttyAML0" FULL_DESKTOP="yes" ASOUND_STATE="asound.state.mesongx" BOOT_LOGO="desktop" +SRC_EXTLINUX="yes" SRC_CMDLINE='rootflags=data=writeback console=ttyAML0,115200n8 console=tty0' +function aml-s9xx-box-bsp-cli-preinst() { + #update of the board bsp-cli package fails because the filesystem type is + #fat and dpkg tries to create a hard link for the existing files as backup + #so rm the files instead in a preinst step + [ -f /boot/aml_autoscript ] && rm /boot/aml_autoscript + [ -f /boot/emmc_autoscript ] && rm /boot/emmc_autoscript + [ -f /boot/s905_autoscript ] && rm /boot/s905_autoscript + [ -f /boot/u-boot-s905 ] && rm /boot/u-boot-s905 + [ -f /boot/u-boot-s905x-s912 ] && rm /boot/u-boot-s905x-s912 + [ -f /boot/u-boot-s905x2-s922 ] && rm /boot/u-boot-s905x2-s922 + [ -f /boot/u-boot-s905x3 ] && rm /boot/u-boot-s905x3 + [ -f /boot/extlinux/extlinux.conf.template ] && rm /boot/extlinux/extlinux.conf.template + [ -f /boot/build-u-boot/readme.txt ] && rm /boot/build-u-boot/readme.txt + [ -f /boot/build-u-boot/u-boot-s905x-s912.patch ] && rm /boot/build-u-boot/u-boot-s905x-s912.patch + [ -f /boot/build-u-boot/u-boot-s905x2-s922.patch ] && rm /boot/build-u-boot/u-boot-s905x2-s922.patch + [ -f /boot/build-u-boot/u-boot-s905x3.patch ] && rm /boot/build-u-boot/u-boot-s905x3.patch + +} function post_family_tweaks_bsp__config_aml-s9xx-box_bsp() { @@ -25,4 +44,7 @@ function post_family_tweaks_bsp__config_aml-s9xx-box_bsp() { rm "${destination}"/usr/sbin/armbian-install + display_alert "${BOARD}" "Adding bsp-cli preinst logic" "info" + + preinst_functions+=('aml-s9xx-box-bsp-cli-preinst') } diff --git a/packages/bsp/aml-s9xx-box/boot/extlinux/extlinux.conf b/packages/bsp/aml-s9xx-box/boot/extlinux/extlinux.conf deleted file mode 100644 index 72ad3a929b62..000000000000 --- a/packages/bsp/aml-s9xx-box/boot/extlinux/extlinux.conf +++ /dev/null @@ -1,11 +0,0 @@ -LABEL Armbian -LINUX /Image -INITRD /uInitrd - -#FDT /dtb/amlogic/meson-gxbb-p200.dtb -#FDT /dtb/amlogic/meson-gxl-s905x-p212.dtb -FDT /dtb/amlogic/meson-gxl-s905w-tx3-mini.dtb -#FDT /dtb/amlogic/meson-gxm-q200.dtb -#FDT /dtb/amlogic/meson-g12a-x96-max.dtb -#FDT /dtb/amlogic/meson-g12b-odroid-n2.dtb - diff --git a/packages/bsp/aml-s9xx-box/boot/extlinux/extlinux.conf.template b/packages/bsp/aml-s9xx-box/boot/extlinux/extlinux.conf.template new file mode 100644 index 000000000000..763c2bb17157 --- /dev/null +++ b/packages/bsp/aml-s9xx-box/boot/extlinux/extlinux.conf.template @@ -0,0 +1,14 @@ +label Armbian-unofficial + kernel /Image + initrd /uInitrd + fdtdir /dtb/ + +#Insert the correct FDT line for your box's dtb in the extlinux.conf file +#The dtbs for Amlogic s9xx boxes are located in /boot/dtb/amlogic +#For example for a TX3 mini box the FDT line to insert would look like this: + FDT /dtb/amlogic/meson-gxl-s905w-tx3-mini.dtb + + + append root=UUID= rootflags=data=writeback console=ttyAML0,115200n8 console=tty0 rw no_console_suspend consoleblank=0 fsck.fix=yes fsck.repair=yes net.ifnames=0 splash plymouth.ignore-serial-consoles + + From 2bce64e24d0df35c31b19c2f865f118d71f08b7d Mon Sep 17 00:00:00 2001 From: Gunjan Gupta Date: Tue, 20 Feb 2024 15:30:54 +0530 Subject: [PATCH 05/13] kernel: add hook to allow modifying kernel headers before packaging --- lib/functions/artifacts/artifact-kernel.sh | 2 +- lib/functions/compilation/kernel-debs.sh | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/functions/artifacts/artifact-kernel.sh b/lib/functions/artifacts/artifact-kernel.sh index 6c6fe5fc76a8..4d86215e409b 100644 --- a/lib/functions/artifacts/artifact-kernel.sh +++ b/lib/functions/artifacts/artifact-kernel.sh @@ -143,7 +143,7 @@ function artifact_kernel_prepare_version() { declare var_config_hash_short="${vars_config_hash:0:${short_hash_size}}" # Hash the extension hooks - declare -a extension_hooks_to_hash=("pre_package_kernel_image" "kernel_copy_extra_sources") + declare -a extension_hooks_to_hash=("pre_package_kernel_image" "kernel_copy_extra_sources" "pre_package_kernel_headers") declare -a extension_hooks_hashed=("$(dump_extension_method_sources_functions "${extension_hooks_to_hash[@]}")") declare hash_hooks="undetermined" hash_hooks="$(echo "${extension_hooks_hashed[@]}" | sha256sum | cut -d' ' -f1)" diff --git a/lib/functions/compilation/kernel-debs.sh b/lib/functions/compilation/kernel-debs.sh index 4d75ae234c70..d792cf540cd7 100644 --- a/lib/functions/compilation/kernel-debs.sh +++ b/lib/functions/compilation/kernel-debs.sh @@ -457,6 +457,13 @@ function kernel_package_callback_linux_headers() { ) fi + call_extension_method "pre_package_kernel_headers" <<- 'PRE_PACKAGE_KERNEL_HEADERS' + *fix kernel headers before packaging* + Some (legacy/vendor) kernels need preprocessing of the produced kernel headers before packaging. + Use this hook to do that, by modifying the file in place, in `${headers_target_dir}` directory. + The kernel sources can be found in `${kernel_work_dir}`. + PRE_PACKAGE_KERNEL_HEADERS + # Generate a control file # TODO: libssl-dev is only required if we're signing modules, which is a kernel .config option. cat <<- CONTROL_FILE > "${package_DEBIAN_dir}/control" From 36e6ab2ab6c2a510b2611e7dd546743e2efe952e Mon Sep 17 00:00:00 2001 From: Gunjan Gupta Date: Tue, 20 Feb 2024 15:31:44 +0530 Subject: [PATCH 06/13] meson-s4t7: fix kernel headers installation failure due to missing make file --- config/sources/families/meson-s4t7.conf | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/config/sources/families/meson-s4t7.conf b/config/sources/families/meson-s4t7.conf index e0cf60c494b4..4a9ed9edf543 100644 --- a/config/sources/families/meson-s4t7.conf +++ b/config/sources/families/meson-s4t7.conf @@ -154,6 +154,14 @@ function kernel_copy_extra_sources__khadas_common_drivers() { fetch_from_repo "${COMMON_DRIVERS_SOURCE}" "common_drivers:${KERNEL_MAJOR_MINOR}" "${KERNELBRANCH}" "yes" } +function pre_package_kernel_headers__copy_common_drivers_header_include_mk_file() { + display_alert "Copy common_drivers/header_include.mk file in kernel headers" + declare makefile_destination="${headers_target_dir}"/common_drivers + run_host_command_logged mkdir -p ${makefile_destination} + run_host_command_logged cp ${kernel_work_dir}/common_drivers/header_include.mk ${makefile_destination}/ + run_host_command_logged cp -r ${kernel_work_dir}/common_drivers/include ${makefile_destination}/ +} + function pre_package_kernel_image__copy_meson_s4t7_overlays() { display_alert "Copy meson s4t7 overlays" declare dtbo_destination="${tmp_kernel_install_dirs[INSTALL_DTBS_PATH]}"/amlogic From 2313d3111b0b2f8c1d4843eb31d113dbed8b82cc Mon Sep 17 00:00:00 2001 From: Gunjan Gupta Date: Mon, 19 Feb 2024 07:48:20 +0530 Subject: [PATCH 07/13] vim1s/vim4 - fix intermittent boot issues when booting from uhs sd card on vim1s & vim4 --- ...le-hs-SD-adjust-function-in-uboot-20.patch | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 patch/u-boot/u-boot-meson-s4t7/Revert-emmc-enable-hs-SD-adjust-function-in-uboot-20.patch diff --git a/patch/u-boot/u-boot-meson-s4t7/Revert-emmc-enable-hs-SD-adjust-function-in-uboot-20.patch b/patch/u-boot/u-boot-meson-s4t7/Revert-emmc-enable-hs-SD-adjust-function-in-uboot-20.patch new file mode 100644 index 000000000000..5f23991e26a5 --- /dev/null +++ b/patch/u-boot/u-boot-meson-s4t7/Revert-emmc-enable-hs-SD-adjust-function-in-uboot-20.patch @@ -0,0 +1,31 @@ +From 762693b0c2f54a9c1922cceef9b8d45c6bd1e4a5 Mon Sep 17 00:00:00 2001 +From: Gunjan Gupta +Date: Fri, 16 Feb 2024 11:48:57 +0000 +Subject: [PATCH] Revert "emmc: enable hs SD adjust function in uboot 2019 + [1/1]" + +This reverts commit bfa451f799eac8a69d4e58a32af7b00bec012e1d. +--- + drivers/mmc/mmc.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c +index f5cf48099b..18eacc6e0a 100644 +--- a/drivers/mmc/mmc.c ++++ b/drivers/mmc/mmc.c +@@ -1722,9 +1722,9 @@ static const struct mode_width_tuning sd_modes_by_pref[] = { + { + .mode = SD_HS, + .widths = MMC_MODE_4BIT | MMC_MODE_1BIT, +-#ifdef MMC_SUPPORTS_TUNING +- .tuning = MMC_SD_HS_TUNING +-#endif ++//#ifdef MMC_SUPPORTS_TUNING ++// .tuning = MMC_SD_HS_TUNING ++//#endif + }, + #if CONFIG_IS_ENABLED(MMC_UHS_SUPPORT) + { +-- +2.34.1 + From 6154b98851b93e868acfa0dc5e2a9abedfce2308 Mon Sep 17 00:00:00 2001 From: Alex Shumsky Date: Sat, 17 Feb 2024 21:32:37 +0300 Subject: [PATCH 08/13] rk3318: enable uboot gpio command --- .../board_rk3318-box/rk3318-box-add-defconfig.patch | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/patch/u-boot/u-boot-rockchip64/board_rk3318-box/rk3318-box-add-defconfig.patch b/patch/u-boot/u-boot-rockchip64/board_rk3318-box/rk3318-box-add-defconfig.patch index f1a75ab85d41..9c274c4fb1ef 100644 --- a/patch/u-boot/u-boot-rockchip64/board_rk3318-box/rk3318-box-add-defconfig.patch +++ b/patch/u-boot/u-boot-rockchip64/board_rk3318-box/rk3318-box-add-defconfig.patch @@ -3,7 +3,7 @@ new file mode 100644 index 00000000..b6a038f7 --- /dev/null +++ b/configs/rk3318-box_defconfig -@@ -0,0 +1,121 @@ +@@ -0,0 +1,123 @@ +CONFIG_ARM=y +CONFIG_ARCH_ROCKCHIP=y +CONFIG_SYS_TEXT_BASE=0x00200000 @@ -125,3 +125,5 @@ index 00000000..b6a038f7 +CONFIG_BUTTON=y +CONFIG_BUTTON_ADC=y +CONFIG_CMD_BUTTON=y ++CONFIG_CMD_GPIO=y ++CONFIG_CMD_GPIO_READ=y From bf1f57faef162d50a375aa9f0062ca377d195832 Mon Sep 17 00:00:00 2001 From: Ricardo Pardini Date: Sun, 18 Feb 2024 14:20:31 +0100 Subject: [PATCH 09/13] artifact-uboot: include BOOTCONFIG in u-boot artifact version hash - HOW did we get this far without this? - should cause rebuild of all u-boots, hopefully --- lib/functions/artifacts/artifact-uboot.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/functions/artifacts/artifact-uboot.sh b/lib/functions/artifacts/artifact-uboot.sh index 84ce63fa95c0..09deb309e540 100644 --- a/lib/functions/artifacts/artifact-uboot.sh +++ b/lib/functions/artifacts/artifact-uboot.sh @@ -90,9 +90,11 @@ function artifact_uboot_prepare_version() { hash_hooks_and_functions="$(echo "${hash_hooks}" "${hash_uboot_functions}" | sha256sum | cut -d' ' -f1)" declare hash_hooks_and_functions_short="${hash_hooks_and_functions:0:${short_hash_size}}" + display_alert "BOOTCONFIG: ${BOOTCONFIG}" "BOOTCONFIG: ${BOOTCONFIG}" "debug" + # Hash variables that affect the build and package of u-boot declare -a vars_to_hash=( - "BASE_VAR_REBUILD_2" # Change this to force a full rebuild of all uboot's + "${BOOTCONFIG:-"no_bootconfig"}" "${BOOTDELAY}" "${UBOOT_DEBUGGING}" "${UBOOT_TARGET_MAP}" # general for all families "${BOOT_SCENARIO}" "${BOOT_SUPPORT_SPI}" "${BOOT_SOC}" # rockchip stuff, sorry. "${DDR_BLOB}" "${BL31_BLOB}" "${MINILOADER_BLOB}" # More rockchip stuff, even more sorry. From b84990cf836b0ab5a456dbf525bb0ab1477f70d8 Mon Sep 17 00:00:00 2001 From: Ricardo Pardini Date: Sun, 18 Feb 2024 14:46:15 +0100 Subject: [PATCH 10/13] mekotronics 3588: fix entering RK LOADER mode by keeping the RECOVERY button pressed during boot - those patches are a mess, hopefully I'll find time to squash soon --- ...bugs-for-download-button-not-working.patch | 44 ++++++++++++ ...-equalize-with-rk3588_meko_defconfig.patch | 71 +++++++++++++++++++ ...ys-for-RECOVERY-button-to-work-again.patch | 41 +++++++++++ ..._detect-when-RECOVERY-button-pressed.patch | 34 +++++++++ 4 files changed, 190 insertions(+) create mode 100644 patch/u-boot/legacy/u-boot-meko-rk3588/0005-boot_rkimg-add-debugs-for-download-button-not-working.patch create mode 100644 patch/u-boot/legacy/u-boot-meko-rk3588/0006-rk3588_meko_r58x_defconfig-equalize-with-rk3588_meko_defconfig.patch create mode 100644 patch/u-boot/legacy/u-boot-meko-rk3588/0007-rk3588-blueberry-edge-v12.dts-add-KEY_VOLUMEUP-adc-keys-for-RECOVERY-button-to-work-again.patch create mode 100644 patch/u-boot/legacy/u-boot-meko-rk3588/0008-boot_rkimg-don-t-try-rockchip_u2phy_vbus_detect-when-RECOVERY-button-pressed.patch diff --git a/patch/u-boot/legacy/u-boot-meko-rk3588/0005-boot_rkimg-add-debugs-for-download-button-not-working.patch b/patch/u-boot/legacy/u-boot-meko-rk3588/0005-boot_rkimg-add-debugs-for-download-button-not-working.patch new file mode 100644 index 000000000000..7f23f8be3cff --- /dev/null +++ b/patch/u-boot/legacy/u-boot-meko-rk3588/0005-boot_rkimg-add-debugs-for-download-button-not-working.patch @@ -0,0 +1,44 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Ricardo Pardini +Date: Sun, 18 Feb 2024 14:33:37 +0100 +Subject: boot_rkimg: add debugs for download button not working + +--- + arch/arm/mach-rockchip/boot_rkimg.c | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +diff --git a/arch/arm/mach-rockchip/boot_rkimg.c b/arch/arm/mach-rockchip/boot_rkimg.c +index 9e6c3556a9e..f1a683d4e8e 100644 +--- a/arch/arm/mach-rockchip/boot_rkimg.c ++++ b/arch/arm/mach-rockchip/boot_rkimg.c +@@ -322,6 +322,9 @@ void setup_download_mode(void) + + boot_devtype_init(); + ++ printf("setup_download_mode checking if download %skey pressed... ", ++ is_hotkey(HK_ROCKUSB_DNL) ? "is HOT YES" : "is NOT HOT"); ++ + if (rockchip_dnl_key_pressed() || is_hotkey(HK_ROCKUSB_DNL)) { + printf("download %skey pressed... ", + is_hotkey(HK_ROCKUSB_DNL) ? "hot" : ""); +@@ -329,7 +332,7 @@ void setup_download_mode(void) + vbus = rockchip_u2phy_vbus_detect(); + #endif + if (vbus > 0) { +- printf("%sentering download mode...\n", ++ printf("%sentering download mode vbus > 0...\n", + IS_ENABLED(CONFIG_CMD_ROCKUSB) ? + "" : "no rockusb, "); + +@@ -339,7 +342,7 @@ void setup_download_mode(void) + if ((fdt_node_offset_by_compatible(blob, -1, "radxa,rockpie")) >= 0) { + run_command("download", 0); + } +- printf("entering recovery mode!\n"); ++ printf("entering recovery mode vbus not > 0!\n"); + env_set("reboot_mode", "recovery-key"); + } + } else if (is_hotkey(HK_FASTBOOT)) { +-- +Armbian + diff --git a/patch/u-boot/legacy/u-boot-meko-rk3588/0006-rk3588_meko_r58x_defconfig-equalize-with-rk3588_meko_defconfig.patch b/patch/u-boot/legacy/u-boot-meko-rk3588/0006-rk3588_meko_r58x_defconfig-equalize-with-rk3588_meko_defconfig.patch new file mode 100644 index 000000000000..36b37581ae86 --- /dev/null +++ b/patch/u-boot/legacy/u-boot-meko-rk3588/0006-rk3588_meko_r58x_defconfig-equalize-with-rk3588_meko_defconfig.patch @@ -0,0 +1,71 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Ricardo Pardini +Date: Sun, 18 Feb 2024 14:37:21 +0100 +Subject: rk3588_meko_r58x_defconfig: equalize with rk3588_meko_defconfig + +--- + configs/rk3588_meko_r58x_defconfig | 12 +++++++--- + 1 file changed, 9 insertions(+), 3 deletions(-) + +diff --git a/configs/rk3588_meko_r58x_defconfig b/configs/rk3588_meko_r58x_defconfig +index 21d768e5777..b03ffa9437c 100644 +--- a/configs/rk3588_meko_r58x_defconfig ++++ b/configs/rk3588_meko_r58x_defconfig +@@ -6,7 +6,6 @@ CONFIG_SPL_LIBGENERIC_SUPPORT=y + CONFIG_SYS_MALLOC_F_LEN=0x80000 + CONFIG_SPL_FIT_GENERATOR="arch/arm/mach-rockchip/make_fit_atf.sh" + CONFIG_ROCKCHIP_RK3588=y +-CONFIG_ROCKCHIP_USB_BOOT=y + CONFIG_ROCKCHIP_FIT_IMAGE=y + CONFIG_ROCKCHIP_HWID_DTB=y + CONFIG_ROCKCHIP_VENDOR_PARTITION=y +@@ -33,6 +32,10 @@ CONFIG_SPL_FIT_HW_CRYPTO=y + # CONFIG_SPL_SYS_DCACHE_OFF is not set + CONFIG_BOOTDELAY=1 + CONFIG_SYS_CONSOLE_INFO_QUIET=y ++CONFIG_LOG=y ++CONFIG_SPL_LOG=y ++CONFIG_LOG_MAX_LEVEL=7 ++CONFIG_SPL_LOG_MAX_LEVEL=6 + # CONFIG_DISPLAY_CPUINFO is not set + CONFIG_ANDROID_BOOTLOADER=y + CONFIG_ANDROID_AVB=y +@@ -46,8 +49,9 @@ CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION=0x1 + CONFIG_SPL_MMC_WRITE=y + CONFIG_SPL_MTD_SUPPORT=y + CONFIG_SPL_ATF=y ++CONFIG_SPL_AB=y + CONFIG_FASTBOOT_BUF_ADDR=0xc00800 +-CONFIG_FASTBOOT_BUF_SIZE=0x04000000 ++CONFIG_FASTBOOT_BUF_SIZE=0x07000000 + CONFIG_FASTBOOT_FLASH=y + CONFIG_FASTBOOT_FLASH_MMC_DEV=0 + CONFIG_CMD_BOOTZ=y +@@ -84,6 +88,7 @@ CONFIG_SPL_OF_CONTROL=y + CONFIG_SPL_DTB_MINIMUM=y + CONFIG_OF_LIVE=y + CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents" ++CONFIG_OF_U_BOOT_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents" + # CONFIG_NET_TFTP_VARS is not set + CONFIG_REGMAP=y + CONFIG_SPL_REGMAP=y +@@ -139,7 +144,6 @@ CONFIG_SPI_FLASH_WINBOND=y + CONFIG_SPI_FLASH_XMC=y + CONFIG_SPI_FLASH_XTX=y + CONFIG_SPI_FLASH_MTD=y +-CONFIG_PHY_REALTEK=y + CONFIG_DM_ETH=y + CONFIG_DM_ETH_PHY=y + CONFIG_DWC_ETH_QOS=y +@@ -216,6 +220,8 @@ CONFIG_DISPLAY=y + CONFIG_DRM_ROCKCHIP=y + CONFIG_DRM_MAXIM_MAX96745=y + CONFIG_DRM_MAXIM_MAX96755F=y ++CONFIG_DRM_PANEL_ROHM_BU18RL82=y ++CONFIG_DRM_PANEL_MAXIM_MAX96752F=y + CONFIG_DRM_ROHM_BU18XL82=y + CONFIG_DRM_ROCKCHIP_DW_HDMI_QP=y + CONFIG_DRM_ROCKCHIP_DW_MIPI_DSI2=y +-- +Armbian + diff --git a/patch/u-boot/legacy/u-boot-meko-rk3588/0007-rk3588-blueberry-edge-v12.dts-add-KEY_VOLUMEUP-adc-keys-for-RECOVERY-button-to-work-again.patch b/patch/u-boot/legacy/u-boot-meko-rk3588/0007-rk3588-blueberry-edge-v12.dts-add-KEY_VOLUMEUP-adc-keys-for-RECOVERY-button-to-work-again.patch new file mode 100644 index 000000000000..ed02224dbbd4 --- /dev/null +++ b/patch/u-boot/legacy/u-boot-meko-rk3588/0007-rk3588-blueberry-edge-v12.dts-add-KEY_VOLUMEUP-adc-keys-for-RECOVERY-button-to-work-again.patch @@ -0,0 +1,41 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Ricardo Pardini +Date: Sun, 18 Feb 2024 14:37:47 +0100 +Subject: rk3588-blueberry-edge-v12.dts: add KEY_VOLUMEUP adc-keys for RECOVERY + button to work again + +--- + arch/arm/dts/rk3588-blueberry-edge-v12.dts | 17 ++++++++++ + 1 file changed, 17 insertions(+) + +diff --git a/arch/arm/dts/rk3588-blueberry-edge-v12.dts b/arch/arm/dts/rk3588-blueberry-edge-v12.dts +index 27ea53a7f93..5dd31189e3d 100644 +--- a/arch/arm/dts/rk3588-blueberry-edge-v12.dts ++++ b/arch/arm/dts/rk3588-blueberry-edge-v12.dts +@@ -13,6 +13,23 @@ + model = "Mekotronics R58X-4G (RK3588 EDGE LP4x V1.2 BlueBerry Board)"; + compatible = "rockchip,rk3588-blueberry-edge-v12-linux", "rockchip,rk3588"; + ++ // This is needed for the RECOVERY button to actually trigger LOADER mode when pressed during boot ++ adc-keys { ++ compatible = "adc-keys"; ++ io-channels = <&saradc 1>; ++ io-channel-names = "buttons"; ++ keyup-threshold-microvolt = <1800000>; ++ u-boot,dm-pre-reloc; ++ status = "okay"; ++ ++ volumeup-key { ++ u-boot,dm-pre-reloc; ++ linux,code = ; ++ label = "volume up"; ++ press-threshold-microvolt = <1750>; ++ }; ++ }; ++ + vcc12v_dcin: vcc12v-dcin { + u-boot,dm-pre-reloc; + compatible = "regulator-fixed"; +-- +Armbian + diff --git a/patch/u-boot/legacy/u-boot-meko-rk3588/0008-boot_rkimg-don-t-try-rockchip_u2phy_vbus_detect-when-RECOVERY-button-pressed.patch b/patch/u-boot/legacy/u-boot-meko-rk3588/0008-boot_rkimg-don-t-try-rockchip_u2phy_vbus_detect-when-RECOVERY-button-pressed.patch new file mode 100644 index 000000000000..44f13dbdde94 --- /dev/null +++ b/patch/u-boot/legacy/u-boot-meko-rk3588/0008-boot_rkimg-don-t-try-rockchip_u2phy_vbus_detect-when-RECOVERY-button-pressed.patch @@ -0,0 +1,34 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Ricardo Pardini +Date: Sun, 18 Feb 2024 15:01:10 +0100 +Subject: boot_rkimg: don't try rockchip_u2phy_vbus_detect when RECOVERY button + pressed + +--- + arch/arm/mach-rockchip/boot_rkimg.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/arch/arm/mach-rockchip/boot_rkimg.c b/arch/arm/mach-rockchip/boot_rkimg.c +index f1a683d4e8e..f79aed467bc 100644 +--- a/arch/arm/mach-rockchip/boot_rkimg.c ++++ b/arch/arm/mach-rockchip/boot_rkimg.c +@@ -322,14 +322,14 @@ void setup_download_mode(void) + + boot_devtype_init(); + +- printf("setup_download_mode checking if download %skey pressed... ", ++ printf("setup_download_mode checking if download %skey pressed...\n", + is_hotkey(HK_ROCKUSB_DNL) ? "is HOT YES" : "is NOT HOT"); + + if (rockchip_dnl_key_pressed() || is_hotkey(HK_ROCKUSB_DNL)) { + printf("download %skey pressed... ", + is_hotkey(HK_ROCKUSB_DNL) ? "hot" : ""); + #ifdef CONFIG_CMD_ROCKUSB +- vbus = rockchip_u2phy_vbus_detect(); ++ // vbus = rockchip_u2phy_vbus_detect(); // rpardini: don't do this, it fails with -19 + #endif + if (vbus > 0) { + printf("%sentering download mode vbus > 0...\n", +-- +Armbian + From 431f43671035b6567bf3ad0729c56e8ed0fc0ccd Mon Sep 17 00:00:00 2001 From: Ricardo Pardini Date: Sun, 18 Feb 2024 15:15:40 +0100 Subject: [PATCH 11/13] mekotronics 3588: squash u-boot patches - same as before but not touching the same file twice+ --- ...optee-original-ish-by-Meko-from-EVB.patch} | 3 +- ...me-boot-and-working-RECOVERY-button.patch} | 48 ++++++++++--- ...detect-when-RECOVERY-button-pressed.patch} | 19 ++--- ...-equalize-with-rk3588_meko_defconfig.patch | 71 ------------------- ...ys-for-RECOVERY-button-to-work-again.patch | 41 ----------- ..._detect-when-RECOVERY-button-pressed.patch | 34 --------- 6 files changed, 50 insertions(+), 166 deletions(-) rename patch/u-boot/legacy/u-boot-meko-rk3588/{0003-rk3588_meko_defconfig-evb-sans-optee.patch => 0003-rk3588_meko_defconfig-evb-sans-optee-original-ish-by-Meko-from-EVB.patch} (98%) rename patch/u-boot/legacy/u-boot-meko-rk3588/{0004-rk3588_meko_r58x_defconfig-and-dts-with-pci3x4-nvme-boot.patch => 0004-rk3588_meko_r58x_defconfig-and-dts-with-pci3x4-nvme-boot-and-working-RECOVERY-button.patch} (89%) rename patch/u-boot/legacy/u-boot-meko-rk3588/{0005-boot_rkimg-add-debugs-for-download-button-not-working.patch => 0005-boot_rkimg-don-t-try-rockchip_u2phy_vbus_detect-when-RECOVERY-button-pressed.patch} (70%) delete mode 100644 patch/u-boot/legacy/u-boot-meko-rk3588/0006-rk3588_meko_r58x_defconfig-equalize-with-rk3588_meko_defconfig.patch delete mode 100644 patch/u-boot/legacy/u-boot-meko-rk3588/0007-rk3588-blueberry-edge-v12.dts-add-KEY_VOLUMEUP-adc-keys-for-RECOVERY-button-to-work-again.patch delete mode 100644 patch/u-boot/legacy/u-boot-meko-rk3588/0008-boot_rkimg-don-t-try-rockchip_u2phy_vbus_detect-when-RECOVERY-button-pressed.patch diff --git a/patch/u-boot/legacy/u-boot-meko-rk3588/0003-rk3588_meko_defconfig-evb-sans-optee.patch b/patch/u-boot/legacy/u-boot-meko-rk3588/0003-rk3588_meko_defconfig-evb-sans-optee-original-ish-by-Meko-from-EVB.patch similarity index 98% rename from patch/u-boot/legacy/u-boot-meko-rk3588/0003-rk3588_meko_defconfig-evb-sans-optee.patch rename to patch/u-boot/legacy/u-boot-meko-rk3588/0003-rk3588_meko_defconfig-evb-sans-optee-original-ish-by-Meko-from-EVB.patch index 0f3a162debe1..809fcf205fc7 100644 --- a/patch/u-boot/legacy/u-boot-meko-rk3588/0003-rk3588_meko_defconfig-evb-sans-optee.patch +++ b/patch/u-boot/legacy/u-boot-meko-rk3588/0003-rk3588_meko_defconfig-evb-sans-optee-original-ish-by-Meko-from-EVB.patch @@ -1,7 +1,8 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Ricardo Pardini Date: Sat, 1 Jul 2023 10:49:27 +0200 -Subject: rk3588_meko_defconfig - evb sans optee +Subject: rk3588_meko_defconfig - evb sans optee (original-ish by Meko from + EVB) --- configs/rk3588_meko_defconfig | 238 ++++++++++ diff --git a/patch/u-boot/legacy/u-boot-meko-rk3588/0004-rk3588_meko_r58x_defconfig-and-dts-with-pci3x4-nvme-boot.patch b/patch/u-boot/legacy/u-boot-meko-rk3588/0004-rk3588_meko_r58x_defconfig-and-dts-with-pci3x4-nvme-boot-and-working-RECOVERY-button.patch similarity index 89% rename from patch/u-boot/legacy/u-boot-meko-rk3588/0004-rk3588_meko_r58x_defconfig-and-dts-with-pci3x4-nvme-boot.patch rename to patch/u-boot/legacy/u-boot-meko-rk3588/0004-rk3588_meko_r58x_defconfig-and-dts-with-pci3x4-nvme-boot-and-working-RECOVERY-button.patch index b4c3a1e9efe4..cf54024960d2 100644 --- a/patch/u-boot/legacy/u-boot-meko-rk3588/0004-rk3588_meko_r58x_defconfig-and-dts-with-pci3x4-nvme-boot.patch +++ b/patch/u-boot/legacy/u-boot-meko-rk3588/0004-rk3588_meko_r58x_defconfig-and-dts-with-pci3x4-nvme-boot-and-working-RECOVERY-button.patch @@ -1,19 +1,22 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Ricardo Pardini Date: Thu, 5 Oct 2023 15:31:11 +0200 -Subject: rk3588_meko_r58x_defconfig and dts with pci3x4 nvme boot +Subject: rk3588_meko_r58x_defconfig and dts with pci3x4 nvme boot and working + RECOVERY button +- rk3588-blueberry-edge-v12.dts: add KEY_VOLUMEUP adc-keys for RECOVERY button to work again +- rk3588_meko_r58x_defconfig: equalize with rk3588_meko_defconfig --- - arch/arm/dts/rk3588-blueberry-edge-v12.dts | 142 ++++++ - configs/rk3588_meko_r58x_defconfig | 242 ++++++++++ - 2 files changed, 384 insertions(+) + arch/arm/dts/rk3588-blueberry-edge-v12.dts | 159 ++++++ + configs/rk3588_meko_r58x_defconfig | 248 ++++++++++ + 2 files changed, 407 insertions(+) diff --git a/arch/arm/dts/rk3588-blueberry-edge-v12.dts b/arch/arm/dts/rk3588-blueberry-edge-v12.dts new file mode 100644 -index 00000000000..27ea53a7f93 +index 00000000000..5dd31189e3d --- /dev/null +++ b/arch/arm/dts/rk3588-blueberry-edge-v12.dts -@@ -0,0 +1,142 @@ +@@ -0,0 +1,159 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright (c) 2021 Rockchip Electronics Co., Ltd @@ -29,6 +32,23 @@ index 00000000000..27ea53a7f93 + model = "Mekotronics R58X-4G (RK3588 EDGE LP4x V1.2 BlueBerry Board)"; + compatible = "rockchip,rk3588-blueberry-edge-v12-linux", "rockchip,rk3588"; + ++ // This is needed for the RECOVERY button to actually trigger LOADER mode when pressed during boot ++ adc-keys { ++ compatible = "adc-keys"; ++ io-channels = <&saradc 1>; ++ io-channel-names = "buttons"; ++ keyup-threshold-microvolt = <1800000>; ++ u-boot,dm-pre-reloc; ++ status = "okay"; ++ ++ volumeup-key { ++ u-boot,dm-pre-reloc; ++ linux,code = ; ++ label = "volume up"; ++ press-threshold-microvolt = <1750>; ++ }; ++ }; ++ + vcc12v_dcin: vcc12v-dcin { + u-boot,dm-pre-reloc; + compatible = "regulator-fixed"; @@ -158,10 +178,10 @@ index 00000000000..27ea53a7f93 + diff --git a/configs/rk3588_meko_r58x_defconfig b/configs/rk3588_meko_r58x_defconfig new file mode 100644 -index 00000000000..21d768e5777 +index 00000000000..b03ffa9437c --- /dev/null +++ b/configs/rk3588_meko_r58x_defconfig -@@ -0,0 +1,242 @@ +@@ -0,0 +1,248 @@ +CONFIG_ARM=y +CONFIG_ARCH_ROCKCHIP=y +CONFIG_SPL_GPIO_SUPPORT=y @@ -170,7 +190,6 @@ index 00000000000..21d768e5777 +CONFIG_SYS_MALLOC_F_LEN=0x80000 +CONFIG_SPL_FIT_GENERATOR="arch/arm/mach-rockchip/make_fit_atf.sh" +CONFIG_ROCKCHIP_RK3588=y -+CONFIG_ROCKCHIP_USB_BOOT=y +CONFIG_ROCKCHIP_FIT_IMAGE=y +CONFIG_ROCKCHIP_HWID_DTB=y +CONFIG_ROCKCHIP_VENDOR_PARTITION=y @@ -197,6 +216,10 @@ index 00000000000..21d768e5777 +# CONFIG_SPL_SYS_DCACHE_OFF is not set +CONFIG_BOOTDELAY=1 +CONFIG_SYS_CONSOLE_INFO_QUIET=y ++CONFIG_LOG=y ++CONFIG_SPL_LOG=y ++CONFIG_LOG_MAX_LEVEL=7 ++CONFIG_SPL_LOG_MAX_LEVEL=6 +# CONFIG_DISPLAY_CPUINFO is not set +CONFIG_ANDROID_BOOTLOADER=y +CONFIG_ANDROID_AVB=y @@ -210,8 +233,9 @@ index 00000000000..21d768e5777 +CONFIG_SPL_MMC_WRITE=y +CONFIG_SPL_MTD_SUPPORT=y +CONFIG_SPL_ATF=y ++CONFIG_SPL_AB=y +CONFIG_FASTBOOT_BUF_ADDR=0xc00800 -+CONFIG_FASTBOOT_BUF_SIZE=0x04000000 ++CONFIG_FASTBOOT_BUF_SIZE=0x07000000 +CONFIG_FASTBOOT_FLASH=y +CONFIG_FASTBOOT_FLASH_MMC_DEV=0 +CONFIG_CMD_BOOTZ=y @@ -248,6 +272,7 @@ index 00000000000..21d768e5777 +CONFIG_SPL_DTB_MINIMUM=y +CONFIG_OF_LIVE=y +CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents" ++CONFIG_OF_U_BOOT_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents" +# CONFIG_NET_TFTP_VARS is not set +CONFIG_REGMAP=y +CONFIG_SPL_REGMAP=y @@ -303,7 +328,6 @@ index 00000000000..21d768e5777 +CONFIG_SPI_FLASH_XMC=y +CONFIG_SPI_FLASH_XTX=y +CONFIG_SPI_FLASH_MTD=y -+CONFIG_PHY_REALTEK=y +CONFIG_DM_ETH=y +CONFIG_DM_ETH_PHY=y +CONFIG_DWC_ETH_QOS=y @@ -380,6 +404,8 @@ index 00000000000..21d768e5777 +CONFIG_DRM_ROCKCHIP=y +CONFIG_DRM_MAXIM_MAX96745=y +CONFIG_DRM_MAXIM_MAX96755F=y ++CONFIG_DRM_PANEL_ROHM_BU18RL82=y ++CONFIG_DRM_PANEL_MAXIM_MAX96752F=y +CONFIG_DRM_ROHM_BU18XL82=y +CONFIG_DRM_ROCKCHIP_DW_HDMI_QP=y +CONFIG_DRM_ROCKCHIP_DW_MIPI_DSI2=y diff --git a/patch/u-boot/legacy/u-boot-meko-rk3588/0005-boot_rkimg-add-debugs-for-download-button-not-working.patch b/patch/u-boot/legacy/u-boot-meko-rk3588/0005-boot_rkimg-don-t-try-rockchip_u2phy_vbus_detect-when-RECOVERY-button-pressed.patch similarity index 70% rename from patch/u-boot/legacy/u-boot-meko-rk3588/0005-boot_rkimg-add-debugs-for-download-button-not-working.patch rename to patch/u-boot/legacy/u-boot-meko-rk3588/0005-boot_rkimg-don-t-try-rockchip_u2phy_vbus_detect-when-RECOVERY-button-pressed.patch index 7f23f8be3cff..800e7f325919 100644 --- a/patch/u-boot/legacy/u-boot-meko-rk3588/0005-boot_rkimg-add-debugs-for-download-button-not-working.patch +++ b/patch/u-boot/legacy/u-boot-meko-rk3588/0005-boot_rkimg-don-t-try-rockchip_u2phy_vbus_detect-when-RECOVERY-button-pressed.patch @@ -1,28 +1,31 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Ricardo Pardini Date: Sun, 18 Feb 2024 14:33:37 +0100 -Subject: boot_rkimg: add debugs for download button not working +Subject: boot_rkimg: don't try rockchip_u2phy_vbus_detect when RECOVERY button + pressed +- boot_rkimg: add debugs for download button not working --- - arch/arm/mach-rockchip/boot_rkimg.c | 7 +++++-- - 1 file changed, 5 insertions(+), 2 deletions(-) + arch/arm/mach-rockchip/boot_rkimg.c | 9 ++++++--- + 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/arch/arm/mach-rockchip/boot_rkimg.c b/arch/arm/mach-rockchip/boot_rkimg.c -index 9e6c3556a9e..f1a683d4e8e 100644 +index 9e6c3556a9e..f79aed467bc 100644 --- a/arch/arm/mach-rockchip/boot_rkimg.c +++ b/arch/arm/mach-rockchip/boot_rkimg.c -@@ -322,6 +322,9 @@ void setup_download_mode(void) +@@ -322,14 +322,17 @@ void setup_download_mode(void) boot_devtype_init(); -+ printf("setup_download_mode checking if download %skey pressed... ", ++ printf("setup_download_mode checking if download %skey pressed...\n", + is_hotkey(HK_ROCKUSB_DNL) ? "is HOT YES" : "is NOT HOT"); + if (rockchip_dnl_key_pressed() || is_hotkey(HK_ROCKUSB_DNL)) { printf("download %skey pressed... ", is_hotkey(HK_ROCKUSB_DNL) ? "hot" : ""); -@@ -329,7 +332,7 @@ void setup_download_mode(void) - vbus = rockchip_u2phy_vbus_detect(); + #ifdef CONFIG_CMD_ROCKUSB +- vbus = rockchip_u2phy_vbus_detect(); ++ // vbus = rockchip_u2phy_vbus_detect(); // rpardini: don't do this, it fails with -19 #endif if (vbus > 0) { - printf("%sentering download mode...\n", diff --git a/patch/u-boot/legacy/u-boot-meko-rk3588/0006-rk3588_meko_r58x_defconfig-equalize-with-rk3588_meko_defconfig.patch b/patch/u-boot/legacy/u-boot-meko-rk3588/0006-rk3588_meko_r58x_defconfig-equalize-with-rk3588_meko_defconfig.patch deleted file mode 100644 index 36b37581ae86..000000000000 --- a/patch/u-boot/legacy/u-boot-meko-rk3588/0006-rk3588_meko_r58x_defconfig-equalize-with-rk3588_meko_defconfig.patch +++ /dev/null @@ -1,71 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Ricardo Pardini -Date: Sun, 18 Feb 2024 14:37:21 +0100 -Subject: rk3588_meko_r58x_defconfig: equalize with rk3588_meko_defconfig - ---- - configs/rk3588_meko_r58x_defconfig | 12 +++++++--- - 1 file changed, 9 insertions(+), 3 deletions(-) - -diff --git a/configs/rk3588_meko_r58x_defconfig b/configs/rk3588_meko_r58x_defconfig -index 21d768e5777..b03ffa9437c 100644 ---- a/configs/rk3588_meko_r58x_defconfig -+++ b/configs/rk3588_meko_r58x_defconfig -@@ -6,7 +6,6 @@ CONFIG_SPL_LIBGENERIC_SUPPORT=y - CONFIG_SYS_MALLOC_F_LEN=0x80000 - CONFIG_SPL_FIT_GENERATOR="arch/arm/mach-rockchip/make_fit_atf.sh" - CONFIG_ROCKCHIP_RK3588=y --CONFIG_ROCKCHIP_USB_BOOT=y - CONFIG_ROCKCHIP_FIT_IMAGE=y - CONFIG_ROCKCHIP_HWID_DTB=y - CONFIG_ROCKCHIP_VENDOR_PARTITION=y -@@ -33,6 +32,10 @@ CONFIG_SPL_FIT_HW_CRYPTO=y - # CONFIG_SPL_SYS_DCACHE_OFF is not set - CONFIG_BOOTDELAY=1 - CONFIG_SYS_CONSOLE_INFO_QUIET=y -+CONFIG_LOG=y -+CONFIG_SPL_LOG=y -+CONFIG_LOG_MAX_LEVEL=7 -+CONFIG_SPL_LOG_MAX_LEVEL=6 - # CONFIG_DISPLAY_CPUINFO is not set - CONFIG_ANDROID_BOOTLOADER=y - CONFIG_ANDROID_AVB=y -@@ -46,8 +49,9 @@ CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION=0x1 - CONFIG_SPL_MMC_WRITE=y - CONFIG_SPL_MTD_SUPPORT=y - CONFIG_SPL_ATF=y -+CONFIG_SPL_AB=y - CONFIG_FASTBOOT_BUF_ADDR=0xc00800 --CONFIG_FASTBOOT_BUF_SIZE=0x04000000 -+CONFIG_FASTBOOT_BUF_SIZE=0x07000000 - CONFIG_FASTBOOT_FLASH=y - CONFIG_FASTBOOT_FLASH_MMC_DEV=0 - CONFIG_CMD_BOOTZ=y -@@ -84,6 +88,7 @@ CONFIG_SPL_OF_CONTROL=y - CONFIG_SPL_DTB_MINIMUM=y - CONFIG_OF_LIVE=y - CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents" -+CONFIG_OF_U_BOOT_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents" - # CONFIG_NET_TFTP_VARS is not set - CONFIG_REGMAP=y - CONFIG_SPL_REGMAP=y -@@ -139,7 +144,6 @@ CONFIG_SPI_FLASH_WINBOND=y - CONFIG_SPI_FLASH_XMC=y - CONFIG_SPI_FLASH_XTX=y - CONFIG_SPI_FLASH_MTD=y --CONFIG_PHY_REALTEK=y - CONFIG_DM_ETH=y - CONFIG_DM_ETH_PHY=y - CONFIG_DWC_ETH_QOS=y -@@ -216,6 +220,8 @@ CONFIG_DISPLAY=y - CONFIG_DRM_ROCKCHIP=y - CONFIG_DRM_MAXIM_MAX96745=y - CONFIG_DRM_MAXIM_MAX96755F=y -+CONFIG_DRM_PANEL_ROHM_BU18RL82=y -+CONFIG_DRM_PANEL_MAXIM_MAX96752F=y - CONFIG_DRM_ROHM_BU18XL82=y - CONFIG_DRM_ROCKCHIP_DW_HDMI_QP=y - CONFIG_DRM_ROCKCHIP_DW_MIPI_DSI2=y --- -Armbian - diff --git a/patch/u-boot/legacy/u-boot-meko-rk3588/0007-rk3588-blueberry-edge-v12.dts-add-KEY_VOLUMEUP-adc-keys-for-RECOVERY-button-to-work-again.patch b/patch/u-boot/legacy/u-boot-meko-rk3588/0007-rk3588-blueberry-edge-v12.dts-add-KEY_VOLUMEUP-adc-keys-for-RECOVERY-button-to-work-again.patch deleted file mode 100644 index ed02224dbbd4..000000000000 --- a/patch/u-boot/legacy/u-boot-meko-rk3588/0007-rk3588-blueberry-edge-v12.dts-add-KEY_VOLUMEUP-adc-keys-for-RECOVERY-button-to-work-again.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Ricardo Pardini -Date: Sun, 18 Feb 2024 14:37:47 +0100 -Subject: rk3588-blueberry-edge-v12.dts: add KEY_VOLUMEUP adc-keys for RECOVERY - button to work again - ---- - arch/arm/dts/rk3588-blueberry-edge-v12.dts | 17 ++++++++++ - 1 file changed, 17 insertions(+) - -diff --git a/arch/arm/dts/rk3588-blueberry-edge-v12.dts b/arch/arm/dts/rk3588-blueberry-edge-v12.dts -index 27ea53a7f93..5dd31189e3d 100644 ---- a/arch/arm/dts/rk3588-blueberry-edge-v12.dts -+++ b/arch/arm/dts/rk3588-blueberry-edge-v12.dts -@@ -13,6 +13,23 @@ - model = "Mekotronics R58X-4G (RK3588 EDGE LP4x V1.2 BlueBerry Board)"; - compatible = "rockchip,rk3588-blueberry-edge-v12-linux", "rockchip,rk3588"; - -+ // This is needed for the RECOVERY button to actually trigger LOADER mode when pressed during boot -+ adc-keys { -+ compatible = "adc-keys"; -+ io-channels = <&saradc 1>; -+ io-channel-names = "buttons"; -+ keyup-threshold-microvolt = <1800000>; -+ u-boot,dm-pre-reloc; -+ status = "okay"; -+ -+ volumeup-key { -+ u-boot,dm-pre-reloc; -+ linux,code = ; -+ label = "volume up"; -+ press-threshold-microvolt = <1750>; -+ }; -+ }; -+ - vcc12v_dcin: vcc12v-dcin { - u-boot,dm-pre-reloc; - compatible = "regulator-fixed"; --- -Armbian - diff --git a/patch/u-boot/legacy/u-boot-meko-rk3588/0008-boot_rkimg-don-t-try-rockchip_u2phy_vbus_detect-when-RECOVERY-button-pressed.patch b/patch/u-boot/legacy/u-boot-meko-rk3588/0008-boot_rkimg-don-t-try-rockchip_u2phy_vbus_detect-when-RECOVERY-button-pressed.patch deleted file mode 100644 index 44f13dbdde94..000000000000 --- a/patch/u-boot/legacy/u-boot-meko-rk3588/0008-boot_rkimg-don-t-try-rockchip_u2phy_vbus_detect-when-RECOVERY-button-pressed.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Ricardo Pardini -Date: Sun, 18 Feb 2024 15:01:10 +0100 -Subject: boot_rkimg: don't try rockchip_u2phy_vbus_detect when RECOVERY button - pressed - ---- - arch/arm/mach-rockchip/boot_rkimg.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/arch/arm/mach-rockchip/boot_rkimg.c b/arch/arm/mach-rockchip/boot_rkimg.c -index f1a683d4e8e..f79aed467bc 100644 ---- a/arch/arm/mach-rockchip/boot_rkimg.c -+++ b/arch/arm/mach-rockchip/boot_rkimg.c -@@ -322,14 +322,14 @@ void setup_download_mode(void) - - boot_devtype_init(); - -- printf("setup_download_mode checking if download %skey pressed... ", -+ printf("setup_download_mode checking if download %skey pressed...\n", - is_hotkey(HK_ROCKUSB_DNL) ? "is HOT YES" : "is NOT HOT"); - - if (rockchip_dnl_key_pressed() || is_hotkey(HK_ROCKUSB_DNL)) { - printf("download %skey pressed... ", - is_hotkey(HK_ROCKUSB_DNL) ? "hot" : ""); - #ifdef CONFIG_CMD_ROCKUSB -- vbus = rockchip_u2phy_vbus_detect(); -+ // vbus = rockchip_u2phy_vbus_detect(); // rpardini: don't do this, it fails with -19 - #endif - if (vbus > 0) { - printf("%sentering download mode vbus > 0...\n", --- -Armbian - From a34b120f62d0fb32556e687dd9c7a7a7d777d83f Mon Sep 17 00:00:00 2001 From: Igor Date: Fri, 23 Feb 2024 19:21:12 +0100 Subject: [PATCH 12/13] Detach CB1 / Zero2 and Zero 3 (Allwinner H61x) from ATF master branch (#6295) --- config/sources/families/sun50iw9-btt.conf | 4 ++-- config/sources/families/sun50iw9.conf | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config/sources/families/sun50iw9-btt.conf b/config/sources/families/sun50iw9-btt.conf index f25bae3f3d60..c01bd6d7a9f5 100644 --- a/config/sources/families/sun50iw9-btt.conf +++ b/config/sources/families/sun50iw9-btt.conf @@ -27,7 +27,7 @@ case $BRANCH in ASOUND_STATE='asound.state.sun50iw9-legacy' ATFSOURCE='https://github.com/ARM-software/arm-trusted-firmware' - ATFBRANCH='branch:master' + ATFBRANCH='tag:lts-v2.10.2' ATF_PLAT="sun50i_h616" ATF_TARGET_MAP='PLAT=sun50i_h616 DEBUG=1 bl31;;build/sun50i_h616/debug/bl31.bin' BOOTSCRIPT='boot-sun50i-next.cmd:boot.cmd' @@ -36,7 +36,7 @@ case $BRANCH in current | edge) ATFSOURCE='https://github.com/ARM-software/arm-trusted-firmware' - ATFBRANCH='branch:master' + ATFBRANCH='tag:lts-v2.10.2' ATF_PLAT="sun50i_h616" ATF_TARGET_MAP='PLAT=sun50i_h616 DEBUG=1 bl31;;build/sun50i_h616/debug/bl31.bin' BOOTSCRIPT='boot-sun50i-next.cmd:boot.cmd' diff --git a/config/sources/families/sun50iw9.conf b/config/sources/families/sun50iw9.conf index a24c02d2ffee..b8f2f463687f 100644 --- a/config/sources/families/sun50iw9.conf +++ b/config/sources/families/sun50iw9.conf @@ -60,7 +60,7 @@ case $BRANCH in current | edge) ATFSOURCE='https://github.com/ARM-software/arm-trusted-firmware' - ATFBRANCH='branch:master' + ATFBRANCH='tag:lts-v2.10.2' ATF_PLAT="sun50i_h616" ATF_TARGET_MAP='PLAT=sun50i_h616 DEBUG=1 bl31;;build/sun50i_h616/debug/bl31.bin' BOOTSCRIPT='boot-sun50i-next.cmd:boot.cmd' From 173954269f63bed6dbd144fa2e8d84c654ce5d45 Mon Sep 17 00:00:00 2001 From: Igor Pecovnik Date: Fri, 23 Feb 2024 16:39:26 +0100 Subject: [PATCH 13/13] Revert "rockchip: workaround stmmac ethernet lock contemption" This reverts commit 7c062f7daeca83e19b050b8e7ac6bf6aa6635693. --- .../rockchip-6.6/hack-barrier-stmmac.patch | 40 ------------------- .../rockchip-6.7/hack-barrier-stmmac.patch | 40 ------------------- 2 files changed, 80 deletions(-) delete mode 100644 patch/kernel/archive/rockchip-6.6/hack-barrier-stmmac.patch delete mode 100644 patch/kernel/archive/rockchip-6.7/hack-barrier-stmmac.patch diff --git a/patch/kernel/archive/rockchip-6.6/hack-barrier-stmmac.patch b/patch/kernel/archive/rockchip-6.6/hack-barrier-stmmac.patch deleted file mode 100644 index 0fb902510775..000000000000 --- a/patch/kernel/archive/rockchip-6.6/hack-barrier-stmmac.patch +++ /dev/null @@ -1,40 +0,0 @@ -diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c -index 292857c0e601..4417b10da438 100644 ---- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c -+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c -@@ -6952,7 +6952,6 @@ static void stmmac_get_stats64(struct net_device *dev, struct rtnl_link_stats64 - struct stmmac_priv *priv = netdev_priv(dev); - u32 tx_cnt = priv->plat->tx_queues_to_use; - u32 rx_cnt = priv->plat->rx_queues_to_use; -- unsigned int start; - int q; - - for (q = 0; q < tx_cnt; q++) { -@@ -6960,11 +6959,8 @@ static void stmmac_get_stats64(struct net_device *dev, struct rtnl_link_stats64 - u64 tx_packets; - u64 tx_bytes; - -- do { -- start = u64_stats_fetch_begin(&txq_stats->syncp); -- tx_packets = txq_stats->tx_packets; -- tx_bytes = txq_stats->tx_bytes; -- } while (u64_stats_fetch_retry(&txq_stats->syncp, start)); -+ tx_packets = txq_stats->tx_packets; -+ tx_bytes = txq_stats->tx_bytes; - - stats->tx_packets += tx_packets; - stats->tx_bytes += tx_bytes; -@@ -6975,11 +6971,8 @@ static void stmmac_get_stats64(struct net_device *dev, struct rtnl_link_stats64 - u64 rx_packets; - u64 rx_bytes; - -- do { -- start = u64_stats_fetch_begin(&rxq_stats->syncp); -- rx_packets = rxq_stats->rx_packets; -- rx_bytes = rxq_stats->rx_bytes; -- } while (u64_stats_fetch_retry(&rxq_stats->syncp, start)); -+ rx_packets = rxq_stats->rx_packets; -+ rx_bytes = rxq_stats->rx_bytes; - - stats->rx_packets += rx_packets; - stats->rx_bytes += rx_bytes; diff --git a/patch/kernel/archive/rockchip-6.7/hack-barrier-stmmac.patch b/patch/kernel/archive/rockchip-6.7/hack-barrier-stmmac.patch deleted file mode 100644 index 0fb902510775..000000000000 --- a/patch/kernel/archive/rockchip-6.7/hack-barrier-stmmac.patch +++ /dev/null @@ -1,40 +0,0 @@ -diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c -index 292857c0e601..4417b10da438 100644 ---- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c -+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c -@@ -6952,7 +6952,6 @@ static void stmmac_get_stats64(struct net_device *dev, struct rtnl_link_stats64 - struct stmmac_priv *priv = netdev_priv(dev); - u32 tx_cnt = priv->plat->tx_queues_to_use; - u32 rx_cnt = priv->plat->rx_queues_to_use; -- unsigned int start; - int q; - - for (q = 0; q < tx_cnt; q++) { -@@ -6960,11 +6959,8 @@ static void stmmac_get_stats64(struct net_device *dev, struct rtnl_link_stats64 - u64 tx_packets; - u64 tx_bytes; - -- do { -- start = u64_stats_fetch_begin(&txq_stats->syncp); -- tx_packets = txq_stats->tx_packets; -- tx_bytes = txq_stats->tx_bytes; -- } while (u64_stats_fetch_retry(&txq_stats->syncp, start)); -+ tx_packets = txq_stats->tx_packets; -+ tx_bytes = txq_stats->tx_bytes; - - stats->tx_packets += tx_packets; - stats->tx_bytes += tx_bytes; -@@ -6975,11 +6971,8 @@ static void stmmac_get_stats64(struct net_device *dev, struct rtnl_link_stats64 - u64 rx_packets; - u64 rx_bytes; - -- do { -- start = u64_stats_fetch_begin(&rxq_stats->syncp); -- rx_packets = rxq_stats->rx_packets; -- rx_bytes = rxq_stats->rx_bytes; -- } while (u64_stats_fetch_retry(&rxq_stats->syncp, start)); -+ rx_packets = rxq_stats->rx_packets; -+ rx_bytes = rxq_stats->rx_bytes; - - stats->rx_packets += rx_packets; - stats->rx_bytes += rx_bytes;