* [PATCH 1/2] gpio: mxc_gpio: change gpio index for i.MX8 @ 2020-06-10 3:28 Ye Li 2020-06-10 3:28 ` [PATCH 2/2] arm: dts: imx: fsl-imx8qm.dtsi: fix gpio aliases Ye Li 2020-06-23 7:50 ` [PATCH 1/2] gpio: mxc_gpio: change gpio index for i.MX8 sbabic at denx.de 0 siblings, 2 replies; 4+ messages in thread From: Ye Li @ 2020-06-10 3:28 UTC (permalink / raw) To: u-boot Since the i.MX8 GPIO banks are indexed from 0 not 1 on other i.MX platforms, so we have to adjust the index accordingly. Signed-off-by: Adrian Alonso <adrian.alonso@nxp.com> Signed-off-by: Ye Li <ye.li@nxp.com> --- drivers/gpio/mxc_gpio.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/gpio/mxc_gpio.c b/drivers/gpio/mxc_gpio.c index a851893..90d36fb 100644 --- a/drivers/gpio/mxc_gpio.c +++ b/drivers/gpio/mxc_gpio.c @@ -281,7 +281,10 @@ static int mxc_gpio_probe(struct udevice *dev) char name[18], *str; banknum = plat->bank_index; - sprintf(name, "GPIO%d_", banknum + 1); + if (IS_ENABLED(CONFIG_ARCH_IMX8)) + sprintf(name, "GPIO%d_", banknum); + else + sprintf(name, "GPIO%d_", banknum + 1); str = strdup(name); if (!str) return -ENOMEM; -- 2.7.4 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] arm: dts: imx: fsl-imx8qm.dtsi: fix gpio aliases 2020-06-10 3:28 [PATCH 1/2] gpio: mxc_gpio: change gpio index for i.MX8 Ye Li @ 2020-06-10 3:28 ` Ye Li 2020-06-23 7:51 ` sbabic at denx.de 2020-06-23 7:50 ` [PATCH 1/2] gpio: mxc_gpio: change gpio index for i.MX8 sbabic at denx.de 1 sibling, 1 reply; 4+ messages in thread From: Ye Li @ 2020-06-10 3:28 UTC (permalink / raw) To: u-boot Current aliases missed gpio0 node, and this node shoud be aliased to gpio index 0 to align with i.MX8QXP. Otherwise, we will get below message when running "gpio status" command, and see the reason by "dm uclass". => gpio status Device 'gpio at 5d090000': seq 0 is in use by 'gpio at 5d080000' Device 'gpio at 5d0a0000': seq 1 is in use by 'gpio at 5d090000' Device 'gpio at 5d0b0000': seq 2 is in use by 'gpio at 5d0a0000' => dm uclass uclass 36: gpio 0 * gpio at 5d080000 @ fbaefb90, seq 0, (req -1) 1 * gpio at 5d090000 @ fbaefc70, seq 1, (req 0) 2 * gpio at 5d0a0000 @ fbaefd50, seq 2, (req 1) 3 * gpio at 5d0b0000 @ fbaefe30, seq 5, (req 2) 4 * gpio at 5d0c0000 @ fbaeff10, seq 3, (req 3) 5 * gpio at 5d0d0000 @ fbaefff0, seq 4, (req 4) 6 * gpio at 5d0e0000 @ fbaf00d0, seq 6, (req 5) 7 * gpio at 5d0f0000 @ fbaf01b0, seq 7, (req 6) Signed-off-by: Ye Li <ye.li@nxp.com> --- arch/arm/dts/fsl-imx8qm.dtsi | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/arch/arm/dts/fsl-imx8qm.dtsi b/arch/arm/dts/fsl-imx8qm.dtsi index 2e887ad..88aeaf6 100644 --- a/arch/arm/dts/fsl-imx8qm.dtsi +++ b/arch/arm/dts/fsl-imx8qm.dtsi @@ -21,13 +21,14 @@ aliases { ethernet0 = &fec1; ethernet1 = &fec2; - gpio0 = &gpio1; - gpio1 = &gpio2; - gpio2 = &gpio3; - gpio3 = &gpio4; - gpio4 = &gpio5; - gpio5 = &gpio6; - gpio6 = &gpio7; + gpio0 = &gpio0; + gpio1 = &gpio1; + gpio2 = &gpio2; + gpio3 = &gpio3; + gpio4 = &gpio4; + gpio5 = &gpio5; + gpio6 = &gpio6; + gpio7 = &gpio7; serial0 = &lpuart0; serial1 = &lpuart1; serial2 = &lpuart2; -- 2.7.4 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] arm: dts: imx: fsl-imx8qm.dtsi: fix gpio aliases 2020-06-10 3:28 ` [PATCH 2/2] arm: dts: imx: fsl-imx8qm.dtsi: fix gpio aliases Ye Li @ 2020-06-23 7:51 ` sbabic at denx.de 0 siblings, 0 replies; 4+ messages in thread From: sbabic at denx.de @ 2020-06-23 7:51 UTC (permalink / raw) To: u-boot > Current aliases missed gpio0 node, and this node shoud be > aliased to gpio index 0 to align with i.MX8QXP. Otherwise, we > will get below message when running "gpio status" command, and > see the reason by "dm uclass". > => gpio status > Device 'gpio at 5d090000': seq 0 is in use by 'gpio at 5d080000' > Device 'gpio at 5d0a0000': seq 1 is in use by 'gpio at 5d090000' > Device 'gpio at 5d0b0000': seq 2 is in use by 'gpio at 5d0a0000' > => dm uclass > uclass 36: gpio > 0 * gpio at 5d080000 @ fbaefb90, seq 0, (req -1) > 1 * gpio at 5d090000 @ fbaefc70, seq 1, (req 0) > 2 * gpio at 5d0a0000 @ fbaefd50, seq 2, (req 1) > 3 * gpio at 5d0b0000 @ fbaefe30, seq 5, (req 2) > 4 * gpio at 5d0c0000 @ fbaeff10, seq 3, (req 3) > 5 * gpio at 5d0d0000 @ fbaefff0, seq 4, (req 4) > 6 * gpio at 5d0e0000 @ fbaf00d0, seq 6, (req 5) > 7 * gpio at 5d0f0000 @ fbaf01b0, seq 7, (req 6) > Signed-off-by: Ye Li <ye.li@nxp.com> Applied to u-boot-imx, master, thanks ! Best regards, Stefano Babic -- ===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk 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 ===================================================================== ^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/2] gpio: mxc_gpio: change gpio index for i.MX8 2020-06-10 3:28 [PATCH 1/2] gpio: mxc_gpio: change gpio index for i.MX8 Ye Li 2020-06-10 3:28 ` [PATCH 2/2] arm: dts: imx: fsl-imx8qm.dtsi: fix gpio aliases Ye Li @ 2020-06-23 7:50 ` sbabic at denx.de 1 sibling, 0 replies; 4+ messages in thread From: sbabic at denx.de @ 2020-06-23 7:50 UTC (permalink / raw) To: u-boot > Since the i.MX8 GPIO banks are indexed from 0 not 1 on other i.MX > platforms, so we have to adjust the index accordingly. > Signed-off-by: Adrian Alonso <adrian.alonso@nxp.com> > Signed-off-by: Ye Li <ye.li@nxp.com> Applied to u-boot-imx, master, thanks ! Best regards, Stefano Babic -- ===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk 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 ===================================================================== ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-06-23 7:51 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2020-06-10 3:28 [PATCH 1/2] gpio: mxc_gpio: change gpio index for i.MX8 Ye Li 2020-06-10 3:28 ` [PATCH 2/2] arm: dts: imx: fsl-imx8qm.dtsi: fix gpio aliases Ye Li 2020-06-23 7:51 ` sbabic at denx.de 2020-06-23 7:50 ` [PATCH 1/2] gpio: mxc_gpio: change gpio index for i.MX8 sbabic at denx.de
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox