-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dt-bindings: gpio: aspeed,ast2400-gpio: Convert to DT schema
Squash warnings such as: ``` arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-galaxy100.dtb: /ahb/apb@1e600000/gpio@1e780000: failed to match any schema with compatible: ['aspeed,ast2400-gpio'] ``` Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
- Loading branch information
Andrew Jeffery
authored and
Bartosz Golaszewski
committed
Mar 1, 2024
1 parent
8122c7c
commit 177f954
Showing
2 changed files
with
148 additions
and
39 deletions.
There are no files selected for viewing
148 changes: 148 additions & 0 deletions
148
Documentation/devicetree/bindings/gpio/aspeed,ast2400-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,148 @@ | ||
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) | ||
%YAML 1.2 | ||
--- | ||
$id: http://devicetree.org/schemas/gpio/aspeed,ast2400-gpio.yaml# | ||
$schema: http://devicetree.org/meta-schemas/core.yaml# | ||
|
||
title: Aspeed GPIO controller | ||
|
||
maintainers: | ||
- Andrew Jeffery <andrew@codeconstruct.com.au> | ||
|
||
properties: | ||
compatible: | ||
enum: | ||
- aspeed,ast2400-gpio | ||
- aspeed,ast2500-gpio | ||
- aspeed,ast2600-gpio | ||
|
||
reg: | ||
maxItems: 1 | ||
|
||
clocks: | ||
maxItems: 1 | ||
description: The clock to use for debounce timings | ||
|
||
gpio-controller: true | ||
gpio-line-names: | ||
minItems: 36 | ||
maxItems: 232 | ||
|
||
gpio-ranges: true | ||
|
||
"#gpio-cells": | ||
const: 2 | ||
|
||
interrupts: | ||
maxItems: 1 | ||
|
||
interrupt-controller: true | ||
|
||
"#interrupt-cells": | ||
const: 2 | ||
|
||
ngpios: | ||
minimum: 36 | ||
maximum: 232 | ||
|
||
required: | ||
- compatible | ||
- reg | ||
- interrupts | ||
- interrupt-controller | ||
- "#interrupt-cells" | ||
- gpio-controller | ||
- "#gpio-cells" | ||
|
||
allOf: | ||
- if: | ||
properties: | ||
compatible: | ||
contains: | ||
const: aspeed,ast2400-gpio | ||
then: | ||
properties: | ||
gpio-line-names: | ||
minItems: 220 | ||
maxItems: 220 | ||
ngpios: | ||
const: 220 | ||
- if: | ||
properties: | ||
compatible: | ||
contains: | ||
const: aspeed,ast2500-gpio | ||
then: | ||
properties: | ||
gpio-line-names: | ||
minItems: 232 | ||
maxItems: 232 | ||
ngpios: | ||
const: 232 | ||
- if: | ||
properties: | ||
compatible: | ||
contains: | ||
const: aspeed,ast2600-gpio | ||
then: | ||
properties: | ||
gpio-line-names: | ||
minItems: 36 | ||
maxItems: 208 | ||
ngpios: | ||
enum: [ 36, 208 ] | ||
required: | ||
- ngpios | ||
|
||
additionalProperties: false | ||
|
||
examples: | ||
- | | ||
gpio@1e780000 { | ||
compatible = "aspeed,ast2400-gpio"; | ||
reg = <0x1e780000 0x1000>; | ||
interrupts = <20>; | ||
interrupt-controller; | ||
#interrupt-cells = <2>; | ||
gpio-controller; | ||
#gpio-cells = <2>; | ||
}; | ||
- | | ||
gpio: gpio@1e780000 { | ||
compatible = "aspeed,ast2500-gpio"; | ||
reg = <0x1e780000 0x200>; | ||
interrupts = <20>; | ||
interrupt-controller; | ||
#interrupt-cells = <2>; | ||
gpio-controller; | ||
#gpio-cells = <2>; | ||
gpio-ranges = <&pinctrl 0 0 232>; | ||
}; | ||
- | | ||
#include <dt-bindings/clock/ast2600-clock.h> | ||
#include <dt-bindings/interrupt-controller/arm-gic.h> | ||
#include <dt-bindings/interrupt-controller/irq.h> | ||
gpio0: gpio@1e780000 { | ||
compatible = "aspeed,ast2600-gpio"; | ||
reg = <0x1e780000 0x400>; | ||
clocks = <&syscon ASPEED_CLK_APB2>; | ||
interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>; | ||
interrupt-controller; | ||
#interrupt-cells = <2>; | ||
#gpio-cells = <2>; | ||
gpio-controller; | ||
gpio-ranges = <&pinctrl 0 0 208>; | ||
ngpios = <208>; | ||
}; | ||
gpio1: gpio@1e780800 { | ||
compatible = "aspeed,ast2600-gpio"; | ||
reg = <0x1e780800 0x800>; | ||
clocks = <&syscon ASPEED_CLK_APB1>; | ||
interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>; | ||
interrupt-controller; | ||
#interrupt-cells = <2>; | ||
gpio-controller; | ||
#gpio-cells = <2>; | ||
gpio-ranges = <&pinctrl 0 208 36>; | ||
ngpios = <36>; | ||
}; |
This file was deleted.
Oops, something went wrong.