All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/1] Meson8b: fix requesting GPIOs greater than GPIOZ_3
@ 2018-03-12 20:57 Martin Blumenstingl
  2018-03-12 20:57 ` [PATCH v3 1/1] ARM: dts: meson8b: the CBUS GPIO controller only has 83 GPIOs Martin Blumenstingl
  0 siblings, 1 reply; 3+ messages in thread
From: Martin Blumenstingl @ 2018-03-12 20:57 UTC (permalink / raw)
  To: linus-amlogic

GPIOs greater GPIOZ_3 (whose ID is 83 - as a reminder: this is exactly
the number of actual GPIO lines on Meson8b) could not be requested. Using
CARD_6 (ID 100, "base of the GPIO controller is 382) as an example:
$ echo 482 > /sys/class/gpio/export
export_store: invalid GPIO 482

This was discovered by Linus L?ssing when he was adding SD card support
on the Odroid-C1.


changes since v2 at [1]
- added Jerome's Reviewed-by and Linus' Acked-by (thanks to both of you!)
- dropped patch #1 since Linus already applied it to the for-next branch
  of his linux-pinctrl tree (this leaves only patch #2 which should go
  through Kevin's linux-amlogic tree)

changes since RFC v1 at [0]:
- dropped RFC prefix
- instead of adding a hack to override the "ngpio" field this now splits
  the register definitions as suggested by Jerome (and based on the
  discussion of RFC v1). see the description of PATCH #1 for a more
  detailed explanation

[0] http://lists.infradead.org/pipermail/linux-amlogic/2018-January/006259.html
[1] http://lists.infradead.org/pipermail/linux-amlogic/2018-February/006546.html

Martin Blumenstingl (1):
  ARM: dts: meson8b: the CBUS GPIO controller only has 83 GPIOs

 arch/arm/boot/dts/meson8b.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.16.2

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH v3 1/1] ARM: dts: meson8b: the CBUS GPIO controller only has 83 GPIOs
  2018-03-12 20:57 [PATCH v3 0/1] Meson8b: fix requesting GPIOs greater than GPIOZ_3 Martin Blumenstingl
@ 2018-03-12 20:57 ` Martin Blumenstingl
  2018-03-19 23:37   ` Kevin Hilman
  0 siblings, 1 reply; 3+ messages in thread
From: Martin Blumenstingl @ 2018-03-12 20:57 UTC (permalink / raw)
  To: linus-amlogic

Update the "gpio-ranges" property of the CBUS GPIO controller on Meson8b
because it only provides 83 GPIOs.
The GPIO definitions in include/dt-bindings/gpio/meson8b-gpio.h
inherited all GPIOs from Meson8 until recently. However, Meson8b does
not support all GPIOs which are supported by Meson8 (Meson8b doesn't
have a GPIOZ bank, most of the pins from the GPIODV bank are missing on
Meson8b - just to name a few differences).

The actual number of GPIOs is only 83, instead of 120 from Meson8 plus
the 10 GPIOs from the DIF bank on Meson8b.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Reviewed-by: Jerome Brunet <jbrunet@baylibre.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
---
 arch/arm/boot/dts/meson8b.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/meson8b.dtsi b/arch/arm/boot/dts/meson8b.dtsi
index 5f7841b2d163..9fa77975354b 100644
--- a/arch/arm/boot/dts/meson8b.dtsi
+++ b/arch/arm/boot/dts/meson8b.dtsi
@@ -183,7 +183,7 @@
 			reg-names = "mux", "pull", "pull-enable", "gpio";
 			gpio-controller;
 			#gpio-cells = <2>;
-			gpio-ranges = <&pinctrl_cbus 0 0 130>;
+			gpio-ranges = <&pinctrl_cbus 0 0 83>;
 		};
 
 		eth_rgmii_pins: eth-rgmii {
-- 
2.16.2

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH v3 1/1] ARM: dts: meson8b: the CBUS GPIO controller only has 83 GPIOs
  2018-03-12 20:57 ` [PATCH v3 1/1] ARM: dts: meson8b: the CBUS GPIO controller only has 83 GPIOs Martin Blumenstingl
@ 2018-03-19 23:37   ` Kevin Hilman
  0 siblings, 0 replies; 3+ messages in thread
From: Kevin Hilman @ 2018-03-19 23:37 UTC (permalink / raw)
  To: linus-amlogic

Martin Blumenstingl <martin.blumenstingl@googlemail.com> writes:

> Update the "gpio-ranges" property of the CBUS GPIO controller on Meson8b
> because it only provides 83 GPIOs.
> The GPIO definitions in include/dt-bindings/gpio/meson8b-gpio.h
> inherited all GPIOs from Meson8 until recently. However, Meson8b does
> not support all GPIOs which are supported by Meson8 (Meson8b doesn't
> have a GPIOZ bank, most of the pins from the GPIODV bank are missing on
> Meson8b - just to name a few differences).
>
> The actual number of GPIOs is only 83, instead of 120 from Meson8 plus
> the 10 GPIOs from the DIF bank on Meson8b.
>
> Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
> Reviewed-by: Jerome Brunet <jbrunet@baylibre.com>
> Acked-by: Linus Walleij <linus.walleij@linaro.org>

Applied to v4.17/dt,

Thanks,

Kevin

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-03-19 23:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-12 20:57 [PATCH v3 0/1] Meson8b: fix requesting GPIOs greater than GPIOZ_3 Martin Blumenstingl
2018-03-12 20:57 ` [PATCH v3 1/1] ARM: dts: meson8b: the CBUS GPIO controller only has 83 GPIOs Martin Blumenstingl
2018-03-19 23:37   ` Kevin Hilman

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.