From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefano Babic Date: Fri, 17 Aug 2012 22:06:37 +0200 Subject: [U-Boot] [PATCH] mx5 iomux: Fix GPIO with SION In-Reply-To: <2110513212.2518932.1345220493328.JavaMail.root@advansee.com> References: <2110513212.2518932.1345220493328.JavaMail.root@advansee.com> Message-ID: <502EA44D.6030709@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 17/08/2012 18:21, Beno?t Th?baudeau wrote: > Hi Stefano, > Hi Beno?t, >> >> So why should we use both SION and GPIO ? > > No. See "A.3.2 SW Loopback through SION Bit" and "Figure A-3. IOMUX Cell Block > Diagram" in the i.MX51 RM. > > Whether SION is set or not, the selected IOMUX function will drive the pin. And this is clear.. > > If SION is cleared, the input from the pin will be either disabled or go to the > selected IOMUX function depending on the activation of the input by this > function. and also thi point is clear. > > If SION is set, the input from the pin is always enabled and goes to all IOMUX > alternate functions at once (if their input connection to this pin is activated > through the daisy chain). but I am asking myself why I should do this, that is the function drive the pin, using the input as source for another funtion. > > So SION does not invalidate the function bit-field. > > Then, you could wonder what kind of real life use case could be useful with both > SION and GPIO set. This is exactly the point ! > This could be used for instance as a workaround to an erratum > if an IOMUX function does not drive its output properly, but it needs to read > back the pin status to work fine. Thus, the GPIO function output could be used > to drive the pin, with SION set so that the flawed IOMUX function can still > probe the pin and function properly internally. Note that it's only a > theoretical example; I don't remember such an erratum. I am really impressed about your attention reading the manuals, but we have the rule in u-boot that we add code / feature when we have a use case (the same is in kernel). At the moment, it is pure theory, and nobody will use it. We will reconsider this patch when its introduction will be required to fix a SOC bug, if any. Best regards, Stefano Babic -- ===================================================================== DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================