summaryrefslogtreecommitdiffstats
path: root/target/linux/mvebu
diff options
context:
space:
mode:
authorJohn Audia <therealgraysky@proton.me>2023-11-28 17:08:16 -0500
committerHauke Mehrtens <hauke@hauke-m.de>2023-11-29 23:41:33 +0100
commit6c118efc01a65c064934ec41b8108cb45e00c128 (patch)
treebf1b243af4e4c5152c3189fa3126a9723033c711 /target/linux/mvebu
parentc20bedf1f59712f6380a8e184b6ca0bb635d22e6 (diff)
downloadopenwrt-6c118efc01a65c064934ec41b8108cb45e00c128.tar.gz
openwrt-6c118efc01a65c064934ec41b8108cb45e00c128.tar.bz2
openwrt-6c118efc01a65c064934ec41b8108cb45e00c128.zip
kernel: bump 5.15 to 5.15.140
Changelog: https://cdn.kernel.org/pub/linux/kernel/v5.x/ChangeLog-5.15.140 Removed upstreamed: mvebu/patches-5.15/106-Revert-i2c-pxa-move-to-generic-GPIO-recovery.patch[1] All other patches automatically rebased. 1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.140&id=06d320ca170b4e59bb261e2ce3ffe84e9154d42b Build system: x86_64 Build-tested: ramips/tplink_archer-a6-v3 Run-tested: ramips/tplink_archer-a6-v3 Signed-off-by: John Audia <therealgraysky@proton.me>
Diffstat (limited to 'target/linux/mvebu')
-rw-r--r--target/linux/mvebu/patches-5.15/106-Revert-i2c-pxa-move-to-generic-GPIO-recovery.patch139
1 files changed, 0 insertions, 139 deletions
diff --git a/target/linux/mvebu/patches-5.15/106-Revert-i2c-pxa-move-to-generic-GPIO-recovery.patch b/target/linux/mvebu/patches-5.15/106-Revert-i2c-pxa-move-to-generic-GPIO-recovery.patch
deleted file mode 100644
index 7a0dc15ff6..0000000000
--- a/target/linux/mvebu/patches-5.15/106-Revert-i2c-pxa-move-to-generic-GPIO-recovery.patch
+++ /dev/null
@@ -1,139 +0,0 @@
-From ea8444b6fa5955c16b713dc83310882b93b44e62 Mon Sep 17 00:00:00 2001
-From: Robert Marko <robert.marko@sartura.hr>
-Date: Fri, 10 Nov 2023 10:10:29 +0100
-Subject: [PATCH] Revert "i2c: pxa: move to generic GPIO recovery"
-
-This reverts commit 0b01392c18b9993a584f36ace1d61118772ad0ca.
-
-Conversion of PXA to generic I2C recovery, makes the I2C bus completely
-lock up if recovery pinctrl is present in the DT and I2C recovery is
-enabled.
-
-So, until the generic I2C recovery can also work with PXA lets revert
-to have working I2C and I2C recovery again.
-
-Signed-off-by: Robert Marko <robert.marko@sartura.hr>
-Cc: stable@vger.kernel.org # 5.11+
----
- drivers/i2c/busses/i2c-pxa.c | 76 ++++++++++++++++++++++++++++++++----
- 1 file changed, 68 insertions(+), 8 deletions(-)
-
---- a/drivers/i2c/busses/i2c-pxa.c
-+++ b/drivers/i2c/busses/i2c-pxa.c
-@@ -264,6 +264,9 @@ struct pxa_i2c {
- u32 hs_mask;
-
- struct i2c_bus_recovery_info recovery;
-+ struct pinctrl *pinctrl;
-+ struct pinctrl_state *pinctrl_default;
-+ struct pinctrl_state *pinctrl_recovery;
- };
-
- #define _IBMR(i2c) ((i2c)->reg_ibmr)
-@@ -1302,12 +1305,13 @@ static void i2c_pxa_prepare_recovery(str
- */
- gpiod_set_value(i2c->recovery.scl_gpiod, ibmr & IBMR_SCLS);
- gpiod_set_value(i2c->recovery.sda_gpiod, ibmr & IBMR_SDAS);
-+
-+ WARN_ON(pinctrl_select_state(i2c->pinctrl, i2c->pinctrl_recovery));
- }
-
- static void i2c_pxa_unprepare_recovery(struct i2c_adapter *adap)
- {
- struct pxa_i2c *i2c = adap->algo_data;
-- struct i2c_bus_recovery_info *bri = adap->bus_recovery_info;
- u32 isr;
-
- /*
-@@ -1321,7 +1325,7 @@ static void i2c_pxa_unprepare_recovery(s
- i2c_pxa_do_reset(i2c);
- }
-
-- WARN_ON(pinctrl_select_state(bri->pinctrl, bri->pins_default));
-+ WARN_ON(pinctrl_select_state(i2c->pinctrl, i2c->pinctrl_default));
-
- dev_dbg(&i2c->adap.dev, "recovery: IBMR 0x%08x ISR 0x%08x\n",
- readl(_IBMR(i2c)), readl(_ISR(i2c)));
-@@ -1343,20 +1347,76 @@ static int i2c_pxa_init_recovery(struct
- if (IS_ENABLED(CONFIG_I2C_PXA_SLAVE))
- return 0;
-
-- bri->pinctrl = devm_pinctrl_get(dev);
-- if (PTR_ERR(bri->pinctrl) == -ENODEV) {
-- bri->pinctrl = NULL;
-+ i2c->pinctrl = devm_pinctrl_get(dev);
-+ if (PTR_ERR(i2c->pinctrl) == -ENODEV)
-+ i2c->pinctrl = NULL;
-+ if (IS_ERR(i2c->pinctrl))
-+ return PTR_ERR(i2c->pinctrl);
-+
-+ if (!i2c->pinctrl)
-+ return 0;
-+
-+ i2c->pinctrl_default = pinctrl_lookup_state(i2c->pinctrl,
-+ PINCTRL_STATE_DEFAULT);
-+ i2c->pinctrl_recovery = pinctrl_lookup_state(i2c->pinctrl, "recovery");
-+
-+ if (IS_ERR(i2c->pinctrl_default) || IS_ERR(i2c->pinctrl_recovery)) {
-+ dev_info(dev, "missing pinmux recovery information: %ld %ld\n",
-+ PTR_ERR(i2c->pinctrl_default),
-+ PTR_ERR(i2c->pinctrl_recovery));
-+ return 0;
-+ }
-+
-+ /*
-+ * Claiming GPIOs can influence the pinmux state, and may glitch the
-+ * I2C bus. Do this carefully.
-+ */
-+ bri->scl_gpiod = devm_gpiod_get(dev, "scl", GPIOD_OUT_HIGH_OPEN_DRAIN);
-+ if (bri->scl_gpiod == ERR_PTR(-EPROBE_DEFER))
-+ return -EPROBE_DEFER;
-+ if (IS_ERR(bri->scl_gpiod)) {
-+ dev_info(dev, "missing scl gpio recovery information: %pe\n",
-+ bri->scl_gpiod);
-+ return 0;
-+ }
-+
-+ /*
-+ * We have SCL. Pull SCL low and wait a bit so that SDA glitches
-+ * have no effect.
-+ */
-+ gpiod_direction_output(bri->scl_gpiod, 0);
-+ udelay(10);
-+ bri->sda_gpiod = devm_gpiod_get(dev, "sda", GPIOD_OUT_HIGH_OPEN_DRAIN);
-+
-+ /* Wait a bit in case of a SDA glitch, and then release SCL. */
-+ udelay(10);
-+ gpiod_direction_output(bri->scl_gpiod, 1);
-+
-+ if (bri->sda_gpiod == ERR_PTR(-EPROBE_DEFER))
-+ return -EPROBE_DEFER;
-+
-+ if (IS_ERR(bri->sda_gpiod)) {
-+ dev_info(dev, "missing sda gpio recovery information: %pe\n",
-+ bri->sda_gpiod);
- return 0;
- }
-- if (IS_ERR(bri->pinctrl))
-- return PTR_ERR(bri->pinctrl);
-
- bri->prepare_recovery = i2c_pxa_prepare_recovery;
- bri->unprepare_recovery = i2c_pxa_unprepare_recovery;
-+ bri->recover_bus = i2c_generic_scl_recovery;
-
- i2c->adap.bus_recovery_info = bri;
-
-- return 0;
-+ /*
-+ * Claiming GPIOs can change the pinmux state, which confuses the
-+ * pinctrl since pinctrl's idea of the current setting is unaffected
-+ * by the pinmux change caused by claiming the GPIO. Work around that
-+ * by switching pinctrl to the GPIO state here. We do it this way to
-+ * avoid glitching the I2C bus.
-+ */
-+ pinctrl_select_state(i2c->pinctrl, i2c->pinctrl_recovery);
-+
-+ return pinctrl_select_state(i2c->pinctrl, i2c->pinctrl_default);
- }
-
- static int i2c_pxa_probe(struct platform_device *dev)