Skip to contentSkip to conversation

Add support for Tegra210 ACONNECT bus

PATCH Superseded Jon Hunter 2 participants 7 messages May 10, 2016 – May 16, 2016

Subsystems (2)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Jon Hunter

author maintainer
#0 lore raw

v2 cover Add support for Tegra210 ACONNECT bus

Add support for the ACONNECT bus which is part of the audio sub-system on Tegra210.

Changes from V1:
- Updated ACONNECT DT binding documentation and DT binding per feedback from Rob H.
- Added patch to populate the audio power-domain which is needed to successfully build the DT blob (this was missed as it was part of my local testing tree).

Jon Hunter (4):
dt-bindings: bus: Add documentation for Tegra210 ACONNECT
bus: Add support for Tegra ACONNECT
ARM64: tegra: Add audio PM domain device node for Tegra210
arm64: tegra: Add ACONNECT bus node for Tegra210

 .../bindings/bus/nvidia,tegra210-aconnect.txt      |  45 ++++++++
 arch/arm64/boot/dts/nvidia/tegra210.dtsi           |  21 ++++
 drivers/bus/Kconfig                                |   9 ++
 drivers/bus/Makefile                               |   1 +
 drivers/bus/tegra-aconnect.c                       | 113 +++++++++++++++++++++
 5 files changed, 189 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/bus/nvidia,tegra210-aconnect.txt
 create mode 100644 drivers/bus/tegra-aconnect.c
Signature · 6 lines
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
author maintainer
#1 lore raw

PATCH v2 1/4 dt-bindings: bus: Add documentation for Tegra210 ACONNECT

Add binding documentation for the Tegra ACONNECT bus that is part of the Audio Processing Engine (APE) on Tegra210. The ACONNECT bus is used to access devices within the APE subsystem. The APE is located in a separate power domain and so accesses made to the ACONNECT require the power domain to be enabled as well as some platform specific clocks.

---
 .../bindings/bus/nvidia,tegra210-aconnect.txt      | 45 ++++++++++++++++++++++
 1 file changed, 45 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/bus/nvidia,tegra210-aconnect.txt
Documentation/devicetree/bindings/bus/nvidia,tegra210-aconnect.txt new file +45 -0
new file mode 100644
index 000000000000..81668f588eca
@@ -0,0 +1,45 @@
+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 2.
+- #size-cells: The number of cells used to represent the size of an address
+  range in the aconnect address space. Should be 2.
+- 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>;
+
+		status = "disabled";
+
+		child1 {
+			...
+		};
+
+		child2 {
+			...
+		};
+	};
Signature · 1 line
2.1.4
maintainer Acked-by on v2 1/4
#2 lore raw

Re: [PATCH V2 1/4] dt-bindings: bus: Add documentation for Tegra210 ACONNECT

Quoted 26 lines · Jon Hunter

Add binding documentation for the Tegra ACONNECT bus that is part of the Audio Processing Engine (APE) on Tegra210. The ACONNECT bus is used to access devices within the APE subsystem. The APE is located in a separate power domain and so accesses made to the ACONNECT require the power domain to be enabled as well as some platform specific clocks.

---
 .../bindings/bus/nvidia,tegra210-aconnect.txt      | 45 ++++++++++++++++++++++
 1 file changed, 45 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/bus/nvidia,tegra210-aconnect.txt
Documentation/devicetree/bindings/bus/nvidia,tegra210-aconnect.txt new file +8 -0
new file mode 100644
index 000000000000..81668f588eca
@@ -0,0 +1,45 @@
+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".

Documentation/devicetree/bindings/bus/nvidia,tegra210-aconnect.txt line 18

Quoted 10 lines
Documentation/devicetree/bindings/bus/nvidia,tegra210-aconnect.txt new file +10 -0
+- 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 2.
+- #size-cells: The number of cells used to represent the size of an address
+  range in the aconnect address space. Should be 2.

You forgot to update these. With that,

Rob

author maintainer
#3 lore raw

Re: [PATCH V2 1/4] dt-bindings: bus: Add documentation for Tegra210 ACONNECT

Quoted 31 lines · Rob Herring
Quoted 30 lines · Jon Hunter

Add binding documentation for the Tegra ACONNECT bus that is part of the Audio Processing Engine (APE) on Tegra210. The ACONNECT bus is used to access devices within the APE subsystem. The APE is located in a separate power domain and so accesses made to the ACONNECT require the power domain to be enabled as well as some platform specific clocks.

---
 .../bindings/bus/nvidia,tegra210-aconnect.txt      | 45 ++++++++++++++++++++++
 1 file changed, 45 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/bus/nvidia,tegra210-aconnect.txt
Documentation/devicetree/bindings/bus/nvidia,tegra210-aconnect.txt new file +12 -0
new file mode 100644
index 000000000000..81668f588eca
@@ -0,0 +1,45 @@
+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.
Quoted 8 lines

Documentation/devicetree/bindings/bus/nvidia,tegra210-aconnect.txt line 18

Quoted 6 lines
Documentation/devicetree/bindings/bus/nvidia,tegra210-aconnect.txt new file +6 -0
+- 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 2.
+- #size-cells: The number of cells used to represent the size of an address
+  range in the aconnect address space. Should be 2.

You forgot to update these. With that,

Darn it, yes.

Quoted 1 line

Thanks!
Jon
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

author maintainer
#4 lore raw

PATCH v2 2/4 bus: Add support for Tegra ACONNECT

In reply to Jon Hunter

Add a bus driver for the Tegra ACONNECT which is used to interface to various devices within the Audio Processing Engine (APE). The purpose of the bus driver is to register child devices that are accessed via the ACONNECT bus and through the device parent child relationship, ensure that the appropriate power domain and clocks are enabled for the ACONNECT when any of the child devices are active. Hence, the ACONNECT driver simply enables runtime-pm for the ACONNECT device so that when a child device is resumed, it will enable the power-domain and clocks associated with the ACONNECT.

---
 drivers/bus/Kconfig          |   9 ++++
 drivers/bus/Makefile         |   1 +
 drivers/bus/tegra-aconnect.c | 113 +++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 123 insertions(+)
 create mode 100644 drivers/bus/tegra-aconnect.c
drivers/bus/Kconfig +9 -0
index f5ea153f53e9..4d5d75112ad2 100644
@@ -132,6 +132,15 @@ config SUNXI_RSB
 	  with various RSB based devices, such as AXP223, AXP8XX PMICs,
 	  and AC100/AC200 ICs.
 
+config TEGRA_ACONNECT
+	bool "Tegra ACONNECT Bus Driver"
+	depends on ARCH_TEGRA_210_SOC
+	depends on OF && PM
+	select PM_CLK
+	help
+	  Driver for the Tegra ACONNECT bus which is used to interface with
+	  the devices inside the Audio Processing Engine (APE) for Tegra210.
+
 config UNIPHIER_SYSTEM_BUS
 	tristate "UniPhier System Bus driver"
 	depends on ARCH_UNIPHIER && OF
drivers/bus/Makefile +1 -0
index ccff007ee7e8..ac84cc4348e3 100644
@@ -17,5 +17,6 @@ obj-$(CONFIG_OMAP_INTERCONNECT)	+= omap_l3_smx.o omap_l3_noc.o
 obj-$(CONFIG_OMAP_OCP2SCP)	+= omap-ocp2scp.o
 obj-$(CONFIG_SUNXI_RSB)		+= sunxi-rsb.o
 obj-$(CONFIG_SIMPLE_PM_BUS)	+= simple-pm-bus.o
+obj-$(CONFIG_TEGRA_ACONNECT)	+= tegra-aconnect.o
 obj-$(CONFIG_UNIPHIER_SYSTEM_BUS)	+= uniphier-system-bus.o
 obj-$(CONFIG_VEXPRESS_CONFIG)	+= vexpress-config.o
drivers/bus/tegra-aconnect.c new file +113 -0

113 lines not on this page · raw message

Signature · 1 line
2.1.4
author maintainer
#5 lore raw

PATCH v2 3/4 ARM64: tegra: Add audio PM domain device node for Tegra210

In reply to Jon Hunter

Add the device-tree node for the Tegra210 audio power-domain so that audio devices that are dependent on this power-domain can be populated.

---
 arch/arm64/boot/dts/nvidia/tegra210.dtsi | 9 +++++++++
 1 file changed, 9 insertions(+)
arch/arm64/boot/dts/nvidia/tegra210.dtsi +9 -0
index 76fe31faa1a5..d649aef0455f 100644
@@ -584,6 +584,15 @@
 		reg = <0x0 0x7000e400 0x0 0x400>;
 		clocks = <&tegra_car TEGRA210_CLK_PCLK>, <&clk32k_in>;
 		clock-names = "pclk", "clk32k_in";
+
+		powergates {
+			pd_audio: aud {
+				clocks = <&tegra_car TEGRA210_CLK_APE>,
+					 <&tegra_car TEGRA210_CLK_APB2APE>;
+				resets = <&tegra_car 198>;
+				#power-domain-cells = <0>;
+			};
+		};
 	};
 
 	fuse@7000f800 {
Signature · 1 line
2.1.4
author maintainer
#6 lore raw

PATCH v2 4/4 arm64: tegra: Add ACONNECT bus node for Tegra210

In reply to Jon Hunter

Add the ACONNECT bus node for Tegra210 which is used to interface to the various devices in the Audio Processing Engine (APE).

---
 arch/arm64/boot/dts/nvidia/tegra210.dtsi | 12 ++++++++++++
 1 file changed, 12 insertions(+)
arch/arm64/boot/dts/nvidia/tegra210.dtsi +12 -0
index d649aef0455f..4f1923542558 100644
@@ -682,6 +682,18 @@
 		#nvidia,mipi-calibrate-cells = <1>;
 	};
 
+	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>;
+		status = "disabled";
+	};
+
 	spi@70410000 {
 		compatible = "nvidia,tegra210-qspi";
 		reg = <0x0 0x70410000 0x0 0x1000>;
Signature · 1 line
2.1.4