| 1 |
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) |
| 2 |
%YAML 1.2 |
| 3 |
--- |
| 4 |
$id: http://devicetree.org/schemas/pinctrl/brcm,iproc-gpio.yaml# |
| 5 |
$schema: http://devicetree.org/meta-schemas/core.yaml# |
| 6 |
|
| 7 |
title: Broadcom iProc GPIO/PINCONF Controller |
| 8 |
|
| 9 |
maintainers: |
| 10 |
- Ray Jui <[email protected]> |
| 11 |
- Scott Branden <[email protected]> |
| 12 |
|
| 13 |
properties: |
| 14 |
compatible: |
| 15 |
oneOf: |
| 16 |
- enum: |
| 17 |
- brcm,cygnus-asiu-gpio |
| 18 |
- brcm,cygnus-ccm-gpio |
| 19 |
- brcm,cygnus-crmu-gpio |
| 20 |
- brcm,iproc-gpio |
| 21 |
- brcm,iproc-stingray-gpio |
| 22 |
- items: |
| 23 |
- enum: |
| 24 |
- brcm,iproc-hr2-gpio |
| 25 |
- brcm,iproc-nsp-gpio |
| 26 |
- const: brcm,iproc-gpio |
| 27 |
|
| 28 |
reg: |
| 29 |
minItems: 1 |
| 30 |
items: |
| 31 |
- description: GPIO Bank registers |
| 32 |
- description: IO Ctrl registers |
| 33 |
|
| 34 |
"#gpio-cells": |
| 35 |
const: 2 |
| 36 |
|
| 37 |
gpio-controller: true |
| 38 |
|
| 39 |
gpio-ranges: true |
| 40 |
|
| 41 |
ngpios: true |
| 42 |
|
| 43 |
"#interrupt-cells": |
| 44 |
const: 2 |
| 45 |
|
| 46 |
interrupts: |
| 47 |
maxItems: 1 |
| 48 |
|
| 49 |
interrupt-controller: true |
| 50 |
|
| 51 |
required: |
| 52 |
- compatible |
| 53 |
- reg |
| 54 |
- "#gpio-cells" |
| 55 |
- gpio-controller |
| 56 |
- ngpios |
| 57 |
|
| 58 |
patternProperties: |
| 59 |
'-pins$': |
| 60 |
type: object |
| 61 |
additionalProperties: |
| 62 |
description: Pin configuration child nodes. |
| 63 |
allOf: |
| 64 |
- $ref: pincfg-node.yaml# |
| 65 |
- $ref: pinmux-node.yaml# |
| 66 |
additionalProperties: false |
| 67 |
|
| 68 |
properties: |
| 69 |
pins: |
| 70 |
items: |
| 71 |
pattern: '^gpio-' |
| 72 |
|
| 73 |
bias-disable: true |
| 74 |
bias-pull-up: true |
| 75 |
bias-pull-down: true |
| 76 |
|
| 77 |
drive-strength: |
| 78 |
enum: [ 2, 4, 6, 8, 10, 12, 14, 16 ] |
| 79 |
|
| 80 |
required: |
| 81 |
- pins |
| 82 |
|
| 83 |
additionalProperties: false |
| 84 |
|
| 85 |
examples: |
| 86 |
- | |
| 87 |
#include <dt-bindings/interrupt-controller/arm-gic.h> |
| 88 |
|
| 89 |
gpio@1800a000 { |
| 90 |
compatible = "brcm,cygnus-ccm-gpio"; |
| 91 |
reg = <0x1800a000 0x50>, |
| 92 |
<0x0301d164 0x20>; |
| 93 |
ngpios = <24>; |
| 94 |
#gpio-cells = <2>; |
| 95 |
gpio-controller; |
| 96 |
#interrupt-cells = <2>; |
| 97 |
interrupts = <GIC_SPI 84 IRQ_TYPE_LEVEL_HIGH>; |
| 98 |
interrupt-controller; |
| 99 |
|
| 100 |
touch-pins { |
| 101 |
pwr { |
| 102 |
pins = "gpio-0"; |
| 103 |
drive-strength = <16>; |
| 104 |
}; |
| 105 |
|
| 106 |
event { |
| 107 |
pins = "gpio-1"; |
| 108 |
bias-pull-up; |
| 109 |
}; |
| 110 |
}; |
| 111 |
}; |