9
0
Fork 0
Commit Graph

27 Commits

Author SHA1 Message Date
Sebastian Hesselbarth 02e14a60ab pinctrl: mvebu: add pinctrl drivers for Dove and Kirkwood
This adds pinctrl drivers for Marvell Dove and Kirkwood SoCs based
on a common driver stub. This design is based on the corresponding
Linux driver and should ease additional drivers for Marvell Armada
SoCs.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-06-26 07:57:54 +02:00
Lucas Stach 8d9cbe17d3 pinctrl: tegra: add Tegra124 support
We can reuse the Tegra30 pinctrl driver, as the bit
layout is the same. Just add the pin and drivegroups
and some compile-time magic to avoid bloat.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-06-05 08:01:14 +02:00
Lucas Stach 6df813a691 pinctrl: tegra30: introduce drvdata
Access pin and drivegroups through a drvdata pointer.
This allows to insert other groups for SoCs with a
similar bit layout easily.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-06-05 08:01:14 +02:00
Sascha Hauer ad9f56888f Merge branch 'for-next/tegra' 2014-06-04 21:04:28 +02:00
Lucas Stach fd940ff651 pinctrl: tegra30: parse drive groups
These are special groups to configure pad properties
such as drive strength and slew rate for a group of
pads.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-05-15 14:17:13 +02:00
Sascha Hauer 2ab8b7513d pinctrl: i.MX iomux-v3: Print more context in error message
When a devicenode has invalid pinctrl settings then printing the
offending node helps debugging it.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-05-08 09:55:26 +02:00
Sascha Hauer 7b7631791e Merge branch 'for-next/tegra'
Conflicts:
	arch/arm/dts/tegra20-colibri.dtsi
	arch/arm/dts/tegra20-paz00.dts
	arch/arm/dts/tegra20.dtsi
	drivers/clk/tegra/clk-periph.c
2014-05-05 13:34:21 +02:00
Beniamino Galvani b28e8d7e61 pinctrl: add rockchip pinctrl and gpio drivers
Signed-off-by: Beniamino Galvani <b.galvani@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-04-29 08:15:41 +02:00
Lucas Stach f09394ab1a pinctrl: tegra: add Tegra3 driver
Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-04-23 11:39:57 +02:00
Sascha Hauer 6613e2d8fb ARM: i.MX: Make mxc_iomux_v3_setup_multiple_pads argument const
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-02-20 14:50:10 +01:00
Sascha Hauer d25cba0090 pinctrl: Add pinctrl driver for i.MX1/21/27
This turns the legacy iomux-v1 support into a full pinctrl
driver.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-01-29 11:31:31 +01:00
Jan Weitzel 87bae6ead5 pinctrl: single: select CONFIG_PINCTRL
pinctrl_register is used.

Signed-off-by: Jan Weitzel <j.weitzel@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-12-17 08:25:45 +01:00
Sascha Hauer ed039cd72b Merge branch 'for-next/omap-drivers' 2013-12-06 08:23:27 +01:00
Sascha Hauer 6d2f0d57be pinctrl: Add functions to select pinctrl from device_node
Instead of requiring a device pointer, add a functions to select
the pinctrl state based on a device node.
The AM33xx cpsw devicetree description has several subdevices with
pinctrl information attached to them. In barebox we do not handle
the subdevices as distinct devices, so the pinctrl is never configured
correctly and the mdio bus subdevice stops working. This patch makes
it possible to configure the pinctrl without having a device.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-27 10:42:53 +01:00
Sascha Hauer 26c725874b pinctrl: Add pinctrl-single driver
Based on the kernel pinctrl-single driver. This one is just enough
to make OMAP/AM33xx work.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-22 15:35:12 +01:00
Sascha Hauer b67b2671c2 treewide: Add missing includes
A lot of files rely on include/driver.h including include/of.h (and
this including include/errno.h. include the files explicitly so we can
eventually get rid of including of.h from driver.h

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-08 15:42:04 +01:00
Lucas Stach 2733d47108 pinctrl: don't allow drivers to be selected by menuconfig user
There is no much sense in having the pinctrl drivers be user selectable
as all arches using on of them already selects the right one.

So to avoid presenting the user with the choice to enable unrelated
pinctrl drivers or pushing lots of dependencies into the Kconfig just
drop the configurability.

Reported-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-10-31 08:49:57 +01:00
Sascha Hauer 8afe2cb4d4 Merge branch 'for-next-manual/oftree-linux-sync' 2013-07-02 07:08:46 +02:00
Sascha Hauer acb28bb881 pinctrl: imx-iomux-v3: Add imx6dl compatible entry
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-25 16:01:45 +02:00
Sebastian Hesselbarth 905f3ee7fb OF: base: sync of_find_property with linux OF API
To start synchronizing OF API of barebox with linux OF API, this adds
a length pointer to of_find_property. Also all current users of that
function are updated to reflect the API change.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
2013-06-20 17:18:01 +02:00
Sascha Hauer 7925ab2d72 Merge branch 'for-next/tegra' 2013-06-02 16:28:34 +02:00
Sascha Hauer 4b77e455a5 pinctrl: imx-iomux-v3: only register pinctrl when device node is available
The pinctrl support is devicetree only, so only register it
when we actually have a devicetree. Otherwise we crash boards
using the iomux-v3 from platform code in pinctrl_register().

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-05-21 09:35:11 +02:00
Lucas Stach 373909ce87 tegra20: add pinctrl driver
This adds a pinctrl driver for the Tegra 20 line of SoCs. It only
supports the three basic pinconfiguration settings function mux,
tristate control and pullup/down control.

The driver understands the same devicetree bindings as the Linux one,
unimplemented pinconfiguration options will be ignored.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-05-12 09:59:41 +02:00
Sascha Hauer 32dc070fd4 pinctrl: move imx-iomux-v1 to drivers/pinctrl/
For consistency reasons.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-23 09:48:25 +02:00
Sascha Hauer e2f9687c02 pinctrl: move imx-iomux-v2 to drivers/pinctrl/
For consistency reasons.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-23 09:47:24 +02:00
Sascha Hauer e20ee612d8 pinctrl: switch i.MX iomux-v3 support to pinctrl
This switches the iomux-v3 (found on i.MX25,35,51,53,6) to pinctrl
support. The old SoC specific API is kept for compatibility. The
pinctrl devicetree support is enabled automatically when OFDEVICE
support is available.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-23 09:46:32 +02:00
Sascha Hauer 7f63c0a246 Add initial pinctrl support
This is a massively stripped down pinctrl support. The upper API
consists of only of:

int pinctrl_select_state(struct device_d *dev, const char *state);

This is used to setup the pinmux for a device to a certain state.
This function normally does not need to be called manually. The
device core will setup the default state before probing a device.

The pinctrl core has the job of handling the devicetree. It parses
the pinctrl phandles for a device from devicetree, finds the correct
pinctrl device and calls its set_state callback with the pinctrl
setup device node.

The simplicity of this pinctrl framework comes from the fact that
we:

- Limit usage to devicetree only for now. For non devicetree use the
  old legacy SoC specific APIs still can be used.
- Do not parse the devicetree into internal data structures which
  are used by the drivers later. This adds the overhead that we
  may parse the devicetree multiple times for more dynamic setups,
  but on the other hand we do not need to parse devices from the
  devicetree we don't use in barebox
- Do not detect resource conflicts. Since the framework mainly is
  a devicetree parser this would be hard to implement. It should
  be easy for board maintainers to avoid resource conflicts though.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-23 09:36:13 +02:00