Commit c1e802f6 authored by Christian Lamparter's avatar Christian Lamparter Committed by Linus Walleij

dt-bindings: pinctrl: qcom: add gpio-ranges, gpio-reserved-ranges

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: default avatarChristian Lamparter <chunkeey@gmail.com>
Reviewed-by: default avatarRob Herring <robh@kernel.org>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 74677701
...@@ -10,6 +10,11 @@ Required properties: ...@@ -10,6 +10,11 @@ Required properties:
- #gpio-cells : Should be two. - #gpio-cells : Should be two.
The first cell is the gpio pin number and the The first cell is the gpio pin number and the
second cell is used for optional parameters. 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 Please refer to ../gpio/gpio.txt and ../interrupt-controller/interrupts.txt for
a general description of GPIO and interrupt bindings. a general description of GPIO and interrupt bindings.
...@@ -67,6 +72,7 @@ Example: ...@@ -67,6 +72,7 @@ Example:
pinctrl-names = "default"; pinctrl-names = "default";
pinctrl-0 = <&gsbi5_uart_default>; pinctrl-0 = <&gsbi5_uart_default>;
gpio-ranges = <&msmgpio 0 0 90>;
gsbi5_uart_default: gsbi5_uart_default { gsbi5_uart_default: gsbi5_uart_default {
mux { mux {
......
...@@ -40,6 +40,14 @@ MSM8960 platform. ...@@ -40,6 +40,14 @@ MSM8960 platform.
Definition: must be 2. Specifying the pin number and flags, as defined Definition: must be 2. Specifying the pin number and flags, as defined
in <dt-bindings/gpio/gpio.h> 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 Please refer to ../gpio/gpio.txt and ../interrupt-controller/interrupts.txt for
a general description of GPIO and interrupt bindings. a general description of GPIO and interrupt bindings.
...@@ -154,6 +162,7 @@ Example: ...@@ -154,6 +162,7 @@ Example:
gpio-controller; gpio-controller;
#gpio-cells = <2>; #gpio-cells = <2>;
gpio-ranges = <&tlmm 0 0 147>;
interrupt-controller; interrupt-controller;
#interrupt-cells = <2>; #interrupt-cells = <2>;
interrupts = <0 208 0>; interrupts = <0 208 0>;
......
...@@ -13,6 +13,11 @@ Required properties: ...@@ -13,6 +13,11 @@ Required properties:
- #gpio-cells : Should be two. - #gpio-cells : Should be two.
The first cell is the gpio pin number and the The first cell is the gpio pin number and the
second cell is used for optional parameters. 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 Please refer to ../gpio/gpio.txt and ../interrupt-controller/interrupts.txt for
a general description of GPIO and interrupt bindings. a general description of GPIO and interrupt bindings.
...@@ -64,6 +69,7 @@ Example: ...@@ -64,6 +69,7 @@ Example:
gpio-controller; gpio-controller;
#gpio-cells = <2>; #gpio-cells = <2>;
gpio-ranges = <&tlmm 0 0 100>;
interrupt-controller; interrupt-controller;
#interrupt-cells = <2>; #interrupt-cells = <2>;
interrupts = <0 208 0>; interrupts = <0 208 0>;
......
...@@ -10,6 +10,11 @@ Required properties: ...@@ -10,6 +10,11 @@ Required properties:
- #gpio-cells : Should be two. - #gpio-cells : Should be two.
The first cell is the gpio pin number and the The first cell is the gpio pin number and the
second cell is used for optional parameters. 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 Please refer to ../gpio/gpio.txt and ../interrupt-controller/interrupts.txt for
a general description of GPIO and interrupt bindings. a general description of GPIO and interrupt bindings.
...@@ -67,6 +72,7 @@ Example: ...@@ -67,6 +72,7 @@ Example:
gpio-controller; gpio-controller;
#gpio-cells = <2>; #gpio-cells = <2>;
gpio-ranges = <&pinmux 0 0 69>;
interrupt-controller; interrupt-controller;
#interrupt-cells = <2>; #interrupt-cells = <2>;
interrupts = <0 32 0x4>; interrupts = <0 32 0x4>;
......
...@@ -40,6 +40,14 @@ IPQ8074 platform. ...@@ -40,6 +40,14 @@ IPQ8074 platform.
Definition: must be 2. Specifying the pin number and flags, as defined Definition: must be 2. Specifying the pin number and flags, as defined
in <dt-bindings/gpio/gpio.h> 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 Please refer to ../gpio/gpio.txt and ../interrupt-controller/interrupts.txt for
a general description of GPIO and interrupt bindings. a general description of GPIO and interrupt bindings.
...@@ -148,6 +156,7 @@ Example: ...@@ -148,6 +156,7 @@ Example:
interrupts = <GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH>; interrupts = <GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH>;
gpio-controller; gpio-controller;
#gpio-cells = <2>; #gpio-cells = <2>;
gpio-ranges = <&tlmm 0 0 70>;
interrupt-controller; interrupt-controller;
#interrupt-cells = <2>; #interrupt-cells = <2>;
......
...@@ -40,6 +40,14 @@ MDM9615 platform. ...@@ -40,6 +40,14 @@ MDM9615 platform.
Definition: must be 2. Specifying the pin number and flags, as defined Definition: must be 2. Specifying the pin number and flags, as defined
in <dt-bindings/gpio/gpio.h> 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 Please refer to ../gpio/gpio.txt and ../interrupt-controller/interrupts.txt for
a general description of GPIO and interrupt bindings. a general description of GPIO and interrupt bindings.
...@@ -127,6 +135,7 @@ Example: ...@@ -127,6 +135,7 @@ Example:
gpio-controller; gpio-controller;
#gpio-cells = <2>; #gpio-cells = <2>;
gpio-ranges = <&msmgpio 0 0 88>;
interrupt-controller; interrupt-controller;
#interrupt-cells = <2>; #interrupt-cells = <2>;
interrupts = <0 16 0x4>; interrupts = <0 16 0x4>;
......
...@@ -10,6 +10,11 @@ Required properties: ...@@ -10,6 +10,11 @@ Required properties:
- #gpio-cells : Should be two. - #gpio-cells : Should be two.
The first cell is the gpio pin number and the The first cell is the gpio pin number and the
second cell is used for optional parameters. 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 Please refer to ../gpio/gpio.txt and ../interrupt-controller/interrupts.txt for
a general description of GPIO and interrupt bindings. a general description of GPIO and interrupt bindings.
...@@ -62,6 +67,7 @@ Example: ...@@ -62,6 +67,7 @@ Example:
gpio-controller; gpio-controller;
#gpio-cells = <2>; #gpio-cells = <2>;
gpio-ranges = <&msmgpio 0 0 173>;
interrupt-controller; interrupt-controller;
#interrupt-cells = <2>; #interrupt-cells = <2>;
interrupts = <0 16 0x4>; interrupts = <0 16 0x4>;
......
...@@ -40,6 +40,14 @@ MSM8916 platform. ...@@ -40,6 +40,14 @@ MSM8916 platform.
Definition: must be 2. Specifying the pin number and flags, as defined Definition: must be 2. Specifying the pin number and flags, as defined
in <dt-bindings/gpio/gpio.h> 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 Please refer to ../gpio/gpio.txt and ../interrupt-controller/interrupts.txt for
a general description of GPIO and interrupt bindings. a general description of GPIO and interrupt bindings.
...@@ -162,6 +170,7 @@ Example: ...@@ -162,6 +170,7 @@ Example:
interrupts = <0 208 0>; interrupts = <0 208 0>;
gpio-controller; gpio-controller;
#gpio-cells = <2>; #gpio-cells = <2>;
gpio-ranges = <&tlmm 0 0 122>;
interrupt-controller; interrupt-controller;
#interrupt-cells = <2>; #interrupt-cells = <2>;
......
...@@ -40,6 +40,14 @@ MSM8960 platform. ...@@ -40,6 +40,14 @@ MSM8960 platform.
Definition: must be 2. Specifying the pin number and flags, as defined Definition: must be 2. Specifying the pin number and flags, as defined
in <dt-bindings/gpio/gpio.h> 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 Please refer to ../gpio/gpio.txt and ../interrupt-controller/interrupts.txt for
a general description of GPIO and interrupt bindings. a general description of GPIO and interrupt bindings.
...@@ -156,6 +164,7 @@ Example: ...@@ -156,6 +164,7 @@ Example:
gpio-controller; gpio-controller;
#gpio-cells = <2>; #gpio-cells = <2>;
gpio-ranges = <&msmgpio 0 0 152>;
interrupt-controller; interrupt-controller;
#interrupt-cells = <2>; #interrupt-cells = <2>;
interrupts = <0 16 0x4>; interrupts = <0 16 0x4>;
......
...@@ -10,6 +10,11 @@ Required properties: ...@@ -10,6 +10,11 @@ Required properties:
- #gpio-cells : Should be two. - #gpio-cells : Should be two.
The first cell is the gpio pin number and the The first cell is the gpio pin number and the
second cell is used for optional parameters. 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 Please refer to ../gpio/gpio.txt and ../interrupt-controller/interrupts.txt for
a general description of GPIO and interrupt bindings. a general description of GPIO and interrupt bindings.
...@@ -87,6 +92,7 @@ Example: ...@@ -87,6 +92,7 @@ Example:
gpio-controller; gpio-controller;
#gpio-cells = <2>; #gpio-cells = <2>;
gpio-ranges = <&msmgpio 0 0 146>;
interrupt-controller; interrupt-controller;
#interrupt-cells = <2>; #interrupt-cells = <2>;
interrupts = <0 208 0>; interrupts = <0 208 0>;
......
...@@ -42,6 +42,14 @@ MSM8994 platform. ...@@ -42,6 +42,14 @@ MSM8994 platform.
Definition: must be 2. Specifying the pin number and flags, as defined Definition: must be 2. Specifying the pin number and flags, as defined
in <dt-bindings/gpio/gpio.h> 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 Please refer to ../gpio/gpio.txt and ../interrupt-controller/interrupts.txt for
a general description of GPIO and interrupt bindings. a general description of GPIO and interrupt bindings.
...@@ -160,6 +168,7 @@ Example: ...@@ -160,6 +168,7 @@ Example:
interrupts = <GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH>; interrupts = <GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH>;
gpio-controller; gpio-controller;
#gpio-cells = <2>; #gpio-cells = <2>;
gpio-ranges = <&msmgpio 0 0 146>;
interrupt-controller; interrupt-controller;
#interrupt-cells = <2>; #interrupt-cells = <2>;
......
...@@ -40,6 +40,14 @@ MSM8996 platform. ...@@ -40,6 +40,14 @@ MSM8996 platform.
Definition: must be 2. Specifying the pin number and flags, as defined Definition: must be 2. Specifying the pin number and flags, as defined
in <dt-bindings/gpio/gpio.h> 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 Please refer to ../gpio/gpio.txt and ../interrupt-controller/interrupts.txt for
a general description of GPIO and interrupt bindings. a general description of GPIO and interrupt bindings.
...@@ -180,6 +188,7 @@ Example: ...@@ -180,6 +188,7 @@ Example:
reg = <0x01010000 0x300000>; reg = <0x01010000 0x300000>;
interrupts = <0 208 0>; interrupts = <0 208 0>;
gpio-controller; gpio-controller;
gpio-ranges = <&tlmm 0 0 150>;
#gpio-cells = <2>; #gpio-cells = <2>;
interrupt-controller; interrupt-controller;
#interrupt-cells = <2>; #interrupt-cells = <2>;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment