Skip to content

Commit 1619a09

Browse files
MrVanBartosz Golaszewski
authored andcommitted
dt-bindings: gpio: vf610: correct i.MX8ULP and i.MX93
i.MX8ULP and i.MX93 actually has two interrupts for each gpio controller, one for Trustzone non-secure world, one for secure world. And they has one register based, not two as i.MX7ULP or VF610. Although the Linux Kernel driver gpio-vf610.c could work with fsl,imx7ulp-gpio compatible, it is based on some tricks did in device tree with some offset added to base address. So actually i.MX8ULP/i.MX93 is not compatible with i.MX7ULP. Last, i.MX93 is directly derived from i.MX8ULP, so make i.MX93 GPIO compatible with i.MX8ULP Reviewed-by: Rob Herring <[email protected]> Signed-off-by: Peng Fan <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]>
1 parent 690acef commit 1619a09

File tree

1 file changed

+31
-5
lines changed

1 file changed

+31
-5
lines changed

Documentation/devicetree/bindings/gpio/gpio-vf610.yaml

Lines changed: 31 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,23 +20,25 @@ description: |
2020
properties:
2121
compatible:
2222
oneOf:
23+
- const: fsl,imx8ulp-gpio
2324
- const: fsl,vf610-gpio
2425
- items:
2526
- const: fsl,imx7ulp-gpio
2627
- const: fsl,vf610-gpio
2728
- items:
2829
- enum:
2930
- fsl,imx93-gpio
30-
- fsl,imx8ulp-gpio
31-
- const: fsl,imx7ulp-gpio
31+
- const: fsl,imx8ulp-gpio
3232

3333
reg:
34-
description: The first reg tuple represents the PORT module, the second tuple
35-
represents the GPIO module.
34+
minItems: 1
3635
maxItems: 2
3736

3837
interrupts:
39-
maxItems: 1
38+
items:
39+
- description: GPIO Trustzone non-secure interrupt number
40+
- description: GPIO Trustzone secure interrupt number
41+
minItems: 1
4042

4143
interrupt-controller: true
4244

@@ -78,6 +80,30 @@ required:
7880
- "#gpio-cells"
7981
- gpio-controller
8082

83+
allOf:
84+
- if:
85+
properties:
86+
compatible:
87+
contains:
88+
enum:
89+
- fsl,vf610-gpio
90+
- fsl,imx7ulp-gpio
91+
then:
92+
properties:
93+
interrupts:
94+
maxItems: 1
95+
reg:
96+
items:
97+
- description: PORT register base address
98+
- description: GPIO register base address
99+
else:
100+
properties:
101+
interrupts:
102+
minItems: 2
103+
reg:
104+
items:
105+
- description: GPIO register base address
106+
81107
additionalProperties: false
82108

83109
examples:

0 commit comments

Comments
 (0)