[U-Boot] [PATCH] imx: mx25: Remove SION bit in all pin-mux

Benoît Thébaudeau benoit at wsystem.com
Wed Jan 24 15:39:31 UTC 2018


On 24/01/2018 at 16:34, Benoît Thébaudeau wrote:
> On 24/01/2018 at 16:26, Michael Nazzareno Trimarchi wrote:
>> On Wed, Jan 24, 2018 at 4:14 PM, Fabio Estevam <festevam at gmail.com> wrote:
>>> On Wed, Jan 24, 2018 at 12:56 PM, Michael Trimarchi
>>> <michael at amarulasolutions.com> wrote:
>>>> SION bit should be used in the situation that we need
>>>> to read back the value of a pin and should be set by
>>>> default.
> 
> You remove this bit because it should be set by default? This sentence is
> confusing.
> 
>>>> This can generate any kind of random malfunction
>>>> as described in this thread.
>>>>
>>>> According to this thread:
>>>> https://www.spinics.net/lists/linux-usb/msg162574.html
> 
> I can't find details about SION on a specific pin in this thread. Please
> elaborate.
> 
>>>> We consider this an early bug so all the boards running imx25
>>>> with a minimimal set of functionalities can be affected.
>>>>
>>>> As reported by this application note:
>>>> https://www.nxp.com/docs/en/application-note/AN5078.pdf
>>>>
>>>> The software input on (SION) bit is an option to force an input
>>>> path to be active regardless of the value driven by the
>>>> corresponding module. It is used when the nature direction
>>>> of a pin depending on selected alternative function is an output,
>>>> but it is needed to read the real logic value on a pin.
>>>>
>>>> The SION bit can be used in:
>>>> • Loopback: the module of a selected alternative function drives
>>>> the pad and also receives the pad value as an input
>>>> • GPIO capture: the module of a selected alternative function
>>>> drives the pin and the value is captured by the GPIO
>>>>
>>>> Signed-off-by: Michael Trimarchi <michael at amarulasolutions.com>
>>>> ---
>>>> Refer-to:
>>>>         MX25 USB timeout on ID 0951:1665 Kingston Technology Digital
>>>>         DataTraveler SE9 64GB
>>>
>>> Glad you found a fix for the issue!
>>>
>>
>> The idea was to align to the other freescale architecture. I can
>> create two patches on it
>>
>> Michael
>>
>>>
>>>> ---
>>>>  arch/arm/include/asm/arch-mx25/iomux-mx25.h | 680 ++++++++++++++--------------
>>>>  1 file changed, 340 insertions(+), 340 deletions(-)
>>>>
>>>> diff --git a/arch/arm/include/asm/arch-mx25/iomux-mx25.h b/arch/arm/include/asm/arch-mx25/iomux-mx25.h
>>>> index 5b2863e..2fcaf60 100644
>>>> --- a/arch/arm/include/asm/arch-mx25/iomux-mx25.h
>>>> +++ b/arch/arm/include/asm/arch-mx25/iomux-mx25.h
>>>> @@ -30,481 +30,481 @@
>>>>
>>>>  /*                                                         PAD    MUX    ALT INPSE PATH PADCTRL */
>>>>  enum {
>>>> -       MX25_PAD_A10__A10                       = IOMUX_PAD(0x000, 0x008, 0x00, 0, 0, NO_PAD_CTRL),
>>>> -       MX25_PAD_A10__GPIO_4_0                  = IOMUX_PAD(0x000, 0x008, 0x05, 0, 0, NO_PAD_CTRL),
>>>> +       MX25_PAD_A10__A10                       = IOMUX_PAD(0x000, 0x008, 0, 0, 0, NO_PAD_CTRL),
>>>> +       MX25_PAD_A10__GPIO_4_0                  = IOMUX_PAD(0x000, 0x008, 5, 0, 0, NO_PAD_CTRL),
>>>
>>> In many places in this patch you are only changing things like 0x00
>>> --> 0 or 0x05--> 5, which just makes it harder to review.
>>>
>>> Please send a new version that only removes the SION bit.
> 
> Please make sure that these changes are not breaking anything for any board
> (NEW_PAD_CTRL() can be used for these boards to restore SION if it really has to
> be removed by default). SION is required in some cases, and it's unlikely to be
> harmful, its main side effect being an increased power consumption.

Actually, NEW_PAD_CTRL() cannot act upon SION, so removing it by default is all
the more risky.

Benoît


More information about the U-Boot mailing list