[U-Boot] [PATCH] mx6q: mx6qsabrelite: add GPIO_0__CCM_CLKO and GPIO_3__CCM_CLKO2 pin mux

A recent Linux kernel (>= 3.5) has support for the SGTL 5000 sound on the SabreLite board. To make this work, U-Boot has to configure the pin mux for PAD_GPIO_0__CCM_CLKO and PAD_GPIO_3__CCM_CLKO2 correctly.
Taken from Freescale's ER5 U-Boot for the SabreLite.
Signed-off-by: Dirk Behme dirk.behme@de.bosch.com CC: Troy Kisky troy.kisky@boundarydevices.com CC: Stefano Babic sbabic@denx.de --- board/freescale/mx6qsabrelite/imximage.cfg | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/board/freescale/mx6qsabrelite/imximage.cfg b/board/freescale/mx6qsabrelite/imximage.cfg index 62498ab..2d7825a 100644 --- a/board/freescale/mx6qsabrelite/imximage.cfg +++ b/board/freescale/mx6qsabrelite/imximage.cfg @@ -168,3 +168,6 @@ DATA 4 0x020e0010 0xF00000CF # set IPU AXI-id0 Qos=0xf(bypass) AXI-id1 Qos=0x7 DATA 4 0x020e0018 0x007F007F DATA 4 0x020e001c 0x007F007F +# set PAD_GPIO_0__CCM_CLKO and PAD_GPIO_3__CCM_CLKO2 +DATA 4 0x020e0220 0x00000000 +DATA 4 0x020e022c 0x00000004 \ No newline at end of file

-----Original Message----- From: u-boot-bounces@lists.denx.de [mailto:u-boot-bounces@lists.denx.de] On Behalf Of Dirk Behme Sent: Wednesday, August 01, 2012 7:06 PM To: u-boot@lists.denx.de Cc: Dirk Behme Subject: [U-Boot] [PATCH] mx6q: mx6qsabrelite: add GPIO_0__CCM_CLKO and GPIO_3__CCM_CLKO2 pin mux
A recent Linux kernel (>= 3.5) has support for the SGTL 5000 sound on the SabreLite board. To make this work, U-Boot has to configure the pin mux for PAD_GPIO_0__CCM_CLKO and PAD_GPIO_3__CCM_CLKO2 correctly.
Why this can't be set in the kernel but relies on u-boot to configure it?
Jason
Taken from Freescale's ER5 U-Boot for the SabreLite.
Signed-off-by: Dirk Behme dirk.behme@de.bosch.com CC: Troy Kisky troy.kisky@boundarydevices.com CC: Stefano Babic sbabic@denx.de
board/freescale/mx6qsabrelite/imximage.cfg | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
1.7.0.4
U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot

On 01.08.2012 13:26, Liu Hui-R64343 wrote:
-----Original Message----- From: u-boot-bounces@lists.denx.de [mailto:u-boot-bounces@lists.denx.de] On Behalf Of Dirk Behme Sent: Wednesday, August 01, 2012 7:06 PM To: u-boot@lists.denx.de Cc: Dirk Behme Subject: [U-Boot] [PATCH] mx6q: mx6qsabrelite: add GPIO_0__CCM_CLKO and GPIO_3__CCM_CLKO2 pin mux
A recent Linux kernel (>= 3.5) has support for the SGTL 5000 sound on the SabreLite board. To make this work, U-Boot has to configure the pin mux for PAD_GPIO_0__CCM_CLKO and PAD_GPIO_3__CCM_CLKO2 correctly.
Why this can't be set in the kernel but relies on u-boot to configure it?
I don't know :(
It took me days to find this U-Boot dependency, thanks to Troy helping with this!
I enabled SGTL5000 sound in the kernel and it didn't work. Until I found that it works with the ER5 Freescale U-Boot, but not with the recent mainline one.
It seems to me that the SGTL5000 kernel feature for the SabreLite was developed with a Freescale U-Boot (patching the kernel with DT append) and not tested with the mainline U-Boot.
Best regards
Dirk
Jason
Taken from Freescale's ER5 U-Boot for the SabreLite.
Signed-off-by: Dirk Behme dirk.behme@de.bosch.com CC: Troy Kisky troy.kisky@boundarydevices.com CC: Stefano Babic sbabic@denx.de
board/freescale/mx6qsabrelite/imximage.cfg | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
1.7.0.4
U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot

Dear Dirk Behme,
In message 5019180C.4060109@de.bosch.com you wrote:
It seems to me that the SGTL5000 kernel feature for the SabreLite was developed with a Freescale U-Boot (patching the kernel with DT append) and not tested with the mainline U-Boot.
Probably. But the question is still why this should be changed in U-Boot. Why doesn't the Linux driver set the pin mux configuration it needs?
Best regards,
Wolfgang Denk

On 01.08.2012 14:55, Wolfgang Denk wrote:
Dear Dirk Behme,
In message 5019180C.4060109@de.bosch.com you wrote:
It seems to me that the SGTL5000 kernel feature for the SabreLite was developed with a Freescale U-Boot (patching the kernel with DT append) and not tested with the mainline U-Boot.
Probably. But the question is still why this should be changed in U-Boot. Why doesn't the Linux driver set the pin mux configuration it needs?
Sorry, I don't know. The Linux driver developers told me "there is no U-Boot dependency". Maybe they could answer this question? CCed.
Best regards
Dirk

Le Wed, 1 Aug 2012 15:22:30 +0200, Dirk Behme dirk.behme@de.bosch.com a écrit :
Probably. But the question is still why this should be changed in U-Boot. Why doesn't the Linux driver set the pin mux configuration it needs?
Sorry, I don't know. The Linux driver developers told me "there is no U-Boot dependency". Maybe they could answer this question? CCed.
The kernel has a pinctrl driver for i.MX 6, so I would rather suggest to fix your imx6q-sabrelite.dts Device Tree source file so that the audio device is properly associated with the correct pinmux configuration.
Each device can have a pinctrl-0 DT property, which points to one or more pinmux configurations that are defined in imx6q.dtsi file. You can add additional pinmux configurations here if needed.
But yeah, definitely, the kernel shouldn't rely too much on U-Boot having set the right pinmux configuration.
Best regards,
Thomas

On 01.08.2012 15:33, Thomas Petazzoni wrote:
Le Wed, 1 Aug 2012 15:22:30 +0200, Dirk Behme dirk.behme@de.bosch.com a écrit :
Probably. But the question is still why this should be changed in U-Boot. Why doesn't the Linux driver set the pin mux configuration it needs?
Sorry, I don't know. The Linux driver developers told me "there is no U-Boot dependency". Maybe they could answer this question? CCed.
The kernel has a pinctrl driver for i.MX 6, so I would rather suggest to fix your imx6q-sabrelite.dts Device Tree source file so that the audio device is properly associated with the correct pinmux configuration.
I'm using
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=commitdiff;h=...
Each device can have a pinctrl-0 DT property, which points to one or more pinmux configurations that are defined in imx6q.dtsi file. You can add additional pinmux configurations here if needed.
Sounds like the above is incomplete, then?
But yeah, definitely, the kernel shouldn't rely too much on U-Boot having set the right pinmux configuration.
Best regards
Dirk

Le Wed, 1 Aug 2012 15:43:03 +0200, Dirk Behme dirk.behme@de.bosch.com a écrit :
The kernel has a pinctrl driver for i.MX 6, so I would rather suggest to fix your imx6q-sabrelite.dts Device Tree source file so that the audio device is properly associated with the correct pinmux configuration.
I'm using
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=commitdiff;h=...
Each device can have a pinctrl-0 DT property, which points to one or more pinmux configurations that are defined in imx6q.dtsi file. You can add additional pinmux configurations here if needed.
Sounds like the above is incomplete, then?
Yes. If this device needs certain pins to be muxed in a certain configuration, then it needs:
pinctrl-names = "default"; pinctrl-0 = <&pinctrl_some_config_name>;
And then in the imx6q.dtsi, the pinctrl_some_config_name pinctrl configuration needs to be defined.
But I guess this starts to be a bit off-topic for the U-Boot list. What about raising the issue with i.MX 6 kernel maintainers on LAKML instead?
Best regards,
Thomas

