All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] imx: Select the pinctrl drivers when DM is used
@ 2019-05-24 12:50 Fabio Estevam
  2019-05-24 13:02 ` Lukasz Majewski
  2019-06-04 20:08 ` Sjoerd Simons
  0 siblings, 2 replies; 4+ messages in thread
From: Fabio Estevam @ 2019-05-24 12:50 UTC (permalink / raw)
  To: u-boot

When using device model it is required to select the pinctrl
drivers so that the pins can be properly configured via
devicetree.

mx6sabreauto board is an example of a target that uses DM and does
not select the pinctrl drivers.

Instead of doing the pinctrl driver selection in each individual
defconfig file, select it at SoC level when DM is used. 

Signed-off-by: Fabio Estevam <festevam@gmail.com>
---
 arch/arm/Kconfig | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index efb9aab390..4c361c9a1d 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -787,6 +787,8 @@ config ARCH_MX31
 config ARCH_MX7ULP
 	bool "NXP MX7ULP"
 	select CPU_V7A
+	select PINCTRL if DM
+	select PINCTRL_IMX7ULP if DM
 	select ROM_UNIFIED_SECTIONS
 	imply MXC_GPIO
 
@@ -795,6 +797,8 @@ config ARCH_MX7
 	select ARCH_MISC_INIT
 	select BOARD_EARLY_INIT_F
 	select CPU_V7A
+	select PINCTRL if DM
+	select PINCTRL_IMX7 if DM
 	select SYS_FSL_HAS_SEC if SECURE_BOOT
 	select SYS_FSL_SEC_COMPAT_4
 	select SYS_FSL_SEC_LE
@@ -803,6 +807,8 @@ config ARCH_MX7
 config ARCH_MX6
 	bool "Freescale MX6"
 	select CPU_V7A
+	select PINCTRL if DM
+	select PINCTRL_IMX6 if DM
 	select SYS_FSL_HAS_SEC if SECURE_BOOT
 	select SYS_FSL_SEC_COMPAT_4
 	select SYS_FSL_SEC_LE
@@ -818,6 +824,8 @@ config ARCH_MX5
 	bool "Freescale MX5"
 	select BOARD_EARLY_INIT_F
 	select CPU_V7A
+	select PINCTRL if DM
+	select PINCTRL_IMX5 if DM
 	imply MXC_GPIO
 
 config ARCH_OWL
-- 
2.17.1

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

* [U-Boot] [PATCH] imx: Select the pinctrl drivers when DM is used
  2019-05-24 12:50 [U-Boot] [PATCH] imx: Select the pinctrl drivers when DM is used Fabio Estevam
@ 2019-05-24 13:02 ` Lukasz Majewski
  2019-06-05 13:48   ` Lukasz Majewski
  2019-06-04 20:08 ` Sjoerd Simons
  1 sibling, 1 reply; 4+ messages in thread
From: Lukasz Majewski @ 2019-05-24 13:02 UTC (permalink / raw)
  To: u-boot

On Fri, 24 May 2019 09:50:53 -0300
Fabio Estevam <festevam@gmail.com> wrote:

> When using device model it is required to select the pinctrl
> drivers so that the pins can be properly configured via
> devicetree.
> 
> mx6sabreauto board is an example of a target that uses DM and does
> not select the pinctrl drivers.
> 
> Instead of doing the pinctrl driver selection in each individual
> defconfig file, select it at SoC level when DM is used. 
> 
> Signed-off-by: Fabio Estevam <festevam@gmail.com>
> ---
>  arch/arm/Kconfig | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> index efb9aab390..4c361c9a1d 100644
> --- a/arch/arm/Kconfig
> +++ b/arch/arm/Kconfig
> @@ -787,6 +787,8 @@ config ARCH_MX31
>  config ARCH_MX7ULP
>  	bool "NXP MX7ULP"
>  	select CPU_V7A
> +	select PINCTRL if DM
> +	select PINCTRL_IMX7ULP if DM
>  	select ROM_UNIFIED_SECTIONS
>  	imply MXC_GPIO
>  
> @@ -795,6 +797,8 @@ config ARCH_MX7
>  	select ARCH_MISC_INIT
>  	select BOARD_EARLY_INIT_F
>  	select CPU_V7A
> +	select PINCTRL if DM
> +	select PINCTRL_IMX7 if DM
>  	select SYS_FSL_HAS_SEC if SECURE_BOOT
>  	select SYS_FSL_SEC_COMPAT_4
>  	select SYS_FSL_SEC_LE
> @@ -803,6 +807,8 @@ config ARCH_MX7
>  config ARCH_MX6
>  	bool "Freescale MX6"
>  	select CPU_V7A
> +	select PINCTRL if DM
> +	select PINCTRL_IMX6 if DM
>  	select SYS_FSL_HAS_SEC if SECURE_BOOT
>  	select SYS_FSL_SEC_COMPAT_4
>  	select SYS_FSL_SEC_LE
> @@ -818,6 +824,8 @@ config ARCH_MX5
>  	bool "Freescale MX5"
>  	select BOARD_EARLY_INIT_F
>  	select CPU_V7A
> +	select PINCTRL if DM
> +	select PINCTRL_IMX5 if DM
>  	imply MXC_GPIO
>  
>  config ARCH_OWL

Reviewed-by: Lukasz Majewski <lukma@denx.de>


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/20190524/ec8328ab/attachment.sig>

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

* [U-Boot] [PATCH] imx: Select the pinctrl drivers when DM is used
  2019-05-24 12:50 [U-Boot] [PATCH] imx: Select the pinctrl drivers when DM is used Fabio Estevam
  2019-05-24 13:02 ` Lukasz Majewski
