diff mbox series

[v2,1/3] dt-bindings: pinctrl: qcom: Define common TLMM binding

Message ID 20210126042650.1725176-1-bjorn.andersson@linaro.org
State Accepted
Commit 6bdafceac1799f479d088ed33320bba62f9c0db2
Headers show
Series [v2,1/3] dt-bindings: pinctrl: qcom: Define common TLMM binding | expand

Commit Message

Bjorn Andersson Jan. 26, 2021, 4:26 a.m. UTC
Several properties are shared between all TLMM bindings. By providing a
common binding to define these properties each platform's binding can be
reduced to just listing which of these properties should be checked for
- or further specified.

Reviewed-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
---

Changes since v1:
- Dropped "phandle", as Rob pushed this to the dt-schema instead
- Expanded the "TLMM" abbreviation

 .../bindings/pinctrl/qcom,tlmm-common.yaml    | 85 +++++++++++++++++++
 1 file changed, 85 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/pinctrl/qcom,tlmm-common.yaml

Comments

Vinod Koul Feb. 9, 2021, 4:36 a.m. UTC | #1
On 25-01-21, 20:26, Bjorn Andersson wrote:
> Several properties are shared between all TLMM bindings. By providing a

> common binding to define these properties each platform's binding can be

> reduced to just listing which of these properties should be checked for

> - or further specified.


Rob, Linus are we okay with this common binding, if so can we please get
this one in for the next merge window?

> 

> Reviewed-by: Vinod Koul <vkoul@kernel.org>

> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>

> ---

> 

> Changes since v1:

> - Dropped "phandle", as Rob pushed this to the dt-schema instead

> - Expanded the "TLMM" abbreviation

> 

>  .../bindings/pinctrl/qcom,tlmm-common.yaml    | 85 +++++++++++++++++++

>  1 file changed, 85 insertions(+)

>  create mode 100644 Documentation/devicetree/bindings/pinctrl/qcom,tlmm-common.yaml

> 

> diff --git a/Documentation/devicetree/bindings/pinctrl/qcom,tlmm-common.yaml b/Documentation/devicetree/bindings/pinctrl/qcom,tlmm-common.yaml

> new file mode 100644

> index 000000000000..3b37cf102d41

> --- /dev/null

> +++ b/Documentation/devicetree/bindings/pinctrl/qcom,tlmm-common.yaml

> @@ -0,0 +1,85 @@

> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)

> +%YAML 1.2

> +---

> +$id: http://devicetree.org/schemas/pinctrl/qcom,tlmm-common.yaml#

> +$schema: http://devicetree.org/meta-schemas/core.yaml#

> +

> +title: Qualcomm Technologies, Inc. Top Level Mode Multiplexer (TLMM) definitions

> +

> +maintainers:

> +  - Bjorn Andersson <bjorn.andersson@linaro.org>

> +

> +description:

> +  This defines the common properties used to describe all Qualcomm Top Level

> +  Mode Multiplexer bindings and pinconf/pinmux states for these.

> +

> +properties:

> +  interrupts:

> +    description:

> +      Specifies the TLMM summary IRQ

> +    maxItems: 1

> +

> +  interrupt-controller: true

> +

> +  '#interrupt-cells':

> +    description:

> +      Specifies the PIN numbers and Flags, as defined in defined in

> +      include/dt-bindings/interrupt-controller/irq.h

> +    const: 2

> +

> +  gpio-controller: true

> +

> +  '#gpio-cells':

> +    description:

> +      Specifying the pin number and flags, as defined in

> +      include/dt-bindings/gpio/gpio.h

> +    const: 2

> +

> +  gpio-ranges:

> +    maxItems: 1

> +

> +  wakeup-parent:

> +    description:

> +      Specifying the interrupt-controller used to wake up the system when the

> +      TLMM block has been powered down.

> +    maxItems: 1

> +

> +  gpio-reserved-ranges:

> +    description:

> +      Pins can be reserved for trusted applications and thereby unaccessible

> +      from the OS.  This property can be used to mark the pins which resources

> +      should not be accessed by the OS. Please see the ../gpio/gpio.txt for more

> +      information.

> +

> +required:

> +  - interrupts

> +  - interrupt-controller

> +  - '#interrupt-cells'

> +  - gpio-controller

> +  - '#gpio-cells'

> +  - gpio-ranges

> +

> +additionalProperties: true

> +

> +$defs:

> +  qcom-tlmm-state:

> +    allOf:

> +      - $ref: pincfg-node.yaml#

> +      - $ref: pinmux-node.yaml#

> +

> +    properties:

> +      drive-strength:

> +        enum: [2, 4, 6, 8, 10, 12, 14, 16]

> +        default: 2

> +        description:

> +          Selects the drive strength for the specified pins, in mA.

> +

> +      bias-pull-down: true

> +      bias-pull-up: true

> +      bias-disable: true

> +      input-enable: true

> +      output-high: true

> +      output-low: true

> +

> +    additionalProperties: true

> +...

> -- 

> 2.29.2


-- 
~Vinod
Rob Herring (Arm) Feb. 9, 2021, 5:06 p.m. UTC | #2
On Mon, 25 Jan 2021 20:26:48 -0800, Bjorn Andersson wrote:
> Several properties are shared between all TLMM bindings. By providing a
> common binding to define these properties each platform's binding can be
> reduced to just listing which of these properties should be checked for
> - or further specified.
> 
> Reviewed-by: Vinod Koul <vkoul@kernel.org>
> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
> ---
> 
> Changes since v1:
> - Dropped "phandle", as Rob pushed this to the dt-schema instead
> - Expanded the "TLMM" abbreviation
> 
>  .../bindings/pinctrl/qcom,tlmm-common.yaml    | 85 +++++++++++++++++++
>  1 file changed, 85 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/pinctrl/qcom,tlmm-common.yaml
> 

Reviewed-by: Rob Herring <robh@kernel.org>
Rob Herring (Arm) Feb. 9, 2021, 5:07 p.m. UTC | #3
On Mon, 25 Jan 2021 20:26:49 -0800, Bjorn Andersson wrote:
> Add binding for the TLMM block in the Qualcomm SC8180X platform.
> 
> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
> ---
>  .../pinctrl/qcom,sc8180x-pinctrl.yaml         | 152 ++++++++++++++++++
>  1 file changed, 152 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/pinctrl/qcom,sc8180x-pinctrl.yaml
> 

Reviewed-by: Rob Herring <robh@kernel.org>
patchwork-bot+linux-arm-msm@kernel.org March 1, 2021, 7:59 p.m. UTC | #4
Hello:

This series was applied to qcom/linux.git (refs/heads/for-next):

On Mon, 25 Jan 2021 20:26:48 -0800 you wrote:
> Several properties are shared between all TLMM bindings. By providing a

> common binding to define these properties each platform's binding can be

> reduced to just listing which of these properties should be checked for

> - or further specified.

> 

> Reviewed-by: Vinod Koul <vkoul@kernel.org>

> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>

> 

> [...]


Here is the summary with links:
  - [v2,1/3] dt-bindings: pinctrl: qcom: Define common TLMM binding
    https://git.kernel.org/qcom/c/6bdafceac179
  - [v2,2/3] dt-bindings: pinctrl: qcom: Add sc8180x binding
    https://git.kernel.org/qcom/c/332dcd71d145
  - [v2,3/3] pinctrl: qcom: Add sc8180x TLMM driver
    https://git.kernel.org/qcom/c/97423113ec4b

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/pinctrl/qcom,tlmm-common.yaml b/Documentation/devicetree/bindings/pinctrl/qcom,tlmm-common.yaml
new file mode 100644
index 000000000000..3b37cf102d41
--- /dev/null
+++ b/Documentation/devicetree/bindings/pinctrl/qcom,tlmm-common.yaml
@@ -0,0 +1,85 @@ 
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/pinctrl/qcom,tlmm-common.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm Technologies, Inc. Top Level Mode Multiplexer (TLMM) definitions
+
+maintainers:
+  - Bjorn Andersson <bjorn.andersson@linaro.org>
+
+description:
+  This defines the common properties used to describe all Qualcomm Top Level
+  Mode Multiplexer bindings and pinconf/pinmux states for these.
+
+properties:
+  interrupts:
+    description:
+      Specifies the TLMM summary IRQ
+    maxItems: 1
+
+  interrupt-controller: true
+
+  '#interrupt-cells':
+    description:
+      Specifies the PIN numbers and Flags, as defined in defined in
+      include/dt-bindings/interrupt-controller/irq.h
+    const: 2
+
+  gpio-controller: true
+
+  '#gpio-cells':
+    description:
+      Specifying the pin number and flags, as defined in
+      include/dt-bindings/gpio/gpio.h
+    const: 2
+
+  gpio-ranges:
+    maxItems: 1
+
+  wakeup-parent:
+    description:
+      Specifying the interrupt-controller used to wake up the system when the
+      TLMM block has been powered down.
+    maxItems: 1
+
+  gpio-reserved-ranges:
+    description:
+      Pins can be reserved for trusted applications and thereby unaccessible
+      from the OS.  This property can be used to mark the pins which resources
+      should not be accessed by the OS. Please see the ../gpio/gpio.txt for more
+      information.
+
+required:
+  - interrupts
+  - interrupt-controller
+  - '#interrupt-cells'
+  - gpio-controller
+  - '#gpio-cells'
+  - gpio-ranges
+
+additionalProperties: true
+
+$defs:
+  qcom-tlmm-state:
+    allOf:
+      - $ref: pincfg-node.yaml#
+      - $ref: pinmux-node.yaml#
+
+    properties:
+      drive-strength:
+        enum: [2, 4, 6, 8, 10, 12, 14, 16]
+        default: 2
+        description:
+          Selects the drive strength for the specified pins, in mA.
+
+      bias-pull-down: true
+      bias-pull-up: true
+      bias-disable: true
+      input-enable: true
+      output-high: true
+      output-low: true
+
+    additionalProperties: true
+...