Skip to content

Commit 5a5eced

Browse files
krzklinusw
authored andcommitted
dt-bindings: pinctrl: qcom: create common LPASS LPI schema
Just like regular TLMM pin controllers in Qualcomm SoCs, the Low Power Audio SubSystem (LPASS) Low Power Island (LPI) TLMM blocks share a lot of properties, so common part can be moved to separate schema to reduce code duplication and make reviewing easier. Except the move of common part, this introduces effective changes: 1. To all LPASS LPI bindings: Reference pinmux-node.yaml in each pin muxing and configuration node, to bring definition of "function" and "pins" properties. 2. qcom,sc7280-lpass-lpi-pinctrl: Reference pinctrl.yaml in top leve. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20231208215534.195854-1-krzysztof.kozlowski@linaro.org Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
1 parent fa7b1fe commit 5a5eced

9 files changed

+109
-357
lines changed
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/pinctrl/qcom,lpass-lpi-common.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Qualcomm SoC LPASS LPI TLMM Common Properties
8+
9+
maintainers:
10+
- Bjorn Andersson <andersson@kernel.org>
11+
- Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
12+
- Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
13+
14+
description:
15+
Common properties for the Top Level Mode Multiplexer pin controllers in the
16+
Low Power Audio SubSystem (LPASS) Low Power Island (LPI) of Qualcomm SoCs.
17+
18+
properties:
19+
gpio-controller: true
20+
21+
"#gpio-cells":
22+
description:
23+
Specifying the pin number and flags, as defined in
24+
include/dt-bindings/gpio/gpio.h
25+
const: 2
26+
27+
gpio-ranges:
28+
maxItems: 1
29+
30+
required:
31+
- gpio-controller
32+
- "#gpio-cells"
33+
- gpio-ranges
34+
35+
allOf:
36+
- $ref: pinctrl.yaml#
37+
38+
additionalProperties: true
39+
40+
$defs:
41+
qcom-tlmm-state:
42+
properties:
43+
drive-strength:
44+
enum: [2, 4, 6, 8, 10, 12, 14, 16]
45+
default: 2
46+
description:
47+
Selects the drive strength for the specified pins, in mA.
48+
49+
slew-rate:
50+
enum: [0, 1, 2, 3]
51+
default: 0
52+
description: |
53+
0: No adjustments
54+
1: Higher Slew rate (faster edges)
55+
2: Lower Slew rate (slower edges)
56+
3: Reserved (No adjustments)
57+
58+
bias-bus-hold: true
59+
bias-pull-down: true
60+
bias-pull-up: true
61+
bias-disable: true
62+
input-enable: true
63+
output-high: true
64+
output-low: true
65+
66+
required:
67+
- pins
68+
- function
69+
70+
allOf:
71+
- $ref: pincfg-node.yaml#
72+
- $ref: pinmux-node.yaml#
73+
74+
additionalProperties: true
75+

Documentation/devicetree/bindings/pinctrl/qcom,sc7280-lpass-lpi-pinctrl.yaml

Lines changed: 6 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,6 @@ properties:
2020
reg:
2121
maxItems: 2
2222

23-
gpio-controller: true
24-
25-
"#gpio-cells":
26-
description: Specifying the pin number and flags, as defined in
27-
include/dt-bindings/gpio/gpio.h
28-
const: 2
29-
30-
gpio-ranges:
31-
maxItems: 1
32-
3323
patternProperties:
3424
"-state$":
3525
oneOf:
@@ -45,7 +35,8 @@ $defs:
4535
description:
4636
Pinctrl node's client devices use subnodes for desired pin configuration.
4737
Client device subnodes use below standard properties.
48-
$ref: /schemas/pinctrl/pincfg-node.yaml
38+
$ref: qcom,lpass-lpi-common.yaml#/$defs/qcom-tlmm-state
39+
unevaluatedProperties: false
4940

5041
properties:
5142
pins:
@@ -68,42 +59,14 @@ $defs:
6859
Specify the alternative function to be configured for the specified
6960
pins.
7061

71-
drive-strength:
72-
enum: [2, 4, 6, 8, 10, 12, 14, 16]
73-
default: 2
74-
description:
75-
Selects the drive strength for the specified pins, in mA.
76-
77-
slew-rate:
78-
enum: [0, 1, 2, 3]
79-
default: 0
80-
description: |
81-
0: No adjustments
82-
1: Higher Slew rate (faster edges)
83-
2: Lower Slew rate (slower edges)
84-
3: Reserved (No adjustments)
85-
86-
bias-pull-down: true
87-
bias-pull-up: true
88-
bias-bus-hold: true
89-
bias-disable: true
90-
output-high: true
91-
output-low: true
92-
93-
required:
94-
- pins
95-
- function
96-
97-
additionalProperties: false
98-
9962
required:
10063
- compatible
10164
- reg
102-
- gpio-controller
103-
- "#gpio-cells"
104-
- gpio-ranges
10565

106-
additionalProperties: false
66+
allOf:
67+
- $ref: qcom,lpass-lpi-common.yaml#
68+
69+
unevaluatedProperties: false
10770

10871
examples:
10972
- |

Documentation/devicetree/bindings/pinctrl/qcom,sc8280xp-lpass-lpi-pinctrl.yaml

Lines changed: 4 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,6 @@ properties:
3232
- const: core
3333
- const: audio
3434

35-
gpio-controller: true
36-
37-
"#gpio-cells":
38-
description: Specifying the pin number and flags, as defined in
39-
include/dt-bindings/gpio/gpio.h
40-
const: 2
41-
42-
gpio-ranges:
43-
maxItems: 1
44-
4535
patternProperties:
4636
"-state$":
4737
oneOf:
@@ -57,7 +47,8 @@ $defs:
5747
description:
5848
Pinctrl node's client devices use subnodes for desired pin configuration.
5949
Client device subnodes use below standard properties.
60-
$ref: /schemas/pinctrl/pincfg-node.yaml
50+
$ref: qcom,lpass-lpi-common.yaml#/$defs/qcom-tlmm-state
51+
unevaluatedProperties: false
6152

6253
properties:
6354
pins:
@@ -79,48 +70,16 @@ $defs:
7970
Specify the alternative function to be configured for the specified
8071
pins.
8172

82-
drive-strength:
83-
enum: [2, 4, 6, 8, 10, 12, 14, 16]
84-
default: 2
85-
description:
86-
Selects the drive strength for the specified pins, in mA.
87-
88-
slew-rate:
89-
enum: [0, 1, 2, 3]
90-
default: 0
91-
description: |
92-
0: No adjustments
93-
1: Higher Slew rate (faster edges)
94-
2: Lower Slew rate (slower edges)
95-
3: Reserved (No adjustments)
96-
97-
bias-bus-hold: true
98-
bias-pull-down: true
99-
bias-pull-up: true
100-
bias-disable: true
101-
input-enable: true
102-
output-high: true
103-
output-low: true
104-
105-
required:
106-
- pins
107-
- function
108-
109-
additionalProperties: false
110-
11173
allOf:
112-
- $ref: pinctrl.yaml#
74+
- $ref: qcom,lpass-lpi-common.yaml#
11375

11476
required:
11577
- compatible
11678
- reg
11779
- clocks
11880
- clock-names
119-
- gpio-controller
120-
- "#gpio-cells"
121-
- gpio-ranges
12281

123-
additionalProperties: false
82+
unevaluatedProperties: false
12483

12584
examples:
12685
- |

Documentation/devicetree/bindings/pinctrl/qcom,sm6115-lpass-lpi-pinctrl.yaml

Lines changed: 4 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,6 @@ properties:
3131
items:
3232
- const: audio
3333

34-
gpio-controller: true
35-
36-
"#gpio-cells":
37-
description: Specifying the pin number and flags, as defined in
38-
include/dt-bindings/gpio/gpio.h
39-
const: 2
40-
41-
gpio-ranges:
42-
maxItems: 1
43-
4434
patternProperties:
4535
"-state$":
4636
oneOf:
@@ -56,7 +46,8 @@ $defs:
5646
description:
5747
Pinctrl node's client devices use subnodes for desired pin configuration.
5848
Client device subnodes use below standard properties.
59-
$ref: /schemas/pinctrl/pincfg-node.yaml
49+
$ref: qcom,lpass-lpi-common.yaml#/$defs/qcom-tlmm-state
50+
unevaluatedProperties: false
6051

6152
properties:
6253
pins:
@@ -75,48 +66,17 @@ $defs:
7566
Specify the alternative function to be configured for the specified
7667
pins.
7768

78-
drive-strength:
79-
enum: [2, 4, 6, 8, 10, 12, 14, 16]
80-
default: 2
81-
description:
82-
Selects the drive strength for the specified pins, in mA.
83-
84-
slew-rate:
85-
enum: [0, 1, 2, 3]
86-
default: 0
87-
description: |
88-
0: No adjustments
89-
1: Higher Slew rate (faster edges)
90-
2: Lower Slew rate (slower edges)
91-
3: Reserved (No adjustments)
92-
93-
bias-bus-hold: true
94-
bias-pull-down: true
95-
bias-pull-up: true
96-
bias-disable: true
97-
input-enable: true
98-
output-high: true
99-
output-low: true
100-
101-
required:
102-
- pins
103-
- function
104-
105-
additionalProperties: false
10669

10770
allOf:
108-
- $ref: pinctrl.yaml#
71+
- $ref: qcom,lpass-lpi-common.yaml#
10972

11073
required:
11174
- compatible
11275
- reg
11376
- clocks
11477
- clock-names
115-
- gpio-controller
116-
- "#gpio-cells"
117-
- gpio-ranges
11878

119-
additionalProperties: false
79+
unevaluatedProperties: false
12080

12181
examples:
12282
- |

Documentation/devicetree/bindings/pinctrl/qcom,sm8250-lpass-lpi-pinctrl.yaml

Lines changed: 4 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,6 @@ properties:
3030
- const: core
3131
- const: audio
3232

33-
gpio-controller: true
34-
35-
"#gpio-cells":
36-
description: Specifying the pin number and flags, as defined in
37-
include/dt-bindings/gpio/gpio.h
38-
const: 2
39-
40-
gpio-ranges:
41-
maxItems: 1
42-
4333
patternProperties:
4434
"-state$":
4535
oneOf:
@@ -55,7 +45,8 @@ $defs:
5545
description:
5646
Pinctrl node's client devices use subnodes for desired pin configuration.
5747
Client device subnodes use below standard properties.
58-
$ref: /schemas/pinctrl/pincfg-node.yaml
48+
$ref: qcom,lpass-lpi-common.yaml#/$defs/qcom-tlmm-state
49+
unevaluatedProperties: false
5950

6051
properties:
6152
pins:
@@ -78,48 +69,16 @@ $defs:
7869
Specify the alternative function to be configured for the specified
7970
pins.
8071

81-
drive-strength:
82-
enum: [2, 4, 6, 8, 10, 12, 14, 16]
83-
default: 2
84-
description:
85-
Selects the drive strength for the specified pins, in mA.
86-
87-
slew-rate:
88-
enum: [0, 1, 2, 3]
89-
default: 0
90-
description: |
91-
0: No adjustments
92-
1: Higher Slew rate (faster edges)
93-
2: Lower Slew rate (slower edges)
94-
3: Reserved (No adjustments)
95-
96-
bias-pull-down: true
97-
bias-pull-up: true
98-
bias-bus-hold: true
99-
bias-disable: true
100-
input-enable: true
101-
output-high: true
102-
output-low: true
103-
104-
required:
105-
- pins
106-
- function
107-
108-
additionalProperties: false
109-
11072
allOf:
111-
- $ref: pinctrl.yaml#
73+
- $ref: qcom,lpass-lpi-common.yaml#
11274

11375
required:
11476
- compatible
11577
- reg
11678
- clocks
11779
- clock-names
118-
- gpio-controller
119-
- "#gpio-cells"
120-
- gpio-ranges
12180

122-
additionalProperties: false
81+
unevaluatedProperties: false
12382

12483
examples:
12584
- |

0 commit comments

Comments
 (0)