Skip to contentSkip to conversation

Rockchip: adapt pinctrl driver to new dts

PATCH Applied Beniamino Galvani 2 participants 4 messages Jul 24, 2014 – Sep 1, 2014

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

cover Rockchip: adapt pinctrl driver to new dts

Hi,

the dts for Rockchip rk3188 imported in commit 9313920df6d "dts:
update to v3.16-rc1" contains a change in the bindings for the pinctrl node, which now uses syscons to obtain the address of memory mapped registers.

On barebox master branch the pinctrl driver fails during the probe with the new dts and thus some pin functions are not set properly; for this reason the ethernet port doesn't work at the moment on the Radxa Rock.

The patches below fix the problem, adapting the driver to the new dts.

Beniamino

Beniamino Galvani (2):
mfd: syscon: add device tree support
pinctrl: rockchip: add support for new DT bindings

 drivers/mfd/syscon.c               |    6 ++++
 drivers/pinctrl/Kconfig            |    1 +
 drivers/pinctrl/pinctrl-rockchip.c |   53 ++++++++++++------------------------
 3 files changed, 24 insertions(+), 36 deletions(-)
Signature · 7 lines
1.7.10.4


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#1 lore raw

PATCH 1/2 mfd: syscon: add device tree support

This patch defines a OF compatible property for the syscon driver to allow it to be probed from device tree.

---
 drivers/mfd/syscon.c |    6 ++++++
 1 file changed, 6 insertions(+)
drivers/mfd/syscon.c +6 -0
index e6722e1..55cc34f 100644
@@ -95,10 +95,16 @@ static struct platform_device_id syscon_ids[] = {
 	{ }
 };
 
+static struct of_device_id of_syscon_match[] = {
+	{ .compatible = "syscon" },
+	{ },
+};
+
 static struct driver_d syscon_driver = {
 	.name		= "syscon",
 	.probe		= syscon_probe,
 	.id_table	= syscon_ids,
+	.of_compatible	= DRV_OF_COMPAT(of_syscon_match),
 };
 
 static int __init syscon_init(void)
Signature · 7 lines
1.7.10.4


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#2 lore raw

PATCH 2/2 pinctrl: rockchip: add support for new DT bindings

In reply to Beniamino Galvani

This patch modifies the Rockchip pinctrl driver to comply with the new DT bindings, which use two syscon nodes to specify the address of memory resources.

---
 drivers/pinctrl/Kconfig            |    1 +
 drivers/pinctrl/pinctrl-rockchip.c |   53 ++++++++++++------------------------
 2 files changed, 18 insertions(+), 36 deletions(-)
drivers/pinctrl/Kconfig +1 -0
index dffaa4e..83ba2b6 100644
@@ -27,6 +27,7 @@ config PINCTRL_IMX_IOMUX_V3
 config PINCTRL_ROCKCHIP
 	select PINCTRL
 	select GPIO_GENERIC
+	select MFD_SYSCON
 	bool
 	help
 	  The pinmux controller found on Rockchip SoCs.
drivers/pinctrl/pinctrl-rockchip.c +17 -36

108 lines not on this page · raw message

Signature · 7 lines
1.7.10.4


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Applied
#3 lore raw
In reply to Beniamino Galvani
Quoted 7 lines · Beniamino Galvani

Hi,

the dts for Rockchip rk3188 imported in commit 9313920df6d "dts:
update to v3.16-rc1" contains a change in the bindings for the pinctrl node, which now uses syscons to obtain the address of memory mapped registers.

Quoted 8 lines

On barebox master branch the pinctrl driver fails during the probe with the new dts and thus some pin functions are not set properly; for this reason the ethernet port doesn't work at the moment on the Radxa Rock.

The patches below fix the problem, adapting the driver to the new dts.

Beniamino

Applied, thanks.

I missed this series in my inbox, otherwise the patches would have been in the last release. Sorry for that.

Sascha

Signature · 9 lines
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox