diff options
| author | Tom Rini <[email protected]> | 2026-02-03 17:36:07 -0600 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2026-02-03 18:13:54 -0600 |
| commit | 3c72973b7a7fbc3f57b20bf2e2e630ba9d31a686 (patch) | |
| tree | 59a8328c97c1428d41ab68671956ead21124950d /arch | |
| parent | ede7198a37019266bfc4a992bdd22292196a97f9 (diff) | |
| parent | 800ebf7e94e3a7e375cf915ae21e14514fd81450 (diff) | |
Merge branch 'u-boot-nand-03022026' of https://source.denx.de/u-boot/custodians/u-boot-nand-flash
CI: https://source.denx.de/u-boot/custodians/u-boot-nand-flash/-/pipelines/29183
This series provides a comprehensive cleanup of the Allwinner (sunxi)
NAND controller drivers and introduces full support for the H6 and H616
SoCs in both the main U-Boot driver and the SPL.
The series successfully deduplicates register maps between sunxi_nand.c
and sunxi_nand_spl.c while migrating to a capability-based architecture.
This approach allows the driver to handle the H616's specific
requirements—such as shifted register offsets for ECC/OOB, the removal
of 512B ECC block support, and mandatory MBUS clock gating—without
breaking compatibility for legacy A10/A23 devices.
Diffstat (limited to 'arch')
| -rw-r--r-- | arch/arm/include/asm/arch-sunxi/clock_sun4i.h | 1 | ||||
| -rw-r--r-- | arch/arm/include/asm/arch-sunxi/clock_sun50i_h6.h | 24 | ||||
| -rw-r--r-- | arch/arm/include/asm/arch-sunxi/clock_sun6i.h | 1 | ||||
| -rw-r--r-- | arch/arm/include/asm/arch-sunxi/clock_sun8i_a83t.h | 1 | ||||
| -rw-r--r-- | arch/arm/include/asm/arch-sunxi/clock_sun9i.h | 2 |
5 files changed, 29 insertions, 0 deletions
diff --git a/arch/arm/include/asm/arch-sunxi/clock_sun4i.h b/arch/arm/include/asm/arch-sunxi/clock_sun4i.h index 00bdd5f938d..caa4b62b3e2 100644 --- a/arch/arm/include/asm/arch-sunxi/clock_sun4i.h +++ b/arch/arm/include/asm/arch-sunxi/clock_sun4i.h @@ -11,6 +11,7 @@ #define _SUNXI_CLOCK_SUN4I_H #define CCU_AHB_GATE0 0x60 +#define CCU_NAND0_CLK_CFG 0x80 #define CCU_MMC0_CLK_CFG 0x88 #define CCU_MMC1_CLK_CFG 0x8c #define CCU_MMC2_CLK_CFG 0x90 diff --git a/arch/arm/include/asm/arch-sunxi/clock_sun50i_h6.h b/arch/arm/include/asm/arch-sunxi/clock_sun50i_h6.h index 45fa4ab6e57..8d1c7c18548 100644 --- a/arch/arm/include/asm/arch-sunxi/clock_sun50i_h6.h +++ b/arch/arm/include/asm/arch-sunxi/clock_sun50i_h6.h @@ -24,7 +24,11 @@ #define CCU_H6_APB2_CFG 0x524 #define CCU_H6_MBUS_CFG 0x540 #define CCU_H6_DRAM_CLK_CFG 0x800 +#define CCU_H6_MBUS_GATE 0x804 #define CCU_H6_DRAM_GATE_RESET 0x80c +#define CCU_NAND0_CLK_CFG 0x810 +#define CCU_NAND1_CLK_CFG 0x814 +#define CCU_H6_NAND_GATE_RESET 0x82c #define CCU_MMC0_CLK_CFG 0x830 #define CCU_MMC1_CLK_CFG 0x834 #define CCU_MMC2_CLK_CFG 0x838 @@ -146,6 +150,16 @@ #define RESET_SHIFT (16) #define GATE_SHIFT (0) +/* MBUS gate offsets */ +#define MBUS_GATE_OFFSET_DI 11 +#define MBUS_GATE_OFFSET_G2D 10 +#define MBUS_GATE_OFFSET_CSI 8 +#define MBUS_GATE_OFFSET_NAND 5 +#define MBUS_GATE_OFFSET_TS0 3 +#define MBUS_GATE_OFFSET_VE 2 +#define MBUS_GATE_OFFSET_CE 1 +#define MBUS_GATE_OFFSET_DMA 0 + /* DRAM clock bit field */ #define DRAM_CLK_ENABLE BIT(31) #define DRAM_MOD_RESET BIT(30) @@ -155,6 +169,16 @@ #define DRAM_CLK_M_MASK (0x1f) #define DRAM_CLK_M(m) (((m)-1) << 0) +/* NAND clock bit field */ +#define CCM_NAND_CTRL_M(x) ((x) - 1) +#define CCM_NAND_CTRL_N(x) ((x) << 8) +#define CCM_NAND_CTRL_OSCM24 (0x0 << 24) +#define CCM_NAND_CTRL_PLL6 (0x1 << 24) +#define CCM_NAND_CTRL_PLL_PERIPH2 (0x2 << 24) +#define CCM_NAND_CTRL_PLL6X2 (0x3 << 24) +#define CCM_NAND_CTRL_PLL_PERIPH2X2 (0x4 << 24) +#define CCM_NAND_CTRL_ENABLE (0x1 << 31) + /* MMC clock bit field */ #define CCM_MMC_CTRL_M(x) ((x) - 1) #define CCM_MMC_CTRL_N(x) ((x) << 8) diff --git a/arch/arm/include/asm/arch-sunxi/clock_sun6i.h b/arch/arm/include/asm/arch-sunxi/clock_sun6i.h index 28c3faccbbc..c8f3a16e7d0 100644 --- a/arch/arm/include/asm/arch-sunxi/clock_sun6i.h +++ b/arch/arm/include/asm/arch-sunxi/clock_sun6i.h @@ -11,6 +11,7 @@ #define _SUNXI_CLOCK_SUN6I_H #define CCU_AHB_GATE0 0x060 +#define CCU_NAND0_CLK_CFG 0x080 #define CCU_MMC0_CLK_CFG 0x088 #define CCU_MMC1_CLK_CFG 0x08c #define CCU_MMC2_CLK_CFG 0x090 diff --git a/arch/arm/include/asm/arch-sunxi/clock_sun8i_a83t.h b/arch/arm/include/asm/arch-sunxi/clock_sun8i_a83t.h index 5ad2163926a..98c69f47f32 100644 --- a/arch/arm/include/asm/arch-sunxi/clock_sun8i_a83t.h +++ b/arch/arm/include/asm/arch-sunxi/clock_sun8i_a83t.h @@ -14,6 +14,7 @@ #define _SUNXI_CLOCK_SUN8I_A83T_H #define CCU_AHB_GATE0 0x060 +#define CCU_NAND0_CLK_CFG 0x080 #define CCU_MMC0_CLK_CFG 0x088 #define CCU_MMC1_CLK_CFG 0x08c #define CCU_MMC2_CLK_CFG 0x090 diff --git a/arch/arm/include/asm/arch-sunxi/clock_sun9i.h b/arch/arm/include/asm/arch-sunxi/clock_sun9i.h index 8d696e533f8..3448f3fb322 100644 --- a/arch/arm/include/asm/arch-sunxi/clock_sun9i.h +++ b/arch/arm/include/asm/arch-sunxi/clock_sun9i.h @@ -12,11 +12,13 @@ #include <linux/bitops.h> #endif +#define CCU_NAND0_CLK_CFG 0x400 #define CCU_MMC0_CLK_CFG 0x410 #define CCU_MMC1_CLK_CFG 0x414 #define CCU_MMC2_CLK_CFG 0x418 #define CCU_MMC3_CLK_CFG 0x41c #define CCU_AHB_GATE0 0x580 +#define CCU_AHB_GATE1 0x584 #define CCU_AHB_RESET0_CFG 0x5a0 struct sunxi_ccm_reg { |
