diff --git a/target/linux/bcm27xx/patches-5.4/950-0316-pinctrl-bcm2835-Add-support-for-BCM2711-pull-up-func.patch b/target/linux/bcm27xx/patches-5.4/950-0316-pinctrl-bcm2835-Add-support-for-BCM2711-pull-up-func.patch deleted file mode 100644 index 2ad17cb17..000000000 --- a/target/linux/bcm27xx/patches-5.4/950-0316-pinctrl-bcm2835-Add-support-for-BCM2711-pull-up-func.patch +++ /dev/null @@ -1,40 +0,0 @@ -From cf658ebc86b3e22c0b77e136fbbf19b580c7c256 Mon Sep 17 00:00:00 2001 -From: Stefan Wahren -Date: Sun, 21 Jul 2019 16:01:36 +0200 -Subject: [PATCH] pinctrl: bcm2835: Add support for BCM2711 pull-up - functionality - -commit e38a9a437fb93ddafab5030165e4c6a3a5021669 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 -Acked-by: Eric Anholt ---- - drivers/pinctrl/bcm/pinctrl-bcm2835.c | 6 ++++++ - 1 file changed, 6 insertions(+) - ---- a/drivers/pinctrl/bcm/pinctrl-bcm2835.c -+++ b/drivers/pinctrl/bcm/pinctrl-bcm2835.c -@@ -1168,6 +1168,12 @@ static int bcm2835_pinctrl_probe(struct - (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); diff --git a/target/linux/bcm27xx/patches-5.4/950-0328-Revert-pinctrl-bcm2835-Pass-irqchip-when-adding-gpio.patch b/target/linux/bcm27xx/patches-5.4/950-0328-Revert-pinctrl-bcm2835-Pass-irqchip-when-adding-gpio.patch deleted file mode 100644 index f2cf28433..000000000 --- a/target/linux/bcm27xx/patches-5.4/950-0328-Revert-pinctrl-bcm2835-Pass-irqchip-when-adding-gpio.patch +++ /dev/null @@ -1,107 +0,0 @@ -From b1d33d1e5a44afd2025c5a44a85dc2fab00ec6a7 Mon Sep 17 00:00:00 2001 -From: popcornmix -Date: Tue, 5 Nov 2019 11:28:19 +0000 -Subject: [PATCH] Revert "pinctrl: bcm2835: Pass irqchip when adding - gpiochip" - -This reverts commit 73345a18d464b1b945b29f54f630ace6873344e2. ---- - drivers/pinctrl/bcm/pinctrl-bcm2835.c | 55 +++++++++++++++------------ - 1 file changed, 30 insertions(+), 25 deletions(-) - ---- a/drivers/pinctrl/bcm/pinctrl-bcm2835.c -+++ b/drivers/pinctrl/bcm/pinctrl-bcm2835.c -@@ -78,6 +78,7 @@ - struct bcm2835_pinctrl { - struct device *dev; - void __iomem *base; -+ int irq[BCM2835_NUM_IRQS]; - - /* note: locking assumes each bank will have its own unsigned long */ - unsigned long enabled_irq_map[BCM2835_NUM_BANKS]; -@@ -381,14 +382,14 @@ static void bcm2835_gpio_irq_handler(str - int group; - int i; - -- for (i = 0; i < BCM2835_NUM_IRQS; i++) { -- if (chip->irq.parents[i] == irq) { -+ for (i = 0; i < ARRAY_SIZE(pc->irq); i++) { -+ if (pc->irq[i] == irq) { - group = i; - break; - } - } - /* This should not happen, every IRQ has a bank */ -- if (i == BCM2835_NUM_IRQS) -+ if (i == ARRAY_SIZE(pc->irq)) - BUG(); - - chained_irq_enter(host_chip, desc); -@@ -1086,7 +1087,6 @@ static int bcm2835_pinctrl_probe(struct - struct device *dev = &pdev->dev; - struct device_node *np = dev->of_node; - struct bcm2835_pinctrl *pc; -- struct gpio_irq_chip *girq; - struct resource iomem; - int err, i; - const struct of_device_id *match; -@@ -1135,33 +1135,38 @@ static int bcm2835_pinctrl_probe(struct - raw_spin_lock_init(&pc->irq_lock[i]); - } - -- girq = &pc->gpio_chip.irq; -- girq->chip = &bcm2835_gpio_irq_chip; -- girq->parent_handler = bcm2835_gpio_irq_handler; -- girq->num_parents = BCM2835_NUM_IRQS; -- girq->parents = devm_kcalloc(dev, BCM2835_NUM_IRQS, -- sizeof(*girq->parents), -- GFP_KERNEL); -- if (!girq->parents) -- return -ENOMEM; -- /* -- * Use the same handler for all groups: this is necessary -- * since we use one gpiochip to cover all lines - the -- * irq handler then needs to figure out which group and -- * bank that was firing the IRQ and look up the per-group -- * and bank data. -- */ -- for (i = 0; i < BCM2835_NUM_IRQS; i++) -- girq->parents[i] = irq_of_parse_and_map(np, i); -- girq->default_type = IRQ_TYPE_NONE; -- girq->handler = handle_level_irq; -- - err = gpiochip_add_data(&pc->gpio_chip, pc); - if (err) { - dev_err(dev, "could not add GPIO chip\n"); - return err; - } - -+ err = gpiochip_irqchip_add(&pc->gpio_chip, &bcm2835_gpio_irq_chip, -+ 0, handle_level_irq, IRQ_TYPE_NONE); -+ if (err) { -+ dev_info(dev, "could not add irqchip\n"); -+ return err; -+ } -+ -+ for (i = 0; i < BCM2835_NUM_IRQS; i++) { -+ pc->irq[i] = irq_of_parse_and_map(np, i); -+ -+ if (pc->irq[i] == 0) -+ continue; -+ -+ /* -+ * Use the same handler for all groups: this is necessary -+ * since we use one gpiochip to cover all lines - the -+ * irq handler then needs to figure out which group and -+ * bank that was firing the IRQ and look up the per-group -+ * and bank data. -+ */ -+ gpiochip_set_chained_irqchip(&pc->gpio_chip, -+ &bcm2835_gpio_irq_chip, -+ pc->irq[i], -+ bcm2835_gpio_irq_handler); -+ } -+ - match = of_match_node(bcm2835_pinctrl_match, pdev->dev.of_node); - if (match) { - bcm2835_pinctrl_desc.confops = diff --git a/target/linux/bcm27xx/patches-5.4/950-0362-pinctrl-bcm2835-Change-init-order-for-gpio-hogs.patch b/target/linux/bcm27xx/patches-5.4/950-0362-pinctrl-bcm2835-Change-init-order-for-gpio-hogs.patch deleted file mode 100644 index 3865ae11f..000000000 --- a/target/linux/bcm27xx/patches-5.4/950-0362-pinctrl-bcm2835-Change-init-order-for-gpio-hogs.patch +++ /dev/null @@ -1,88 +0,0 @@ -From 27cb8bf0442f677380a1df93b93b7589b7ce5243 Mon Sep 17 00:00:00 2001 -From: Phil Elwell -Date: Mon, 6 Jan 2020 14:05:42 +0000 -Subject: [PATCH] pinctrl: bcm2835: Change init order for gpio hogs - -pinctrl-bcm2835 is a combined pinctrl/gpio driver. Currently the gpio -side is registered first, but this breaks gpio hogs (which are -configured during gpiochip_add_data). Part of the hog initialisation -is a call to pinctrl_gpio_request, and since the pinctrl driver hasn't -yet been registered this results in an -EPROBE_DEFER from which it can -never recover. - -Change the initialisation sequence to register the pinctrl driver -first. - -See: https://www.raspberrypi.org/forums/viewtopic.php?f=107&t=260600 - -Signed-off-by: Phil Elwell ---- - drivers/pinctrl/bcm/pinctrl-bcm2835.c | 40 ++++++++++++--------------- - 1 file changed, 17 insertions(+), 23 deletions(-) - ---- a/drivers/pinctrl/bcm/pinctrl-bcm2835.c -+++ b/drivers/pinctrl/bcm/pinctrl-bcm2835.c -@@ -1135,9 +1135,25 @@ static int bcm2835_pinctrl_probe(struct - raw_spin_lock_init(&pc->irq_lock[i]); - } - -+ 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)) -+ return PTR_ERR(pc->pctl_dev); -+ -+ pc->gpio_range = bcm2835_pinctrl_gpio_range; -+ pc->gpio_range.base = pc->gpio_chip.base; -+ pc->gpio_range.gc = &pc->gpio_chip; -+ pinctrl_add_gpio_range(pc->pctl_dev, &pc->gpio_range); -+ - err = devm_gpiochip_add_data(dev, &pc->gpio_chip, pc); - if (err) { - dev_err(dev, "could not add GPIO chip\n"); -+ pinctrl_remove_gpio_range(pc->pctl_dev, &pc->gpio_range); - return err; - } - -@@ -1145,6 +1161,7 @@ static int bcm2835_pinctrl_probe(struct - 0, handle_level_irq, IRQ_TYPE_NONE); - if (err) { - dev_info(dev, "could not add irqchip\n"); -+ pinctrl_remove_gpio_range(pc->pctl_dev, &pc->gpio_range); - return err; - } - -@@ -1167,29 +1184,6 @@ static int bcm2835_pinctrl_probe(struct - bcm2835_gpio_irq_handler); - } - -- match = of_match_node(bcm2835_pinctrl_match, pdev->dev.of_node); -- if (match) { -- bcm2835_pinctrl_desc.confops = -- (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); -- return PTR_ERR(pc->pctl_dev); -- } -- -- pc->gpio_range = bcm2835_pinctrl_gpio_range; -- pc->gpio_range.base = pc->gpio_chip.base; -- pc->gpio_range.gc = &pc->gpio_chip; -- pinctrl_add_gpio_range(pc->pctl_dev, &pc->gpio_range); -- - return 0; - } -