Lines Matching +full:bcm63xx +full:- +full:gpio
1 // SPDX-License-Identifier: GPL-2.0+
3 * Driver for BCM6362 GPIO unit (pinctrl + GPIO)
10 #include <linux/gpio/driver.h>
17 #include "../pinctrl-utils.h"
19 #include "pinctrl-bcm63xx.h"
486 unsigned int basemode = (uintptr_t)desc->drv_data; in bcm6362_set_gpio()
490 regmap_update_bits(pc->regs, BCM6362_BASEMODE_REG, basemode, 0); in bcm6362_set_gpio()
493 /* base mode 0 => gpio 1 => mux function */ in bcm6362_set_gpio()
494 regmap_update_bits(pc->regs, BCM6362_MODE_REG, mask, 0); in bcm6362_set_gpio()
496 /* pins 0-23 might be muxed to led */ in bcm6362_set_gpio()
498 regmap_update_bits(pc->regs, BCM6362_LED_REG, mask, 0); in bcm6362_set_gpio()
500 /* ctrl reg 0 => wifi function 1 => gpio */ in bcm6362_set_gpio()
501 regmap_update_bits(pc->regs, BCM6362_CTRL_REG, mask, mask); in bcm6362_set_gpio()
515 for (i = 0; i < pg->npins; i++) in bcm6362_pinctrl_set_mux()
516 bcm6362_set_gpio(pc, pg->pins[i]); in bcm6362_pinctrl_set_mux()
518 switch (f->reg) { in bcm6362_pinctrl_set_mux()
521 mask = BIT(pg->pins[0]); in bcm6362_pinctrl_set_mux()
522 val = BIT(pg->pins[0]); in bcm6362_pinctrl_set_mux()
526 mask = BIT(pg->pins[0]); in bcm6362_pinctrl_set_mux()
527 val = BIT(pg->pins[0]); in bcm6362_pinctrl_set_mux()
531 mask = BIT(pg->pins[0]); in bcm6362_pinctrl_set_mux()
536 mask = f->basemode_mask; in bcm6362_pinctrl_set_mux()
537 val = f->basemode_mask; in bcm6362_pinctrl_set_mux()
541 return -EINVAL; in bcm6362_pinctrl_set_mux()
544 regmap_update_bits(pc->regs, reg, mask, val); in bcm6362_pinctrl_set_mux()
592 { .compatible = "brcm,bcm6362-pinctrl", },
599 .name = "bcm6362-pinctrl",