| 1 |
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) |
| 2 |
%YAML 1.2 |
| 3 |
--- |
| 4 |
$id: http://devicetree.org/schemas/gpio/gpio-vf610.yaml# |
| 5 |
$schema: http://devicetree.org/meta-schemas/core.yaml# |
| 6 |
|
| 7 |
title: Freescale VF610 PORT/GPIO module |
| 8 |
|
| 9 |
maintainers: |
| 10 |
- Stefan Agner <[email protected]> |
| 11 |
|
| 12 |
description: | |
| 13 |
The Freescale PORT/GPIO modules are two adjacent modules providing GPIO |
| 14 |
functionality. Each pair serves 32 GPIOs. The VF610 has 5 instances of |
| 15 |
each, and each PORT module has its own interrupt. |
| 16 |
|
| 17 |
Note: Each GPIO port should have an alias correctly numbered in "aliases" |
| 18 |
node. |
| 19 |
|
| 20 |
properties: |
| 21 |
compatible: |
| 22 |
oneOf: |
| 23 |
- const: fsl,imx8ulp-gpio |
| 24 |
- const: fsl,vf610-gpio |
| 25 |
- items: |
| 26 |
- const: fsl,imx7ulp-gpio |
| 27 |
- const: fsl,vf610-gpio |
| 28 |
- items: |
| 29 |
- enum: |
| 30 |
- fsl,imx93-gpio |
| 31 |
- fsl,imx94-gpio |
| 32 |
- fsl,imx95-gpio |
| 33 |
- const: fsl,imx8ulp-gpio |
| 34 |
|
| 35 |
reg: |
| 36 |
minItems: 1 |
| 37 |
maxItems: 2 |
| 38 |
|
| 39 |
interrupts: |
| 40 |
items: |
| 41 |
- description: GPIO Trustzone non-secure interrupt number |
| 42 |
- description: GPIO Trustzone secure interrupt number |
| 43 |
minItems: 1 |
| 44 |
|
| 45 |
interrupt-controller: true |
| 46 |
|
| 47 |
"#interrupt-cells": |
| 48 |
const: 2 |
| 49 |
|
| 50 |
"#gpio-cells": |
| 51 |
const: 2 |
| 52 |
|
| 53 |
gpio-controller: true |
| 54 |
|
| 55 |
gpio-line-names: |
| 56 |
minItems: 1 |
| 57 |
maxItems: 32 |
| 58 |
|
| 59 |
clocks: |
| 60 |
items: |
| 61 |
- description: SoC GPIO clock |
| 62 |
- description: SoC PORT clock |
| 63 |
|
| 64 |
clock-names: |
| 65 |
items: |
| 66 |
- const: gpio |
| 67 |
- const: port |
| 68 |
|
| 69 |
gpio-ranges: |
| 70 |
minItems: 1 |
| 71 |
maxItems: 4 |
| 72 |
|
| 73 |
gpio-reserved-ranges: true |
| 74 |
|
| 75 |
ngpios: |
| 76 |
minimum: 1 |
| 77 |
maximum: 32 |
| 78 |
default: 32 |
| 79 |
|
| 80 |
patternProperties: |
| 81 |
"^.+-hog(-[0-9]+)?$": |
| 82 |
type: object |
| 83 |
|
| 84 |
required: |
| 85 |
- gpio-hog |
| 86 |
|
| 87 |
required: |
| 88 |
- compatible |
| 89 |
- reg |
| 90 |
- interrupts |
| 91 |
- interrupt-controller |
| 92 |
- "#interrupt-cells" |
| 93 |
- "#gpio-cells" |
| 94 |
- gpio-controller |
| 95 |
|
| 96 |
allOf: |
| 97 |
- if: |
| 98 |
properties: |
| 99 |
compatible: |
| 100 |
contains: |
| 101 |
enum: |
| 102 |
- fsl,vf610-gpio |
| 103 |
- fsl,imx7ulp-gpio |
| 104 |
then: |
| 105 |
properties: |
| 106 |
interrupts: |
| 107 |
maxItems: 1 |
| 108 |
reg: |
| 109 |
items: |
| 110 |
- description: PORT register base address |
| 111 |
- description: GPIO register base address |
| 112 |
else: |
| 113 |
properties: |
| 114 |
interrupts: |
| 115 |
minItems: 2 |
| 116 |
reg: |
| 117 |
items: |
| 118 |
- description: GPIO register base address |
| 119 |
|
| 120 |
additionalProperties: false |
| 121 |
|
| 122 |
examples: |
| 123 |
- | |
| 124 |
#include <dt-bindings/interrupt-controller/arm-gic.h> |
| 125 |
|
| 126 |
gpio1: gpio@40049000 { |
| 127 |
compatible = "fsl,vf610-gpio"; |
| 128 |
reg = <0x40049000 0x1000>, <0x400ff000 0x40>; |
| 129 |
interrupts = <0 107 IRQ_TYPE_LEVEL_HIGH>; |
| 130 |
gpio-controller; |
| 131 |
#gpio-cells = <2>; |
| 132 |
interrupt-controller; |
| 133 |
#interrupt-cells = <2>; |
| 134 |
gpio-ranges = <&iomuxc 0 0 32>; |
| 135 |
}; |