public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v3 1/3] spi: Kconfig: Enable SPI_SUNXI for SUNXI
@ 2019-10-16 16:22 Jagan Teki
  2019-10-16 16:22 ` [U-Boot] [PATCH v3 2/3] arm: sunxi: Enable SPI/SPI-FLASH support for A64 Jagan Teki
  2019-10-16 16:22 ` [U-Boot] [PATCH v3 3/3] configs: sopine-baseboard: Enable SPI-FLASH Jagan Teki
  0 siblings, 2 replies; 5+ messages in thread
From: Jagan Teki @ 2019-10-16 16:22 UTC (permalink / raw)
  To: u-boot

SPI_SUNXI driver is fully dm-aware and the Allwinner
architecture kconfig would have logic to enable the
DM_SPI. So, select default spi sunxi driver for
sunxi architecture.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
Changes for v3:
- none

 drivers/spi/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig
index 0152dff74f..7be867d5b6 100644
--- a/drivers/spi/Kconfig
+++ b/drivers/spi/Kconfig
@@ -260,6 +260,7 @@ config SPI_SIFIVE
 
 config SPI_SUNXI
 	bool "Allwinner SoC SPI controllers"
+	default ARCH_SUNXI
 	help
 	  Enable the Allwinner SoC SPi controller driver.
 
-- 
2.18.0.321.gffc6fa0e3

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

* [U-Boot] [PATCH v3 2/3] arm: sunxi: Enable SPI/SPI-FLASH support for A64
  2019-10-16 16:22 [U-Boot] [PATCH v3 1/3] spi: Kconfig: Enable SPI_SUNXI for SUNXI Jagan Teki
@ 2019-10-16 16:22 ` Jagan Teki
  2019-10-16 16:22 ` [U-Boot] [PATCH v3 3/3] configs: sopine-baseboard: Enable SPI-FLASH Jagan Teki
  1 sibling, 0 replies; 5+ messages in thread
From: Jagan Teki @ 2019-10-16 16:22 UTC (permalink / raw)
  To: u-boot

SPI is available in Allwinner A64 SoC, so enable it
globally in Kconfig.

- CONFIG_SPI
- CONFIG_DM_SPI
- CONFIG_DM_SPI_FLASH

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
Changes for v3:
- Move to kconfig from defconfig

 arch/arm/mach-sunxi/Kconfig | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig
index b153c68acc..2d09be4639 100644
--- a/arch/arm/mach-sunxi/Kconfig
+++ b/arch/arm/mach-sunxi/Kconfig
@@ -275,7 +275,10 @@ config MACH_SUN9I
 config MACH_SUN50I
 	bool "sun50i (Allwinner A64)"
 	select ARM64
+	select SPI
 	select DM_I2C
+	select DM_SPI if SPI
+	select DM_SPI_FLASH
 	select PHY_SUN4I_USB
 	select SUN6I_PRCM
 	select SUNXI_DE2
-- 
2.18.0.321.gffc6fa0e3

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

* [U-Boot] [PATCH v3 3/3] configs: sopine-baseboard: Enable SPI-FLASH
  2019-10-16 16:22 [U-Boot] [PATCH v3 1/3] spi: Kconfig: Enable SPI_SUNXI for SUNXI Jagan Teki
  2019-10-16 16:22 ` [U-Boot] [PATCH v3 2/3] arm: sunxi: Enable SPI/SPI-FLASH support for A64 Jagan Teki
@ 2019-10-16 16:22 ` Jagan Teki
  2019-10-20  6:24   ` Vasily Khoruzhick
  1 sibling, 1 reply; 5+ messages in thread
From: Jagan Teki @ 2019-10-16 16:22 UTC (permalink / raw)
  To: u-boot

SoPine has winbond SPI-FLASH, so enable the same in defconfig
and add aliases for spi0 in -u-boot.dtsi

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
Changes for v3:
- none

 arch/arm/dts/sun50i-a64-sopine-baseboard-u-boot.dtsi | 12 ++++++++++++
 configs/sopine_baseboard_defconfig                   |  1 +
 2 files changed, 13 insertions(+)
 create mode 100644 arch/arm/dts/sun50i-a64-sopine-baseboard-u-boot.dtsi

diff --git a/arch/arm/dts/sun50i-a64-sopine-baseboard-u-boot.dtsi b/arch/arm/dts/sun50i-a64-sopine-baseboard-u-boot.dtsi
new file mode 100644
index 0000000000..02b1ae046e
--- /dev/null
+++ b/arch/arm/dts/sun50i-a64-sopine-baseboard-u-boot.dtsi
@@ -0,0 +1,12 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright (C) 2018 Jagan Teki <jagan@amarulasolutions.com>
+ */
+
+#include "sunxi-u-boot.dtsi"
+
+/ {
+	aliases {
+		spi0 = &spi0;
+	};
+};
diff --git a/configs/sopine_baseboard_defconfig b/configs/sopine_baseboard_defconfig
index 5833234b63..c9123fd7ee 100644
--- a/configs/sopine_baseboard_defconfig
+++ b/configs/sopine_baseboard_defconfig
@@ -10,6 +10,7 @@ CONFIG_DRAM_ZQ=3881949
 CONFIG_MMC0_CD_PIN=""
 CONFIG_MMC_SUNXI_SLOT_EXTRA=2
 CONFIG_SPL_SPI_SUNXI=y
+CONFIG_SPI_FLASH_WINBOND=y
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_USE_PREBOOT=y
 CONFIG_SYS_SPI_U_BOOT_OFFS=0x8000
-- 
2.18.0.321.gffc6fa0e3

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

* [U-Boot] [PATCH v3 3/3] configs: sopine-baseboard: Enable SPI-FLASH
  2019-10-16 16:22 ` [U-Boot] [PATCH v3 3/3] configs: sopine-baseboard: Enable SPI-FLASH Jagan Teki
@ 2019-10-20  6:24   ` Vasily Khoruzhick
  2019-10-21 18:21     ` Jagan Teki
  0 siblings, 1 reply; 5+ messages in thread
From: Vasily Khoruzhick @ 2019-10-20  6:24 UTC (permalink / raw)
  To: u-boot

On Wed, Oct 16, 2019 at 9:23 AM Jagan Teki <jagan@amarulasolutions.com> wrote:
>
> SoPine has winbond SPI-FLASH, so enable the same in defconfig
> and add aliases for spi0 in -u-boot.dtsi
>
> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
> ---
> Changes for v3:
> - none
>
>  arch/arm/dts/sun50i-a64-sopine-baseboard-u-boot.dtsi | 12 ++++++++++++
>  configs/sopine_baseboard_defconfig                   |  1 +
>  2 files changed, 13 insertions(+)
>  create mode 100644 arch/arm/dts/sun50i-a64-sopine-baseboard-u-boot.dtsi
>
> diff --git a/arch/arm/dts/sun50i-a64-sopine-baseboard-u-boot.dtsi b/arch/arm/dts/sun50i-a64-sopine-baseboard-u-boot.dtsi
> new file mode 100644
> index 0000000000..02b1ae046e
> --- /dev/null
> +++ b/arch/arm/dts/sun50i-a64-sopine-baseboard-u-boot.dtsi
> @@ -0,0 +1,12 @@
> +// SPDX-License-Identifier: GPL-2.0+
> +/*
> + * Copyright (C) 2018 Jagan Teki <jagan@amarulasolutions.com>
> + */
> +
> +#include "sunxi-u-boot.dtsi"
> +
> +/ {
> +       aliases {
> +               spi0 = &spi0;
> +       };
> +};
> diff --git a/configs/sopine_baseboard_defconfig b/configs/sopine_baseboard_defconfig
> index 5833234b63..c9123fd7ee 100644
> --- a/configs/sopine_baseboard_defconfig
> +++ b/configs/sopine_baseboard_defconfig
> @@ -10,6 +10,7 @@ CONFIG_DRAM_ZQ=3881949
>  CONFIG_MMC0_CD_PIN=""
>  CONFIG_MMC_SUNXI_SLOT_EXTRA=2
>  CONFIG_SPL_SPI_SUNXI=y
> +CONFIG_SPI_FLASH_WINBOND=y

You also need to set CONFIG_SPI_FLASH since it's not set by default
and CONFIG_SPI_FLASH_WINBOND depends on CONFIG_SPI_FLASH.




>  # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
>  CONFIG_USE_PREBOOT=y
>  CONFIG_SYS_SPI_U_BOOT_OFFS=0x8000
> --
> 2.18.0.321.gffc6fa0e3
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> https://lists.denx.de/listinfo/u-boot

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

* [U-Boot] [PATCH v3 3/3] configs: sopine-baseboard: Enable SPI-FLASH
  2019-10-20  6:24   ` Vasily Khoruzhick
@ 2019-10-21 18:21     ` Jagan Teki
  0 siblings, 0 replies; 5+ messages in thread
From: Jagan Teki @ 2019-10-21 18:21 UTC (permalink / raw)
  To: u-boot

On Sun, Oct 20, 2019 at 11:54 AM Vasily Khoruzhick <anarsoul@gmail.com> wrote:
>
> On Wed, Oct 16, 2019 at 9:23 AM Jagan Teki <jagan@amarulasolutions.com> wrote:
> >
> > SoPine has winbond SPI-FLASH, so enable the same in defconfig
> > and add aliases for spi0 in -u-boot.dtsi
> >
> > Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
> > ---
> > Changes for v3:
> > - none
> >
> >  arch/arm/dts/sun50i-a64-sopine-baseboard-u-boot.dtsi | 12 ++++++++++++
> >  configs/sopine_baseboard_defconfig                   |  1 +
> >  2 files changed, 13 insertions(+)
> >  create mode 100644 arch/arm/dts/sun50i-a64-sopine-baseboard-u-boot.dtsi
> >
> > diff --git a/arch/arm/dts/sun50i-a64-sopine-baseboard-u-boot.dtsi b/arch/arm/dts/sun50i-a64-sopine-baseboard-u-boot.dtsi
> > new file mode 100644
> > index 0000000000..02b1ae046e
> > --- /dev/null
> > +++ b/arch/arm/dts/sun50i-a64-sopine-baseboard-u-boot.dtsi
> > @@ -0,0 +1,12 @@
> > +// SPDX-License-Identifier: GPL-2.0+
> > +/*
> > + * Copyright (C) 2018 Jagan Teki <jagan@amarulasolutions.com>
> > + */
> > +
> > +#include "sunxi-u-boot.dtsi"
> > +
> > +/ {
> > +       aliases {
> > +               spi0 = &spi0;
> > +       };
> > +};
> > diff --git a/configs/sopine_baseboard_defconfig b/configs/sopine_baseboard_defconfig
> > index 5833234b63..c9123fd7ee 100644
> > --- a/configs/sopine_baseboard_defconfig
> > +++ b/configs/sopine_baseboard_defconfig
> > @@ -10,6 +10,7 @@ CONFIG_DRAM_ZQ=3881949
> >  CONFIG_MMC0_CD_PIN=""
> >  CONFIG_MMC_SUNXI_SLOT_EXTRA=2
> >  CONFIG_SPL_SPI_SUNXI=y
> > +CONFIG_SPI_FLASH_WINBOND=y
>
> You also need to set CONFIG_SPI_FLASH since it's not set by default
> and CONFIG_SPI_FLASH_WINBOND depends on CONFIG_SPI_FLASH.

SPI_FLASH would select if DM_SPI_FLASH set. we have a patch on ML.

Winbond seems to boards specific flash, so I've mark it to board config itself.

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

end of thread, other threads:[~2019-10-21 18:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-10-16 16:22 [U-Boot] [PATCH v3 1/3] spi: Kconfig: Enable SPI_SUNXI for SUNXI Jagan Teki
2019-10-16 16:22 ` [U-Boot] [PATCH v3 2/3] arm: sunxi: Enable SPI/SPI-FLASH support for A64 Jagan Teki
2019-10-16 16:22 ` [U-Boot] [PATCH v3 3/3] configs: sopine-baseboard: Enable SPI-FLASH Jagan Teki
2019-10-20  6:24   ` Vasily Khoruzhick
2019-10-21 18:21     ` Jagan Teki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox