summaryrefslogtreecommitdiff
path: root/drivers/pinctrl/meson/pinctrl-meson-axg-pmx.c
diff options
context:
space:
mode:
authorJerome Brunet <jbrunet@baylibre.com>2019-01-04 15:44:34 +0100
committerNeil Armstrong <narmstrong@baylibre.com>2019-01-29 11:19:15 +0100
commitc4c726c26bdc09a2c907e230fdf6c75adcc2b674 (patch)
treeca4a219ea5f9de454affb89f2b8639693f3f33e1 /drivers/pinctrl/meson/pinctrl-meson-axg-pmx.c
parent0da90255083681a02b24528f80da9d4062ff634a (diff)
pinctrl: meson: add pinconf support
Adding pinconf support is necessary to enable boot from SPI without breaking the eMMC. When booting from SPI, the ROM code leave pull downs on the eMMC pad. We need to set pinconf provided in DT to solve this Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> [narmstrong: added missing comma in pinctrl-meson-axg-pmx.c]
Diffstat (limited to 'drivers/pinctrl/meson/pinctrl-meson-axg-pmx.c')
-rw-r--r--drivers/pinctrl/meson/pinctrl-meson-axg-pmx.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/pinctrl/meson/pinctrl-meson-axg-pmx.c b/drivers/pinctrl/meson/pinctrl-meson-axg-pmx.c
index c82413d08f..f23b188f2f 100644
--- a/drivers/pinctrl/meson/pinctrl-meson-axg-pmx.c
+++ b/drivers/pinctrl/meson/pinctrl-meson-axg-pmx.c
@@ -93,6 +93,12 @@ static int meson_axg_pinmux_group_set(struct udevice *dev,
return 0;
}
+const struct pinconf_param meson_axg_pinconf_params[] = {
+ { "bias-disable", PIN_CONFIG_BIAS_DISABLE, 0 },
+ { "bias-pull-up", PIN_CONFIG_BIAS_PULL_UP, 1 },
+ { "bias-pull-down", PIN_CONFIG_BIAS_PULL_DOWN, 1 },
+};
+
const struct pinctrl_ops meson_axg_pinctrl_ops = {
.get_groups_count = meson_pinctrl_get_groups_count,
.get_group_name = meson_pinctrl_get_group_name,
@@ -100,6 +106,10 @@ const struct pinctrl_ops meson_axg_pinctrl_ops = {
.get_function_name = meson_pinmux_get_function_name,
.pinmux_group_set = meson_axg_pinmux_group_set,
.set_state = pinctrl_generic_set_state,
+ .pinconf_params = meson_axg_pinconf_params,
+ .pinconf_num_params = ARRAY_SIZE(meson_axg_pinconf_params),
+ .pinconf_set = meson_pinconf_set,
+ .pinconf_group_set = meson_pinconf_group_set,
};
static int meson_axg_gpio_request(struct udevice *dev,