From patchwork Mon Mar 30 23:51:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Nemirovsky X-Patchwork-Id: 244604 List-Id: U-Boot discussion From: alex.nemirovsky at cortina-access.com (Alex Nemirovsky) Date: Mon, 30 Mar 2020 16:51:22 -0700 Subject: [PATCH v1 2/2] board: presidio-asic: Add RAW Parallel NAND support In-Reply-To: <1585612288-23669-1-git-send-email-alex.nemirovsky@cortina-access.com> References: <1585612288-23669-1-git-send-email-alex.nemirovsky@cortina-access.com> Message-ID: <1585612288-23669-5-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 --- 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 023092e..096aa07 100644 --- a/include/configs/presidio_asic.h +++ b/include/configs/presidio_asic.h @@ -36,6 +36,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 @@ -72,4 +74,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 */