From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefano Babic Date: Fri, 03 Jan 2014 15:30:32 +0100 Subject: [U-Boot] [PATCH v3 3/8] imx: Easy enabling of SION per-pin using MUX_MODE_SION helper macro In-Reply-To: <1387233845-4372-4-git-send-email-otavio@ossystems.com.br> References: <1387233845-4372-1-git-send-email-otavio@ossystems.com.br> <1387233845-4372-4-git-send-email-otavio@ossystems.com.br> Message-ID: <52C6C988.5090605@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 16/12/2013 23:44, Otavio Salvador wrote: > The macro allows easy setting in per-pin, as for example: > > ,---- > | imx_iomux_v3_setup_pad(MX6_PAD_NANDF_D1__GPIO_2_1 | MUX_MODE_SION); > `---- > > The IOMUX_CONFIG_SION allows for reading PAD value from PSR register. > > The following quote from the datasheet: > > ,---- > | ... > | 28.4.2.2 GPIO Write Mode > | The programming sequence for driving output signals should be as follows: > | 1. Configure IOMUX to select GPIO mode (Via IOMUXC), also enable SION if need > | to read loopback pad value through PSR > | 2. Configure GPIO direction register to output (GPIO_GDIR[GDIR] set to 1b). > | 3. Write value to data register (GPIO_DR). > | ... > `---- > > This fixes the gpio_get_value to properly work when a GPIO is set for > output and has no conflicts. > > Thanks for Beno?t Th?baudeau , Fabio > Estevam and Eric B?nard > for helping to properly trace this down. > > Signed-off-by: Otavio Salvador > --- Applied to u-boot-imx, thanks ! 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 =====================================================================