Skip to contentSkip to conversation

Tegra CEC Updates

PATCH Superseded Aaron Kling 2 participants 7 messages Apr 8, 2025

Subsystems (5)

v1 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

cover Tegra CEC Updates

This series updates Tegra hdmi cec support to be usable out of the box on Tegra210 through Tegra194.

---
Aaron Kling (4):
media: dt-bindings: Document Tegra186 and Tegra194 cec
media: tegra-cec: Support Tegra186 and Tegra194
arm64: tegra: Add CEC controller on Tegra210
arm64: tegra: Wire up cec to devkits

 .../devicetree/bindings/media/cec/nvidia,tegra114-cec.yaml       | 2 ++
 arch/arm64/boot/dts/nvidia/tegra186-p2771-0000.dts               | 6 ++++++
 arch/arm64/boot/dts/nvidia/tegra186-p3509-0000+p3636-0001.dts    | 6 ++++++
 arch/arm64/boot/dts/nvidia/tegra194-p2972-0000.dts               | 6 ++++++
 arch/arm64/boot/dts/nvidia/tegra194-p3509-0000.dtsi              | 6 ++++++
 arch/arm64/boot/dts/nvidia/tegra210-p2371-2180.dts               | 6 ++++++
 arch/arm64/boot/dts/nvidia/tegra210-p3450-0000.dts               | 6 ++++++
 arch/arm64/boot/dts/nvidia/tegra210.dtsi                         | 9 +++++++++
 drivers/media/cec/platform/tegra/tegra_cec.c                     | 2 ++
 9 files changed, 49 insertions(+)

---
base-commit: 0af2f6be1b4281385b618cb86ad946eded089ac8
change-id: 20250407-tegra-cec-7e3a7bef456f

Best regards,

Signature · 1 line
Aaron Kling <[email protected]>
#1 lore raw

PATCH 1/4 media: dt-bindings: Document Tegra186 and Tegra194 cec

These are already used in device trees, so describe them here.

---
 Documentation/devicetree/bindings/media/cec/nvidia,tegra114-cec.yaml | 2 ++
 1 file changed, 2 insertions(+)
Documentation/devicetree/bindings/media/cec/nvidia,tegra114-cec.yaml +2 -0
index a6b73498bc217a2e884e31af91e9d8845c9b1d76..27987bc428ea1a0db8dba4910727e1ce3fa3dab3 100644
@@ -18,6 +18,8 @@ properties:
       - nvidia,tegra114-cec
       - nvidia,tegra124-cec
       - nvidia,tegra210-cec
+      - nvidia,tegra186-cec
+      - nvidia,tegra194-cec
 
   clocks:
     maxItems: 1
Signature · 1 line
2.48.1
#3 lore raw

PATCH 2/4 media: tegra-cec: Support Tegra186 and Tegra194

In reply to Aaron Kling

The tegra186 and tegra194 controllers are working with the driver as-is, so add the compatibles to allow them to probe.

---
 drivers/media/cec/platform/tegra/tegra_cec.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/media/cec/platform/tegra/tegra_cec.c +2 -0
index 3ed50097262f64c32fe0480698cea9a1056a0953..aa3d36286d256d59f9d726e5c3cee5decacd1d23 100644
@@ -456,6 +456,8 @@ static const struct of_device_id tegra_cec_of_match[] = {
 	{ .compatible = "nvidia,tegra114-cec", },
 	{ .compatible = "nvidia,tegra124-cec", },
 	{ .compatible = "nvidia,tegra210-cec", },
+	{ .compatible = "nvidia,tegra186-cec", },
+	{ .compatible = "nvidia,tegra194-cec", },
 	{},
 };
 
Signature · 1 line
2.48.1
#5 lore raw

PATCH 3/4 arm64: tegra: Add CEC controller on Tegra210

In reply to Aaron Kling

The CEC controller found on Tegra210 can be used to control consumer devices using the HDMI CEC pin.

---
 arch/arm64/boot/dts/nvidia/tegra210.dtsi | 9 +++++++++
 1 file changed, 9 insertions(+)
arch/arm64/boot/dts/nvidia/tegra210.dtsi +9 -0
index b6c84d195c0ef9ae90721fada09ffd46a9c11fa3..402b0ede1472af625d9d9e811f5af306d436cc98 100644
@@ -959,6 +959,15 @@ fuse@7000f800 {
 		reset-names = "fuse";
 	};
 
+	cec@70015000 {
+		compatible = "nvidia,tegra210-cec";
+		reg = <0x0 0x070015000 0x0 0x1000>;
+		interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&tegra_car TEGRA210_CLK_CEC>;
+		clock-names = "cec";
+		status = "disabled";
+	};
+
 	mc: memory-controller@70019000 {
 		compatible = "nvidia,tegra210-mc";
 		reg = <0x0 0x70019000 0x0 0x1000>;
Signature · 1 line
2.48.1
#6 lore raw

PATCH 4/4 arm64: tegra: Wire up cec to devkits

In reply to Aaron Kling

This enables hdmi cec and routes it to the hdmi port on all supported Tegra210, Tegra186, and Tegra194 devkits.

---
 arch/arm64/boot/dts/nvidia/tegra186-p2771-0000.dts            | 6 ++++++
 arch/arm64/boot/dts/nvidia/tegra186-p3509-0000+p3636-0001.dts | 6 ++++++
 arch/arm64/boot/dts/nvidia/tegra194-p2972-0000.dts            | 6 ++++++
 arch/arm64/boot/dts/nvidia/tegra194-p3509-0000.dtsi           | 6 ++++++
 arch/arm64/boot/dts/nvidia/tegra210-p2371-2180.dts            | 6 ++++++
 arch/arm64/boot/dts/nvidia/tegra210-p3450-0000.dts            | 6 ++++++
 6 files changed, 36 insertions(+)
arch/arm64/boot/dts/nvidia/tegra186-p2771-0000.dts +6 -0
index 15aa49fc450399c7bd525adcdb6e92a27a185805..90155e4ff1feb609f79416a410c3666ebef8b634 100644
@@ -2394,6 +2394,12 @@ usb@3550000 {
 		phy-names = "usb2-0";
 	};
 
+	cec@3960000 {
+		status = "okay";
+
+		hdmi-phandle = <&sor1>;
+	};
+
 	i2c@c250000 {
 		/* carrier board ID EEPROM */
 		eeprom@57 {
arch/arm64/boot/dts/nvidia/tegra186-p3509-0000+p3636-0001.dts +6 -0
index 26f71651933d1d8ef32bbd1645cac1820bd2e104..a6d7fec2e84fb917018aff843845b02c34fede33 100644
@@ -712,6 +712,12 @@ usb@3550000 {
 		phy-names = "usb2-0";
 	};
 
+	cec@3960000 {
+		status = "okay";
+
+		hdmi-phandle = <&sor1>;
+	};
+
 	hsp@3c00000 {
 		status = "okay";
 	};
arch/arm64/boot/dts/nvidia/tegra194-p2972-0000.dts +6 -0
index c32876699a43e9f57b3888c5bc0f5da73c5b95b5..ea6f397a27926e3dcd54002177f68749bc1cc309 100644
@@ -2121,6 +2121,12 @@ usb@3610000 {
 			phy-names = "usb2-0", "usb2-1", "usb2-3", "usb3-0", "usb3-2", "usb3-3";
 		};
 
+		cec@3960000 {
+			status = "okay";
+
+			hdmi-phandle = <&sor2>;
+		};
+
 		i2c@c240000 {
 			typec@8 {
 				compatible = "cypress,cypd4226";
arch/arm64/boot/dts/nvidia/tegra194-p3509-0000.dtsi +6 -0
index 4a17ea5e40fd034c6f4acb023cd7908d6800f710..16cf4414de599baea96362b494be40c800a8197f 100644
@@ -2174,6 +2174,12 @@ usb@3610000 {
 			phy-names = "usb2-1", "usb2-2", "usb3-2";
 		};
 
+		cec@3960000 {
+			status = "okay";
+
+			hdmi-phandle = <&sor1>;
+		};
+
 		host1x@13e00000 {
 			display-hub@15200000 {
 				status = "okay";
arch/arm64/boot/dts/nvidia/tegra210-p2371-2180.dts +6 -0
index a6a58e51822d90f8815df880ea7e668caff1b1ec..627abf51a5a472ddcc42fdc1d783876b0a03da47 100644
@@ -90,6 +90,12 @@ eeprom@57 {
 		};
 	};
 
+	cec@70015000 {
+		status = "okay";
+
+		hdmi-phandle = <&sor1>;
+	};
+
 	clock@70110000 {
 		status = "okay";
 
arch/arm64/boot/dts/nvidia/tegra210-p3450-0000.dts +6 -0
index 0ecdd7243b2eb1abba9adbe9a404b226c29b85ef..ec0e84cb83ef9bf8f0e52e2958db33666813917c 100644
@@ -419,6 +419,12 @@ pmc@7000e400 {
 		nvidia,sys-clock-req-active-high;
 	};
 
+	cec@70015000 {
+		status = "okay";
+
+		hdmi-phandle = <&sor1>;
+	};
+
 	hda@70030000 {
 		nvidia,model = "NVIDIA Jetson Nano HDA";
 
Signature · 1 line
2.48.1
#2 lore raw

Re: [PATCH 1/4] media: dt-bindings: Document Tegra186 and Tegra194 cec

In reply to Aaron Kling
Quoted 14 lines · On 08/04/2025 06:39, Aaron Kling via B4 Relay wrote:

From: Aaron Kling <[email protected]>

These are already used in device trees, so describe them here.

---
 Documentation/devicetree/bindings/media/cec/nvidia,tegra114-cec.yaml | 2 ++
 1 file changed, 2 insertions(+)
Documentation/devicetree/bindings/media/cec/nvidia,tegra114-cec.yaml +0 -0
index a6b73498bc217a2e884e31af91e9d8845c9b1d76..27987bc428ea1a0db8dba4910727e1ce3fa3dab3 100644

Documentation/devicetree/bindings/media/cec/nvidia,tegra114-cec.yaml properties: · line 22

Quoted 5 lines
Documentation/devicetree/bindings/media/cec/nvidia,tegra114-cec.yaml +2 -0
@@ -18,6 +18,8 @@ properties:
       - nvidia,tegra114-cec
       - nvidia,tegra124-cec
       - nvidia,tegra210-cec
+      - nvidia,tegra186-cec
+      - nvidia,tegra194-cec

Don't add to the end of lists, but keep entries sorted.

Best regards,
Krzysztof

#4 lore raw

Re: [PATCH 2/4] media: tegra-cec: Support Tegra186 and Tegra194

In reply to Aaron Kling
Quoted 15 lines · On 08/04/2025 06:39, Aaron Kling via B4 Relay wrote:

From: Aaron Kling <[email protected]>

The tegra186 and tegra194 controllers are working with the driver as-is, so add the compatibles to allow them to probe.

---
 drivers/media/cec/platform/tegra/tegra_cec.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/media/cec/platform/tegra/tegra_cec.c +0 -0
index 3ed50097262f64c32fe0480698cea9a1056a0953..aa3d36286d256d59f9d726e5c3cee5decacd1d23 100644

drivers/media/cec/platform/tegra/tegra_cec.c static const struct of_device_id tegra_cec_of_match[] = { · line 460

Quoted 5 lines
drivers/media/cec/platform/tegra/tegra_cec.c +2 -0
@@ -456,6 +456,8 @@ static const struct of_device_id tegra_cec_of_match[] = {
 	{ .compatible = "nvidia,tegra114-cec", },
 	{ .compatible = "nvidia,tegra124-cec", },
 	{ .compatible = "nvidia,tegra210-cec", },
+	{ .compatible = "nvidia,tegra186-cec", },
+	{ .compatible = "nvidia,tegra194-cec", },

No, express compatible devices with fallbacks.

Best regards,
Krzysztof