mirror of
https://github.com/AsahiLinux/u-boot
synced 2025-02-18 06:58:54 +00:00
arm: mvebu: Add SPI driver model support
This patch enables the DM support for the SPI driver and the SPI NOR flash chips. Some MVEBU boards boot from SPI NOR, so adding the aliases and enabling CONFIG_DM_SEQ_ALIAS is needed here. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Luka Perkov <luka.perkov@sartura.hr> Cc: Dirk Eibach <dirk.eibach@gdsys.cc> Cc: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
9985bdb1ce
commit
09a54c009e
8 changed files with 23 additions and 4 deletions
|
@ -118,8 +118,11 @@ config ARCH_MVEBU
|
|||
select OF_SEPARATE
|
||||
select DM
|
||||
select DM_SERIAL
|
||||
select DM_SPI
|
||||
select DM_SPI_FLASH
|
||||
select SPL_DM
|
||||
select SPL_OF_CONTROL
|
||||
select SPL_SIMPLE_BUS
|
||||
|
||||
config TARGET_DEVKIT3250
|
||||
bool "Support devkit3250"
|
||||
|
|
|
@ -51,6 +51,10 @@
|
|||
stdout-path = "serial0:115200n8";
|
||||
};
|
||||
|
||||
aliases {
|
||||
spi0 = &spi0;
|
||||
};
|
||||
|
||||
memory {
|
||||
device_type = "memory";
|
||||
reg = <0x00000000 0x80000000>; /* 2 GB */
|
||||
|
@ -65,8 +69,10 @@
|
|||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&spi0_pins>;
|
||||
status = "okay";
|
||||
u-boot,dm-pre-reloc;
|
||||
|
||||
spi-flash@0 {
|
||||
u-boot,dm-pre-reloc;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
compatible = "st,m25p128", "jedec,spi-nor";
|
||||
|
|
|
@ -70,6 +70,7 @@
|
|||
|
||||
soc {
|
||||
compatible = "marvell,armada380-mbus", "simple-bus";
|
||||
u-boot,dm-pre-reloc;
|
||||
#address-cells = <2>;
|
||||
#size-cells = <1>;
|
||||
controller = <&mbusc>;
|
||||
|
@ -134,6 +135,7 @@
|
|||
|
||||
internal-regs {
|
||||
compatible = "simple-bus";
|
||||
u-boot,dm-pre-reloc;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
ranges = <0 MBUS_ID(0xf0, 0x01) 0 0x100000>;
|
||||
|
|
|
@ -68,6 +68,10 @@
|
|||
stdout-path = "serial0:115200n8";
|
||||
};
|
||||
|
||||
aliases {
|
||||
spi0 = &spi0;
|
||||
};
|
||||
|
||||
memory {
|
||||
device_type = "memory";
|
||||
/*
|
||||
|
@ -224,8 +228,10 @@
|
|||
|
||||
spi0: spi@10600 {
|
||||
status = "okay";
|
||||
u-boot,dm-pre-reloc;
|
||||
|
||||
spi-flash@0 {
|
||||
u-boot,dm-pre-reloc;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
compatible = "n25q128a13", "jedec,spi-nor";
|
||||
|
|
|
@ -63,6 +63,7 @@
|
|||
|
||||
soc {
|
||||
compatible = "marvell,armadaxp-mbus", "simple-bus";
|
||||
u-boot,dm-pre-reloc;
|
||||
|
||||
bootrom {
|
||||
compatible = "marvell,bootrom";
|
||||
|
|
|
@ -47,8 +47,7 @@
|
|||
* SPI Flash configuration
|
||||
*/
|
||||
#ifdef CONFIG_CMD_SF
|
||||
#define CONFIG_HARD_SPI 1
|
||||
#define CONFIG_KIRKWOOD_SPI 1
|
||||
#define CONFIG_KIRKWOOD_SPI
|
||||
#ifndef CONFIG_ENV_SPI_BUS
|
||||
# define CONFIG_ENV_SPI_BUS 0
|
||||
#endif
|
||||
|
@ -60,6 +59,9 @@
|
|||
#endif
|
||||
#endif
|
||||
|
||||
/* Needed for SPI NOR booting in SPL */
|
||||
#define CONFIG_DM_SEQ_ALIAS 1
|
||||
|
||||
/*
|
||||
* Ethernet Driver configuration
|
||||
*/
|
||||
|
|
|
@ -47,7 +47,6 @@
|
|||
#define MVEBU_SDRAM_SCRATCH (MVEBU_REGISTER(0x01504))
|
||||
#define MVEBU_L2_CACHE_BASE (MVEBU_REGISTER(0x08000))
|
||||
#define CONFIG_SYS_PL310_BASE MVEBU_L2_CACHE_BASE
|
||||
#define MVEBU_SPI_BASE (MVEBU_REGISTER(0x10600))
|
||||
#define MVEBU_TWSI_BASE (MVEBU_REGISTER(0x11000))
|
||||
#define MVEBU_MPP_BASE (MVEBU_REGISTER(0x18000))
|
||||
#define MVEBU_GPIO0_BASE (MVEBU_REGISTER(0x18100))
|
||||
|
|
|
@ -160,7 +160,7 @@
|
|||
#define CONFIG_SPL_SPI_LOAD
|
||||
#define CONFIG_SPL_SPI_BUS 0
|
||||
#define CONFIG_SPL_SPI_CS 0
|
||||
#define CONFIG_SYS_SPI_U_BOOT_OFFS 0x20000
|
||||
#define CONFIG_SYS_SPI_U_BOOT_OFFS 0x24000
|
||||
#define CONFIG_SYS_U_BOOT_OFFS CONFIG_SYS_SPI_U_BOOT_OFFS
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue