Re: [U-Boot] [RESEND PATCH v2 08/13] davinci: da850-evm: enable driver model for NAND

2019-07-29 Thread Tom Rini
On Mon, Jul 29, 2019 at 08:58:05AM +0200, Bartosz Golaszewski wrote:

> From: Bartosz Golaszewski 
> 
> Enable the driver-model on da850-evm. We need to add a dummy nand node
> to the device tree, as the real nand node is a sub-node of the aemif
> device.
> 
> On linux the aemif driver populates all its child nodes, but we can't do
> it in u-boot currently.
> 
> Signed-off-by: Bartosz Golaszewski 
> Tested-by: Adam Ford  #da850-evm

Applied to u-boot/master, thanks!

-- 
Tom


signature.asc
Description: PGP signature
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [RESEND PATCH v2 08/13] davinci: da850-evm: enable driver model for NAND

2019-07-29 Thread Adam Ford
On Mon, Jul 29, 2019 at 1:58 AM Bartosz Golaszewski  wrote:
>
> From: Bartosz Golaszewski 
>
> Enable the driver-model on da850-evm. We need to add a dummy nand node
> to the device tree, as the real nand node is a sub-node of the aemif
> device.
>
> On linux the aemif driver populates all its child nodes, but we can't do
> it in u-boot currently.
>
> Signed-off-by: Bartosz Golaszewski 
> Tested-by: Adam Ford  #da850-evm

The current state of master currently has nand booting broken on the
da850evm_nand_defconfig, so I'll welcome this patch since it seems to
fix the broken booting.  I haven't bisected it because there is this
pending fix.

