All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 00/14] at91: Add boards with OF_CONTROL/DM/DM_SPI
@ 2018-03-14 13:16 Jagan Teki
  2018-03-14 13:16 ` [U-Boot] [PATCH 01/14] spi: atmel: Add ifdef for DM_GPIO code Jagan Teki
                   ` (14 more replies)
  0 siblings, 15 replies; 37+ messages in thread
From: Jagan Teki @ 2018-03-14 13:16 UTC (permalink / raw)
  To: u-boot

This series add support for missing at91 board with
- OF_CONTROL
- DM
- DM_SPI
- Drop non-dm code from atmel_spi

Boards like taurus, vinco and ma5d4evk need move GPIO code
into drivers instead of configuring them in board file.
request to board maintainers to do this job.

Jagan Teki (14):
  spi: atmel: Add ifdef for DM_GPIO code
  at91: gurnard: Enable DM_SPI
  configs: gurnard: Move CONFIG_ATMEL_SPI to defconfigs
  at91: taurus: Enable DM_SPI
  at91: vinco: Enable DM
  at91: vinco: Add FDT support
  at91: vinco: Enable DM_SPI
  at91: ma5d4evk: Enable DM
  at91: ma5d4evk: Add FDT support
  at91: ma5d4evk: Enable DM_SPI
  at91: ma5d4evk: Enable SPL_DM and SPL_OF_CONTROL
  spi: atmel: Drop non-dm code
  spi: atmel: Drop atmel_spi.h
  spi: atmel: default y if DM_SPI && ARCH_AT91

 arch/arm/dts/Makefile                          |   6 +
 arch/arm/dts/at91-sama5d4_ma5d4.dtsi           | 142 +++++++++++
 arch/arm/dts/at91-sama5d4_ma5d4evk.dts         | 149 ++++++++++++
 arch/arm/dts/at91-vinco.dts                    | 246 +++++++++++++++++++
 arch/arm/mach-at91/Kconfig                     |   6 +
 board/aries/ma5d4evk/ma5d4evk.c                |   9 +-
 board/bluewater/gurnard/gurnard.c              |  20 --
 board/l+g/vinco/vinco.c                        |   5 +-
 board/siemens/taurus/taurus.c                  |   3 +
 configs/at91sam9260ek_dataflash_cs0_defconfig  |   1 -
 configs/at91sam9260ek_dataflash_cs1_defconfig  |   1 -
 configs/at91sam9260ek_nandflash_defconfig      |   1 -
 configs/at91sam9261ek_dataflash_cs0_defconfig  |   1 -
 configs/at91sam9261ek_dataflash_cs3_defconfig  |   1 -
 configs/at91sam9261ek_nandflash_defconfig      |   1 -
 configs/at91sam9263ek_dataflash_cs0_defconfig  |   1 -
 configs/at91sam9263ek_dataflash_defconfig      |   1 -
 configs/at91sam9263ek_nandflash_defconfig      |   1 -
 configs/at91sam9263ek_norflash_boot_defconfig  |   1 -
 configs/at91sam9263ek_norflash_defconfig       |   1 -
 configs/at91sam9g10ek_dataflash_cs0_defconfig  |   1 -
 configs/at91sam9g10ek_dataflash_cs3_defconfig  |   1 -
 configs/at91sam9g10ek_nandflash_defconfig      |   1 -
 configs/at91sam9g20ek_2mmc_defconfig           |   1 -
 configs/at91sam9g20ek_2mmc_nandflash_defconfig |   1 -
 configs/at91sam9g20ek_dataflash_cs0_defconfig  |   1 -
 configs/at91sam9g20ek_dataflash_cs1_defconfig  |   1 -
 configs/at91sam9g20ek_nandflash_defconfig      |   1 -
 configs/at91sam9n12ek_mmc_defconfig            |   1 -
 configs/at91sam9n12ek_nandflash_defconfig      |   1 -
 configs/at91sam9n12ek_spiflash_defconfig       |   1 -
 configs/at91sam9rlek_dataflash_defconfig       |   1 -
 configs/at91sam9rlek_mmc_defconfig             |   1 -
 configs/at91sam9rlek_nandflash_defconfig       |   1 -
 configs/at91sam9x5ek_dataflash_defconfig       |   1 -
 configs/at91sam9x5ek_mmc_defconfig             |   1 -
 configs/at91sam9x5ek_nandflash_defconfig       |   1 -
 configs/at91sam9x5ek_spiflash_defconfig        |   1 -
 configs/at91sam9xeek_dataflash_cs0_defconfig   |   1 -
 configs/at91sam9xeek_dataflash_cs1_defconfig   |   1 -
 configs/at91sam9xeek_nandflash_defconfig       |   1 -
 configs/ethernut5_defconfig                    |   1 -
 configs/ma5d4evk_defconfig                     |   4 +
 configs/meesc_dataflash_defconfig              |   1 -
 configs/meesc_defconfig                        |   1 -
 configs/pm9261_defconfig                       |   1 -
 configs/pm9263_defconfig                       |   1 -
 configs/sama5d27_som1_ek_mmc_defconfig         |   1 -
 configs/sama5d2_xplained_mmc_defconfig         |   1 -
 configs/sama5d2_xplained_spiflash_defconfig    |   1 -
 configs/sama5d36ek_cmp_mmc_defconfig           |   1 -
 configs/sama5d36ek_cmp_nandflash_defconfig     |   1 -
 configs/sama5d36ek_cmp_spiflash_defconfig      |   1 -
 configs/sama5d3xek_mmc_defconfig               |   1 -
 configs/sama5d3xek_nandflash_defconfig         |   1 -
 configs/sama5d3xek_spiflash_defconfig          |   1 -
 configs/sama5d4_xplained_mmc_defconfig         |   1 -
 configs/sama5d4_xplained_nandflash_defconfig   |   1 -
 configs/sama5d4_xplained_spiflash_defconfig    |   1 -
 configs/sama5d4ek_mmc_defconfig                |   1 -
 configs/sama5d4ek_nandflash_defconfig          |   1 -
 configs/sama5d4ek_spiflash_defconfig           |   1 -
 configs/usb_a9263_dataflash_defconfig          |   1 -
 configs/vinco_defconfig                        |   2 +
 drivers/spi/Kconfig                            |   2 +-
 drivers/spi/atmel_spi.c                        | 312 ++++++++-----------------
 drivers/spi/atmel_spi.h                        | 100 --------
 include/configs/ma5d4evk.h                     |   2 -
 include/configs/snapper9g45.h                  |   2 -
 include/configs/taurus.h                       |   1 -
 include/configs/vinco.h                        |   2 -
 scripts/config_whitelist.txt                   |   1 -
 72 files changed, 667 insertions(+), 400 deletions(-)
 create mode 100644 arch/arm/dts/at91-sama5d4_ma5d4.dtsi
 create mode 100644 arch/arm/dts/at91-sama5d4_ma5d4evk.dts
 create mode 100644 arch/arm/dts/at91-vinco.dts
 delete mode 100644 drivers/spi/atmel_spi.h

-- 
2.14.3

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [U-Boot] [PATCH 01/14] spi: atmel: Add ifdef for DM_GPIO code
  2018-03-14 13:16 [U-Boot] [PATCH 00/14] at91: Add boards with OF_CONTROL/DM/DM_SPI Jagan Teki
@ 2018-03-14 13:16 ` Jagan Teki
  2018-03-21  4:08   ` Wenyou Yang
  2018-04-06 20:28   ` [U-Boot] [U-Boot,01/14] " Tom Rini
  2018-03-14 13:16 ` [U-Boot] [PATCH 02/14] at91: gurnard: Enable DM_SPI Jagan Teki
                   ` (13 subsequent siblings)
  14 siblings, 2 replies; 37+ messages in thread
From: Jagan Teki @ 2018-03-14 13:16 UTC (permalink / raw)
  To: u-boot

Few boards are configuring gpio directly from board instead
using drivers/gpio so add ifdef for DM_GPIO to compatible
for both the cases.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
 drivers/spi/atmel_spi.c | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/drivers/spi/atmel_spi.c b/drivers/spi/atmel_spi.c
index 8010ab434c..3cdfd366ab 100644
--- a/drivers/spi/atmel_spi.c
+++ b/drivers/spi/atmel_spi.c
@@ -236,7 +236,9 @@ struct atmel_spi_priv {
 	unsigned int freq;		/* Default frequency */
 	unsigned int mode;
 	ulong bus_clk_rate;
+#ifdef CONFIG_DM_GPIO
 	struct gpio_desc cs_gpios[MAX_CS_COUNT];
+#endif
 };
 
 static int atmel_spi_claim_bus(struct udevice *dev)
@@ -291,6 +293,7 @@ static int atmel_spi_release_bus(struct udevice *dev)
 
 static void atmel_spi_cs_activate(struct udevice *dev)
 {
+#ifdef CONFIG_DM_GPIO
 	struct udevice *bus = dev_get_parent(dev);
 	struct atmel_spi_priv *priv = dev_get_priv(bus);
 	struct dm_spi_slave_platdata *slave_plat = dev_get_parent_platdata(dev);
@@ -300,10 +303,12 @@ static void atmel_spi_cs_activate(struct udevice *dev)
 		return;
 
 	dm_gpio_set_value(&priv->cs_gpios[cs], 0);
+#endif
 }
 
 static void atmel_spi_cs_deactivate(struct udevice *dev)
 {
+#ifdef CONFIG_DM_GPIO
 	struct udevice *bus = dev_get_parent(dev);
 	struct atmel_spi_priv *priv = dev_get_priv(bus);
 	struct dm_spi_slave_platdata *slave_plat = dev_get_parent_platdata(dev);
@@ -313,6 +318,7 @@ static void atmel_spi_cs_deactivate(struct udevice *dev)
 		return;
 
 	dm_gpio_set_value(&priv->cs_gpios[cs], 1);
+#endif
 }
 
 static int atmel_spi_xfer(struct udevice *dev, unsigned int bitlen,
@@ -462,8 +468,7 @@ static int atmel_spi_enable_clk(struct udevice *bus)
 static int atmel_spi_probe(struct udevice *bus)
 {
 	struct atmel_spi_platdata *bus_plat = dev_get_platdata(bus);
-	struct atmel_spi_priv *priv = dev_get_priv(bus);
-	int i, ret;
+	int ret;
 
 	ret = atmel_spi_enable_clk(bus);
 	if (ret)
@@ -471,6 +476,10 @@ static int atmel_spi_probe(struct udevice *bus)
 
 	bus_plat->regs = (struct at91_spi *)devfdt_get_addr(bus);
 
+#ifdef CONFIG_DM_GPIO
+	struct atmel_spi_priv *priv = dev_get_priv(bus);
+	int i;
+
 	ret = gpio_request_list_by_name(bus, "cs-gpios", priv->cs_gpios,
 					ARRAY_SIZE(priv->cs_gpios), 0);
 	if (ret < 0) {
@@ -485,6 +494,7 @@ static int atmel_spi_probe(struct udevice *bus)
 		dm_gpio_set_dir_flags(&priv->cs_gpios[i],
 				      GPIOD_IS_OUT | GPIOD_IS_OUT_ACTIVE);
 	}
+#endif
 
 	writel(ATMEL_SPI_CR_SWRST, &bus_plat->regs->cr);
 
-- 
2.14.3

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [U-Boot] [PATCH 02/14] at91: gurnard: Enable DM_SPI
  2018-03-14 13:16 [U-Boot] [PATCH 00/14] at91: Add boards with OF_CONTROL/DM/DM_SPI Jagan Teki
  2018-03-14 13:16 ` [U-Boot] [PATCH 01/14] spi: atmel: Add ifdef for DM_GPIO code Jagan Teki
@ 2018-03-14 13:16 ` Jagan Teki
  2018-04-06 20:28   ` [U-Boot] [U-Boot,02/14] " Tom Rini
  2018-03-14 13:16 ` [U-Boot] [PATCH 03/14] configs: gurnard: Move CONFIG_ATMEL_SPI to defconfigs Jagan Teki
                   ` (12 subsequent siblings)
  14 siblings, 1 reply; 37+ messages in thread
From: Jagan Teki @ 2018-03-14 13:16 UTC (permalink / raw)
  To: u-boot

Enable DM_SPI for atmel SPI driver on gurnard board.

Cc: Simon Glass <sjg@chromium.org>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
 arch/arm/mach-at91/Kconfig        |  1 +
 board/bluewater/gurnard/gurnard.c | 20 --------------------
 2 files changed, 1 insertion(+), 20 deletions(-)

diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig
index 6907263539..d73adf3723 100644
--- a/arch/arm/mach-at91/Kconfig
+++ b/arch/arm/mach-at91/Kconfig
@@ -85,6 +85,7 @@ config TARGET_GURNARD
 	select BOARD_LATE_INIT
 	select DM
 	select DM_SERIAL
+	select DM_SPI
 	select DM_GPIO
 	select DM_ETH
 
diff --git a/board/bluewater/gurnard/gurnard.c b/board/bluewater/gurnard/gurnard.c
index 8733a9af16..d8e92b1196 100644
--- a/board/bluewater/gurnard/gurnard.c
+++ b/board/bluewater/gurnard/gurnard.c
@@ -18,7 +18,6 @@
 #ifndef CONFIG_DM_ETH
 #include <netdev.h>
 #endif
-#include <spi.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
 #include <asm/mach-types.h>
@@ -415,25 +414,6 @@ void reset_phy(void)
 {
 }
 
-/* SPI chip select control - only used for FPGA programming */
-#ifdef CONFIG_ATMEL_SPI
-
-int spi_cs_is_valid(unsigned int bus, unsigned int cs)
-{
-	return bus == 0 && cs == 0;
-}
-
-void spi_cs_activate(struct spi_slave *slave)
-{
-	/* We don't use chipselects for FPGA programming */
-}
-
-void spi_cs_deactivate(struct spi_slave *slave)
-{
-	/* We don't use chipselects for FPGA programming */
-}
-#endif /* CONFIG_ATMEL_SPI */
-
 static struct atmel_serial_platdata at91sam9260_serial_plat = {
 	.base_addr = ATMEL_BASE_DBGU,
 };
-- 
2.14.3

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [U-Boot] [PATCH 03/14] configs: gurnard: Move CONFIG_ATMEL_SPI to defconfigs
  2018-03-14 13:16 [U-Boot] [PATCH 00/14] at91: Add boards with OF_CONTROL/DM/DM_SPI Jagan Teki
  2018-03-14 13:16 ` [U-Boot] [PATCH 01/14] spi: atmel: Add ifdef for DM_GPIO code Jagan Teki
  2018-03-14 13:16 ` [U-Boot] [PATCH 02/14] at91: gurnard: Enable DM_SPI Jagan Teki
