Skip to contentSkip to conversation

Convert few Tegra docs to json-schema

PATCH Applied Sameer Pujar 3 participants 9 messages Nov 6, 2020 – Nov 10, 2020

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

v2 cover Convert few Tegra docs to json-schema

Following are the summary of changes.
* Update ADMA device node names for some of Tegra210 DT files.
* Convert ADMA, AGIC and ACONNECT docs to YAML.

Changelog
=========

v1 -> v2:
---------
* No change in DT patch.
* Add min/max items for interrupts and clocks in ADMA schema. Add required 'additionalProperty' and thus fix errors/warnings in the schema.
* Fix indentation warnings in arm,gic.yaml for AGIC documentation. With this fix add "Reviewed-by" tag from Rob.
* Drop individual child pattern properties for ACONNECT schema and instead use generic pattern property.

Sameer Pujar (4):
arm64: tegra: Rename ADMA device nodes for Tegra210
dt-bindings: dma: Convert ADMA doc to json-schema
dt-bindings: interrupt-controller: arm,gic: Update Tegra compatibles
dt-bindings: bus: Convert ACONNECT doc to json-schema

 .../bindings/bus/nvidia,tegra210-aconnect.txt      | 44 ----------
 .../bindings/bus/nvidia,tegra210-aconnect.yaml     | 82 ++++++++++++++++++
 .../bindings/dma/nvidia,tegra210-adma.txt          | 56 ------------
 .../bindings/dma/nvidia,tegra210-adma.yaml         | 99 ++++++++++++++++++++++
 .../bindings/interrupt-controller/arm,gic.yaml     |  9 +-
 arch/arm64/boot/dts/nvidia/tegra210-p2371-2180.dts |  2 +-
 arch/arm64/boot/dts/nvidia/tegra210-p3450-0000.dts |  2 +-
 arch/arm64/boot/dts/nvidia/tegra210-smaug.dts      |  2 +-
 arch/arm64/boot/dts/nvidia/tegra210.dtsi           |  2 +-
 9 files changed, 193 insertions(+), 105 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/bus/nvidia,tegra210-aconnect.txt
 create mode 100644 Documentation/devicetree/bindings/bus/nvidia,tegra210-aconnect.yaml
 delete mode 100644 Documentation/devicetree/bindings/dma/nvidia,tegra210-adma.txt
 create mode 100644 Documentation/devicetree/bindings/dma/nvidia,tegra210-adma.yaml
Signature · 1 line
2.7.4
#1 lore raw

PATCH v2 1/4 arm64: tegra: Rename ADMA device nodes for Tegra210

DMA device nodes should follow regex pattern of "^dma-controller(@.*)?$". This is a preparatory patch to use YAML doc format for ADMA.

---
 arch/arm64/boot/dts/nvidia/tegra210-p2371-2180.dts | 2 +-
 arch/arm64/boot/dts/nvidia/tegra210-p3450-0000.dts | 2 +-
 arch/arm64/boot/dts/nvidia/tegra210-smaug.dts      | 2 +-
 arch/arm64/boot/dts/nvidia/tegra210.dtsi           | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)
arch/arm64/boot/dts/nvidia/tegra210-p2371-2180.dts +1 -1
index dab24b4..e9f8410 100644
@@ -120,7 +120,7 @@
 	aconnect@702c0000 {
 		status = "okay";
 
-		dma@702e2000 {
+		dma-controller@702e2000 {
 			status = "okay";
 		};
 
arch/arm64/boot/dts/nvidia/tegra210-p3450-0000.dts +1 -1
index 1216b65c8..f8e8bcf 100644
@@ -630,7 +630,7 @@
 	aconnect@702c0000 {
 		status = "okay";
 
-		dma@702e2000 {
+		dma-controller@702e2000 {
 			status = "okay";
 		};
 
arch/arm64/boot/dts/nvidia/tegra210-smaug.dts +1 -1
index bd78378..131c064 100644
@@ -1717,7 +1717,7 @@
 	aconnect@702c0000 {
 		status = "okay";
 
-		dma@702e2000 {
+		dma-controller@702e2000 {
 			status = "okay";
 		};
 
arch/arm64/boot/dts/nvidia/tegra210.dtsi +1 -1
index d47c889..d41eb12 100644
@@ -1344,7 +1344,7 @@
 		ranges = <0x702c0000 0x0 0x702c0000 0x00040000>;
 		status = "disabled";
 
-		adma: dma@702e2000 {
+		adma: dma-controller@702e2000 {
 			compatible = "nvidia,tegra210-adma";
 			reg = <0x702e2000 0x2000>;
 			interrupt-parent = <&agic>;
Signature · 1 line
2.7.4
#2 lore raw

Re: [PATCH v2 1/4] arm64: tegra: Rename ADMA device nodes for Tegra210

Quoted 10 lines · Sameer Pujar

DMA device nodes should follow regex pattern of "^dma-controller(@.*)?$". This is a preparatory patch to use YAML doc format for ADMA.

---
 arch/arm64/boot/dts/nvidia/tegra210-p2371-2180.dts | 2 +-
 arch/arm64/boot/dts/nvidia/tegra210-p3450-0000.dts | 2 +-
 arch/arm64/boot/dts/nvidia/tegra210-smaug.dts      | 2 +-
 arch/arm64/boot/dts/nvidia/tegra210.dtsi           | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

Applied, thanks.

Thierry

#3 lore raw

PATCH v2 2/4 dt-bindings: dma: Convert ADMA doc to json-schema

In reply to Sameer Pujar

Move ADMA documentation to YAML format.

---
 .../bindings/dma/nvidia,tegra210-adma.txt          | 56 ------------
 .../bindings/dma/nvidia,tegra210-adma.yaml         | 99 ++++++++++++++++++++++
 2 files changed, 99 insertions(+), 56 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/dma/nvidia,tegra210-adma.txt
 create mode 100644 Documentation/devicetree/bindings/dma/nvidia,tegra210-adma.yaml
Documentation/devicetree/bindings/dma/nvidia,tegra210-adma.txt deleted +0 -56
deleted file mode 100644
index 245d306..0000000
@@ -1,56 +0,0 @@
-* NVIDIA Tegra Audio DMA (ADMA) controller
-
-The Tegra Audio DMA controller that is used for transferring data
-between system memory and the Audio Processing Engine (APE).
-
-Required properties:
-- compatible: Should contain one of the following:
-  - "nvidia,tegra210-adma": for Tegra210
-  - "nvidia,tegra186-adma": for Tegra186 and Tegra194
-- reg: Should contain DMA registers location and length. This should be
-  a single entry that includes all of the per-channel registers in one
-  contiguous bank.
-- interrupts: Should contain all of the per-channel DMA interrupts in
-  ascending order with respect to the DMA channel index.
-- clocks: Must contain one entry for the ADMA module clock
-  (TEGRA210_CLK_D_AUDIO).
-- clock-names: Must contain the name "d_audio" for the corresponding
-  'clocks' entry.
-- #dma-cells : Must be 1. The first cell denotes the receive/transmit
-  request number and should be between 1 and the maximum number of
-  requests supported. This value corresponds to the RX/TX_REQUEST_SELECT
-  fields in the ADMA_CHn_CTRL register.
-
-
-Example:
-
-adma: dma@702e2000 {
-	compatible = "nvidia,tegra210-adma";
-	reg = <0x0 0x702e2000 0x0 0x2000>;
-	interrupt-parent = <&tegra_agic>;
-	interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>,
-		     <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>,
-		     <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>,
-		     <GIC_SPI 27 IRQ_TYPE_LEVEL_HIGH>,
-		     <GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH>,
-		     <GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>,
-		     <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>,
-		     <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>,
-		     <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>,
-		     <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>,
-		     <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>,
-		     <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>,
-		     <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>,
-		     <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>,
-		     <GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>,
-		     <GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>,
-		     <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>,
-		     <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>,
-		     <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>,
-		     <GIC_SPI 43 IRQ_TYPE_LEVEL_HIGH>,
-		     <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>,
-		     <GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH>;
-	clocks = <&tegra_car TEGRA210_CLK_D_AUDIO>;
-	clock-names = "d_audio";
-	#dma-cells = <1>;
-};
Documentation/devicetree/bindings/dma/nvidia,tegra210-adma.yaml new file +99 -0

99 lines not on this page · raw message

Signature · 1 line
2.7.4
maintainer Reviewed-by on v2 2/4
#4 lore raw

Re: [PATCH v2 2/4] dt-bindings: dma: Convert ADMA doc to json-schema

Quoted 10 lines · Sameer Pujar

Move ADMA documentation to YAML format.

---
 .../bindings/dma/nvidia,tegra210-adma.txt          | 56 ------------
 .../bindings/dma/nvidia,tegra210-adma.yaml         | 99 ++++++++++++++++++++++
 2 files changed, 99 insertions(+), 56 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/dma/nvidia,tegra210-adma.txt
 create mode 100644 Documentation/devicetree/bindings/dma/nvidia,tegra210-adma.yaml
#5 lore raw

Re: [PATCH v2 2/4] dt-bindings: dma: Convert ADMA doc to json-schema

In reply to Sameer Pujar
Quoted 9 lines · Sameer Pujar

Move ADMA documentation to YAML format.

---
 .../bindings/dma/nvidia,tegra210-adma.txt          | 56 ------------
 .../bindings/dma/nvidia,tegra210-adma.yaml         | 99 ++++++++++++++++++++++
 2 files changed, 99 insertions(+), 56 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/dma/nvidia,tegra210-adma.txt
 create mode 100644 Documentation/devicetree/bindings/dma/nvidia,tegra210-adma.yaml

Applied, thanks.

Thierry

#6 lore raw

PATCH v2 3/4 dt-bindings: interrupt-controller: arm,gic: Update Tegra compatibles

In reply to Sameer Pujar

Update Tegra compatibles to support newer Tegra chips and required combinations.

---
 .../devicetree/bindings/interrupt-controller/arm,gic.yaml        | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/interrupt-controller/arm,gic.yaml +8 -1
index 0688996..ba282f4 100644
@@ -35,7 +35,6 @@ properties:
               - arm,gic-400
               - arm,pl390
               - arm,tc11mp-gic
-              - nvidia,tegra210-agic
               - qcom,msm-8660-qgic
               - qcom,msm-qgic2
 
@@ -53,6 +52,14 @@ properties:
           - const: brcm,brahma-b15-gic
           - const: arm,cortex-a15-gic
 
+      - oneOf:
+          - const: nvidia,tegra210-agic
+          - items:
+              - enum:
+                  - nvidia,tegra186-agic
+                  - nvidia,tegra194-agic
+              - const: nvidia,tegra210-agic
+
   interrupt-controller: true
 
   "#address-cells":
Signature · 1 line
2.7.4
#7 lore raw

PATCH v2 4/4 dt-bindings: bus: Convert ACONNECT doc to json-schema

In reply to Sameer Pujar

Move ACONNECT documentation to YAML format.

---
 .../bindings/bus/nvidia,tegra210-aconnect.txt      | 44 ------------
 .../bindings/bus/nvidia,tegra210-aconnect.yaml     | 82 ++++++++++++++++++++++
 2 files changed, 82 insertions(+), 44 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/bus/nvidia,tegra210-aconnect.txt
 create mode 100644 Documentation/devicetree/bindings/bus/nvidia,tegra210-aconnect.yaml
Documentation/devicetree/bindings/bus/nvidia,tegra210-aconnect.txt deleted +0 -44
deleted file mode 100644
index 3108d03..0000000
@@ -1,44 +0,0 @@
-NVIDIA Tegra ACONNECT Bus
-
-The Tegra ACONNECT bus is an AXI switch which is used to connnect various
-components inside the Audio Processing Engine (APE). All CPU accesses to
-the APE subsystem go through the ACONNECT via an APB to AXI wrapper.
-
-Required properties:
-- compatible: Must be "nvidia,tegra210-aconnect".
-- clocks: Must contain the entries for the APE clock (TEGRA210_CLK_APE),
-  and APE interface clock (TEGRA210_CLK_APB2APE).
-- clock-names: Must contain the names "ape" and "apb2ape" for the corresponding
-  'clocks' entries.
-- power-domains: Must contain a phandle that points to the audio powergate
-  (namely 'aud') for Tegra210.
-- #address-cells: The number of cells used to represent physical base addresses
-  in the aconnect address space. Should be 1.
-- #size-cells: The number of cells used to represent the size of an address
-  range in the aconnect address space. Should be 1.
-- ranges: Mapping of the aconnect address space to the CPU address space.
-
-All devices accessed via the ACONNNECT are described by child-nodes.
-
-Example:
-
-	aconnect@702c0000 {
-		compatible = "nvidia,tegra210-aconnect";
-		clocks = <&tegra_car TEGRA210_CLK_APE>,
-			 <&tegra_car TEGRA210_CLK_APB2APE>;
-		clock-names = "ape", "apb2ape";
-		power-domains = <&pd_audio>;
-
-		#address-cells = <1>;
-		#size-cells = <1>;
-		ranges = <0x702c0000 0x0 0x702c0000 0x00040000>;
-
-
-		child1 {
-			...
-		};
-
-		child2 {
-			...
-		};
-	};
Documentation/devicetree/bindings/bus/nvidia,tegra210-aconnect.yaml new file +82 -0

82 lines not on this page · raw message

Signature · 1 line
2.7.4
maintainer Reviewed-by on v2 4/4
#8 lore raw

Re: [PATCH v2 4/4] dt-bindings: bus: Convert ACONNECT doc to json-schema

Quoted 10 lines · Sameer Pujar

Move ACONNECT documentation to YAML format.

---
 .../bindings/bus/nvidia,tegra210-aconnect.txt      | 44 ------------
 .../bindings/bus/nvidia,tegra210-aconnect.yaml     | 82 ++++++++++++++++++++++
 2 files changed, 82 insertions(+), 44 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/bus/nvidia,tegra210-aconnect.txt
 create mode 100644 Documentation/devicetree/bindings/bus/nvidia,tegra210-aconnect.yaml