adam
> ---
>  arch/arm/dts/da850-evm-u-boot.dtsi| 4 
>  configs/da850evm_defconfig| 1 +
>  configs/da850evm_direct_nor_defconfig | 1 +
>  configs/da850evm_nand_defconfig   | 1 +
>  include/configs/da850evm.h| 4 
>  5 files changed, 11 insertions(+)
>
> diff --git a/arch/arm/dts/da850-evm-u-boot.dtsi 
> b/arch/arm/dts/da850-evm-u-boot.dtsi
> index 1683f3472e..d9e8b9926a 100644
> --- a/arch/arm/dts/da850-evm-u-boot.dtsi
> +++ b/arch/arm/dts/da850-evm-u-boot.dtsi
> @@ -10,6 +10,10 @@
> soc@1c0 {
> u-boot,dm-spl;
> };
> +
> +   nand {
> +   compatible = "ti,davinci-nand";
> +   };
>  };
>
>  &flash {
> diff --git a/configs/da850evm_defconfig b/configs/da850evm_defconfig
> index 99300cb297..7de1d2ffc4 100644
> --- a/configs/da850evm_defconfig
> +++ b/configs/da850evm_defconfig
> @@ -52,6 +52,7 @@ CONFIG_DA8XX_GPIO=y
>  CONFIG_DM_I2C=y
>  CONFIG_SYS_I2C_DAVINCI=y
>  CONFIG_DM_MMC=y
> +CONFIG_MTD=y
>  CONFIG_MTD_DEVICE=y
>  CONFIG_DM_SPI_FLASH=y
>  CONFIG_SPI_FLASH=y
> diff --git a/configs/da850evm_direct_nor_defconfig 
> b/configs/da850evm_direct_nor_defconfig
> index dcb4d96d0d..e3c2d13986 100644
> --- a/configs/da850evm_direct_nor_defconfig
> +++ b/configs/da850evm_direct_nor_defconfig
> @@ -42,6 +42,7 @@ CONFIG_DA8XX_GPIO=y
>  CONFIG_DM_I2C=y
>  CONFIG_SYS_I2C_DAVINCI=y
>  # CONFIG_MMC is not set
> +CONFIG_MTD=y
>  CONFIG_MTD_NOR_FLASH=y
>  CONFIG_FLASH_CFI_DRIVER=y
>  CONFIG_SYS_FLASH_PROTECTION=y
> diff --git a/configs/da850evm_nand_defconfig b/configs/da850evm_nand_defconfig
> index 7065205783..96602e514a 100644
> --- a/configs/da850evm_nand_defconfig
> +++ b/configs/da850evm_nand_defconfig
> @@ -49,6 +49,7 @@ CONFIG_DM_GPIO=y
>  CONFIG_DA8XX_GPIO=y
>  CONFIG_DM_I2C=y
>  CONFIG_DM_MMC=y
> +CONFIG_MTD=y
>  CONFIG_NAND=y
>  CONFIG_NAND_DAVINCI=y
>  CONFIG_SYS_NAND_U_BOOT_LOCATIONS=y
> diff --git a/include/configs/da850evm.h b/include/configs/da850evm.h
> index 2dab17afab..ff536131ba 100644
> --- a/include/configs/da850evm.h
> +++ b/include/configs/da850evm.h
> @@ -174,6 +174,10 @@
>  #define CONFIG_SPL_NAND_DRIVERS
>  #define CONFIG_SPL_NAND_ECC
>  #define CONFIG_SPL_NAND_LOAD
> +
> +#ifndef CONFIG_SPL_BUILD
> +#define CONFIG_SYS_NAND_SELF_INIT
> +#endif
>  #endif
>
>  /*
> --
> 2.21.0
>
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [RESEND PATCH v2 08/13] davinci: da850-evm: enable driver model for NAND

2019-07-29 Thread Bartosz Golaszewski
From: Bartosz Golaszewski 

Enable the driver-model on da850-evm. We need to add a dummy nand node
to the device tree, as the real nand node is a sub-node of the aemif
device.

On linux the aemif driver populates all its child nodes, but we can't do
it in u-boot currently.

Signed-off-by: Bartosz Golaszewski 
Tested-by: Adam Ford  #da850-evm
---
 arch/arm/dts/da850-evm-u-boot.dtsi| 4 
 configs/da850evm_defconfig| 1 +
 configs/da850evm_direct_nor_defconfig | 1 +
 configs/da850evm_nand_defconfig   | 1 +
 include/configs/da850evm.h| 4 
 5 files changed, 11 insertions(+)

diff --git a/arch/arm/dts/da850-evm-u-boot.dtsi 
b/arch/arm/dts/da850-evm-u-boot.dtsi
index 1683f3472e..d9e8b9926a 100644
--- a/arch/arm/dts/da850-evm-u-boot.dtsi
+++ b/arch/arm/dts/da850-evm-u-boot.dtsi
@@ -10,6 +10,10 @@
soc@1c0 {
u-boot,dm-spl;
};
+
+   nand {
+   compatible = "ti,davinci-nand";
+   };
 };
 
 &flash {
diff --git a/configs/da850evm_defconfig b/configs/da850evm_defconfig
index 99300cb297..7de1d2ffc4 100644
--- a/configs/da850evm_defconfig
+++ b/configs/da850evm_defconfig
@@ -52,6 +52,7 @@ CONFIG_DA8XX_GPIO=y
 CONFIG_DM_I2C=y
 CONFIG_SYS_I2C_DAVINCI=y
 CONFIG_DM_MMC=y
+CONFIG_MTD=y
 CONFIG_MTD_DEVICE=y
 CONFIG_DM_SPI_FLASH=y
 CONFIG_SPI_FLASH=y
diff --git a/configs/da850evm_direct_nor_defconfig 
b/configs/da850evm_direct_nor_defconfig
index dcb4d96d0d..e3c2d13986 100644
--- a/configs/da850evm_direct_nor_defconfig
+++ b/configs/da850evm_direct_nor_defconfig
@@ -42,6 +42,7 @@ CONFIG_DA8XX_GPIO=y
 CONFIG_DM_I2C=y
 CONFIG_SYS_I2C_DAVINCI=y
 # CONFIG_MMC is not set
+CONFIG_MTD=y
 CONFIG_MTD_NOR_FLASH=y
 CONFIG_FLASH_CFI_DRIVER=y
 CONFIG_SYS_FLASH_PROTECTION=y
diff --git a/configs/da850evm_nand_defconfig b/configs/da850evm_nand_defconfig
index 7065205783..96602e514a 100644
--- a/configs/da850evm_nand_defconfig
+++ b/configs/da850evm_nand_defconfig
@@ -49,6 +49,7 @@ CONFIG_DM_GPIO=y
 CONFIG_DA8XX_GPIO=y
 CONFIG_DM_I2C=y
 CONFIG_DM_MMC=y
+CONFIG_MTD=y
 CONFIG_NAND=y
 CONFIG_NAND_DAVINCI=y
 CONFIG_SYS_NAND_U_BOOT_LOCATIONS=y
diff --git a/include/configs/da850evm.h b/include/configs/da850evm.h
index 2dab17afab..ff536131ba 100644
--- a/include/configs/da850evm.h
+++ b/include/configs/da850evm.h
@@ -174,6 +174,10 @@
 #define CONFIG_SPL_NAND_DRIVERS
 #define CONFIG_SPL_NAND_ECC
 #define CONFIG_SPL_NAND_LOAD
+
+#ifndef CONFIG_SPL_BUILD
+#define CONFIG_SYS_NAND_SELF_INIT
+#endif
 #endif
 
 /*
-- 
2.21.0

___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot