Lines Matching +full:pg +full:- +full:gpios
1 // SPDX-License-Identifier: GPL-2.0+
17 #include "../pinctrl-utils.h"
19 #include "pinctrl-bcm63xx.h"
28 #define BCM63268_BASEMODE_NAND BIT(2) /* GPIOs 2-7, 24-31 */
30 #define BCM63268_BASEMODE_DECTPD BIT(5) /* GPIOs 8/9 */
31 #define BCM63268_BASEMODE_VDSL_PHY_0 BIT(6) /* GPIOs 10/11 */
32 #define BCM63268_BASEMODE_VDSL_PHY_1 BIT(7) /* GPIOs 12/13 */
33 #define BCM63268_BASEMODE_VDSL_PHY_2 BIT(8) /* GPIOs 24/25 */
34 #define BCM63268_BASEMODE_VDSL_PHY_3 BIT(9) /* GPIOs 26/27 */
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()
535 const struct pingroup *pg = &bcm63268_groups[group]; in bcm63268_pinctrl_set_mux() local
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",