colibri vybrid fixes, device tree enablement and driver model conversion
Subsystems (6)
v2 cover colibri vybrid fixes, device tree enablement and driver model conversion
This series addresses some shortcomings, enables/introduces device tree support and converts all except video to using the driver model. This is fully tested both running our latest downstream BSP as well as the mainline Linux kernel.
This series is based on Lukasz' previous work on Vybrid [1] and is available together with his and my previous series addressing Apalis and Colibri iMX6 on our git server [2].
[1] https://patchwork.ozlabs.org/cover/1041597/
[2] http://git.toradex.com/cgit/u-boot-toradex.git/log/?h=for-next
Changes in v2:
- Added various reviewed-bys.
Bhuvanchandra DV (1):
colibri_vf: sync the board info message
Gerard Salvatella (1):
colibri_vf: fix sdboot for vybrid modules
Marcel Ziswiler (12):
Add missing space in comment
vf610: ddrmc: add missing include
imx: bootaux: add dependency on vf610
configs: move CONFIG_USB_EHCI_VF to Kconfig
configs: colibri_vf: remove obsolete mmc/sd card environment
configs: colibri_vf: limit size of malloc() pool before relocation
configs: move CONFIG_MXC_OCOTP to Kconfig
ARM: dts: colibri_vf: update device trees
configs: colibri_vf: disable obscure options
colibri_vf: migrate pinctrl and regulators to dtb/dm
colibri_vf: migrate fec, esdhc, nfc and usb to driver model
config: colibri_vf: use macros from linux/sizes.h
Stefan Agner (8):
colibri_vf: add distroboot support
colibri_vf: set fdtfile for distroboot
colibri_vf: enable user debug by default
colibri_vf: disable undefined instruction events in user debug
config: colibri_vf: enable mtd partitions via dt
arm: vf610: add uart2 clock/pinmux support
colibri_vf: adjust timing according to data sheet
colibri_vf: use leveling evaluated by DDR validation tools
arch/arm/dts/vf-colibri-u-boot.dtsi | 23 ++ arch/arm/dts/vf-colibri.dtsi | 198 ++++++++++++++- arch/arm/dts/vf500-colibri.dts | 1 + arch/arm/dts/vf610-colibri.dts | 1 + arch/arm/include/asm/arch-vf610/crm_regs.h | 1 + arch/arm/include/asm/arch-vf610/ddrmc-vf610.h | 2 + arch/arm/include/asm/arch-vf610/iomux-vf610.h | 6 +- arch/arm/mach-imx/Kconfig | 2 +- board/freescale/imx8qxp_mek/imx8qxp_mek.c | 2 +- board/toradex/colibri_vf/MAINTAINERS | 4 +- board/toradex/colibri_vf/colibri_vf.c | 240 ++---------------- configs/bk4r1_defconfig | 1 - configs/colibri_vf_defconfig | 22 +- configs/pcm052_defconfig | 1 - drivers/misc/Kconfig | 2 + drivers/usb/host/Kconfig | 7 + drivers/video/videomodes.c | 2 +- include/configs/advantech_dms-ba16.h | 2 - include/configs/apalis_imx6.h | 5 - include/configs/colibri_imx6.h | 5 - include/configs/colibri_vf.h | 109 ++++---- include/configs/dh_imx6.h | 5 - include/configs/ge_bx50v3.h | 2 - include/configs/imx8mq_evk.h | 1 - include/configs/kp_imx6q_tpc.h | 5 - include/configs/mx6_common.h | 3 - include/configs/mx7_common.h | 3 - include/configs/vf610twr.h | 4 - scripts/config_whitelist.txt | 1 - 29 files changed, 344 insertions(+), 316 deletions(-) create mode 100644 arch/arm/dts/vf-colibri-u-boot.dtsi
Signature · 1 line
2.20.1
PATCH v2 1/22 Add missing space in comment
From: Marcel Ziswiler <[email protected]>
Spotted two missing spaces in comments.
---
Changes in v2: None
board/freescale/imx8qxp_mek/imx8qxp_mek.c | 2 +- drivers/video/videomodes.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
board/freescale/imx8qxp_mek/imx8qxp_mek.c +1 -1
@@ -112,7 +112,7 @@ void build_info(void)sc_misc_build_info (-1 , &sc_build, &sc_commit);if (!sc_build) {printf ("SCFW does not support build info\n" ); - sc_commit =0 ;/* Display 0 when the build info is not supported*/ + sc_commit =0 ;/* Display 0 when the build info is not supported */ }printf ("Build: SCFW %x\n" , sc_commit); }
drivers/video/videomodes.c +1 -1
@@ -397,7 +397,7 @@ int video_edid_dtd_to_ctfb_res_modes(struct edid_detailed_timing *t,EDID_DETAILED_TIMING_VERTICAL_BLANKING (*t) ==0 ||EDID_DETAILED_TIMING_HSYNC_OFFSET (*t) ==0 ||EDID_DETAILED_TIMING_VSYNC_OFFSET (*t) ==0 || -/* 3d formats are not supported*/ +/* 3d formats are not supported */ EDID_DETAILED_TIMING_FLAG_STEREO(*t) != 0) return -EINVAL;
Signature · 1 line
2.20.1
PATCH v2 2/22 vf610: ddrmc: add missing include
In reply to Marcel ZiswilerFrom: Marcel Ziswiler <[email protected]>
The DDR memory controller include file for the Vybrid uses iomux_v3_cfg_t without actually including iomux-vf610.h.
---
Changes in v2: None
arch/arm/include/asm/arch-vf610/ddrmc-vf610.h | 2 ++ 1 file changed, 2 insertions(+)
arch/arm/include/asm/arch-vf610/ddrmc-vf610.h +2 -0
@@ -10,6 +10,8 @@ #ifndef __ASM_ARCH_VF610_DDRMC_H #define __ASM_ARCH_VF610_DDRMC_H +#include <asm/arch/iomux-vf610.h> + struct ddr3_jedec_timings { u8 tinit; u32 trst_pwron;
Signature · 1 line
2.20.1
PATCH v2 2/22 vf610: ddrmc: add missing include
Quoted 23 lines · On Mon, 25 Mar 2019 17:24:52 +0100 Marcel Ziswiler <[email protected]> wrote:
From: Marcel Ziswiler <[email protected]>
The DDR memory controller include file for the Vybrid uses
iomux_v3_cfg_twithout actually includingiomux-vf610.h.Signed-off-by Marcel Ziswiler <[email protected]>Reviewed-by Igor Opaniuk <[email protected]>---
Changes in v2: None
arch/arm/include/asm/arch-vf610/ddrmc-vf610.h | 2 ++ 1 file changed, 2 insertions(+)(quoted diff) +0
-0
b/arch/arm/include/asm/arch-vf610/ddrmc-vf610.hindexc7da2b8a5e..03e3cecb95100644 ---a/arch/arm/include/asm/arch-vf610/ddrmc-vf610.h+++b/arch/arm/include/asm/arch-vf610/ddrmc-vf610.h@@ -10,6 +10,8 @@
#ifndef__ASM_ARCH_VF610_DDRMC_H
#define__ASM_ARCH_VF610_DDRMC_H
arch/arm/include/asm/arch-vf610/ddrmc-vf610.h line 17
Quoted 5 lines
arch/arm/include/asm/arch-vf610/ddrmc-vf610.h +2
-0+#include <asm/arch/iomux-vf610.h> +struct ddr3_jedec_timings {u8 tinit;u32 trst_pwron;
Best regards,
Lukasz Majewski
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma at denx.de -------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190401/f5ad76a7/attachment.sig>
PATCH v2 2/22 vf610: ddrmc: add missing include
In reply to Marcel ZiswilerQuoted 6 lines
From: Marcel Ziswiler <[email protected]> The DDR memory controller include file for the Vybrid uses
iomux_v3_cfg_twithout actually includingiomux-vf610.h.Signed-off-by Marcel Ziswiler <[email protected]>Reviewed-by Igor Opaniuk <[email protected]>Reviewed-by Lukasz Majewski <[email protected]>
Applied to u-boot-imx, -next, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================
PATCH v2 3/22 imx: bootaux: add dependency on vf610
In reply to Marcel ZiswilerFrom: Marcel Ziswiler <[email protected]>
Allow using bootaux also on VF610 aka Vybrid.
---
Changes in v2: None
arch/arm/mach-imx/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-imx/Kconfig +1 -1
@@ -23,7 +23,7 @@ config IMX_RDC config IMX_BOOTAUX bool "Support boot auxiliary core" - depends on ARCH_MX7 || ARCH_MX6 + depends on ARCH_MX7 || ARCH_MX6 || ARCH_VF610 help bootaux [addr] to boot auxiliary core.
Signature · 1 line
2.20.1
PATCH v2 3/22 imx: bootaux: add dependency on vf610
Quoted 19 lines · On Mon, 25 Mar 2019 17:24:53 +0100 Marcel Ziswiler <[email protected]> wrote:
From: Marcel Ziswiler <[email protected]>
Allow using bootaux also on VF610 aka Vybrid.
Signed-off-by Marcel Ziswiler <[email protected]>Reviewed-by Igor Opaniuk <[email protected]>---
Changes in v2: None
arch/arm/mach-imx/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/arm/mach-imx/Kconfig +0
-0
arch/arm/mach-imx/Kconfig config IMX_RDC · line 29
Quoted 8 lines
arch/arm/mach-imx/Kconfig +1
-1@@ -23,7 +23,7 @@ config IMX_RDC config IMX_BOOTAUX bool "Support boot auxiliary core" - depends on ARCH_MX7 || ARCH_MX6 + depends on ARCH_MX7 || ARCH_MX6 || ARCH_VF610 help bootaux [addr] to boot auxiliary core.
Best regards,
Lukasz Majewski
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma at denx.de -------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190401/041d38c0/attachment.sig>
PATCH v2 3/22 imx: bootaux: add dependency on vf610
In reply to Marcel ZiswilerQuoted 5 lines
From: Marcel Ziswiler <[email protected]> Allow using bootaux also on VF610 aka Vybrid.
Signed-off-by Marcel Ziswiler <[email protected]>Reviewed-by Igor Opaniuk <[email protected]>Reviewed-by Lukasz Majewski <[email protected]>
Applied to u-boot-imx, -next, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================
PATCH v2 4/22 configs: move CONFIG_USB_EHCI_VF to Kconfig
In reply to Marcel ZiswilerFrom: Marcel Ziswiler <[email protected]>
Move CONFIG_USB_EHCI_VF to drivers/usb/host/Kconfig and update the one and only user thereof being colibri_vf.
---
Changes in v2: None
drivers/usb/host/Kconfig | 7 +++++++ include/configs/colibri_vf.h | 1 - scripts/config_whitelist.txt | 1 - 3 files changed, 7 insertions(+), 2 deletions(-)
drivers/usb/host/Kconfig +7 -0
@@ -154,6 +154,13 @@ config USB_EHCI_OMAP Enables support for the on-chip EHCI controller on OMAP3 and later SoCs. +config USB_EHCI_VF + bool "Support for Vybrid on-chip EHCI USB controller" + depends on ARCH_VF610 + default y + help + Enables support for the on-chip EHCI controller on Vybrid SoCs. + if USB_EHCI_MX7 config MXC_USB_OTG_HACTIVE
include/configs/colibri_vf.h +0 -1
@@ -159,7 +159,6 @@#endif /* USB Host Support */ -#define CONFIG_USB_EHCI_VF #define CONFIG_USB_MAX_CONTROLLER_COUNT 2#define CONFIG_EHCI_HCD_INIT_AFTER_RESET
scripts/config_whitelist.txt +0 -1
@@ -4522,7 +4522,6 @@ CONFIG_USB_EHCI_MXS CONFIG_USB_EHCI_SPEAR CONFIG_USB_EHCI_TXFIFO_THRESH CONFIG_USB_EHCI_VCT -CONFIG_USB_EHCI_VF CONFIG_USB_ETH_QMULT CONFIG_USB_ETH_SUBSET CONFIG_USB_EXT2_BOOT
Signature · 1 line
2.20.1
PATCH v2 4/22 configs: move CONFIG_USB_EHCI_VF to Kconfig
Quoted 52 lines · On Mon, 25 Mar 2019 17:24:54 +0100 Marcel Ziswiler <[email protected]> wrote:
From: Marcel Ziswiler <[email protected]>
Move
CONFIG_USB_EHCI_VFtodrivers/usb/host/Kconfigand update the one and only user thereof beingcolibri_vf.Signed-off-by Marcel Ziswiler <[email protected]>Reviewed-by Igor Opaniuk <[email protected]>---
Changes in v2: None
drivers/usb/host/Kconfig | 7 +++++++ include/configs/colibri_vf.h | 1 - scripts/config_whitelist.txt | 1 - 3 files changed, 7 insertions(+), 2 deletions(-)drivers/usb/host/Kconfig +0
-0@@ -154,6 +154,13 @@ config USB_EHCI_OMAP Enables support for the on-chip EHCI controller on OMAP3and later SoCs.
drivers/usb/host/Kconfig +6
-0+config USB_EHCI_VF + bool "Support for Vybrid on-chip EHCI USB controller" + depends on ARCH_VF610 + default y + help + Enables support for the on-chip EHCI controller on VybridSoCs. +
ifUSB_EHCI_MX7config
MXC_USB_OTG_HACTIVE(quoted diff) +0
-0
b/include/configs/colibri_vf.hindex31ff8a00a6..2fe7f217fa100644include/configs/colibri_vf.h +0
-1@@ -159,7 +159,6 @@#endif /* USB Host Support */ -#define CONFIG_USB_EHCI_VF #define CONFIG_USB_MAX_CONTROLLER_COUNT 2#define CONFIG_EHCI_HCD_INIT_AFTER_RESET (quoted diff) +0
-0
b/scripts/config_whitelist.txtindexdb00376d92..7c14b24bc1100644
scripts/config_whitelist.txt CONFIG_USB_EHCI_MXS · line 4527
Quoted 7 lines
scripts/config_whitelist.txt +0
-1@@ -4522,7 +4522,6 @@ CONFIG_USB_EHCI_MXS CONFIG_USB_EHCI_SPEAR CONFIG_USB_EHCI_TXFIFO_THRESH CONFIG_USB_EHCI_VCT -CONFIG_USB_EHCI_VF CONFIG_USB_ETH_QMULT CONFIG_USB_ETH_SUBSET CONFIG_USB_EXT2_BOOT
Best regards,
Lukasz Majewski
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma at denx.de -------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190401/38abe258/attachment.sig>
PATCH v2 4/22 configs: move CONFIG_USB_EHCI_VF to Kconfig
In reply to Marcel ZiswilerQuoted 6 lines
From: Marcel Ziswiler <[email protected]>
MoveCONFIG_USB_EHCI_VFtodrivers/usb/host/Kconfigand update the one and only user thereof beingcolibri_vf.Signed-off-by Marcel Ziswiler <[email protected]>Reviewed-by Igor Opaniuk <[email protected]>Reviewed-by Lukasz Majewski <[email protected]>
Applied to u-boot-imx, -next, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================
PATCH v2 5/22 configs: colibri_vf: remove obsolete mmc/sd card environment
In reply to Marcel ZiswilerFrom: Marcel Ziswiler <[email protected]>
Remove obsolete MMC/SD card environment configuration dating back to un-fused samples times.
While at it also remove meanwhile spurious "USB Storage" comment.
---
Changes in v2: None
include/configs/colibri_vf.h | 9 --------- 1 file changed, 9 deletions(-)
include/configs/colibri_vf.h +0 -9
@@ -145,13 +145,6 @@ (CONFIG_SYS_INIT_RAM_ADDR +CONFIG_SYS_INIT_SP_OFFSET ) /* Environment organization */ - -#ifdef CONFIG_ENV_IS_IN_MMC -#define CONFIG_SYS_MMC_ENV_DEV 0 -#define CONFIG_ENV_OFFSET (12 * 64 * 1024) -#define CONFIG_ENV_SIZE (8 * 1024) -#endif -#ifdef CONFIG_ENV_IS_IN_NAND #define CONFIG_ENV_SIZE (64 * 2048)#define CONFIG_ENV_RANGE (4 * 64 * 2048)
@@ -165,6 +158,4 @@/* USB DFU */ #define CONFIG_SYS_DFU_DATA_BUF_SIZE (1024 * 1024) -/* USB Storage */ -#endif /* __CONFIG_H */
Signature · 1 line
2.20.1
PATCH v2 5/22 configs: colibri_vf: remove obsolete mmc/sd card environment
Quoted 36 lines · On Mon, 25 Mar 2019 17:24:55 +0100 Marcel Ziswiler <[email protected]> wrote:
From: Marcel Ziswiler <[email protected]>
Remove obsolete MMC/SD card environment configuration dating back to un-fused samples times.
While at it also remove meanwhile spurious "USB Storage" comment.
Signed-off-by Marcel Ziswiler <[email protected]>Reviewed-by Igor Opaniuk <[email protected]>---
Changes in v2: None
include/configs/colibri_vf.h | 9 --------- 1 file changed, 9 deletions(-)(quoted diff) +0
-0
b/include/configs/colibri_vf.hindex2fe7f217fa..7b974d9e97100644include/configs/colibri_vf.h +0
-7@@ -145,13 +145,6 @@ (CONFIG_SYS_INIT_RAM_ADDR +CONFIG_SYS_INIT_SP_OFFSET ) /* Environment organization */ - -#ifdef CONFIG_ENV_IS_IN_MMC -#define CONFIG_SYS_MMC_ENV_DEV 0 -#define CONFIG_ENV_OFFSET (12 * 64 * 1024) -#define CONFIG_ENV_SIZE (8 * 1024) -#endif -#ifdef CONFIG_ENV_IS_IN_NAND #define CONFIG_ENV_SIZE (64 * 2048)#define CONFIG_ENV_RANGE (4 * 64 * 2048)
include/configs/colibri_vf.h line 161
Quoted 6 lines
include/configs/colibri_vf.h +0
-2@@ -165,6 +158,4 @@/* USB DFU */ #define CONFIG_SYS_DFU_DATA_BUF_SIZE (1024 * 1024) -/* USB Storage */ -#endif /* __CONFIG_H */
Best regards,
Lukasz Majewski
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma at denx.de -------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190401/66931e5e/attachment.sig>
PATCH v2 5/22 configs: colibri_vf: remove obsolete mmc/sd card environment
In reply to Marcel ZiswilerQuoted 7 lines
From: Marcel Ziswiler <[email protected]> Remove obsolete MMC/SD card environment configuration dating back to un-fused samples times.
While at it also remove meanwhile spurious "USB Storage" comment.Signed-off-by Marcel Ziswiler <[email protected]>Reviewed-by Igor Opaniuk <[email protected]>Reviewed-by Lukasz Majewski <[email protected]>
Applied to u-boot-imx, -next, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================
PATCH v2 6/22 configs: colibri_vf: limit size of malloc() pool before relocation
In reply to Marcel ZiswilerFrom: Marcel Ziswiler <[email protected]>
Limit the size of the malloc() pool before relocation (SYS_MALLOC_F_LEN).
---
Changes in v2: None
configs/colibri_vf_defconfig | 1 + 1 file changed, 1 insertion(+)
configs/colibri_vf_defconfig +1 -0
@@ -2,6 +2,7 @@ CONFIG_ARM=y CONFIG_SYS_THUMB_BUILD=y CONFIG_ARCH_VF610=y CONFIG_SYS_TEXT_BASE=0x3f401000 +CONFIG_SYS_MALLOC_F_LEN=0x800 CONFIG_TARGET_COLIBRI_VF=y CONFIG_ENV_VARS_UBOOT_CONFIG=y CONFIG_NR_DRAM_BANKS=1
Signature · 1 line
2.20.1
PATCH v2 6/22 configs: colibri_vf: limit size of malloc() pool before relocation
Quoted 20 lines · On Mon, 25 Mar 2019 17:24:56 +0100 Marcel Ziswiler <[email protected]> wrote:
From: Marcel Ziswiler <[email protected]>
Limit the size of the
malloc()pool before relocation (SYS_MALLOC_F_LEN).Signed-off-by Marcel Ziswiler <[email protected]>Reviewed-by Igor Opaniuk <[email protected]>---
Changes in v2: None
configs/colibri_vf_defconfig | 1 + 1 file changed, 1 insertion(+)(quoted diff) +0
-0b/configs/colibri_vf_defconfig index 4192501257..8188582ed9 100644
configs/colibri_vf_defconfig CONFIG_ARM=y · line 8
Quoted 7 lines
configs/colibri_vf_defconfig +1
-0@@ -2,6 +2,7 @@ CONFIG_ARM=y CONFIG_SYS_THUMB_BUILD=y CONFIG_ARCH_VF610=y CONFIG_SYS_TEXT_BASE=0x3f401000 +CONFIG_SYS_MALLOC_F_LEN=0x800 CONFIG_TARGET_COLIBRI_VF=y CONFIG_ENV_VARS_UBOOT_CONFIG=y CONFIG_NR_DRAM_BANKS=1
Best regards,
Lukasz Majewski
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma at denx.de -------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190401/eaab60a5/attachment.sig>
PATCH v2 6/22 configs: colibri_vf: limit size of malloc() pool before relocation
In reply to Marcel ZiswilerQuoted 6 lines
From: Marcel Ziswiler <[email protected]> Limit the size of the
malloc()pool before relocation (SYS_MALLOC_F_LEN).Signed-off-by Marcel Ziswiler <[email protected]>Reviewed-by Igor Opaniuk <[email protected]>Reviewed-by Lukasz Majewski <[email protected]>
Applied to u-boot-imx, -next, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================
PATCH v2 7/22 configs: move CONFIG_MXC_OCOTP to Kconfig
In reply to Marcel ZiswilerFrom: Marcel Ziswiler <[email protected]>
While commit 3e020f03e94f ("driver: misc: add MXC_OCOTP Kconfig entry") introduced a Kconfig entry it did not actually migrate all configurations to using it.
As CONFIG_MXC_OCOTP was in mx{6/7}_common.h enable it by default on those architectures. Additionally, also enable it on ARCH_IMX8M and ARCH_VF610 where all current members enabled it through their legacy configuration header files.
---
Changes in v2: None
configs/bk4r1_defconfig | 1 - configs/pcm052_defconfig | 1 - drivers/misc/Kconfig | 2 ++ include/configs/advantech_dms-ba16.h | 2 -- include/configs/apalis_imx6.h | 5 ----- include/configs/colibri_imx6.h | 5 ----- include/configs/colibri_vf.h | 4 ---- include/configs/dh_imx6.h | 5 ----- include/configs/ge_bx50v3.h | 2 -- include/configs/imx8mq_evk.h | 1 - include/configs/kp_imx6q_tpc.h | 5 ----- include/configs/mx6_common.h | 3 --- include/configs/mx7_common.h | 3 --- include/configs/vf610twr.h | 4 ---- 14 files changed, 2 insertions(+), 41 deletions(-)
configs/bk4r1_defconfig +0 -1
@@ -49,7 +49,6 @@ CONFIG_SYS_I2C_MXC_I2C4=y CONFIG_LED=y CONFIG_LED_GPIO=y CONFIG_MISC=y -CONFIG_MXC_OCOTP=y CONFIG_I2C_EEPROM=y CONFIG_SYS_I2C_EEPROM_ADDR=0x50 CONFIG_SYS_I2C_EEPROM_BUS=2
configs/pcm052_defconfig +0 -1
@@ -36,7 +36,6 @@ CONFIG_SYS_I2C_MXC_I2C2=y CONFIG_SYS_I2C_MXC_I2C3=y CONFIG_SYS_I2C_MXC_I2C4=y CONFIG_MISC=y -CONFIG_MXC_OCOTP=y CONFIG_I2C_EEPROM=y CONFIG_SYS_I2C_EEPROM_ADDR=0x50 CONFIG_SYS_I2C_EEPROM_BUS=2
drivers/misc/Kconfig +2 -0
@@ -128,6 +128,8 @@ config JZ4780_EFUSE config MXC_OCOTP bool "Enable MXC OCOTP Driver" + depends on ARCH_IMX8M || ARCH_MX6 || ARCH_MX7 || ARCH_VF610 + default y help If you say Y here, you will get support for the One Time Programmable memory pages that are stored on the some
include/configs/advantech_dms-ba16.h +0 -2
@@ -34,8 +34,6 @@#define CONFIG_MXC_UART -#define CONFIG_MXC_OCOTP -/* SATA Configs */ #define CONFIG_SYS_SATA_MAX_DEVICE 1#define CONFIG_DWC_AHSATA_PORT_ID 0
include/configs/apalis_imx6.h +0 -5
@@ -41,11 +41,6 @@#define CONFIG_SYS_I2C_SPEED 100000#define CONFIG_SYS_MXC_I2C3_SPEED 400000 -/* OCOTP Configs */ -#ifdef CONFIG_CMD_FUSE -#define CONFIG_MXC_OCOTP -#endif -/* MMC Configs */ #define CONFIG_FSL_USDHC #define CONFIG_SYS_FSL_ESDHC_ADDR 0
include/configs/colibri_imx6.h +0 -5
@@ -39,11 +39,6 @@#define CONFIG_SYS_I2C_SPEED 100000#define CONFIG_SYS_MXC_I2C3_SPEED 400000 -/* OCOTP Configs */ -#ifdef CONFIG_CMD_FUSE -#define CONFIG_MXC_OCOTP -#endif -/* MMC Configs */ #define CONFIG_FSL_USDHC #define CONFIG_SYS_FSL_ESDHC_ADDR 0
include/configs/colibri_vf.h +0 -4
@@ -17,10 +17,6 @@#define CONFIG_SKIP_LOWLEVEL_INIT -#ifdef CONFIG_CMD_FUSE -#define CONFIG_MXC_OCOTP -#endif -#ifdef CONFIG_VIDEO_FSL_DCU_FB #define CONFIG_SPLASH_SCREEN_ALIGN #define CONFIG_VIDEO_LOGO
include/configs/dh_imx6.h +0 -5
@@ -48,11 +48,6 @@#define CONFIG_FEC_MXC_PHYADDR 0#define CONFIG_ARP_TIMEOUT 200UL -/* Fuses */ -#ifdef CONFIG_CMD_FUSE -#define CONFIG_MXC_OCOTP -#endif -/* I2C Configs */ #define CONFIG_SYS_I2C #define CONFIG_SYS_I2C_MXC
include/configs/ge_bx50v3.h +0 -2
@@ -35,8 +35,6 @@#define CONFIG_MXC_UART -#define CONFIG_MXC_OCOTP -/* SATA Configs */ #ifdef CONFIG_CMD_SATA #define CONFIG_SYS_SATA_MAX_DEVICE 1
include/configs/imx8mq_evk.h +0 -1
@@ -230,7 +230,6 @@#define CONFIG_MXC_GPIO -#define CONFIG_MXC_OCOTP #define CONFIG_CMD_FUSE /* I2C Configs */
include/configs/kp_imx6q_tpc.h +0 -5
@@ -31,11 +31,6 @@#define CONFIG_FEC_MXC_PHYADDR 0#define CONFIG_ARP_TIMEOUT 200UL -/* Fuses */ -#ifdef CONFIG_CMD_FUSE -#define CONFIG_MXC_OCOTP -#endif -/* I2C Configs */ #define CONFIG_SYS_I2C #define CONFIG_SYS_I2C_MXC
include/configs/mx6_common.h +0 -3
@@ -57,9 +57,6 @@/* MMC */ #define CONFIG_FSL_USDHC -/* Fuses */ -#define CONFIG_MXC_OCOTP -/* Secure boot (HAB) support */ #ifdef CONFIG_SECURE_BOOT #define CONFIG_CSF_SIZE 0x2000
include/configs/mx7_common.h +0 -3
@@ -42,9 +42,6 @@/* MMC */ #define CONFIG_FSL_USDHC -/* Fuses */ -#define CONFIG_MXC_OCOTP -#define CONFIG_ARMV7_SECURE_BASE 0x00900000#define CONFIG_ARMV7_PSCI_1_0
include/configs/vf610twr.h +0 -4
@@ -19,10 +19,6 @@/* Enable passing of ATAGs */ #define CONFIG_CMDLINE_TAG -#ifdef CONFIG_CMD_FUSE -#define CONFIG_MXC_OCOTP -#endif -/* Size of malloc() pool */ #define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 2 * 1024 * 1024)
Signature · 1 line
2.20.1
PATCH v2 7/22 configs: move CONFIG_MXC_OCOTP to Kconfig
Quoted 10 lines
From: Marcel Ziswiler <[email protected]>
While commit3e020f03e94f("driver: misc: addMXC_OCOTPKconfigentry") introduced aKconfigentry it did not actually migrate all configurations to using it.
AsCONFIG_MXC_OCOTPwas inmx{6/7}_common.henable it by default on those architectures. Additionally, also enable it onARCH_IMX8MandARCH_VF610where all current members enabled it through their legacy configuration header files.Signed-off-by Marcel Ziswiler <[email protected]>Reviewed-by Lukasz Majewski <[email protected]>
Applied to u-boot-imx, -next, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================
PATCH v2 8/22 ARM: dts: colibri_vf: update device trees
In reply to Marcel ZiswilerFrom: Marcel Ziswiler <[email protected]>
Update device tree in preparation of further driver model migration:
Ethernet FEC, ESDHC aka MMC/SD card, I2C, NFC aka NAND flash controller, USBH_PEN GPIO regulator.
Add iomux resp. pinctrl entries to be removed from proprietary platform
data: DSPI, ESDHC, FEC, I2C, NFC, UART, USBH_PEN GPIO.
Introduce a U-Boot specific device tree with some required u-boot,dm-pre-reloc properties: soc, aips0, pinctrl_ddr and uart0 incl. pinctrl.
While at it also update the MAINTAINERS file.
---
Changes in v2: None
arch/arm/dts/vf-colibri-u-boot.dtsi | 23 ++++ arch/arm/dts/vf-colibri.dtsi | 198 ++++++++++++++++++++++++++- arch/arm/dts/vf500-colibri.dts | 1 + arch/arm/dts/vf610-colibri.dts | 1 + board/toradex/colibri_vf/MAINTAINERS | 4 +- 5 files changed, 224 insertions(+), 3 deletions(-) create mode 100644 arch/arm/dts/vf-colibri-u-boot.dtsi
arch/arm/dts/vf-colibri-u-boot.dtsi new file +23 -0
@@ -0,0 +1,23 @@ +// SPDX-License-Identifier: GPL-2.0+ OR X11 + +/ { + soc { + u-boot,dm-pre-reloc; + }; +}; + +&aips0 { + u-boot,dm-pre-reloc; +}; + +&pinctrl_ddr { + u-boot,dm-pre-reloc; +}; + +&pinctrl_uart0 { + u-boot,dm-pre-reloc; +}; + +&uart0 { + u-boot,dm-pre-reloc; +};
arch/arm/dts/vf-colibri.dtsi +196 -2
222 lines not on this page · raw message
arch/arm/dts/vf500-colibri.dts +1 -0
@@ -5,6 +5,7 @@ /dts-v1/; #include "vf-colibri.dtsi" +#include "vf-colibri-u-boot.dtsi" / { model = "Toradex Colibri VF50";
arch/arm/dts/vf610-colibri.dts +1 -0
@@ -5,6 +5,7 @@ /dts-v1/; #include "vf-colibri.dtsi" +#include "vf-colibri-u-boot.dtsi" / { model = "Toradex Colibri VF61";
board/toradex/colibri_vf/MAINTAINERS +3 -1
@@ -1,10 +1,12 @@ Colibri VFxx M: Stefan Agner <[email protected]> +W: http://developer.toradex.com/software/linux/linux-software +W: https://www.toradex.com/community S: Maintained F: board/toradex/colibri_vf/ F: include/configs/colibri_vf.h F: configs/colibri_vf_defconfig -F: configs/colibri_vf_dtb_defconfig F: arch/arm/dts/vf-colibri.dtsi +F: arch/arm/dts/vf-colibri-u-boot.dtsi F: arch/arm/dts/vf500-colibri.dts F: arch/arm/dts/vf610-colibri.dts
Signature · 1 line
2.20.1
PATCH v2 8/22 ARM: dts: colibri_vf: update device trees
Quoted 11 lines
From: Marcel Ziswiler <[email protected]>
Update device tree in preparation of further driver model migration:
Ethernet FEC, ESDHC aka MMC/SD card, I2C, NFC aka NAND flash controller,USBH_PENGPIO regulator.
Add iomux resp. pinctrl entries to be removed from proprietary platform
data: DSPI, ESDHC, FEC, I2C, NFC, UART,USBH_PENGPIO. Introduce a U-Boot specific device tree with some required u-boot,dm-pre-reloc properties: soc, aips0,pinctrl_ddrand uart0 incl. pinctrl.
While at it also update theMAINTAINERSfile.Signed-off-by Marcel Ziswiler <[email protected]>
Applied to u-boot-imx, -next, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================
PATCH v2 9/22 configs: colibri_vf: disable obscure options
In reply to Marcel ZiswilerFrom: Marcel Ziswiler <[email protected]>
Disable more obscure options to save another 26 KB in preparation of the upcoming driver model migration.
---
Changes in v2: None
configs/colibri_vf_defconfig | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)
configs/colibri_vf_defconfig +9 -1
@@ -17,11 +17,17 @@ CONFIG_BOARD_EARLY_INIT_F=y CONFIG_HUSH_PARSER=y # CONFIG_CMDLINE_EDITING is not set # CONFIG_AUTO_COMPLETE is not set +# CONFIG_SYS_LONGHELP is not set CONFIG_SYS_PROMPT="Colibri VFxx # " +# CONFIG_CMD_BOOTD is not set +# CONFIG_CMD_BOOTM is not set CONFIG_CMD_BOOTZ=y +# CONFIG_CMD_ELF is not set +# CONFIG_CMD_IMI is not set CONFIG_CMD_ASKENV=y CONFIG_CMD_MEMTEST=y CONFIG_CMD_DFU=y +# CONFIG_CMD_FLASH is not set CONFIG_CMD_FUSE=y CONFIG_CMD_GPIO=y # CONFIG_CMD_LOADB is not set
@@ -46,10 +52,10 @@ CONFIG_DEFAULT_DEVICE_TREE="vf610-colibri" CONFIG_ENV_IS_IN_NAND=y CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y CONFIG_DM=y -CONFIG_DFU_MMC=y CONFIG_DFU_NAND=y CONFIG_DM_GPIO=y CONFIG_VYBRID_GPIO=y +# CONFIG_MMC_HW_PARTITIONING is not set CONFIG_FSL_ESDHC=y CONFIG_NAND_VF610_NFC=y CONFIG_SYS_NAND_VF610_NFC_60_ECC_BYTES=y
@@ -57,6 +63,8 @@ CONFIG_MTD_UBI_FASTMAP=y CONFIG_PHYLIB=y CONFIG_PHY_MICREL=y CONFIG_MII=y +# CONFIG_SPL_SERIAL_PRESENT is not set +# CONFIG_TPL_SERIAL_PRESENT is not set CONFIG_DM_SERIAL=y CONFIG_FSL_LPUART=y CONFIG_USB=y
Signature · 1 line
2.20.1
PATCH v2 9/22 configs: colibri_vf: disable obscure options
Hi Marcel,
The actual line which does have impact is CONFIG_DFU_MMC=y.
Not sure I understand the reason of adding "# ... is not set" lines in this defconfig. Could you please explain?
Regards,
Igor
Quoted 65 lines · Marcel Ziswiler
From: Marcel Ziswiler <[email protected]>
Disable more obscure options to save another 26 KB in preparation of the upcoming driver model migration.
Signed-off-by Marcel Ziswiler <[email protected]>---
Changes in v2: None
configs/colibri_vf_defconfig | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)configs/colibri_vf_defconfig +9
-2@@ -17,11 +17,17 @@ CONFIG_BOARD_EARLY_INIT_F=y CONFIG_HUSH_PARSER=y # CONFIG_CMDLINE_EDITING is not set # CONFIG_AUTO_COMPLETE is not set +# CONFIG_SYS_LONGHELP is not set CONFIG_SYS_PROMPT="Colibri VFxx # " +# CONFIG_CMD_BOOTD is not set +# CONFIG_CMD_BOOTM is not set CONFIG_CMD_BOOTZ=y +# CONFIG_CMD_ELF is not set +# CONFIG_CMD_IMI is not set CONFIG_CMD_ASKENV=y CONFIG_CMD_MEMTEST=y CONFIG_CMD_DFU=y +# CONFIG_CMD_FLASH is not set CONFIG_CMD_FUSE=y CONFIG_CMD_GPIO=y # CONFIG_CMD_LOADB is not set@@ -46,10 +52,10 @@ CONFIG_DEFAULT_DEVICE_TREE="vf610-colibri" CONFIG_ENV_IS_IN_NAND=y CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y CONFIG_DM=y -CONFIG_DFU_MMC=y CONFIG_DFU_NAND=y CONFIG_DM_GPIO=y CONFIG_VYBRID_GPIO=y +# CONFIG_MMC_HW_PARTITIONING is not set CONFIG_FSL_ESDHC=y CONFIG_NAND_VF610_NFC=y CONFIG_SYS_NAND_VF610_NFC_60_ECC_BYTES=y@@ -57,6 +63,8 @@ CONFIG_MTD_UBI_FASTMAP=y CONFIG_PHYLIB=y CONFIG_PHY_MICREL=y CONFIG_MII=y +# CONFIG_SPL_SERIAL_PRESENT is not set +# CONFIG_TPL_SERIAL_PRESENT is not set CONFIG_DM_SERIAL=y CONFIG_FSL_LPUART=y CONFIG_USB=y --2.20.1
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
https://lists.denx.de/listinfo/u-boot
PATCH v2 9/22 configs: colibri_vf: disable obscure options
Quoted 3 lines · Igor Opaniuk
Hi Marcel,
The actual line which does have impact is
CONFIG_DFU_MMC=y.
Vybrid is using raw NAND and not eMMC.
Quoted 3 lines
Not sure I understand the reason of adding "# ... is not set" lines in
this defconfig. Could you please explain?
That just explicitly disables stuff.
Quoted 8 lines
Regards,
IgorQuoted 3 lines · Marcel Ziswiler
From: Marcel Ziswiler <[email protected]>
Disable more obscure options to save another 26 KB
That's the short explanation.
The long one involves understanding that the Vybrid currently runs U- Boot in its SRAM (rather than DDR) which is limited in size.
Quoted 63 lines
Quoted 63 lines
in preparation of
the upcoming driver model migration.Signed-off-by Marcel Ziswiler <[email protected]>---
Changes in v2: None
configs/colibri_vf_defconfig | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)configs/colibri_vf_defconfig +9
-2@@ -17,11 +17,17 @@ CONFIG_BOARD_EARLY_INIT_F=y CONFIG_HUSH_PARSER=y # CONFIG_CMDLINE_EDITING is not set # CONFIG_AUTO_COMPLETE is not set +# CONFIG_SYS_LONGHELP is not set CONFIG_SYS_PROMPT="Colibri VFxx # " +# CONFIG_CMD_BOOTD is not set +# CONFIG_CMD_BOOTM is not set CONFIG_CMD_BOOTZ=y +# CONFIG_CMD_ELF is not set +# CONFIG_CMD_IMI is not set CONFIG_CMD_ASKENV=y CONFIG_CMD_MEMTEST=y CONFIG_CMD_DFU=y +# CONFIG_CMD_FLASH is not set CONFIG_CMD_FUSE=y CONFIG_CMD_GPIO=y # CONFIG_CMD_LOADB is not set@@ -46,10 +52,10 @@ CONFIG_DEFAULT_DEVICE_TREE="vf610-colibri" CONFIG_ENV_IS_IN_NAND=y CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y CONFIG_DM=y -CONFIG_DFU_MMC=y CONFIG_DFU_NAND=y CONFIG_DM_GPIO=y CONFIG_VYBRID_GPIO=y +# CONFIG_MMC_HW_PARTITIONING is not set CONFIG_FSL_ESDHC=y CONFIG_NAND_VF610_NFC=y CONFIG_SYS_NAND_VF610_NFC_60_ECC_BYTES=y@@ -57,6 +63,8 @@ CONFIG_MTD_UBI_FASTMAP=y CONFIG_PHYLIB=y CONFIG_PHY_MICREL=y CONFIG_MII=y +# CONFIG_SPL_SERIAL_PRESENT is not set +# CONFIG_TPL_SERIAL_PRESENT is not set CONFIG_DM_SERIAL=y CONFIG_FSL_LPUART=y CONFIG_USB=y --2.20.1
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
https://lists.denx.de/listinfo/u-boot
PATCH v2 9/22 configs: colibri_vf: disable obscure options
In reply to Marcel ZiswilerQuoted 4 lines
From: Marcel Ziswiler <[email protected]> Disable more obscure options to save another 26 KB in preparation of the upcoming driver model migration.
Signed-off-by Marcel Ziswiler <[email protected]>
Applied to u-boot-imx, -next, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================
PATCH v2 10/22 colibri_vf: migrate pinctrl and regulators to dtb/dm
In reply to Marcel ZiswilerFrom: Marcel Ziswiler <[email protected]>
Migrate pinctrl and regulators to device tree resp. driver model: DDR, DSPI, ENET, ESDHC, I2C, NFC and UART.
Enable CMD_DM, PINCTRL and DM_REGULATOR.
While at it also update copyright period and sort include files.
---
Changes in v2: None
board/toradex/colibri_vf/colibri_vf.c | 139 ++------------------------ configs/colibri_vf_defconfig | 5 + 2 files changed, 16 insertions(+), 128 deletions(-)
board/toradex/colibri_vf/colibri_vf.c +11 -128
@@ -1,43 +1,36 @@// SPDX-License-Identifier: GPL-2.0+ /* -* Copyright 2015 Toradex, Inc. +* Copyright 2015-2019 Toradex, Inc. * * Based on vf610twr.c: * Copyright 2013 Freescale Semiconductor, Inc. */ #include <common.h> -#include <asm/io.h> + +#include <asm/arch/clock.h> +#include <asm/arch/crm_regs.h> +#include <asm/arch/ddrmc-vf610.h> #include <asm/arch/imx-regs.h> #include <asm/arch/iomux-vf610.h> -#include <asm/arch/ddrmc-vf610.h> -#include <asm/arch/crm_regs.h> -#include <asm/arch/clock.h> -#include <mmc.h> +#include <asm/gpio.h> +#include <asm/io.h> #include <fdt_support.h> #include <fsl_esdhc.h> #include <fsl_dcu_fb.h> +#include <g_dnl.h> +#include <i2c.h> #include <jffs2/load_kernel.h> #include <miiphy.h> +#include <mmc.h> #include <mtd_node.h> #include <netdev.h> -#include <i2c.h> -#include <g_dnl.h> -#include <asm/gpio.h> #include <usb.h> +#include "../common/tdx-common.h" DECLARE_GLOBAL_DATA_PTR ; -#define UART_PAD_CTRL (PAD_CTL_PUS_100K_UP | PAD_CTL_SPEED_MED | \ - PAD_CTL_DSE_25ohm | PAD_CTL_OBE_IBE_ENABLE) - -#define ESDHC_PAD_CTRL (PAD_CTL_PUS_100K_UP | PAD_CTL_SPEED_HIGH | \ - PAD_CTL_DSE_20ohm | PAD_CTL_OBE_IBE_ENABLE) - -#define ENET_PAD_CTRL (PAD_CTL_PUS_47K_UP | PAD_CTL_SPEED_HIGH | \ - PAD_CTL_DSE_50ohm | PAD_CTL_OBE_IBE_ENABLE) -#define USB_PEN_GPIO 83#define USB_CDET_GPIO 102#define PTC0_GPIO_45 45
@@ -89,11 +82,6 @@ static struct ddrmc_cr_setting colibri_vf_cr_settings[] = { { 0, -1 } }; -static const iomux_v3_cfg_t usb_pads[] = { -VF610_PAD_PTD4__GPIO_83 , -VF610_PAD_PTC29__GPIO_102 , -}; -int dram_init (void ) {static const struct ddr3_jedec_timings timings = {
@@ -147,92 +135,12 @@ int dram_init(void) .wldqsen = 25, }; -ddrmc_setup_iomux (NULL ,0 ); -ddrmc_ctrl_init_ddr3 (&timings, colibri_vf_cr_settings,NULL ,1 ,2 ); gd->ram_size =get_ram_size ((void *)PHYS_SDRAM ,PHYS_SDRAM_SIZE );return 0 ; } -static void setup_iomux_uart (void ) -{ -static const iomux_v3_cfg_t uart_pads[] = { -NEW_PAD_CTRL (VF610_PAD_PTB4__UART1_TX ,UART_PAD_CTRL ), -NEW_PAD_CTRL (VF610_PAD_PTB5__UART1_RX ,UART_PAD_CTRL ), -NEW_PAD_CTRL (VF610_PAD_PTB10__UART0_TX ,UART_PAD_CTRL ), -NEW_PAD_CTRL (VF610_PAD_PTB11__UART0_RX ,UART_PAD_CTRL ), - }; - -imx_iomux_v3_setup_multiple_pads (uart_pads,ARRAY_SIZE (uart_pads)); -} - -static void setup_iomux_enet (void ) -{ -static const iomux_v3_cfg_t enet0_pads[] = { -NEW_PAD_CTRL (VF610_PAD_PTA6__RMII0_CLKOUT ,ENET_PAD_CTRL ), -NEW_PAD_CTRL (VF610_PAD_PTC10__RMII1_MDIO ,ENET_PAD_CTRL ), -NEW_PAD_CTRL (VF610_PAD_PTC9__RMII1_MDC ,ENET_PAD_CTRL ), -NEW_PAD_CTRL (VF610_PAD_PTC11__RMII1_CRS_DV ,ENET_PAD_CTRL ), -NEW_PAD_CTRL (VF610_PAD_PTC12__RMII1_RD1 ,ENET_PAD_CTRL ), -NEW_PAD_CTRL (VF610_PAD_PTC13__RMII1_RD0 ,ENET_PAD_CTRL ), -NEW_PAD_CTRL (VF610_PAD_PTC14__RMII1_RXER ,ENET_PAD_CTRL ), -NEW_PAD_CTRL (VF610_PAD_PTC15__RMII1_TD1 ,ENET_PAD_CTRL ), -NEW_PAD_CTRL (VF610_PAD_PTC16__RMII1_TD0 ,ENET_PAD_CTRL ), -NEW_PAD_CTRL (VF610_PAD_PTC17__RMII1_TXEN ,ENET_PAD_CTRL ), - }; - -imx_iomux_v3_setup_multiple_pads (enet0_pads,ARRAY_SIZE (enet0_pads)); -} - -static void setup_iomux_i2c (void ) -{ -static const iomux_v3_cfg_t i2c0_pads[] = { -VF610_PAD_PTB14__I2C0_SCL , -VF610_PAD_PTB15__I2C0_SDA , - }; - -imx_iomux_v3_setup_multiple_pads (i2c0_pads,ARRAY_SIZE (i2c0_pads)); -} - -#ifdef CONFIG_NAND_VF610_NFC -static void setup_iomux_nfc (void ) -{ -static const iomux_v3_cfg_t nfc_pads[] = { -VF610_PAD_PTD23__NF_IO7 , -VF610_PAD_PTD22__NF_IO6 , -VF610_PAD_PTD21__NF_IO5 , -VF610_PAD_PTD20__NF_IO4 , -VF610_PAD_PTD19__NF_IO3 , -VF610_PAD_PTD18__NF_IO2 , -VF610_PAD_PTD17__NF_IO1 , -VF610_PAD_PTD16__NF_IO0 , -VF610_PAD_PTB24__NF_WE_B , -VF610_PAD_PTB25__NF_CE0_B , -VF610_PAD_PTB27__NF_RE_B , -VF610_PAD_PTC26__NF_RB_B , -VF610_PAD_PTC27__NF_ALE , -VF610_PAD_PTC28__NF_CLE - }; - -imx_iomux_v3_setup_multiple_pads (nfc_pads,ARRAY_SIZE (nfc_pads)); -} -#endif - -#ifdef CONFIG_FSL_DSPI -static void setup_iomux_dspi (void ) -{ -static const iomux_v3_cfg_t dspi1_pads[] = { -VF610_PAD_PTD5__DSPI1_CS0 , -VF610_PAD_PTD6__DSPI1_SIN , -VF610_PAD_PTD7__DSPI1_SOUT , -VF610_PAD_PTD8__DSPI1_SCK , - }; - -imx_iomux_v3_setup_multiple_pads (dspi1_pads,ARRAY_SIZE (dspi1_pads)); -} -#endif -#ifdef CONFIG_VYBRID_GPIO static void setup_iomux_gpio (void ) {
@@ -344,20 +252,8 @@ int board_mmc_getcd(struct mmc *mmc)int board_mmc_init (bd_t *bis) { -static const iomux_v3_cfg_t esdhc1_pads[] = { -NEW_PAD_CTRL (VF610_PAD_PTA24__ESDHC1_CLK ,ESDHC_PAD_CTRL ), -NEW_PAD_CTRL (VF610_PAD_PTA25__ESDHC1_CMD ,ESDHC_PAD_CTRL ), -NEW_PAD_CTRL (VF610_PAD_PTA26__ESDHC1_DAT0 ,ESDHC_PAD_CTRL ), -NEW_PAD_CTRL (VF610_PAD_PTA27__ESDHC1_DAT1 ,ESDHC_PAD_CTRL ), -NEW_PAD_CTRL (VF610_PAD_PTA28__ESDHC1_DAT2 ,ESDHC_PAD_CTRL ), -NEW_PAD_CTRL (VF610_PAD_PTA29__ESDHC1_DAT3 ,ESDHC_PAD_CTRL ), - }; - esdhc_cfg[0 ].sdhc_clk =mxc_get_clock (MXC_ESDHC_CLK ); -imx_iomux_v3_setup_multiple_pads ( - esdhc1_pads,ARRAY_SIZE (esdhc1_pads)); -return fsl_esdhc_initialize (bis, &esdhc_cfg[0 ]); }#endif
@@ -496,21 +392,10 @@ int board_early_init_f(void)clock_init ();mscm_init (); -setup_iomux_uart (); -setup_iomux_enet (); -setup_iomux_i2c (); -#ifdef CONFIG_NAND_VF610_NFC -setup_iomux_nfc (); -#endif -#ifdef CONFIG_VYBRID_GPIO setup_iomux_gpio ();#endif -#ifdef CONFIG_FSL_DSPI -setup_iomux_dspi (); -#endif -#ifdef CONFIG_VIDEO_FSL_DCU_FB setup_tcon ();setup_iomux_fsl_dcu ();
@@ -594,8 +479,6 @@ int ft_board_setup(void *blob, bd_t *bd)#ifdef CONFIG_USB_EHCI_VF int board_ehci_hcd_init (int port) { -imx_iomux_v3_setup_multiple_pads (usb_pads,ARRAY_SIZE (usb_pads)); -switch (port) {case 0 :/* USBC does not have PEN, also configured as USB client only */
configs/colibri_vf_defconfig +5 -0
@@ -27,6 +27,7 @@ CONFIG_CMD_BOOTZ=y CONFIG_CMD_ASKENV=y CONFIG_CMD_MEMTEST=y CONFIG_CMD_DFU=y +CONFIG_CMD_DM=y # CONFIG_CMD_FLASH is not set CONFIG_CMD_FUSE=y CONFIG_CMD_GPIO=y
@@ -63,6 +64,10 @@ CONFIG_MTD_UBI_FASTMAP=y CONFIG_PHYLIB=y CONFIG_PHY_MICREL=y CONFIG_MII=y +CONFIG_PINCTRL=y +CONFIG_PINCTRL_VYBRID=y +CONFIG_DM_REGULATOR=y +CONFIG_DM_REGULATOR_FIXED=y # CONFIG_SPL_SERIAL_PRESENT is not set # CONFIG_TPL_SERIAL_PRESENT is not set CONFIG_DM_SERIAL=y
Signature · 1 line
2.20.1
PATCH v2 10/22 colibri_vf: migrate pinctrl and regulators to dtb/dm
Quoted 266 lines · Marcel Ziswiler
From: Marcel Ziswiler <[email protected]>
Migrate pinctrl and regulators to device tree resp. driver model: DDR, DSPI, ENET, ESDHC, I2C, NFC and UART.
Enable
CMD_DM, PINCTRL andDM_REGULATOR.While at it also update copyright period and sort include files.
Signed-off-by Marcel Ziswiler <[email protected]>---
Changes in v2: None
board/toradex/colibri_vf/colibri_vf.c | 139 ++------------------------ configs/colibri_vf_defconfig | 5 + 2 files changed, 16 insertions(+), 128 deletions(-)board/toradex/colibri_vf/colibri_vf.c +11
-128@@ -1,43 +1,36 @@// SPDX-License-Identifier: GPL-2.0+ /* -* Copyright 2015 Toradex, Inc. +* Copyright 2015-2019 Toradex, Inc. * * Based on vf610twr.c: * Copyright 2013 Freescale Semiconductor, Inc. */ #include <common.h> -#include <asm/io.h> + +#include <asm/arch/clock.h> +#include <asm/arch/crm_regs.h> +#include <asm/arch/ddrmc-vf610.h> #include <asm/arch/imx-regs.h> #include <asm/arch/iomux-vf610.h> -#include <asm/arch/ddrmc-vf610.h> -#include <asm/arch/crm_regs.h> -#include <asm/arch/clock.h> -#include <mmc.h> +#include <asm/gpio.h> +#include <asm/io.h> #include <fdt_support.h> #include <fsl_esdhc.h> #include <fsl_dcu_fb.h> +#include <g_dnl.h> +#include <i2c.h> #include <jffs2/load_kernel.h> #include <miiphy.h> +#include <mmc.h> #include <mtd_node.h> #include <netdev.h> -#include <i2c.h> -#include <g_dnl.h> -#include <asm/gpio.h> #include <usb.h> +#include "../common/tdx-common.h" DECLARE_GLOBAL_DATA_PTR ; -#define UART_PAD_CTRL (PAD_CTL_PUS_100K_UP | PAD_CTL_SPEED_MED | \ - PAD_CTL_DSE_25ohm | PAD_CTL_OBE_IBE_ENABLE) - -#define ESDHC_PAD_CTRL (PAD_CTL_PUS_100K_UP | PAD_CTL_SPEED_HIGH | \ - PAD_CTL_DSE_20ohm | PAD_CTL_OBE_IBE_ENABLE) - -#define ENET_PAD_CTRL (PAD_CTL_PUS_47K_UP | PAD_CTL_SPEED_HIGH | \ - PAD_CTL_DSE_50ohm | PAD_CTL_OBE_IBE_ENABLE) -#define USB_PEN_GPIO 83#define USB_CDET_GPIO 102#define PTC0_GPIO_45 45@@ -89,11 +82,6 @@ static struct ddrmc_cr_setting colibri_vf_cr_settings[] = { { 0, -1 } }; -static const iomux_v3_cfg_t usb_pads[] = { -VF610_PAD_PTD4__GPIO_83 , -VF610_PAD_PTC29__GPIO_102 , -}; -int dram_init (void ) {static const struct ddr3_jedec_timings timings = {@@ -147,92 +135,12 @@ int dram_init(void) .wldqsen = 25, }; -ddrmc_setup_iomux (NULL ,0 ); -ddrmc_ctrl_init_ddr3 (&timings, colibri_vf_cr_settings,NULL ,1 ,2 ); gd->ram_size =get_ram_size ((void *)PHYS_SDRAM ,PHYS_SDRAM_SIZE );return 0 ; } -static void setup_iomux_uart (void ) -{ -static const iomux_v3_cfg_t uart_pads[] = { -NEW_PAD_CTRL (VF610_PAD_PTB4__UART1_TX ,UART_PAD_CTRL ), -NEW_PAD_CTRL (VF610_PAD_PTB5__UART1_RX ,UART_PAD_CTRL ), -NEW_PAD_CTRL (VF610_PAD_PTB10__UART0_TX ,UART_PAD_CTRL ), -NEW_PAD_CTRL (VF610_PAD_PTB11__UART0_RX ,UART_PAD_CTRL ), - }; - -imx_iomux_v3_setup_multiple_pads (uart_pads,ARRAY_SIZE (uart_pads)); -} - -static void setup_iomux_enet (void ) -{ -static const iomux_v3_cfg_t enet0_pads[] = { -NEW_PAD_CTRL (VF610_PAD_PTA6__RMII0_CLKOUT ,ENET_PAD_CTRL ), -NEW_PAD_CTRL (VF610_PAD_PTC10__RMII1_MDIO ,ENET_PAD_CTRL ), -NEW_PAD_CTRL (VF610_PAD_PTC9__RMII1_MDC ,ENET_PAD_CTRL ), -NEW_PAD_CTRL (VF610_PAD_PTC11__RMII1_CRS_DV ,ENET_PAD_CTRL ), -NEW_PAD_CTRL (VF610_PAD_PTC12__RMII1_RD1 ,ENET_PAD_CTRL ), -NEW_PAD_CTRL (VF610_PAD_PTC13__RMII1_RD0 ,ENET_PAD_CTRL ), -NEW_PAD_CTRL (VF610_PAD_PTC14__RMII1_RXER ,ENET_PAD_CTRL ), -NEW_PAD_CTRL (VF610_PAD_PTC15__RMII1_TD1 ,ENET_PAD_CTRL ), -NEW_PAD_CTRL (VF610_PAD_PTC16__RMII1_TD0 ,ENET_PAD_CTRL ), -NEW_PAD_CTRL (VF610_PAD_PTC17__RMII1_TXEN ,ENET_PAD_CTRL ), - }; - -imx_iomux_v3_setup_multiple_pads (enet0_pads,ARRAY_SIZE (enet0_pads)); -} - -static void setup_iomux_i2c (void ) -{ -static const iomux_v3_cfg_t i2c0_pads[] = { -VF610_PAD_PTB14__I2C0_SCL , -VF610_PAD_PTB15__I2C0_SDA , - }; - -imx_iomux_v3_setup_multiple_pads (i2c0_pads,ARRAY_SIZE (i2c0_pads)); -} - -#ifdef CONFIG_NAND_VF610_NFC -static void setup_iomux_nfc (void ) -{ -static const iomux_v3_cfg_t nfc_pads[] = { -VF610_PAD_PTD23__NF_IO7 , -VF610_PAD_PTD22__NF_IO6 , -VF610_PAD_PTD21__NF_IO5 , -VF610_PAD_PTD20__NF_IO4 , -VF610_PAD_PTD19__NF_IO3 , -VF610_PAD_PTD18__NF_IO2 , -VF610_PAD_PTD17__NF_IO1 , -VF610_PAD_PTD16__NF_IO0 , -VF610_PAD_PTB24__NF_WE_B , -VF610_PAD_PTB25__NF_CE0_B , -VF610_PAD_PTB27__NF_RE_B , -VF610_PAD_PTC26__NF_RB_B , -VF610_PAD_PTC27__NF_ALE , -VF610_PAD_PTC28__NF_CLE - }; - -imx_iomux_v3_setup_multiple_pads (nfc_pads,ARRAY_SIZE (nfc_pads)); -} -#endif - -#ifdef CONFIG_FSL_DSPI -static void setup_iomux_dspi (void ) -{ -static const iomux_v3_cfg_t dspi1_pads[] = { -VF610_PAD_PTD5__DSPI1_CS0 , -VF610_PAD_PTD6__DSPI1_SIN , -VF610_PAD_PTD7__DSPI1_SOUT , -VF610_PAD_PTD8__DSPI1_SCK , - }; - -imx_iomux_v3_setup_multiple_pads (dspi1_pads,ARRAY_SIZE (dspi1_pads)); -} -#endif -#ifdef CONFIG_VYBRID_GPIO static void setup_iomux_gpio (void ) {@@ -344,20 +252,8 @@ int board_mmc_getcd(struct mmc *mmc)int board_mmc_init (bd_t *bis) { -static const iomux_v3_cfg_t esdhc1_pads[] = { -NEW_PAD_CTRL (VF610_PAD_PTA24__ESDHC1_CLK ,ESDHC_PAD_CTRL ), -NEW_PAD_CTRL (VF610_PAD_PTA25__ESDHC1_CMD ,ESDHC_PAD_CTRL ), -NEW_PAD_CTRL (VF610_PAD_PTA26__ESDHC1_DAT0 ,ESDHC_PAD_CTRL ), -NEW_PAD_CTRL (VF610_PAD_PTA27__ESDHC1_DAT1 ,ESDHC_PAD_CTRL ), -NEW_PAD_CTRL (VF610_PAD_PTA28__ESDHC1_DAT2 ,ESDHC_PAD_CTRL ), -NEW_PAD_CTRL (VF610_PAD_PTA29__ESDHC1_DAT3 ,ESDHC_PAD_CTRL ), - }; - esdhc_cfg[0 ].sdhc_clk =mxc_get_clock (MXC_ESDHC_CLK ); -imx_iomux_v3_setup_multiple_pads ( - esdhc1_pads,ARRAY_SIZE (esdhc1_pads)); -return fsl_esdhc_initialize (bis, &esdhc_cfg[0 ]); }#endif @@ -496,21 +392,10 @@ int board_early_init_f(void)clock_init ();mscm_init (); -setup_iomux_uart (); -setup_iomux_enet (); -setup_iomux_i2c (); -#ifdef CONFIG_NAND_VF610_NFC -setup_iomux_nfc (); -#endif -#ifdef CONFIG_VYBRID_GPIO setup_iomux_gpio ();#endif -#ifdef CONFIG_FSL_DSPI -setup_iomux_dspi (); -#endif -#ifdef CONFIG_VIDEO_FSL_DCU_FB setup_tcon ();setup_iomux_fsl_dcu ();@@ -594,8 +479,6 @@ int ft_board_setup(void *blob, bd_t *bd)#ifdef CONFIG_USB_EHCI_VF int board_ehci_hcd_init (int port) { -imx_iomux_v3_setup_multiple_pads (usb_pads,ARRAY_SIZE (usb_pads)); -switch (port) {case 0 :/* USBC does not have PEN, also configured as USB client only */ configs/colibri_vf_defconfig +5
-1@@ -27,6 +27,7 @@ CONFIG_CMD_BOOTZ=y CONFIG_CMD_ASKENV=y CONFIG_CMD_MEMTEST=y CONFIG_CMD_DFU=y +CONFIG_CMD_DM=y # CONFIG_CMD_FLASH is not set CONFIG_CMD_FUSE=y CONFIG_CMD_GPIO=y@@ -63,6 +64,10 @@ CONFIG_MTD_UBI_FASTMAP=y CONFIG_PHYLIB=y CONFIG_PHY_MICREL=y CONFIG_MII=y +CONFIG_PINCTRL=y +CONFIG_PINCTRL_VYBRID=y +CONFIG_DM_REGULATOR=y +CONFIG_DM_REGULATOR_FIXED=y # CONFIG_SPL_SERIAL_PRESENT is not set # CONFIG_TPL_SERIAL_PRESENT is not set CONFIG_DM_SERIAL=y --2.20.1
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
https://lists.denx.de/listinfo/u-boot
PATCH v2 10/22 colibri_vf: migrate pinctrl and regulators to dtb/dm
In reply to Marcel ZiswilerQuoted 7 lines
From: Marcel Ziswiler <[email protected]>
Migrate pinctrl and regulators to device tree resp. driver model: DDR, DSPI, ENET, ESDHC, I2C, NFC and UART.
EnableCMD_DM, PINCTRL andDM_REGULATOR.
While at it also update copyright period and sort include files.Signed-off-by Marcel Ziswiler <[email protected]>Reviewed-by Igor Opaniuk <[email protected]>
Applied to u-boot-imx, -next, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================
PATCH v2 11/22 colibri_vf: migrate fec, esdhc, nfc and usb to driver model
In reply to Marcel ZiswilerFrom: Marcel Ziswiler <[email protected]>
Migrate FEC, ESDHC, NFC and USB to driver model.
While at it also do no longer enable optional I2C clock in board file as the generic clock code now handles this. Note for space reason and as it is not required just for booting we do not enable I2C in U-Boot by default.
While at it also update copyright period.
---
Changes in v2: None
board/toradex/colibri_vf/colibri_vf.c | 82 +-------------------------- configs/colibri_vf_defconfig | 5 ++ include/configs/colibri_vf.h | 13 +---- 3 files changed, 7 insertions(+), 93 deletions(-)
board/toradex/colibri_vf/colibri_vf.c +1 -81
@@ -16,23 +16,16 @@#include <asm/gpio.h> #include <asm/io.h> #include <fdt_support.h> -#include <fsl_esdhc.h> #include <fsl_dcu_fb.h> #include <g_dnl.h> -#include <i2c.h> #include <jffs2/load_kernel.h> -#include <miiphy.h> -#include <mmc.h> #include <mtd_node.h> -#include <netdev.h> #include <usb.h> #include "../common/tdx-common.h" DECLARE_GLOBAL_DATA_PTR ; -#define USB_PEN_GPIO 83 -#define USB_CDET_GPIO 102#define PTC0_GPIO_45 45static struct ddrmc_cr_setting colibri_vf_cr_settings[] = {
@@ -239,25 +232,6 @@ static void setup_tcon(void) }#endif -#ifdef CONFIG_FSL_ESDHC -struct fsl_esdhc_cfg esdhc_cfg[1 ] = { - {ESDHC1_BASE_ADDR }, -}; - -int board_mmc_getcd (struct mmc *mmc) -{ -/* eSDHC1 is always present */ -return 1 ; -} - -int board_mmc_init (bd_t *bis) -{ - esdhc_cfg[0 ].sdhc_clk =mxc_get_clock (MXC_ESDHC_CLK ); - -return fsl_esdhc_initialize (bis, &esdhc_cfg[0 ]); -} -#endif -static inline int is_colibri_vf61 (void ) {struct mscm *mscm = (struct mscm *)MSCM_BASE_ADDR ;
@@ -290,7 +264,7 @@ static void clock_init(void) CCM_CCGR3_ANADIG_CTRL_MASK | CCM_CCGR3_SCSC_CTRL_MASK);clrsetbits_le32 (&ccm->ccgr4,CCM_REG_CTRL_MASK ,CCM_CCGR4_WKUP_CTRL_MASK |CCM_CCGR4_CCM_CTRL_MASK | -CCM_CCGR4_GPC_CTRL_MASK |CCM_CCGR4_I2C0_CTRL_MASK ); +CCM_CCGR4_GPC_CTRL_MASK );clrsetbits_le32 (&ccm->ccgr6,CCM_REG_CTRL_MASK ,CCM_CCGR6_OCOTP_CTRL_MASK |CCM_CCGR6_DDRMC_CTRL_MASK ); clrsetbits_le32(&ccm->ccgr7, CCM_REG_CTRL_MASK,
@@ -379,14 +353,6 @@ static void mscm_init(void)writew (MSCM_IRSPRC_CP0_EN , &mscmir->irsprc[i]); } -int board_phy_config (struct phy_device *phydev) -{ -if (phydev->drv->config) - phydev->drv->config (phydev); - -return 0 ; -} -int board_early_init_f (void ) {clock_init ();
@@ -433,13 +399,8 @@ int board_init(void)* so we must use the external oscillator in order * to maintain correct time in the hwclock */ -setbits_le32 (&scsc->sosc_ctr,SCSC_SOSC_CTR_SOSC_EN ); -#ifdef CONFIG_USB_EHCI_VF -gpio_request (USB_CDET_GPIO ,"usb-cdet-gpio" ); -#endif -return 0 ; }
@@ -476,47 +437,6 @@ int ft_board_setup(void *blob, bd_t *bd) }#endif -#ifdef CONFIG_USB_EHCI_VF -int board_ehci_hcd_init (int port) -{ -switch (port) { -case 0 : -/* USBC does not have PEN, also configured as USB client only */ -break ; -case 1 : -gpio_request (USB_PEN_GPIO ,"usb-pen-gpio" ); -gpio_direction_output (USB_PEN_GPIO ,0 ); -break ; - } -return 0 ; -} - -int board_usb_phy_mode (int port) -{ -switch (port) { -case 0 : -/* -* Port 0 is used only in client mode on Colibri Vybrid modules -* Check for state of USB client gpio pin and accordingly return -* USB_INIT_DEVICE or USB_INIT_HOST. -*/ -if (gpio_get_value (USB_CDET_GPIO )) -return USB_INIT_DEVICE ; -else -return USB_INIT_HOST ; -case 1 : -/* Port 1 is used only in host mode on Colibri Vybrid modules */ -return USB_INIT_HOST ; -default : -/* -* There are only two USB controllers on Vybrid. Ideally we will -* not reach here. However return USB_INIT_HOST if we do. -*/ -return USB_INIT_HOST ; - } -} -#endif -/* * Backlight off before OS handover */
configs/colibri_vf_defconfig +5 -0
@@ -56,13 +56,18 @@ CONFIG_DM=y CONFIG_DFU_NAND=y CONFIG_DM_GPIO=y CONFIG_VYBRID_GPIO=y +CONFIG_DM_MMC=y # CONFIG_MMC_HW_PARTITIONING is not set CONFIG_FSL_ESDHC=y +CONFIG_MTD=y CONFIG_NAND_VF610_NFC=y +CONFIG_NAND_VF610_NFC_DT=y CONFIG_SYS_NAND_VF610_NFC_60_ECC_BYTES=y CONFIG_MTD_UBI_FASTMAP=y CONFIG_PHYLIB=y CONFIG_PHY_MICREL=y +CONFIG_DM_ETH=y +CONFIG_FEC_MXC=y CONFIG_MII=y CONFIG_PINCTRL=y CONFIG_PINCTRL_VYBRID=y
include/configs/colibri_vf.h +1 -12
@@ -1,6 +1,6 @@/* SPDX-License-Identifier: GPL-2.0+ */ /* -* Copyright 2015-2016 Toradex, Inc. +* Copyright 2015-2019 Toradex, Inc. * * Configuration settings for the Toradex VF50/VF61 modules. *
@@ -36,17 +36,6 @@/* NAND support */ #define CONFIG_SYS_NAND_ONFI_DETECTION #define CONFIG_SYS_MAX_NAND_DEVICE 1 -#define CONFIG_SYS_NAND_BASE NFC_BASE_ADDR - -/* Dynamic MTD partition support */ - -#define CONFIG_SYS_FSL_ESDHC_ADDR 0 -#define CONFIG_SYS_FSL_ESDHC_NUM 1 - -#define CONFIG_FEC_MXC -#define IMX_FEC_BASE ENET1_BASE_ADDR -#define CONFIG_FEC_XCV_TYPE RMII -#define CONFIG_FEC_MXC_PHYADDR 0#define CONFIG_IPADDR 192.168.10.2#define CONFIG_NETMASK 255.255.255.0
Signature · 1 line
2.20.1
PATCH v2 11/22 colibri_vf: migrate fec, esdhc, nfc and usb to driver model
Quoted 223 lines · Marcel Ziswiler
From: Marcel Ziswiler <[email protected]>
Migrate FEC, ESDHC, NFC and USB to driver model.
While at it also do no longer enable optional I2C clock in board file as the generic clock code now handles this. Note for space reason and as it is not required just for booting we do not enable I2C in U-Boot by default.
While at it also update copyright period.
Signed-off-by Marcel Ziswiler <[email protected]>---
Changes in v2: None
board/toradex/colibri_vf/colibri_vf.c | 82 +-------------------------- configs/colibri_vf_defconfig | 5 ++ include/configs/colibri_vf.h | 13 +---- 3 files changed, 7 insertions(+), 93 deletions(-)board/toradex/colibri_vf/colibri_vf.c +1
-81@@ -16,23 +16,16 @@#include <asm/gpio.h> #include <asm/io.h> #include <fdt_support.h> -#include <fsl_esdhc.h> #include <fsl_dcu_fb.h> #include <g_dnl.h> -#include <i2c.h> #include <jffs2/load_kernel.h> -#include <miiphy.h> -#include <mmc.h> #include <mtd_node.h> -#include <netdev.h> #include <usb.h> #include "../common/tdx-common.h" DECLARE_GLOBAL_DATA_PTR ; -#define USB_PEN_GPIO 83 -#define USB_CDET_GPIO 102#define PTC0_GPIO_45 45static struct ddrmc_cr_setting colibri_vf_cr_settings[] = {@@ -239,25 +232,6 @@ static void setup_tcon(void) }#endif -#ifdef CONFIG_FSL_ESDHC -struct fsl_esdhc_cfg esdhc_cfg[1 ] = { - {ESDHC1_BASE_ADDR }, -}; - -int board_mmc_getcd (struct mmc *mmc) -{ -/* eSDHC1 is always present */ -return 1 ; -} - -int board_mmc_init (bd_t *bis) -{ - esdhc_cfg[0 ].sdhc_clk =mxc_get_clock (MXC_ESDHC_CLK ); - -return fsl_esdhc_initialize (bis, &esdhc_cfg[0 ]); -} -#endif -static inline int is_colibri_vf61 (void ) {struct mscm *mscm = (struct mscm *)MSCM_BASE_ADDR ;@@ -290,7 +264,7 @@ static void clock_init(void) CCM_CCGR3_ANADIG_CTRL_MASK | CCM_CCGR3_SCSC_CTRL_MASK);clrsetbits_le32 (&ccm->ccgr4,CCM_REG_CTRL_MASK ,CCM_CCGR4_WKUP_CTRL_MASK |CCM_CCGR4_CCM_CTRL_MASK | -CCM_CCGR4_GPC_CTRL_MASK |CCM_CCGR4_I2C0_CTRL_MASK ); +CCM_CCGR4_GPC_CTRL_MASK );clrsetbits_le32 (&ccm->ccgr6,CCM_REG_CTRL_MASK ,CCM_CCGR6_OCOTP_CTRL_MASK |CCM_CCGR6_DDRMC_CTRL_MASK ); clrsetbits_le32(&ccm->ccgr7, CCM_REG_CTRL_MASK,@@ -379,14 +353,6 @@ static void mscm_init(void)writew (MSCM_IRSPRC_CP0_EN , &mscmir->irsprc[i]); } -int board_phy_config (struct phy_device *phydev) -{ -if (phydev->drv->config) - phydev->drv->config (phydev); - -return 0 ; -} -int board_early_init_f (void ) {clock_init ();@@ -433,13 +399,8 @@ int board_init(void)* so we must use the external oscillator in order * to maintain correct time in the hwclock */ -setbits_le32 (&scsc->sosc_ctr,SCSC_SOSC_CTR_SOSC_EN ); -#ifdef CONFIG_USB_EHCI_VF -gpio_request (USB_CDET_GPIO ,"usb-cdet-gpio" ); -#endif -return 0 ; }@@ -476,47 +437,6 @@ int ft_board_setup(void *blob, bd_t *bd) }#endif -#ifdef CONFIG_USB_EHCI_VF -int board_ehci_hcd_init (int port) -{ -switch (port) { -case 0 : -/* USBC does not have PEN, also configured as USB client only */ -break ; -case 1 : -gpio_request (USB_PEN_GPIO ,"usb-pen-gpio" ); -gpio_direction_output (USB_PEN_GPIO ,0 ); -break ; - } -return 0 ; -} - -int board_usb_phy_mode (int port) -{ -switch (port) { -case 0 : -/* -* Port 0 is used only in client mode on Colibri Vybrid modules -* Check for state of USB client gpio pin and accordingly return -* USB_INIT_DEVICE or USB_INIT_HOST. -*/ -if (gpio_get_value (USB_CDET_GPIO )) -return USB_INIT_DEVICE ; -else -return USB_INIT_HOST ; -case 1 : -/* Port 1 is used only in host mode on Colibri Vybrid modules */ -return USB_INIT_HOST ; -default : -/* -* There are only two USB controllers on Vybrid. Ideally we will -* not reach here. However return USB_INIT_HOST if we do. -*/ -return USB_INIT_HOST ; - } -} -#endif -/* * Backlight off before OS handover */ configs/colibri_vf_defconfig +5
-0@@ -56,13 +56,18 @@ CONFIG_DM=y CONFIG_DFU_NAND=y CONFIG_DM_GPIO=y CONFIG_VYBRID_GPIO=y +CONFIG_DM_MMC=y # CONFIG_MMC_HW_PARTITIONING is not set CONFIG_FSL_ESDHC=y +CONFIG_MTD=y CONFIG_NAND_VF610_NFC=y +CONFIG_NAND_VF610_NFC_DT=y CONFIG_SYS_NAND_VF610_NFC_60_ECC_BYTES=y CONFIG_MTD_UBI_FASTMAP=y CONFIG_PHYLIB=y CONFIG_PHY_MICREL=y +CONFIG_DM_ETH=y +CONFIG_FEC_MXC=y CONFIG_MII=y CONFIG_PINCTRL=y CONFIG_PINCTRL_VYBRID=yinclude/configs/colibri_vf.h +1
-13@@ -1,6 +1,6 @@/* SPDX-License-Identifier: GPL-2.0+ */ /* -* Copyright 2015-2016 Toradex, Inc. +* Copyright 2015-2019 Toradex, Inc. * * Configuration settings for the Toradex VF50/VF61 modules. * @@ -36,17 +36,6 @@/* NAND support */ #define CONFIG_SYS_NAND_ONFI_DETECTION #define CONFIG_SYS_MAX_NAND_DEVICE 1 -#define CONFIG_SYS_NAND_BASE NFC_BASE_ADDR - -/* Dynamic MTD partition support */ - -#define CONFIG_SYS_FSL_ESDHC_ADDR 0 -#define CONFIG_SYS_FSL_ESDHC_NUM 1 - -#define CONFIG_FEC_MXC -#define IMX_FEC_BASE ENET1_BASE_ADDR -#define CONFIG_FEC_XCV_TYPE RMII -#define CONFIG_FEC_MXC_PHYADDR 0#define CONFIG_IPADDR 192.168.10.2#define CONFIG_NETMASK 255.255.255.0 --2.20.1
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
https://lists.denx.de/listinfo/u-boot
PATCH v2 11/22 colibri_vf: migrate fec, esdhc, nfc and usb to driver model
In reply to Marcel ZiswilerQuoted 9 lines
From: Marcel Ziswiler <[email protected]>
Migrate FEC, ESDHC, NFC and USB to driver model.
While at it also do no longer enable optional I2C clock in board file as the generic clock code now handles this. Note for space reason and as it is not required just for booting we do not enable I2C in U-Boot by default.
While at it also update copyright period.Signed-off-by Marcel Ziswiler <[email protected]>Reviewed-by Igor Opaniuk <[email protected]>
Applied to u-boot-imx, -next, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================
PATCH v2 12/22 config: colibri_vf: use macros from linux/sizes.h
In reply to Marcel ZiswilerFrom: Marcel Ziswiler <[email protected]>
Use SZ_X{MK} macros from linux/sizes.h for include/configs/colibri_vf.h.
---
Changes in v2: None
include/configs/colibri_vf.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
include/configs/colibri_vf.h +4 -3
@@ -12,6 +12,7 @@#define __CONFIG_H#include <asm/arch/imx-regs.h> +#include <linux/sizes.h> #define CONFIG_SYS_FSL_CLK
@@ -28,7 +29,7 @@#endif /* Size of malloc() pool */ -#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 2 * 1024 * 1024) +#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 2 * SZ_1M)/* Allow to overwrite serial and ethaddr */ #define CONFIG_ENV_OVERWRITE
@@ -118,7 +119,7 @@/* Physical memory map */ #define PHYS_SDRAM (0x80000000) -#define PHYS_SDRAM_SIZE (256 * 1024 * 1024) +#define PHYS_SDRAM_SIZE (256 * SZ_1M)#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM#define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
@@ -141,6 +142,6 @@#define CONFIG_EHCI_HCD_INIT_AFTER_RESET /* USB DFU */ -#define CONFIG_SYS_DFU_DATA_BUF_SIZE (1024 * 1024) +#define CONFIG_SYS_DFU_DATA_BUF_SIZE (SZ_1M)#endif /* __CONFIG_H */
Signature · 1 line
2.20.1
PATCH v2 12/22 config: colibri_vf: use macros from linux/sizes.h
Quoted 4 lines
From: Marcel Ziswiler <[email protected]>
Use SZ_X{MK} macros fromlinux/sizes.hforinclude/configs/colibri_vf.h.Signed-off-by Marcel Ziswiler <[email protected]>Reviewed-by Igor Opaniuk <[email protected]>
Applied to u-boot-imx, -next, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================
PATCH v2 13/22 colibri_vf: add distroboot support
In reply to Marcel ZiswilerFrom: Stefan Agner <[email protected]>
Add support for distro boot. This is especially helpful for external devices. There is a global boot command which scans a predefined list of boot targets:
run distro_bootcmd
As well as direct boot commands such as:
run bootcmd_mmc0
run bootcmd_usb
run bootcmd_dhcp
...
Refer to doc/README.distro fo details.
While at it also re-order boot command macros as well as the CONFIG_EXTRA_ENV_SETTINGS.
---
Changes in v2: None
include/configs/colibri_vf.h | 75 ++++++++++++++++++++++-------------- 1 file changed, 46 insertions(+), 29 deletions(-)
include/configs/colibri_vf.h +46 -29
@@ -48,13 +48,15 @@/* We boot from the gfxRAM area of the OCRAM. */ #define CONFIG_BOARD_SIZE_LIMIT 520192 -#define SD_BOOTCMD \ - "sdargs=root=/dev/mmcblk0p2 rw rootwait\0" \ - "sdboot=run setup; setenv bootargs ${defargs} ${sdargs} ${mtdparts} " \ - "${setupargs} ${vidargs}; echo Booting from MMC/SD card...; " \ - "load mmc 0:2 ${kernel_addr_r} /boot/${kernel_file} && " \ - "load mmc 0:2 ${fdt_addr_r} /boot/${soc}-colibri-${fdt_board}.dtb && " \ - "run fdt_fixup && bootz ${kernel_addr_r} - ${fdt_addr_r}\0" \ +#define MEM_LAYOUT_ENV_SETTINGS \ + "bootm_size=0x10000000\0" \ + "fdt_addr_r=0x82000000\0" \ + "fdt_high=0xffffffff\0" \ + "initrd_high=0xffffffff\0" \ + "kernel_addr_r=0x81000000\0" \ + "pxefile_addr_r=0x87100000\0" \ + "ramdisk_addr_r=0x82100000\0" \ + "scriptaddr=0x87000000\0"#define NFS_BOOTCMD \ "nfsargs=ip=:::::eth0: root=/dev/nfs\0" \
@@ -65,7 +67,15 @@"tftp ${fdt_addr_r} ${soc}-colibri-${fdt_board}.dtb && " \ "run fdt_fixup && bootz ${kernel_addr_r} - ${fdt_addr_r}\0" \ -#define UBI_BOOTCMD \ +#define SD_BOOTCMD \ + "sdargs=root=/dev/mmcblk0p2 rw rootwait\0" \ + "sdboot=run setup; setenv bootargs ${defargs} ${sdargs} ${mtdparts} " \ + "${setupargs} ${vidargs}; echo Booting from MMC/SD card...; " \ + "load mmc 0:2 ${kernel_addr_r} /boot/${kernel_file} && " \ + "load mmc 0:2 ${fdt_addr_r} /boot/${soc}-colibri-${fdt_board}.dtb && " \ + "run fdt_fixup && bootz ${kernel_addr_r} - ${fdt_addr_r}\0" \ + +#define UBI_BOOTCMD \ "ubiargs=ubi.mtd=ubi root=ubi0:rootfs rootfstype=ubifs " \ "ubi.fm_autoconvert=1\0" \ "ubiboot=run setup; " \
@@ -76,36 +86,43 @@"ubi read ${fdt_addr_r} dtb && " \ "run fdt_fixup && bootz ${kernel_addr_r} - ${fdt_addr_r}\0" \ -#define CONFIG_BOOTCOMMAND "run ubiboot; run sdboot; run nfsboot" +#define CONFIG_BOOTCOMMAND "run ubiboot; run distro_bootcmd;" + +#define BOOT_TARGET_DEVICES (func) \ + func(MMC, mmc, 0) \ + func(USB, usb, 0) \ + func(DHCP, dhcp, na) +#include <config_distro_bootcmd.h> +#undef BOOTENV_RUN_NET_USB_START +#define BOOTENV_RUN_NET_USB_START ""#define DFU_ALT_NAND_INFO "vf-bcb part 0,1;u-boot part 0,2;ubi part 0,4"#define CONFIG_EXTRA_ENV_SETTINGS \ - "kernel_addr_r=0x82000000\0" \ - "fdt_addr_r=0x84000000\0" \ - "kernel_file=zImage\0" \ - "fdt_file=${soc}-colibri-${fdt_board}.dtb\0" \ + BOOTENV \ + MEM_LAYOUT_ENV_SETTINGS \ + NFS_BOOTCMD \ + SD_BOOTCMD \ + UBI_BOOTCMD \ + "console=ttyLP0\0" \ + "defargs=\0" \ + "dfu_alt_info=" DFU_ALT_NAND_INFO "\0" \ "fdt_board=eval-v3\0" \ + "fdt_file=${soc}-colibri-${fdt_board}.dtb\0" \ "fdt_fixup=;\0" \ - "defargs=\0" \ - "console=ttyLP0\0" \ - "setup=setenv setupargs " \ - "console=tty1 console=${console}" \ - ",${baudrate}n8 ${memargs}\0" \ + "kernel_file=zImage\0" \ + "mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \ "setsdupdate=mmc rescan && set interface mmc && " \ - "fatload ${interface} 0:1 ${loadaddr} flash_blk.img && " \ - "source ${loadaddr}\0" \ - "setusbupdate=usb start && set interface usb && " \ - "fatload ${interface} 0:1 ${loadaddr} flash_blk.img && " \ - "source ${loadaddr}\0" \ + "fatload ${interface} 0:1 ${loadaddr} flash_blk.img && " \ + "source ${loadaddr}\0" \ + "setup=setenv setupargs console=tty1 console=${console}" \ + ",${baudrate}n8 ${memargs}\0" \ "setupdate=run setsdupdate || run setusbupdate\0" \ - "mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \ - "dfu_alt_info=" DFU_ALT_NAND_INFO "\0" \ - "video-mode=dcufb:640x480-16 at 60,monitor=lcd\0" \ + "setusbupdate=usb start && set interface usb && " \ + "fatload ${interface} 0:1 ${loadaddr} flash_blk.img && " \ + "source ${loadaddr}\0" \ "splashpos=m,m\0" \ - SD_BOOTCMD \ - NFS_BOOTCMD \ - UBI_BOOTCMD + "video-mode=dcufb:640x480-16 at 60,monitor=lcd\0"/* Miscellaneous configurable options */ #define CONFIG_SYS_CBSIZE 1024/* Console I/O Buffer Size */
Signature · 1 line
2.20.1
PATCH v2 13/22 colibri_vf: add distroboot support
Hi Marcel,
Please check some minor comments below (could be addressed in a separate patchset):
Quoted 35 lines · Marcel Ziswiler
From: Stefan Agner <[email protected]>
Add support for distro boot. This is especially helpful for external devices. There is a global boot command which scans a predefined list of boot targets:
rundistro_bootcmdAs well as direct boot commands such as:
runbootcmd_mmc0
runbootcmd_usb
runbootcmd_dhcp
...Refer to doc/README.distro fo details.
While at it also re-order boot command macros as well as the
CONFIG_EXTRA_ENV_SETTINGS.Signed-off-by Stefan Agner <[email protected]>Acked-by Max Krummenacher <[email protected]>Acked-by Marcel Ziswiler <[email protected]>---
Changes in v2: None
include/configs/colibri_vf.h | 75 ++++++++++++++++++++++-------------- 1 file changed, 46 insertions(+), 29 deletions(-)include/configs/colibri_vf.h +0
-0
include/configs/colibri_vf.h line 52
Quoted 5 lines
include/configs/colibri_vf.h +0
-2@@ -48,13 +48,15 @@/* We boot from the gfxRAM area of the OCRAM. */ #define CONFIG_BOARD_SIZE_LIMIT 520192 -#define SD_BOOTCMD \ - "sdargs=root=/dev/mmcblk0p2 rw rootwait\0" \
minor: "mmcblk0p2" (it's used in multiple places) can also be put into the separate variable in case if we decide to change the partition layout in the future.
include/configs/colibri_vf.h line 56
Quoted 4 lines
include/configs/colibri_vf.h +0
-4-"sdboot=run setup; setenv bootargs ${defargs} ${sdargs} ${mtdparts} " \ -"${setupargs} ${vidargs}; echo Booting from MMC/SD card...; " \ -"load mmc 0:2 ${kernel_addr_r} /boot/${kernel_file} && " \ -"load mmc 0:2 ${fdt_addr_r} /boot/${soc}-colibri-${fdt_board}.dtb && " \
minor: I think we should unify (can be addressed in another patchset) the way how dtb names are concatenated (and for example use this scheme for all Toradex SoMs; particularly for Colibri iMX6DL the full-name is still hardcoded "imx6dl-colibri-eval-v3.dtb")
Quoted 69 lines
include/configs/colibri_vf.h +37
-12-"run fdt_fixup && bootz ${kernel_addr_r} - ${fdt_addr_r}\0" \ +#define MEM_LAYOUT_ENV_SETTINGS \ + "bootm_size=0x10000000\0" \ + "fdt_addr_r=0x82000000\0" \ + "fdt_high=0xffffffff\0" \ + "initrd_high=0xffffffff\0" \ + "kernel_addr_r=0x81000000\0" \ + "pxefile_addr_r=0x87100000\0" \ + "ramdisk_addr_r=0x82100000\0" \ + "scriptaddr=0x87000000\0"#define NFS_BOOTCMD \ "nfsargs=ip=:::::eth0: root=/dev/nfs\0" \@@ -65,7 +67,15 @@"tftp ${fdt_addr_r} ${soc}-colibri-${fdt_board}.dtb && " \ "run fdt_fixup && bootz ${kernel_addr_r} - ${fdt_addr_r}\0" \ -#define UBI_BOOTCMD \ +#define SD_BOOTCMD \ + "sdargs=root=/dev/mmcblk0p2 rw rootwait\0" \ + "sdboot=run setup; setenv bootargs ${defargs} ${sdargs} ${mtdparts} " \ + "${setupargs} ${vidargs}; echo Booting from MMC/SD card...; " \ + "load mmc 0:2 ${kernel_addr_r} /boot/${kernel_file} && " \ + "load mmc 0:2 ${fdt_addr_r} /boot/${soc}-colibri-${fdt_board}.dtb && " \ + "run fdt_fixup && bootz ${kernel_addr_r} - ${fdt_addr_r}\0" \ + +#define UBI_BOOTCMD \ "ubiargs=ubi.mtd=ubi root=ubi0:rootfs rootfstype=ubifs " \ "ubi.fm_autoconvert=1\0" \ "ubiboot=run setup; " \@@ -76,36 +86,43 @@"ubi read ${fdt_addr_r} dtb && " \ "run fdt_fixup && bootz ${kernel_addr_r} - ${fdt_addr_r}\0" \ -#define CONFIG_BOOTCOMMAND "run ubiboot; run sdboot; run nfsboot" +#define CONFIG_BOOTCOMMAND "run ubiboot; run distro_bootcmd;" + +#define BOOT_TARGET_DEVICES (func) \ + func(MMC, mmc, 0) \ + func(USB, usb, 0) \ + func(DHCP, dhcp, na) +#include <config_distro_bootcmd.h> +#undef BOOTENV_RUN_NET_USB_START +#define BOOTENV_RUN_NET_USB_START ""#define DFU_ALT_NAND_INFO "vf-bcb part 0,1;u-boot part 0,2;ubi part 0,4"#define CONFIG_EXTRA_ENV_SETTINGS \ - "kernel_addr_r=0x82000000\0" \ - "fdt_addr_r=0x84000000\0" \ - "kernel_file=zImage\0" \ - "fdt_file=${soc}-colibri-${fdt_board}.dtb\0" \ + BOOTENV \ + MEM_LAYOUT_ENV_SETTINGS \ + NFS_BOOTCMD \ + SD_BOOTCMD \ + UBI_BOOTCMD \ + "console=ttyLP0\0" \ + "defargs=\0" \ + "dfu_alt_info=" DFU_ALT_NAND_INFO "\0" \ "fdt_board=eval-v3\0" \ + "fdt_file=${soc}-colibri-${fdt_board}.dtb\0" \ "fdt_fixup=;\0" \ - "defargs=\0" \ - "console=ttyLP0\0" \ - "setup=setenv setupargs " \ - "console=tty1 console=${console}" \ - ",${baudrate}n8 ${memargs}\0" \ + "kernel_file=zImage\0" \
include/configs/colibri_vf.h line 118
Quoted 10 lines
include/configs/colibri_vf.h +4
-5+"mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \"setsdupdate=mmc rescan && set interface mmc && " \ -"fatload ${interface} 0:1 ${loadaddr} flash_blk.img && " \ -"source ${loadaddr}\0" \ -"setusbupdate=usb start && set interface usb && " \ -"fatload ${interface} 0:1 ${loadaddr} flash_blk.img && " \ -"source ${loadaddr}\0" \ +"fatload ${interface} 0:1 ${loadaddr} flash_blk.img && " \ +"source ${loadaddr}\0" \ +"setup=setenv setupargs console=tty1 console=${console}" \
what is the point providing console configuration two times?
Quoted 23 lines
include/configs/colibri_vf.h +5
-7+",${baudrate}n8 ${memargs}\0" \"setupdate=run setsdupdate || run setusbupdate\0" \ -"mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \ -"dfu_alt_info=" DFU_ALT_NAND_INFO "\0" \ -"video-mode=dcufb:640x480-16 at 60,monitor=lcd\0" \ +"setusbupdate=usb start && set interface usb && " \ +"fatload ${interface} 0:1 ${loadaddr} flash_blk.img && " \ +"source ${loadaddr}\0" \"splashpos=m,m\0" \ -SD_BOOTCMD \ -NFS_BOOTCMD \ -UBI_BOOTCMD +"video-mode=dcufb:640x480-16 at 60,monitor=lcd\0" /* Miscellaneous configurable options */#define CONFIG_SYS_CBSIZE 1024/* Console I/O Buffer Size */ --2.20.1
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
https://lists.denx.de/listinfo/u-boot
PATCH v2 13/22 colibri_vf: add distroboot support
Hi Igor
Quoted 49 lines · Igor Opaniuk
Hi Marcel,
Reviewed-by Igor Opaniuk <[email protected]>Please check some minor comments below (could be addressed in a separate patchset):
Quoted 40 lines · Marcel Ziswiler
From: Stefan Agner <[email protected]>
Add support for distro boot. This is especially helpful for external
devices. There is a global boot command which scans a predefined list of boot targets:
rundistro_bootcmdAs well as direct boot commands such as:
runbootcmd_mmc0
runbootcmd_usb
runbootcmd_dhcp
...Refer to doc/README.distro fo details.
While at it also re-order boot command macros as well as the
CONFIG_EXTRA_ENV_SETTINGS.Signed-off-by Stefan Agner <[email protected]>Acked-by Max Krummenacher <[email protected]>Acked-by Marcel Ziswiler <[email protected]>---
Changes in v2: None
include/configs/colibri_vf.h | 75 ++++++++++++++++++++++-------- ------ 1 file changed, 46 insertions(+), 29 deletions(-)include/configs/colibri_vf.h +0
-0@@ -48,13 +48,15 @@/* We boot from the gfxRAM area of the OCRAM. */ #define CONFIG_BOARD_SIZE_LIMIT 520192
Quoted 6 lines
include/configs/colibri_vf.h line 52
Quoted 2 lines
include/configs/colibri_vf.h +0
-2-#define SD_BOOTCMD \ - "sdargs=root=/dev/mmcblk0p2 rw rootwait\0" \minor: "mmcblk0p2" (it's used in multiple places) can also be put into
the separate variable in case if we decide to change the partition layout in the future.
With BSP 3.0 we anyway plan to transition to proper distroboot.
Quoted 11 lines
include/configs/colibri_vf.h line 53
Quoted 7 lines
include/configs/colibri_vf.h +0
-4-"sdboot=run setup; setenv bootargs ${defargs} ${sdargs} ${mtdparts} " \ -"${setupargs} ${vidargs}; echo Booting from MMC/SD card...; " \ -"load mmc 0:2 ${kernel_addr_r} /boot/${kernel_file} && " \ - "load mmc 0:2 ${fdt_addr_r} /boot/${soc}-colibri- ${fdt_board}.dtb && " \minor: I think we should unify (can be addressed in another patchset) the way how dtb names are concatenated (and for example use this scheme for all Toradex SoMs; particularly for Colibri iMX6DL the full-name is still hardcoded "imx6dl-colibri-eval-v3.dtb")
Yeah, that is another legacy in need of cleaning up.
Quoted 81 lines
Quoted 81 lines
include/configs/colibri_vf.h +0
-1-"run fdt_fixup && bootz ${kernel_addr_r} - ${fdt_addr_r}\0" \
include/configs/colibri_vf.h +15
-1+#define MEM_LAYOUT_ENV_SETTINGS \ + "bootm_size=0x10000000\0" \ + "fdt_addr_r=0x82000000\0" \ + "fdt_high=0xffffffff\0" \ + "initrd_high=0xffffffff\0" \ + "kernel_addr_r=0x81000000\0" \ + "pxefile_addr_r=0x87100000\0" \ + "ramdisk_addr_r=0x82100000\0" \ + "scriptaddr=0x87000000\0"#define NFS_BOOTCMD \ "nfsargs=ip=:::::eth0: root=/dev/nfs\0" \@@ -65,7 +67,15 @@"tftp ${fdt_addr_r} ${soc}-colibri-${fdt_board}.dtb && " \ "run fdt_fixup && bootz ${kernel_addr_r} - ${fdt_addr_r}\0" \ -#define UBI_BOOTCMD \ +#define SD_BOOTCMD \ + "sdargs=root=/dev/mmcblk0p2 rw rootwait\0" \ + "sdboot=run setup; setenv bootargs ${defargs} ${sdargs} ${mtdparts} " \ +"${setupargs} ${vidargs}; echo Booting from MMC/SD card...; " \ +"load mmc 0:2 ${kernel_addr_r} /boot/${kernel_file} && " \ + "load mmc 0:2 ${fdt_addr_r} /boot/${soc}-colibri-${fdt_board}.dtb && " \
+ "runfdt_fixup&& bootz ${kernel_addr_r} - ${fdt_addr_r}\0"
\include/configs/colibri_vf.h +11
-1+ +#define UBI_BOOTCMD \ "ubiargs=ubi.mtd=ubi root=ubi0:rootfs rootfstype=ubifs " \ "ubi.fm_autoconvert=1\0" \ "ubiboot=run setup; " \@@ -76,36 +86,43 @@"ubi read ${fdt_addr_r} dtb && " \ "run fdt_fixup && bootz ${kernel_addr_r} - ${fdt_addr_r}\0" \ -#define CONFIG_BOOTCOMMAND "run ubiboot; run sdboot; run nfsboot" +#define CONFIG_BOOTCOMMAND "run ubiboot; run distro_bootcmd;" + +#define BOOT_TARGET_DEVICES (func) \ + func(MMC, mmc, 0) \ + func(USB, usb, 0) \ + func(DHCP, dhcp, na) +#include <config_distro_bootcmd.h> +#undef BOOTENV_RUN_NET_USB_START +#define BOOTENV_RUN_NET_USB_START ""#define DFU_ALT_NAND_INFO "vf-bcb part 0,1;u-boot part 0,2;ubipart 0,4"
#define
CONFIG_EXTRA_ENV_SETTINGS\include/configs/colibri_vf.h +11
-11-"kernel_addr_r=0x82000000\0" \ -"fdt_addr_r=0x84000000\0" \ -"kernel_file=zImage\0" \ -"fdt_file=${soc}-colibri-${fdt_board}.dtb\0" \ +BOOTENV \ + MEM_LAYOUT_ENV_SETTINGS \ +NFS_BOOTCMD \ + SD_BOOTCMD \ +UBI_BOOTCMD \ +"console=ttyLP0\0" \ +"defargs=\0" \ +"dfu_alt_info=" DFU_ALT_NAND_INFO "\0" \"fdt_board=eval-v3\0" \ +"fdt_file=${soc}-colibri-${fdt_board}.dtb\0" \"fdt_fixup=;\0" \ -"defargs=\0" \ -"console=ttyLP0\0" \ -"setup=setenv setupargs " \ -"console=tty1 console=${console}" \ -",${baudrate}n8 ${memargs}\0" \ +"kernel_file=zImage\0" \ +"mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \"setsdupdate=mmc rescan && set interface mmc && " \ -"fatload ${interface} 0:1 ${loadaddr} flash_blk.img && " \ -"source ${loadaddr}\0" \
Quoted 8 lines
include/configs/colibri_vf.h line 118
Quoted 7 lines
include/configs/colibri_vf.h +1
-3-"setusbupdate=usb start && set interface usb && " \ -"fatload ${interface} 0:1 ${loadaddr} flash_blk.img && " \ -"source ${loadaddr}\0" \ + "fatload ${interface} 0:1 ${loadaddr} flash_blk.img&& " \
include/configs/colibri_vf.h +2
-0+"source ${loadaddr}\0" \ +"setup=setenv setupargs console=tty1 console=${console}" \what is the point providing console configuration two times?
That fist one is the frame buffer console vs. the later serial console.
Quoted 21 lines
Quoted 21 lines
include/configs/colibri_vf.h +3
-3+",${baudrate}n8 ${memargs}\0" \"setupdate=run setsdupdate || run setusbupdate\0" \ -"mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \ -"dfu_alt_info=" DFU_ALT_NAND_INFO "\0" \ -"video-mode=dcufb:640x480-16 at 60,monitor=lcd\0" \ +"setusbupdate=usb start && set interface usb && " \ + "fatload ${interface} 0:1 ${loadaddr} flash_blk.img&& " \
include/configs/colibri_vf.h +2
-3+"source ${loadaddr}\0" \"splashpos=m,m\0" \ -SD_BOOTCMD \ -NFS_BOOTCMD \ -UBI_BOOTCMD +"video-mode=dcufb:640x480-16 at 60,monitor=lcd\0" /* Miscellaneous configurable options */#define CONFIG_SYS_CBSIZE 1024/* Console I/O Buffer Size */
--
2.20.1
Quoted 4 lines
Quoted 4 lines
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
https://lists.denx.de/listinfo/u-boot
Cheers
Marcel
PATCH v2 13/22 colibri_vf: add distroboot support
In reply to Marcel ZiswilerQuoted 13 lines
From: Stefan Agner <[email protected]>
Add support for distro boot. This is especially helpful for external devices. There is a global boot command which scans a predefined list of boot targets:
rundistro_bootcmd
As well as direct boot commands such as:
runbootcmd_mmc0
runbootcmd_usb
runbootcmd_dhcp
...
Refer to doc/README.distro fo details.
While at it also re-order boot command macros as well as theCONFIG_EXTRA_ENV_SETTINGS.
Quoted 4 lines
Signed-off-by Stefan Agner <[email protected]>Acked-by Max Krummenacher <[email protected]>Acked-by Marcel Ziswiler <[email protected]>Reviewed-by Igor Opaniuk <[email protected]>
Applied to u-boot-imx, -next, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================
PATCH v2 14/22 colibri_vf: set fdtfile for distroboot
In reply to Marcel ZiswilerFrom: Stefan Agner <[email protected]>
Set fdtfile to represent the current board. This allows distribution to load the correct device tree, which in the module case often deviates from the common fallback ${soc}-${board}${boardver}.dtb...
---
Changes in v2: None
include/configs/colibri_vf.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
include/configs/colibri_vf.h +2 -2
@@ -86,7 +86,8 @@"ubi read ${fdt_addr_r} dtb && " \ "run fdt_fixup && bootz ${kernel_addr_r} - ${fdt_addr_r}\0" \ -#define CONFIG_BOOTCOMMAND "run ubiboot; run distro_bootcmd;" +#define CONFIG_BOOTCOMMAND "run ubiboot; " \ + "setenv fdtfile ${soc}-colibri-${fdt_board}.dtb && run distro_bootcmd;"#define BOOT_TARGET_DEVICES (func) \ func(MMC, mmc, 0) \
@@ -108,7 +109,6 @@"defargs=\0" \"dfu_alt_info=" DFU_ALT_NAND_INFO "\0" \"fdt_board=eval-v3\0" \ -"fdt_file=${soc}-colibri-${fdt_board}.dtb\0" \"fdt_fixup=;\0" \"kernel_file=zImage\0" \"mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \
Signature · 1 line
2.20.1
PATCH v2 14/22 colibri_vf: set fdtfile for distroboot
Quoted 47 lines · Marcel Ziswiler
From: Stefan Agner <[email protected]>
Set fdtfile to represent the current board. This allows distribution to load the correct device tree, which in the module case often deviates from the common fallback ${soc}-${board}${boardver}.dtb...
Signed-off-by Stefan Agner <[email protected]>Acked-by Max Krummenacher <[email protected]>Acked-by Marcel Ziswiler <[email protected]>---
Changes in v2: None
include/configs/colibri_vf.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)include/configs/colibri_vf.h +2
-3@@ -86,7 +86,8 @@"ubi read ${fdt_addr_r} dtb && " \ "run fdt_fixup && bootz ${kernel_addr_r} - ${fdt_addr_r}\0" \ -#define CONFIG_BOOTCOMMAND "run ubiboot; run distro_bootcmd;" +#define CONFIG_BOOTCOMMAND "run ubiboot; " \ + "setenv fdtfile ${soc}-colibri-${fdt_board}.dtb && run distro_bootcmd;"#define BOOT_TARGET_DEVICES (func) \ func(MMC, mmc, 0) \@@ -108,7 +109,6 @@"defargs=\0" \"dfu_alt_info=" DFU_ALT_NAND_INFO "\0" \"fdt_board=eval-v3\0" \ -"fdt_file=${soc}-colibri-${fdt_board}.dtb\0" \"fdt_fixup=;\0" \"kernel_file=zImage\0" \"mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \ --2.20.1
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
https://lists.denx.de/listinfo/u-boot
PATCH v2 14/22 colibri_vf: set fdtfile for distroboot
In reply to Marcel ZiswilerQuoted 8 lines
From: Stefan Agner <[email protected]>
Set fdtfile to represent the current board. This allows distribution to load the correct device tree, which in the module case often deviates from the common fallback ${soc}-${board}${boardver}.dtb...Signed-off-by Stefan Agner <[email protected]>Acked-by Max Krummenacher <[email protected]>Acked-by Marcel Ziswiler <[email protected]>Reviewed-by Igor Opaniuk <[email protected]>
Applied to u-boot-imx, -next, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================
PATCH v2 15/22 colibri_vf: sync the board info message
In reply to Marcel ZiswilerFrom: Bhuvanchandra DV <[email protected]>
Use similar info message as on other modules.
---
Changes in v2: None
board/toradex/colibri_vf/colibri_vf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
board/toradex/colibri_vf/colibri_vf.c +2 -2
@@ -407,9 +407,9 @@ int board_init(void)int checkboard (void ) {if (is_colibri_vf61 ()) -puts ("Board: Colibri VF61\n" ); +puts ("Model: Toradex Colibri VF61\n" );else -puts ("Board: Colibri VF50\n" ); +puts ("Model: Toradex Colibri VF50\n" );return 0 ; }
Signature · 1 line
2.20.1
PATCH v2 15/22 colibri_vf: sync the board info message
Quoted 5 lines
From: Bhuvanchandra DV <[email protected]> Use similar info message as on other modules.
Signed-off-by Bhuvanchandra DV <[email protected]>Acked-by Marcel Ziswiler <[email protected]>Reviewed-by Igor Opaniuk <[email protected]>
Applied to u-boot-imx, -next, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================
PATCH v2 16/22 colibri_vf: enable user debug by default
In reply to Marcel ZiswilerFrom: Stefan Agner <[email protected]>
Let the kernel print some debug messages when a user program crashes due to an exception.
---
Changes in v2: None
include/configs/colibri_vf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/configs/colibri_vf.h +1 -1
@@ -106,7 +106,7 @@SD_BOOTCMD \ UBI_BOOTCMD \"console=ttyLP0\0" \ -"defargs=\0" \ +"defargs=user_debug=31\0" \"dfu_alt_info=" DFU_ALT_NAND_INFO "\0" \"fdt_board=eval-v3\0" \"fdt_fixup=;\0" \
Signature · 1 line
2.20.1
PATCH v2 16/22 colibri_vf: enable user debug by default
Quoted 6 lines
From: Stefan Agner <[email protected]>
Let the kernel print some debug messages when a user program crashes due to an exception.Signed-off-by Stefan Agner <[email protected]>Acked-by Marcel Ziswiler <[email protected]>Reviewed-by Igor Opaniuk <[email protected]>
Applied to u-boot-imx, -next, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================
PATCH v2 17/22 colibri_vf: disable undefined instruction events in user debug
In reply to Marcel ZiswilerFrom: Stefan Agner <[email protected]>
It turns out that OpenSSL calls undefined instructions to detect ARM capabilities at runtime (via SIGILL handler). This leads to stack traces e.g. when logging in using SSH:
[ 877.464442] sshd (613): undefined instruction: pc=76ee2da8 ...
Disable undefined instruction events since it is used as an autodetecion mechanism.
---
Changes in v2: None
include/configs/colibri_vf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/configs/colibri_vf.h +1 -1
@@ -106,7 +106,7 @@SD_BOOTCMD \ UBI_BOOTCMD \"console=ttyLP0\0" \ -"defargs=user_debug=31\0" \ +"defargs=user_debug=30\0" \"dfu_alt_info=" DFU_ALT_NAND_INFO "\0" \"fdt_board=eval-v3\0" \"fdt_fixup=;\0" \
Signature · 1 line
2.20.1
PATCH v2 17/22 colibri_vf: disable undefined instruction events in user debug
Quoted 11 lines
From: Stefan Agner <[email protected]>
It turns out that OpenSSL calls undefined instructions to detect ARM capabilities at runtime (via SIGILL handler). This leads to stack traces e.g. when logging in using SSH:[ 877.464442] sshd (613): undefined instruction: pc=76ee2da8 ...Disable undefined instruction events since it is used as an autodetecion mechanism.
Signed-off-by Stefan Agner <[email protected]>Acked-by Marcel Ziswiler <[email protected]>Reviewed-by Igor Opaniuk <[email protected]>
Applied to u-boot-imx, -next, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================
PATCH v2 18/22 config: colibri_vf: enable mtd partitions via dt
In reply to Marcel ZiswilerFrom: Stefan Agner <[email protected]>
Use device tree to set MTD partitions of the NAND chip.
---
Changes in v2: None
configs/colibri_vf_defconfig | 1 + 1 file changed, 1 insertion(+)
configs/colibri_vf_defconfig +1 -0
@@ -91,4 +91,5 @@ CONFIG_VIDEO_FSL_DCU_FB=y CONFIG_VIDEO=y CONFIG_SYS_CONSOLE_FG_COL=0x00 CONFIG_OF_LIBFDT_OVERLAY=y +CONFIG_FDT_FIXUP_PARTITIONS=y # CONFIG_EFI_UNICODE_CAPITALIZATION is not set
Signature · 1 line
2.20.1
PATCH v2 18/22 config: colibri_vf: enable mtd partitions via dt
Quoted 5 lines
From: Stefan Agner <[email protected]> Use device tree to set MTD partitions of the NAND chip.
Signed-off-by Stefan Agner <[email protected]>Acked-by Marcel Ziswiler <[email protected]>Reviewed-by Igor Opaniuk <[email protected]>
Applied to u-boot-imx, -next, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================
PATCH v2 19/22 arm: vf610: add uart2 clock/pinmux support
In reply to Marcel ZiswilerFrom: Stefan Agner <[email protected]>
Add support for Vybrid's UART2 (Colibri UART_B).
---
Changes in v2: None
arch/arm/include/asm/arch-vf610/crm_regs.h | 1 + arch/arm/include/asm/arch-vf610/iomux-vf610.h | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-)
arch/arm/include/asm/arch-vf610/crm_regs.h +1 -0
@@ -200,6 +200,7 @@ struct anadig_reg {#define CCM_REG_CTRL_MASK 0xffffffff#define CCM_CCGR0_UART0_CTRL_MASK (0x3 << 14)#define CCM_CCGR0_UART1_CTRL_MASK (0x3 << 16) +#define CCM_CCGR0_UART2_CTRL_MASK (0x3 << 18)#define CCM_CCGR0_DSPI0_CTRL_MASK (0x3 << 24)#define CCM_CCGR0_DSPI1_CTRL_MASK (0x3 << 26)#define CCM_CCGR1_USBC0_CTRL_MASK (0x3 << 8)
arch/arm/include/asm/arch-vf610/iomux-vf610.h +5 -1
@@ -132,10 +132,14 @@ enum {VF610_PAD_PTD24__GPIO_70 =IOMUX_PAD (0x0118 ,0x0118 ,0 , __NA_,0 ,VF610_GPIO_PAD_CTRL ),VF610_PAD_PTD23__NF_IO7 =IOMUX_PAD (0x011c ,0x011c ,2 , __NA_,0 ,VF610_NFC_IO_PAD_CTRL ),VF610_PAD_PTD0__QSPI0_A_QSCK =IOMUX_PAD (0x013c ,0x013c ,1 , __NA_,0 ,VF610_QSPI_PAD_CTRL ), +VF610_PAD_PTD0__UART2_TX =IOMUX_PAD (0x013c ,0x013c ,2 ,0x38c ,2 ,VF610_UART_PAD_CTRL ),VF610_PAD_PTD1__QSPI0_A_CS0 =IOMUX_PAD (0x0140 ,0x0140 ,1 , __NA_,0 ,VF610_QSPI_PAD_CTRL ), +VF610_PAD_PTD1__UART2_RX =IOMUX_PAD (0x0140 ,0x0140 ,2 ,0x388 ,2 ,VF610_UART_PAD_CTRL ),VF610_PAD_PTD2__QSPI0_A_DATA3 =IOMUX_PAD (0x0144 ,0x0144 ,1 , __NA_,0 ,VF610_QSPI_PAD_CTRL ), +VF610_PAD_PTD2__GPIO_81 =IOMUX_PAD (0x0144 ,0x0144 ,0 , __NA_,0 ,VF610_GPIO_PAD_CTRL ),VF610_PAD_PTD3__QSPI0_A_DATA2 =IOMUX_PAD (0x0148 ,0x0148 ,1 , __NA_,0 ,VF610_QSPI_PAD_CTRL ), -VF610_PAD_PTD4__GPIO_83 =IOMUX_PAD (0x014C ,0x014C ,0 , __NA_,0 ,VF610_GPIO_PAD_CTRL ), +VF610_PAD_PTD3__GPIO_82 =IOMUX_PAD (0x0148 ,0x0148 ,0 , __NA_,0 ,VF610_GPIO_PAD_CTRL ), +VF610_PAD_PTD4__GPIO_83 =IOMUX_PAD (0x014C ,0x014C ,0 , __NA_,0 ,VF610_GPIO_PAD_CTRL ),VF610_PAD_PTD4__QSPI0_A_DATA1 =IOMUX_PAD (0x014c ,0x014c ,1 , __NA_,0 ,VF610_QSPI_PAD_CTRL ),VF610_PAD_PTD5__QSPI0_A_DATA0 =IOMUX_PAD (0x0150 ,0x0150 ,1 , __NA_,0 ,VF610_QSPI_PAD_CTRL ), VF610_PAD_PTD7__QSPI0_B_QSCK = IOMUX_PAD(0x0158, 0x0158, 1, __NA_, 0, VF610_QSPI_PAD_CTRL),
Signature · 1 line
2.20.1
PATCH v2 19/22 arm: vf610: add uart2 clock/pinmux support
Quoted 4 lines
From: Stefan Agner <[email protected]> Add support for Vybrid's UART2 (Colibri
UART_B).Signed-off-by Stefan Agner <[email protected]>Acked-by Marcel Ziswiler <[email protected]>
Applied to u-boot-imx, -next, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================
PATCH v2 20/22 colibri_vf: adjust timing according to data sheet
In reply to Marcel ZiswilerFrom: Stefan Agner <[email protected]>
Using the DDR Validation tool in Processor Expert uncovered two timing inconsistencies. Since those timings are related to the suspend mode they do not affect or change regular memory behaviour.
---
Changes in v2: None
board/toradex/colibri_vf/colibri_vf.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-)
board/toradex/colibri_vf/colibri_vf.c +9 -3
@@ -101,15 +101,21 @@ int dram_init(void) .tras_lockout = 0, .tdal = 12, .bstlen = 3, - .tdll = 512, + .tdll = 512, /* not applicable since freq. scaling +* is not used +*/ .trp_ab = 6, .tref = 3120, .trfc = 64, .tref_int = 0, .tpdex = 3, .txpdll = 10, - .txsnr = 48, - .txsr = 468, + .txsnr = 68, /* changed to conform to JEDEC +* specifications +*/ + .txsr = 506, /* changed to conform to JEDEC +* specifications +*/ .cksrx = 5, .cksre = 5, .freq_chg_en = 0,
Signature · 1 line
2.20.1
PATCH v2 20/22 colibri_vf: adjust timing according to data sheet
Quoted 53 lines · Marcel Ziswiler
From: Stefan Agner <[email protected]>
Using the DDR Validation tool in Processor Expert uncovered two timing inconsistencies. Since those timings are related to the suspend mode they do not affect or change regular memory behaviour.
Signed-off-by Stefan Agner <[email protected]>Acked-by Marcel Ziswiler <[email protected]>---
Changes in v2: None
board/toradex/colibri_vf/colibri_vf.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-)board/toradex/colibri_vf/colibri_vf.c +9
-4@@ -101,15 +101,21 @@ int dram_init(void) .tras_lockout = 0, .tdal = 12, .bstlen = 3, - .tdll = 512, + .tdll = 512, /* not applicable since freq. scaling +* is not used +*/ .trp_ab = 6, .tref = 3120, .trfc = 64, .tref_int = 0, .tpdex = 3, .txpdll = 10, - .txsnr = 48, - .txsr = 468, + .txsnr = 68, /* changed to conform to JEDEC +* specifications +*/ + .txsr = 506, /* changed to conform to JEDEC +* specifications +*/ .cksrx = 5, .cksre = 5, .freq_chg_en = 0, --2.20.1
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
https://lists.denx.de/listinfo/u-boot
PATCH v2 20/22 colibri_vf: adjust timing according to data sheet
In reply to Marcel ZiswilerQuoted 7 lines
From: Stefan Agner <[email protected]>
Using the DDR Validation tool in Processor Expert uncovered two timing inconsistencies. Since those timings are related to the suspend mode they do not affect or change regular memory behaviour.Signed-off-by Stefan Agner <[email protected]>Acked-by Marcel Ziswiler <[email protected]>Reviewed-by Igor Opaniuk <[email protected]>
Applied to u-boot-imx, -next, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================
PATCH v2 21/22 colibri_vf: use leveling evaluated by DDR validation tools
In reply to Marcel ZiswilerFrom: Stefan Agner <[email protected]>
The DDR validation tool (which is part of Processor Expert) allows to evaluate leveling parameters for CR105/CR106/CR110. Several runs have been made with Colibri VF50 and VF61 and it seems to evaluate very similar values. Use this values by default.
Note: The newly evaluated parameters seem to require CTLUPD_AREF to be enabled!
Note 2: The tool also evaluated 6 as a new value for PHY02/18 GATE_CFG (Coarse adjust of gate open time). However, this seems not to work in practise.
---
Changes in v2: None
board/toradex/colibri_vf/colibri_vf.c | 7 +++++++ 1 file changed, 7 insertions(+)
board/toradex/colibri_vf/colibri_vf.c +7 -0
@@ -29,6 +29,13 @@ DECLARE_GLOBAL_DATA_PTR;#define PTC0_GPIO_45 45static struct ddrmc_cr_setting colibri_vf_cr_settings[] = { + {DDRMC_CR79_CTLUPD_AREF (1 ),79 }, +/* sets manual values for read lvl. (gate) delay of data slice 0/1 */ + {DDRMC_CR105_RDLVL_DL_0 (28 ),105 }, + {DDRMC_CR106_RDLVL_GTDL_0 (24 ),106 }, + {DDRMC_CR110_RDLVL_DL_1 (28 ) |DDRMC_CR110_RDLVL_GTDL_1 (24 ),110 }, + {DDRMC_CR102_RDLVL_GT_REGEN |DDRMC_CR102_RDLVL_REG_EN ,102 }, +/* AXI */ {DDRMC_CR117_AXI0_W_PRI (0 ) |DDRMC_CR117_AXI0_R_PRI (0 ),117 }, {DDRMC_CR118_AXI1_W_PRI (1 ) |DDRMC_CR118_AXI1_R_PRI (1 ),118 },
Signature · 1 line
2.20.1
PATCH v2 21/22 colibri_vf: use leveling evaluated by DDR validation tools
Quoted 10 lines
From: Stefan Agner <[email protected]>
The DDR validation tool (which is part of Processor Expert) allows to evaluate leveling parameters for CR105/CR106/CR110. Several runs have been made with Colibri VF50 and VF61 and it seems to evaluate very similar values. Use this values by default.
Note: The newly evaluated parameters seem to requireCTLUPD_AREFto be enabled!
Note 2: The tool also evaluated 6 as a new value for PHY02/18GATE_CFG(Coarse adjust of gate open time). However, this seems not to work in practise.
Quoted 2 lines
Signed-off-by Stefan Agner <[email protected]>Acked-by Marcel Ziswiler <[email protected]>
Applied to u-boot-imx, -next, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================
PATCH v2 22/22 colibri_vf: fix sdboot for vybrid modules
In reply to Marcel ZiswilerFrom: Gerard Salvatella <[email protected]>
Currently, Vybrid's sdboot variable tries to load the kernel from /boot of the root partition (typically second partition when using the sdcard image). However, since we moved to flash the kernel in a separate UBI volume, we no longer deploy the kernel/device tree to /boot, hence sdboot does not work in its current state.
Load the kernel and device tree from the first (typically FAT) partition as customary on all Toradex modules.
While at it also change from rw to ro as e.g. systemd will re-mount the root file system rw anyway after checking it.
---
Changes in v2:
- Added various reviewed-bys.
include/configs/colibri_vf.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
include/configs/colibri_vf.h +3 -3
@@ -68,11 +68,11 @@ "run fdt_fixup && bootz ${kernel_addr_r} - ${fdt_addr_r}\0" \#define SD_BOOTCMD \ - "sdargs=root=/dev/mmcblk0p2 rw rootwait\0" \ + "sdargs=root=/dev/mmcblk0p2 ro rootwait\0" \ "sdboot=run setup; setenv bootargs ${defargs} ${sdargs} ${mtdparts} " \ "${setupargs} ${vidargs}; echo Booting from MMC/SD card...; " \ - "load mmc 0:2 ${kernel_addr_r} /boot/${kernel_file} && " \ - "load mmc 0:2 ${fdt_addr_r} /boot/${soc}-colibri-${fdt_board}.dtb && " \ + "load mmc 0:1 ${kernel_addr_r} ${kernel_file} && " \ + "load mmc 0:1 ${fdt_addr_r} ${soc}-colibri-${fdt_board}.dtb && " \ "run fdt_fixup && bootz ${kernel_addr_r} - ${fdt_addr_r}\0" \#define UBI_BOOTCMD \
Signature · 1 line
2.20.1
PATCH v2 22/22 colibri_vf: fix sdboot for vybrid modules
Quoted 10 lines
From: Gerard Salvatella <[email protected]> Currently, Vybrid's sdboot variable tries to load the kernel from /boot of the root partition (typically second partition when using the sdcard image). However, since we moved to flash the kernel in a separate UBI volume, we no longer deploy the kernel/device tree to /boot, hence sdboot does not work in its current state.
Load the kernel and device tree from the first (typically FAT) partition as customary on all Toradex modules.
While at it also change from rw to ro as e.g. systemd will re-mount the root file system rw anyway after checking it.
Quoted 4 lines
Signed-off-by Gerard Salvatella <[email protected]>Acked-by Stefan Agner <[email protected]>Acked-by Marcel Ziswiler <[email protected]>Reviewed-by Igor Opaniuk <[email protected]>
Applied to u-boot-imx, -next, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================