Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 67 additions & 0 deletions Documentation/devicetree/bindings/gpio/phytium,sgpio.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/gpio/phytium,sgpio.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Phytium SGPIO controller

description: |
This SGPIO controller is for Phytium Pe220x SoCs, which supports up to
96 (32x3) Serial GPIOs.

maintainers:
- Chen Baozi <chenbaozi@phytium.com.cn>

properties:
compatible:
const: phytium,sgpio

reg:
maxItems: 1
description: Address and length of the register set for the device.

gpio-controller: true

'#gpio-cells':
const: 2
description: |
The first cell is the pin number and the second cell is used to specify
the gpio polarity.
0 = active high
1 = active low

interrupts:
maxItems: 1

ngpios: true

bus-frequency: true

clocks:
maxItems: 1

additionalProperties: false

required:
- compatible
- reg
- gpio-controller
- '#gpio-cells'
- interrupts
- ngpios
- clocks
- bus-frequency

examples:
- |
sgpio: sgpio@2807d000 {
compatible = "phytium,sgpio";
reg = <0x0 0x2807d000 0x0 0x1000>;
interrupts = <GIC_SPI 190 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&sysclk_48mhz>;
ngpios = <96>;
bus-frequency = <48000>;
gpio-controller;
#gpio-cells = <2>;
};
9 changes: 9 additions & 0 deletions drivers/gpio/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -499,6 +499,15 @@ config GPIO_OMAP
help
Say yes here to enable GPIO support for TI OMAP SoCs.

config GPIO_PHYTIUM_SGPIO
tristate "Phytium SGPIO support"
default y if ARCH_PHYTIUM
depends on ARM64
select IRQ_DOMAIN
select GENERIC_IRQ_CHIP
help
Say yes here to enable SGPIO support for Phytium SoCs.

config GPIO_PHYTIUM_PLAT
tristate "Phytium GPIO Platform support"
default y if ARCH_PHYTIUM
Expand Down
1 change: 1 addition & 0 deletions drivers/gpio/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ obj-$(CONFIG_GPIO_PCF857X) += gpio-pcf857x.o
obj-$(CONFIG_GPIO_PCH) += gpio-pch.o
obj-$(CONFIG_GPIO_PCIE_IDIO_24) += gpio-pcie-idio-24.o
obj-$(CONFIG_GPIO_PCI_IDIO_16) += gpio-pci-idio-16.o
obj-$(CONFIG_GPIO_PHYTIUM_SGPIO) += gpio-phytium-sgpio.o
obj-$(CONFIG_GPIO_PHYTIUM_CORE) += gpio-phytium-core.o
obj-$(CONFIG_GPIO_PHYTIUM_PCI) += gpio-phytium-pci.o
obj-$(CONFIG_GPIO_PHYTIUM_PLAT) += gpio-phytium-platform.o
Expand Down
Loading