arm64: mvebu: a8k: Add support for NAND clock get
Subsystems (3)
PATCH v2 2/5 arm64: mvebu: a8k: Add support for NAND clock get
From: Konstantin Porotchkin <[email protected]>
Implement mvebu_get_nand_clock call for A8K family. This function is used by PXA3XX NAND driver.
---
Changes from v1:
- Add TODO notice for moving the functionality to a future clock driver
arch/arm/mach-mvebu/armada8k/cpu.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+)
arch/arm/mach-mvebu/armada8k/cpu.c +18 -0
@@ -110,3 +110,21 @@ void reset_cpu(ulong ignored) reg &= ~(1 <<RFU_SW_RESET_OFFSET );writel (reg,RFU_GLOBAL_SW_RST ); } + +/* +* TODO - implement this functionality using platform +* clock driver once it gets available +* Return NAND clock in Hz +*/ +u32 mvebu_get_nand_clock (void ) +{ +unsigned long NAND_FLASH_CLK_CTRL =0xF2440700UL ; +unsigned long NF_CLOCK_SEL_MASK =0x1 ; +u32 reg; + + reg =readl (NAND_FLASH_CLK_CTRL ); +if (reg &NF_CLOCK_SEL_MASK ) +return 400 *1000000 ; +else +return 250 *1000000 ; +}
Signature · 1 line
2.7.4
PATCH v2 4/5 arm64: a8k: dts: Add support for NAND devices on A8K platform
From: Konstantin Porotchkin <[email protected]>
Add NAND to CP master device tree. Add armada-7040-db-nand device tree for the board configured with NAND boot device. Add comment about boot device ID to armada-7040-db DTS.
---
Changes from v1:
- Minor changes following review:
Add compatibility string
Mention NAND in board model description
arch/arm/dts/Makefile | 1 + arch/arm/dts/armada-7040-db-nand.dts | 223 ++++++++++++++++++++++++++++++++++ arch/arm/dts/armada-7040-db.dts | 1 + arch/arm/dts/armada-cp110-master.dtsi | 14 +++ 4 files changed, 239 insertions(+) create mode 100644 arch/arm/dts/armada-7040-db-nand.dts
arch/arm/dts/Makefile +1 -0
@@ -78,6 +78,7 @@ dtb-$(CONFIG_ARCH_MVEBU) += \ armada-388-gp.dtb \ armada-385-amc.dtb \ armada-7040-db.dtb \ + armada-7040-db-nand.dtb \ armada-8040-db.dtb \ armada-8040-mcbin.dtb \ armada-xp-gp.dtb \
arch/arm/dts/armada-7040-db-nand.dts new file +223 -0
223 lines not on this page · raw message
arch/arm/dts/armada-7040-db.dts +1 -0
@@ -42,6 +42,7 @@ /* * Device Tree file for Marvell Armada 7040 Development board platform + * Boot device: SPI NOR, 0x32 (SW3) */ #include "armada-7040.dtsi"
arch/arm/dts/armada-cp110-master.dtsi +14 -0
@@ -273,6 +273,20 @@ dma-coherent; status = "disabled"; }; + + cpm_nand: nand at 720000 { + compatible = "marvell,mvebu-pxa3xx-nand"; + reg = <0x720000 0x100>; + #address-cells = <1>; + + clocks = <&cpm_syscon0 1 2>; + nand-enable-arbiter; + num-cs = <1>; + nand-ecc-strength = <4>; + nand-ecc-step-size = <512>; + status = "disabled"; + }; + }; cpm_pcie0: pcie at f2600000 {
Signature · 1 line
2.7.4
PATCH v2 5/5 arm64: mvebu: a8k: Add NAND configuration parameters
In reply to kostap at marvell.comFrom: Konstantin Porotchkin <[email protected]>
Add NAND configuration parameters to A8K shared config file. Add defconfig for db-88f7040 board with boot from NAND setup.
---
Changes from v1:
- Rebase on top of latest master branch changes
configs/mvebu_db-88f7040-nand_defconfig | 72 +++++++++++++++++++++++++++++++++ include/configs/mvebu_armada-8k.h | 11 +++++ 2 files changed, 83 insertions(+) create mode 100644 configs/mvebu_db-88f7040-nand_defconfig
configs/mvebu_db-88f7040-nand_defconfig new file +72 -0
@@ -0,0 +1,72 @@ +CONFIG_ARM=y +CONFIG_ARCH_MVEBU=y +CONFIG_SYS_MALLOC_F_LEN=0x2000 +CONFIG_TARGET_MVEBU_ARMADA_8K=y +CONFIG_DEFAULT_DEVICE_TREE="armada-7040-db-nand" +CONFIG_SMBIOS_PRODUCT_NAME="" +CONFIG_AHCI=y +# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set +CONFIG_SYS_CONSOLE_INFO_QUIET=y +CONFIG_BOARD_LATE_INIT=y +# CONFIG_DISPLAY_CPUINFO is not set +# CONFIG_DISPLAY_BOARDINFO is not set +CONFIG_ARCH_EARLY_INIT_R=y +CONFIG_BOARD_EARLY_INIT_F=y +CONFIG_HUSH_PARSER=y +# CONFIG_CMD_IMLS is not set +# CONFIG_CMD_FLASH is not set +CONFIG_CMD_MMC=y +CONFIG_CMD_PART=y +CONFIG_CMD_SF=y +CONFIG_CMD_SPI=y +CONFIG_CMD_I2C=y +CONFIG_CMD_USB=y +CONFIG_CMD_NAND=y +# CONFIG_CMD_FPGA is not set +# CONFIG_CMD_SETEXPR is not set +CONFIG_CMD_TFTPPUT=y +CONFIG_CMD_DHCP=y +CONFIG_CMD_MII=y +CONFIG_CMD_PING=y +CONFIG_CMD_CACHE=y +CONFIG_CMD_TIME=y +CONFIG_CMD_MVEBU_BUBT=y +CONFIG_CMD_EXT4=y +CONFIG_CMD_EXT4_WRITE=y +CONFIG_CMD_FAT=y +CONFIG_CMD_FS_GENERIC=y +CONFIG_MAC_PARTITION=y +CONFIG_ISO_PARTITION=y +CONFIG_EFI_PARTITION=y +CONFIG_BLOCK_CACHE=y +CONFIG_DM_I2C=y +CONFIG_SYS_I2C_MVTWSI=y +CONFIG_MISC=y +CONFIG_DM_MMC=y +CONFIG_MMC_SDHCI=y +CONFIG_MMC_SDHCI_XENON=y +CONFIG_SPI_FLASH=y +CONFIG_SPI_FLASH_MACRONIX=y +CONFIG_SPI_FLASH_SPANSION=y +CONFIG_SPI_FLASH_STMICRO=y +CONFIG_MVEBU_NAND_BOOT=y +CONFIG_NAND_PXA3XX=y +CONFIG_PHYLIB=y +CONFIG_PCI=y +CONFIG_DM_PCI=y +CONFIG_PCIE_DW_MVEBU=y +CONFIG_MVEBU_COMPHY_SUPPORT=y +CONFIG_PINCTRL=y +# CONFIG_SPL_SERIAL_PRESENT is not set +CONFIG_DEBUG_UART=y +CONFIG_DEBUG_UART_BASE=0xf0512000 +CONFIG_DEBUG_UART_CLOCK=200000000 +CONFIG_DEBUG_UART_SHIFT=2 +CONFIG_DEBUG_UART_ANNOUNCE=y +CONFIG_SYS_NS16550=y +CONFIG_USB=y +CONFIG_DM_USB=y +CONFIG_USB_XHCI_HCD=y +CONFIG_USB_EHCI_HCD=y +CONFIG_USB_STORAGE=y +CONFIG_SMBIOS_MANUFACTURER=""
include/configs/mvebu_armada-8k.h +11 -0
@@ -76,11 +76,22 @@#define CONFIG_ENV_SPI_MODE CONFIG_SF_DEFAULT_MODE/* Environment in SPI NOR flash */ +#ifdef CONFIG_MVEBU_SPI_BOOT #define CONFIG_ENV_IS_IN_SPI_FLASH +/* Environment in NAND flash */ +#elif defined(CONFIG_MVEBU_NAND_BOOT ) +#define CONFIG_ENV_IS_IN_NAND +#endif +#define CONFIG_ENV_OFFSET 0x180000/* as Marvell U-Boot version */ #define CONFIG_ENV_SIZE (64 << 10)/* 64KiB */ #define CONFIG_ENV_SECT_SIZE (64 << 10)/* 64KiB sectors */ +#define CONFIG_SYS_MAX_NAND_DEVICE 1 +#define CONFIG_SYS_NAND_MAX_CHIPS 1 +#define CONFIG_SYS_NAND_ONFI_DETECTION +#define CONFIG_SYS_NAND_USE_FLASH_BBT +/* * Ethernet Driver configuration */
Signature · 1 line
2.7.4
PATCH v2 2/5 arm64: mvebu: a8k: Add support for NAND clock get
In reply to kostap at marvell.comQuoted 9 lines · kostap at marvell.com
From: Konstantin Porotchkin <[email protected]>
Implement
mvebu_get_nand_clockcall for A8K family. This function is used by PXA3XX NAND driver.Signed-off-by Konstantin Porotchkin <[email protected]>Cc Stefan Roese <[email protected]>Cc Igal Liberman <[email protected]>Cc Nadav Haklai <[email protected]>
Thanks,
Stefan
PATCH v2 4/5 arm64: a8k: dts: Add support for NAND devices on A8K platform
In reply to kostap at marvell.comQuoted 10 lines · kostap at marvell.com
From: Konstantin Porotchkin <[email protected]>
Add NAND to CP master device tree. Add armada-7040-db-nand device tree for the board configured with NAND boot device. Add comment about boot device ID to armada-7040-db DTS.
Signed-off-by Konstantin Porotchkin <[email protected]>Cc Stefan Roese <[email protected]>Cc Igal Liberman <[email protected]>Cc Nadav Haklai <[email protected]>
Thanks,
Stefan
PATCH v2 5/5 arm64: mvebu: a8k: Add NAND configuration parameters
In reply to kostap at marvell.comQuoted 9 lines · kostap at marvell.com
From: Konstantin Porotchkin <[email protected]>
Add NAND configuration parameters to A8K shared config file. Add defconfig for db-88f7040 board with boot from NAND setup.
Signed-off-by Konstantin Porotchkin <[email protected]>Cc Stefan Roese <[email protected]>Cc Igal Liberman <[email protected]>Cc Nadav Haklai <[email protected]>
Thanks,
Stefan
PATCH v2 2/5 arm64: mvebu: a8k: Add support for NAND clock get
In reply to kostap at marvell.comQuoted 9 lines · kostap at marvell.com
From: Konstantin Porotchkin <[email protected]>
Implement
mvebu_get_nand_clockcall for A8K family. This function is used by PXA3XX NAND driver.Signed-off-by Konstantin Porotchkin <[email protected]>Cc Stefan Roese <[email protected]>Cc Igal Liberman <[email protected]>Cc Nadav Haklai <[email protected]>
Applied to u-boot-marvell/master.
Thanks,
Stefan
PATCH v2 4/5 arm64: a8k: dts: Add support for NAND devices on A8K platform
In reply to kostap at marvell.comQuoted 10 lines · kostap at marvell.com
From: Konstantin Porotchkin <[email protected]>
Add NAND to CP master device tree. Add armada-7040-db-nand device tree for the board configured with NAND boot device. Add comment about boot device ID to armada-7040-db DTS.
Signed-off-by Konstantin Porotchkin <[email protected]>Cc Stefan Roese <[email protected]>Cc Igal Liberman <[email protected]>Cc Nadav Haklai <[email protected]>
Applied to u-boot-marvell/master.
Thanks,
Stefan
PATCH v2 5/5 arm64: mvebu: a8k: Add NAND configuration parameters
In reply to kostap at marvell.comQuoted 9 lines · kostap at marvell.com
From: Konstantin Porotchkin <[email protected]>
Add NAND configuration parameters to A8K shared config file. Add defconfig for db-88f7040 board with boot from NAND setup.
Signed-off-by Konstantin Porotchkin <[email protected]>Cc Stefan Roese <[email protected]>Cc Igal Liberman <[email protected]>Cc Nadav Haklai <[email protected]>
Applied to u-boot-marvell/master.
Thanks,
Stefan