@ 2019-06-04 20:08 ` Sjoerd Simons
  1 sibling, 0 replies; 4+ messages in thread
From: Sjoerd Simons @ 2019-06-04 20:08 UTC (permalink / raw)
  To: u-boot

On Fri, 2019-05-24 at 09:50 -0300, Fabio Estevam wrote:
> When using device model it is required to select the pinctrl
> drivers so that the pins can be properly configured via
> devicetree.
> 
> mx6sabreauto board is an example of a target that uses DM and does
> not select the pinctrl drivers.
> 
> Instead of doing the pinctrl driver selection in each individual
> defconfig file, select it at SoC level when DM is used. 
> 
> Signed-off-by: Fabio Estevam <festevam@gmail.com>


Reviewed-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
> ---
>  arch/arm/Kconfig | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> index efb9aab390..4c361c9a1d 100644
> --- a/arch/arm/Kconfig
> +++ b/arch/arm/Kconfig
> @@ -787,6 +787,8 @@ config ARCH_MX31
>  config ARCH_MX7ULP
>  	bool "NXP MX7ULP"
>  	select CPU_V7A
> +	select PINCTRL if DM
> +	select PINCTRL_IMX7ULP if DM
>  	select ROM_UNIFIED_SECTIONS
>  	imply MXC_GPIO
>  
> @@ -795,6 +797,8 @@ config ARCH_MX7
>  	select ARCH_MISC_INIT
>  	select BOARD_EARLY_INIT_F
>  	select CPU_V7A
> +	select PINCTRL if DM
> +	select PINCTRL_IMX7 if DM
>  	select SYS_FSL_HAS_SEC if SECURE_BOOT
>  	select SYS_FSL_SEC_COMPAT_4
>  	select SYS_FSL_SEC_LE
> @@ -803,6 +807,8 @@ config ARCH_MX7
>  config ARCH_MX6
>  	bool "Freescale MX6"
>  	select CPU_V7A
> +	select PINCTRL if DM
> +	select PINCTRL_IMX6 if DM
>  	select SYS_FSL_HAS_SEC if SECURE_BOOT
>  	select SYS_FSL_SEC_COMPAT_4
>  	select SYS_FSL_SEC_LE
> @@ -818,6 +824,8 @@ config ARCH_MX5
>  	bool "Freescale MX5"
>  	select BOARD_EARLY_INIT_F
>  	select CPU_V7A
> +	select PINCTRL if DM
> +	select PINCTRL_IMX5 if DM
>  	imply MXC_GPIO
>  
>  config ARCH_OWL

-- 
Sjoerd Simons
Collabora Ltd.

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

* [U-Boot] [PATCH] imx: Select the pinctrl drivers when DM is used
  2019-05-24 13:02 ` Lukasz Majewski
@ 2019-06-05 13:48   ` Lukasz Majewski
  0 siblings, 0 replies; 4+ messages in thread
From: Lukasz Majewski @ 2019-06-05 13:48 UTC (permalink / raw)
  To: u-boot

Hi Fabio,

> On Fri, 24 May 2019 09:50:53 -0300
> Fabio Estevam <festevam@gmail.com> wrote:
> 
> > When using device model it is required to select the pinctrl
> > drivers so that the pins can be properly configured via
> > devicetree.
> > 
> > mx6sabreauto board is an example of a target that uses DM and does
> > not select the pinctrl drivers.
> > 
> > Instead of doing the pinctrl driver selection in each individual
> > defconfig file, select it at SoC level when DM is used. 
> > 
> > Signed-off-by: Fabio Estevam <festevam@gmail.com>
> > ---
> >  arch/arm/Kconfig | 8 ++++++++
> >  1 file changed, 8 insertions(+)
> > 
> > diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> > index efb9aab390..4c361c9a1d 100644
> > --- a/arch/arm/Kconfig
> > +++ b/arch/arm/Kconfig
> > @@ -787,6 +787,8 @@ config ARCH_MX31
> >  config ARCH_MX7ULP
> >  	bool "NXP MX7ULP"
> >  	select CPU_V7A
> > +	select PINCTRL if DM
> > +	select PINCTRL_IMX7ULP if DM
> >  	select ROM_UNIFIED_SECTIONS
> >  	imply MXC_GPIO
> >  
> > @@ -795,6 +797,8 @@ config ARCH_MX7
> >  	select ARCH_MISC_INIT
> >  	select BOARD_EARLY_INIT_F
> >  	select CPU_V7A
> > +	select PINCTRL if DM
> > +	select PINCTRL_IMX7 if DM
> >  	select SYS_FSL_HAS_SEC if SECURE_BOOT
> >  	select SYS_FSL_SEC_COMPAT_4
> >  	select SYS_FSL_SEC_LE
> > @@ -803,6 +807,8 @@ config ARCH_MX7
> >  config ARCH_MX6
> >  	bool "Freescale MX6"
> >  	select CPU_V7A
> > +	select PINCTRL if DM
> > +	select PINCTRL_IMX6 if DM
> >  	select SYS_FSL_HAS_SEC if SECURE_BOOT
> >  	select SYS_FSL_SEC_COMPAT_4
> >  	select SYS_FSL_SEC_LE
> > @@ -818,6 +824,8 @@ config ARCH_MX5
> >  	bool "Freescale MX5"
> >  	select BOARD_EARLY_INIT_F
> >  	select CPU_V7A
> > +	select PINCTRL if DM
> > +	select PINCTRL_IMX5 if DM
> >  	imply MXC_GPIO
> >  
> >  config ARCH_OWL  
> 
> Reviewed-by: Lukasz Majewski <lukma@denx.de>
> 

Unfortunately, after some testing it turned out that this patch causes
build break for "display5_factory_defconfig"

The build break is as follows:


WARNING: unmet direct dependencies detected for PINCTRL_IMX6
  Depends on [n]: ARCH_MX6 [=y] && PINCTRL_FULL [=n]
  Selected by [y]:
  - ARCH_MX6 [=y] && <choice> && DM [=y]

WARNING: unmet direct dependencies detected for PINCTRL_IMX6
  Depends on [n]: ARCH_MX6 [=y] && PINCTRL_FULL [=n]
  Selected by [y]:
  - ARCH_MX6 [=y] && <choice> && DM [=y]
../drivers/pinctrl/nxp/pinctrl-imx6.c:32:32:
warning: ?imx6_pinctrl_match? defined but not used
[-Wunused-const-variable=] static const struct udevice_id
imx6_pinctrl_match[] = { ^~~~~~~~~~~~~~~~~~ drivers/built-in.o: In
function `imx6_pinctrl_probe':
build/../drivers/pinctrl/nxp/pinctrl-imx6.c:29: undefined reference to
`imx_pinctrl_probe'
drivers/built-in.o:(.u_boot_list_2_driver_2_imx6_pinctrl+0x14):
undefined reference to `imx_pinctrl_remove'
drivers/built-in.o:(.u_boot_list_2_driver_2_imx6_pinctrl+0x3c):
undefined reference to `imx_pinctrl_ops' arm-linux-gnueabihf-ld.bfd:
BFD (Linaro_Binutils-2017.05) 2.27.0.20161019 assertion
fail /home/tcwg-buildslave/workspace/tcwg-make-release/builder_arch/amd64/label/tcwg-x86_64-build/target/arm-linux-gnueabihf/snapshots/binutils-gdb.git~linaro-local~linaro_binutils-2_27-branch/bfd/elf32-arm.c:8784



> 
> 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




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/20190605/31794b5e/attachment.sig>

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

end of thread, other threads:[~2019-06-05 13:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-24 12:50 [U-Boot] [PATCH] imx: Select the pinctrl drivers when DM is used Fabio Estevam
2019-05-24 13:02 ` Lukasz Majewski
2019-06-05 13:48   ` Lukasz Majewski
2019-06-04 20:08 ` Sjoerd Simons

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.