From 4dde684f9c29bd53da84e59ab54528b776117160 Mon Sep 17 00:00:00 2001 From: Sasha Levin Date: Thu, 27 Jun 2024 14:51:39 -0400 Subject: [PATCH] Fixes for 6.1 Signed-off-by: Sasha Levin --- ...atmel-at91sam-correct-path-to-i2c-co.patch | 39 +++++ ...dt-bindings-i2c-drop-unneeded-quotes.patch | 157 ++++++++++++++++++ ...i-lantiq-restore-reset-gpio-polarity.patch | 73 ++++++++ queue-6.1/series | 3 + 4 files changed, 272 insertions(+) create mode 100644 queue-6.1/dt-bindings-i2c-atmel-at91sam-correct-path-to-i2c-co.patch create mode 100644 queue-6.1/dt-bindings-i2c-drop-unneeded-quotes.patch create mode 100644 queue-6.1/mips-pci-lantiq-restore-reset-gpio-polarity.patch diff --git a/queue-6.1/dt-bindings-i2c-atmel-at91sam-correct-path-to-i2c-co.patch b/queue-6.1/dt-bindings-i2c-atmel-at91sam-correct-path-to-i2c-co.patch new file mode 100644 index 00000000000..7ef867c214f --- /dev/null +++ b/queue-6.1/dt-bindings-i2c-atmel-at91sam-correct-path-to-i2c-co.patch @@ -0,0 +1,39 @@ +From 521b96b24753776dcb2cfb37a30dd8727385afa2 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Thu, 20 Jun 2024 13:34:49 +0200 +Subject: dt-bindings: i2c: atmel,at91sam: correct path to i2c-controller + schema + +From: Krzysztof Kozlowski + +[ Upstream commit d4e001ffeccfc128c715057e866f301ac9b95728 ] + +The referenced i2c-controller.yaml schema is provided by dtschema +package (outside of Linux kernel), so use full path to reference it. + +Cc: stable@vger.kernel.org +Fixes: 7ea75dd386be ("dt-bindings: i2c: convert i2c-at91 to json-schema") +Signed-off-by: Krzysztof Kozlowski +Reviewed-by: Conor Dooley +Signed-off-by: Andi Shyti +Signed-off-by: Sasha Levin +--- + Documentation/devicetree/bindings/i2c/atmel,at91sam-i2c.yaml | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Documentation/devicetree/bindings/i2c/atmel,at91sam-i2c.yaml b/Documentation/devicetree/bindings/i2c/atmel,at91sam-i2c.yaml +index 6adedd3ec399b..c22e459c175ab 100644 +--- a/Documentation/devicetree/bindings/i2c/atmel,at91sam-i2c.yaml ++++ b/Documentation/devicetree/bindings/i2c/atmel,at91sam-i2c.yaml +@@ -75,7 +75,7 @@ required: + - clocks + + allOf: +- - $ref: i2c-controller.yaml ++ - $ref: /schemas/i2c/i2c-controller.yaml# + - if: + properties: + compatible: +-- +2.43.0 + diff --git a/queue-6.1/dt-bindings-i2c-drop-unneeded-quotes.patch b/queue-6.1/dt-bindings-i2c-drop-unneeded-quotes.patch new file mode 100644 index 00000000000..cf79f56f2d9 --- /dev/null +++ b/queue-6.1/dt-bindings-i2c-drop-unneeded-quotes.patch @@ -0,0 +1,157 @@ +From f000750b463f0f41355783f3d36da621f97489c4 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Wed, 22 Mar 2023 12:35:29 -0500 +Subject: dt-bindings: i2c: Drop unneeded quotes + +From: Rob Herring + +[ Upstream commit fc114c75680da73c3815512d880f69cecc9a9b87 ] + +Cleanup bindings dropping unneeded quotes. Once all these are fixed, +checking for this can be enabled in yamllint. + +Signed-off-by: Rob Herring +Reviewed-by: Krzysztof Kozlowski +Reviewed-by: Neil Armstrong +Reviewed-by: Nicolas Ferre +Reviewed-by: Alain Volmat +Signed-off-by: Wolfram Sang +Stable-dep-of: d4e001ffeccf ("dt-bindings: i2c: atmel,at91sam: correct path to i2c-controller schema") +Signed-off-by: Sasha Levin +--- + Documentation/devicetree/bindings/i2c/amlogic,meson6-i2c.yaml | 4 ++-- + Documentation/devicetree/bindings/i2c/apple,i2c.yaml | 4 ++-- + Documentation/devicetree/bindings/i2c/atmel,at91sam-i2c.yaml | 2 +- + Documentation/devicetree/bindings/i2c/cdns,i2c-r1p10.yaml | 4 ++-- + Documentation/devicetree/bindings/i2c/i2c-mux-gpio.yaml | 4 ++-- + Documentation/devicetree/bindings/i2c/qcom,i2c-geni-qcom.yaml | 4 ++-- + Documentation/devicetree/bindings/i2c/st,stm32-i2c.yaml | 2 +- + .../devicetree/bindings/i2c/xlnx,xps-iic-2.00.a.yaml | 4 ++-- + 8 files changed, 14 insertions(+), 14 deletions(-) + +diff --git a/Documentation/devicetree/bindings/i2c/amlogic,meson6-i2c.yaml b/Documentation/devicetree/bindings/i2c/amlogic,meson6-i2c.yaml +index 199a354ccb970..26bed558c6b87 100644 +--- a/Documentation/devicetree/bindings/i2c/amlogic,meson6-i2c.yaml ++++ b/Documentation/devicetree/bindings/i2c/amlogic,meson6-i2c.yaml +@@ -2,8 +2,8 @@ + # Copyright 2019 BayLibre, SAS + %YAML 1.2 + --- +-$id: "http://devicetree.org/schemas/i2c/amlogic,meson6-i2c.yaml#" +-$schema: "http://devicetree.org/meta-schemas/core.yaml#" ++$id: http://devicetree.org/schemas/i2c/amlogic,meson6-i2c.yaml# ++$schema: http://devicetree.org/meta-schemas/core.yaml# + + title: Amlogic Meson I2C Controller + +diff --git a/Documentation/devicetree/bindings/i2c/apple,i2c.yaml b/Documentation/devicetree/bindings/i2c/apple,i2c.yaml +index 4ac61fec90e26..243da7003cec5 100644 +--- a/Documentation/devicetree/bindings/i2c/apple,i2c.yaml ++++ b/Documentation/devicetree/bindings/i2c/apple,i2c.yaml +@@ -1,8 +1,8 @@ + # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) + %YAML 1.2 + --- +-$id: "http://devicetree.org/schemas/i2c/apple,i2c.yaml#" +-$schema: "http://devicetree.org/meta-schemas/core.yaml#" ++$id: http://devicetree.org/schemas/i2c/apple,i2c.yaml# ++$schema: http://devicetree.org/meta-schemas/core.yaml# + + title: Apple/PASemi I2C controller + +diff --git a/Documentation/devicetree/bindings/i2c/atmel,at91sam-i2c.yaml b/Documentation/devicetree/bindings/i2c/atmel,at91sam-i2c.yaml +index ea2303c0e1431..6adedd3ec399b 100644 +--- a/Documentation/devicetree/bindings/i2c/atmel,at91sam-i2c.yaml ++++ b/Documentation/devicetree/bindings/i2c/atmel,at91sam-i2c.yaml +@@ -75,7 +75,7 @@ required: + - clocks + + allOf: +- - $ref: "i2c-controller.yaml" ++ - $ref: i2c-controller.yaml + - if: + properties: + compatible: +diff --git a/Documentation/devicetree/bindings/i2c/cdns,i2c-r1p10.yaml b/Documentation/devicetree/bindings/i2c/cdns,i2c-r1p10.yaml +index 2e95cda7262ad..7a675aa08c442 100644 +--- a/Documentation/devicetree/bindings/i2c/cdns,i2c-r1p10.yaml ++++ b/Documentation/devicetree/bindings/i2c/cdns,i2c-r1p10.yaml +@@ -1,8 +1,8 @@ + # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) + %YAML 1.2 + --- +-$id: "http://devicetree.org/schemas/i2c/cdns,i2c-r1p10.yaml#" +-$schema: "http://devicetree.org/meta-schemas/core.yaml#" ++$id: http://devicetree.org/schemas/i2c/cdns,i2c-r1p10.yaml# ++$schema: http://devicetree.org/meta-schemas/core.yaml# + + title: Cadence I2C controller + +diff --git a/Documentation/devicetree/bindings/i2c/i2c-mux-gpio.yaml b/Documentation/devicetree/bindings/i2c/i2c-mux-gpio.yaml +index 6e0a5686af048..f34cc7ad5a00e 100644 +--- a/Documentation/devicetree/bindings/i2c/i2c-mux-gpio.yaml ++++ b/Documentation/devicetree/bindings/i2c/i2c-mux-gpio.yaml +@@ -45,7 +45,7 @@ properties: + + i2c-parent: + description: phandle of the I2C bus that this multiplexer's master-side port is connected to +- $ref: "/schemas/types.yaml#/definitions/phandle" ++ $ref: /schemas/types.yaml#/definitions/phandle + + mux-gpios: + description: list of GPIOs used to control the muxer +@@ -55,7 +55,7 @@ properties: + idle-state: + description: Value to set the muxer to when idle. When no value is given, it defaults to the + last value used. +- $ref: "/schemas/types.yaml#/definitions/uint32" ++ $ref: /schemas/types.yaml#/definitions/uint32 + + allOf: + - $ref: i2c-mux.yaml +diff --git a/Documentation/devicetree/bindings/i2c/qcom,i2c-geni-qcom.yaml b/Documentation/devicetree/bindings/i2c/qcom,i2c-geni-qcom.yaml +index 0e7ed00562e21..5a44fdcbdd59b 100644 +--- a/Documentation/devicetree/bindings/i2c/qcom,i2c-geni-qcom.yaml ++++ b/Documentation/devicetree/bindings/i2c/qcom,i2c-geni-qcom.yaml +@@ -1,8 +1,8 @@ + # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) + %YAML 1.2 + --- +-$id: "http://devicetree.org/schemas/i2c/qcom,i2c-geni-qcom.yaml#" +-$schema: "http://devicetree.org/meta-schemas/core.yaml#" ++$id: http://devicetree.org/schemas/i2c/qcom,i2c-geni-qcom.yaml# ++$schema: http://devicetree.org/meta-schemas/core.yaml# + + title: Qualcomm Geni based QUP I2C Controller + +diff --git a/Documentation/devicetree/bindings/i2c/st,stm32-i2c.yaml b/Documentation/devicetree/bindings/i2c/st,stm32-i2c.yaml +index bf396e9466aaf..94b75d9f66cdb 100644 +--- a/Documentation/devicetree/bindings/i2c/st,stm32-i2c.yaml ++++ b/Documentation/devicetree/bindings/i2c/st,stm32-i2c.yaml +@@ -90,7 +90,7 @@ properties: + st,syscfg-fmp: + description: Use to set Fast Mode Plus bit within SYSCFG when Fast Mode + Plus speed is selected by slave. +- $ref: "/schemas/types.yaml#/definitions/phandle-array" ++ $ref: /schemas/types.yaml#/definitions/phandle-array + items: + - items: + - description: phandle to syscfg +diff --git a/Documentation/devicetree/bindings/i2c/xlnx,xps-iic-2.00.a.yaml b/Documentation/devicetree/bindings/i2c/xlnx,xps-iic-2.00.a.yaml +index 8d241a703d855..f3b53ecae5625 100644 +--- a/Documentation/devicetree/bindings/i2c/xlnx,xps-iic-2.00.a.yaml ++++ b/Documentation/devicetree/bindings/i2c/xlnx,xps-iic-2.00.a.yaml +@@ -1,8 +1,8 @@ + # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) + %YAML 1.2 + --- +-$id: "http://devicetree.org/schemas/i2c/xlnx,xps-iic-2.00.a.yaml#" +-$schema: "http://devicetree.org/meta-schemas/core.yaml#" ++$id: http://devicetree.org/schemas/i2c/xlnx,xps-iic-2.00.a.yaml# ++$schema: http://devicetree.org/meta-schemas/core.yaml# + + title: Xilinx IIC controller + +-- +2.43.0 + diff --git a/queue-6.1/mips-pci-lantiq-restore-reset-gpio-polarity.patch b/queue-6.1/mips-pci-lantiq-restore-reset-gpio-polarity.patch new file mode 100644 index 00000000000..f64f7b6f268 --- /dev/null +++ b/queue-6.1/mips-pci-lantiq-restore-reset-gpio-polarity.patch @@ -0,0 +1,73 @@ +From 70543774444b6d583b13f58508b2d294e643b8b4 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Fri, 7 Jun 2024 11:04:00 +0200 +Subject: MIPS: pci: lantiq: restore reset gpio polarity + +From: Martin Schiller + +[ Upstream commit 277a0363120276645ae598d8d5fea7265e076ae9 ] + +Commit 90c2d2eb7ab5 ("MIPS: pci: lantiq: switch to using gpiod API") not +only switched to the gpiod API, but also inverted / changed the polarity +of the GPIO. + +According to the PCI specification, the RST# pin is an active-low +signal. However, most of the device trees that have been widely used for +a long time (mainly in the openWrt project) define this GPIO as +active-high and the old driver code inverted the signal internally. + +Apparently there are actually boards where the reset gpio must be +operated inverted. For this reason, we cannot use the GPIOD_OUT_LOW/HIGH +flag for initialization. Instead, we must explicitly set the gpio to +value 1 in order to take into account any "GPIO_ACTIVE_LOW" flag that +may have been set. + +In order to remain compatible with all these existing device trees, we +should therefore keep the logic as it was before the commit. + +Fixes: 90c2d2eb7ab5 ("MIPS: pci: lantiq: switch to using gpiod API") +Cc: stable@vger.kernel.org +Signed-off-by: Martin Schiller +Signed-off-by: Thomas Bogendoerfer +Signed-off-by: Sasha Levin +--- + arch/mips/pci/pci-lantiq.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/arch/mips/pci/pci-lantiq.c b/arch/mips/pci/pci-lantiq.c +index 8d16cd021f604..5c83f54341299 100644 +--- a/arch/mips/pci/pci-lantiq.c ++++ b/arch/mips/pci/pci-lantiq.c +@@ -124,14 +124,14 @@ static int ltq_pci_startup(struct platform_device *pdev) + clk_disable(clk_external); + + /* setup reset gpio used by pci */ +- reset_gpio = devm_gpiod_get_optional(&pdev->dev, "reset", +- GPIOD_OUT_LOW); ++ reset_gpio = devm_gpiod_get_optional(&pdev->dev, "reset", GPIOD_ASIS); + error = PTR_ERR_OR_ZERO(reset_gpio); + if (error) { + dev_err(&pdev->dev, "failed to request gpio: %d\n", error); + return error; + } + gpiod_set_consumer_name(reset_gpio, "pci_reset"); ++ gpiod_direction_output(reset_gpio, 1); + + /* enable auto-switching between PCI and EBU */ + ltq_pci_w32(0xa, PCI_CR_CLK_CTRL); +@@ -194,10 +194,10 @@ static int ltq_pci_startup(struct platform_device *pdev) + + /* toggle reset pin */ + if (reset_gpio) { +- gpiod_set_value_cansleep(reset_gpio, 1); ++ gpiod_set_value_cansleep(reset_gpio, 0); + wmb(); + mdelay(1); +- gpiod_set_value_cansleep(reset_gpio, 0); ++ gpiod_set_value_cansleep(reset_gpio, 1); + } + return 0; + } +-- +2.43.0 + diff --git a/queue-6.1/series b/queue-6.1/series index edae3e97ce0..a5e19c20d23 100644 --- a/queue-6.1/series +++ b/queue-6.1/series @@ -10,3 +10,6 @@ pinctrl-rockchip-fix-pinmux-bits-for-rk3328-gpio2-b-.patch pinctrl-rockchip-fix-pinmux-bits-for-rk3328-gpio3-b-.patch pinctrl-rockchip-use-dedicated-pinctrl-type-for-rk33.patch pinctrl-rockchip-fix-pinmux-reset-in-rockchip_pmx_se.patch +mips-pci-lantiq-restore-reset-gpio-polarity.patch +dt-bindings-i2c-drop-unneeded-quotes.patch +dt-bindings-i2c-atmel-at91sam-correct-path-to-i2c-co.patch -- 2.47.3