Lines Matching +full:bcm63268 +full:- +full:pinctrl

1 // SPDX-License-Identifier: GPL-2.0+
3 * Driver for BCM63268 GPIO unit (pinctrl + GPIO)
13 #include <linux/pinctrl/pinmux.h>
17 #include "../pinctrl-utils.h"
19 #include "pinctrl-bcm63xx.h"
28 #define BCM63268_BASEMODE_NAND BIT(2) /* GPIOs 2-7, 24-31 */
510 unsigned int basemode = (unsigned long) desc->drv_data; in bcm63268_set_gpio()
514 regmap_update_bits(pc->regs, BCM63268_BASEMODE_REG, basemode, in bcm63268_set_gpio()
519 regmap_update_bits(pc->regs, BCM63268_MODE_REG, mask, 0); in bcm63268_set_gpio()
521 /* pins 0-23 might be muxed to led */ in bcm63268_set_gpio()
523 regmap_update_bits(pc->regs, BCM63268_LED_REG, mask, in bcm63268_set_gpio()
527 regmap_update_bits(pc->regs, BCM63268_CTRL_REG, mask, mask); in bcm63268_set_gpio()
541 for (i = 0; i < pg->npins; i++) in bcm63268_pinctrl_set_mux()
542 bcm63268_set_gpio(pc, pg->pins[i]); in bcm63268_pinctrl_set_mux()
544 switch (f->reg) { in bcm63268_pinctrl_set_mux()
547 mask = BIT(pg->pins[0]); in bcm63268_pinctrl_set_mux()
548 val = BIT(pg->pins[0]); in bcm63268_pinctrl_set_mux()
552 mask = BIT(pg->pins[0]); in bcm63268_pinctrl_set_mux()
553 val = BIT(pg->pins[0]); in bcm63268_pinctrl_set_mux()
557 mask = BIT(pg->pins[0]); in bcm63268_pinctrl_set_mux()
562 mask = f->mask; in bcm63268_pinctrl_set_mux()
563 val = f->mask; in bcm63268_pinctrl_set_mux()
567 return -EINVAL; in bcm63268_pinctrl_set_mux()
570 regmap_update_bits(pc->regs, reg, mask, val); in bcm63268_pinctrl_set_mux()
618 { .compatible = "brcm,bcm63268-pinctrl", },
625 .name = "bcm63268-pinctrl",