@ 2018-03-14 13:16 ` Jagan Teki
  2018-03-21  4:09   ` Wenyou Yang
  2018-04-06 20:29   ` [U-Boot] [U-Boot, " Tom Rini
  2018-03-14 13:16 ` [U-Boot] [PATCH 04/14] at91: taurus: Enable DM_SPI Jagan Teki
                   ` (11 subsequent siblings)
  14 siblings, 2 replies; 37+ messages in thread
From: Jagan Teki @ 2018-03-14 13:16 UTC (permalink / raw)
  To: u-boot

Now CONFIG_ATMEL_SPI is defined in Kconfig, so move the
same into defconfig file.

Cc: Simon Glass <sjg@chromium.org>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
 configs/gurnard_defconfig     | 1 +
 include/configs/snapper9g45.h | 2 --
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/configs/gurnard_defconfig b/configs/gurnard_defconfig
index 95ccbdefea..ce51a0348f 100644
--- a/configs/gurnard_defconfig
+++ b/configs/gurnard_defconfig
@@ -27,6 +27,7 @@ CONFIG_ENV_IS_IN_NAND=y
 CONFIG_BOOTP_BOOTPATH=y
 CONFIG_BOOTP_GATEWAY=y
 CONFIG_BOOTP_HOSTNAME=y
+CONFIG_ATMEL_SPI=y
 CONFIG_PHYLIB=y
 CONFIG_TIMER=y
 CONFIG_ATMEL_PIT_TIMER=y
diff --git a/include/configs/snapper9g45.h b/include/configs/snapper9g45.h
index a3b1773059..0da3b3b055 100644
--- a/include/configs/snapper9g45.h
+++ b/include/configs/snapper9g45.h
@@ -64,8 +64,6 @@
 #define CONFIG_ATMEL_LCD
 #define CONFIG_GURNARD_SPLASH
 
-#define CONFIG_ATMEL_SPI
-
 /* GPIOs and IO expander */
 #define CONFIG_ATMEL_LEGACY
 #define CONFIG_AT91_GPIO
-- 
2.14.3

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [U-Boot] [PATCH 04/14] at91: taurus: Enable DM_SPI
  2018-03-14 13:16 [U-Boot] [PATCH 00/14] at91: Add boards with OF_CONTROL/DM/DM_SPI Jagan Teki
                   ` (2 preceding siblings ...)
  2018-03-14 13:16 ` [U-Boot] [PATCH 03/14] configs: gurnard: Move CONFIG_ATMEL_SPI to defconfigs Jagan Teki
@ 2018-03-14 13:16 ` Jagan Teki
  2018-04-06 20:29   ` [U-Boot] [U-Boot,04/14] " Tom Rini
  2018-03-14 13:16 ` [U-Boot] [PATCH 05/14] at91: vinco: Enable DM Jagan Teki
                   ` (10 subsequent siblings)
  14 siblings, 1 reply; 37+ messages in thread
From: Jagan Teki @ 2018-03-14 13:16 UTC (permalink / raw)
  To: u-boot

Enable DM_SPI for atmel SPI driver on taurus board.

Kept few functions related to non-dm and gpio on board
files for reference and will be remove once code moved
to relevant drivers.

Cc: Heiko Schocher <hs@denx.de>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
 arch/arm/mach-at91/Kconfig    | 1 +
 board/siemens/taurus/taurus.c | 3 +++
 2 files changed, 4 insertions(+)

diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig
index d73adf3723..5de914a2eb 100644
--- a/arch/arm/mach-at91/Kconfig
+++ b/arch/arm/mach-at91/Kconfig
@@ -220,6 +220,7 @@ config TARGET_TAURUS
 	select SUPPORT_SPL
 	select DM
 	select DM_SERIAL
+	select DM_SPI
 	select DM_GPIO
 	select DM_ETH
 
diff --git a/board/siemens/taurus/taurus.c b/board/siemens/taurus/taurus.c
index 71541ba3a4..3534b2a7bf 100644
--- a/board/siemens/taurus/taurus.c
+++ b/board/siemens/taurus/taurus.c
@@ -283,6 +283,8 @@ int board_early_init_f(void)
 	return 0;
 }
 
+/* FIXME gpio code here need to handle through DM_GPIO */
+#ifndef CONFIG_DM_SPI
 int spi_cs_is_valid(unsigned int bus, unsigned int cs)
 {
 	return bus == 0 && cs == 0;
@@ -297,6 +299,7 @@ void spi_cs_deactivate(struct spi_slave *slave)
 {
 	at91_set_gpio_value(TAURUS_SPI_CS_PIN, 1);
 }
+#endif
 
 #ifdef CONFIG_USB_GADGET_AT91
 #include <linux/usb/at91_udc.h>
-- 
2.14.3

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [U-Boot] [PATCH 05/14] at91: vinco: Enable DM
  2018-03-14 13:16 [U-Boot] [PATCH 00/14] at91: Add boards with OF_CONTROL/DM/DM_SPI Jagan Teki
                   ` (3 preceding siblings ...)
  2018-03-14 13:16 ` [U-Boot] [PATCH 04/14] at91: taurus: Enable DM_SPI Jagan Teki
@ 2018-03-14 13:16 ` Jagan Teki
  2018-04-06 20:29   ` [U-Boot] [U-Boot,05/14] " Tom Rini
  2018-03-14 13:16 ` [U-Boot] [PATCH 06/14] at91: vinco: Add FDT support Jagan Teki
                   ` (9 subsequent siblings)
  14 siblings, 1 reply; 37+ messages in thread
From: Jagan Teki @ 2018-03-14 13:16 UTC (permalink / raw)
  To: u-boot

Enable Driver model for AT91 Vinco boards.

Cc: Gregory CLEMENT <gregory.clement@free-electrons.com>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
 arch/arm/mach-at91/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig
index 5de914a2eb..b9e6946f72 100644
--- a/arch/arm/mach-at91/Kconfig
+++ b/arch/arm/mach-at91/Kconfig
@@ -237,6 +237,7 @@ config TARGET_VINCO
 	bool "Support VINCO"
 	select SAMA5D4
 	select SUPPORT_SPL
+	select DM
 
 config TARGET_WB45N
 	bool "Support Laird WB45N"
-- 
2.14.3

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [U-Boot] [PATCH 06/14] at91: vinco: Add FDT support
  2018-03-14 13:16 [U-Boot] [PATCH 00/14] at91: Add boards with OF_CONTROL/DM/DM_SPI Jagan Teki
                   ` (4 preceding siblings ...)
  2018-03-14 13:16 ` [U-Boot] [PATCH 05/14] at91: vinco: Enable DM Jagan Teki
@ 2018-03-14 13:16 ` Jagan Teki
  2018-04-06 20:29   ` [U-Boot] [U-Boot,06/14] " Tom Rini
  2018-03-14 13:16 ` [U-Boot] [PATCH 07/14] at91: vinco: Enable DM_SPI Jagan Teki
                   ` (8 subsequent siblings)
  14 siblings, 1 reply; 37+ messages in thread
From: Jagan Teki @ 2018-03-14 13:16 UTC (permalink / raw)
  To: u-boot

Sync DTS from Linux and add FDT support for AT91 vinco board.

usb0, usb1, and usb2 nodes removed, since there is no support it.

Cc: Gregory CLEMENT <gregory.clement@free-electrons.com>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
 arch/arm/dts/Makefile       |   3 +
 arch/arm/dts/at91-vinco.dts | 246 ++++++++++++++++++++++++++++++++++++++++++++
 configs/vinco_defconfig     |   2 +
 3 files changed, 251 insertions(+)
 create mode 100644 arch/arm/dts/at91-vinco.dts

diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index 20a4c37d48..1dde68ec66 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -484,6 +484,9 @@ dtb-$(CONFIG_TARGET_SAMA5D4EK) += \
 dtb-$(CONFIG_TARGET_SAMA5D4_XPLAINED) += \
 	at91-sama5d4_xplained.dtb
 
+dtb-$(CONFIG_TARGET_VINCO) += \
+	at91-vinco.dtb
+
 dtb-$(CONFIG_ARCH_BCM283X) += \
 	bcm2835-rpi-a-plus.dtb \
 	bcm2835-rpi-a.dtb \
diff --git a/arch/arm/dts/at91-vinco.dts b/arch/arm/dts/at91-vinco.dts
new file mode 100644
index 0000000000..ff6d2e3205
--- /dev/null
+++ b/arch/arm/dts/at91-vinco.dts
@@ -0,0 +1,246 @@
+/*
+ * Device Tree file for VInCo platform
+ *
+ *  Copyright (C) 2014 Atmel,
+ *                2014 Nicolas Ferre <nicolas.ferre@atmel.com>
+ *   2015 Gregory CLEMENT <gregory.clement@free-electrons.com>
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This file is free software; you can redistribute it and/or
+ *     modify it under the terms of the GNU General Public License as
+ *     published by the Free Software Foundation; either version 2 of the
+ *     License, or (at your option) any later version.
+ *
+ *     This file is distributed in the hope that it will be useful,
+ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *     GNU General Public License for more details.
+ *
+ * Or, alternatively,
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ *     obtaining a copy of this software and associated documentation
+ *     files (the "Software"), to deal in the Software without
+ *     restriction, including without limitation the rights to use,
+ *     copy, modify, merge, publish, distribute, sublicense, and/or
+ *     sell copies of the Software, and to permit persons to whom the
+ *     Software is furnished to do so, subject to the following
+ *     conditions:
+ *
+ *     The above copyright notice and this permission notice shall be
+ *     included in all copies or substantial portions of the Software.
+ *
+ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ *     OTHER DEALINGS IN THE SOFTWARE.
+ */
+/dts-v1/;
+#include "sama5d4.dtsi"
+
+/ {
+	model = "L+G VInCo platform";
+	compatible = "l+g,vinco", "atmel,sama5d4", "atmel,sama5";
+
+	chosen {
+		stdout-path = "serial0:115200n8";
+	};
+
+	memory {
+		reg = <0x20000000 0x4000000>;
+	};
+
+	clocks {
+		slow_xtal {
+			clock-frequency = <32768>;
+		};
+
+		main_xtal {
+			clock-frequency = <12000000>;
+		};
+	};
+
+	ahb {
+		apb {
+
+			adc0: adc at fc034000 {
+				status = "okay"; /* Enable ADC IIO support */
+			};
+
+			mmc0: mmc at f8000000 {
+				pinctrl-names = "default";
+				pinctrl-0 = <&pinctrl_mmc0_clk_cmd_dat0
+					     &pinctrl_mmc0_dat1_3
+					     &pinctrl_mmc0_dat4_7>;
+				vqmmc-supply = <&vcc_3v3_reg>;
+				vmmc-supply = <&vcc_3v3_reg>;
+				no-1-8-v;
+				status = "okay";
+				slot at 0 {
+					reg = <0>;
+					bus-width = <8>;
+					non-removable;
+					broken-cd;
+					status = "okay";
+				};
+			};
+
+			spi0: spi at f8010000 {
+				cs-gpios = <&pioC 3 0>, <0>, <0>, <0>;
+				status = "okay";
+				m25p80 at 0 {
+					compatible = "n25q32b", "jedec,spi-nor";
+					spi-max-frequency = <50000000>;
+					reg = <0>;
+				};
+			};
+
+			i2c0: i2c at f8014000 {
+				status = "okay";
+			};
+
+			i2c1: i2c at f8018000 {
+				status = "okay";
+				/* kerkey security module */
+			};
+
+			macb0: ethernet at f8020000 {
+				phy-mode = "rmii";
+				status = "okay";
+
+				ethernet-phy at 1 {
+					reg = <0x1>;
+					reset-gpios = <&pioE 8 GPIO_ACTIVE_LOW>;
+					interrupt-parent = <&pioB>;
+					interrupts = <15 IRQ_TYPE_EDGE_FALLING>;
+				};
+
+			};
+
+			i2c2: i2c at f8024000 {
+				status = "okay";
+
+				rtc1: rtc at 64 {
+					compatible = "epson,rx8900";
+					reg = <0x32>;
+				};
+			};
+
+			usart2: serial at fc008000 {
+				/* MBUS */
+				status = "okay";
+			};
+
+			usart3: serial at fc00c000 {
+				/* debug */
+				status = "okay";
+			};
+
+			usart4: serial at fc010000 {
+				/* LMN */
+				pinctrl-0 = <&pinctrl_usart4 &pinctrl_usart4_rts>;
+				linux,rs485-enabled-at-boot-time;
+				status = "okay";
+			};
+
+			tcb2: timer at fc024000 {
+				timer at 0 {
+					compatible = "atmel,tcb-timer";
+					reg = <0>;
+				};
+
+				timer at 1 {
+					compatible = "atmel,tcb-timer";
+					reg = <1>;
+				};
+			};
+
+			macb1: ethernet at fc028000 {
+				phy-mode = "rmii";
+				status = "okay";
+				#address-cells = <1>;
+				#size-cells = <0>;
+				status = "okay";
+
+				ethernet-phy at 1 {
+					reg = <0x1>;
+					interrupt-parent = <&pioB>;
+					interrupts = <31 IRQ_TYPE_EDGE_FALLING>;
+					reset-gpios = <&pioE 6 GPIO_ACTIVE_LOW>;
+				};
+			};
+
+			watchdog at fc068640 {
+				status = "okay";
+			};
+
+			pinctrl at fc06a000 {
+				board {
+					pinctrl_usba_vbus: usba_vbus {
+						atmel,pins =
+						<AT91_PIOE 31 AT91_PERIPH_GPIO AT91_PINCTRL_DEGLITCH>;
+					};
+				};
+			};
+		};
+	};
+
+	leds {
+		compatible = "gpio-leds";
+		status = "okay";
+
+		led_err {
+			label = "err";
+			gpios = <&pioA 7 GPIO_ACTIVE_LOW>;
+			default-state = "off";
+		};
+
+		led_rssi {
+			label = "rssi";
+			gpios = <&pioA 9 GPIO_ACTIVE_LOW>;
+			default-state = "off";
+		};
+
+		led_tls {
+			label = "tls";
+			gpios = <&pioA 24 GPIO_ACTIVE_LOW>;
+			default-state = "off";
+		};
+
+		led_lmc {
+			label = "lmc";
+			gpios = <&pioA 25 GPIO_ACTIVE_LOW>;
+			default-state = "off";
+		};
+
+		led_wmt {
+			label = "wmt";
+			gpios = <&pioA 29 GPIO_ACTIVE_LOW>;
+			default-state = "off";
+		};
+
+		led_pwr {
+			label = "pwr";
+			gpios = <&pioA 26 GPIO_ACTIVE_LOW>;
+			default-state = "on";
+		};
+
+	};
+
+	vcc_3v3_reg: fixedregulator_3v3 {
+		compatible = "regulator-fixed";
+		regulator-name = "VCC 3V3";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+		regulator-boot-on;
+		regulator-always-on;
+	};
+};
diff --git a/configs/vinco_defconfig b/configs/vinco_defconfig
index 0d8744108b..e8dad4468b 100644
--- a/configs/vinco_defconfig
+++ b/configs/vinco_defconfig
@@ -2,6 +2,7 @@ CONFIG_ARM=y
 CONFIG_ARCH_AT91=y
 CONFIG_SYS_TEXT_BASE=0x20f00000
 CONFIG_TARGET_VINCO=y
+CONFIG_DEFAULT_DEVICE_TREE="at91-vinco"
 CONFIG_ENV_VARS_UBOOT_CONFIG=y
 CONFIG_SPI_BOOT=y
 CONFIG_BOOTDELAY=3
@@ -23,6 +24,7 @@ CONFIG_CMD_DHCP=y
 CONFIG_CMD_MII=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_FAT=y
+CONFIG_OF_CONTROL=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_BOOTP_BOOTPATH=y
 CONFIG_BOOTP_GATEWAY=y
-- 
2.14.3

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [U-Boot] [PATCH 07/14] at91: vinco: Enable DM_SPI
  2018-03-14 13:16 [U-Boot] [PATCH 00/14] at91: Add boards with OF_CONTROL/DM/DM_SPI Jagan Teki
                   ` (5 preceding siblings ...)
  2018-03-14 13:16 ` [U-Boot] [PATCH 06/14] at91: vinco: Add FDT support Jagan Teki
@ 2018-03-14 13:16 ` Jagan Teki
  2018-04-06 20:29   ` [U-Boot] [U-Boot,07/14] " Tom Rini
  2018-03-14 13:16 ` [U-Boot] [PATCH 08/14] at91: ma5d4evk: Enable DM Jagan Teki
                   ` (7 subsequent siblings)
  14 siblings, 1 reply; 37+ messages in thread
From: Jagan Teki @ 2018-03-14 13:16 UTC (permalink / raw)
  To: u-boot

AT91 Vinco board uses atmel spi driver, enable DM_SPI to
use dm functionality.

Cc: Gregory CLEMENT <gregory.clement@free-electrons.com>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
 arch/arm/mach-at91/Kconfig | 1 +
 board/l+g/vinco/vinco.c    | 5 +++--
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig
index b9e6946f72..17d60d0dbe 100644
--- a/arch/arm/mach-at91/Kconfig
+++ b/arch/arm/mach-at91/Kconfig
@@ -238,6 +238,7 @@ config TARGET_VINCO
 	select SAMA5D4
 	select SUPPORT_SPL
 	select DM
+	select DM_SPI
 
 config TARGET_WB45N
 	bool "Support Laird WB45N"
diff --git a/board/l+g/vinco/vinco.c b/board/l+g/vinco/vinco.c
index a938a2c2e1..f427abf6c1 100644
--- a/board/l+g/vinco/vinco.c
+++ b/board/l+g/vinco/vinco.c
@@ -33,7 +33,8 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
-#ifdef CONFIG_ATMEL_SPI
+/* FIXME gpio code here need to handle through DM_GPIO */
+#ifndef CONFIG_DM_SPI
 int spi_cs_is_valid(unsigned int bus, unsigned int cs)
 {
 	return bus == 0 && cs == 0;
@@ -166,7 +167,7 @@ int board_init(void)
 	/* adress of boot parameters */
 	gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
 
-#ifdef CONFIG_ATMEL_SPI
+#ifndef CONFIG_DM_SPI
 	vinco_spi0_hw_init();
 #endif
 
-- 
2.14.3

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [U-Boot] [PATCH 08/14] at91: ma5d4evk: Enable DM
  2018-03-14 13:16 [U-Boot] [PATCH 00/14] at91: Add boards with OF_CONTROL/DM/DM_SPI Jagan Teki
                   ` (6 preceding siblings ...)
  2018-03-14 13:16 ` [U-Boot] [PATCH 07/14] at91: vinco: Enable DM_SPI Jagan Teki
@ 2018-03-14 13:16 ` Jagan Teki
  2018-04-06 20:29   ` [U-Boot] [U-Boot,08/14] " Tom Rini
  2018-03-14 13:16 ` [U-Boot] [PATCH 09/14] at91: ma5d4evk: Add FDT support Jagan Teki
                   ` (6 subsequent siblings)
  14 siblings, 1 reply; 37+ messages in thread
From: Jagan Teki @ 2018-03-14 13:16 UTC (permalink / raw)
  To: u-boot

Enable Driver model for AT91 ma5d4evk boards.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
 arch/arm/mach-at91/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig
index 17d60d0dbe..4dfddcc287 100644
--- a/arch/arm/mach-at91/Kconfig
+++ b/arch/arm/mach-at91/Kconfig
@@ -200,6 +200,7 @@ config TARGET_MA5D4EVK
 	bool "Aries MA5D4EVK Evaluation Kit"
 	select SAMA5D4
 	select SUPPORT_SPL
+	select DM
 
 config TARGET_MEESC
 	bool "Support meesc"
-- 
2.14.3

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [U-Boot] [PATCH 09/14] at91: ma5d4evk: Add FDT support
  2018-03-14 13:16 [U-Boot] [PATCH 00/14] at91: Add boards with OF_CONTROL/DM/DM_SPI Jagan Teki
                   ` (7 preceding siblings ...)
  2018-03-14 13:16 ` [U-Boot] [PATCH 08/14] at91: ma5d4evk: Enable DM Jagan Teki
@ 2018-03-14 13:16 ` Jagan Teki
  2018-04-06 20:29   ` [U-Boot] [U-Boot,09/14] " Tom Rini
  2018-03-14 13:16 ` [U-Boot] [PATCH 10/14] at91: ma5d4evk: Enable DM_SPI Jagan Teki
                   ` (5 subsequent siblings)
  14 siblings, 1 reply; 37+ messages in thread
From: Jagan Teki @ 2018-03-14 13:16 UTC (permalink / raw)
  To: u-boot

Sync DTS from Linux and add FDT support for AT91 ma5d4evk board.

usb0, usb1, usb2 and hlcdc_pwm nodes removed, since there is no support it.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
 arch/arm/dts/Makefile                  |   3 +
 arch/arm/dts/at91-sama5d4_ma5d4.dtsi   | 142 +++++++++++++++++++++++++++++++
 arch/arm/dts/at91-sama5d4_ma5d4evk.dts | 149 +++++++++++++++++++++++++++++++++
 configs/ma5d4evk_defconfig             |   2 +
 4 files changed, 296 insertions(+)
 create mode 100644 arch/arm/dts/at91-sama5d4_ma5d4.dtsi
 create mode 100644 arch/arm/dts/at91-sama5d4_ma5d4evk.dts

diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index 1dde68ec66..af1f84306a 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -478,6 +478,9 @@ dtb-$(CONFIG_TARGET_SAMA5D3XEK) += \
 dtb-$(CONFIG_TARGET_SAMA5D3_XPLAINED) += \
 	at91-sama5d3_xplained.dtb
 
+dtb-$(CONFIG_TARGET_MA5D4EK) += \
+	at91-sama5d4_ma5d4evk.dts.dtb
+
 dtb-$(CONFIG_TARGET_SAMA5D4EK) += \
 	at91-sama5d4ek.dtb
 
diff --git a/arch/arm/dts/at91-sama5d4_ma5d4.dtsi b/arch/arm/dts/at91-sama5d4_ma5d4.dtsi
new file mode 100644
index 0000000000..d3e79fbf19
--- /dev/null
+++ b/arch/arm/dts/at91-sama5d4_ma5d4.dtsi
@@ -0,0 +1,142 @@
+/*
+ * Copyright (C) 2015 Marek Vasut <marex@denx.de>
+ *
+ * The code contained herein is licensed under the GNU General Public
+ * License. You may obtain a copy of the GNU General Public License
+ * Version 2 or later at the following locations:
+ *
+ * http://www.opensource.org/licenses/gpl-license.html
+ * http://www.gnu.org/copyleft/gpl.html
+ */
+
+#include "sama5d4.dtsi"
+
+/ {
+	model = "Aries/DENX MA5D4";
+	compatible = "aries,ma5d4", "denx,ma5d4", "atmel,sama5d4", "atmel,sama5";
+
+	memory {
+		reg = <0x20000000 0x10000000>;
+	};
+
+	clocks {
+		slow_xtal {
+			clock-frequency = <32768>;
+		};
+
+		main_xtal {
+			clock-frequency = <12000000>;
+		};
+
+		clk20m: clk20m {
+			compatible = "fixed-clock";
+			#clock-cells = <0>;
+			clock-frequency = <20000000>;
+			clock-output-names = "clk20m";
+		};
+	};
+
+	ahb {
+		apb {
+			mmc0: mmc at f8000000 {
+				pinctrl-names = "default";
+				pinctrl-0 = <&pinctrl_mmc0_clk_cmd_dat0 &pinctrl_mmc0_dat1_3 &pinctrl_mmc0_dat4_7>;
+				vmmc-supply = <&vcc_mmc0_reg>;
+				vqmmc-supply = <&vcc_3v3_reg>;
+				status = "okay";
+				slot at 0 {
+					reg = <0>;
+					bus-width = <8>;
+					broken-cd;
+				};
+			};
+
+			spi0: spi at f8010000 {
+				cs-gpios = <&pioC 3 0>, <0>, <0>, <0>;
+				status = "okay";
+
+				m25p80 at 0 {
+					compatible = "atmel,at25df321a";
+					spi-max-frequency = <50000000>;
+					reg = <0>;
+				};
+			};
+
+			i2c0: i2c at f8014000 {
+				status = "okay";
+			};
+
+			spi1: spi at fc018000 {
+				cs-gpios = <&pioB 22 0>, <&pioB 23 0>, <0>, <0>;
+				status = "okay";
+
+				can0: can at 0 {
+					compatible = "microchip,mcp2515";
+					reg = <0>;
+					clocks = <&clk20m>;
+					interrupt-parent = <&pioE>;
+					interrupts = <6 IRQ_TYPE_EDGE_RISING>;
+					spi-max-frequency = <10000000>;
+				};
+
+				can1: can at 1 {
+					compatible = "microchip,mcp2515";
+					reg = <1>;
+					clocks = <&clk20m>;
+					interrupt-parent = <&pioE>;
+					interrupts = <7 IRQ_TYPE_EDGE_RISING>;
+					spi-max-frequency = <10000000>;
+				};
+			};
+
+			tcb2: timer at fc024000 {
+				timer at 0 {
+					compatible = "atmel,tcb-timer";
+					reg = <0>;
+				};
+
+				timer at 1 {
+					compatible = "atmel,tcb-timer";
+					reg = <1>;
+				};
+			};
+
+			adc0: adc at fc034000 {
+				pinctrl-names = "default";
+				pinctrl-0 = <
+					/* external trigger conflicts with USBA_VBUS */
+					&pinctrl_adc0_ad0
+					&pinctrl_adc0_ad1
+					&pinctrl_adc0_ad2
+					&pinctrl_adc0_ad3
+					&pinctrl_adc0_ad4
+					>;
+				atmel,adc-vref = <3300>;
+				status = "okay";
+			};
+
+			watchdog at fc068640 {
+				status = "okay";
+			};
+		};
+	};
+
+	vcc_3v3_reg: fixedregulator_3v3 {
+		compatible = "regulator-fixed";
+		regulator-name = "VCC 3V3";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+		regulator-boot-on;
+		regulator-always-on;
+	};
+
+	vcc_mmc0_reg: fixedregulator_mmc0 {
+		compatible = "regulator-fixed";
+		gpio = <&pioE 15 GPIO_ACTIVE_HIGH>;
+		regulator-name = "RST_n MCI0";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+		vin-supply = <&vcc_3v3_reg>;
+		regulator-boot-on;
+	};
+};
diff --git a/arch/arm/dts/at91-sama5d4_ma5d4evk.dts b/arch/arm/dts/at91-sama5d4_ma5d4evk.dts
new file mode 100644
index 0000000000..f65a67b751
--- /dev/null
+++ b/arch/arm/dts/at91-sama5d4_ma5d4evk.dts
@@ -0,0 +1,149 @@
+/*
+ * Copyright (C) 2015 Marek Vasut <marex@denx.de>
+ *
+ * The code contained herein is licensed under the GNU General Public
+ * License. You may obtain a copy of the GNU General Public License
+ * Version 2 or later at the following locations:
+ *
+ * http://www.opensource.org/licenses/gpl-license.html
+ * http://www.gnu.org/copyleft/gpl.html
+ */
+
+/dts-v1/;
+#include "at91-sama5d4_ma5d4.dtsi"
+
+/ {
+	model = "Aries/DENX MA5D4EVK";
+	compatible = "aries,ma5d4evk", "denx,ma5d4evk", "atmel,sama5d4", "atmel,sama5";
+
+	chosen {
+		stdout-path = "serial3:115200n8";
+	};
+
+	ahb {
+		apb {
+			hlcdc: hlcdc at f0000000 {
+				status = "okay";
+
+				hlcdc-display-controller {
+					pinctrl-names = "default";
+					pinctrl-0 = <&pinctrl_lcd_base &pinctrl_lcd_rgb888>;
+
+					port at 0 {
+						hlcdc_panel_output: endpoint at 0 {
+							reg = <0>;
+							remote-endpoint = <&panel_input>;
+						};
+					};
+				};
+
+			};
+
+			macb0: ethernet at f8020000 {
+				phy-mode = "rmii";
+				status = "okay";
+
+				phy0: ethernet-phy at 0 {
+					reg = <0>;
+				};
+			};
+
+			usart0: serial at f802c000 {
+				status = "okay";
+			};
+
+			usart1: serial at f8030000 {
+				status = "okay";
+			};
+
+			mmc1: mmc at fc000000 {
+				pinctrl-names = "default";
+				pinctrl-0 = <&pinctrl_mmc1_clk_cmd_dat0 &pinctrl_mmc1_dat1_3 &pinctrl_mmc1_cd>;
+				vmmc-supply = <&vcc_mmc1_reg>;
+				vqmmc-supply = <&vcc_3v3_reg>;
+				status = "okay";
+				slot at 0 {
+					reg = <0>;
+					bus-width = <4>;
+					cd-gpios = <&pioE 5 0>;
+				};
+			};
+
+			adc0: adc at fc034000 {
+				atmel,adc-ts-wires = <4>;
+				atmel,adc-ts-pressure-threshold = <10000>;
+			};
+
+
+			pinctrl at fc06a000 {
+				board {
+					pinctrl_mmc1_cd: mmc1_cd {
+						atmel,pins = <AT91_PIOE 5 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>;
+					};
+					pinctrl_usba_vbus: usba_vbus {
+						atmel,pins =
+							<AT91_PIOE 31 AT91_PERIPH_GPIO AT91_PINCTRL_DEGLITCH>;
+					};
+				};
+			};
+		};
+	};
+
+	backlight: backlight {
+		compatible = "pwm-backlight";
+		brightness-levels = <0 4 8 16 32 64 128 255>;
+		default-brightness-level = <6>;
+		status = "okay";
+	};
+
+	leds {
+		compatible = "gpio-leds";
+		status = "okay";
+
+		user1 {
+			label = "user1";
+			gpios = <&pioD 28 GPIO_ACTIVE_HIGH>;
+			linux,default-trigger = "heartbeat";
+		};
+
+		user2 {
+			label = "user2";
+			gpios = <&pioD 29 GPIO_ACTIVE_HIGH>;
+			linux,default-trigger = "heartbeat";
+		};
+
+		user3 {
+			label = "user3";
+			gpios = <&pioD 30 GPIO_ACTIVE_HIGH>;
+			linux,default-trigger = "heartbeat";
+		};
+	};
+
+	panel: panel {
+		/* Actually Ampire 800480R2 */
+		compatible = "foxlink,fl500wvr00-a0t", "simple-panel";
+		backlight = <&backlight>;
+		#address-cells = <1>;
+		#size-cells = <0>;
+		status = "okay";
+
+		port at 0 {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			panel_input: endpoint at 0 {
+				reg = <0>;
+				remote-endpoint = <&hlcdc_panel_output>;
+			};
+		};
+	};
+
+	vcc_mmc1_reg: fixedregulator_mmc1 {
+		compatible = "regulator-fixed";
+		gpio = <&pioE 17 GPIO_ACTIVE_LOW>;
+		regulator-name = "VDD MCI1";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+		vin-supply = <&vcc_3v3_reg>;
+	};
+};
diff --git a/configs/ma5d4evk_defconfig b/configs/ma5d4evk_defconfig
index 8322ed72da..cdea7dc123 100644
--- a/configs/ma5d4evk_defconfig
+++ b/configs/ma5d4evk_defconfig
@@ -2,6 +2,7 @@ CONFIG_ARM=y
 CONFIG_ARCH_AT91=y
 CONFIG_SYS_TEXT_BASE=0x26f00000
 CONFIG_TARGET_MA5D4EVK=y
+CONFIG_DEFAULT_DEVICE_TREE="at91-sama5d4_ma5d4evk"
 CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
 CONFIG_SPL_LIBGENERIC_SUPPORT=y
@@ -36,6 +37,7 @@ CONFIG_CMD_CACHE=y
 CONFIG_CMD_EXT4=y
 CONFIG_CMD_EXT4_WRITE=y
 CONFIG_CMD_FAT=y
+CONFIG_OF_CONTROL=y
 CONFIG_CMD_FS_GENERIC=y
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_NET_RANDOM_ETHADDR=y
-- 
2.14.3

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [U-Boot] [PATCH 10/14] at91: ma5d4evk: Enable DM_SPI
  2018-03-14 13:16 [U-Boot] [PATCH 00/14] at91: Add boards with OF_CONTROL/DM/DM_SPI Jagan Teki
                   ` (8 preceding siblings ...)
  2018-03-14 13:16 ` [U-Boot] [PATCH 09/14] at91: ma5d4evk: Add FDT support Jagan Teki
@ 2018-03-14 13:16 ` Jagan Teki
  2018-04-06 20:29   ` [U-Boot] [U-Boot,10/14] " Tom Rini
  2018-03-14 13:16 ` [U-Boot] [PATCH 11/14] at91: ma5d4evk: Enable SPL_DM and SPL_OF_CONTROL Jagan Teki
                   ` (4 subsequent siblings)
  14 siblings, 1 reply; 37+ messages in thread
From: Jagan Teki @ 2018-03-14 13:16 UTC (permalink / raw)
  To: u-boot

AT91 ma5d4evk board uses atmel spi driver, enable DM_SPI to
use dm functionality.

Kept few functions related to non-dm and gpio on board
files for reference and will be remove once code moved
to relevant drivers.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
 arch/arm/mach-at91/Kconfig      | 1 +
 board/aries/ma5d4evk/ma5d4evk.c | 7 ++++---
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig
index 4dfddcc287..3621dfa760 100644
--- a/arch/arm/mach-at91/Kconfig
+++ b/arch/arm/mach-at91/Kconfig
@@ -201,6 +201,7 @@ config TARGET_MA5D4EVK
 	select SAMA5D4
 	select SUPPORT_SPL
 	select DM
+	select DM_SPI
 
 config TARGET_MEESC
 	bool "Support meesc"
diff --git a/board/aries/ma5d4evk/ma5d4evk.c b/board/aries/ma5d4evk/ma5d4evk.c
index 956c297e72..46c11d1a12 100644
--- a/board/aries/ma5d4evk/ma5d4evk.c
+++ b/board/aries/ma5d4evk/ma5d4evk.c
@@ -30,7 +30,8 @@ DECLARE_GLOBAL_DATA_PTR;
 
 static u8 boot_mode_sf;
 
-#ifdef CONFIG_ATMEL_SPI
+/* FIXME gpio code here need to handle through DM_GPIO */
+#ifndef CONFIG_DM_SPI
 int spi_cs_is_valid(unsigned int bus, unsigned int cs)
 {
 	return bus == 0 && cs == 0;
@@ -57,7 +58,7 @@ static void ma5d4evk_spi0_hw_init(void)
 	/* Enable clock */
 	at91_periph_clk_enable(ATMEL_ID_SPI0);
 }
-#endif /* CONFIG_ATMEL_SPI */
+#endif /* CONFIG_DM_SPI */
 
 #ifdef CONFIG_CMD_USB
 static void ma5d4evk_usb_hw_init(void)
@@ -292,7 +293,7 @@ int board_init(void)
 	/* adress of boot parameters */
 	gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
 
-#ifdef CONFIG_ATMEL_SPI
+#ifndef CONFIG_DM_SPI
 	ma5d4evk_spi0_hw_init();
 #endif
 #ifdef CONFIG_GENERIC_ATMEL_MCI
-- 
2.14.3

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [U-Boot] [PATCH 11/14] at91: ma5d4evk: Enable SPL_DM and SPL_OF_CONTROL
  2018-03-14 13:16 [U-Boot] [PATCH 00/14] at91: Add boards with OF_CONTROL/DM/DM_SPI Jagan Teki
                   ` (9 preceding siblings ...)
  2018-03-14 13:16 ` [U-Boot] [PATCH 10/14] at91: ma5d4evk: Enable DM_SPI Jagan Teki
@ 2018-03-14 13:16 ` Jagan Teki
  2018-04-06 20:29   ` [U-Boot] [U-Boot, " Tom Rini
  2018-03-14 13:16 ` [U-Boot] [PATCH 12/14] spi: atmel: Drop non-dm code Jagan Teki
                   ` (3 subsequent siblings)
  14 siblings, 1 reply; 37+ messages in thread
From: Jagan Teki @ 2018-03-14 13:16 UTC (permalink / raw)
  To: u-boot

Enable SPL Driver model and FDT support for AT91 ma5d4evk boards.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
 board/aries/ma5d4evk/ma5d4evk.c | 2 +-
 configs/ma5d4evk_defconfig      | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/board/aries/ma5d4evk/ma5d4evk.c b/board/aries/ma5d4evk/ma5d4evk.c
index 46c11d1a12..9f8b8dc154 100644
--- a/board/aries/ma5d4evk/ma5d4evk.c
+++ b/board/aries/ma5d4evk/ma5d4evk.c
@@ -359,7 +359,7 @@ int board_eth_init(bd_t *bis)
 #ifdef CONFIG_SPL_BUILD
 void spl_board_init(void)
 {
-#ifdef CONFIG_ATMEL_SPI
+#ifndef CONFIG_DM_SPI
 	ma5d4evk_spi0_hw_init();
 #endif
 #ifdef CONFIG_GENERIC_ATMEL_MCI
diff --git a/configs/ma5d4evk_defconfig b/configs/ma5d4evk_defconfig
index cdea7dc123..57f896d630 100644
--- a/configs/ma5d4evk_defconfig
+++ b/configs/ma5d4evk_defconfig
@@ -9,6 +9,8 @@ CONFIG_SPL_LIBGENERIC_SUPPORT=y
 CONFIG_SPL_SERIAL_SUPPORT=y
 CONFIG_SPL_SPI_FLASH_SUPPORT=y
 CONFIG_SPL_SPI_SUPPORT=y
+CONFIG_SPL_DM=y
+CONFIG_SPL_OF_CONTROL=y
 CONFIG_ENV_VARS_UBOOT_CONFIG=y
 CONFIG_FIT=y
 CONFIG_BOOTDELAY=3
-- 
2.14.3

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [U-Boot] [PATCH 12/14] spi: atmel: Drop non-dm code
  2018-03-14 13:16 [U-Boot] [PATCH 00/14] at91: Add boards with OF_CONTROL/DM/DM_SPI Jagan Teki
                   ` (10 preceding siblings ...)
  2018-03-14 13:16 ` [U-Boot] [PATCH 11/14] at91: ma5d4evk: Enable SPL_DM and SPL_OF_CONTROL Jagan Teki
@ 2018-03-14 13:16 ` Jagan Teki
  2018-03-21  4:10   ` Wenyou Yang
  2018-04-06 20:29   ` [U-Boot] [U-Boot,12/14] " Tom Rini
  2018-03-14 13:16 ` [U-Boot] [PATCH 13/14] spi: atmel: Drop atmel_spi.h Jagan Teki
                   ` (2 subsequent siblings)
  14 siblings, 2 replies; 37+ messages in thread
