1 From cf658ebc86b3e22c0b77e136fbbf19b580c7c256 Mon Sep 17 00:00:00 2001
2 From: Stefan Wahren <wahrenst@gmx.net>
3 Date: Sun, 21 Jul 2019 16:01:36 +0200
4 Subject: [PATCH] pinctrl: bcm2835: Add support for BCM2711 pull-up
7 commit e38a9a437fb93ddafab5030165e4c6a3a5021669 upstream.
9 The BCM2711 has a new way of selecting the pull-up/pull-down setting
10 for a GPIO pin. The registers used for the BCM2835, GP_PUD and
11 GP_PUDCLKn0, are no longer connected. A new set of registers,
12 GP_GPIO_PUP_PDN_CNTRL_REGx must be used. This commit will add
13 a new compatible string "brcm,bcm2711-gpio" and the kernel
14 driver will use it to select which method is used to select
17 This patch based on a patch by Al Cooper which was intended for the
18 BCM7211. This is a bugfixed and improved version.
20 Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
21 Acked-by: Eric Anholt <eric@anholt.net>
23 drivers/pinctrl/bcm/pinctrl-bcm2835.c | 6 ++++++
24 1 file changed, 6 insertions(+)
26 --- a/drivers/pinctrl/bcm/pinctrl-bcm2835.c
27 +++ b/drivers/pinctrl/bcm/pinctrl-bcm2835.c
28 @@ -1168,6 +1168,12 @@ static int bcm2835_pinctrl_probe(struct
29 (const struct pinconf_ops *)match->data;
32 + match = of_match_node(bcm2835_pinctrl_match, pdev->dev.of_node);
34 + bcm2835_pinctrl_desc.confops =
35 + (const struct pinconf_ops *)match->data;
38 pc->pctl_dev = devm_pinctrl_register(dev, &bcm2835_pinctrl_desc, pc);
39 if (IS_ERR(pc->pctl_dev)) {
40 gpiochip_remove(&pc->gpio_chip);