0001-sunxi-sun4i-Reduce-cpu-clock-at-SPL-initialization-t.patch 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. From 3cdf8aa3ff45e35a237285c107785bc3d2c6976a Mon Sep 17 00:00:00 2001
  2. From: Ludwig Kormann <ludwig.kormann@ict42.de>
  3. Date: Wed, 31 Jan 2024 11:28:19 +0100
  4. Subject: [PATCH] sunxi: sun4i: Reduce cpu clock at SPL initialization to 144
  5. MHz
  6. Up until now cpu clock gets initialized at 384 MHz, which is
  7. the highest supported cpu clock.
  8. Recent A20 batches show an increased percentage of modules
  9. reacting very sensitive to operating conditions outside the
  10. specifications.
  11. The cpu dies very shortly after PLLs, core frequency or cpu
  12. voltage are missconfigured. E.g.:
  13. - uboot SPL selects 384 MHz as cpu clock which requires a cpu
  14. voltage of at least 1.1 V.
  15. - Linux CPU Frequency scaling with most sun7i dts will reduce
  16. cpu voltage down to 1.0 V.
  17. - When intiating a reboot or reset from linux the cpu voltage
  18. may keep the 1.0 V configuration and the cpu dies during SPL
  19. initialization.
  20. Therefore reduce cpu clock at uboot SPL initialization down
  21. to 144 MHz from 384 MHz.
  22. Signed-off-by: Ludwig Kormann <ludwig.kormann@ict42.de>
  23. Upstream: Not Applicable
  24. ---
  25. arch/arm/include/asm/arch-sunxi/clock_sun4i.h | 2 +-
  26. 1 file changed, 1 insertion(+), 1 deletion(-)
  27. diff --git a/arch/arm/include/asm/arch-sunxi/clock_sun4i.h b/arch/arm/include/asm/arch-sunxi/clock_sun4i.h
  28. index 2cec91cb20..252c4c693e 100644
  29. --- a/arch/arm/include/asm/arch-sunxi/clock_sun4i.h
  30. +++ b/arch/arm/include/asm/arch-sunxi/clock_sun4i.h
  31. @@ -141,7 +141,7 @@ struct sunxi_ccm_reg {
  32. #define CCM_PLL1_CFG_SIG_DELT_PAT_EN_SHIFT 2
  33. #define CCM_PLL1_CFG_FACTOR_M_SHIFT 0
  34. -#define PLL1_CFG_DEFAULT 0xa1005000
  35. +#define PLL1_CFG_DEFAULT 0xa1004c01
  36. #if defined CONFIG_OLD_SUNXI_KERNEL_COMPAT && defined CONFIG_MACH_SUN5I
  37. /*
  38. --
  39. 2.39.2