From: Jagan Teki @ 2018-03-14 13:16 UTC (permalink / raw)
  To: u-boot

All board configs are now enabled DM_SPI for SPL and
U-Boot proper, so now its time to drop non-dm code.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
 drivers/spi/atmel_spi.c      | 201 -------------------------------------------
 drivers/spi/atmel_spi.h      |  16 ----
 include/configs/ma5d4evk.h   |   1 -
 include/configs/vinco.h      |   1 -
 scripts/config_whitelist.txt |   1 -
 5 files changed, 220 deletions(-)

diff --git a/drivers/spi/atmel_spi.c b/drivers/spi/atmel_spi.c
index 3cdfd366ab..122c6d107d 100644
--- a/drivers/spi/atmel_spi.c
+++ b/drivers/spi/atmel_spi.c
@@ -26,206 +26,6 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
-#ifndef CONFIG_DM_SPI
-
-static int spi_has_wdrbt(struct atmel_spi_slave *slave)
-{
-	unsigned int ver;
-
-	ver = spi_readl(slave, VERSION);
-
-	return (ATMEL_SPI_VERSION_REV(ver) >= 0x210);
-}
-
-void spi_init()
-{
-
-}
-
-struct spi_slave *spi_setup_slave(unsigned int bus, unsigned int cs,
-			unsigned int max_hz, unsigned int mode)
-{
-	struct atmel_spi_slave	*as;
-	unsigned int		scbr;
-	u32			csrx;
-	void			*regs;
-
-	if (!spi_cs_is_valid(bus, cs))
-		return NULL;
-
-	switch (bus) {
-	case 0:
-		regs = (void *)ATMEL_BASE_SPI0;
-		break;
-#ifdef ATMEL_BASE_SPI1
-	case 1:
-		regs = (void *)ATMEL_BASE_SPI1;
-		break;
-#endif
-#ifdef ATMEL_BASE_SPI2
-	case 2:
-		regs = (void *)ATMEL_BASE_SPI2;
-		break;
-#endif
-#ifdef ATMEL_BASE_SPI3
-	case 3:
-		regs = (void *)ATMEL_BASE_SPI3;
-		break;
-#endif
-	default:
-		return NULL;
-	}
-
-
-	scbr = (get_spi_clk_rate(bus) + max_hz - 1) / max_hz;
-	if (scbr > ATMEL_SPI_CSRx_SCBR_MAX)
-		/* Too low max SCK rate */
-		return NULL;
-	if (scbr < 1)
-		scbr = 1;
-
-	csrx = ATMEL_SPI_CSRx_SCBR(scbr);
-	csrx |= ATMEL_SPI_CSRx_BITS(ATMEL_SPI_BITS_8);
-	if (!(mode & SPI_CPHA))
-		csrx |= ATMEL_SPI_CSRx_NCPHA;
-	if (mode & SPI_CPOL)
-		csrx |= ATMEL_SPI_CSRx_CPOL;
-
-	as = spi_alloc_slave(struct atmel_spi_slave, bus, cs);
-	if (!as)
-		return NULL;
-
-	as->regs = regs;
-	as->mr = ATMEL_SPI_MR_MSTR | ATMEL_SPI_MR_MODFDIS
-			| ATMEL_SPI_MR_PCS(~(1 << cs) & 0xf);
-	if (spi_has_wdrbt(as))
-		as->mr |= ATMEL_SPI_MR_WDRBT;
-
-	spi_writel(as, CSR(cs), csrx);
-
-	return &as->slave;
-}
-
-void spi_free_slave(struct spi_slave *slave)
-{
-	struct atmel_spi_slave *as = to_atmel_spi(slave);
-
-	free(as);
-}
-
-int spi_claim_bus(struct spi_slave *slave)
-{
-	struct atmel_spi_slave *as = to_atmel_spi(slave);
-
-	/* Enable the SPI hardware */
-	spi_writel(as, CR, ATMEL_SPI_CR_SPIEN);
-
-	/*
-	 * Select the slave. This should set SCK to the correct
-	 * initial state, etc.
-	 */
-	spi_writel(as, MR, as->mr);
-
-	return 0;
-}
-
-void spi_release_bus(struct spi_slave *slave)
-{
-	struct atmel_spi_slave *as = to_atmel_spi(slave);
-
-	/* Disable the SPI hardware */
-	spi_writel(as, CR, ATMEL_SPI_CR_SPIDIS);
-}
-
-int spi_xfer(struct spi_slave *slave, unsigned int bitlen,
-		const void *dout, void *din, unsigned long flags)
-{
-	struct atmel_spi_slave *as = to_atmel_spi(slave);
-	unsigned int	len_tx;
-	unsigned int	len_rx;
-	unsigned int	len;
-	u32		status;
-	const u8	*txp = dout;
-	u8		*rxp = din;
-	u8		value;
-
-	if (bitlen == 0)
-		/* Finish any previously submitted transfers */
-		goto out;
-
-	/*
-	 * TODO: The controller can do non-multiple-of-8 bit
-	 * transfers, but this driver currently doesn't support it.
-	 *
-	 * It's also not clear how such transfers are supposed to be
-	 * represented as a stream of bytes...this is a limitation of
-	 * the current SPI interface.
-	 */
-	if (bitlen % 8) {
-		/* Errors always terminate an ongoing transfer */
-		flags |= SPI_XFER_END;
-		goto out;
-	}
-
-	len = bitlen / 8;
-
-	/*
-	 * The controller can do automatic CS control, but it is
-	 * somewhat quirky, and it doesn't really buy us much anyway
-	 * in the context of U-Boot.
-	 */
-	if (flags & SPI_XFER_BEGIN) {
-		spi_cs_activate(slave);
-		/*
-		 * sometimes the RDR is not empty when we get here,
-		 * in theory that should not happen, but it DOES happen.
-		 * Read it here to be on the safe side.
-		 * That also clears the OVRES flag. Required if the
-		 * following loop exits due to OVRES!
-		 */
-		spi_readl(as, RDR);
-	}
-
-	for (len_tx = 0, len_rx = 0; len_rx < len; ) {
-		status = spi_readl(as, SR);
-
-		if (status & ATMEL_SPI_SR_OVRES)
-			return -1;
-
-		if (len_tx < len && (status & ATMEL_SPI_SR_TDRE)) {
-			if (txp)
-				value = *txp++;
-			else
-				value = 0;
-			spi_writel(as, TDR, value);
-			len_tx++;
-		}
-		if (status & ATMEL_SPI_SR_RDRF) {
-			value = spi_readl(as, RDR);
-			if (rxp)
-				*rxp++ = value;
-			len_rx++;
-		}
-	}
-
-out:
-	if (flags & SPI_XFER_END) {
-		/*
-		 * Wait until the transfer is completely done before
-		 * we deactivate CS.
-		 */
-		do {
-			status = spi_readl(as, SR);
-		} while (!(status & ATMEL_SPI_SR_TXEMPTY));
-
-		spi_cs_deactivate(slave);
-	}
-
-	return 0;
-}
-
-#else
-
 #define MAX_CS_COUNT	4
 
 struct atmel_spi_platdata {
@@ -515,4 +315,3 @@ U_BOOT_DRIVER(atmel_spi) = {
 	.priv_auto_alloc_size = sizeof(struct atmel_spi_priv),
 	.probe	= atmel_spi_probe,
 };
-#endif
diff --git a/drivers/spi/atmel_spi.h b/drivers/spi/atmel_spi.h
index 76b8556c98..685eeed99e 100644
--- a/drivers/spi/atmel_spi.h
+++ b/drivers/spi/atmel_spi.h
@@ -79,22 +79,6 @@
 #define ATMEL_SPI_BITS_16		8
 
 struct atmel_spi_slave {
-	struct spi_slave slave;
 	void		*regs;
 	u32		mr;
 };
-
-static inline struct atmel_spi_slave *to_atmel_spi(struct spi_slave *slave)
-{
-	return container_of(slave, struct atmel_spi_slave, slave);
-}
-
-/* Register access macros */
-#define spi_readl(as, reg)					\
-	readl(as->regs + ATMEL_SPI_##reg)
-#define spi_writel(as, reg, value)				\
-	writel(value, as->regs + ATMEL_SPI_##reg)
-
-#if !defined(CONFIG_SYS_SPI_WRITE_TOUT)
-#define CONFIG_SYS_SPI_WRITE_TOUT	(5 * CONFIG_SYS_HZ)
-#endif
diff --git a/include/configs/ma5d4evk.h b/include/configs/ma5d4evk.h
index ed95e580c0..4cba7580a2 100644
--- a/include/configs/ma5d4evk.h
+++ b/include/configs/ma5d4evk.h
@@ -87,7 +87,6 @@
  */
 #ifdef CONFIG_CMD_SF
 #define CONFIG_ATMEL_SPI
-#define CONFIG_ATMEL_SPI0
 #define CONFIG_SPI_FLASH_ATMEL
 #define CONFIG_SF_DEFAULT_BUS		0
 #define CONFIG_SF_DEFAULT_CS		0
diff --git a/include/configs/vinco.h b/include/configs/vinco.h
index ca3958986b..3ae7e9e75b 100644
--- a/include/configs/vinco.h
+++ b/include/configs/vinco.h
@@ -39,7 +39,6 @@
 
 #ifdef CONFIG_CMD_SF
 #define CONFIG_ATMEL_SPI
-#define CONFIG_ATMEL_SPI0
 #define CONFIG_SPI_FLASH_STMICRO
 #define CONFIG_SF_DEFAULT_BUS		0
 #define CONFIG_SF_DEFAULT_CS		0
diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt
index 3606585c05..a5f8e3591f 100644
--- a/scripts/config_whitelist.txt
+++ b/scripts/config_whitelist.txt
@@ -103,7 +103,6 @@ CONFIG_ATMEL_LEGACY
 CONFIG_ATMEL_MCI_8BIT
 CONFIG_ATMEL_NAND_HWECC
 CONFIG_ATMEL_NAND_HW_PMECC
-CONFIG_ATMEL_SPI0
 CONFIG_AT_TRANS
 CONFIG_AUTO_ZRELADDR
 CONFIG_BACKSIDE_L2_CACHE
-- 
2.14.3

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [U-Boot] [PATCH 13/14] spi: atmel: Drop atmel_spi.h
  2018-03-14 13:16 [U-Boot] [PATCH 00/14] at91: Add boards with OF_CONTROL/DM/DM_SPI Jagan Teki
                   ` (11 preceding siblings ...)
  2018-03-14 13:16 ` [U-Boot] [PATCH 12/14] spi: atmel: Drop non-dm code Jagan Teki
@ 2018-03-14 13:16 ` Jagan Teki
  2018-03-21  4:11   ` Wenyou Yang
  2018-04-06 20:29   ` [U-Boot] [U-Boot,13/14] " Tom Rini
  2018-03-14 13:16 ` [U-Boot] [PATCH 14/14] spi: atmel: default y if DM_SPI && ARCH_AT91 Jagan Teki
  2018-03-15  9:43 ` [U-Boot] [PATCH 00/14] at91: Add boards with OF_CONTROL/DM/DM_SPI Jagan Teki
  14 siblings, 2 replies; 37+ messages in thread
From: Jagan Teki @ 2018-03-14 13:16 UTC (permalink / raw)
  To: u-boot

atmel_spi.h has register offsets, and atmel_spi_slave
structure, move it into .c file for better readability
and drop atmel_spi.h

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
 drivers/spi/atmel_spi.c | 97 ++++++++++++++++++++++++++++++++++++++++++++-----
 drivers/spi/atmel_spi.h | 84 ------------------------------------------
 2 files changed, 88 insertions(+), 93 deletions(-)
 delete mode 100644 drivers/spi/atmel_spi.h

diff --git a/drivers/spi/atmel_spi.c b/drivers/spi/atmel_spi.c
index 122c6d107d..bb2262cc1f 100644
--- a/drivers/spi/atmel_spi.c
+++ b/drivers/spi/atmel_spi.c
@@ -22,11 +22,90 @@
 #include <asm/gpio.h>
 #endif
 
-#include "atmel_spi.h"
-
 DECLARE_GLOBAL_DATA_PTR;
 
-#define MAX_CS_COUNT	4
+/* Register offsets */
+#define ATMEL_SPI_CR			0x0000
+#define ATMEL_SPI_MR			0x0004
+#define ATMEL_SPI_RDR			0x0008
+#define ATMEL_SPI_TDR			0x000c
+#define ATMEL_SPI_SR			0x0010
+#define ATMEL_SPI_IER			0x0014
+#define ATMEL_SPI_IDR			0x0018
+#define ATMEL_SPI_IMR			0x001c
+#define ATMEL_SPI_CSR(x)		(0x0030 + 4 * (x))
+#define ATMEL_SPI_VERSION		0x00fc
+
+/* Bits in CR */
+#define ATMEL_SPI_CR_SPIEN		BIT(0)
+#define ATMEL_SPI_CR_SPIDIS		BIT(1)
+#define ATMEL_SPI_CR_SWRST		BIT(7)
+#define ATMEL_SPI_CR_LASTXFER		BIT(24)
+
+/* Bits in MR */
+#define ATMEL_SPI_MR_MSTR		BIT(0)
+#define ATMEL_SPI_MR_PS			BIT(1)
+#define ATMEL_SPI_MR_PCSDEC		BIT(2)
+#define ATMEL_SPI_MR_FDIV		BIT(3)
+#define ATMEL_SPI_MR_MODFDIS		BIT(4)
+#define ATMEL_SPI_MR_WDRBT		BIT(5)
+#define ATMEL_SPI_MR_LLB		BIT(7)
+#define ATMEL_SPI_MR_PCS(x)		(((x) & 15) << 16)
+#define ATMEL_SPI_MR_DLYBCS(x)		((x) << 24)
+
+/* Bits in RDR */
+#define ATMEL_SPI_RDR_RD(x)		(x)
+#define ATMEL_SPI_RDR_PCS(x)		((x) << 16)
+
+/* Bits in TDR */
+#define ATMEL_SPI_TDR_TD(x)		(x)
+#define ATMEL_SPI_TDR_PCS(x)		((x) << 16)
+#define ATMEL_SPI_TDR_LASTXFER		BIT(24)
+
+/* Bits in SR/IER/IDR/IMR */
+#define ATMEL_SPI_SR_RDRF		BIT(0)
+#define ATMEL_SPI_SR_TDRE		BIT(1)
+#define ATMEL_SPI_SR_MODF		BIT(2)
+#define ATMEL_SPI_SR_OVRES		BIT(3)
+#define ATMEL_SPI_SR_ENDRX		BIT(4)
+#define ATMEL_SPI_SR_ENDTX		BIT(5)
+#define ATMEL_SPI_SR_RXBUFF		BIT(6)
+#define ATMEL_SPI_SR_TXBUFE		BIT(7)
+#define ATMEL_SPI_SR_NSSR		BIT(8)
+#define ATMEL_SPI_SR_TXEMPTY		BIT(9)
+#define ATMEL_SPI_SR_SPIENS		BIT(16)
+
+/* Bits in CSRx */
+#define ATMEL_SPI_CSR_CPOL		BIT(0)
+#define ATMEL_SPI_CSR_NCPHA		BIT(1)
+#define ATMEL_SPI_CSR_CSAAT		BIT(3)
+#define ATMEL_SPI_CSR_BITS(x)		((x) << 4)
+#define ATMEL_SPI_CSR_SCBR(x)		((x) << 8)
+#define ATMEL_SPI_CSR_SCBR_MAX		GENMASK(7, 0)
+#define ATMEL_SPI_CSR_DLYBS(x)		((x) << 16)
+#define ATMEL_SPI_CSR_DLYBCT(x)		((x) << 24)
+
+/* Bits in VERSION */
+#define ATMEL_SPI_VERSION_REV(x)	((x) & 0xfff)
+#define ATMEL_SPI_VERSION_MFN(x)	((x) << 16)
+
+/* Constants for CSRx:BITS */
+#define ATMEL_SPI_BITS_8		0
+#define ATMEL_SPI_BITS_9		1
+#define ATMEL_SPI_BITS_10		2
+#define ATMEL_SPI_BITS_11		3
+#define ATMEL_SPI_BITS_12		4
+#define ATMEL_SPI_BITS_13		5
+#define ATMEL_SPI_BITS_14		6
+#define ATMEL_SPI_BITS_15		7
+#define ATMEL_SPI_BITS_16		8
+
+#define MAX_CS_COUNT			4
+
+struct atmel_spi_slave {
+	void		*regs;
+	u32		mr;
+};
 
 struct atmel_spi_platdata {
 	struct at91_spi *regs;
@@ -53,19 +132,19 @@ static int atmel_spi_claim_bus(struct udevice *dev)
 	u32 scbr, csrx, mode;
 
 	scbr = (priv->bus_clk_rate + freq - 1) / freq;
-	if (scbr > ATMEL_SPI_CSRx_SCBR_MAX)
+	if (scbr > ATMEL_SPI_CSR_SCBR_MAX)
 		return -EINVAL;
 
 	if (scbr < 1)
 		scbr = 1;
 
-	csrx = ATMEL_SPI_CSRx_SCBR(scbr);
-	csrx |= ATMEL_SPI_CSRx_BITS(ATMEL_SPI_BITS_8);
+	csrx = ATMEL_SPI_CSR_SCBR(scbr);
+	csrx |= ATMEL_SPI_CSR_BITS(ATMEL_SPI_BITS_8);
 
 	if (!(priv->mode & SPI_CPHA))
-		csrx |= ATMEL_SPI_CSRx_NCPHA;
+		csrx |= ATMEL_SPI_CSR_NCPHA;
 	if (priv->mode & SPI_CPOL)
-		csrx |= ATMEL_SPI_CSRx_CPOL;
+		csrx |= ATMEL_SPI_CSR_CPOL;
 
 	writel(csrx, &reg_base->csr[cs]);
 
@@ -287,7 +366,7 @@ static int atmel_spi_probe(struct udevice *bus)
 		return ret;
 	}
 
-	for(i = 0; i < ARRAY_SIZE(priv->cs_gpios); i++) {
+	for (i = 0; i < ARRAY_SIZE(priv->cs_gpios); i++) {
 		if (!dm_gpio_is_valid(&priv->cs_gpios[i]))
 			continue;
 
diff --git a/drivers/spi/atmel_spi.h b/drivers/spi/atmel_spi.h
deleted file mode 100644
index 685eeed99e..0000000000
--- a/drivers/spi/atmel_spi.h
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Register definitions for the Atmel AT32/AT91 SPI Controller
- */
-
-/* Register offsets */
-#define ATMEL_SPI_CR			0x0000
-#define ATMEL_SPI_MR			0x0004
-#define ATMEL_SPI_RDR			0x0008
-#define ATMEL_SPI_TDR			0x000c
-#define ATMEL_SPI_SR			0x0010
-#define ATMEL_SPI_IER			0x0014
-#define ATMEL_SPI_IDR			0x0018
-#define ATMEL_SPI_IMR			0x001c
-#define ATMEL_SPI_CSR(x)		(0x0030 + 4 * (x))
-#define ATMEL_SPI_VERSION		0x00fc
-
-/* Bits in CR */
-#define ATMEL_SPI_CR_SPIEN		BIT(0)
-#define ATMEL_SPI_CR_SPIDIS		BIT(1)
-#define ATMEL_SPI_CR_SWRST		BIT(7)
-#define ATMEL_SPI_CR_LASTXFER		BIT(24)
-
-/* Bits in MR */
-#define ATMEL_SPI_MR_MSTR		BIT(0)
-#define ATMEL_SPI_MR_PS			BIT(1)
-#define ATMEL_SPI_MR_PCSDEC		BIT(2)
-#define ATMEL_SPI_MR_FDIV		BIT(3)
-#define ATMEL_SPI_MR_MODFDIS		BIT(4)
-#define ATMEL_SPI_MR_WDRBT		BIT(5)
-#define ATMEL_SPI_MR_LLB		BIT(7)
-#define ATMEL_SPI_MR_PCS(x)		(((x) & 15) << 16)
-#define ATMEL_SPI_MR_DLYBCS(x)		((x) << 24)
-
-/* Bits in RDR */
-#define ATMEL_SPI_RDR_RD(x)		(x)
-#define ATMEL_SPI_RDR_PCS(x)		((x) << 16)
-
-/* Bits in TDR */
-#define ATMEL_SPI_TDR_TD(x)		(x)
-#define ATMEL_SPI_TDR_PCS(x)		((x) << 16)
-#define ATMEL_SPI_TDR_LASTXFER		BIT(24)
-
-/* Bits in SR/IER/IDR/IMR */
-#define ATMEL_SPI_SR_RDRF		BIT(0)
-#define ATMEL_SPI_SR_TDRE		BIT(1)
-#define ATMEL_SPI_SR_MODF		BIT(2)
-#define ATMEL_SPI_SR_OVRES		BIT(3)
-#define ATMEL_SPI_SR_ENDRX		BIT(4)
-#define ATMEL_SPI_SR_ENDTX		BIT(5)
-#define ATMEL_SPI_SR_RXBUFF		BIT(6)
-#define ATMEL_SPI_SR_TXBUFE		BIT(7)
-#define ATMEL_SPI_SR_NSSR		BIT(8)
-#define ATMEL_SPI_SR_TXEMPTY		BIT(9)
-#define ATMEL_SPI_SR_SPIENS		BIT(16)
-
-/* Bits in CSRx */
-#define ATMEL_SPI_CSRx_CPOL		BIT(0)
-#define ATMEL_SPI_CSRx_NCPHA		BIT(1)
-#define ATMEL_SPI_CSRx_CSAAT		BIT(3)
-#define ATMEL_SPI_CSRx_BITS(x)		((x) << 4)
-#define ATMEL_SPI_CSRx_SCBR(x)		((x) << 8)
-#define ATMEL_SPI_CSRx_SCBR_MAX		GENMASK(7, 0)
-#define ATMEL_SPI_CSRx_DLYBS(x)		((x) << 16)
-#define ATMEL_SPI_CSRx_DLYBCT(x)	((x) << 24)
-
-/* Bits in VERSION */
-#define ATMEL_SPI_VERSION_REV(x)	((x) & 0xfff)
-#define ATMEL_SPI_VERSION_MFN(x)	((x) << 16)
-
-/* Constants for CSRx:BITS */
-#define ATMEL_SPI_BITS_8		0
-#define ATMEL_SPI_BITS_9		1
-#define ATMEL_SPI_BITS_10		2
-#define ATMEL_SPI_BITS_11		3
-#define ATMEL_SPI_BITS_12		4
-#define ATMEL_SPI_BITS_13		5
-#define ATMEL_SPI_BITS_14		6
-#define ATMEL_SPI_BITS_15		7
-#define ATMEL_SPI_BITS_16		8
-
-struct atmel_spi_slave {
-	void		*regs;
-	u32		mr;
-};
-- 
2.14.3

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [U-Boot] [PATCH 14/14] spi: atmel: default y if DM_SPI && ARCH_AT91
  2018-03-14 13:16 [U-Boot] [PATCH 00/14] at91: Add boards with OF_CONTROL/DM/DM_SPI Jagan Teki
                   ` (12 preceding siblings ...)
  2018-03-14 13:16 ` [U-Boot] [PATCH 13/14] spi: atmel: Drop atmel_spi.h Jagan Teki
@ 2018-03-14 13:16 ` Jagan Teki
  2018-03-21  4:13   ` Wenyou Yang
  2018-04-06 20:29   ` [U-Boot] [U-Boot, " Tom Rini
  2018-03-15  9:43 ` [U-Boot] [PATCH 00/14] at91: Add boards with OF_CONTROL/DM/DM_SPI Jagan Teki
  14 siblings, 2 replies; 37+ messages in thread
From: Jagan Teki @ 2018-03-14 13:16 UTC (permalink / raw)
  To: u-boot

ATMEL_SPI is now fully converted to driver-model and
respective boards switch to DM_SPI as well,
so make default y for ARCH_AT91

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
 configs/at91sam9260ek_dataflash_cs0_defconfig  | 1 -
 configs/at91sam9260ek_dataflash_cs1_defconfig  | 1 -
 configs/at91sam9260ek_nandflash_defconfig      | 1 -
 configs/at91sam9261ek_dataflash_cs0_defconfig  | 1 -
 configs/at91sam9261ek_dataflash_cs3_defconfig  | 1 -
 configs/at91sam9261ek_nandflash_defconfig      | 1 -
 configs/at91sam9263ek_dataflash_cs0_defconfig  | 1 -
 configs/at91sam9263ek_dataflash_defconfig      | 1 -
 configs/at91sam9263ek_nandflash_defconfig      | 1 -
 configs/at91sam9263ek_norflash_boot_defconfig  | 1 -
 configs/at91sam9263ek_norflash_defconfig       | 1 -
 configs/at91sam9g10ek_dataflash_cs0_defconfig  | 1 -
 configs/at91sam9g10ek_dataflash_cs3_defconfig  | 1 -
 configs/at91sam9g10ek_nandflash_defconfig      | 1 -
 configs/at91sam9g20ek_2mmc_defconfig           | 1 -
 configs/at91sam9g20ek_2mmc_nandflash_defconfig | 1 -
 configs/at91sam9g20ek_dataflash_cs0_defconfig  | 1 -
 configs/at91sam9g20ek_dataflash_cs1_defconfig  | 1 -
 configs/at91sam9g20ek_nandflash_defconfig      | 1 -
 configs/at91sam9n12ek_mmc_defconfig            | 1 -
 configs/at91sam9n12ek_nandflash_defconfig      | 1 -
 configs/at91sam9n12ek_spiflash_defconfig       | 1 -
 configs/at91sam9rlek_dataflash_defconfig       | 1 -
 configs/at91sam9rlek_mmc_defconfig             | 1 -
 configs/at91sam9rlek_nandflash_defconfig       | 1 -
 configs/at91sam9x5ek_dataflash_defconfig       | 1 -
 configs/at91sam9x5ek_mmc_defconfig             | 1 -
 configs/at91sam9x5ek_nandflash_defconfig       | 1 -
 configs/at91sam9x5ek_spiflash_defconfig        | 1 -
 configs/at91sam9xeek_dataflash_cs0_defconfig   | 1 -
 configs/at91sam9xeek_dataflash_cs1_defconfig   | 1 -
 configs/at91sam9xeek_nandflash_defconfig       | 1 -
 configs/ethernut5_defconfig                    | 1 -
 configs/gurnard_defconfig                      | 1 -
 configs/meesc_dataflash_defconfig              | 1 -
 configs/meesc_defconfig                        | 1 -
 configs/pm9261_defconfig                       | 1 -
 configs/pm9263_defconfig                       | 1 -
 configs/sama5d27_som1_ek_mmc_defconfig         | 1 -
 configs/sama5d2_xplained_mmc_defconfig         | 1 -
 configs/sama5d2_xplained_spiflash_defconfig    | 1 -
 configs/sama5d36ek_cmp_mmc_defconfig           | 1 -
 configs/sama5d36ek_cmp_nandflash_defconfig     | 1 -
 configs/sama5d36ek_cmp_spiflash_defconfig      | 1 -
 configs/sama5d3xek_mmc_defconfig               | 1 -
 configs/sama5d3xek_nandflash_defconfig         | 1 -
 configs/sama5d3xek_spiflash_defconfig          | 1 -
 configs/sama5d4_xplained_mmc_defconfig         | 1 -
 configs/sama5d4_xplained_nandflash_defconfig   | 1 -
 configs/sama5d4_xplained_spiflash_defconfig    | 1 -
 configs/sama5d4ek_mmc_defconfig                | 1 -
 configs/sama5d4ek_nandflash_defconfig          | 1 -
 configs/sama5d4ek_spiflash_defconfig           | 1 -
 configs/usb_a9263_dataflash_defconfig          | 1 -
 drivers/spi/Kconfig                            | 2 +-
 include/configs/ma5d4evk.h                     | 1 -
 include/configs/taurus.h                       | 1 -
 include/configs/vinco.h                        | 1 -
 58 files changed, 1 insertion(+), 58 deletions(-)

diff --git a/configs/at91sam9260ek_dataflash_cs0_defconfig b/configs/at91sam9260ek_dataflash_cs0_defconfig
index b41fe5b5fe..ae2293db3e 100644
--- a/configs/at91sam9260ek_dataflash_cs0_defconfig
+++ b/configs/at91sam9260ek_dataflash_cs0_defconfig
@@ -50,7 +50,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
 CONFIG_TIMER=y
 CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_USB=y
diff --git a/configs/at91sam9260ek_dataflash_cs1_defconfig b/configs/at91sam9260ek_dataflash_cs1_defconfig
index a30a4f6f73..93f76126a6 100644
--- a/configs/at91sam9260ek_dataflash_cs1_defconfig
+++ b/configs/at91sam9260ek_dataflash_cs1_defconfig
@@ -50,7 +50,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
 CONFIG_TIMER=y
 CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_USB=y
diff --git a/configs/at91sam9260ek_nandflash_defconfig b/configs/at91sam9260ek_nandflash_defconfig
index 58a3431019..f7585d0565 100644
--- a/configs/at91sam9260ek_nandflash_defconfig
+++ b/configs/at91sam9260ek_nandflash_defconfig
@@ -50,7 +50,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
 CONFIG_TIMER=y
 CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_USB=y
diff --git a/configs/at91sam9261ek_dataflash_cs0_defconfig b/configs/at91sam9261ek_dataflash_cs0_defconfig
index 575e217f3a..bf06d32f55 100644
--- a/configs/at91sam9261ek_dataflash_cs0_defconfig
+++ b/configs/at91sam9261ek_dataflash_cs0_defconfig
@@ -49,7 +49,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
 CONFIG_TIMER=y
 CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_USB=y
diff --git a/configs/at91sam9261ek_dataflash_cs3_defconfig b/configs/at91sam9261ek_dataflash_cs3_defconfig
index 7be7becb1f..ad7791ac45 100644
--- a/configs/at91sam9261ek_dataflash_cs3_defconfig
+++ b/configs/at91sam9261ek_dataflash_cs3_defconfig
@@ -49,7 +49,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
 CONFIG_TIMER=y
 CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_USB=y
diff --git a/configs/at91sam9261ek_nandflash_defconfig b/configs/at91sam9261ek_nandflash_defconfig
index 353dc0dc7f..079c6955b0 100644
--- a/configs/at91sam9261ek_nandflash_defconfig
+++ b/configs/at91sam9261ek_nandflash_defconfig
@@ -49,7 +49,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
 CONFIG_TIMER=y
 CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_USB=y
diff --git a/configs/at91sam9263ek_dataflash_cs0_defconfig b/configs/at91sam9263ek_dataflash_cs0_defconfig
index 418bbfc9e1..06390dce6b 100644
--- a/configs/at91sam9263ek_dataflash_cs0_defconfig
+++ b/configs/at91sam9263ek_dataflash_cs0_defconfig
@@ -55,7 +55,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
 CONFIG_TIMER=y
 CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_USB=y
diff --git a/configs/at91sam9263ek_dataflash_defconfig b/configs/at91sam9263ek_dataflash_defconfig
index 418bbfc9e1..06390dce6b 100644
--- a/configs/at91sam9263ek_dataflash_defconfig
+++ b/configs/at91sam9263ek_dataflash_defconfig
@@ -55,7 +55,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
 CONFIG_TIMER=y
 CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_USB=y
diff --git a/configs/at91sam9263ek_nandflash_defconfig b/configs/at91sam9263ek_nandflash_defconfig
index 1b3ef9b47c..5c3959e24b 100644
--- a/configs/at91sam9263ek_nandflash_defconfig
+++ b/configs/at91sam9263ek_nandflash_defconfig
@@ -55,7 +55,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
 CONFIG_TIMER=y
 CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_USB=y
diff --git a/configs/at91sam9263ek_norflash_boot_defconfig b/configs/at91sam9263ek_norflash_boot_defconfig
index 39abe2db76..a26da0064a 100644
--- a/configs/at91sam9263ek_norflash_boot_defconfig
+++ b/configs/at91sam9263ek_norflash_boot_defconfig
@@ -54,7 +54,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
 CONFIG_TIMER=y
 CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_USB=y
diff --git a/configs/at91sam9263ek_norflash_defconfig b/configs/at91sam9263ek_norflash_defconfig
index 04267354ff..4f08450384 100644
--- a/configs/at91sam9263ek_norflash_defconfig
+++ b/configs/at91sam9263ek_norflash_defconfig
@@ -54,7 +54,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
 CONFIG_TIMER=y
 CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_USB=y
diff --git a/configs/at91sam9g10ek_dataflash_cs0_defconfig b/configs/at91sam9g10ek_dataflash_cs0_defconfig
index 2382b25cf3..c6cc752728 100644
--- a/configs/at91sam9g10ek_dataflash_cs0_defconfig
+++ b/configs/at91sam9g10ek_dataflash_cs0_defconfig
@@ -49,7 +49,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
 CONFIG_USB=y
 CONFIG_USB_STORAGE=y
 CONFIG_LCD=y
diff --git a/configs/at91sam9g10ek_dataflash_cs3_defconfig b/configs/at91sam9g10ek_dataflash_cs3_defconfig
index 531dde84a4..81b291efab 100644
--- a/configs/at91sam9g10ek_dataflash_cs3_defconfig
+++ b/configs/at91sam9g10ek_dataflash_cs3_defconfig
@@ -49,7 +49,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
 CONFIG_USB=y
 CONFIG_USB_STORAGE=y
 CONFIG_LCD=y
diff --git a/configs/at91sam9g10ek_nandflash_defconfig b/configs/at91sam9g10ek_nandflash_defconfig
index 4973519da6..9a539315bd 100644
--- a/configs/at91sam9g10ek_nandflash_defconfig
+++ b/configs/at91sam9g10ek_nandflash_defconfig
@@ -49,7 +49,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
 CONFIG_USB=y
 CONFIG_USB_STORAGE=y
 CONFIG_LCD=y
diff --git a/configs/at91sam9g20ek_2mmc_defconfig b/configs/at91sam9g20ek_2mmc_defconfig
index c9ef79b6ff..5f8824ca42 100644
--- a/configs/at91sam9g20ek_2mmc_defconfig
+++ b/configs/at91sam9g20ek_2mmc_defconfig
@@ -52,7 +52,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
 CONFIG_TIMER=y
 CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_USB=y
diff --git a/configs/at91sam9g20ek_2mmc_nandflash_defconfig b/configs/at91sam9g20ek_2mmc_nandflash_defconfig
index 982ddfd9e7..324f3acf57 100644
--- a/configs/at91sam9g20ek_2mmc_nandflash_defconfig
+++ b/configs/at91sam9g20ek_2mmc_nandflash_defconfig
@@ -52,7 +52,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
 CONFIG_TIMER=y
 CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_USB=y
diff --git a/configs/at91sam9g20ek_dataflash_cs0_defconfig b/configs/at91sam9g20ek_dataflash_cs0_defconfig
index 36bb9905f4..25bd456e65 100644
--- a/configs/at91sam9g20ek_dataflash_cs0_defconfig
+++ b/configs/at91sam9g20ek_dataflash_cs0_defconfig
@@ -50,7 +50,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
 CONFIG_TIMER=y
 CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_USB=y
diff --git a/configs/at91sam9g20ek_dataflash_cs1_defconfig b/configs/at91sam9g20ek_dataflash_cs1_defconfig
index de6d39d703..c8cb0af1a4 100644
--- a/configs/at91sam9g20ek_dataflash_cs1_defconfig
+++ b/configs/at91sam9g20ek_dataflash_cs1_defconfig
@@ -50,7 +50,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
 CONFIG_TIMER=y
 CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_USB=y
diff --git a/configs/at91sam9g20ek_nandflash_defconfig b/configs/at91sam9g20ek_nandflash_defconfig
index f8d9107025..b4ddf9cdd0 100644
--- a/configs/at91sam9g20ek_nandflash_defconfig
+++ b/configs/at91sam9g20ek_nandflash_defconfig
@@ -50,7 +50,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
 CONFIG_TIMER=y
 CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_USB=y
diff --git a/configs/at91sam9n12ek_mmc_defconfig b/configs/at91sam9n12ek_mmc_defconfig
index f1fc70b41e..a253d448e5 100644
--- a/configs/at91sam9n12ek_mmc_defconfig
+++ b/configs/at91sam9n12ek_mmc_defconfig
@@ -51,7 +51,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
 CONFIG_TIMER=y
 CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_USB=y
diff --git a/configs/at91sam9n12ek_nandflash_defconfig b/configs/at91sam9n12ek_nandflash_defconfig
index 966d54475f..dc9514592e 100644
--- a/configs/at91sam9n12ek_nandflash_defconfig
+++ b/configs/at91sam9n12ek_nandflash_defconfig
@@ -51,7 +51,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
 CONFIG_TIMER=y
 CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_USB=y
diff --git a/configs/at91sam9n12ek_spiflash_defconfig b/configs/at91sam9n12ek_spiflash_defconfig
index 634e3de83c..acd4a89e2c 100644
--- a/configs/at91sam9n12ek_spiflash_defconfig
+++ b/configs/at91sam9n12ek_spiflash_defconfig
@@ -51,7 +51,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
 CONFIG_TIMER=y
 CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_USB=y
diff --git a/configs/at91sam9rlek_dataflash_defconfig b/configs/at91sam9rlek_dataflash_defconfig
index e80d43c79d..7f3fd4d2f0 100644
--- a/configs/at91sam9rlek_dataflash_defconfig
+++ b/configs/at91sam9rlek_dataflash_defconfig
@@ -48,7 +48,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
 CONFIG_TIMER=y
 CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_LCD=y
diff --git a/configs/at91sam9rlek_mmc_defconfig b/configs/at91sam9rlek_mmc_defconfig
index b18f2d42b0..84c9fa597f 100644
--- a/configs/at91sam9rlek_mmc_defconfig
+++ b/configs/at91sam9rlek_mmc_defconfig
@@ -48,7 +48,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
 CONFIG_TIMER=y
 CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_LCD=y
diff --git a/configs/at91sam9rlek_nandflash_defconfig b/configs/at91sam9rlek_nandflash_defconfig
index 5e8c97d6f7..21b19587af 100644
--- a/configs/at91sam9rlek_nandflash_defconfig
+++ b/configs/at91sam9rlek_nandflash_defconfig
@@ -48,7 +48,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
 CONFIG_TIMER=y
 CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_LCD=y
diff --git a/configs/at91sam9x5ek_dataflash_defconfig b/configs/at91sam9x5ek_dataflash_defconfig
index b4b25022ab..069cd2a6ae 100644
--- a/configs/at91sam9x5ek_dataflash_defconfig
+++ b/configs/at91sam9x5ek_dataflash_defconfig
@@ -54,7 +54,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
 CONFIG_TIMER=y
 CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_USB=y
diff --git a/configs/at91sam9x5ek_mmc_defconfig b/configs/at91sam9x5ek_mmc_defconfig
index c8c027e94b..b7e050feb1 100644
--- a/configs/at91sam9x5ek_mmc_defconfig
+++ b/configs/at91sam9x5ek_mmc_defconfig
@@ -54,7 +54,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
 CONFIG_TIMER=y
 CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_USB=y
diff --git a/configs/at91sam9x5ek_nandflash_defconfig b/configs/at91sam9x5ek_nandflash_defconfig
index 1fb3ff4f4e..3ad4729160 100644
--- a/configs/at91sam9x5ek_nandflash_defconfig
+++ b/configs/at91sam9x5ek_nandflash_defconfig
@@ -54,7 +54,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
 CONFIG_TIMER=y
 CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_USB=y
diff --git a/configs/at91sam9x5ek_spiflash_defconfig b/configs/at91sam9x5ek_spiflash_defconfig
index 6848bccf29..fa400c898a 100644
--- a/configs/at91sam9x5ek_spiflash_defconfig
+++ b/configs/at91sam9x5ek_spiflash_defconfig
@@ -54,7 +54,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
 CONFIG_TIMER=y
 CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_USB=y
diff --git a/configs/at91sam9xeek_dataflash_cs0_defconfig b/configs/at91sam9xeek_dataflash_cs0_defconfig
index c935a0ce7c..216ef83d94 100644
--- a/configs/at91sam9xeek_dataflash_cs0_defconfig
+++ b/configs/at91sam9xeek_dataflash_cs0_defconfig
@@ -50,7 +50,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
 CONFIG_TIMER=y
 CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_USB=y
diff --git a/configs/at91sam9xeek_dataflash_cs1_defconfig b/configs/at91sam9xeek_dataflash_cs1_defconfig
index db34a9247f..42ff46ca5c 100644
--- a/configs/at91sam9xeek_dataflash_cs1_defconfig
+++ b/configs/at91sam9xeek_dataflash_cs1_defconfig
@@ -50,7 +50,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
 CONFIG_TIMER=y
 CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_USB=y
diff --git a/configs/at91sam9xeek_nandflash_defconfig b/configs/at91sam9xeek_nandflash_defconfig
index 179ab02e26..0e2b544b08 100644
--- a/configs/at91sam9xeek_nandflash_defconfig
+++ b/configs/at91sam9xeek_nandflash_defconfig
@@ -50,7 +50,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
 CONFIG_TIMER=y
 CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_USB=y
diff --git a/configs/ethernut5_defconfig b/configs/ethernut5_defconfig
index 888bed9b00..80ca4acfd7 100644
--- a/configs/ethernut5_defconfig
+++ b/configs/ethernut5_defconfig
@@ -61,6 +61,5 @@ CONFIG_PINCTRL_AT91=y
 CONFIG_DM_SERIAL=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
 CONFIG_USB=y
 CONFIG_USB_STORAGE=y
diff --git a/configs/gurnard_defconfig b/configs/gurnard_defconfig
index ce51a0348f..95ccbdefea 100644
--- a/configs/gurnard_defconfig
+++ b/configs/gurnard_defconfig
@@ -27,7 +27,6 @@ CONFIG_ENV_IS_IN_NAND=y
 CONFIG_BOOTP_BOOTPATH=y
 CONFIG_BOOTP_GATEWAY=y
 CONFIG_BOOTP_HOSTNAME=y
-CONFIG_ATMEL_SPI=y
 CONFIG_PHYLIB=y
 CONFIG_TIMER=y
 CONFIG_ATMEL_PIT_TIMER=y
diff --git a/configs/meesc_dataflash_defconfig b/configs/meesc_dataflash_defconfig
index f4b20fbf6a..4aa9602900 100644
--- a/configs/meesc_dataflash_defconfig
+++ b/configs/meesc_dataflash_defconfig
@@ -36,4 +36,3 @@ CONFIG_PINCTRL_AT91=y
 CONFIG_DM_SERIAL=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
diff --git a/configs/meesc_defconfig b/configs/meesc_defconfig
index e1e549693b..9d38247221 100644
--- a/configs/meesc_defconfig
+++ b/configs/meesc_defconfig
@@ -37,4 +37,3 @@ CONFIG_PINCTRL_AT91=y
 CONFIG_DM_SERIAL=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
diff --git a/configs/pm9261_defconfig b/configs/pm9261_defconfig
index 9570438aba..cd11aec4f5 100644
--- a/configs/pm9261_defconfig
+++ b/configs/pm9261_defconfig
@@ -47,7 +47,6 @@ CONFIG_PINCTRL_AT91=y
 CONFIG_DM_SERIAL=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
 CONFIG_USB=y
 CONFIG_USB_STORAGE=y
 CONFIG_LCD=y
diff --git a/configs/pm9263_defconfig b/configs/pm9263_defconfig
index 38102dcb0d..7d9b3d235c 100644
--- a/configs/pm9263_defconfig
+++ b/configs/pm9263_defconfig
@@ -45,7 +45,6 @@ CONFIG_SPI_FLASH_DATAFLASH=y
 CONFIG_DM_SERIAL=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
 CONFIG_USB=y
 CONFIG_USB_STORAGE=y
 CONFIG_LCD=y
diff --git a/configs/sama5d27_som1_ek_mmc_defconfig b/configs/sama5d27_som1_ek_mmc_defconfig
index b90a10c7d3..f0cbba06e8 100644
--- a/configs/sama5d27_som1_ek_mmc_defconfig
+++ b/configs/sama5d27_som1_ek_mmc_defconfig
@@ -77,7 +77,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
 CONFIG_TIMER=y
 CONFIG_SPL_TIMER=y
 CONFIG_ATMEL_PIT_TIMER=y
diff --git a/configs/sama5d2_xplained_mmc_defconfig b/configs/sama5d2_xplained_mmc_defconfig
index e112c31532..a6aa683e6a 100644
--- a/configs/sama5d2_xplained_mmc_defconfig
+++ b/configs/sama5d2_xplained_mmc_defconfig
@@ -75,7 +75,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
 CONFIG_TIMER=y
 CONFIG_SPL_TIMER=y
 CONFIG_ATMEL_PIT_TIMER=y
diff --git a/configs/sama5d2_xplained_spiflash_defconfig b/configs/sama5d2_xplained_spiflash_defconfig
index 232b6bfc6a..c9e0a2746e 100644
--- a/configs/sama5d2_xplained_spiflash_defconfig
+++ b/configs/sama5d2_xplained_spiflash_defconfig
@@ -72,7 +72,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
 CONFIG_TIMER=y
 CONFIG_SPL_TIMER=y
 CONFIG_ATMEL_PIT_TIMER=y
diff --git a/configs/sama5d36ek_cmp_mmc_defconfig b/configs/sama5d36ek_cmp_mmc_defconfig
index 5377f6da49..186f9f4bdb 100644
--- a/configs/sama5d36ek_cmp_mmc_defconfig
+++ b/configs/sama5d36ek_cmp_mmc_defconfig
@@ -54,7 +54,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
 CONFIG_TIMER=y
 CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_DM_VIDEO=y
diff --git a/configs/sama5d36ek_cmp_nandflash_defconfig b/configs/sama5d36ek_cmp_nandflash_defconfig
index be75fb35b1..83bea11571 100644
--- a/configs/sama5d36ek_cmp_nandflash_defconfig
+++ b/configs/sama5d36ek_cmp_nandflash_defconfig
@@ -54,7 +54,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
 CONFIG_TIMER=y
 CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_DM_VIDEO=y
diff --git a/configs/sama5d36ek_cmp_spiflash_defconfig b/configs/sama5d36ek_cmp_spiflash_defconfig
index fd9bf0c549..4d3b83c4f8 100644
--- a/configs/sama5d36ek_cmp_spiflash_defconfig
+++ b/configs/sama5d36ek_cmp_spiflash_defconfig
@@ -54,7 +54,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
 CONFIG_TIMER=y
 CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_DM_VIDEO=y
diff --git a/configs/sama5d3xek_mmc_defconfig b/configs/sama5d3xek_mmc_defconfig
index f9aff19e0c..e643eb39e6 100644
--- a/configs/sama5d3xek_mmc_defconfig
+++ b/configs/sama5d3xek_mmc_defconfig
@@ -76,7 +76,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
 CONFIG_TIMER=y
 CONFIG_SPL_TIMER=y
 CONFIG_ATMEL_PIT_TIMER=y
diff --git a/configs/sama5d3xek_nandflash_defconfig b/configs/sama5d3xek_nandflash_defconfig
index 49b229ca08..775fbb51d9 100644
--- a/configs/sama5d3xek_nandflash_defconfig
+++ b/configs/sama5d3xek_nandflash_defconfig
@@ -71,7 +71,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
 CONFIG_TIMER=y
 CONFIG_SPL_TIMER=y
 CONFIG_ATMEL_PIT_TIMER=y
diff --git a/configs/sama5d3xek_spiflash_defconfig b/configs/sama5d3xek_spiflash_defconfig
index 607e997f79..1f0dbc3c22 100644
--- a/configs/sama5d3xek_spiflash_defconfig
+++ b/configs/sama5d3xek_spiflash_defconfig
@@ -70,7 +70,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
 CONFIG_TIMER=y
 CONFIG_SPL_TIMER=y
 CONFIG_ATMEL_PIT_TIMER=y
diff --git a/configs/sama5d4_xplained_mmc_defconfig b/configs/sama5d4_xplained_mmc_defconfig
index e850a2dd43..ece2b449c6 100644
--- a/configs/sama5d4_xplained_mmc_defconfig
+++ b/configs/sama5d4_xplained_mmc_defconfig
@@ -71,7 +71,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
 CONFIG_TIMER=y
 CONFIG_SPL_TIMER=y
 CONFIG_ATMEL_PIT_TIMER=y
diff --git a/configs/sama5d4_xplained_nandflash_defconfig b/configs/sama5d4_xplained_nandflash_defconfig
index 9c8eedfbaa..b9a4930680 100644
--- a/configs/sama5d4_xplained_nandflash_defconfig
+++ b/configs/sama5d4_xplained_nandflash_defconfig
@@ -68,7 +68,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
 CONFIG_TIMER=y
 CONFIG_SPL_TIMER=y
 CONFIG_ATMEL_PIT_TIMER=y
diff --git a/configs/sama5d4_xplained_spiflash_defconfig b/configs/sama5d4_xplained_spiflash_defconfig
index a2411abe7d..e96bc73dfb 100644
--- a/configs/sama5d4_xplained_spiflash_defconfig
+++ b/configs/sama5d4_xplained_spiflash_defconfig
@@ -70,7 +70,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
 CONFIG_TIMER=y
 CONFIG_SPL_TIMER=y
 CONFIG_ATMEL_PIT_TIMER=y
diff --git a/configs/sama5d4ek_mmc_defconfig b/configs/sama5d4ek_mmc_defconfig
index 12b73138c0..7dc1a7ae35 100644
--- a/configs/sama5d4ek_mmc_defconfig
+++ b/configs/sama5d4ek_mmc_defconfig
@@ -71,7 +71,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
 CONFIG_TIMER=y
 CONFIG_SPL_TIMER=y
 CONFIG_ATMEL_PIT_TIMER=y
diff --git a/configs/sama5d4ek_nandflash_defconfig b/configs/sama5d4ek_nandflash_defconfig
index ed24e1724a..8e845586a2 100644
--- a/configs/sama5d4ek_nandflash_defconfig
+++ b/configs/sama5d4ek_nandflash_defconfig
@@ -68,7 +68,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
 CONFIG_TIMER=y
 CONFIG_SPL_TIMER=y
 CONFIG_ATMEL_PIT_TIMER=y
diff --git a/configs/sama5d4ek_spiflash_defconfig b/configs/sama5d4ek_spiflash_defconfig
index 9e63c4fb25..e533fd6ef2 100644
--- a/configs/sama5d4ek_spiflash_defconfig
+++ b/configs/sama5d4ek_spiflash_defconfig
@@ -67,7 +67,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
 CONFIG_TIMER=y
 CONFIG_SPL_TIMER=y
 CONFIG_ATMEL_PIT_TIMER=y
diff --git a/configs/usb_a9263_dataflash_defconfig b/configs/usb_a9263_dataflash_defconfig
index fc0ed319f2..ac3f3e2e58 100644
--- a/configs/usb_a9263_dataflash_defconfig
+++ b/configs/usb_a9263_dataflash_defconfig
@@ -42,4 +42,3 @@ CONFIG_PINCTRL_AT91=y
 CONFIG_DM_SERIAL=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig
index a3b4a0b2f0..12dde8fb95 100644
--- a/drivers/spi/Kconfig
+++ b/drivers/spi/Kconfig
@@ -41,7 +41,7 @@ config ATH79_SPI
 
 config ATMEL_SPI
 	bool "Atmel SPI driver"
-	depends on ARCH_AT91
+	default y if ARCH_AT91
 	help
 	  This enables driver for the Atmel SPI Controller, present on
 	  many AT91 (ARM) chips. This driver can be used to access
diff --git a/include/configs/ma5d4evk.h b/include/configs/ma5d4evk.h
index 4cba7580a2..68fe3bd67f 100644
--- a/include/configs/ma5d4evk.h
+++ b/include/configs/ma5d4evk.h
@@ -86,7 +86,6 @@
  * SPI NOR (boot memory)
  */
 #ifdef CONFIG_CMD_SF
-#define CONFIG_ATMEL_SPI
 #define CONFIG_SPI_FLASH_ATMEL
 #define CONFIG_SF_DEFAULT_BUS		0
 #define CONFIG_SF_DEFAULT_CS		0
diff --git a/include/configs/taurus.h b/include/configs/taurus.h
index 51e3987ab3..f138bd2238 100644
--- a/include/configs/taurus.h
+++ b/include/configs/taurus.h
@@ -118,7 +118,6 @@
 
 /* SPI EEPROM */
 #define CONFIG_SPI
-#define CONFIG_ATMEL_SPI
 #define TAURUS_SPI_MASK (1 << 4)
 #define TAURUS_SPI_CS_PIN	AT91_PIN_PA3
 
diff --git a/include/configs/vinco.h b/include/configs/vinco.h
index 3ae7e9e75b..d1b56ac037 100644
--- a/include/configs/vinco.h
+++ b/include/configs/vinco.h
@@ -38,7 +38,6 @@
 /* SerialFlash */
 
 #ifdef CONFIG_CMD_SF
-#define CONFIG_ATMEL_SPI
 #define CONFIG_SPI_FLASH_STMICRO
 #define CONFIG_SF_DEFAULT_BUS		0
 #define CONFIG_SF_DEFAULT_CS		0
-- 
2.14.3

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [U-Boot] [PATCH 00/14] at91: Add boards with OF_CONTROL/DM/DM_SPI
  2018-03-14 13:16 [U-Boot] [PATCH 00/14] at91: Add boards with OF_CONTROL/DM/DM_SPI Jagan Teki
                   ` (13 preceding siblings ...)
  2018-03-14 13:16 ` [U-Boot] [PATCH 14/14] spi: atmel: default y if DM_SPI && ARCH_AT91 Jagan Teki
@ 2018-03-15  9:43 ` Jagan Teki
  14 siblings, 0 replies; 37+ messages in thread
From: Jagan Teki @ 2018-03-15  9:43 UTC (permalink / raw)
  To: u-boot

Hi Heiko,

On Wed, Mar 14, 2018 at 6:46 PM, Jagan Teki <jagan@amarulasolutions.com> wrote:
> This series add support for missing at91 board with
> - OF_CONTROL
> - DM
> - DM_SPI
> - Drop non-dm code from atmel_spi
>
> Boards like taurus, vinco and ma5d4evk need move GPIO code
> into drivers instead of configuring them in board file.
> request to board maintainers to do this job.
>
> Jagan Teki (14):
>   spi: atmel: Add ifdef for DM_GPIO code
>   at91: gurnard: Enable DM_SPI
>   configs: gurnard: Move CONFIG_ATMEL_SPI to defconfigs
>   at91: taurus: Enable DM_SPI
>   at91: vinco: Enable DM
>   at91: vinco: Add FDT support
>   at91: vinco: Enable DM_SPI
>   at91: ma5d4evk: Enable DM
>   at91: ma5d4evk: Add FDT support
>   at91: ma5d4evk: Enable DM_SPI
>   at91: ma5d4evk: Enable SPL_DM and SPL_OF_CONTROL
>   spi: atmel: Drop non-dm code
>   spi: atmel: Drop atmel_spi.h
>   spi: atmel: default y if DM_SPI && ARCH_AT91

axm_defconfig and taurus_defconfig showing in an issue of SPL size, if
we enable DM_SPL and PLATDATA with resulting size increased by 12.5K.
Can you do anything with this? I see the defconfig build both
SPI_FLASH and NAND flash in SPL, does this board support both boot
modes if so better separating this defconfig into spi_flash and nand
would may reduce the size? what do you think.

Jagan.

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [U-Boot] [PATCH 01/14] spi: atmel: Add ifdef for DM_GPIO code
  2018-03-14 13:16 ` [U-Boot] [PATCH 01/14] spi: atmel: Add ifdef for DM_GPIO code Jagan Teki
@ 2018-03-21  4:08   ` Wenyou Yang
  2018-04-06 20:28   ` [U-Boot] [U-Boot,01/14] " Tom Rini
  1 sibling, 0 replies; 37+ messages in thread
From: Wenyou Yang @ 2018-03-21  4:08 UTC (permalink / raw)
  To: u-boot



On 3/14/2018 9:16 PM, Jagan Teki wrote:
> Few boards are configuring gpio directly from board instead
> using drivers/gpio so add ifdef for DM_GPIO to compatible
> for both the cases.
>
> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
It is okay for me.

Acked-by: Wenyou Yang <wenyouya@gmail.com>
> ---
>   drivers/spi/atmel_spi.c | 14 ++++++++++++--
>   1 file changed, 12 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/spi/atmel_spi.c b/drivers/spi/atmel_spi.c
> index 8010ab434c..3cdfd366ab 100644
> --- a/drivers/spi/atmel_spi.c
> +++ b/drivers/spi/atmel_spi.c
> @@ -236,7 +236,9 @@ struct atmel_spi_priv {
>   	unsigned int freq;		/* Default frequency */
>   	unsigned int mode;
>   	ulong bus_clk_rate;
> +#ifdef CONFIG_DM_GPIO
>   	struct gpio_desc cs_gpios[MAX_CS_COUNT];
> +#endif
>   };
>   
>   static int atmel_spi_claim_bus(struct udevice *dev)
> @@ -291,6 +293,7 @@ static int atmel_spi_release_bus(struct udevice *dev)
>   
>   static void atmel_spi_cs_activate(struct udevice *dev)
>   {
> +#ifdef CONFIG_DM_GPIO
>   	struct udevice *bus = dev_get_parent(dev);
>   	struct atmel_spi_priv *priv = dev_get_priv(bus);
>   	struct dm_spi_slave_platdata *slave_plat = dev_get_parent_platdata(dev);
> @@ -300,10 +303,12 @@ static void atmel_spi_cs_activate(struct udevice *dev)
>   		return;
>   
>   	dm_gpio_set_value(&priv->cs_gpios[cs], 0);
> +#endif
>   }
>   
>   static void atmel_spi_cs_deactivate(struct udevice *dev)
>   {
> +#ifdef CONFIG_DM_GPIO
>   	struct udevice *bus = dev_get_parent(dev);
>   	struct atmel_spi_priv *priv = dev_get_priv(bus);
>   	struct dm_spi_slave_platdata *slave_plat = dev_get_parent_platdata(dev);
> @@ -313,6 +318,7 @@ static void atmel_spi_cs_deactivate(struct udevice *dev)
>   		return;
>   
>   	dm_gpio_set_value(&priv->cs_gpios[cs], 1);
> +#endif
>   }
>   
>   static int atmel_spi_xfer(struct udevice *dev, unsigned int bitlen,
> @@ -462,8 +468,7 @@ static int atmel_spi_enable_clk(struct udevice *bus)
>   static int atmel_spi_probe(struct udevice *bus)
>   {
>   	struct atmel_spi_platdata *bus_plat = dev_get_platdata(bus);
> -	struct atmel_spi_priv *priv = dev_get_priv(bus);
> -	int i, ret;
> +	int ret;
>   
>   	ret = atmel_spi_enable_clk(bus);
>   	if (ret)
> @@ -471,6 +476,10 @@ static int atmel_spi_probe(struct udevice *bus)
>   
>   	bus_plat->regs = (struct at91_spi *)devfdt_get_addr(bus);
>   
> +#ifdef CONFIG_DM_GPIO
> +	struct atmel_spi_priv *priv = dev_get_priv(bus);
> +	int i;
> +
>   	ret = gpio_request_list_by_name(bus, "cs-gpios", priv->cs_gpios,
>   					ARRAY_SIZE(priv->cs_gpios), 0);
>   	if (ret < 0) {
> @@ -485,6 +494,7 @@ static int atmel_spi_probe(struct udevice *bus)
>   		dm_gpio_set_dir_flags(&priv->cs_gpios[i],
>   				      GPIOD_IS_OUT | GPIOD_IS_OUT_ACTIVE);
>   	}
> +#endif
>   
>   	writel(ATMEL_SPI_CR_SWRST, &bus_plat->regs->cr);
>   

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [U-Boot] [PATCH 03/14] configs: gurnard: Move CONFIG_ATMEL_SPI to defconfigs
  2018-03-14 13:16 ` [U-Boot] [PATCH 03/14] configs: gurnard: Move CONFIG_ATMEL_SPI to defconfigs Jagan Teki
@ 2018-03-21  4:09   ` Wenyou Yang
  2018-04-06 20:29   ` [U-Boot] [U-Boot, " Tom Rini
  1 sibling, 0 replies; 37+ messages in thread
From: Wenyou Yang @ 2018-03-21  4:09 UTC (permalink / raw)
  To: u-boot



On 3/14/2018 9:16 PM, Jagan Teki wrote:
> Now CONFIG_ATMEL_SPI is defined in Kconfig, so move the
> same into defconfig file.
>
> Cc: Simon Glass <sjg@chromium.org>
> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Acked-by: Wenyou Yang <wenyouya@gmail.com>
> ---
>   configs/gurnard_defconfig     | 1 +
>   include/configs/snapper9g45.h | 2 --
>   2 files changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/configs/gurnard_defconfig b/configs/gurnard_defconfig
> index 95ccbdefea..ce51a0348f 100644
> --- a/configs/gurnard_defconfig
> +++ b/configs/gurnard_defconfig
> @@ -27,6 +27,7 @@ CONFIG_ENV_IS_IN_NAND=y
>   CONFIG_BOOTP_BOOTPATH=y
>   CONFIG_BOOTP_GATEWAY=y
>   CONFIG_BOOTP_HOSTNAME=y
> +CONFIG_ATMEL_SPI=y
>   CONFIG_PHYLIB=y
>   CONFIG_TIMER=y
>   CONFIG_ATMEL_PIT_TIMER=y
> diff --git a/include/configs/snapper9g45.h b/include/configs/snapper9g45.h
> index a3b1773059..0da3b3b055 100644
> --- a/include/configs/snapper9g45.h
> +++ b/include/configs/snapper9g45.h
> @@ -64,8 +64,6 @@
>   #define CONFIG_ATMEL_LCD
>   #define CONFIG_GURNARD_SPLASH
>   
> -#define CONFIG_ATMEL_SPI
> -
>   /* GPIOs and IO expander */
>   #define CONFIG_ATMEL_LEGACY
>   #define CONFIG_AT91_GPIO

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [U-Boot] [PATCH 12/14] spi: atmel: Drop non-dm code
  2018-03-14 13:16 ` [U-Boot] [PATCH 12/14] spi: atmel: Drop non-dm code Jagan Teki
@ 2018-03-21  4:10   ` Wenyou Yang
  2018-04-06 20:29   ` [U-Boot] [U-Boot,12/14] " Tom Rini
  1 sibling, 0 replies; 37+ messages in thread
From: Wenyou Yang @ 2018-03-21  4:10 UTC (permalink / raw)
  To: u-boot



On 3/14/2018 9:16 PM, Jagan Teki wrote:
> All board configs are now enabled DM_SPI for SPL and
> U-Boot proper, so now its time to drop non-dm code.
>
> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
It is okay for me.

Acked-by: Wenyou Yang <wenyouya@gmail.com>
> ---
>   drivers/spi/atmel_spi.c      | 201 -------------------------------------------
>   drivers/spi/atmel_spi.h      |  16 ----
>   include/configs/ma5d4evk.h   |   1 -
>   include/configs/vinco.h      |   1 -
>   scripts/config_whitelist.txt |   1 -
>   5 files changed, 220 deletions(-)
>
> diff --git a/drivers/spi/atmel_spi.c b/drivers/spi/atmel_spi.c
> index 3cdfd366ab..122c6d107d 100644
> --- a/drivers/spi/atmel_spi.c
> +++ b/drivers/spi/atmel_spi.c
> @@ -26,206 +26,6 @@
>   
>   DECLARE_GLOBAL_DATA_PTR;
>   
> -#ifndef CONFIG_DM_SPI
> -
> -static int spi_has_wdrbt(struct atmel_spi_slave *slave)
> -{
> -	unsigned int ver;
> -
> -	ver = spi_readl(slave, VERSION);
> -
> -	return (ATMEL_SPI_VERSION_REV(ver) >= 0x210);
> -}
> -
> -void spi_init()
> -{
> -
> -}
> -
> -struct spi_slave *spi_setup_slave(unsigned int bus, unsigned int cs,
> -			unsigned int max_hz, unsigned int mode)
> -{
> -	struct atmel_spi_slave	*as;
> -	unsigned int		scbr;
> -	u32			csrx;
> -	void			*regs;
> -
> -	if (!spi_cs_is_valid(bus, cs))
> -		return NULL;
> -
> -	switch (bus) {
> -	case 0:
> -		regs = (void *)ATMEL_BASE_SPI0;
> -		break;
> -#ifdef ATMEL_BASE_SPI1
> -	case 1:
> -		regs = (void *)ATMEL_BASE_SPI1;
> -		break;
> -#endif
> -#ifdef ATMEL_BASE_SPI2
> -	case 2:
> -		regs = (void *)ATMEL_BASE_SPI2;
> -		break;
> -#endif
> -#ifdef ATMEL_BASE_SPI3
> -	case 3:
> -		regs = (void *)ATMEL_BASE_SPI3;
> -		break;
> -#endif
> -	default:
> -		return NULL;
> -	}
> -
> -
> -	scbr = (get_spi_clk_rate(bus) + max_hz - 1) / max_hz;
> -	if (scbr > ATMEL_SPI_CSRx_SCBR_MAX)
> -		/* Too low max SCK rate */
> -		return NULL;
> -	if (scbr < 1)
> -		scbr = 1;
> -
> -	csrx = ATMEL_SPI_CSRx_SCBR(scbr);
> -	csrx |= ATMEL_SPI_CSRx_BITS(ATMEL_SPI_BITS_8);
> -	if (!(mode & SPI_CPHA))
> -		csrx |= ATMEL_SPI_CSRx_NCPHA;
> -	if (mode & SPI_CPOL)
> -		csrx |= ATMEL_SPI_CSRx_CPOL;
> -
> -	as = spi_alloc_slave(struct atmel_spi_slave, bus, cs);
> -	if (!as)
> -		return NULL;
> -
> -	as->regs = regs;
> -	as->mr = ATMEL_SPI_MR_MSTR | ATMEL_SPI_MR_MODFDIS
> -			| ATMEL_SPI_MR_PCS(~(1 << cs) & 0xf);
> -	if (spi_has_wdrbt(as))
> -		as->mr |= ATMEL_SPI_MR_WDRBT;
> -
> -	spi_writel(as, CSR(cs), csrx);
> -
> -	return &as->slave;
> -}
> -
> -void spi_free_slave(struct spi_slave *slave)
> -{
> -	struct atmel_spi_slave *as = to_atmel_spi(slave);
> -
> -	free(as);
> -}
> -
> -int spi_claim_bus(struct spi_slave *slave)
> -{
> -	struct atmel_spi_slave *as = to_atmel_spi(slave);
> -
> -	/* Enable the SPI hardware */
> -	spi_writel(as, CR, ATMEL_SPI_CR_SPIEN);
> -
> -	/*
> -	 * Select the slave. This should set SCK to the correct
> -	 * initial state, etc.
> -	 */
> -	spi_writel(as, MR, as->mr);
> -
> -	return 0;
> -}
> -
> -void spi_release_bus(struct spi_slave *slave)
> -{
> -	struct atmel_spi_slave *as = to_atmel_spi(slave);
> -
> -	/* Disable the SPI hardware */
> -	spi_writel(as, CR, ATMEL_SPI_CR_SPIDIS);
> -}
> -
> -int spi_xfer(struct spi_slave *slave, unsigned int bitlen,
> -		const void *dout, void *din, unsigned long flags)
> -{
> -	struct atmel_spi_slave *as = to_atmel_spi(slave);
> -	unsigned int	len_tx;
> -	unsigned int	len_rx;
> -	unsigned int	len;
> -	u32		status;
> -	const u8	*txp = dout;
> -	u8		*rxp = din;
> -	u8		value;
> -
> -	if (bitlen == 0)
> -		/* Finish any previously submitted transfers */
> -		goto out;
> -
> -	/*
> -	 * TODO: The controller can do non-multiple-of-8 bit
> -	 * transfers, but this driver currently doesn't support it.
> -	 *
> -	 * It's also not clear how such transfers are supposed to be
> -	 * represented as a stream of bytes...this is a limitation of
> -	 * the current SPI interface.
> -	 */
> -	if (bitlen % 8) {
> -		/* Errors always terminate an ongoing transfer */
> -		flags |= SPI_XFER_END;
> -		goto out;
> -	}
> -
> -	len = bitlen / 8;
> -
> -	/*
> -	 * The controller can do automatic CS control, but it is
> -	 * somewhat quirky, and it doesn't really buy us much anyway
> -	 * in the context of U-Boot.
> -	 */
> -	if (flags & SPI_XFER_BEGIN) {
> -		spi_cs_activate(slave);
> -		/*
> -		 * sometimes the RDR is not empty when we get here,
> -		 * in theory that should not happen, but it DOES happen.
> -		 * Read it here to be on the safe side.
> -		 * That also clears the OVRES flag. Required if the
> -		 * following loop exits due to OVRES!
> -		 */
> -		spi_readl(as, RDR);
> -	}
> -
> -	for (len_tx = 0, len_rx = 0; len_rx < len; ) {
> -		status = spi_readl(as, SR);
> -
> -		if (status & ATMEL_SPI_SR_OVRES)
> -			return -1;
> -
> -		if (len_tx < len && (status & ATMEL_SPI_SR_TDRE)) {
> -			if (txp)
> -				value = *txp++;
> -			else
> -				value = 0;
> -			spi_writel(as, TDR, value);
> -			len_tx++;
> -		}
> -		if (status & ATMEL_SPI_SR_RDRF) {
> -			value = spi_readl(as, RDR);
> -			if (rxp)
> -				*rxp++ = value;
> -			len_rx++;
> -		}
> -	}
> -
> -out:
> -	if (flags & SPI_XFER_END) {
> -		/*
> -		 * Wait until the transfer is completely done before
> -		 * we deactivate CS.
> -		 */
> -		do {
> -			status = spi_readl(as, SR);
> -		} while (!(status & ATMEL_SPI_SR_TXEMPTY));
> -
> -		spi_cs_deactivate(slave);
> -	}
> -
> -	return 0;
> -}
> -
> -#else
> -
>   #define MAX_CS_COUNT	4
>   
>   struct atmel_spi_platdata {
> @@ -515,4 +315,3 @@ U_BOOT_DRIVER(atmel_spi) = {
>   	.priv_auto_alloc_size = sizeof(struct atmel_spi_priv),
>   	.probe	= atmel_spi_probe,
>   };
> -#endif
> diff --git a/drivers/spi/atmel_spi.h b/drivers/spi/atmel_spi.h
> index 76b8556c98..685eeed99e 100644
> --- a/drivers/spi/atmel_spi.h
> +++ b/drivers/spi/atmel_spi.h
> @@ -79,22 +79,6 @@
>   #define ATMEL_SPI_BITS_16		8
>   
>   struct atmel_spi_slave {
> -	struct spi_slave slave;
>   	void		*regs;
>   	u32		mr;
>   };
> -
> -static inline struct atmel_spi_slave *to_atmel_spi(struct spi_slave *slave)
> -{
> -	return container_of(slave, struct atmel_spi_slave, slave);
> -}
> -
> -/* Register access macros */
> -#define spi_readl(as, reg)					\
> -	readl(as->regs + ATMEL_SPI_##reg)
> -#define spi_writel(as, reg, value)				\
> -	writel(value, as->regs + ATMEL_SPI_##reg)
> -
> -#if !defined(CONFIG_SYS_SPI_WRITE_TOUT)
> -#define CONFIG_SYS_SPI_WRITE_TOUT	(5 * CONFIG_SYS_HZ)
> -#endif
> diff --git a/include/configs/ma5d4evk.h b/include/configs/ma5d4evk.h
> index ed95e580c0..4cba7580a2 100644
> --- a/include/configs/ma5d4evk.h
> +++ b/include/configs/ma5d4evk.h
> @@ -87,7 +87,6 @@
>    */
>   #ifdef CONFIG_CMD_SF
>   #define CONFIG_ATMEL_SPI
> -#define CONFIG_ATMEL_SPI0
>   #define CONFIG_SPI_FLASH_ATMEL
>   #define CONFIG_SF_DEFAULT_BUS		0
>   #define CONFIG_SF_DEFAULT_CS		0
> diff --git a/include/configs/vinco.h b/include/configs/vinco.h
> index ca3958986b..3ae7e9e75b 100644
> --- a/include/configs/vinco.h
> +++ b/include/configs/vinco.h
> @@ -39,7 +39,6 @@
>   
>   #ifdef CONFIG_CMD_SF
>   #define CONFIG_ATMEL_SPI
> -#define CONFIG_ATMEL_SPI0
>   #define CONFIG_SPI_FLASH_STMICRO
>   #define CONFIG_SF_DEFAULT_BUS		0
>   #define CONFIG_SF_DEFAULT_CS		0
> diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt
> index 3606585c05..a5f8e3591f 100644
> --- a/scripts/config_whitelist.txt
> +++ b/scripts/config_whitelist.txt
> @@ -103,7 +103,6 @@ CONFIG_ATMEL_LEGACY
>   CONFIG_ATMEL_MCI_8BIT
>   CONFIG_ATMEL_NAND_HWECC
>   CONFIG_ATMEL_NAND_HW_PMECC
> -CONFIG_ATMEL_SPI0
>   CONFIG_AT_TRANS
>   CONFIG_AUTO_ZRELADDR
>   CONFIG_BACKSIDE_L2_CACHE

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [U-Boot] [PATCH 13/14] spi: atmel: Drop atmel_spi.h
  2018-03-14 13:16 ` [U-Boot] [PATCH 13/14] spi: atmel: Drop atmel_spi.h Jagan Teki
@ 2018-03-21  4:11   ` Wenyou Yang
  2018-04-06 20:29   ` [U-Boot] [U-Boot,13/14] " Tom Rini
  1 sibling, 0 replies; 37+ messages in thread
From: Wenyou Yang @ 2018-03-21  4:11 UTC (permalink / raw)
  To: u-boot



On 3/14/2018 9:16 PM, Jagan Teki wrote:
> atmel_spi.h has register offsets, and atmel_spi_slave
> structure, move it into .c file for better readability
> and drop atmel_spi.h
>
> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Indeed.

Acked-by: Wenyou Yang <wenyouya@gmail.com>
> ---
>   drivers/spi/atmel_spi.c | 97 ++++++++++++++++++++++++++++++++++++++++++++-----
>   drivers/spi/atmel_spi.h | 84 ------------------------------------------
>   2 files changed, 88 insertions(+), 93 deletions(-)
>   delete mode 100644 drivers/spi/atmel_spi.h
>
> diff --git a/drivers/spi/atmel_spi.c b/drivers/spi/atmel_spi.c
> index 122c6d107d..bb2262cc1f 100644
> --- a/drivers/spi/atmel_spi.c
> +++ b/drivers/spi/atmel_spi.c
> @@ -22,11 +22,90 @@
>   #include <asm/gpio.h>
>   #endif
>   
> -#include "atmel_spi.h"
> -
>   DECLARE_GLOBAL_DATA_PTR;
>   
> -#define MAX_CS_COUNT	4
> +/* Register offsets */
> +#define ATMEL_SPI_CR			0x0000
> +#define ATMEL_SPI_MR			0x0004
> +#define ATMEL_SPI_RDR			0x0008
> +#define ATMEL_SPI_TDR			0x000c
> +#define ATMEL_SPI_SR			0x0010
> +#define ATMEL_SPI_IER			0x0014
> +#define ATMEL_SPI_IDR			0x0018
> +#define ATMEL_SPI_IMR			0x001c
> +#define ATMEL_SPI_CSR(x)		(0x0030 + 4 * (x))
> +#define ATMEL_SPI_VERSION		0x00fc
> +
> +/* Bits in CR */
> +#define ATMEL_SPI_CR_SPIEN		BIT(0)
> +#define ATMEL_SPI_CR_SPIDIS		BIT(1)
> +#define ATMEL_SPI_CR_SWRST		BIT(7)
> +#define ATMEL_SPI_CR_LASTXFER		BIT(24)
> +
> +/* Bits in MR */
> +#define ATMEL_SPI_MR_MSTR		BIT(0)
> +#define ATMEL_SPI_MR_PS			BIT(1)
> +#define ATMEL_SPI_MR_PCSDEC		BIT(2)
> +#define ATMEL_SPI_MR_FDIV		BIT(3)
> +#define ATMEL_SPI_MR_MODFDIS		BIT(4)
> +#define ATMEL_SPI_MR_WDRBT		BIT(5)
> +#define ATMEL_SPI_MR_LLB		BIT(7)
> +#define ATMEL_SPI_MR_PCS(x)		(((x) & 15) << 16)
> +#define ATMEL_SPI_MR_DLYBCS(x)		((x) << 24)
> +
> +/* Bits in RDR */
> +#define ATMEL_SPI_RDR_RD(x)		(x)
> +#define ATMEL_SPI_RDR_PCS(x)		((x) << 16)
> +
> +/* Bits in TDR */
> +#define ATMEL_SPI_TDR_TD(x)		(x)
> +#define ATMEL_SPI_TDR_PCS(x)		((x) << 16)
> +#define ATMEL_SPI_TDR_LASTXFER		BIT(24)
> +
> +/* Bits in SR/IER/IDR/IMR */
> +#define ATMEL_SPI_SR_RDRF		BIT(0)
> +#define ATMEL_SPI_SR_TDRE		BIT(1)
> +#define ATMEL_SPI_SR_MODF		BIT(2)
> +#define ATMEL_SPI_SR_OVRES		BIT(3)
> +#define ATMEL_SPI_SR_ENDRX		BIT(4)
> +#define ATMEL_SPI_SR_ENDTX		BIT(5)
> +#define ATMEL_SPI_SR_RXBUFF		BIT(6)
> +#define ATMEL_SPI_SR_TXBUFE		BIT(7)
> +#define ATMEL_SPI_SR_NSSR		BIT(8)
> +#define ATMEL_SPI_SR_TXEMPTY		BIT(9)
> +#define ATMEL_SPI_SR_SPIENS		BIT(16)
> +
> +/* Bits in CSRx */
> +#define ATMEL_SPI_CSR_CPOL		BIT(0)
> +#define ATMEL_SPI_CSR_NCPHA		BIT(1)
> +#define ATMEL_SPI_CSR_CSAAT		BIT(3)
> +#define ATMEL_SPI_CSR_BITS(x)		((x) << 4)
> +#define ATMEL_SPI_CSR_SCBR(x)		((x) << 8)
> +#define ATMEL_SPI_CSR_SCBR_MAX		GENMASK(7, 0)
> +#define ATMEL_SPI_CSR_DLYBS(x)		((x) << 16)
> +#define ATMEL_SPI_CSR_DLYBCT(x)		((x) << 24)
> +
> +/* Bits in VERSION */
> +#define ATMEL_SPI_VERSION_REV(x)	((x) & 0xfff)
> +#define ATMEL_SPI_VERSION_MFN(x)	((x) << 16)
> +
> +/* Constants for CSRx:BITS */
> +#define ATMEL_SPI_BITS_8		0
> +#define ATMEL_SPI_BITS_9		1
> +#define ATMEL_SPI_BITS_10		2
> +#define ATMEL_SPI_BITS_11		3
> +#define ATMEL_SPI_BITS_12		4
> +#define ATMEL_SPI_BITS_13		5
> +#define ATMEL_SPI_BITS_14		6
> +#define ATMEL_SPI_BITS_15		7
> +#define ATMEL_SPI_BITS_16		8
> +
> +#define MAX_CS_COUNT			4
> +
> +struct atmel_spi_slave {
> +	void		*regs;
> +	u32		mr;
> +};
>   
>   struct atmel_spi_platdata {
>   	struct at91_spi *regs;
> @@ -53,19 +132,19 @@ static int atmel_spi_claim_bus(struct udevice *dev)
>   	u32 scbr, csrx, mode;
>   
>   	scbr = (priv->bus_clk_rate + freq - 1) / freq;
> -	if (scbr > ATMEL_SPI_CSRx_SCBR_MAX)
> +	if (scbr > ATMEL_SPI_CSR_SCBR_MAX)
>   		return -EINVAL;
>   
>   	if (scbr < 1)
>   		scbr = 1;
>   
> -	csrx = ATMEL_SPI_CSRx_SCBR(scbr);
> -	csrx |= ATMEL_SPI_CSRx_BITS(ATMEL_SPI_BITS_8);
> +	csrx = ATMEL_SPI_CSR_SCBR(scbr);
> +	csrx |= ATMEL_SPI_CSR_BITS(ATMEL_SPI_BITS_8);
>   
>   	if (!(priv->mode & SPI_CPHA))
> -		csrx |= ATMEL_SPI_CSRx_NCPHA;
> +		csrx |= ATMEL_SPI_CSR_NCPHA;
>   	if (priv->mode & SPI_CPOL)
> -		csrx |= ATMEL_SPI_CSRx_CPOL;
> +		csrx |= ATMEL_SPI_CSR_CPOL;
>   
>   	writel(csrx, &reg_base->csr[cs]);
>   
> @@ -287,7 +366,7 @@ static int atmel_spi_probe(struct udevice *bus)
>   		return ret;
>   	}
>   
> -	for(i = 0; i < ARRAY_SIZE(priv->cs_gpios); i++) {
> +	for (i = 0; i < ARRAY_SIZE(priv->cs_gpios); i++) {
>   		if (!dm_gpio_is_valid(&priv->cs_gpios[i]))
>   			continue;
>   
> diff --git a/drivers/spi/atmel_spi.h b/drivers/spi/atmel_spi.h
> deleted file mode 100644
> index 685eeed99e..0000000000
> --- a/drivers/spi/atmel_spi.h
> +++ /dev/null
> @@ -1,84 +0,0 @@
> -/*
> - * Register definitions for the Atmel AT32/AT91 SPI Controller
> - */
> -
> -/* Register offsets */
> -#define ATMEL_SPI_CR			0x0000
> -#define ATMEL_SPI_MR			0x0004
> -#define ATMEL_SPI_RDR			0x0008
> -#define ATMEL_SPI_TDR			0x000c
> -#define ATMEL_SPI_SR			0x0010
> -#define ATMEL_SPI_IER			0x0014
> -#define ATMEL_SPI_IDR			0x0018
> -#define ATMEL_SPI_IMR			0x001c
> -#define ATMEL_SPI_CSR(x)		(0x0030 + 4 * (x))
> -#define ATMEL_SPI_VERSION		0x00fc
> -
> -/* Bits in CR */
> -#define ATMEL_SPI_CR_SPIEN		BIT(0)
> -#define ATMEL_SPI_CR_SPIDIS		BIT(1)
> -#define ATMEL_SPI_CR_SWRST		BIT(7)
> -#define ATMEL_SPI_CR_LASTXFER		BIT(24)
> -
> -/* Bits in MR */
> -#define ATMEL_SPI_MR_MSTR		BIT(0)
> -#define ATMEL_SPI_MR_PS			BIT(1)
> -#define ATMEL_SPI_MR_PCSDEC		BIT(2)
> -#define ATMEL_SPI_MR_FDIV		BIT(3)
> -#define ATMEL_SPI_MR_MODFDIS		BIT(4)
> -#define ATMEL_SPI_MR_WDRBT		BIT(5)
> -#define ATMEL_SPI_MR_LLB		BIT(7)
> -#define ATMEL_SPI_MR_PCS(x)		(((x) & 15) << 16)
> -#define ATMEL_SPI_MR_DLYBCS(x)		((x) << 24)
> -
> -/* Bits in RDR */
> -#define ATMEL_SPI_RDR_RD(x)		(x)
> -#define ATMEL_SPI_RDR_PCS(x)		((x) << 16)
> -
> -/* Bits in TDR */
> -#define ATMEL_SPI_TDR_TD(x)		(x)
> -#define ATMEL_SPI_TDR_PCS(x)		((x) << 16)
> -#define ATMEL_SPI_TDR_LASTXFER		BIT(24)
> -
> -/* Bits in SR/IER/IDR/IMR */
> -#define ATMEL_SPI_SR_RDRF		BIT(0)
> -#define ATMEL_SPI_SR_TDRE		BIT(1)
> -#define ATMEL_SPI_SR_MODF		BIT(2)
> -#define ATMEL_SPI_SR_OVRES		BIT(3)
> -#define ATMEL_SPI_SR_ENDRX		BIT(4)
> -#define ATMEL_SPI_SR_ENDTX		BIT(5)
> -#define ATMEL_SPI_SR_RXBUFF		BIT(6)
> -#define ATMEL_SPI_SR_TXBUFE		BIT(7)
> -#define ATMEL_SPI_SR_NSSR		BIT(8)
> -#define ATMEL_SPI_SR_TXEMPTY		BIT(9)
> -#define ATMEL_SPI_SR_SPIENS		BIT(16)
> -
> -/* Bits in CSRx */
> -#define ATMEL_SPI_CSRx_CPOL		BIT(0)
> -#define ATMEL_SPI_CSRx_NCPHA		BIT(1)
> -#define ATMEL_SPI_CSRx_CSAAT		BIT(3)
> -#define ATMEL_SPI_CSRx_BITS(x)		((x) << 4)
> -#define ATMEL_SPI_CSRx_SCBR(x)		((x) << 8)
> -#define ATMEL_SPI_CSRx_SCBR_MAX		GENMASK(7, 0)
> -#define ATMEL_SPI_CSRx_DLYBS(x)		((x) << 16)
> -#define ATMEL_SPI_CSRx_DLYBCT(x)	((x) << 24)
> -
> -/* Bits in VERSION */
> -#define ATMEL_SPI_VERSION_REV(x)	((x) & 0xfff)
> -#define ATMEL_SPI_VERSION_MFN(x)	((x) << 16)
> -
> -/* Constants for CSRx:BITS */
> -#define ATMEL_SPI_BITS_8		0
> -#define ATMEL_SPI_BITS_9		1
> -#define ATMEL_SPI_BITS_10		2
> -#define ATMEL_SPI_BITS_11		3
> -#define ATMEL_SPI_BITS_12		4
> -#define ATMEL_SPI_BITS_13		5
> -#define ATMEL_SPI_BITS_14		6
> -#define ATMEL_SPI_BITS_15		7
> -#define ATMEL_SPI_BITS_16		8
> -
> -struct atmel_spi_slave {
> -	void		*regs;
> -	u32		mr;
> -};

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [U-Boot] [PATCH 14/14] spi: atmel: default y if DM_SPI && ARCH_AT91
  2018-03-14 13:16 ` [U-Boot] [PATCH 14/14] spi: atmel: default y if DM_SPI && ARCH_AT91 Jagan Teki
@ 2018-03-21  4:13   ` Wenyou Yang
  2018-04-06 20:29   ` [U-Boot] [U-Boot, " Tom Rini
  1 sibling, 0 replies; 37+ messages in thread
From: Wenyou Yang @ 2018-03-21  4:13 UTC (permalink / raw)
  To: u-boot



On 3/14/2018 9:16 PM, Jagan Teki wrote:
> ATMEL_SPI is now fully converted to driver-model and
> respective boards switch to DM_SPI as well,
> so make default y for ARCH_AT91
>
> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Acked-by: Wenyou Yang <wenyouya@gmail.com>

> ---
>   configs/at91sam9260ek_dataflash_cs0_defconfig  | 1 -
>   configs/at91sam9260ek_dataflash_cs1_defconfig  | 1 -
>   configs/at91sam9260ek_nandflash_defconfig      | 1 -
>   configs/at91sam9261ek_dataflash_cs0_defconfig  | 1 -
>   configs/at91sam9261ek_dataflash_cs3_defconfig  | 1 -
>   configs/at91sam9261ek_nandflash_defconfig      | 1 -
>   configs/at91sam9263ek_dataflash_cs0_defconfig  | 1 -
>   configs/at91sam9263ek_dataflash_defconfig      | 1 -
>   configs/at91sam9263ek_nandflash_defconfig      | 1 -
>   configs/at91sam9263ek_norflash_boot_defconfig  | 1 -
>   configs/at91sam9263ek_norflash_defconfig       | 1 -
>   configs/at91sam9g10ek_dataflash_cs0_defconfig  | 1 -
>   configs/at91sam9g10ek_dataflash_cs3_defconfig  | 1 -
>   configs/at91sam9g10ek_nandflash_defconfig      | 1 -
>   configs/at91sam9g20ek_2mmc_defconfig           | 1 -
>   configs/at91sam9g20ek_2mmc_nandflash_defconfig | 1 -
>   configs/at91sam9g20ek_dataflash_cs0_defconfig  | 1 -
>   configs/at91sam9g20ek_dataflash_cs1_defconfig  | 1 -
>   configs/at91sam9g20ek_nandflash_defconfig      | 1 -
>   configs/at91sam9n12ek_mmc_defconfig            | 1 -
>   configs/at91sam9n12ek_nandflash_defconfig      | 1 -
>   configs/at91sam9n12ek_spiflash_defconfig       | 1 -
>   configs/at91sam9rlek_dataflash_defconfig       | 1 -
>   configs/at91sam9rlek_mmc_defconfig             | 1 -
>   configs/at91sam9rlek_nandflash_defconfig       | 1 -
>   configs/at91sam9x5ek_dataflash_defconfig       | 1 -
>   configs/at91sam9x5ek_mmc_defconfig             | 1 -
>   configs/at91sam9x5ek_nandflash_defconfig       | 1 -
>   configs/at91sam9x5ek_spiflash_defconfig        | 1 -
>   configs/at91sam9xeek_dataflash_cs0_defconfig   | 1 -
>   configs/at91sam9xeek_dataflash_cs1_defconfig   | 1 -
>   configs/at91sam9xeek_nandflash_defconfig       | 1 -
>   configs/ethernut5_defconfig                    | 1 -
>   configs/gurnard_defconfig                      | 1 -
>   configs/meesc_dataflash_defconfig              | 1 -
>   configs/meesc_defconfig                        | 1 -
>   configs/pm9261_defconfig                       | 1 -
>   configs/pm9263_defconfig                       | 1 -
>   configs/sama5d27_som1_ek_mmc_defconfig         | 1 -
>   configs/sama5d2_xplained_mmc_defconfig         | 1 -
>   configs/sama5d2_xplained_spiflash_defconfig    | 1 -
>   configs/sama5d36ek_cmp_mmc_defconfig           | 1 -
>   configs/sama5d36ek_cmp_nandflash_defconfig     | 1 -
>   configs/sama5d36ek_cmp_spiflash_defconfig      | 1 -
>   configs/sama5d3xek_mmc_defconfig               | 1 -
>   configs/sama5d3xek_nandflash_defconfig         | 1 -
>   configs/sama5d3xek_spiflash_defconfig          | 1 -
>   configs/sama5d4_xplained_mmc_defconfig         | 1 -
>   configs/sama5d4_xplained_nandflash_defconfig   | 1 -
>   configs/sama5d4_xplained_spiflash_defconfig    | 1 -
>   configs/sama5d4ek_mmc_defconfig                | 1 -
>   configs/sama5d4ek_nandflash_defconfig          | 1 -
>   configs/sama5d4ek_spiflash_defconfig           | 1 -
>   configs/usb_a9263_dataflash_defconfig          | 1 -
>   drivers/spi/Kconfig                            | 2 +-
>   include/configs/ma5d4evk.h                     | 1 -
>   include/configs/taurus.h                       | 1 -
>   include/configs/vinco.h                        | 1 -
>   58 files changed, 1 insertion(+), 58 deletions(-)
>
> diff --git a/configs/at91sam9260ek_dataflash_cs0_defconfig b/configs/at91sam9260ek_dataflash_cs0_defconfig
> index b41fe5b5fe..ae2293db3e 100644
> --- a/configs/at91sam9260ek_dataflash_cs0_defconfig
> +++ b/configs/at91sam9260ek_dataflash_cs0_defconfig
> @@ -50,7 +50,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
>   CONFIG_DEBUG_UART_ANNOUNCE=y
>   CONFIG_ATMEL_USART=y
>   CONFIG_DM_SPI=y
> -CONFIG_ATMEL_SPI=y
>   CONFIG_TIMER=y
>   CONFIG_ATMEL_PIT_TIMER=y
>   CONFIG_USB=y
> diff --git a/configs/at91sam9260ek_dataflash_cs1_defconfig b/configs/at91sam9260ek_dataflash_cs1_defconfig
> index a30a4f6f73..93f76126a6 100644
> --- a/configs/at91sam9260ek_dataflash_cs1_defconfig
> +++ b/configs/at91sam9260ek_dataflash_cs1_defconfig
> @@ -50,7 +50,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
>   CONFIG_DEBUG_UART_ANNOUNCE=y
>   CONFIG_ATMEL_USART=y
>   CONFIG_DM_SPI=y
> -CONFIG_ATMEL_SPI=y
>   CONFIG_TIMER=y
>   CONFIG_ATMEL_PIT_TIMER=y
>   CONFIG_USB=y
> diff --git a/configs/at91sam9260ek_nandflash_defconfig b/configs/at91sam9260ek_nandflash_defconfig
> index 58a3431019..f7585d0565 100644
> --- a/configs/at91sam9260ek_nandflash_defconfig
> +++ b/configs/at91sam9260ek_nandflash_defconfig
> @@ -50,7 +50,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
>   CONFIG_DEBUG_UART_ANNOUNCE=y
>   CONFIG_ATMEL_USART=y
>   CONFIG_DM_SPI=y
> -CONFIG_ATMEL_SPI=y
>   CONFIG_TIMER=y
>   CONFIG_ATMEL_PIT_TIMER=y
>   CONFIG_USB=y
> diff --git a/configs/at91sam9261ek_dataflash_cs0_defconfig b/configs/at91sam9261ek_dataflash_cs0_defconfig
> index 575e217f3a..bf06d32f55 100644
> --- a/configs/at91sam9261ek_dataflash_cs0_defconfig
> +++ b/configs/at91sam9261ek_dataflash_cs0_defconfig
> @@ -49,7 +49,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
>   CONFIG_DEBUG_UART_ANNOUNCE=y
>   CONFIG_ATMEL_USART=y
>   CONFIG_DM_SPI=y
> -CONFIG_ATMEL_SPI=y
>   CONFIG_TIMER=y
>   CONFIG_ATMEL_PIT_TIMER=y
>   CONFIG_USB=y
> diff --git a/configs/at91sam9261ek_dataflash_cs3_defconfig b/configs/at91sam9261ek_dataflash_cs3_defconfig
> index 7be7becb1f..ad7791ac45 100644
> --- a/configs/at91sam9261ek_dataflash_cs3_defconfig
> +++ b/configs/at91sam9261ek_dataflash_cs3_defconfig
> @@ -49,7 +49,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
>   CONFIG_DEBUG_UART_ANNOUNCE=y
>   CONFIG_ATMEL_USART=y
>   CONFIG_DM_SPI=y
> -CONFIG_ATMEL_SPI=y
>   CONFIG_TIMER=y
>   CONFIG_ATMEL_PIT_TIMER=y
>   CONFIG_USB=y
> diff --git a/configs/at91sam9261ek_nandflash_defconfig b/configs/at91sam9261ek_nandflash_defconfig
> index 353dc0dc7f..079c6955b0 100644
> --- a/configs/at91sam9261ek_nandflash_defconfig
> +++ b/configs/at91sam9261ek_nandflash_defconfig
> @@ -49,7 +49,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
>   CONFIG_DEBUG_UART_ANNOUNCE=y
>   CONFIG_ATMEL_USART=y
>   CONFIG_DM_SPI=y
> -CONFIG_ATMEL_SPI=y
>   CONFIG_TIMER=y
>   CONFIG_ATMEL_PIT_TIMER=y
>   CONFIG_USB=y
> diff --git a/configs/at91sam9263ek_dataflash_cs0_defconfig b/configs/at91sam9263ek_dataflash_cs0_defconfig
> index 418bbfc9e1..06390dce6b 100644
> --- a/configs/at91sam9263ek_dataflash_cs0_defconfig
> +++ b/configs/at91sam9263ek_dataflash_cs0_defconfig
> @@ -55,7 +55,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
>   CONFIG_DEBUG_UART_ANNOUNCE=y
>   CONFIG_ATMEL_USART=y
>   CONFIG_DM_SPI=y
> -CONFIG_ATMEL_SPI=y
>   CONFIG_TIMER=y
>   CONFIG_ATMEL_PIT_TIMER=y
>   CONFIG_USB=y
> diff --git a/configs/at91sam9263ek_dataflash_defconfig b/configs/at91sam9263ek_dataflash_defconfig
> index 418bbfc9e1..06390dce6b 100644
> --- a/configs/at91sam9263ek_dataflash_defconfig
> +++ b/configs/at91sam9263ek_dataflash_defconfig
> @@ -55,7 +55,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
>   CONFIG_DEBUG_UART_ANNOUNCE=y
>   CONFIG_ATMEL_USART=y
>   CONFIG_DM_SPI=y
> -CONFIG_ATMEL_SPI=y
>   CONFIG_TIMER=y
>   CONFIG_ATMEL_PIT_TIMER=y
>   CONFIG_USB=y
> diff --git a/configs/at91sam9263ek_nandflash_defconfig b/configs/at91sam9263ek_nandflash_defconfig
> index 1b3ef9b47c..5c3959e24b 100644
> --- a/configs/at91sam9263ek_nandflash_defconfig
> +++ b/configs/at91sam9263ek_nandflash_defconfig
> @@ -55,7 +55,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
>   CONFIG_DEBUG_UART_ANNOUNCE=y
>   CONFIG_ATMEL_USART=y
>   CONFIG_DM_SPI=y
> -CONFIG_ATMEL_SPI=y
>   CONFIG_TIMER=y
>   CONFIG_ATMEL_PIT_TIMER=y
>   CONFIG_USB=y
> diff --git a/configs/at91sam9263ek_norflash_boot_defconfig b/configs/at91sam9263ek_norflash_boot_defconfig
> index 39abe2db76..a26da0064a 100644
> --- a/configs/at91sam9263ek_norflash_boot_defconfig
> +++ b/configs/at91sam9263ek_norflash_boot_defconfig
> @@ -54,7 +54,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
>   CONFIG_DEBUG_UART_ANNOUNCE=y
>   CONFIG_ATMEL_USART=y
>   CONFIG_DM_SPI=y
> -CONFIG_ATMEL_SPI=y
>   CONFIG_TIMER=y
>   CONFIG_ATMEL_PIT_TIMER=y
>   CONFIG_USB=y
> diff --git a/configs/at91sam9263ek_norflash_defconfig b/configs/at91sam9263ek_norflash_defconfig
> index 04267354ff..4f08450384 100644
> --- a/configs/at91sam9263ek_norflash_defconfig
> +++ b/configs/at91sam9263ek_norflash_defconfig
> @@ -54,7 +54,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
>   CONFIG_DEBUG_UART_ANNOUNCE=y
>   CONFIG_ATMEL_USART=y
>   CONFIG_DM_SPI=y
> -CONFIG_ATMEL_SPI=y
>   CONFIG_TIMER=y
>   CONFIG_ATMEL_PIT_TIMER=y
>   CONFIG_USB=y
> diff --git a/configs/at91sam9g10ek_dataflash_cs0_defconfig b/configs/at91sam9g10ek_dataflash_cs0_defconfig
> index 2382b25cf3..c6cc752728 100644
> --- a/configs/at91sam9g10ek_dataflash_cs0_defconfig
> +++ b/configs/at91sam9g10ek_dataflash_cs0_defconfig
> @@ -49,7 +49,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
>   CONFIG_DEBUG_UART_ANNOUNCE=y
>   CONFIG_ATMEL_USART=y
>   CONFIG_DM_SPI=y
> -CONFIG_ATMEL_SPI=y
>   CONFIG_USB=y
>   CONFIG_USB_STORAGE=y
>   CONFIG_LCD=y
> diff --git a/configs/at91sam9g10ek_dataflash_cs3_defconfig b/configs/at91sam9g10ek_dataflash_cs3_defconfig
> index 531dde84a4..81b291efab 100644
> --- a/configs/at91sam9g10ek_dataflash_cs3_defconfig
> +++ b/configs/at91sam9g10ek_dataflash_cs3_defconfig
> @@ -49,7 +49,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
>   CONFIG_DEBUG_UART_ANNOUNCE=y
>   CONFIG_ATMEL_USART=y
>   CONFIG_DM_SPI=y
> -CONFIG_ATMEL_SPI=y
>   CONFIG_USB=y
>   CONFIG_USB_STORAGE=y
>   CONFIG_LCD=y
> diff --git a/configs/at91sam9g10ek_nandflash_defconfig b/configs/at91sam9g10ek_nandflash_defconfig
> index 4973519da6..9a539315bd 100644
> --- a/configs/at91sam9g10ek_nandflash_defconfig
> +++ b/configs/at91sam9g10ek_nandflash_defconfig
> @@ -49,7 +49,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
>   CONFIG_DEBUG_UART_ANNOUNCE=y
>   CONFIG_ATMEL_USART=y
>   CONFIG_DM_SPI=y
> -CONFIG_ATMEL_SPI=y
>   CONFIG_USB=y
>   CONFIG_USB_STORAGE=y
>   CONFIG_LCD=y
> diff --git a/configs/at91sam9g20ek_2mmc_defconfig b/configs/at91sam9g20ek_2mmc_defconfig
> index c9ef79b6ff..5f8824ca42 100644
> --- a/configs/at91sam9g20ek_2mmc_defconfig
> +++ b/configs/at91sam9g20ek_2mmc_defconfig
> @@ -52,7 +52,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
>   CONFIG_DEBUG_UART_ANNOUNCE=y
>   CONFIG_ATMEL_USART=y
>   CONFIG_DM_SPI=y
> -CONFIG_ATMEL_SPI=y
>   CONFIG_TIMER=y
>   CONFIG_ATMEL_PIT_TIMER=y
>   CONFIG_USB=y
> diff --git a/configs/at91sam9g20ek_2mmc_nandflash_defconfig b/configs/at91sam9g20ek_2mmc_nandflash_defconfig
> index 982ddfd9e7..324f3acf57 100644
> --- a/configs/at91sam9g20ek_2mmc_nandflash_defconfig
> +++ b/configs/at91sam9g20ek_2mmc_nandflash_defconfig
> @@ -52,7 +52,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
>   CONFIG_DEBUG_UART_ANNOUNCE=y
>   CONFIG_ATMEL_USART=y
>   CONFIG_DM_SPI=y
> -CONFIG_ATMEL_SPI=y
>   CONFIG_TIMER=y
>   CONFIG_ATMEL_PIT_TIMER=y
>   CONFIG_USB=y
> diff --git a/configs/at91sam9g20ek_dataflash_cs0_defconfig b/configs/at91sam9g20ek_dataflash_cs0_defconfig
> index 36bb9905f4..25bd456e65 100644
> --- a/configs/at91sam9g20ek_dataflash_cs0_defconfig
> +++ b/configs/at91sam9g20ek_dataflash_cs0_defconfig
> @@ -50,7 +50,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
>   CONFIG_DEBUG_UART_ANNOUNCE=y
>   CONFIG_ATMEL_USART=y
>   CONFIG_DM_SPI=y
> -CONFIG_ATMEL_SPI=y
>   CONFIG_TIMER=y
>   CONFIG_ATMEL_PIT_TIMER=y
>   CONFIG_USB=y
> diff --git a/configs/at91sam9g20ek_dataflash_cs1_defconfig b/configs/at91sam9g20ek_dataflash_cs1_defconfig
> index de6d39d703..c8cb0af1a4 100644
> --- a/configs/at91sam9g20ek_dataflash_cs1_defconfig
> +++ b/configs/at91sam9g20ek_dataflash_cs1_defconfig
> @@ -50,7 +50,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
>   CONFIG_DEBUG_UART_ANNOUNCE=y
>   CONFIG_ATMEL_USART=y
>   CONFIG_DM_SPI=y
> -CONFIG_ATMEL_SPI=y
>   CONFIG_TIMER=y
>   CONFIG_ATMEL_PIT_TIMER=y
>   CONFIG_USB=y
> diff --git a/configs/at91sam9g20ek_nandflash_defconfig b/configs/at91sam9g20ek_nandflash_defconfig
> index f8d9107025..b4ddf9cdd0 100644
> --- a/configs/at91sam9g20ek_nandflash_defconfig
> +++ b/configs/at91sam9g20ek_nandflash_defconfig
> @@ -50,7 +50,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
>   CONFIG_DEBUG_UART_ANNOUNCE=y
>   CONFIG_ATMEL_USART=y
>   CONFIG_DM_SPI=y
> -CONFIG_ATMEL_SPI=y
>   CONFIG_TIMER=y
>   CONFIG_ATMEL_PIT_TIMER=y
>   CONFIG_USB=y
> diff --git a/configs/at91sam9n12ek_mmc_defconfig b/configs/at91sam9n12ek_mmc_defconfig
> index f1fc70b41e..a253d448e5 100644
> --- a/configs/at91sam9n12ek_mmc_defconfig
> +++ b/configs/at91sam9n12ek_mmc_defconfig
> @@ -51,7 +51,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
>   CONFIG_DEBUG_UART_ANNOUNCE=y
>   CONFIG_ATMEL_USART=y
>   CONFIG_DM_SPI=y
> -CONFIG_ATMEL_SPI=y
>   CONFIG_TIMER=y
>   CONFIG_ATMEL_PIT_TIMER=y
>   CONFIG_USB=y
> diff --git a/configs/at91sam9n12ek_nandflash_defconfig b/configs/at91sam9n12ek_nandflash_defconfig
> index 966d54475f..dc9514592e 100644
> --- a/configs/at91sam9n12ek_nandflash_defconfig
> +++ b/configs/at91sam9n12ek_nandflash_defconfig
> @@ -51,7 +51,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
>   CONFIG_DEBUG_UART_ANNOUNCE=y
>   CONFIG_ATMEL_USART=y
>   CONFIG_DM_SPI=y
> -CONFIG_ATMEL_SPI=y
>   CONFIG_TIMER=y
>   CONFIG_ATMEL_PIT_TIMER=y
>   CONFIG_USB=y
> diff --git a/configs/at91sam9n12ek_spiflash_defconfig b/configs/at91sam9n12ek_spiflash_defconfig
> index 634e3de83c..acd4a89e2c 100644
> --- a/configs/at91sam9n12ek_spiflash_defconfig
> +++ b/configs/at91sam9n12ek_spiflash_defconfig
> @@ -51,7 +51,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
>   CONFIG_DEBUG_UART_ANNOUNCE=y
>   CONFIG_ATMEL_USART=y
>   CONFIG_DM_SPI=y
> -CONFIG_ATMEL_SPI=y
>   CONFIG_TIMER=y
>   CONFIG_ATMEL_PIT_TIMER=y
>   CONFIG_USB=y
> diff --git a/configs/at91sam9rlek_dataflash_defconfig b/configs/at91sam9rlek_dataflash_defconfig
> index e80d43c79d..7f3fd4d2f0 100644
> --- a/configs/at91sam9rlek_dataflash_defconfig
> +++ b/configs/at91sam9rlek_dataflash_defconfig
> @@ -48,7 +48,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
>   CONFIG_DEBUG_UART_ANNOUNCE=y
>   CONFIG_ATMEL_USART=y
>   CONFIG_DM_SPI=y
> -CONFIG_ATMEL_SPI=y
>   CONFIG_TIMER=y
>   CONFIG_ATMEL_PIT_TIMER=y
>   CONFIG_LCD=y
> diff --git a/configs/at91sam9rlek_mmc_defconfig b/configs/at91sam9rlek_mmc_defconfig
> index b18f2d42b0..84c9fa597f 100644
> --- a/configs/at91sam9rlek_mmc_defconfig
> +++ b/configs/at91sam9rlek_mmc_defconfig
> @@ -48,7 +48,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
>   CONFIG_DEBUG_UART_ANNOUNCE=y
>   CONFIG_ATMEL_USART=y
>   CONFIG_DM_SPI=y
> -CONFIG_ATMEL_SPI=y
>   CONFIG_TIMER=y
>   CONFIG_ATMEL_PIT_TIMER=y
>   CONFIG_LCD=y
> diff --git a/configs/at91sam9rlek_nandflash_defconfig b/configs/at91sam9rlek_nandflash_defconfig
> index 5e8c97d6f7..21b19587af 100644
> --- a/configs/at91sam9rlek_nandflash_defconfig
> +++ b/configs/at91sam9rlek_nandflash_defconfig
> @@ -48,7 +48,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
>   CONFIG_DEBUG_UART_ANNOUNCE=y
>   CONFIG_ATMEL_USART=y
>   CONFIG_DM_SPI=y
> -CONFIG_ATMEL_SPI=y
>   CONFIG_TIMER=y
>   CONFIG_ATMEL_PIT_TIMER=y
>   CONFIG_LCD=y
> diff --git a/configs/at91sam9x5ek_dataflash_defconfig b/configs/at91sam9x5ek_dataflash_defconfig
> index b4b25022ab..069cd2a6ae 100644
> --- a/configs/at91sam9x5ek_dataflash_defconfig
> +++ b/configs/at91sam9x5ek_dataflash_defconfig
> @@ -54,7 +54,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
>   CONFIG_DEBUG_UART_ANNOUNCE=y
>   CONFIG_ATMEL_USART=y
>   CONFIG_DM_SPI=y
> -CONFIG_ATMEL_SPI=y
>   CONFIG_TIMER=y
>   CONFIG_ATMEL_PIT_TIMER=y
>   CONFIG_USB=y
> diff --git a/configs/at91sam9x5ek_mmc_defconfig b/configs/at91sam9x5ek_mmc_defconfig
> index c8c027e94b..b7e050feb1 100644
> --- a/configs/at91sam9x5ek_mmc_defconfig
> +++ b/configs/at91sam9x5ek_mmc_defconfig
> @@ -54,7 +54,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
>   CONFIG_DEBUG_UART_ANNOUNCE=y
>   CONFIG_ATMEL_USART=y
>   CONFIG_DM_SPI=y
> -CONFIG_ATMEL_SPI=y
>   CONFIG_TIMER=y
>   CONFIG_ATMEL_PIT_TIMER=y
>   CONFIG_USB=y
> diff --git a/configs/at91sam9x5ek_nandflash_defconfig b/configs/at91sam9x5ek_nandflash_defconfig
> index 1fb3ff4f4e..3ad4729160 100644
> --- a/configs/at91sam9x5ek_nandflash_defconfig
> +++ b/configs/at91sam9x5ek_nandflash_defconfig
> @@ -54,7 +54,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
>   CONFIG_DEBUG_UART_ANNOUNCE=y
>   CONFIG_ATMEL_USART=y
>   CONFIG_DM_SPI=y
> -CONFIG_ATMEL_SPI=y
>   CONFIG_TIMER=y
>   CONFIG_ATMEL_PIT_TIMER=y
>   CONFIG_USB=y
> diff --git a/configs/at91sam9x5ek_spiflash_defconfig b/configs/at91sam9x5ek_spiflash_defconfig
> index 6848bccf29..fa400c898a 100644
> --- a/configs/at91sam9x5ek_spiflash_defconfig
> +++ b/configs/at91sam9x5ek_spiflash_defconfig
> @@ -54,7 +54,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
>   CONFIG_DEBUG_UART_ANNOUNCE=y
>   CONFIG_ATMEL_USART=y
>   CONFIG_DM_SPI=y
> -CONFIG_ATMEL_SPI=y
>   CONFIG_TIMER=y
>   CONFIG_ATMEL_PIT_TIMER=y
>   CONFIG_USB=y
> diff --git a/configs/at91sam9xeek_dataflash_cs0_defconfig b/configs/at91sam9xeek_dataflash_cs0_defconfig
> index c935a0ce7c..216ef83d94 100644
> --- a/configs/at91sam9xeek_dataflash_cs0_defconfig
> +++ b/configs/at91sam9xeek_dataflash_cs0_defconfig
> @@ -50,7 +50,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
>   CONFIG_DEBUG_UART_ANNOUNCE=y
>   CONFIG_ATMEL_USART=y
>   CONFIG_DM_SPI=y
> -CONFIG_ATMEL_SPI=y
>   CONFIG_TIMER=y
>   CONFIG_ATMEL_PIT_TIMER=y
>   CONFIG_USB=y
> diff --git a/configs/at91sam9xeek_dataflash_cs1_defconfig b/configs/at91sam9xeek_dataflash_cs1_defconfig
> index db34a9247f..42ff46ca5c 100644
> --- a/configs/at91sam9xeek_dataflash_cs1_defconfig
> +++ b/configs/at91sam9xeek_dataflash_cs1_defconfig
> @@ -50,7 +50,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
>   CONFIG_DEBUG_UART_ANNOUNCE=y
>   CONFIG_ATMEL_USART=y
>   CONFIG_DM_SPI=y
> -CONFIG_ATMEL_SPI=y
>   CONFIG_TIMER=y
>   CONFIG_ATMEL_PIT_TIMER=y
>   CONFIG_USB=y
> diff --git a/configs/at91sam9xeek_nandflash_defconfig b/configs/at91sam9xeek_nandflash_defconfig
> index 179ab02e26..0e2b544b08 100644
> --- a/configs/at91sam9xeek_nandflash_defconfig
> +++ b/configs/at91sam9xeek_nandflash_defconfig
> @@ -50,7 +50,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
>   CONFIG_DEBUG_UART_ANNOUNCE=y
>   CONFIG_ATMEL_USART=y
>   CONFIG_DM_SPI=y
> -CONFIG_ATMEL_SPI=y
>   CONFIG_TIMER=y
>   CONFIG_ATMEL_PIT_TIMER=y
>   CONFIG_USB=y
> diff --git a/configs/ethernut5_defconfig b/configs/ethernut5_defconfig
> index 888bed9b00..80ca4acfd7 100644
> --- a/configs/ethernut5_defconfig
> +++ b/configs/ethernut5_defconfig
> @@ -61,6 +61,5 @@ CONFIG_PINCTRL_AT91=y
>   CONFIG_DM_SERIAL=y
>   CONFIG_ATMEL_USART=y
>   CONFIG_DM_SPI=y
> -CONFIG_ATMEL_SPI=y
>   CONFIG_USB=y
>   CONFIG_USB_STORAGE=y
> diff --git a/configs/gurnard_defconfig b/configs/gurnard_defconfig
> index ce51a0348f..95ccbdefea 100644
> --- a/configs/gurnard_defconfig
> +++ b/configs/gurnard_defconfig
> @@ -27,7 +27,6 @@ CONFIG_ENV_IS_IN_NAND=y
>   CONFIG_BOOTP_BOOTPATH=y
>   CONFIG_BOOTP_GATEWAY=y
>   CONFIG_BOOTP_HOSTNAME=y
> -CONFIG_ATMEL_SPI=y
>   CONFIG_PHYLIB=y
>   CONFIG_TIMER=y
>   CONFIG_ATMEL_PIT_TIMER=y
> diff --git a/configs/meesc_dataflash_defconfig b/configs/meesc_dataflash_defconfig
> index f4b20fbf6a..4aa9602900 100644
> --- a/configs/meesc_dataflash_defconfig
> +++ b/configs/meesc_dataflash_defconfig
> @@ -36,4 +36,3 @@ CONFIG_PINCTRL_AT91=y
>   CONFIG_DM_SERIAL=y
>   CONFIG_ATMEL_USART=y
>   CONFIG_DM_SPI=y
> -CONFIG_ATMEL_SPI=y
> diff --git a/configs/meesc_defconfig b/configs/meesc_defconfig
> index e1e549693b..9d38247221 100644
> --- a/configs/meesc_defconfig
> +++ b/configs/meesc_defconfig
> @@ -37,4 +37,3 @@ CONFIG_PINCTRL_AT91=y
>   CONFIG_DM_SERIAL=y
>   CONFIG_ATMEL_USART=y
>   CONFIG_DM_SPI=y
> -CONFIG_ATMEL_SPI=y
> diff --git a/configs/pm9261_defconfig b/configs/pm9261_defconfig
> index 9570438aba..cd11aec4f5 100644
> --- a/configs/pm9261_defconfig
> +++ b/configs/pm9261_defconfig
> @@ -47,7 +47,6 @@ CONFIG_PINCTRL_AT91=y
>   CONFIG_DM_SERIAL=y
>   CONFIG_ATMEL_USART=y
>   CONFIG_DM_SPI=y
> -CONFIG_ATMEL_SPI=y
>   CONFIG_USB=y
>   CONFIG_USB_STORAGE=y
>   CONFIG_LCD=y
> diff --git a/configs/pm9263_defconfig b/configs/pm9263_defconfig
> index 38102dcb0d..7d9b3d235c 100644
> --- a/configs/pm9263_defconfig
> +++ b/configs/pm9263_defconfig
> @@ -45,7 +45,6 @@ CONFIG_SPI_FLASH_DATAFLASH=y
>   CONFIG_DM_SERIAL=y
>   CONFIG_ATMEL_USART=y
>   CONFIG_DM_SPI=y
> -CONFIG_ATMEL_SPI=y
>   CONFIG_USB=y
>   CONFIG_USB_STORAGE=y
>   CONFIG_LCD=y
> diff --git a/configs/sama5d27_som1_ek_mmc_defconfig b/configs/sama5d27_som1_ek_mmc_defconfig
> index b90a10c7d3..f0cbba06e8 100644
> --- a/configs/sama5d27_som1_ek_mmc_defconfig
> +++ b/configs/sama5d27_som1_ek_mmc_defconfig
> @@ -77,7 +77,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
>   CONFIG_DEBUG_UART_ANNOUNCE=y
>   CONFIG_ATMEL_USART=y
>   CONFIG_DM_SPI=y
> -CONFIG_ATMEL_SPI=y
>   CONFIG_TIMER=y
>   CONFIG_SPL_TIMER=y
>   CONFIG_ATMEL_PIT_TIMER=y
> diff --git a/configs/sama5d2_xplained_mmc_defconfig b/configs/sama5d2_xplained_mmc_defconfig
> index e112c31532..a6aa683e6a 100644
> --- a/configs/sama5d2_xplained_mmc_defconfig
> +++ b/configs/sama5d2_xplained_mmc_defconfig
> @@ -75,7 +75,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
>   CONFIG_DEBUG_UART_ANNOUNCE=y
>   CONFIG_ATMEL_USART=y
>   CONFIG_DM_SPI=y
> -CONFIG_ATMEL_SPI=y
>   CONFIG_TIMER=y
>   CONFIG_SPL_TIMER=y
>   CONFIG_ATMEL_PIT_TIMER=y
> diff --git a/configs/sama5d2_xplained_spiflash_defconfig b/configs/sama5d2_xplained_spiflash_defconfig
> index 232b6bfc6a..c9e0a2746e 100644
> --- a/configs/sama5d2_xplained_spiflash_defconfig
> +++ b/configs/sama5d2_xplained_spiflash_defconfig
> @@ -72,7 +72,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
>   CONFIG_DEBUG_UART_ANNOUNCE=y
>   CONFIG_ATMEL_USART=y
>   CONFIG_DM_SPI=y
> -CONFIG_ATMEL_SPI=y
>   CONFIG_TIMER=y
>   CONFIG_SPL_TIMER=y
>   CONFIG_ATMEL_PIT_TIMER=y
> diff --git a/configs/sama5d36ek_cmp_mmc_defconfig b/configs/sama5d36ek_cmp_mmc_defconfig
> index 5377f6da49..186f9f4bdb 100644
> --- a/configs/sama5d36ek_cmp_mmc_defconfig
> +++ b/configs/sama5d36ek_cmp_mmc_defconfig
> @@ -54,7 +54,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
>   CONFIG_DEBUG_UART_ANNOUNCE=y
>   CONFIG_ATMEL_USART=y
>   CONFIG_DM_SPI=y
> -CONFIG_ATMEL_SPI=y
>   CONFIG_TIMER=y
>   CONFIG_ATMEL_PIT_TIMER=y
>   CONFIG_DM_VIDEO=y
> diff --git a/configs/sama5d36ek_cmp_nandflash_defconfig b/configs/sama5d36ek_cmp_nandflash_defconfig
> index be75fb35b1..83bea11571 100644
> --- a/configs/sama5d36ek_cmp_nandflash_defconfig
> +++ b/configs/sama5d36ek_cmp_nandflash_defconfig
> @@ -54,7 +54,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
>   CONFIG_DEBUG_UART_ANNOUNCE=y
>   CONFIG_ATMEL_USART=y
>   CONFIG_DM_SPI=y
> -CONFIG_ATMEL_SPI=y
>   CONFIG_TIMER=y
>   CONFIG_ATMEL_PIT_TIMER=y
>   CONFIG_DM_VIDEO=y
> diff --git a/configs/sama5d36ek_cmp_spiflash_defconfig b/configs/sama5d36ek_cmp_spiflash_defconfig
> index fd9bf0c549..4d3b83c4f8 100644
> --- a/configs/sama5d36ek_cmp_spiflash_defconfig
> +++ b/configs/sama5d36ek_cmp_spiflash_defconfig
> @@ -54,7 +54,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
>   CONFIG_DEBUG_UART_ANNOUNCE=y
>   CONFIG_ATMEL_USART=y
>   CONFIG_DM_SPI=y
> -CONFIG_ATMEL_SPI=y
>   CONFIG_TIMER=y
>   CONFIG_ATMEL_PIT_TIMER=y
>   CONFIG_DM_VIDEO=y
> diff --git a/configs/sama5d3xek_mmc_defconfig b/configs/sama5d3xek_mmc_defconfig
> index f9aff19e0c..e643eb39e6 100644
> --- a/configs/sama5d3xek_mmc_defconfig
> +++ b/configs/sama5d3xek_mmc_defconfig
> @@ -76,7 +76,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
>   CONFIG_DEBUG_UART_ANNOUNCE=y
>   CONFIG_ATMEL_USART=y
>   CONFIG_DM_SPI=y
> -CONFIG_ATMEL_SPI=y
>   CONFIG_TIMER=y
>   CONFIG_SPL_TIMER=y
>   CONFIG_ATMEL_PIT_TIMER=y
> diff --git a/configs/sama5d3xek_nandflash_defconfig b/configs/sama5d3xek_nandflash_defconfig
> index 49b229ca08..775fbb51d9 100644
> --- a/configs/sama5d3xek_nandflash_defconfig
> +++ b/configs/sama5d3xek_nandflash_defconfig
> @@ -71,7 +71,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
>   CONFIG_DEBUG_UART_ANNOUNCE=y
>   CONFIG_ATMEL_USART=y
>   CONFIG_DM_SPI=y
> -CONFIG_ATMEL_SPI=y
>   CONFIG_TIMER=y
>   CONFIG_SPL_TIMER=y
>   CONFIG_ATMEL_PIT_TIMER=y
> diff --git a/configs/sama5d3xek_spiflash_defconfig b/configs/sama5d3xek_spiflash_defconfig
> index 607e997f79..1f0dbc3c22 100644
> --- a/configs/sama5d3xek_spiflash_defconfig
> +++ b/configs/sama5d3xek_spiflash_defconfig
> @@ -70,7 +70,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
>   CONFIG_DEBUG_UART_ANNOUNCE=y
>   CONFIG_ATMEL_USART=y
>   CONFIG_DM_SPI=y
> -CONFIG_ATMEL_SPI=y
>   CONFIG_TIMER=y
>   CONFIG_SPL_TIMER=y
>   CONFIG_ATMEL_PIT_TIMER=y
> diff --git a/configs/sama5d4_xplained_mmc_defconfig b/configs/sama5d4_xplained_mmc_defconfig
> index e850a2dd43..ece2b449c6 100644
> --- a/configs/sama5d4_xplained_mmc_defconfig
> +++ b/configs/sama5d4_xplained_mmc_defconfig
> @@ -71,7 +71,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
>   CONFIG_DEBUG_UART_ANNOUNCE=y
>   CONFIG_ATMEL_USART=y
>   CONFIG_DM_SPI=y
> -CONFIG_ATMEL_SPI=y
>   CONFIG_TIMER=y
>   CONFIG_SPL_TIMER=y
>   CONFIG_ATMEL_PIT_TIMER=y
> diff --git a/configs/sama5d4_xplained_nandflash_defconfig b/configs/sama5d4_xplained_nandflash_defconfig
> index 9c8eedfbaa..b9a4930680 100644
> --- a/configs/sama5d4_xplained_nandflash_defconfig
> +++ b/configs/sama5d4_xplained_nandflash_defconfig
> @@ -68,7 +68,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
>   CONFIG_DEBUG_UART_ANNOUNCE=y
>   CONFIG_ATMEL_USART=y
>   CONFIG_DM_SPI=y
> -CONFIG_ATMEL_SPI=y
>   CONFIG_TIMER=y
>   CONFIG_SPL_TIMER=y
>   CONFIG_ATMEL_PIT_TIMER=y
> diff --git a/configs/sama5d4_xplained_spiflash_defconfig b/configs/sama5d4_xplained_spiflash_defconfig
> index a2411abe7d..e96bc73dfb 100644
> --- a/configs/sama5d4_xplained_spiflash_defconfig
> +++ b/configs/sama5d4_xplained_spiflash_defconfig
> @@ -70,7 +70,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
>   CONFIG_DEBUG_UART_ANNOUNCE=y
>   CONFIG_ATMEL_USART=y
>   CONFIG_DM_SPI=y
> -CONFIG_ATMEL_SPI=y
>   CONFIG_TIMER=y
>   CONFIG_SPL_TIMER=y
>   CONFIG_ATMEL_PIT_TIMER=y
> diff --git a/configs/sama5d4ek_mmc_defconfig b/configs/sama5d4ek_mmc_defconfig
> index 12b73138c0..7dc1a7ae35 100644
> --- a/configs/sama5d4ek_mmc_defconfig
> +++ b/configs/sama5d4ek_mmc_defconfig
> @@ -71,7 +71,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
>   CONFIG_DEBUG_UART_ANNOUNCE=y
>   CONFIG_ATMEL_USART=y
>   CONFIG_DM_SPI=y
> -CONFIG_ATMEL_SPI=y
>   CONFIG_TIMER=y
>   CONFIG_SPL_TIMER=y
>   CONFIG_ATMEL_PIT_TIMER=y
> diff --git a/configs/sama5d4ek_nandflash_defconfig b/configs/sama5d4ek_nandflash_defconfig
> index ed24e1724a..8e845586a2 100644
> --- a/configs/sama5d4ek_nandflash_defconfig
> +++ b/configs/sama5d4ek_nandflash_defconfig
> @@ -68,7 +68,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
>   CONFIG_DEBUG_UART_ANNOUNCE=y
>   CONFIG_ATMEL_USART=y
>   CONFIG_DM_SPI=y
> -CONFIG_ATMEL_SPI=y
>   CONFIG_TIMER=y
>   CONFIG_SPL_TIMER=y
>   CONFIG_ATMEL_PIT_TIMER=y
> diff --git a/configs/sama5d4ek_spiflash_defconfig b/configs/sama5d4ek_spiflash_defconfig
> index 9e63c4fb25..e533fd6ef2 100644
> --- a/configs/sama5d4ek_spiflash_defconfig
> +++ b/configs/sama5d4ek_spiflash_defconfig
> @@ -67,7 +67,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
>   CONFIG_DEBUG_UART_ANNOUNCE=y
>   CONFIG_ATMEL_USART=y
>   CONFIG_DM_SPI=y
> -CONFIG_ATMEL_SPI=y
>   CONFIG_TIMER=y
>   CONFIG_SPL_TIMER=y
>   CONFIG_ATMEL_PIT_TIMER=y
> diff --git a/configs/usb_a9263_dataflash_defconfig b/configs/usb_a9263_dataflash_defconfig
> index fc0ed319f2..ac3f3e2e58 100644
> --- a/configs/usb_a9263_dataflash_defconfig
> +++ b/configs/usb_a9263_dataflash_defconfig
> @@ -42,4 +42,3 @@ CONFIG_PINCTRL_AT91=y
>   CONFIG_DM_SERIAL=y
>   CONFIG_ATMEL_USART=y
>   CONFIG_DM_SPI=y
> -CONFIG_ATMEL_SPI=y
> diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig
> index a3b4a0b2f0..12dde8fb95 100644
> --- a/drivers/spi/Kconfig
> +++ b/drivers/spi/Kconfig
> @@ -41,7 +41,7 @@ config ATH79_SPI
>   
>   config ATMEL_SPI
>   	bool "Atmel SPI driver"
> -	depends on ARCH_AT91
> +	default y if ARCH_AT91
>   	help
>   	  This enables driver for the Atmel SPI Controller, present on
>   	  many AT91 (ARM) chips. This driver can be used to access
> diff --git a/include/configs/ma5d4evk.h b/include/configs/ma5d4evk.h
> index 4cba7580a2..68fe3bd67f 100644
> --- a/include/configs/ma5d4evk.h
> +++ b/include/configs/ma5d4evk.h
> @@ -86,7 +86,6 @@
>    * SPI NOR (boot memory)
>    */
>   #ifdef CONFIG_CMD_SF
> -#define CONFIG_ATMEL_SPI
>   #define CONFIG_SPI_FLASH_ATMEL
>   #define CONFIG_SF_DEFAULT_BUS		0
>   #define CONFIG_SF_DEFAULT_CS		0
> diff --git a/include/configs/taurus.h b/include/configs/taurus.h
> index 51e3987ab3..f138bd2238 100644
> --- a/include/configs/taurus.h
> +++ b/include/configs/taurus.h
> @@ -118,7 +118,6 @@
>   
>   /* SPI EEPROM */
>   #define CONFIG_SPI
> -#define CONFIG_ATMEL_SPI
>   #define TAURUS_SPI_MASK (1 << 4)
>   #define TAURUS_SPI_CS_PIN	AT91_PIN_PA3
>   
> diff --git a/include/configs/vinco.h b/include/configs/vinco.h
> index 3ae7e9e75b..d1b56ac037 100644
> --- a/include/configs/vinco.h
> +++ b/include/configs/vinco.h
> @@ -38,7 +38,6 @@
>   /* SerialFlash */
>   
>   #ifdef CONFIG_CMD_SF
> -#define CONFIG_ATMEL_SPI
>   #define CONFIG_SPI_FLASH_STMICRO
>   #define CONFIG_SF_DEFAULT_BUS		0
>   #define CONFIG_SF_DEFAULT_CS		0

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [U-Boot] [U-Boot,01/14] spi: atmel: Add ifdef for DM_GPIO code
  2018-03-14 13:16 ` [U-Boot] [PATCH 01/14] spi: atmel: Add ifdef for DM_GPIO code Jagan Teki
  2018-03-21  4:08   ` Wenyou Yang
@ 2018-04-06 20:28   ` Tom Rini
  1 sibling, 0 replies; 37+ messages in thread
From: Tom Rini @ 2018-04-06 20:28 UTC (permalink / raw)
  To: u-boot

On Wed, Mar 14, 2018 at 06:46:31PM +0530, Jagan Teki wrote:

> Few boards are configuring gpio directly from board instead
> using drivers/gpio so add ifdef for DM_GPIO to compatible
> for both the cases.
> 
> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
> Acked-by: Wenyou Yang <wenyouya@gmail.com>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180406/b2ed72ca/attachment.sig>

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [U-Boot] [U-Boot,02/14] at91: gurnard: Enable DM_SPI
  2018-03-14 13:16 ` [U-Boot] [PATCH 02/14] at91: gurnard: Enable DM_SPI Jagan Teki
@ 2018-04-06 20:28   ` Tom Rini
  0 siblings, 0 replies; 37+ messages in thread
From: Tom Rini @ 2018-04-06 20:28 UTC (permalink / raw)
  To: u-boot

On Wed, Mar 14, 2018 at 06:46:32PM +0530, Jagan Teki wrote:

> Enable DM_SPI for atmel SPI driver on gurnard board.
> 
> Cc: Simon Glass <sjg@chromium.org>
> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180406/730811ff/attachment.sig>

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [U-Boot] [U-Boot, 03/14] configs: gurnard: Move CONFIG_ATMEL_SPI to defconfigs
  2018-03-14 13:16 ` [U-Boot] [PATCH 03/14] configs: gurnard: Move CONFIG_ATMEL_SPI to defconfigs Jagan Teki
  2018-03-21  4:09   ` Wenyou Yang
@ 2018-04-06 20:29   ` Tom Rini
  1 sibling, 0 replies; 37+ messages in thread
From: Tom Rini @ 2018-04-06 20:29 UTC (permalink / raw)
  To: u-boot

On Wed, Mar 14, 2018 at 06:46:33PM +0530, Jagan Teki wrote:

> Now CONFIG_ATMEL_SPI is defined in Kconfig, so move the
> same into defconfig file.
> 
> Cc: Simon Glass <sjg@chromium.org>
> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
> Acked-by: Wenyou Yang <wenyouya@gmail.com>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180406/e41a35d2/attachment.sig>

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [U-Boot] [U-Boot,04/14] at91: taurus: Enable DM_SPI
  2018-03-14 13:16 ` [U-Boot] [PATCH 04/14] at91: taurus: Enable DM_SPI Jagan Teki
@ 2018-04-06 20:29   ` Tom Rini
  0 siblings, 0 replies; 37+ messages in thread
From: Tom Rini @ 2018-04-06 20:29 UTC (permalink / raw)
  To: u-boot

On Wed, Mar 14, 2018 at 06:46:34PM +0530, Jagan Teki wrote:

> Enable DM_SPI for atmel SPI driver on taurus board.
> 
> Kept few functions related to non-dm and gpio on board
> files for reference and will be remove once code moved
> to relevant drivers.
> 
> Cc: Heiko Schocher <hs@denx.de>
> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180406/8265eb2b/attachment.sig>

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [U-Boot] [U-Boot,05/14] at91: vinco: Enable DM
  2018-03-14 13:16 ` [U-Boot] [PATCH 05/14] at91: vinco: Enable DM Jagan Teki
@ 2018-04-06 20:29   ` Tom Rini
  0 siblings, 0 replies; 37+ messages in thread
From: Tom Rini @ 2018-04-06 20:29 UTC (permalink / raw)
  To: u-boot

On Wed, Mar 14, 2018 at 06:46:35PM +0530, Jagan Teki wrote:

> Enable Driver model for AT91 Vinco boards.
> 
> Cc: Gregory CLEMENT <gregory.clement@free-electrons.com>
> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180406/2fbf72d0/attachment.sig>

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [U-Boot] [U-Boot,06/14] at91: vinco: Add FDT support
  2018-03-14 13:16 ` [U-Boot] [PATCH 06/14] at91: vinco: Add FDT support Jagan Teki
@ 2018-04-06 20:29   ` Tom Rini
  0 siblings, 0 replies; 37+ messages in thread
From: Tom Rini @ 2018-04-06 20:29 UTC (permalink / raw)
  To: u-boot

On Wed, Mar 14, 2018 at 06:46:36PM +0530, Jagan Teki wrote:

> Sync DTS from Linux and add FDT support for AT91 vinco board.
> 
> usb0, usb1, and usb2 nodes removed, since there is no support it.
> 
> Cc: Gregory CLEMENT <gregory.clement@free-electrons.com>
> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180406/10985aaa/attachment.sig>

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [U-Boot] [U-Boot,07/14] at91: vinco: Enable DM_SPI
  2018-03-14 13:16 ` [U-Boot] [PATCH 07/14] at91: vinco: Enable DM_SPI Jagan Teki
@ 2018-04-06 20:29   ` Tom Rini
  0 siblings, 0 replies; 37+ messages in thread
From: Tom Rini @ 2018-04-06 20:29 UTC (permalink / raw)
  To: u-boot

On Wed, Mar 14, 2018 at 06:46:37PM +0530, Jagan Teki wrote:

> AT91 Vinco board uses atmel spi driver, enable DM_SPI to
> use dm functionality.
> 
> Cc: Gregory CLEMENT <gregory.clement@free-electrons.com>
> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180406/19ca437c/attachment.sig>

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [U-Boot] [U-Boot,08/14] at91: ma5d4evk: Enable DM
  2018-03-14 13:16 ` [U-Boot] [PATCH 08/14] at91: ma5d4evk: Enable DM Jagan Teki
@ 2018-04-06 20:29   ` Tom Rini
  0 siblings, 0 replies; 37+ messages in thread
From: Tom Rini @ 2018-04-06 20:29 UTC (permalink / raw)
  To: u-boot

On Wed, Mar 14, 2018 at 06:46:38PM +0530, Jagan Teki wrote:

> Enable Driver model for AT91 ma5d4evk boards.
> 
> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180406/1a4d3b89/attachment.sig>

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [U-Boot] [U-Boot,09/14] at91: ma5d4evk: Add FDT support
  2018-03-14 13:16 ` [U-Boot] [PATCH 09/14] at91: ma5d4evk: Add FDT support Jagan Teki
@ 2018-04-06 20:29   ` Tom Rini
  0 siblings, 0 replies; 37+ messages in thread
From: Tom Rini @ 2018-04-06 20:29 UTC (permalink / raw)
  To: u-boot

On Wed, Mar 14, 2018 at 06:46:39PM +0530, Jagan Teki wrote:

> Sync DTS from Linux and add FDT support for AT91 ma5d4evk board.
> 
> usb0, usb1, usb2 and hlcdc_pwm nodes removed, since there is no support it.
> 
> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180406/504f3601/attachment.sig>

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [U-Boot] [U-Boot,10/14] at91: ma5d4evk: Enable DM_SPI
  2018-03-14 13:16 ` [U-Boot] [PATCH 10/14] at91: ma5d4evk: Enable DM_SPI Jagan Teki
@ 2018-04-06 20:29   ` Tom Rini
  0 siblings, 0 replies; 37+ messages in thread
From: Tom Rini @ 2018-04-06 20:29 UTC (permalink / raw)
  To: u-boot

On Wed, Mar 14, 2018 at 06:46:40PM +0530, Jagan Teki wrote:

> AT91 ma5d4evk board uses atmel spi driver, enable DM_SPI to
> use dm functionality.
> 
> Kept few functions related to non-dm and gpio on board
> files for reference and will be remove once code moved
> to relevant drivers.
> 
> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180406/eeabc4c6/attachment.sig>

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [U-Boot] [U-Boot, 11/14] at91: ma5d4evk: Enable SPL_DM and SPL_OF_CONTROL
  2018-03-14 13:16 ` [U-Boot] [PATCH 11/14] at91: ma5d4evk: Enable SPL_DM and SPL_OF_CONTROL Jagan Teki
@ 2018-04-06 20:29   ` Tom Rini
  0 siblings, 0 replies; 37+ messages in thread
From: Tom Rini @ 2018-04-06 20:29 UTC (permalink / raw)
  To: u-boot

On Wed, Mar 14, 2018 at 06:46:41PM +0530, Jagan Teki wrote:

> Enable SPL Driver model and FDT support for AT91 ma5d4evk boards.
> 
> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180406/54a0e8e8/attachment.sig>

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [U-Boot] [U-Boot,12/14] spi: atmel: Drop non-dm code
  2018-03-14 13:16 ` [U-Boot] [PATCH 12/14] spi: atmel: Drop non-dm code Jagan Teki
  2018-03-21  4:10   ` Wenyou Yang
@ 2018-04-06 20:29   ` Tom Rini
  2018-04-07 13:24     ` Tom Rini
  1 sibling, 1 reply; 37+ messages in thread
From: Tom Rini @ 2018-04-06 20:29 UTC (permalink / raw)
  To: u-boot

On Wed, Mar 14, 2018 at 06:46:42PM +0530, Jagan Teki wrote:

> All board configs are now enabled DM_SPI for SPL and
> U-Boot proper, so now its time to drop non-dm code.
> 
> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
> Acked-by: Wenyou Yang <wenyouya@gmail.com>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180406/1f8d89a2/attachment.sig>

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [U-Boot] [U-Boot,13/14] spi: atmel: Drop atmel_spi.h
  2018-03-14 13:16 ` [U-Boot] [PATCH 13/14] spi: atmel: Drop atmel_spi.h Jagan Teki
  2018-03-21  4:11   ` Wenyou Yang
@ 2018-04-06 20:29   ` Tom Rini
  2018-04-07 13:24     ` Tom Rini
  1 sibling, 1 reply; 37+ messages in thread
From: Tom Rini @ 2018-04-06 20:29 UTC (permalink / raw)
  To: u-boot

On Wed, Mar 14, 2018 at 06:46:43PM +0530, Jagan Teki wrote:

> atmel_spi.h has register offsets, and atmel_spi_slave
> structure, move it into .c file for better readability
> and drop atmel_spi.h
> 
> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
> Acked-by: Wenyou Yang <wenyouya@gmail.com>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180406/efd3940e/attachment.sig>

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [U-Boot] [U-Boot, 14/14] spi: atmel: default y if DM_SPI && ARCH_AT91
  2018-03-14 13:16 ` [U-Boot] [PATCH 14/14] spi: atmel: default y if DM_SPI && ARCH_AT91 Jagan Teki
  2018-03-21  4:13   ` Wenyou Yang
@ 2018-04-06 20:29   ` Tom Rini
  1 sibling, 0 replies; 37+ messages in thread
From: Tom Rini @ 2018-04-06 20:29 UTC (permalink / raw)
  To: u-boot

On Wed, Mar 14, 2018 at 06:46:44PM +0530, Jagan Teki wrote:

> ATMEL_SPI is now fully converted to driver-model and
> respective boards switch to DM_SPI as well,
> so make default y for ARCH_AT91
> 
> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
> Acked-by: Wenyou Yang <wenyouya@gmail.com>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180406/81e865ae/attachment.sig>

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [U-Boot] [U-Boot,12/14] spi: atmel: Drop non-dm code
  2018-04-06 20:29   ` [U-Boot] [U-Boot,12/14] " Tom Rini
@ 2018-04-07 13:24     ` Tom Rini
  0 siblings, 0 replies; 37+ messages in thread
From: Tom Rini @ 2018-04-07 13:24 UTC (permalink / raw)
  To: u-boot

On Fri, Apr 06, 2018 at 04:29:47PM -0400, Tom Rini wrote:
> On Wed, Mar 14, 2018 at 06:46:42PM +0530, Jagan Teki wrote:
> 
> > All board configs are now enabled DM_SPI for SPL and
> > U-Boot proper, so now its time to drop non-dm code.
> > 
> > Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
> > Acked-by: Wenyou Yang <wenyouya@gmail.com>
> 
> Applied to u-boot/master, thanks!

Ah, oops, until we sort out how to handle the taurus boards, this was
premature, sorry, reverting.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180407/453dd705/attachment.sig>

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [U-Boot] [U-Boot,13/14] spi: atmel: Drop atmel_spi.h
  2018-04-06 20:29   ` [U-Boot] [U-Boot,13/14] " Tom Rini
@ 2018-04-07 13:24     ` Tom Rini
  0 siblings, 0 replies; 37+ messages in thread
From: Tom Rini @ 2018-04-07 13:24 UTC (permalink / raw)
  To: u-boot

On Fri, Apr 06, 2018 at 04:29:50PM -0400, Tom Rini wrote:
> On Wed, Mar 14, 2018 at 06:46:43PM +0530, Jagan Teki wrote:
> 
> > atmel_spi.h has register offsets, and atmel_spi_slave
> > structure, move it into .c file for better readability
> > and drop atmel_spi.h
> > 
> > Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
> > Acked-by: Wenyou Yang <wenyouya@gmail.com>
> 
> Applied to u-boot/master, thanks!

Ah, oops, until we sort out how to handle the taurus boards, this was
premature, sorry, reverting.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180407/79c3432b/attachment.sig>

^ permalink raw reply	[flat|nested] 37+ messages in thread

end of thread, other threads:[~2018-04-07 13:24 UTC | newest]

Thread overview: 37+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-14 13:16 [U-Boot] [PATCH 00/14] at91: Add boards with OF_CONTROL/DM/DM_SPI Jagan Teki
2018-03-14 13:16 ` [U-Boot] [PATCH 01/14] spi: atmel: Add ifdef for DM_GPIO code Jagan Teki
2018-03-21  4:08   ` Wenyou Yang
2018-04-06 20:28   ` [U-Boot] [U-Boot,01/14] " Tom Rini
2018-03-14 13:16 ` [U-Boot] [PATCH 02/14] at91: gurnard: Enable DM_SPI Jagan Teki
2018-04-06 20:28   ` [U-Boot] [U-Boot,02/14] " Tom Rini
2018-03-14 13:16 ` [U-Boot] [PATCH 03/14] configs: gurnard: Move CONFIG_ATMEL_SPI to defconfigs Jagan Teki
2018-03-21  4:09   ` Wenyou Yang
2018-04-06 20:29   ` [U-Boot] [U-Boot, " Tom Rini
2018-03-14 13:16 ` [U-Boot] [PATCH 04/14] at91: taurus: Enable DM_SPI Jagan Teki
2018-04-06 20:29   ` [U-Boot] [U-Boot,04/14] " Tom Rini
2018-03-14 13:16 ` [U-Boot] [PATCH 05/14] at91: vinco: Enable DM Jagan Teki
2018-04-06 20:29   ` [U-Boot] [U-Boot,05/14] " Tom Rini
2018-03-14 13:16 ` [U-Boot] [PATCH 06/14] at91: vinco: Add FDT support Jagan Teki
2018-04-06 20:29   ` [U-Boot] [U-Boot,06/14] " Tom Rini
2018-03-14 13:16 ` [U-Boot] [PATCH 07/14] at91: vinco: Enable DM_SPI Jagan Teki
2018-04-06 20:29   ` [U-Boot] [U-Boot,07/14] " Tom Rini
2018-03-14 13:16 ` [U-Boot] [PATCH 08/14] at91: ma5d4evk: Enable DM Jagan Teki
2018-04-06 20:29   ` [U-Boot] [U-Boot,08/14] " Tom Rini
2018-03-14 13:16 ` [U-Boot] [PATCH 09/14] at91: ma5d4evk: Add FDT support Jagan Teki
2018-04-06 20:29   ` [U-Boot] [U-Boot,09/14] " Tom Rini
2018-03-14 13:16 ` [U-Boot] [PATCH 10/14] at91: ma5d4evk: Enable DM_SPI Jagan Teki
2018-04-06 20:29   ` [U-Boot] [U-Boot,10/14] " Tom Rini
2018-03-14 13:16 ` [U-Boot] [PATCH 11/14] at91: ma5d4evk: Enable SPL_DM and SPL_OF_CONTROL Jagan Teki
2018-04-06 20:29   ` [U-Boot] [U-Boot, " Tom Rini
2018-03-14 13:16 ` [U-Boot] [PATCH 12/14] spi: atmel: Drop non-dm code Jagan Teki
2018-03-21  4:10   ` Wenyou Yang
2018-04-06 20:29   ` [U-Boot] [U-Boot,12/14] " Tom Rini
2018-04-07 13:24     ` Tom Rini
2018-03-14 13:16 ` [U-Boot] [PATCH 13/14] spi: atmel: Drop atmel_spi.h Jagan Teki
2018-03-21  4:11   ` Wenyou Yang
2018-04-06 20:29   ` [U-Boot] [U-Boot,13/14] " Tom Rini
2018-04-07 13:24     ` Tom Rini
2018-03-14 13:16 ` [U-Boot] [PATCH 14/14] spi: atmel: default y if DM_SPI && ARCH_AT91 Jagan Teki
2018-03-21  4:13   ` Wenyou Yang
2018-04-06 20:29   ` [U-Boot] [U-Boot, " Tom Rini
2018-03-15  9:43 ` [U-Boot] [PATCH 00/14] at91: Add boards with OF_CONTROL/DM/DM_SPI Jagan Teki

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.