-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #155 from hhhui-L/gpio
gpio: Add Phytium GPIO driver
- Loading branch information
Showing
8 changed files
with
1,012 additions
and
0 deletions.
There are no files selected for viewing
114 changes: 114 additions & 0 deletions
114
Documentation/devicetree/bindings/gpio/phytium,gpio.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,114 @@ | ||
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) | ||
%YAML 1.2 | ||
--- | ||
$id: http://devicetree.org/schemas/gpio/phytium,gpio.yaml# | ||
$schema: http://devicetree.org/meta-schemas/core.yaml# | ||
|
||
title: Phytium GPIO controller | ||
|
||
description: | | ||
Phytium GPIO controllers have one or two configurable ports, each of which | ||
are intended to be represented as child nodes with the generic GPIO-controller | ||
properties as desribed in this bindings file. | ||
maintainers: | ||
- Chen Baozi <[email protected]> | ||
|
||
properties: | ||
$nodename: | ||
pattern: "^gpio@[0-9a-f]+$" | ||
|
||
compatible: | ||
const: phytium,gpio | ||
|
||
reg: | ||
maxItems: 1 | ||
|
||
gpio-controller: true | ||
|
||
"#address-cells": | ||
const: 1 | ||
|
||
"#size-cells": | ||
const: 0 | ||
|
||
'#gpio-cells': | ||
const: 2 | ||
|
||
interrupts: | ||
description: | | ||
The interrupts to the parent controller raised when GPIOs generate | ||
the interrupts. If the controller provides one combined interrupt | ||
for all GPIOs, specify a single interrupt. If the controller provides | ||
one interrupt for each GPIO, provide a list of interrupts that | ||
correspond to each of the GPIO pins. | ||
minItems: 1 | ||
maxItems: 32 | ||
|
||
interrupt-controller: true | ||
|
||
'#interrupt-cells': | ||
const: 2 | ||
|
||
patternProperties: | ||
"^gpio-(port|controller)@[0-9a-f]+$": | ||
type: object | ||
properties: | ||
compatible: | ||
const: phytium,gpio-port | ||
|
||
reg: | ||
maxItems: 1 | ||
|
||
nr-gpios: | ||
$ref: /schemas/types.yaml#/definitions/uint32 | ||
description: The number of GPIO pins exported by the port. | ||
default: 32 | ||
minimum: 1 | ||
maximum: 32 | ||
|
||
required: | ||
- compatible | ||
- reg | ||
- gpio-controller | ||
- '#gpio-cells' | ||
|
||
dependencies: | ||
interrupt-controller: [ interrupts ] | ||
|
||
additionalProperties: false | ||
|
||
additionalProperties: false | ||
|
||
required: | ||
- compatible | ||
- reg | ||
- "#address-cells" | ||
- "#size-cells" | ||
|
||
examples: | ||
- | | ||
gpio: gpio@28004000 { | ||
compatible = "phytium,gpio"; | ||
reg = <0x0 0x28004000 0x0 0x1000>; | ||
gpio-controller; | ||
#gpio-cells = <2>; | ||
#address-cells = <1>; | ||
#size-cells = <0>; | ||
interrupts = <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>; | ||
interrupt-controller; | ||
#interrupt-cells = <2>; | ||
porta: gpio-port@0 { | ||
compatible = "phytium,gpio-port"; | ||
reg = <0>; | ||
nr-gpios = <8>; | ||
}; | ||
portb: gpio-port@1 { | ||
compatible = "phytium,gpio-port"; | ||
reg = <1>; | ||
nr-gpios = <8>; | ||
}; | ||
}; | ||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17424,7 +17424,9 @@ ARM/PHYTIUM SOC SUPPORT | |
M: Wang Yinfeng <[email protected]> | ||
S: Maintained | ||
W: https://gerrit.b.cpu.ac/c/linux | ||
F: Documentation/devicetree/bindings/gpio/phytium,gpio.yaml | ||
F: arch/arm64/boot/dts/phytium/* | ||
F: drivers/gpio/gpio-phytium* | ||
|
||
QAT DRIVER | ||
M: Giovanni Cabiddu <[email protected]> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.