[U-Boot] [PATCH 0/2] Enable DM support for USB in LS2080

Enable the CONFIG_DM_USB in defconfigs and add the usb node in dts for LS2080.
Sriram Dash (2): armv8: ls2080: Enable CONFIG_DM_USB in defconfigs armv8: ls2080: Add USB node in dts for ls2080
arch/arm/dts/fsl-ls2080a.dtsi | 14 ++++++++++++++ configs/ls2080aqds_SECURE_BOOT_defconfig | 1 + configs/ls2080aqds_defconfig | 1 + configs/ls2080aqds_nand_defconfig | 1 + configs/ls2080aqds_qspi_defconfig | 1 + configs/ls2080ardb_SECURE_BOOT_defconfig | 1 + configs/ls2080ardb_defconfig | 1 + configs/ls2080ardb_nand_defconfig | 2 ++ 8 files changed, 22 insertions(+)

Enables driver model flag CONFIG_DM_USB for LS2080A platform defconfigs.
Signed-off-by: Sriram Dash sriram.dash@nxp.com --- configs/ls2080aqds_SECURE_BOOT_defconfig | 1 + configs/ls2080aqds_defconfig | 1 + configs/ls2080aqds_nand_defconfig | 1 + configs/ls2080aqds_qspi_defconfig | 1 + configs/ls2080ardb_SECURE_BOOT_defconfig | 1 + configs/ls2080ardb_defconfig | 1 + configs/ls2080ardb_nand_defconfig | 2 ++ 7 files changed, 8 insertions(+)
diff --git a/configs/ls2080aqds_SECURE_BOOT_defconfig b/configs/ls2080aqds_SECURE_BOOT_defconfig index 6a434c0..31e69b4 100644 --- a/configs/ls2080aqds_SECURE_BOOT_defconfig +++ b/configs/ls2080aqds_SECURE_BOOT_defconfig @@ -33,6 +33,7 @@ CONFIG_FSL_DSPI=y CONFIG_USB=y CONFIG_USB_XHCI_HCD=y CONFIG_USB_XHCI_DWC3=y +CONFIG_DM_USB=y CONFIG_USB_STORAGE=y CONFIG_RSA=y CONFIG_SPL_RSA=y diff --git a/configs/ls2080aqds_defconfig b/configs/ls2080aqds_defconfig index 53d5774..af52818 100644 --- a/configs/ls2080aqds_defconfig +++ b/configs/ls2080aqds_defconfig @@ -33,5 +33,6 @@ CONFIG_FSL_DSPI=y CONFIG_USB=y CONFIG_USB_XHCI_HCD=y CONFIG_USB_XHCI_DWC3=y +CONFIG_DM_USB=y CONFIG_USB_STORAGE=y CONFIG_EFI_LOADER_BOUNCE_BUFFER=y diff --git a/configs/ls2080aqds_nand_defconfig b/configs/ls2080aqds_nand_defconfig index 8eb4121..f09809d 100644 --- a/configs/ls2080aqds_nand_defconfig +++ b/configs/ls2080aqds_nand_defconfig @@ -42,5 +42,6 @@ CONFIG_FSL_QSPI=y CONFIG_USB=y CONFIG_USB_XHCI_HCD=y CONFIG_USB_XHCI_DWC3=y +CONFIG_DM_USB=y CONFIG_USB_STORAGE=y CONFIG_EFI_LOADER_BOUNCE_BUFFER=y diff --git a/configs/ls2080aqds_qspi_defconfig b/configs/ls2080aqds_qspi_defconfig index 5917f60..2b24a94 100644 --- a/configs/ls2080aqds_qspi_defconfig +++ b/configs/ls2080aqds_qspi_defconfig @@ -34,5 +34,6 @@ CONFIG_FSL_QSPI=y CONFIG_USB=y CONFIG_USB_XHCI_HCD=y CONFIG_USB_XHCI_DWC3=y +CONFIG_DM_USB=y CONFIG_USB_STORAGE=y CONFIG_EFI_LOADER_BOUNCE_BUFFER=y diff --git a/configs/ls2080ardb_SECURE_BOOT_defconfig b/configs/ls2080ardb_SECURE_BOOT_defconfig index 932a4bd..a62d864 100644 --- a/configs/ls2080ardb_SECURE_BOOT_defconfig +++ b/configs/ls2080ardb_SECURE_BOOT_defconfig @@ -33,6 +33,7 @@ CONFIG_FSL_DSPI=y CONFIG_USB=y CONFIG_USB_XHCI_HCD=y CONFIG_USB_XHCI_DWC3=y +CONFIG_DM_USB=y CONFIG_USB_STORAGE=y CONFIG_RSA=y CONFIG_SPL_RSA=y diff --git a/configs/ls2080ardb_defconfig b/configs/ls2080ardb_defconfig index c477961..bbf2a74 100644 --- a/configs/ls2080ardb_defconfig +++ b/configs/ls2080ardb_defconfig @@ -33,5 +33,6 @@ CONFIG_FSL_DSPI=y CONFIG_USB=y CONFIG_USB_XHCI_HCD=y CONFIG_USB_XHCI_DWC3=y +CONFIG_DM_USB=y CONFIG_USB_STORAGE=y CONFIG_EFI_LOADER_BOUNCE_BUFFER=y diff --git a/configs/ls2080ardb_nand_defconfig b/configs/ls2080ardb_nand_defconfig index 551f158..cdeb1dd 100644 --- a/configs/ls2080ardb_nand_defconfig +++ b/configs/ls2080ardb_nand_defconfig @@ -31,9 +31,11 @@ CONFIG_NET_RANDOM_ETHADDR=y CONFIG_NETDEVICES=y CONFIG_E1000=y CONFIG_SYS_NS16550=y +CONFIG_DM=y CONFIG_USB=y CONFIG_USB_XHCI_HCD=y CONFIG_USB_XHCI_DWC3=y +CONFIG_DM_USB=y CONFIG_USB_STORAGE=y CONFIG_OF_LIBFDT=y CONFIG_EFI_LOADER_BOUNCE_BUFFER=y

