diff mbox series

[10/11] rockpro-rk3399: Enable SPI Flash

Message ID 20191221075440.6944-11-jagan@amarulasolutions.com (mailing list archive)
State New, archived
Headers show
Series rk3399: SPI boot support (fixes, updates) | expand

Commit Message

Jagan Teki Dec. 21, 2019, 7:54 a.m. UTC
Enable winbond SPI flash for ROC-PC-RK3399 board.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
 arch/arm/dts/rk3399-rockpro64-u-boot.dtsi | 4 ++++
 configs/rockpro64-rk3399_defconfig        | 2 ++
 2 files changed, 6 insertions(+)

Comments

Kever Yang Dec. 30, 2019, 3 a.m. UTC | #1
On 2019/12/21 下午3:54, Jagan Teki wrote:
> Enable winbond SPI flash for ROC-PC-RK3399 board.
>
> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>

Thanks,
- Kever
> ---
>   arch/arm/dts/rk3399-rockpro64-u-boot.dtsi | 4 ++++
>   configs/rockpro64-rk3399_defconfig        | 2 ++
>   2 files changed, 6 insertions(+)
>
> diff --git a/arch/arm/dts/rk3399-rockpro64-u-boot.dtsi b/arch/arm/dts/rk3399-rockpro64-u-boot.dtsi
> index 4648513ea9..deaa3efd39 100644
> --- a/arch/arm/dts/rk3399-rockpro64-u-boot.dtsi
> +++ b/arch/arm/dts/rk3399-rockpro64-u-boot.dtsi
> @@ -6,6 +6,10 @@
>   #include "rk3399-u-boot.dtsi"
>   #include "rk3399-sdram-lpddr4-100.dtsi"
>   / {
> +	aliases {
> +		spi0 = &spi1;
> +	};
> +
>   	chosen {
>   		u-boot,spl-boot-order = "same-as-spl", &sdmmc, &sdhci;
>   	};
> diff --git a/configs/rockpro64-rk3399_defconfig b/configs/rockpro64-rk3399_defconfig
> index 49e27c91cb..6a50ec7dbc 100644
> --- a/configs/rockpro64-rk3399_defconfig
> +++ b/configs/rockpro64-rk3399_defconfig
> @@ -46,6 +46,8 @@ CONFIG_RAM_RK3399_LPDDR4=y
>   CONFIG_BAUDRATE=1500000
>   CONFIG_DEBUG_UART_SHIFT=2
>   CONFIG_SYSRESET=y
> +CONFIG_SPI_FLASH_GIGADEVICE=y
> +CONFIG_ROCKCHIP_SPI=y
>   CONFIG_USB=y
>   CONFIG_USB_XHCI_HCD=y
>   CONFIG_USB_XHCI_DWC3=y
Emmanuel Vadot Dec. 30, 2019, 11:51 a.m. UTC | #2
Hi Jagan,

On Sat, 21 Dec 2019 13:24:39 +0530
Jagan Teki <jagan@amarulasolutions.com> wrote:

> Enable winbond SPI flash for ROC-PC-RK3399 board.

 s/ROC-PC-RK3399/RockPro64/

> 
> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
> ---
>  arch/arm/dts/rk3399-rockpro64-u-boot.dtsi | 4 ++++
>  configs/rockpro64-rk3399_defconfig        | 2 ++
>  2 files changed, 6 insertions(+)
> 
> diff --git a/arch/arm/dts/rk3399-rockpro64-u-boot.dtsi b/arch/arm/dts/rk3399-rockpro64-u-boot.dtsi
> index 4648513ea9..deaa3efd39 100644
> --- a/arch/arm/dts/rk3399-rockpro64-u-boot.dtsi
> +++ b/arch/arm/dts/rk3399-rockpro64-u-boot.dtsi
> @@ -6,6 +6,10 @@
>  #include "rk3399-u-boot.dtsi"
>  #include "rk3399-sdram-lpddr4-100.dtsi"
>  / {
> +	aliases {
> +		spi0 = &spi1;

 That looks weird ... what's the point of this alias exactly ?

> +	};
> +
>  	chosen {
>  		u-boot,spl-boot-order = "same-as-spl", &sdmmc, &sdhci;
>  	};
> diff --git a/configs/rockpro64-rk3399_defconfig b/configs/rockpro64-rk3399_defconfig
> index 49e27c91cb..6a50ec7dbc 100644
> --- a/configs/rockpro64-rk3399_defconfig
> +++ b/configs/rockpro64-rk3399_defconfig
> @@ -46,6 +46,8 @@ CONFIG_RAM_RK3399_LPDDR4=y
>  CONFIG_BAUDRATE=1500000
>  CONFIG_DEBUG_UART_SHIFT=2
>  CONFIG_SYSRESET=y
> +CONFIG_SPI_FLASH_GIGADEVICE=y
> +CONFIG_ROCKCHIP_SPI=y
>  CONFIG_USB=y
>  CONFIG_USB_XHCI_HCD=y
>  CONFIG_USB_XHCI_DWC3=y
> -- 
> 2.18.0.321.gffc6fa0e3
Jagan Teki Jan. 8, 2020, 12:59 p.m. UTC | #3
On Mon, Dec 30, 2019 at 5:21 PM Emmanuel Vadot <manu@bidouilliste.com> wrote:
>
>
>  Hi Jagan,
>
> On Sat, 21 Dec 2019 13:24:39 +0530
> Jagan Teki <jagan@amarulasolutions.com> wrote:
>
> > Enable winbond SPI flash for ROC-PC-RK3399 board.
>
>  s/ROC-PC-RK3399/RockPro64/
>
> >
> > Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
> > ---
> >  arch/arm/dts/rk3399-rockpro64-u-boot.dtsi | 4 ++++
> >  configs/rockpro64-rk3399_defconfig        | 2 ++
> >  2 files changed, 6 insertions(+)
> >
> > diff --git a/arch/arm/dts/rk3399-rockpro64-u-boot.dtsi b/arch/arm/dts/rk3399-rockpro64-u-boot.dtsi
> > index 4648513ea9..deaa3efd39 100644
> > --- a/arch/arm/dts/rk3399-rockpro64-u-boot.dtsi
> > +++ b/arch/arm/dts/rk3399-rockpro64-u-boot.dtsi
> > @@ -6,6 +6,10 @@
> >  #include "rk3399-u-boot.dtsi"
> >  #include "rk3399-sdram-lpddr4-100.dtsi"
> >  / {
> > +     aliases {
> > +             spi0 = &spi1;
>
>  That looks weird ... what's the point of this alias exactly ?

spi uclass would require alias number to bind the driver, no way to
escape as of now.
diff mbox series

Patch

diff --git a/arch/arm/dts/rk3399-rockpro64-u-boot.dtsi b/arch/arm/dts/rk3399-rockpro64-u-boot.dtsi
index 4648513ea9..deaa3efd39 100644
--- a/arch/arm/dts/rk3399-rockpro64-u-boot.dtsi
+++ b/arch/arm/dts/rk3399-rockpro64-u-boot.dtsi
@@ -6,6 +6,10 @@ 
 #include "rk3399-u-boot.dtsi"
 #include "rk3399-sdram-lpddr4-100.dtsi"
 / {
+	aliases {
+		spi0 = &spi1;
+	};
+
 	chosen {
 		u-boot,spl-boot-order = "same-as-spl", &sdmmc, &sdhci;
 	};
diff --git a/configs/rockpro64-rk3399_defconfig b/configs/rockpro64-rk3399_defconfig
index 49e27c91cb..6a50ec7dbc 100644
--- a/configs/rockpro64-rk3399_defconfig
+++ b/configs/rockpro64-rk3399_defconfig
@@ -46,6 +46,8 @@  CONFIG_RAM_RK3399_LPDDR4=y
 CONFIG_BAUDRATE=1500000
 CONFIG_DEBUG_UART_SHIFT=2
 CONFIG_SYSRESET=y
+CONFIG_SPI_FLASH_GIGADEVICE=y
+CONFIG_ROCKCHIP_SPI=y
 CONFIG_USB=y
 CONFIG_USB_XHCI_HCD=y
 CONFIG_USB_XHCI_DWC3=y