[U-Boot] [PATCH 1/3] dm: dts: ls1021a-twr: Enable DSPI2 on LS1021ATWR

Erratum A-008022 has been fixed on LS1021A Rev2.0. So we can use DSPI2 now, this patch enable DSPI2 in dts for LS1021ATWR.
Signed-off-by: Yuan Yao yao.yuan@freescale.com --- arch/arm/dts/ls1021a-twr.dts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)
diff --git a/arch/arm/dts/ls1021a-twr.dts b/arch/arm/dts/ls1021a-twr.dts index 0e61c07..6ccd332 100644 --- a/arch/arm/dts/ls1021a-twr.dts +++ b/arch/arm/dts/ls1021a-twr.dts @@ -17,6 +17,7 @@ enet0_sgmii_phy = &sgmii_phy2; enet1_sgmii_phy = &sgmii_phy0; spi0 = &qspi; + spi1 = &dspi1; }; };
@@ -33,6 +34,21 @@ }; };
+&dspi1 { + bus-num = <0>; + status = "okay"; + + dspiflash: at26df081a@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "spi-flash"; + spi-max-frequency = <16000000>; + spi-cpol; + spi-cpha; + reg = <0>; + }; +}; + &i2c0 { status = "okay"; };

AT26DF081A is the spi flash type of TWR-MEM(SCH-26248) card. We can access the flash through DSPI2 on LS1021ATWR board.
Signed-off-by: Yuan Yao yao.yuan@freescale.com --- drivers/mtd/spi/sf_params.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/drivers/mtd/spi/sf_params.c b/drivers/mtd/spi/sf_params.c index 4a4a3af..8f5bdda 100644 --- a/drivers/mtd/spi/sf_params.c +++ b/drivers/mtd/spi/sf_params.c @@ -23,6 +23,7 @@ const struct spi_flash_params spi_flash_params_table[] = { {"AT45DB321D", 0x1f2700, 0x0, 64 * 1024, 64, RD_NORM, SECT_4K}, {"AT45DB641D", 0x1f2800, 0x0, 64 * 1024, 128, RD_NORM, SECT_4K}, {"AT25DF321", 0x1f4701, 0x0, 64 * 1024, 64, RD_NORM, SECT_4K}, + {"AT26DF081A", 0x1f4501, 0x0, 64 * 1024, 16, RD_NORM, SECT_4K}, #endif #ifdef CONFIG_SPI_FLASH_EON /* EON */ {"EN25Q32B", 0x1c3016, 0x0, 64 * 1024, 64, RD_NORM, 0},

On 15 September 2015 at 15:58, Yuan Yao yao.yuan@freescale.com wrote:
AT26DF081A is the spi flash type of TWR-MEM(SCH-26248) card. We can access the flash through DSPI2 on LS1021ATWR board.
Signed-off-by: Yuan Yao yao.yuan@freescale.com
Applied to u-boot-spi/master
-- Jagan.

DSPI2 can be verified when boot from QSPI now.
Signed-off-by: Yuan Yao yao.yuan@freescale.com --- include/configs/ls1021atwr.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/include/configs/ls1021atwr.h b/include/configs/ls1021atwr.h index 7dcb719..a14277e 100644 --- a/include/configs/ls1021atwr.h +++ b/include/configs/ls1021atwr.h @@ -308,12 +308,16 @@ #define FSL_QSPI_FLASH_NUM 2 #define CONFIG_SPI_FLASH_STMICRO
+/* DSPI */ +#define CONFIG_FSL_DSPI +#define CONFIG_SPI_FLASH_ATMEL +#endif + /* DM SPI */ #if defined(CONFIG_FSL_DSPI) || defined(CONFIG_FSL_QSPI) #define CONFIG_CMD_SF #define CONFIG_DM_SPI_FLASH #endif -#endif
/* * Video

On 15 September 2015 at 15:58, Yuan Yao yao.yuan@freescale.com wrote:
DSPI2 can be verified when boot from QSPI now.
Signed-off-by: Yuan Yao yao.yuan@freescale.com
Applied to u-boot-spi/master
-- Jagan.

On 15 September 2015 at 15:58, Yuan Yao yao.yuan@freescale.com wrote:
Erratum A-008022 has been fixed on LS1021A Rev2.0. So we can use DSPI2 now, this patch enable DSPI2 in dts for LS1021ATWR.
Signed-off-by: Yuan Yao yao.yuan@freescale.com
Applied to u-boot-spi/master
-- Jagan .
participants (2)
-
Jagan Teki
-
Yuan Yao