On 09/28/2016 11:18 PM, Sriram Dash wrote:
Enables driver model flag CONFIG_DM_USB for LS2080A platform defconfigs.
Signed-off-by: Sriram Dash sriram.dash@nxp.com
configs/ls2080aqds_SECURE_BOOT_defconfig | 1 + configs/ls2080aqds_defconfig | 1 + configs/ls2080aqds_nand_defconfig | 1 + configs/ls2080aqds_qspi_defconfig | 1 + configs/ls2080ardb_SECURE_BOOT_defconfig | 1 + configs/ls2080ardb_defconfig | 1 + configs/ls2080ardb_nand_defconfig | 2 ++ 7 files changed, 8 insertions(+)
Sriram,
Please retest ls2080ardb_nand. It fails in my build.
"undefined reference to `dm_scan_fdt_dev'"
York

From: york sun Sent: Thursday, October 06, 2016 12:37 AM To: Sriram Dash sriram.dash@nxp.com; u-boot@lists.denx.de Cc: Prabhakar Kushwaha prabhakar.kushwaha@nxp.com; albert.u.boot@aribaud.net; Suresh Gupta suresh.gupta@nxp.com Subject: Re: [PATCH 1/2] armv8: ls2080: Enable CONFIG_DM_USB in defconfigs
On 09/28/2016 11:18 PM, Sriram Dash wrote:
Enables driver model flag CONFIG_DM_USB for LS2080A platform defconfigs.
Signed-off-by: Sriram Dash sriram.dash@nxp.com
configs/ls2080aqds_SECURE_BOOT_defconfig | 1 + configs/ls2080aqds_defconfig | 1 + configs/ls2080aqds_nand_defconfig | 1 + configs/ls2080aqds_qspi_defconfig | 1 + configs/ls2080ardb_SECURE_BOOT_defconfig | 1 + configs/ls2080ardb_defconfig | 1 + configs/ls2080ardb_nand_defconfig | 2 ++ 7 files changed, 8 insertions(+)
Sriram,
Please retest ls2080ardb_nand. It fails in my build.
"undefined reference to `dm_scan_fdt_dev'"
Hello York,
As of now, nand boot is disfeatured and hence, the config is missing some features for the nand boot. For this case, as the device tree is not enabled, the function isn't compiled. Setting CONFIG_OF_CONTROL and CONFIG_DEFAULT_DEVICE_TREE="fsl-ls2080a-rdb" will make it compile without errors.
However, I will remove the the USB DM feature for nand in the next revision.
York

On 10/05/2016 11:03 PM, Sriram Dash wrote:
From: york sun Sent: Thursday, October 06, 2016 12:37 AM To: Sriram Dash sriram.dash@nxp.com; u-boot@lists.denx.de Cc: Prabhakar Kushwaha prabhakar.kushwaha@nxp.com; albert.u.boot@aribaud.net; Suresh Gupta suresh.gupta@nxp.com Subject: Re: [PATCH 1/2] armv8: ls2080: Enable CONFIG_DM_USB in defconfigs
On 09/28/2016 11:18 PM, Sriram Dash wrote:
Enables driver model flag CONFIG_DM_USB for LS2080A platform defconfigs.
Signed-off-by: Sriram Dash sriram.dash@nxp.com
configs/ls2080aqds_SECURE_BOOT_defconfig | 1 + configs/ls2080aqds_defconfig | 1 + configs/ls2080aqds_nand_defconfig | 1 + configs/ls2080aqds_qspi_defconfig | 1 + configs/ls2080ardb_SECURE_BOOT_defconfig | 1 + configs/ls2080ardb_defconfig | 1 + configs/ls2080ardb_nand_defconfig | 2 ++ 7 files changed, 8 insertions(+)
Sriram,
Please retest ls2080ardb_nand. It fails in my build.
"undefined reference to `dm_scan_fdt_dev'"
Hello York,
As of now, nand boot is disfeatured and hence, the config is missing some features
NAND boot may be defeatured for the SDK, but not for U-Boot. It is not big burden to maintain it. Let's keep it running, shall we?
for the nand boot. For this case, as the device tree is not enabled, the function isn’t compiled. Setting CONFIG_OF_CONTROL and CONFIG_DEFAULT_DEVICE_TREE="fsl-ls2080a-rdb" will make it compile without errors.
However, I will remove the the USB DM feature for nand in the next revision.
Can you add the device tree support for NAND boot?
York

From: york sun Sent: Thursday, October 06, 2016 9:33 PM To: Sriram Dash sriram.dash@nxp.com; u-boot@lists.denx.de Cc: Prabhakar Kushwaha prabhakar.kushwaha@nxp.com; albert.u.boot@aribaud.net; Suresh Gupta suresh.gupta@nxp.com Subject: Re: [PATCH 1/2] armv8: ls2080: Enable CONFIG_DM_USB in defconfigs
On 10/05/2016 11:03 PM, Sriram Dash wrote:
From: york sun Sent: Thursday, October 06, 2016 12:37 AM To: Sriram Dash sriram.dash@nxp.com; u-boot@lists.denx.de Cc: Prabhakar Kushwaha prabhakar.kushwaha@nxp.com; albert.u.boot@aribaud.net; Suresh Gupta suresh.gupta@nxp.com Subject: Re: [PATCH 1/2] armv8: ls2080: Enable CONFIG_DM_USB in defconfigs
On 09/28/2016 11:18 PM, Sriram Dash wrote:
Enables driver model flag CONFIG_DM_USB for LS2080A platform defconfigs.
Signed-off-by: Sriram Dash sriram.dash@nxp.com
configs/ls2080aqds_SECURE_BOOT_defconfig | 1 + configs/ls2080aqds_defconfig | 1 + configs/ls2080aqds_nand_defconfig | 1 + configs/ls2080aqds_qspi_defconfig | 1 + configs/ls2080ardb_SECURE_BOOT_defconfig | 1 + configs/ls2080ardb_defconfig | 1 + configs/ls2080ardb_nand_defconfig | 2 ++ 7 files changed, 8 insertions(+)
Sriram,
Please retest ls2080ardb_nand. It fails in my build.
"undefined reference to `dm_scan_fdt_dev'"
Hello York,
As of now, nand boot is disfeatured and hence, the config is missing some features
NAND boot may be defeatured for the SDK, but not for U-Boot. It is not big burden to maintain it. Let's keep it running, shall we?
OK.
for the nand boot. For this case, as the device tree is not enabled, the function isn't compiled. Setting CONFIG_OF_CONTROL and
CONFIG_DEFAULT_DEVICE_TREE="fsl-ls2080a-rdb"
will make it compile without errors.
However, I will remove the the USB DM feature for nand in the next revision.
Can you add the device tree support for NAND boot?
Sure. I will add the support for the device tree in next patch rev.
York

Add the USB node for LS2080 in dts.
Signed-off-by: Sriram Dash sriram.dash@nxp.com --- arch/arm/dts/fsl-ls2080a.dtsi | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
diff --git a/arch/arm/dts/fsl-ls2080a.dtsi b/arch/arm/dts/fsl-ls2080a.dtsi index b308c8b..f76e981 100644 --- a/arch/arm/dts/fsl-ls2080a.dtsi +++ b/arch/arm/dts/fsl-ls2080a.dtsi @@ -75,4 +75,18 @@ reg-names = "QuadSPI", "QuadSPI-memory"; num-cs = <4>; }; + + usb0: usb3@3100000 { + compatible = "fsl,layerscape-dwc3"; + reg = <0x0 0x3100000 0x0 0x10000>; + interrupts = <0 80 0x4>; /* Level high type */ + dr_mode = "host"; + }; + + usb1: usb3@3110000 { + compatible = "fsl,layerscape-dwc3"; + reg = <0x0 0x3110000 0x0 0x10000>; + interrupts = <0 81 0x4>; /* Level high type */ + dr_mode = "host"; + }; };
participants (2)
-
Sriram Dash
-
york sun