-
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: spi: convert rockchip spi bindings to yaml
Current dts files with 'spi' nodes are manually verified. In order to automate this process spi-rockchip.txt has to be converted to yaml. In the new setup spi-rockchip.yaml will inherit properties from spi-controller.yaml. Add document to MAINTAINERS. Also rk3188.dtsi, rk3288.dtsi, rk3368.dtsi and rk3399.dtsi use an extra fallback string, so change this in the documentation. Changed: "rockchip,rk3188-spi", "rockchip,rk3066-spi" "rockchip,rk3288-spi", "rockchip,rk3066-spi" "rockchip,rk3368-spi", "rockchip,rk3066-spi" "rockchip,rk3399-spi", "rockchip,rk3066-spi" Signed-off-by: Johan Jonker <jbx6244@gmail.com> Link: https://lore.kernel.org/r/20200304184203.9548-1-jbx6244@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
- Loading branch information
Johan Jonker
authored and
Mark Brown
committed
Mar 5, 2020
1 parent
29d2daf
commit 5de0417
Showing
3 changed files
with
106 additions
and
58 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
105 changes: 105 additions & 0 deletions
105
Documentation/devicetree/bindings/spi/spi-rockchip.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,105 @@ | ||
# SPDX-License-Identifier: GPL-2.0 | ||
%YAML 1.2 | ||
--- | ||
$id: http://devicetree.org/schemas/spi/spi-rockchip.yaml# | ||
$schema: http://devicetree.org/meta-schemas/core.yaml# | ||
|
||
title: Rockchip SPI Controller | ||
|
||
description: | ||
The Rockchip SPI controller is used to interface with various devices such | ||
as flash and display controllers using the SPI communication interface. | ||
|
||
allOf: | ||
- $ref: "spi-controller.yaml#" | ||
|
||
maintainers: | ||
- Heiko Stuebner <heiko@sntech.de> | ||
|
||
# Everything else is described in the common file | ||
properties: | ||
compatible: | ||
oneOf: | ||
- const: rockchip,rk3036-spi | ||
- const: rockchip,rk3066-spi | ||
- const: rockchip,rk3228-spi | ||
- const: rockchip,rv1108-spi | ||
- items: | ||
- enum: | ||
- rockchip,px30-spi | ||
- rockchip,rk3188-spi | ||
- rockchip,rk3288-spi | ||
- rockchip,rk3368-spi | ||
- rockchip,rk3399-spi | ||
- const: rockchip,rk3066-spi | ||
|
||
reg: | ||
maxItems: 1 | ||
|
||
interrupts: | ||
maxItems: 1 | ||
|
||
clocks: | ||
items: | ||
- description: transfer-clock | ||
- description: peripheral clock | ||
|
||
clock-names: | ||
items: | ||
- const: spiclk | ||
- const: apb_pclk | ||
|
||
dmas: | ||
items: | ||
- description: TX DMA Channel | ||
- description: RX DMA Channel | ||
|
||
dma-names: | ||
items: | ||
- const: tx | ||
- const: rx | ||
|
||
rx-sample-delay-ns: | ||
default: 0 | ||
description: | ||
Nano seconds to delay after the SCLK edge before sampling Rx data | ||
(may need to be fine tuned for high capacitance lines). | ||
If not specified 0 will be used. | ||
|
||
pinctrl-names: | ||
minItems: 1 | ||
items: | ||
- const: default | ||
- const: sleep | ||
description: | ||
Names for the pin configuration(s); may be "default" or "sleep", | ||
where the "sleep" configuration may describe the state | ||
the pins should be in during system suspend. | ||
|
||
required: | ||
- compatible | ||
- reg | ||
- interrupts | ||
- clocks | ||
- clock-names | ||
|
||
examples: | ||
- | | ||
#include <dt-bindings/clock/rk3188-cru-common.h> | ||
#include <dt-bindings/interrupt-controller/arm-gic.h> | ||
#include <dt-bindings/interrupt-controller/irq.h> | ||
spi0: spi@ff110000 { | ||
compatible = "rockchip,rk3066-spi"; | ||
reg = <0xff110000 0x1000>; | ||
interrupts = <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>; | ||
clocks = <&cru SCLK_SPI0>, <&cru PCLK_SPI0>; | ||
clock-names = "spiclk", "apb_pclk"; | ||
dmas = <&pdma1 11>, <&pdma1 12>; | ||
dma-names = "tx", "rx"; | ||
pinctrl-0 = <&spi1_pins>; | ||
pinctrl-1 = <&spi1_sleep>; | ||
pinctrl-names = "default", "sleep"; | ||
rx-sample-delay-ns = <10>; | ||
#address-cells = <1>; | ||
#size-cells = <0>; | ||
}; |
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