From: Michael Trimarchi <michael@amarulasolutions.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH V3] imx: mx25: Remove SION bit in all pin-mux that are safe
Date: Fri, 26 Jan 2018 08:51:37 +0100 [thread overview]
Message-ID: <20180126075135.GA6794@panicking> (raw)
In-Reply-To: <CA+sos7-QR-tjO3RNRwT8751tEYqE2Us_NTxEVhoccN+smUL0ug@mail.gmail.com>
Hi Benoit
On Thu, Jan 25, 2018 at 10:48:42PM +0100, Benoît Thébaudeau wrote:
> Hi Michael,
>
> On Thu, Jan 25, 2018 at 2:06 PM, Michael Trimarchi
> <michael@amarulasolutions.com> wrote:
> > SION bit should be used in the situation that we need
> > to read back the value of a pin and should not be set by
> > default macro.
> >
> > We get some malfunction as raised by following thread
> >
> > https://www.spinics.net/lists/linux-usb/msg162574.html
> >
> > 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
> >
> > SION bit is not necessary when the pin is configured as a peripheral
> > apart specific silicon bug. If an application needs to have this
> > set, this should be done in board file or in dts file
> >
> > Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
>
> [...]
>
> I have now tested the following peripherals on i.MX25 without any SION
> bit set: AUDMUX/SSI, eSDHC, FEC (except PHY access for which MDIO
> might have an issue without SION; Ethernet works but I have not
> checked whether this is possible at least partially without access to
> the PHY registers), GPIO, I2C, SLCDC, UART, and USB. Everything worked
> fine except the lack of SION for eSDHC CMD, which is true for all
> eSDHC instances (and not only for eSDHC1, so Linux's
> arch/arm/boot/dts/imx25-pinfunc.h should be fixed). Therefore, SION is
> mandatory for all the eSDHC CMD functions in
I have checked and u-boot does not have this pin-muxing. I think that this
patch should go as it is and a separate patch like this one following should
be applied after that. What do you think?
> arch/arm/include/asm/arch-mx25/iomux-mx25.h, but it can be removed for
> everything else (I still have to carry out one more test to confirm
> this for FEC MDIO), and moved to the board files if necessary (but I
> don't think that any mainline board code is doing something fancy
> enough to need it).
>
> If the bus-status detection example in the documentation of SION in
> the reference manual is useful, it means that SION is probably
> required for all the signals requiring simultaneous output and input
> (such as I²C for device clock stretching or multi-master bus
> arbitration, except if the IP toggles between input and output low at
> each clock edge rather than between open-drain output high and output
> low), because there are no automatic SION signals between the
> peripherals and the pads but only direction signals that can request a
> single direction at a time. For bidirectional signals that do not
> require simultaneous output and input because they work in turns (such
> as FEC MDIO), SION can be required or not depending on whether the IP
> toggles the direction signal for each turn or always expects an input
> feedback while driving an open-drain output high. Even if SION is
> required for the I²C example mentioned above (which is unlikely as
> basic I²C transfers work fine and clock stretching detection is
> automatic and would always need the input state), the need for these
> advanced I²C features can be considered board-specific, so SION would
> still not be required in iomux-mx25.h.
>
> In the end, for this patch, apart from the pending test for FEC MDIO:
> Reviewed-by: Benoît Thébaudeau <benoit.thebaudeau.dev@gmail.com>
>
> Best regards,
> Benoît
next prev parent reply other threads:[~2018-01-26 7:51 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-25 13:06 [U-Boot] [PATCH V3] imx: mx25: Remove SION bit in all pin-mux that are safe Michael Trimarchi
2018-01-25 21:48 ` Benoît Thébaudeau
2018-01-25 22:38 ` Michael Nazzareno Trimarchi
2018-01-26 7:51 ` Michael Trimarchi [this message]
2018-01-26 9:38 ` Benoît Thébaudeau
2018-01-26 11:00 ` Benoît Thébaudeau
2018-01-26 22:14 ` Michael Nazzareno Trimarchi
2018-01-26 22:26 ` Stefano Babic
2018-01-27 0:31 ` Fabio Estevam
2018-02-04 10:14 ` Stefano Babic
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180126075135.GA6794@panicking \
--to=michael@amarulasolutions.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.