]> git.baikalelectronics.ru Git - uboot.git/commitdiff
board: presidio: Add Parallel NAND support
authorKate Liu <kate.liu@cortina-access.com>
Fri, 11 Dec 2020 21:46:13 +0000 (13:46 -0800)
committerTom Rini <trini@konsulko.com>
Mon, 18 Jan 2021 20:14:37 +0000 (15:14 -0500)
Set environment for Nand flash (U-boot 2020.04):
- add nand flash in the device tree
- add new default configuration file for G3 using parallel Nand
- set nand parameters in presidio_asic.h

Signed-off-by: Kate Liu <kate.liu@cortina-access.com>
Signed-off-by: Alex Nemirovsky <alex.nemirovsky@cortina-access.com>
CC: Tom Rini <trini@konsulko.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
MAINTAINERS
arch/arm/dts/ca-presidio-engboard.dts
configs/cortina_presidio-asic-pnand_defconfig [new file with mode: 0644]
include/configs/presidio_asic.h

index f9a26ccf08b0dece28346791afe37400d713778d..a7a62dff814fc2127f8cdb7099a86d252aef77e9 100644 (file)
@@ -200,6 +200,7 @@ F:  drivers/i2c/i2c-cortina.c
 F:     drivers/i2c/i2c-cortina.h
 F:     drivers/mtd/nand/raw/cortina_nand.c
 F:     drivers/mtd/nand/raw/cortina_nand.h
+F:     configs/cortina_presidio-asic-pnand_defconfig
 
 ARM/CZ.NIC TURRIS MOX SUPPORT
 M:     Marek Behun <marek.behun@nic.cz>
index eef433e768ea99f300adaf9fcfaf58b410f90ba3..0ab52fdfda8e22137b12cea951e3048f6d645c62 100644 (file)
                clock-frequency = <400000>;
        };
 
+       nand: nand-controller@f4324000 {
+               #address-cells = <1>;
+               #size-cells = <0>;
+               compatible = "cortina,ca-nand";
+               reg = <0 0xf4324000 0x3b0>, /* NAND controller */
+                     <0 0xf7001000 0xb4>, /* DMA_GLOBAL */
+                     <0 0xf7001a00 0x80>; /* DMA channel0 for FLASH */
+               status = "okay";
+               nand-ecc-mode = "hw";
+               nand-ecc-strength = <16>;
+               nand-ecc-step-size = <1024>;    /* Must be 1024 */
+               nand_flash_base_addr = <0xe0000000>;
+       };
+
        sflash: sflash-controller@f4324000 {
                #address-cells = <2>;
                #size-cells = <1>;
diff --git a/configs/cortina_presidio-asic-pnand_defconfig b/configs/cortina_presidio-asic-pnand_defconfig
new file mode 100644 (file)
index 0000000..e85cdc5
--- /dev/null
@@ -0,0 +1,33 @@
+CONFIG_ARM=y
+# CONFIG_SYS_ARCH_TIMER is not set
+CONFIG_TARGET_PRESIDIO_ASIC=y
+CONFIG_SYS_TEXT_BASE=0x04000000
+CONFIG_NR_DRAM_BANKS=1
+CONFIG_ENV_SIZE=0x20000
+CONFIG_DM_GPIO=y
+CONFIG_IDENT_STRING="Presidio-SoC"
+CONFIG_DEFAULT_DEVICE_TREE="ca-presidio-engboard"
+CONFIG_SHOW_BOOT_PROGRESS=y
+CONFIG_BOOTDELAY=3
+CONFIG_USE_BOOTARGS=y
+CONFIG_BOOTARGS="earlycon=serial,0xf4329148 console=ttyS0,115200 root=/dev/ram0"
+CONFIG_BOARD_EARLY_INIT_R=y
+CONFIG_SYS_PROMPT="G3#"
+CONFIG_CMD_MTD=y
+CONFIG_CMD_WDT=y
+CONFIG_CMD_CACHE=y
+CONFIG_CMD_TIMER=y
+CONFIG_CMD_SMC=y
+CONFIG_OF_CONTROL=y
+CONFIG_OF_LIVE=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_CORTINA_NAND=y
+CONFIG_DM_SERIAL=y
+CONFIG_CORTINA_UART=y
+CONFIG_WDT=y
+CONFIG_WDT_CORTINA=y
index 34235b5a00c1bf662b456377829b2838ca60b4c9..710731efd56c91fa56e75a7dd30a62a10c7e9555 100644 (file)
 #define CONFIG_SYS_MAXARGS             64
 #define CONFIG_EXTRA_ENV_SETTINGS      "silent=y\0"
 
+/* nand driver parameters */
+#ifdef CONFIG_TARGET_PRESIDIO_ASIC
+       #define CONFIG_SYS_NAND_ONFI_DETECTION
+       #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 */