Lines Matching +full:ep9312 +full:- +full:pata

1 // SPDX-License-Identifier: GPL-2.0-only
4 * based on linux/drivers/pinctrl/pinmux-gemini.c
8 * This is a group-only pin controller.
23 #include <linux/pinctrl/pinconf-generic.h>
28 #include "pinctrl-utils.h"
30 #define DRIVER_NAME "pinctrl-ep93xx"
49 struct ep93xx_regmap_adev *aux = pmx->aux_dev; in ep93xx_pinctrl_update_bits()
51 aux->update_bits(aux->map, aux->lock, reg, mask, val); in ep93xx_pinctrl_update_bits()
73 * descriptions of the registers, “DeviceCfg” on page 5-25 and “SysCfg” on page 5-34, for a
340 * Note: The EP9301, EP9302, EP9312, and EP9315 processors each have two PWMs with
679 /* I can't find info on those - it's some internal state */
732 /* ep9312, ep9315 */
1183 switch (pmx->model) { in ep93xx_get_groups_count()
1200 switch (pmx->model) { in ep93xx_get_group_name()
1219 switch (pmx->model) { in ep93xx_get_group_pins()
1233 return -EINVAL; in ep93xx_get_group_pins()
1263 PINCTRL_PINFUNCTION("pata", idegrps, ARRAY_SIZE(idegrps)),
1281 switch (pmx->model) { in ep93xx_pmx_set_mux()
1292 dev_err(pmx->dev, "invalid SoC type\n"); in ep93xx_pmx_set_mux()
1293 return -ENODEV; in ep93xx_pmx_set_mux()
1298 dev_dbg(pmx->dev, in ep93xx_pmx_set_mux()
1300 func->name, grp->grp.name, grp->mask, grp->value); in ep93xx_pmx_set_mux()
1302 regmap_read(pmx->map, EP93XX_SYSCON_DEVCFG, &before); in ep93xx_pmx_set_mux()
1304 grp->mask, grp->value); in ep93xx_pmx_set_mux()
1305 regmap_read(pmx->map, EP93XX_SYSCON_DEVCFG, &after); in ep93xx_pmx_set_mux()
1307 dev_dbg(pmx->dev, "before=0x%x, after=0x%x, mask=0x%lx\n", in ep93xx_pmx_set_mux()
1313 expected = before & ~grp->mask; in ep93xx_pmx_set_mux()
1314 expected |= grp->value; in ep93xx_pmx_set_mux()
1322 dev_err(pmx->dev, in ep93xx_pmx_set_mux()
1325 dev_err(pmx->dev, in ep93xx_pmx_set_mux()
1330 return tmp ? -EINVAL : 0; in ep93xx_pmx_set_mux()
1372 struct device *dev = &adev->dev; in ep93xx_pmx_probe()
1378 return -ENOMEM; in ep93xx_pmx_probe()
1380 pmx->dev = dev; in ep93xx_pmx_probe()
1381 pmx->map = rdev->map; in ep93xx_pmx_probe()
1382 pmx->aux_dev = rdev; in ep93xx_pmx_probe()
1383 pmx->model = (enum ep93xx_pinctrl_model)(uintptr_t)id->driver_data; in ep93xx_pmx_probe()
1384 switch (pmx->model) { in ep93xx_pmx_probe()
1401 return dev_err_probe(dev, -EINVAL, "unknown pin control model: %u\n", pmx->model); in ep93xx_pmx_probe()
1405 device_set_node(dev, dev_fwnode(adev->dev.parent)); in ep93xx_pmx_probe()
1406 pmx->pctl = devm_pinctrl_register(dev, &ep93xx_pmx_desc, pmx); in ep93xx_pmx_probe()
1407 if (IS_ERR(pmx->pctl)) in ep93xx_pmx_probe()
1408 return dev_err_probe(dev, PTR_ERR(pmx->pctl), "could not register pinmux driver\n"); in ep93xx_pmx_probe()
1415 .name = "soc_ep93xx.pinctrl-ep9301",
1419 .name = "soc_ep93xx.pinctrl-ep9307",
1423 .name = "soc_ep93xx.pinctrl-ep9312",