* [PATCH] ARM: dts: kirkwood: fix pin-muxing of MPP7
@ 2018-01-04 16:53 Thomas Petazzoni
2018-01-04 20:52 ` Andrew Lunn
2018-01-05 8:36 ` Thomas Petazzoni
0 siblings, 2 replies; 4+ messages in thread
From: Thomas Petazzoni @ 2018-01-04 16:53 UTC (permalink / raw)
To: linux-arm-kernel
MPP7 is currently muxed as "gpio", but this function doesn't exist for
MPP7, only "gpo" is available. This causes the following error:
kirkwood-pinctrl f1010000.pin-controller: unsupported function gpio on pin mpp7
pinctrl core: failed to register map default (6): invalid type given
kirkwood-pinctrl f1010000.pin-controller: error claiming hogs: -22
kirkwood-pinctrl f1010000.pin-controller: could not claim hogs: -22
kirkwood-pinctrl f1010000.pin-controller: unable to register pinctrl driver
kirkwood-pinctrl: probe of f1010000.pin-controller failed with error -22
So the pinctrl driver is not probed, all device drivers (including the
UART driver) do a -EPROBE_DEFER, and therefore the system doesn't
really boot (well, it boots, but with no UART, and no devices that
require pin-muxing).
Back when the Device Tree file for this board was introduced, the
definition was already wrong. The pinctrl driver also always described
as "gpo" this function for MPP7. However, between Linux 4.10 and 4.11,
a hog pin failing to be muxed was turned from a simple warning to a
hard error that caused the entire pinctrl driver probe to bail
out. This is probably the result of commit 6118714275f0a ("pinctrl:
core: Fix pinctrl_register_and_init() with pinctrl_enable()").
This commit fixes the Device Tree to use the proper "gpo" function for
MPP7, which fixes the boot of OpenBlocks A7, which was broken since
Linux 4.11.
Fixes: f24b56cbcd9d ("ARM: kirkwood: add support for OpenBlocks A7 platform")
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
arch/arm/boot/dts/kirkwood-openblocks_a7.dts | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/arch/arm/boot/dts/kirkwood-openblocks_a7.dts b/arch/arm/boot/dts/kirkwood-openblocks_a7.dts
index cf2f5240e176..27cc913ca0f5 100644
--- a/arch/arm/boot/dts/kirkwood-openblocks_a7.dts
+++ b/arch/arm/boot/dts/kirkwood-openblocks_a7.dts
@@ -53,7 +53,8 @@
};
pinctrl: pin-controller at 10000 {
- pinctrl-0 = <&pmx_dip_switches &pmx_gpio_header>;
+ pinctrl-0 = <&pmx_dip_switches &pmx_gpio_header
+ &pmx_gpio_header_gpo>;
pinctrl-names = "default";
pmx_uart0: pmx-uart0 {
@@ -85,11 +86,16 @@
* ground.
*/
pmx_gpio_header: pmx-gpio-header {
- marvell,pins = "mpp17", "mpp7", "mpp29", "mpp28",
+ marvell,pins = "mpp17", "mpp29", "mpp28",
"mpp35", "mpp34", "mpp40";
marvell,function = "gpio";
};
+ pmx_gpio_header_gpo: pxm-gpio-header-gpo {
+ marvell,pins = "mpp7";
+ marvell,function = "gpo";
+ };
+
pmx_gpio_init: pmx-init {
marvell,pins = "mpp38";
marvell,function = "gpio";
--
2.14.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] ARM: dts: kirkwood: fix pin-muxing of MPP7
2018-01-04 16:53 [PATCH] ARM: dts: kirkwood: fix pin-muxing of MPP7 Thomas Petazzoni
@ 2018-01-04 20:52 ` Andrew Lunn
2018-01-05 8:36 ` Thomas Petazzoni
1 sibling, 0 replies; 4+ messages in thread
From: Andrew Lunn @ 2018-01-04 20:52 UTC (permalink / raw)
To: linux-arm-kernel
On Thu, Jan 04, 2018 at 05:53:12PM +0100, Thomas Petazzoni wrote:
> MPP7 is currently muxed as "gpio", but this function doesn't exist for
> MPP7, only "gpo" is available. This causes the following error:
>
> kirkwood-pinctrl f1010000.pin-controller: unsupported function gpio on pin mpp7
> pinctrl core: failed to register map default (6): invalid type given
> kirkwood-pinctrl f1010000.pin-controller: error claiming hogs: -22
> kirkwood-pinctrl f1010000.pin-controller: could not claim hogs: -22
> kirkwood-pinctrl f1010000.pin-controller: unable to register pinctrl driver
> kirkwood-pinctrl: probe of f1010000.pin-controller failed with error -22
>
> So the pinctrl driver is not probed, all device drivers (including the
> UART driver) do a -EPROBE_DEFER, and therefore the system doesn't
> really boot (well, it boots, but with no UART, and no devices that
> require pin-muxing).
>
> Back when the Device Tree file for this board was introduced, the
> definition was already wrong. The pinctrl driver also always described
> as "gpo" this function for MPP7. However, between Linux 4.10 and 4.11,
> a hog pin failing to be muxed was turned from a simple warning to a
> hard error that caused the entire pinctrl driver probe to bail
> out. This is probably the result of commit 6118714275f0a ("pinctrl:
> core: Fix pinctrl_register_and_init() with pinctrl_enable()").
>
> This commit fixes the Device Tree to use the proper "gpo" function for
> MPP7, which fixes the boot of OpenBlocks A7, which was broken since
> Linux 4.11.
>
> Fixes: f24b56cbcd9d ("ARM: kirkwood: add support for OpenBlocks A7 platform")
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Hi Thomas
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
I just checked the other Kirkwood boards. This is the only one that
got MPP7 wrong.
Andrew
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] ARM: dts: kirkwood: fix pin-muxing of MPP7
2018-01-04 16:53 [PATCH] ARM: dts: kirkwood: fix pin-muxing of MPP7 Thomas Petazzoni
2018-01-04 20:52 ` Andrew Lunn
@ 2018-01-05 8:36 ` Thomas Petazzoni
2018-01-05 8:55 ` Gregory CLEMENT
1 sibling, 1 reply; 4+ messages in thread
From: Thomas Petazzoni @ 2018-01-05 8:36 UTC (permalink / raw)
To: linux-arm-kernel
Hello,
On Thu, 4 Jan 2018 17:53:12 +0100, Thomas Petazzoni wrote:
> MPP7 is currently muxed as "gpio", but this function doesn't exist for
> MPP7, only "gpo" is available. This causes the following error:
>
> kirkwood-pinctrl f1010000.pin-controller: unsupported function gpio on pin mpp7
> pinctrl core: failed to register map default (6): invalid type given
> kirkwood-pinctrl f1010000.pin-controller: error claiming hogs: -22
> kirkwood-pinctrl f1010000.pin-controller: could not claim hogs: -22
> kirkwood-pinctrl f1010000.pin-controller: unable to register pinctrl driver
> kirkwood-pinctrl: probe of f1010000.pin-controller failed with error -22
>
> So the pinctrl driver is not probed, all device drivers (including the
> UART driver) do a -EPROBE_DEFER, and therefore the system doesn't
> really boot (well, it boots, but with no UART, and no devices that
> require pin-muxing).
>
> Back when the Device Tree file for this board was introduced, the
> definition was already wrong. The pinctrl driver also always described
> as "gpo" this function for MPP7. However, between Linux 4.10 and 4.11,
> a hog pin failing to be muxed was turned from a simple warning to a
> hard error that caused the entire pinctrl driver probe to bail
> out. This is probably the result of commit 6118714275f0a ("pinctrl:
> core: Fix pinctrl_register_and_init() with pinctrl_enable()").
>
> This commit fixes the Device Tree to use the proper "gpo" function for
> MPP7, which fixes the boot of OpenBlocks A7, which was broken since
> Linux 4.11.
>
> Fixes: f24b56cbcd9d ("ARM: kirkwood: add support for OpenBlocks A7 platform")
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
I just realized that my commit title isn't that great, as it doesn't
mention the board. Something like:
ARM: dts: kirkwood: fix pin-muxing of MPP7 on OpenBlocks A7
would have been better.
Gr?gory: let me know if you want me to send a v2, or if you can fix up
this while applying.
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] ARM: dts: kirkwood: fix pin-muxing of MPP7
2018-01-05 8:36 ` Thomas Petazzoni
@ 2018-01-05 8:55 ` Gregory CLEMENT
0 siblings, 0 replies; 4+ messages in thread
From: Gregory CLEMENT @ 2018-01-05 8:55 UTC (permalink / raw)
To: linux-arm-kernel
Hi Thomas,
On ven., janv. 05 2018, Thomas Petazzoni <thomas.petazzoni@free-electrons.com> wrote:
> Hello,
>
> On Thu, 4 Jan 2018 17:53:12 +0100, Thomas Petazzoni wrote:
>> MPP7 is currently muxed as "gpio", but this function doesn't exist for
>> MPP7, only "gpo" is available. This causes the following error:
>>
>> kirkwood-pinctrl f1010000.pin-controller: unsupported function gpio on pin mpp7
>> pinctrl core: failed to register map default (6): invalid type given
>> kirkwood-pinctrl f1010000.pin-controller: error claiming hogs: -22
>> kirkwood-pinctrl f1010000.pin-controller: could not claim hogs: -22
>> kirkwood-pinctrl f1010000.pin-controller: unable to register pinctrl driver
>> kirkwood-pinctrl: probe of f1010000.pin-controller failed with error -22
>>
>> So the pinctrl driver is not probed, all device drivers (including the
>> UART driver) do a -EPROBE_DEFER, and therefore the system doesn't
>> really boot (well, it boots, but with no UART, and no devices that
>> require pin-muxing).
>>
>> Back when the Device Tree file for this board was introduced, the
>> definition was already wrong. The pinctrl driver also always described
>> as "gpo" this function for MPP7. However, between Linux 4.10 and 4.11,
>> a hog pin failing to be muxed was turned from a simple warning to a
>> hard error that caused the entire pinctrl driver probe to bail
>> out. This is probably the result of commit 6118714275f0a ("pinctrl:
>> core: Fix pinctrl_register_and_init() with pinctrl_enable()").
>>
>> This commit fixes the Device Tree to use the proper "gpo" function for
>> MPP7, which fixes the boot of OpenBlocks A7, which was broken since
>> Linux 4.11.
>>
>> Fixes: f24b56cbcd9d ("ARM: kirkwood: add support for OpenBlocks A7 platform")
>> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
>
> I just realized that my commit title isn't that great, as it doesn't
> mention the board. Something like:
>
> ARM: dts: kirkwood: fix pin-muxing of MPP7 on OpenBlocks A7
>
> would have been better.
>
> Gr?gory: let me know if you want me to send a v2, or if you can fix up
> this while applying.
>
I applied it on mvebu/fixes with this new title, as well as the reviewed-by
flag form Andrew, ands I also added the "Cc: <stable@vger.kernel.org>"
line.
Thanks,
Gregory
> Thanks!
>
> Thomas
> --
> Thomas Petazzoni, CTO, Free Electrons
> Embedded Linux and Kernel engineering
> http://free-electrons.com
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
--
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-01-05 8:55 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-04 16:53 [PATCH] ARM: dts: kirkwood: fix pin-muxing of MPP7 Thomas Petazzoni
2018-01-04 20:52 ` Andrew Lunn
2018-01-05 8:36 ` Thomas Petazzoni
2018-01-05 8:55 ` Gregory CLEMENT
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).