]> git.itanic.dy.fi Git - linux-stable/commitdiff
dt-bindings: pinctrl: qcom: add gpio-ranges, gpio-reserved-ranges
authorChristian Lamparter <chunkeey@gmail.com>
Mon, 28 May 2018 11:06:01 +0000 (13:06 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Thu, 28 Jun 2018 14:28:33 +0000 (16:28 +0200)
This patch adds the gpio-ranges and gpio-reserved-ranges property
definitions to the binding text files supported by the pinctrl-msm
driver framework.

gpio-ranges:
For DT-based platforms the pinctrl-msm framework currently relies
on the deprecated-for-DT gpiochip_add_pin_range() function to add
the range of GPIOs to be handled by the pin controller. Due to
interactions within gpiolib code, this causes the pinctrl-msm
driver to bail out (-517) during boot when a gpio-hog is declared.
This can be fatal and cause the system to not boot or reset
(for a detailed explanation and call-trace, refer to patch:
"pinctrl: msm: fix gpio-hog related boot issues" in this series).

gpio-reserved-ranges:
The binding has been added as a precaution since the TrustZone
firmware (aka QSEE), which is running as the hypervisor, might
have reserved certain, but undisclosed pins. Hence reading or
writing to the registers for those pins will cause an
XPU violation and this subsequently crashes the kernel.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
12 files changed:
Documentation/devicetree/bindings/pinctrl/qcom,apq8064-pinctrl.txt
Documentation/devicetree/bindings/pinctrl/qcom,apq8084-pinctrl.txt
Documentation/devicetree/bindings/pinctrl/qcom,ipq4019-pinctrl.txt
Documentation/devicetree/bindings/pinctrl/qcom,ipq8064-pinctrl.txt
Documentation/devicetree/bindings/pinctrl/qcom,ipq8074-pinctrl.txt
Documentation/devicetree/bindings/pinctrl/qcom,mdm9615-pinctrl.txt
Documentation/devicetree/bindings/pinctrl/qcom,msm8660-pinctrl.txt
Documentation/devicetree/bindings/pinctrl/qcom,msm8916-pinctrl.txt
Documentation/devicetree/bindings/pinctrl/qcom,msm8960-pinctrl.txt
Documentation/devicetree/bindings/pinctrl/qcom,msm8974-pinctrl.txt
Documentation/devicetree/bindings/pinctrl/qcom,msm8994-pinctrl.txt
Documentation/devicetree/bindings/pinctrl/qcom,msm8996-pinctrl.txt

index a752a47164860a1c7ff1986cba6749594dcad696..c2dbb3e8d84035f91a79e963ec96420afdcbfc87 100644 (file)
@@ -10,6 +10,11 @@ Required properties:
 - #gpio-cells : Should be two.
                 The first cell is the gpio pin number and the
                 second cell is used for optional parameters.
+- gpio-ranges: see ../gpio/gpio.txt
+
+Optional properties:
+
+- gpio-reserved-ranges: see ../gpio/gpio.txt
 
 Please refer to ../gpio/gpio.txt and ../interrupt-controller/interrupts.txt for
 a general description of GPIO and interrupt bindings.
@@ -67,6 +72,7 @@ Example:
 
                pinctrl-names = "default";
                pinctrl-0 = <&gsbi5_uart_default>;
+               gpio-ranges = <&msmgpio 0 0 90>;
 
                gsbi5_uart_default: gsbi5_uart_default {
                        mux {
index c4ea61ac56f2fdbdd535a6123ba29c3a05acfb01..68e93d5b7ede1cd8874e8c24b29289b4f8deb7bd 100644 (file)
@@ -40,6 +40,14 @@ MSM8960 platform.
        Definition: must be 2. Specifying the pin number and flags, as defined
                    in <dt-bindings/gpio/gpio.h>
 
+- gpio-ranges:
+       Usage: required
+       Definition:  see ../gpio/gpio.txt
+
+- gpio-reserved-ranges:
+       Usage: optional
+       Definition: see ../gpio/gpio.txt
+
 Please refer to ../gpio/gpio.txt and ../interrupt-controller/interrupts.txt for
 a general description of GPIO and interrupt bindings.
 
@@ -154,6 +162,7 @@ Example:
 
                gpio-controller;
                #gpio-cells = <2>;
+               gpio-ranges = <&tlmm 0 0 147>;
                interrupt-controller;
                #interrupt-cells = <2>;
                interrupts = <0 208 0>;
index 93374f478b9e071b126d56911a4023535152cd66..991be0cd094873e7bfcb292e89669d4dc51717e1 100644 (file)
@@ -13,6 +13,11 @@ Required properties:
 - #gpio-cells : Should be two.
                 The first cell is the gpio pin number and the
                 second cell is used for optional parameters.
+- gpio-ranges: see ../gpio/gpio.txt
+
+Optional properties:
+
+- gpio-reserved-ranges: see ../gpio/gpio.txt
 
 Please refer to ../gpio/gpio.txt and ../interrupt-controller/interrupts.txt for
 a general description of GPIO and interrupt bindings.
@@ -64,6 +69,7 @@ Example:
 
                gpio-controller;
                #gpio-cells = <2>;
+               gpio-ranges = <&tlmm 0 0 100>;
                interrupt-controller;
                #interrupt-cells = <2>;
                interrupts = <0 208 0>;
index 6e88e91feb1130796dacf610ceb0a6969c5b0b95..7ed56a1b70fc179e28cc4099565fcf247312b868 100644 (file)
@@ -10,6 +10,11 @@ Required properties:
 - #gpio-cells : Should be two.
                 The first cell is the gpio pin number and the
                 second cell is used for optional parameters.
+- gpio-ranges: see ../gpio/gpio.txt
+
+Optional properties:
+
+- gpio-reserved-ranges: see ../gpio/gpio.txt
 
 Please refer to ../gpio/gpio.txt and ../interrupt-controller/interrupts.txt for
 a general description of GPIO and interrupt bindings.
@@ -67,6 +72,7 @@ Example:
 
                gpio-controller;
                #gpio-cells = <2>;
+               gpio-ranges = <&pinmux 0 0 69>;
                interrupt-controller;
                #interrupt-cells = <2>;
                interrupts = <0 32 0x4>;
index 407b9443629d23510e63e02866375f8e77c920c2..6dd72f8599e91dd89913098ea8ee94808389025a 100644 (file)
@@ -40,6 +40,14 @@ IPQ8074 platform.
        Definition: must be 2. Specifying the pin number and flags, as defined
                    in <dt-bindings/gpio/gpio.h>
 
+- gpio-ranges:
+       Usage: required
+       Definition:  see ../gpio/gpio.txt
+
+- gpio-reserved-ranges:
+       Usage: optional
+       Definition: see ../gpio/gpio.txt
+
 Please refer to ../gpio/gpio.txt and ../interrupt-controller/interrupts.txt for
 a general description of GPIO and interrupt bindings.
 
@@ -148,6 +156,7 @@ Example:
                interrupts = <GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH>;
                gpio-controller;
                #gpio-cells = <2>;
+               gpio-ranges = <&tlmm 0 0 70>;
                interrupt-controller;
                #interrupt-cells = <2>;
 
index 1b52f01ddcb7c9b2bfb2a6bec433726b6e754157..86ecdcfc4fb8a1fe70617186de1208ccb7bf9a2a 100644 (file)
@@ -40,6 +40,14 @@ MDM9615 platform.
        Definition: must be 2. Specifying the pin number and flags, as defined
                    in <dt-bindings/gpio/gpio.h>
 
+- gpio-ranges:
+       Usage: required
+       Definition:  see ../gpio/gpio.txt
+
+- gpio-reserved-ranges:
+       Usage: optional
+       Definition: see ../gpio/gpio.txt
+
 Please refer to ../gpio/gpio.txt and ../interrupt-controller/interrupts.txt for
 a general description of GPIO and interrupt bindings.
 
@@ -127,6 +135,7 @@ Example:
 
                gpio-controller;
                #gpio-cells = <2>;
+               gpio-ranges = <&msmgpio 0 0 88>;
                interrupt-controller;
                #interrupt-cells = <2>;
                interrupts = <0 16 0x4>;
index df9a838ec5f90c7500e5347a779699b9ba1d2f22..cdc4787e59d2eb3c738a3b589a9d26b9264eedbc 100644 (file)
@@ -10,6 +10,11 @@ Required properties:
 - #gpio-cells : Should be two.
                 The first cell is the gpio pin number and the
                 second cell is used for optional parameters.
+- gpio-ranges: see ../gpio/gpio.txt
+
+Optional properties:
+
+- gpio-reserved-ranges: see ../gpio/gpio.txt
 
 Please refer to ../gpio/gpio.txt and ../interrupt-controller/interrupts.txt for
 a general description of GPIO and interrupt bindings.
@@ -62,6 +67,7 @@ Example:
 
                gpio-controller;
                #gpio-cells = <2>;
+               gpio-ranges = <&msmgpio 0 0 173>;
                interrupt-controller;
                #interrupt-cells = <2>;
                interrupts = <0 16 0x4>;
index 498caff6029ee6b80a4f4020c3a4ce5d5e32c7f1..195a7a0ef0ccbc842f5a65c4e1d7c57378ee6abf 100644 (file)
@@ -40,6 +40,14 @@ MSM8916 platform.
        Definition: must be 2. Specifying the pin number and flags, as defined
                    in <dt-bindings/gpio/gpio.h>
 
+- gpio-ranges:
+       Usage: required
+       Definition:  see ../gpio/gpio.txt
+
+- gpio-reserved-ranges:
+       Usage: optional
+       Definition: see ../gpio/gpio.txt
+
 Please refer to ../gpio/gpio.txt and ../interrupt-controller/interrupts.txt for
 a general description of GPIO and interrupt bindings.
 
@@ -162,6 +170,7 @@ Example:
                interrupts = <0 208 0>;
                gpio-controller;
                #gpio-cells = <2>;
+               gpio-ranges = <&tlmm 0 0 122>;
                interrupt-controller;
                #interrupt-cells = <2>;
 
index eb8d8aa41f2051a8be7c87e4d10c12b68f6a76d8..5034eb6653c74a4294e57f60b1b83291a82ad077 100644 (file)
@@ -40,6 +40,14 @@ MSM8960 platform.
        Definition: must be 2. Specifying the pin number and flags, as defined
                    in <dt-bindings/gpio/gpio.h>
 
+- gpio-ranges:
+       Usage: required
+       Definition:  see ../gpio/gpio.txt
+
+- gpio-reserved-ranges:
+       Usage: optional
+       Definition: see ../gpio/gpio.txt
+
 Please refer to ../gpio/gpio.txt and ../interrupt-controller/interrupts.txt for
 a general description of GPIO and interrupt bindings.
 
@@ -156,6 +164,7 @@ Example:
 
                gpio-controller;
                #gpio-cells = <2>;
+               gpio-ranges = <&msmgpio 0 0 152>;
                interrupt-controller;
                #interrupt-cells = <2>;
                interrupts = <0 16 0x4>;
index 453bd7c76d6babe5e17b4696fb018dbdfae35c92..c22e6c425d0b725809f736dfc3beeb87982e1a7d 100644 (file)
@@ -10,6 +10,11 @@ Required properties:
 - #gpio-cells : Should be two.
                 The first cell is the gpio pin number and the
                 second cell is used for optional parameters.
+- gpio-ranges: see ../gpio/gpio.txt
+
+Optional properties:
+
+- gpio-reserved-ranges: see ../gpio/gpio.txt
 
 Please refer to ../gpio/gpio.txt and ../interrupt-controller/interrupts.txt for
 a general description of GPIO and interrupt bindings.
@@ -87,6 +92,7 @@ Example:
 
                gpio-controller;
                #gpio-cells = <2>;
+               gpio-ranges = <&msmgpio 0 0 146>;
                interrupt-controller;
                #interrupt-cells = <2>;
                interrupts = <0 208 0>;
index 13cd629f896ee08ffe568ae3e974893c6fd5e60c..f15443f6e78eb77b5edab227069a4f953839b28c 100644 (file)
@@ -42,6 +42,14 @@ MSM8994 platform.
        Definition: must be 2. Specifying the pin number and flags, as defined
                    in <dt-bindings/gpio/gpio.h>
 
+- gpio-ranges:
+       Usage: required
+       Definition:  see ../gpio/gpio.txt
+
+- gpio-reserved-ranges:
+       Usage: optional
+       Definition: see ../gpio/gpio.txt
+
 Please refer to ../gpio/gpio.txt and ../interrupt-controller/interrupts.txt for
 a general description of GPIO and interrupt bindings.
 
@@ -160,6 +168,7 @@ Example:
                interrupts = <GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH>;
                gpio-controller;
                #gpio-cells = <2>;
+               gpio-ranges = <&msmgpio 0 0 146>;
                interrupt-controller;
                #interrupt-cells = <2>;
 
index aaf01e929eeab2b0398dd52c1aa5f90855a21614..fa97f609fe45146c665e0e6a535bc1602ff6bf70 100644 (file)
@@ -40,6 +40,14 @@ MSM8996 platform.
        Definition: must be 2. Specifying the pin number and flags, as defined
                    in <dt-bindings/gpio/gpio.h>
 
+- gpio-ranges:
+       Usage: required
+       Definition:  see ../gpio/gpio.txt
+
+- gpio-reserved-ranges:
+       Usage: optional
+       Definition: see ../gpio/gpio.txt
+
 Please refer to ../gpio/gpio.txt and ../interrupt-controller/interrupts.txt for
 a general description of GPIO and interrupt bindings.
 
@@ -180,6 +188,7 @@ Example:
                reg = <0x01010000 0x300000>;
                interrupts = <0 208 0>;
                gpio-controller;
+               gpio-ranges = <&tlmm 0 0 150>;
                #gpio-cells = <2>;
                interrupt-controller;
                #interrupt-cells = <2>;