]> git.baikalelectronics.ru Git - kernel.git/commit
pinctrl: armada-37xx: Fix the pin 23 on south bridge
authorGregory CLEMENT <gregory.clement@free-electrons.com>
Tue, 1 Aug 2017 15:57:19 +0000 (17:57 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Mon, 7 Aug 2017 11:54:21 +0000 (13:54 +0200)
commita489f0a4f872949e9cf2e68f9ff72c19f55ae21d
tree2bb805de390afe0b98aa4cb70fdf326872e60b47
parente99223346a3001d6d580a0e1ce41de1f1fefc5a1
pinctrl: armada-37xx: Fix the pin 23 on south bridge

Pin 23 on South bridge does not belong to the rgmii group. It belongs to
a separate group which can have 3 functions.

Due to this the fix also have to update the way the functions are
managed. Until now each groups used NB_FUNCS(which was 2) functions. For
the mpp23, 3 functions are available but it is the only group which needs
it, so on the loop involving NB_FUNCS an extra test was added to handle
only the functions added.

The bug was visible with the merge of the commit 419202a15ffb "arm64:
dts: marvell: armada-3720-db: Add vqmmc regulator for SD slot", the gpio
regulator used the gpio 23, due to this the whole rgmii group was setup
to gpio which broke the Ethernet support on the Armada 3720 DB
board. Thanks to this patch, the UHS SD cards (which need the vqmmc)
_and_ the Ethernet work again.

Cc: stable@vger.kernel.org
Fixes: d50be3f1a96d ("pinctrl: armada-37xx: Add pin controller support
for Armada 37xx")
Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/mvebu/pinctrl-armada-37xx.c