Hi Dirk,
On Wed, Aug 1, 2012 at 10:43 AM, Dirk Behme dirk.behme@de.bosch.com wrote:
Sounds like the above is incomplete, then?
I will send a kernel patch to setup these two clocks for sabrelite. I don't have a sabrelite handy now, but if you have a chance to test it, please let me know.
Regards,
Fabio Estevam

On 01.08.2012 13:05, Dirk Behme wrote:
A recent Linux kernel (>= 3.5) has support for the SGTL 5000 sound on the SabreLite board. To make this work, U-Boot has to configure the pin mux for PAD_GPIO_0__CCM_CLKO and PAD_GPIO_3__CCM_CLKO2 correctly.
Taken from Freescale's ER5 U-Boot for the SabreLite.
Signed-off-by: Dirk Behme dirk.behme@de.bosch.com CC: Troy Kisky troy.kisky@boundarydevices.com CC: Stefano Babic sbabic@denx.de
board/freescale/mx6qsabrelite/imximage.cfg | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/board/freescale/mx6qsabrelite/imximage.cfg b/board/freescale/mx6qsabrelite/imximage.cfg index 62498ab..2d7825a 100644 --- a/board/freescale/mx6qsabrelite/imximage.cfg +++ b/board/freescale/mx6qsabrelite/imximage.cfg @@ -168,3 +168,6 @@ DATA 4 0x020e0010 0xF00000CF # set IPU AXI-id0 Qos=0xf(bypass) AXI-id1 Qos=0x7 DATA 4 0x020e0018 0x007F007F DATA 4 0x020e001c 0x007F007F +# set PAD_GPIO_0__CCM_CLKO and PAD_GPIO_3__CCM_CLKO2 +DATA 4 0x020e0220 0x00000000 +DATA 4 0x020e022c 0x00000004 \ No newline at end of file
This is replaced with a kernel patch
http://www.spinics.net/lists/arm-kernel/msg187222.html
and therefore this patch is obsolete now.
Thanks
Dirk

On 02/08/2012 09:36, Dirk Behme wrote:
On 01.08.2012 13:05, Dirk Behme wrote:
A recent Linux kernel (>= 3.5) has support for the SGTL 5000 sound on the SabreLite board. To make this work, U-Boot has to configure the pin mux for PAD_GPIO_0__CCM_CLKO and PAD_GPIO_3__CCM_CLKO2 correctly.
Taken from Freescale's ER5 U-Boot for the SabreLite.
Signed-off-by: Dirk Behme dirk.behme@de.bosch.com CC: Troy Kisky troy.kisky@boundarydevices.com CC: Stefano Babic sbabic@denx.de
board/freescale/mx6qsabrelite/imximage.cfg | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/board/freescale/mx6qsabrelite/imximage.cfg b/board/freescale/mx6qsabrelite/imximage.cfg index 62498ab..2d7825a 100644 --- a/board/freescale/mx6qsabrelite/imximage.cfg +++ b/board/freescale/mx6qsabrelite/imximage.cfg @@ -168,3 +168,6 @@ DATA 4 0x020e0010 0xF00000CF # set IPU AXI-id0 Qos=0xf(bypass) AXI-id1 Qos=0x7 DATA 4 0x020e0018 0x007F007F DATA 4 0x020e001c 0x007F007F +# set PAD_GPIO_0__CCM_CLKO and PAD_GPIO_3__CCM_CLKO2 +DATA 4 0x020e0220 0x00000000 +DATA 4 0x020e022c 0x00000004 \ No newline at end of file
This is replaced with a kernel patch
http://www.spinics.net/lists/arm-kernel/msg187222.html
and therefore this patch is obsolete now.
Ok, thanks.
Regards, Stefano
participants (6)
-
Dirk Behme
-
Fabio Estevam
-
Liu Hui-R64343
-
Stefano Babic
-
Thomas Petazzoni
-
Wolfgang Denk