diff mbox

[U-Boot,imx6dl] Enable SION Bit for GPIO16 when ALT2 mode is selected

Message ID CAP9ODKo47qGqEg9cF8AjWouhOqjC37woqdWAkRS6J15bnBJ_5g@mail.gmail.com
State Changes Requested
Delegated to: Stefano Babic
Headers show

Commit Message

Otavio Salvador Jan. 19, 2014, 5:07 p.m. UTC
Andy,

On Sun, Jan 19, 2014 at 2:58 PM, Otavio Salvador
<otavio@ossystems.com.br> wrote:
> On Sun, Jan 19, 2014 at 12:34 PM, Andy Ng <andreas2025@gmail.com> wrote:
>> The ENET_REF_CLK has to loopback: the patch was produced from u-boot 2013-10
>
> Please:
>
>  - Add Signed-off-by
>  - Rebase it to imx/master as this does not apply in current source code.
>
> --
> Otavio Salvador                             O.S. Systems
> http://www.ossystems.com.br        http://code.ossystems.com.br
> Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750

This fixed one customer board I have as well.

I tested it using today's master tip.

Please change Q variant as well, rebased patch bellow:

 MX6_PAD_DECL(GPIO_16__SPDIF_IN,        0x0618, 0x0248, 4, 0x0914, 3, 0)
 MX6_PAD_DECL(GPIO_16__GPIO7_IO11,      0x0618, 0x0248, 5, 0x0000, 0, 0)

Comments

Fabio Estevam Jan. 19, 2014, 5:48 p.m. UTC | #1
Hi Otavio/Andy,

On Sun, Jan 19, 2014 at 3:07 PM, Otavio Salvador
<otavio@ossystems.com.br> wrote:

> --- a/arch/arm/include/asm/arch-mx6/mx6dl_pins.h
> +++ b/arch/arm/include/asm/arch-mx6/mx6dl_pins.h
> @@ -695,7 +695,7 @@ MX6_PAD_DECL(GPIO_1__GPIO1_IO01,    0x05E0,
> 0x0210, 5, 0x0000, 0, 0)
>  MX6_PAD_DECL(GPIO_1__SD1_CD_B, 0x05E0, 0x0210, 6, 0x0000, 0, 0)
>  MX6_PAD_DECL(GPIO_16__ESAI_TX3_RX2,    0x05E4, 0x0214, 0, 0x0850, 1, 0)
>  MX6_PAD_DECL(GPIO_16__ENET_1588_EVENT2_IN,     0x05E4, 0x0214, 1, 0x0000, 0, 0)
> -MX6_PAD_DECL(GPIO_16__ENET_REF_CLK,    0x05E4, 0x0214, 2, 0x080C, 0, 0)
> +MX6_PAD_DECL(GPIO_16__ENET_REF_CLK,    0x05E4, 0x0214, 2 |

What about adding the SION bit in the board file only?

Then we would have the same behaviour as in the kernel.

Please check the hummingboard dts file:
https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/tree/arch/arm/boot/dts/imx6qdl-microsom-ar8035.dtsi?id=refs/tags/next-20140117

Regards,

Fabio Estevam
Otavio Salvador Jan. 19, 2014, 5:55 p.m. UTC | #2
On Sun, Jan 19, 2014 at 3:48 PM, Fabio Estevam <festevam@gmail.com> wrote:
> Hi Otavio/Andy,
>
> On Sun, Jan 19, 2014 at 3:07 PM, Otavio Salvador
> <otavio@ossystems.com.br> wrote:
>
>> --- a/arch/arm/include/asm/arch-mx6/mx6dl_pins.h
>> +++ b/arch/arm/include/asm/arch-mx6/mx6dl_pins.h
>> @@ -695,7 +695,7 @@ MX6_PAD_DECL(GPIO_1__GPIO1_IO01,    0x05E0,
>> 0x0210, 5, 0x0000, 0, 0)
>>  MX6_PAD_DECL(GPIO_1__SD1_CD_B, 0x05E0, 0x0210, 6, 0x0000, 0, 0)
>>  MX6_PAD_DECL(GPIO_16__ESAI_TX3_RX2,    0x05E4, 0x0214, 0, 0x0850, 1, 0)
>>  MX6_PAD_DECL(GPIO_16__ENET_1588_EVENT2_IN,     0x05E4, 0x0214, 1, 0x0000, 0, 0)
>> -MX6_PAD_DECL(GPIO_16__ENET_REF_CLK,    0x05E4, 0x0214, 2, 0x080C, 0, 0)
>> +MX6_PAD_DECL(GPIO_16__ENET_REF_CLK,    0x05E4, 0x0214, 2 |
>
> What about adding the SION bit in the board file only?
>
> Then we would have the same behaviour as in the kernel.
>
> Please check the hummingboard dts file:
> https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/tree/arch/arm/boot/dts/imx6qdl-microsom-ar8035.dtsi?id=refs/tags/next-20140117

Personally I think when using the ALT 2 people are expecting it works
out of box so I think this should be in the PAD declaration.
Fabio Estevam Jan. 19, 2014, 6:03 p.m. UTC | #3
On Sun, Jan 19, 2014 at 3:55 PM, Otavio Salvador
<otavio@ossystems.com.br> wrote:

> Personally I think when using the ALT 2 people are expecting it works
> out of box so I think this should be in the PAD declaration.

This pin works out of the box in hummingboard, for example.

IOMUX_CONFIG_SION is not used anywhere in the
mx6q_pins.h/mx6dl_pins.h, so why GPIO_16__ENET_
REF_CLK should be an exception?

Regards,

Fabio Estevam
Otavio Salvador Jan. 19, 2014, 6:47 p.m. UTC | #4
On Sun, Jan 19, 2014 at 4:03 PM, Fabio Estevam <festevam@gmail.com> wrote:
> On Sun, Jan 19, 2014 at 3:55 PM, Otavio Salvador
> <otavio@ossystems.com.br> wrote:
>
>> Personally I think when using the ALT 2 people are expecting it works
>> out of box so I think this should be in the PAD declaration.
>
> This pin works out of the box in hummingboard, for example.
>
> IOMUX_CONFIG_SION is not used anywhere in the
> mx6q_pins.h/mx6dl_pins.h, so why GPIO_16__ENET_
> REF_CLK should be an exception?

Are you sure?

% git grep -c IOMUX_CONFIG_SION arch/arm/include/asm/arch-mx6/
arch/arm/include/asm/arch-mx6/mx6dl_pins.h:31
arch/arm/include/asm/arch-mx6/mx6q_pins.h:1

The q_pins is outdate it seems.
Markus Niebel Jan. 22, 2014, 7:19 a.m. UTC | #5
Am 19.01.2014 19:47, wrote Otavio Salvador:
> On Sun, Jan 19, 2014 at 4:03 PM, Fabio Estevam <festevam@gmail.com> wrote:
>> On Sun, Jan 19, 2014 at 3:55 PM, Otavio Salvador
>> <otavio@ossystems.com.br> wrote:
>>
>>> Personally I think when using the ALT 2 people are expecting it works
>>> out of box so I think this should be in the PAD declaration.
>>
>> This pin works out of the box in hummingboard, for example.
>>
>> IOMUX_CONFIG_SION is not used anywhere in the
>> mx6q_pins.h/mx6dl_pins.h, so why GPIO_16__ENET_
>> REF_CLK should be an exception?
> 
> Are you sure?
> 
> % git grep -c IOMUX_CONFIG_SION arch/arm/include/asm/arch-mx6/
> arch/arm/include/asm/arch-mx6/mx6dl_pins.h:31
> arch/arm/include/asm/arch-mx6/mx6q_pins.h:1
> 
> The q_pins is outdate it seems.
> 

IOMUX_CONFIG_SION is used everywhere for I2C dedicated pins - partly hard coded for
mx6q - so yes, should be used fro enet_clk, too

Markus
Fabio Estevam Jan. 22, 2014, 10:57 a.m. UTC | #6
On Wed, Jan 22, 2014 at 5:19 AM, Markus Niebel <list-09_u-boot@tqsc.de> wrote:

>
> IOMUX_CONFIG_SION is used everywhere for I2C dedicated pins - partly hard coded for
> mx6q - so yes, should be used fro enet_clk, too

Yes, looks good.

Regards,

Fabio Estevam
diff mbox

Patch

diff --git a/arch/arm/include/asm/arch-mx6/mx6dl_pins.h
b/arch/arm/include/asm/arch-mx6/mx6dl_pins.h
index 55cc9ad..3f41787 100644
--- a/arch/arm/include/asm/arch-mx6/mx6dl_pins.h
+++ b/arch/arm/include/asm/arch-mx6/mx6dl_pins.h
@@ -695,7 +695,7 @@  MX6_PAD_DECL(GPIO_1__GPIO1_IO01,    0x05E0,
0x0210, 5, 0x0000, 0, 0)
 MX6_PAD_DECL(GPIO_1__SD1_CD_B, 0x05E0, 0x0210, 6, 0x0000, 0, 0)
 MX6_PAD_DECL(GPIO_16__ESAI_TX3_RX2,    0x05E4, 0x0214, 0, 0x0850, 1, 0)
 MX6_PAD_DECL(GPIO_16__ENET_1588_EVENT2_IN,     0x05E4, 0x0214, 1, 0x0000, 0, 0)
-MX6_PAD_DECL(GPIO_16__ENET_REF_CLK,    0x05E4, 0x0214, 2, 0x080C, 0, 0)
+MX6_PAD_DECL(GPIO_16__ENET_REF_CLK,    0x05E4, 0x0214, 2 |
IOMUX_CONFIG_SION, 0x080C, 0, 0)
 MX6_PAD_DECL(GPIO_16__SD1_LCTL,        0x05E4, 0x0214, 3, 0x0000, 0, 0)
 MX6_PAD_DECL(GPIO_16__SPDIF_IN,        0x05E4, 0x0214, 4, 0x08F0, 2, 0)
 MX6_PAD_DECL(GPIO_16__GPIO7_IO11,      0x05E4, 0x0214, 5, 0x0000, 0, 0)
diff --git a/arch/arm/include/asm/arch-mx6/mx6q_pins.h
b/arch/arm/include/asm/arch-mx6/mx6q_pins.h
index ad31c33..3aae246 100644
--- a/arch/arm/include/asm/arch-mx6/mx6q_pins.h
+++ b/arch/arm/include/asm/arch-mx6/mx6q_pins.h
@@ -703,7 +703,7 @@  MX6_PAD_DECL(GPIO_8__SPDIF_SR_CLK,  0x0614,
0x0244, 6, 0x0000, 0, 0)
 MX6_PAD_DECL(GPIO_8__USB_OTG_PWR_CTL_WAKE,     0x0614, 0x0244, 7, 0x0000, 0, 0)
 MX6_PAD_DECL(GPIO_16__ESAI_TX3_RX2,    0x0618, 0x0248, 0, 0x0880, 1, 0)
 MX6_PAD_DECL(GPIO_16__ENET_1588_EVENT2_IN,     0x0618, 0x0248, 1, 0x0000, 0, 0)
-MX6_PAD_DECL(GPIO_16__ENET_REF_CLK,    0x0618, 0x0248, 2, 0x083C, 1, 0)
+MX6_PAD_DECL(GPIO_16__ENET_REF_CLK,    0x0618, 0x0248, 2 |
IOMUX_CONFIG_SION, 0x083C, 1, 0)
 MX6_PAD_DECL(GPIO_16__SD1_LCTL,        0x0618, 0x0248, 3, 0x0000, 0, 0)