From patchwork Mon Jun 1 21:26:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Nemirovsky X-Patchwork-Id: 241497 List-Id: U-Boot discussion From: alex.nemirovsky at cortina-access.com (Alex Nemirovsky) Date: Mon, 1 Jun 2020 14:26:50 -0700 Subject: [PATCH v3 2/2] board: presidio-asic: Add RAW Parallel NAND support In-Reply-To: <1591046810-9232-1-git-send-email-alex.nemirovsky@cortina-access.com> References: <1591046810-9232-1-git-send-email-alex.nemirovsky@cortina-access.com> Message-ID: <1591046810-9232-2-git-send-email-alex.nemirovsky@cortina-access.com> Add Parallel NAND CAxxxx support to Cortina Access Presidio Engineering Board support Signed-off-by: Alex Nemirovsky CC: Miquel Raynal CC: Simon Glass --- Changes in v3: None Changes in v2: None configs/cortina_presidio-asic-bch16_defconfig | 35 ++++++++++++++++++++++++++ configs/cortina_presidio-asic-bch24_defconfig | 36 +++++++++++++++++++++++++++ configs/cortina_presidio-asic-bch40_defconfig | 36 +++++++++++++++++++++++++++ configs/cortina_presidio-asic-bch8_defconfig | 36 +++++++++++++++++++++++++++ include/configs/presidio_asic.h | 15 +++++++++++ 5 files changed, 158 insertions(+) create mode 100644 configs/cortina_presidio-asic-bch16_defconfig create mode 100644 configs/cortina_presidio-asic-bch24_defconfig create mode 100644 configs/cortina_presidio-asic-bch40_defconfig create mode 100644 configs/cortina_presidio-asic-bch8_defconfig diff --git a/configs/cortina_presidio-asic-bch16_defconfig b/configs/cortina_presidio-asic-bch16_defconfig new file mode 100644 index 0000000..57ef98f --- /dev/null +++ b/configs/cortina_presidio-asic-bch16_defconfig @@ -0,0 +1,35 @@ +CONFIG_ARM=y +# CONFIG_SYS_ARCH_TIMER is not set +CONFIG_TARGET_PRESIDIO_ASIC=y +CONFIG_SYS_TEXT_BASE=0x04000000 +CONFIG_ENV_SIZE=0x20000 +CONFIG_ENV_OFFSET=0x400000 +CONFIG_DM_GPIO=y +CONFIG_NR_DRAM_BANKS=1 +CONFIG_IDENT_STRING="Presidio-SoC" +CONFIG_SHOW_BOOT_PROGRESS=y +CONFIG_BOOTDELAY=3 +CONFIG_BOARD_EARLY_INIT_R=y +CONFIG_SYS_PROMPT="G3#" +CONFIG_CMD_NAND=y +CONFIG_CMD_WDT=y +CONFIG_CMD_CACHE=y +CONFIG_CMD_TIMER=y +CONFIG_CMD_SMC=y +CONFIG_CMD_MTDPARTS=y +CONFIG_CMD_UBI=y +CONFIG_OF_CONTROL=y +CONFIG_OF_LIVE=y +CONFIG_DEFAULT_DEVICE_TREE="ca-presidio-engboard" +CONFIG_ENV_IS_IN_NAND=y +# CONFIG_NET is not set +CONFIG_DM=y +CONFIG_CORTINA_GPIO=y +# CONFIG_MMC is not set +CONFIG_MTD=y +CONFIG_MTD_RAW_NAND=y +CONFIG_NAND_CORTINA=y +CONFIG_DM_SERIAL=y +CONFIG_CORTINA_UART=y +CONFIG_WDT=y +CONFIG_WDT_CORTINA=y diff --git a/configs/cortina_presidio-asic-bch24_defconfig b/configs/cortina_presidio-asic-bch24_defconfig new file mode 100644 index 0000000..d22eae7 --- /dev/null +++ b/configs/cortina_presidio-asic-bch24_defconfig @@ -0,0 +1,36 @@ +CONFIG_ARM=y +# CONFIG_SYS_ARCH_TIMER is not set +CONFIG_TARGET_PRESIDIO_ASIC=y +CONFIG_SYS_TEXT_BASE=0x04000000 +CONFIG_ENV_SIZE=0x20000 +CONFIG_ENV_OFFSET=0x400000 +CONFIG_DM_GPIO=y +CONFIG_NR_DRAM_BANKS=1 +CONFIG_IDENT_STRING="Presidio-SoC" +CONFIG_SHOW_BOOT_PROGRESS=y +CONFIG_BOOTDELAY=3 +CONFIG_BOARD_EARLY_INIT_R=y +CONFIG_SYS_PROMPT="G3#" +CONFIG_CMD_NAND=y +CONFIG_CMD_WDT=y +CONFIG_CMD_CACHE=y +CONFIG_CMD_TIMER=y +CONFIG_CMD_SMC=y +CONFIG_CMD_MTDPARTS=y +CONFIG_CMD_UBI=y +CONFIG_OF_CONTROL=y +CONFIG_OF_LIVE=y +CONFIG_DEFAULT_DEVICE_TREE="ca-presidio-engboard" +CONFIG_ENV_IS_IN_NAND=y +# CONFIG_NET is not set +CONFIG_DM=y +CONFIG_CORTINA_GPIO=y +# CONFIG_MMC is not set +CONFIG_MTD=y +CONFIG_MTD_RAW_NAND=y +CONFIG_NAND_CORTINA=y +CONFIG_NAND_CORTINA_ECC_LEVEL=4 +CONFIG_DM_SERIAL=y +CONFIG_CORTINA_UART=y +CONFIG_WDT=y +CONFIG_WDT_CORTINA=y diff --git a/configs/cortina_presidio-asic-bch40_defconfig b/configs/cortina_presidio-asic-bch40_defconfig new file mode 100644 index 0000000..3c39415 --- /dev/null +++ b/configs/cortina_presidio-asic-bch40_defconfig @@ -0,0 +1,36 @@ +CONFIG_ARM=y +# CONFIG_SYS_ARCH_TIMER is not set +CONFIG_TARGET_PRESIDIO_ASIC=y +CONFIG_SYS_TEXT_BASE=0x04000000 +CONFIG_ENV_SIZE=0x20000 +CONFIG_ENV_OFFSET=0x400000 +CONFIG_DM_GPIO=y +CONFIG_NR_DRAM_BANKS=1 +CONFIG_IDENT_STRING="Presidio-SoC" +CONFIG_SHOW_BOOT_PROGRESS=y +CONFIG_BOOTDELAY=3 +CONFIG_BOARD_EARLY_INIT_R=y +CONFIG_SYS_PROMPT="G3#" +CONFIG_CMD_NAND=y +CONFIG_CMD_WDT=y +CONFIG_CMD_CACHE=y +CONFIG_CMD_TIMER=y +CONFIG_CMD_SMC=y +CONFIG_CMD_MTDPARTS=y +CONFIG_CMD_UBI=y +CONFIG_OF_CONTROL=y +CONFIG_OF_LIVE=y +CONFIG_DEFAULT_DEVICE_TREE="ca-presidio-engboard" +CONFIG_ENV_IS_IN_NAND=y +# CONFIG_NET is not set +CONFIG_DM=y +CONFIG_CORTINA_GPIO=y +# CONFIG_MMC is not set +CONFIG_MTD=y +CONFIG_MTD_RAW_NAND=y +CONFIG_NAND_CORTINA=y +CONFIG_NAND_CORTINA_ECC_LEVEL=5 +CONFIG_DM_SERIAL=y +CONFIG_CORTINA_UART=y +CONFIG_WDT=y +CONFIG_WDT_CORTINA=y diff --git a/configs/cortina_presidio-asic-bch8_defconfig b/configs/cortina_presidio-asic-bch8_defconfig new file mode 100644 index 0000000..8cda753 --- /dev/null +++ b/configs/cortina_presidio-asic-bch8_defconfig @@ -0,0 +1,36 @@ +CONFIG_ARM=y +# CONFIG_SYS_ARCH_TIMER is not set +CONFIG_TARGET_PRESIDIO_ASIC=y +CONFIG_SYS_TEXT_BASE=0x04000000 +CONFIG_ENV_SIZE=0x20000 +CONFIG_ENV_OFFSET=0x400000 +CONFIG_DM_GPIO=y +CONFIG_NR_DRAM_BANKS=1 +CONFIG_IDENT_STRING="Presidio-SoC" +CONFIG_SHOW_BOOT_PROGRESS=y +CONFIG_BOOTDELAY=3 +CONFIG_BOARD_EARLY_INIT_R=y +CONFIG_SYS_PROMPT="G3#" +CONFIG_CMD_NAND=y +CONFIG_CMD_WDT=y +CONFIG_CMD_CACHE=y +CONFIG_CMD_TIMER=y +CONFIG_CMD_SMC=y +CONFIG_CMD_MTDPARTS=y +CONFIG_CMD_UBI=y +CONFIG_OF_CONTROL=y +CONFIG_OF_LIVE=y +CONFIG_DEFAULT_DEVICE_TREE="ca-presidio-engboard" +CONFIG_ENV_IS_IN_NAND=y +# CONFIG_NET is not set +CONFIG_DM=y +CONFIG_CORTINA_GPIO=y +# CONFIG_MMC is not set +CONFIG_MTD=y +CONFIG_MTD_RAW_NAND=y +CONFIG_NAND_CORTINA=y +CONFIG_NAND_CORTINA_ECC_LEVEL=2 +CONFIG_DM_SERIAL=y +CONFIG_CORTINA_UART=y +CONFIG_WDT=y +CONFIG_WDT_CORTINA=y diff --git a/include/configs/presidio_asic.h b/include/configs/presidio_asic.h index 51177f4..3e5030f 100644 --- a/include/configs/presidio_asic.h +++ b/include/configs/presidio_asic.h @@ -32,6 +32,8 @@ #define CONFIG_SYS_TIMER_BASE 0xf4321000 +#define GLOBAL_SOFTWARE2 0xf43200c4 + /* Use external clock source */ #define PRESIDIO_APB_CLK 125000000 #define CORTINA_PER_IO_FREQ PRESIDIO_APB_CLK @@ -68,4 +70,17 @@ #define CONFIG_SYS_MAXARGS 64 #define CONFIG_EXTRA_ENV_SETTINGS "silent=y\0" +/* Macros for Flash */ +#define CORTINA_FLASH_CTRL_BASE 0xf4324000 +#define CORTINA_DMA_GLB_BASE 0xf7001000 +#define CORTINA_DMA_SSP_BASE 0xf7001a00 +#define CONFIG_SYS_FLASH_BASE 0xe0000000 + +#ifdef CONFIG_NAND_CORTINA + #define CONFIG_SYS_MAX_NAND_DEVICE 1 + #define CONFIG_SYS_NAND_MAX_CHIPS 1 + #define CONFIG_SYS_NAND_BASE CONFIG_SYS_FLASH_BASE + #define CONFIG_SYS_NAND_BASE_LIST { CONFIG_SYS_NAND_BASE } +#endif + #endif /* __PRESIDIO_ASIC_H */