Skip to content

Commit

Permalink
pinctrl: bcm2835: Add support for BCM2711 pull-up functionality
Browse files Browse the repository at this point in the history
commit e38a9a4 upstream.

The BCM2711 has a new way of selecting the pull-up/pull-down setting
for a GPIO pin. The registers used for the BCM2835, GP_PUD and
GP_PUDCLKn0, are no longer connected. A new set of registers,
GP_GPIO_PUP_PDN_CNTRL_REGx must be used. This commit will add
a new compatible string "brcm,bcm2711-gpio" and the kernel
driver will use it to select which method is used to select
pull-up/pull-down.

This patch based on a patch by Al Cooper which was intended for the
BCM7211. This is a bugfixed and improved version.

Signed-off-by: Stefan Wahren <[email protected]>
Acked-by: Eric Anholt <[email protected]>
  • Loading branch information
lategoodbye authored and popcornmix committed Nov 18, 2019
1 parent e8e72ac commit 0fd5ad4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/pinctrl/bcm/pinctrl-bcm2835.c
Original file line number Diff line number Diff line change
Expand Up @@ -1168,6 +1168,12 @@ static int bcm2835_pinctrl_probe(struct platform_device *pdev)
(const struct pinconf_ops *)match->data;
}

match = of_match_node(bcm2835_pinctrl_match, pdev->dev.of_node);
if (match) {
bcm2835_pinctrl_desc.confops =
(const struct pinconf_ops *)match->data;
}

pc->pctl_dev = devm_pinctrl_register(dev, &bcm2835_pinctrl_desc, pc);
if (IS_ERR(pc->pctl_dev)) {
gpiochip_remove(&pc->gpio_chip);
Expand Down

0 comments on commit 0fd5ad4

Please sign in to comment.