Lines Matching +full:mdio +full:- +full:mux +full:- +full:multiplexer

1 // SPDX-License-Identifier: GPL-2.0-only
3 * linux/drivers/pinctrl/pinmux-falcon.c
4 * based on linux/drivers/pinctrl/pinmux-pxa910.c
22 #include "pinctrl-lantiq.h"
26 /* Multiplexer Control Register */
66 .mux = FALCON_MUX_##m, \
114 MFP_FALCON(GPIO7, MDIO, GPIO, NONE, NONE),
115 MFP_FALCON(GPIO8, MDIO, GPIO, NONE, NONE),
187 GRP_MUX("mdio", MDIO, pins_mdio),
202 static const char * const ltq_mdio_grps[] = {"mdio"};
214 {"mdio", ARRAY_AND_SIZE(ltq_mdio_grps)},
227 /* --------- pinconf related code --------- */
231 return -ENOTSUPP; in falcon_pinconf_group_get()
238 return -ENOTSUPP; in falcon_pinconf_group_set()
246 void __iomem *mem = info->membase[PORT(pin)]; in falcon_pinconf_get()
270 return -ENOTSUPP; in falcon_pinconf_get()
283 void __iomem *mem = info->membase[PORT(pin)]; in falcon_pinconf_set()
310 return -ENOTSUPP; in falcon_pinconf_set()
315 return -ENOTSUPP; in falcon_pinconf_set()
330 seq_printf(s, " (port %d) mux %d -- ", port, in falcon_pinconf_dbg_show()
331 pad_r32(info->membase[port], LTQ_PADC_MUX(PORT_PIN(offset)))); in falcon_pinconf_dbg_show()
340 seq_printf(s, "drive-current %d ", in falcon_pinconf_dbg_show()
345 seq_printf(s, "slew-rate %d ", in falcon_pinconf_dbg_show()
350 if (desc->gpio_owner) in falcon_pinconf_dbg_show()
351 seq_printf(s, " owner: %s", desc->gpio_owner); in falcon_pinconf_dbg_show()
378 int mfp, int mux) in falcon_mux_apply() argument
381 int port = PORT(info->mfp[mfp].pin); in falcon_mux_apply()
383 if ((port >= PORTS) || (!info->membase[port])) in falcon_mux_apply()
384 return -ENODEV; in falcon_mux_apply()
386 pad_w32(info->membase[port], mux, in falcon_mux_apply()
387 LTQ_PADC_MUX(PORT_PIN(info->mfp[mfp].pin))); in falcon_mux_apply()
393 {"lantiq,drive-current", LTQ_PINCONF_PARAM_DRIVE_CURRENT},
394 {"lantiq,slew-rate", LTQ_PINCONF_PARAM_SLEW_RATE},
407 /* --------- register the pinctrl layer --------- */
414 return -EINVAL; in pinctrl_falcon_get_range_size()
433 for_each_compatible_node(np, NULL, "lantiq,pad-falcon") { in pinctrl_falcon_probe()
450 dev_err(&pdev->dev, "failed to find pad pdev\n"); in pinctrl_falcon_probe()
454 falcon_info.clk[*bank] = clk_get(&ppdev->dev, NULL); in pinctrl_falcon_probe()
455 put_device(&ppdev->dev); in pinctrl_falcon_probe()
457 dev_err(&ppdev->dev, "failed to get clock\n"); in pinctrl_falcon_probe()
461 falcon_info.membase[*bank] = devm_ioremap_resource(&pdev->dev, in pinctrl_falcon_probe()
474 dev_dbg(&pdev->dev, "found %s with %d pads\n", in pinctrl_falcon_probe()
477 dev_dbg(&pdev->dev, "found a total of %d pads\n", pad_count); in pinctrl_falcon_probe()
478 falcon_pctrl_desc.name = dev_name(&pdev->dev); in pinctrl_falcon_probe()
490 dev_info(&pdev->dev, "Init done\n"); in pinctrl_falcon_probe()
495 { .compatible = "lantiq,pinctrl-falcon" },
503 .name = "pinctrl-falcon",