Skip to contentSkip to conversation

ARM: tegra: complete a few Tegra30 device trees

PATCH RESEND Applied Svyatoslav Ryhel 3 participants 18 messages May 11 – May 29

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

cover ARM: tegra: complete a few Tegra30 device trees

Configure camera support for ASUS Transformers, Google Nexus 7 and LG X3 devices. Fix RTC on LG X3 devices. Lower throttling temperature for LG P880. Add panel support for TF600T.

Ion Agorria (1):
ARM: tegra: p880: Lower CPU thermal limit

Svyatoslav Ryhel (8):
ARM: tegra: lg-x3: Complete video device graph
ARM: tegra: lg-x3: Set PMIC's RTC address
ARM: tegra: grouper: Add support for front camera
ARM: tegra: transformer: Add support for front camera
ARM: tegra: transformers: Add connector node for common trees
ARM: tegra: tf600t: Configure panel
ARM: tegra: tf600t: Drop backlight regulator
ARM: tegra: tf600t: Invert accelerometer calibration matrix

 .../tegra20-asus-transformer-common.dtsi      |  22 ++-
 .../tegra30-asus-nexus7-grouper-common.dtsi   | 128 ++++++++++++++
 ...egra30-asus-nexus7-grouper-maxim-pmic.dtsi |   4 +-
 .../tegra30-asus-nexus7-grouper-ti-pmic.dtsi  |   4 +-
 .../boot/dts/nvidia/tegra30-asus-tf600t.dts   |  71 ++++++--
 .../tegra30-asus-transformer-common.dtsi      | 159 +++++++++++++++++-
 arch/arm/boot/dts/nvidia/tegra30-lg-p880.dts  |  41 +++++
 arch/arm/boot/dts/nvidia/tegra30-lg-p895.dts  |  46 +++++
 arch/arm/boot/dts/nvidia/tegra30-lg-x3.dtsi   | 157 +++++++++++++++--
 9 files changed, 595 insertions(+), 37 deletions(-)
Signature · 1 line
2.51.0
#1 lore raw

PATCH RESEND 1/9 ARM: tegra: lg-x3: Complete video device graph

Add front and rear camera nodes and interlink them with Tegra CSI and VI. Adjust camera PMIC voltages to better fit requirements and fix the focuser node.

---
 arch/arm/boot/dts/nvidia/tegra30-lg-p880.dts |  28 ++++
 arch/arm/boot/dts/nvidia/tegra30-lg-p895.dts |  46 ++++++
 arch/arm/boot/dts/nvidia/tegra30-lg-x3.dtsi  | 154 +++++++++++++++++--
 3 files changed, 214 insertions(+), 14 deletions(-)
arch/arm/boot/dts/nvidia/tegra30-lg-p880.dts +28 -0
index cc14e6dca770..1b21d7628c8c 100644
@@ -12,6 +12,18 @@ aliases {
 		mmc2 = &sdmmc1; /* WiFi */
 	};
 
+	host1x@50000000 {
+		vi@54080000 {
+			csi@800 {
+				/delete-node/ channel@1;
+			};
+
+			ports {
+				/delete-node/ port@1;
+			};
+		};
+	};
+
 	pinmux@70000868 {
 		pinctrl-names = "default";
 		pinctrl-0 = <&state_default>;
@@ -116,6 +128,22 @@ rmi4-f11@11 {
 		};
 	};
 
+	i2c@7000c500 {
+		camera-pmic@7d {
+			vt_1v2_front: ldo1 {
+				regulator-name = "vt_1v2_dig";
+				regulator-min-microvolt = <1200000>;
+				regulator-max-microvolt = <1200000>;
+			};
+
+			vt_2v7_front: ldo2 {
+				regulator-name = "vt_2v7_vana";
+				regulator-min-microvolt = <2700000>;
+				regulator-max-microvolt = <2700000>;
+			};
+		};
+	};
+
 	spi@7000dc00 {
 		dsi@2 {
 			/*
arch/arm/boot/dts/nvidia/tegra30-lg-p895.dts +46 -0

52 lines not on this page · raw message

arch/arm/boot/dts/nvidia/tegra30-lg-x3.dtsi +140 -14

191 lines not on this page · raw message

Signature · 1 line
2.51.0
#2 lore raw

Re: [PATCH v1 1/9 RESEND] ARM: tegra: lg-x3: Complete video device graph

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider: - [Low] Invalid 'orientation' property in 'onnn,mt9m114' node. - [Low] Inaccurate 'compatible' string for…

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Low] Invalid 'orientation' property in 'onnn,mt9m114' node.
- [Low] Inaccurate 'compatible' string for the ST EEPROM.
--

commit df21cf02565cc61e444d4c72eaf7861addc90fb0
Author: Svyatoslav Ryhel <[email protected]>

ARM: tegra: lg-x3: Complete video device graph

Add front and rear camera nodes and interlink them with Tegra CSI and VI. Adjust camera PMIC voltages to better fit requirements and fix the focuser node.

Quoted 4 lines
arch/arm/boot/dts/nvidia/tegra30-lg-p895.dts +0 -0
index 414117fd43824..896639599c126 100644

[ ... ]

Quoted 9 lines
arch/arm/boot/dts/nvidia/tegra30-lg-p895.dts +5 -0
@@ -118,6 +118,52 @@ rmi4-f1a@1a {
 		};
 	};
 
+	i2c@7000c500 {
+		/* Aptina 1/6" HD SOC (MT9M114) */
+		front-camera@48 {
+			compatible = "onnn,mt9m114";
+			reg = <0x48>;

arch/arm/boot/dts/nvidia/tegra30-lg-p895.dts rmi4-f1a@1a { · line 135

Quoted 10 lines
arch/arm/boot/dts/nvidia/tegra30-lg-p895.dts +10 -0
+
+			clocks = <&tegra_car TEGRA30_CLK_CSUS>;
+
+			reset-gpios = <&gpio TEGRA_GPIO(BB, 5) GPIO_ACTIVE_LOW>;
+
+			vddio-supply = <&vio_1v8_front>;
+			vdd-supply = <&vt_1v8_front>;
+			vaa-supply = <&vt_2v8_front>;
+
+			orientation = <0>; /* Front camera */

Could this property cause a dtbs_check schema validation error?

The device tree binding for this sensor enforces additionalProperties: false at the top level and does not appear to include a reference to /schemas/media/video-interface-devices.yaml, which defines standard camera properties like orientation.

Quoted 3 lines
arch/arm/boot/dts/nvidia/tegra30-lg-p895.dts +3 -0
+
+			assigned-clocks = <&tegra_car TEGRA30_CLK_VI_SENSOR>,
+					  <&tegra_car TEGRA30_CLK_CSUS>;

[ ... ]

Quoted 4 lines
arch/arm/boot/dts/nvidia/tegra30-lg-x3.dtsi +0 -0
index 768e201456d8a..d2a5904cebedd 100644

[ ... ]

Quoted 1 line
arch/arm/boot/dts/nvidia/tegra30-lg-x3.dtsi +0 -0
@@ -1112,29 +1198,68 @@ dw9714: coil@c {

[ ... ]

arch/arm/boot/dts/nvidia/tegra30-lg-x3.dtsi dw9714: coil@c { · line 1243

Quoted 3 lines
arch/arm/boot/dts/nvidia/tegra30-lg-x3.dtsi +3 -0
+		/* rear camera sensor eeprom m24c08 from ST */
+		m24c08: eeprom@50 {
+			compatible = "atmel,24c08";

This isn't a bug, but since the comment notes this is an ST Microelectronics EEPROM, would it be better to use a compatible string array that includes the actual manufacturer followed by the Atmel fallback?

For example: compatible = "st,24c08", "atmel,24c08";

Quoted 4 lines
arch/arm/boot/dts/nvidia/tegra30-lg-x3.dtsi +4 -0
+			reg = <0x50>;
+
+			/* if high then WP is on, if low then off */
+			wp-gpios = <&gpio TEGRA_GPIO(K, 3) GPIO_ACTIVE_HIGH>;
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
#3 lore raw

PATCH RESEND 2/9 ARM: tegra: lg-x3: Set PMIC's RTC address

In reply to Svyatoslav Ryhel

LG X3 devices have the PMIC's RTC module located at a non-standard address. Set the correct address.

---
 arch/arm/boot/dts/nvidia/tegra30-lg-x3.dtsi | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
arch/arm/boot/dts/nvidia/tegra30-lg-x3.dtsi +2 -1
index d2a5904cebed..60e8a19aa70e 100644
@@ -1297,7 +1297,8 @@ pwr_i2c: i2c@7000d000 {
 
 		pmic: max77663@1c {
 			compatible = "maxim,max77663";
-			reg = <0x1c>;
+			reg = <0x1c>, <0x48>;
+			reg-names = "pmic", "rtc";
 
 			interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
 			#interrupt-cells = <2>;
Signature · 1 line
2.51.0
#4 lore raw

Re: [PATCH v1 2/9 RESEND] ARM: tegra: lg-x3: Set PMIC's RTC address

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [High] The DT patch sets a non-standard RTC address (0x48) via a secondary `reg` property, but the…

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] The DT patch sets a non-standard RTC address (0x48) via a secondary reg property, but the rtc-max77686 driver ignores it and uses a hardcoded address (0x68). As a result, the commit fails to fix the RTC, leaving it non-functional. --

commit 034a90db28ba53add991c38ac94042a85b474aec
Author: Svyatoslav Ryhel <[email protected]>

ARM: tegra: lg-x3: Set PMIC's RTC address

This commit updates the device tree for LG X3 devices by adding a secondary I2C address for the max77663 PMIC's RTC module. The intention is to override the default RTC address because it is located at a non-standard address on this board.

arch/arm/boot/dts/nvidia/tegra30-lg-x3.dtsi pwr_i2c: i2c@7000d000 { · line 1301

Quoted 10 lines
arch/arm/boot/dts/nvidia/tegra30-lg-x3.dtsi +2 -1
@@ -1297,7 +1297,8 @@ pwr_i2c: i2c@7000d000 {
 
 		pmic: max77663@1c {
 			compatible = "maxim,max77663";
-			reg = <0x1c>;
+			reg = <0x1c>, <0x48>;
+			reg-names = "pmic", "rtc";

Does the rtc-max77686 driver actually parse this secondary reg property?

Looking at the driver, it appears to use a hardcoded address via devm_i2c_new_dummy_device(..., info->drv_data->rtc_i2c_addr), where rtc_i2c_addr is fixed to 0x68.

Without companion changes to the driver to read the reg property or use i2c_new_ancillary_device(), it seems the driver will still attempt to access the RTC at 0x68 and ignore the 0x48 address specified here.

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=2
#5 lore raw

PATCH RESEND 3/9 ARM: tegra: p880: Lower CPU thermal limit

In reply to Svyatoslav Ryhel

From: Ion Agorria <[email protected]>

Lower the CPU thermal limit for the LG P880, since its chassis has less thermal dissipation capability than the P895.

---
 arch/arm/boot/dts/nvidia/tegra30-lg-p880.dts | 13 +++++++++++++
 1 file changed, 13 insertions(+)
arch/arm/boot/dts/nvidia/tegra30-lg-p880.dts +13 -0
index 1b21d7628c8c..6b30e17459ac 100644
@@ -537,4 +537,17 @@ sound {
 
 		nvidia,int-mic-en-gpios = <&gpio TEGRA_GPIO(I, 6) GPIO_ACTIVE_HIGH>;
 	};
+
+	thermal-zones {
+		cpu-thermal {
+			trips {
+				cpu-alert {
+					/* throttle at 60C until temperature drops to 59.8C */
+					temperature = <60000>;
+					hysteresis = <200>;
+					type = "passive";
+				};
+			};
+		};
+	};
 };
Signature · 1 line
2.51.0
#6 lore raw

PATCH RESEND 4/9 ARM: tegra: grouper: Add support for front camera

In reply to Svyatoslav Ryhel

Add front camera video path.

---
 .../tegra30-asus-nexus7-grouper-common.dtsi   | 128 ++++++++++++++++++
 ...egra30-asus-nexus7-grouper-maxim-pmic.dtsi |   4 +-
 .../tegra30-asus-nexus7-grouper-ti-pmic.dtsi  |   4 +-
 3 files changed, 132 insertions(+), 4 deletions(-)
arch/arm/boot/dts/nvidia/tegra30-asus-nexus7-grouper-common.dtsi +128 -0
index 15f53babdc21..892d718294dd 100644
@@ -2,6 +2,7 @@
 
 #include <dt-bindings/input/gpio-keys.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/media/video-interfaces.h>
 #include <dt-bindings/power/summit,smb347-charger.h>
 #include <dt-bindings/thermal/thermal.h>
 
@@ -84,6 +85,93 @@ init-mode-hog {
 		};
 	};
 
+	host1x@50000000 {
+		vi@54080000 {
+			status = "okay";
+
+			csi@800 {
+				status = "okay";
+
+				avdd-dsi-csi-supply = <&avdd_dsi_csi>;
+
+				/* CSI-A */
+				channel@0 {
+					reg = <0>;
+
+					nvidia,mipi-calibrate = <&csi 0>; /* CSIA pad */
+
+					#address-cells = <1>;
+					#size-cells = <0>;
+
+					port@0 {
+						reg = <0>;
+
+						csia_input: endpoint {
+							data-lanes = <1 2>;
+							/* No rear camera */
+						};
+					};
+
+					port@1 {
+						reg = <1>;
+
+						csia_output: endpoint {
+							remote-endpoint = <&vi_ppa_input>;
+						};
+					};
+				};
+
+				/* CSI-B */
+				channel@1 {
+					reg = <1>;
+
+					nvidia,mipi-calibrate = <&csi 1>; /* CSIB pad */
+
+					#address-cells = <1>;
+					#size-cells = <0>;
+
+					port@0 {
+						reg = <0>;
+
+						csib_input: endpoint {
+							data-lanes = <3>;
+							remote-endpoint = <&front_camera_output>;
+						};
+					};
+
+					port@1 {
+						reg = <1>;
+
+						csib_output: endpoint {
+							remote-endpoint = <&vi_ppb_input>;
+						};
+					};
+				};
+			};
+
+			ports {
+				#address-cells = <1>;
+				#size-cells = <0>;
+
+				port@0 {
+					reg = <0>;
+
+					vi_ppa_input: endpoint {
+						remote-endpoint = <&csia_output>;
+					};
+				};
+
+				port@1 {
+					reg = <1>;
+
+					vi_ppb_input: endpoint {
+						remote-endpoint = <&csib_output>;
+					};
+				};
+			};
+		};
+	};
+
 	pinmux@70000868 {
 		pinctrl-names = "default";
 		pinctrl-0 = <&state_default>;
@@ -890,6 +978,36 @@ light-sensor@1c {
 			vdd-supply = <&vdd_3v3_sys>;
 		};
 
+		/* Aptina 1/6" HD SOC (MI1040) */
+		front-camera@48 {
+			compatible = "aptina,mi1040";
+			reg = <0x48>;
+
+			clocks = <&tegra_car TEGRA30_CLK_CSUS>;
+
+			reset-gpios = <&gpio TEGRA_GPIO(O, 0) GPIO_ACTIVE_LOW>;
+
+			vddio-supply = <&avdd_cam1>;
+			vdd-supply = <&vddio_cam>;
+			vaa-supply = <&avdd_cam1>;
+
+			orientation = <0>; /* Front camera */
+
+			assigned-clocks = <&tegra_car TEGRA30_CLK_VI_SENSOR>,
+					  <&tegra_car TEGRA30_CLK_CSUS>;
+			assigned-clock-rates = <24000000>;
+			assigned-clock-parents = <&tegra_car TEGRA30_CLK_PLL_P>,
+						 <&tegra_car TEGRA30_CLK_VI_SENSOR>;
+
+			port {
+				front_camera_output: endpoint {
+					bus-type = <MEDIA_BUS_TYPE_CSI2_DPHY>;
+					link-frequencies = /bits/ 64 <384000000>;
+					remote-endpoint = <&csib_input>;
+				};
+			};
+		};
+
 		accelerometer@68 {
 			compatible = "invensense,mpu6050";
 			reg = <0x68>;
@@ -1203,6 +1321,16 @@ vcc_3v3_ts: regulator-ts {
 		vin-supply = <&vdd_5v0_sys>;
 	};
 
+	avdd_cam1: regulator-vcam1 {
+		compatible = "regulator-fixed";
+		regulator-name = "avdd_cam1";
+		regulator-min-microvolt = <2850000>;
+		regulator-max-microvolt = <2850000>;
+		gpio = <&gpio TEGRA_GPIO(R, 6) GPIO_ACTIVE_HIGH>;
+		enable-active-high;
+		vin-supply = <&vdd_5v0_sys>;
+	};
+
 	sound {
 		compatible = "nvidia,tegra-audio-rt5640-grouper",
 			     "nvidia,tegra-audio-rt5640";
arch/arm/boot/dts/nvidia/tegra30-asus-nexus7-grouper-maxim-pmic.dtsi +2 -2
index 694c7fe37eb8..4bd98935031b 100644
@@ -135,7 +135,7 @@ ldo4 {
 					regulator-boot-on;
 				};
 
-				ldo5 {
+				vddio_cam: ldo5 {
 					regulator-name = "vdd_camera";
 					regulator-min-microvolt = <1800000>;
 					regulator-max-microvolt = <1800000>;
@@ -149,7 +149,7 @@ ldo6 {
 					regulator-boot-on;
 				};
 
-				ldo7 {
+				avdd_dsi_csi: ldo7 {
 					regulator-name = "avdd_dsi_csi";
 					regulator-min-microvolt = <1200000>;
 					regulator-max-microvolt = <1200000>;
arch/arm/boot/dts/nvidia/tegra30-asus-nexus7-grouper-ti-pmic.dtsi +2 -2
index ee4a3f482769..8fe3c62c9052 100644
@@ -92,13 +92,13 @@ ldo4 {
 					regulator-always-on;
 				};
 
-				ldo5 {
+				vddio_cam: ldo5 {
 					regulator-name = "vddio_sdmmc,avdd_vdac";
 					regulator-min-microvolt = <1800000>;
 					regulator-max-microvolt = <1800000>;
 				};
 
-				ldo6 {
+				avdd_dsi_csi: ldo6 {
 					regulator-name = "avdd_dsi_csi,pwrdet_mipi";
 					regulator-min-microvolt = <1200000>;
 					regulator-max-microvolt = <1200000>;
Signature · 1 line
2.51.0
#7 lore raw

Re: [PATCH v1 4/9 RESEND] ARM: tegra: grouper: Add support for front camera

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider: - [Low] The 'orientation' property is not allowed by the 'aptina,mi1040' binding schema. - [Low] Devicetree…

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Low] The 'orientation' property is not allowed by the 'aptina,mi1040' binding schema.
- [Low] Devicetree node name 'front-camera@48' does not follow generic naming conventions. --

commit c5071430d670662429d8b5764f80cefdddb8903b
Author: Svyatoslav Ryhel <[email protected]>

ARM: tegra: grouper: Add support for front camera

This commit adds the front camera video path to the Tegra 30 Nexus 7 (grouper) device tree. It includes the necessary host1x, vi, and csi endpoints, a new camera node on the I2C bus, and updates the relevant power supply bindings.

Quoted 4 lines
arch/arm/boot/dts/nvidia/tegra30-asus-nexus7-grouper-common.dtsi +0 -0
index 15f53babdc217..892d718294dd1 100644

[ ... ]

arch/arm/boot/dts/nvidia/tegra30-asus-nexus7-grouper-common.dtsi light-sensor@1c { · line 982

Quoted 6 lines
arch/arm/boot/dts/nvidia/tegra30-asus-nexus7-grouper-common.dtsi +2 -0
@@ -890,6 +978,36 @@ light-sensor@1c {
 			vdd-supply = <&vdd_3v3_sys>;
 		};
 
+		/* Aptina 1/6" HD SOC (MI1040) */
+		front-camera@48 {

This isn't a bug, but does the node name front-camera@48 follow the Devicetree generic naming conventions?

It might be better to use a generic name like camera@48 to avoid dtbs_check warnings.

arch/arm/boot/dts/nvidia/tegra30-asus-nexus7-grouper-common.dtsi light-sensor@1c { · line 994

Quoted 12 lines
arch/arm/boot/dts/nvidia/tegra30-asus-nexus7-grouper-common.dtsi +12 -0
+			compatible = "aptina,mi1040";
+			reg = <0x48>;
+
+			clocks = <&tegra_car TEGRA30_CLK_CSUS>;
+
+			reset-gpios = <&gpio TEGRA_GPIO(O, 0) GPIO_ACTIVE_LOW>;
+
+			vddio-supply = <&avdd_cam1>;
+			vdd-supply = <&vddio_cam>;
+			vaa-supply = <&avdd_cam1>;
+
+			orientation = <0>; /* Front camera */

Is the orientation property supported by the aptina,mi1040 binding?

The corresponding schema onnn,mt9m114.yaml sets additionalProperties: false at the root level and does not define the orientation property. It also does not reference the common video-interface-devices.yaml schema at the device node level.

Could this inclusion cause a schema validation error during dtbs_check?

Quoted 3 lines
arch/arm/boot/dts/nvidia/tegra30-asus-nexus7-grouper-common.dtsi +3 -0
+
+			assigned-clocks = <&tegra_car TEGRA30_CLK_VI_SENSOR>,
+					  <&tegra_car TEGRA30_CLK_CSUS>;

[ ... ]

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=4
#8 lore raw

PATCH RESEND 5/9 ARM: tegra: transformer: Add support for front camera

In reply to Svyatoslav Ryhel

Add front camera video path. Aptina MI1040 camera is used on all supported ASUS Transformers, but only TF201 and TF700T will work since on TF300T/TG/TL front camera is linked through an additional ISP.

---
 .../tegra30-asus-transformer-common.dtsi      | 138 +++++++++++++++++-
 1 file changed, 137 insertions(+), 1 deletion(-)
arch/arm/boot/dts/nvidia/tegra30-asus-transformer-common.dtsi +137 -1
index 0e06136042a9..d4a7bae51830 100644
@@ -2,6 +2,7 @@
 
 #include <dt-bindings/input/gpio-keys.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/media/video-interfaces.h>
 #include <dt-bindings/thermal/thermal.h>
 
 #include "tegra30.dtsi"
@@ -73,6 +74,91 @@ trustzone@bfe00000 {
 	};
 
 	host1x@50000000 {
+		vi@54080000 {
+			status = "okay";
+
+			csi@800 {
+				status = "okay";
+
+				avdd-dsi-csi-supply = <&avdd_dsi_csi>;
+
+				/* CSI-A */
+				channel@0 {
+					reg = <0>;
+
+					nvidia,mipi-calibrate = <&csi 0>; /* CSIA pad */
+
+					#address-cells = <1>;
+					#size-cells = <0>;
+
+					port@0 {
+						reg = <0>;
+
+						csia_input: endpoint {
+							data-lanes = <1 2>;
+							/* Add rear camera */
+						};
+					};
+
+					port@1 {
+						reg = <1>;
+
+						csia_output: endpoint {
+							remote-endpoint = <&vi_ppa_input>;
+						};
+					};
+				};
+
+				/* CSI-B */
+				channel@1 {
+					reg = <1>;
+
+					nvidia,mipi-calibrate = <&csi 1>; /* CSIB pad */
+
+					#address-cells = <1>;
+					#size-cells = <0>;
+
+					port@0 {
+						reg = <0>;
+
+						csib_input: endpoint {
+							data-lanes = <3>;
+							remote-endpoint = <&front_camera_output>;
+						};
+					};
+
+					port@1 {
+						reg = <1>;
+
+						csib_output: endpoint {
+							remote-endpoint = <&vi_ppb_input>;
+						};
+					};
+				};
+			};
+
+			ports {
+				#address-cells = <1>;
+				#size-cells = <0>;
+
+				port@0 {
+					reg = <0>;
+
+					vi_ppa_input: endpoint {
+						remote-endpoint = <&csia_output>;
+					};
+				};
+
+				port@1 {
+					reg = <1>;
+
+					vi_ppb_input: endpoint {
+						remote-endpoint = <&csib_output>;
+					};
+				};
+			};
+		};
+
 		hdmi: hdmi@54280000 {
 			status = "okay";
 
@@ -1173,6 +1259,36 @@ light-sensor@1c {
 			vdd-supply = <&vdd_3v3_sys>;
 		};
 
+		/* Aptina 1/6" HD SOC (MI1040) */
+		front-camera@48 {
+			compatible = "aptina,mi1040";
+			reg = <0x48>;
+
+			clocks = <&tegra_car TEGRA30_CLK_CSUS>;
+
+			reset-gpios = <&gpio TEGRA_GPIO(O, 0) GPIO_ACTIVE_LOW>;
+
+			vddio-supply = <&vdd_1v8_cam>;
+			vdd-supply = <&vdd_1v8_cam>;
+			vaa-supply = <&avdd_2v85_fcam>;
+
+			orientation = <0>; /* Front camera */
+
+			assigned-clocks = <&tegra_car TEGRA30_CLK_VI_SENSOR>,
+					  <&tegra_car TEGRA30_CLK_CSUS>;
+			assigned-clock-rates = <24000000>;
+			assigned-clock-parents = <&tegra_car TEGRA30_CLK_PLL_P>,
+						 <&tegra_car TEGRA30_CLK_VI_SENSOR>;
+
+			port {
+				front_camera_output: endpoint {
+					bus-type = <MEDIA_BUS_TYPE_CSI2_DPHY>;
+					link-frequencies = /bits/ 64 <384000000>;
+					remote-endpoint = <&csib_input>;
+				};
+			};
+		};
+
 		gyroscope@68 {
 			compatible = "invensense,mpu3050";
 			reg = <0x68>;
@@ -1310,7 +1426,7 @@ ldo4 {
 
 				/* LDO5 is not used by Transformers */
 
-				ldo6 {
+				avdd_dsi_csi: ldo6 {
 					regulator-name = "avdd_dsi_csi,pwrdet_mipi";
 					regulator-min-microvolt = <1200000>;
 					regulator-max-microvolt = <1200000>;
@@ -1685,6 +1801,26 @@ hdmi_5v0_sys: regulator-hdmi {
 		vin-supply = <&vdd_5v0_sys>;
 	};
 
+	vdd_1v8_cam: regulator-viocam {
+		compatible = "regulator-fixed";
+		regulator-name = "vdd_1v8_cam";
+		regulator-min-microvolt = <1800000>;
+		regulator-max-microvolt = <1800000>;
+		gpio = <&gpio TEGRA_GPIO(BB, 4) GPIO_ACTIVE_HIGH>;
+		enable-active-high;
+		vin-supply = <&vdd_1v8_vio>;
+	};
+
+	avdd_2v85_fcam: regulator-avcam-front {
+		compatible = "regulator-fixed";
+		regulator-name = "vdd_2v85_fcam";
+		regulator-min-microvolt = <2850000>;
+		regulator-max-microvolt = <2850000>;
+		gpio = <&gpio TEGRA_GPIO(S, 0) GPIO_ACTIVE_HIGH>;
+		enable-active-high;
+		vin-supply = <&vdd_3v3_sys>;
+	};
+
 	sound {
 		nvidia,i2s-controller = <&tegra_i2s1>;
 
Signature · 1 line
2.51.0
#9 lore raw

Re: [PATCH v1 5/9 RESEND] ARM: tegra: transformer: Add support for front camera

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider: - [High] Hardware Topology Violation: Front camera mistakenly bound directly to CSI-B on TF300T variants.…

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [High] Hardware Topology Violation: Front camera mistakenly bound directly to CSI-B on TF300T variants.
- [Low] Device Tree Binding Violation: Unallowed orientation property in aptina,mi1040 node. --

commit f0de1eeb70b375136f716e42d1c0078025071767
Author: Svyatoslav Ryhel <[email protected]>

ARM: tegra: transformer: Add support for front camera

This commit adds the front camera video path using the Aptina MI1040 sensor. It notes that the configuration works for TF201 and TF700T, while the TF300T series routes the front camera through an additional ISP.

Quoted 4 lines
arch/arm/boot/dts/nvidia/tegra30-asus-transformer-common.dtsi +0 -0
index ead95306840f7..e6d079647f772 100644

[ ... ]

arch/arm/boot/dts/nvidia/tegra30-asus-transformer-common.dtsi light-sensor@1c { · line 1252

Quoted 8 lines
arch/arm/boot/dts/nvidia/tegra30-asus-transformer-common.dtsi +4 -0
@@ -1160,6 +1246,36 @@ light-sensor@1c {
 			vdd-supply = <&vdd_3v3_sys>;
 		};
 
+		/* Aptina 1/6" HD SOC (MI1040) */
+		front-camera@48 {
+			compatible = "aptina,mi1040";
+			reg = <0x48>;

Since this node is added to the common device tree include file, won't it be applied to the TF300T variants as well?

The commit message mentions that the front camera on TF300T/TG/TL is linked through an additional ISP, so wouldn't putting this directly in the shared dtsi without disabling it cause probe failures or I2C timeouts on those models?

arch/arm/boot/dts/nvidia/tegra30-asus-transformer-common.dtsi light-sensor@1c { · line 1275

Quoted 10 lines
arch/arm/boot/dts/nvidia/tegra30-asus-transformer-common.dtsi +10 -0
+
+			clocks = <&tegra_car TEGRA30_CLK_CSUS>;
+
+			reset-gpios = <&gpio TEGRA_GPIO(O, 0) GPIO_ACTIVE_LOW>;
+
+			vddio-supply = <&vdd_1v8_cam>;
+			vdd-supply = <&vdd_1v8_cam>;
+			vaa-supply = <&avdd_2v85_fcam>;
+
+			orientation = <0>; /* Front camera */

This isn't a bug, but does the aptina,mi1040 binding allow the orientation property? The schema (onnn,mt9m114.yaml) doesn't appear to define it or reference a generic schema that permits it, which might cause a dtbs_check validation error.

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=5
#10 lore raw

PATCH RESEND 6/9 ARM: tegra: transformers: Add connector node for common trees

In reply to Svyatoslav Ryhel

All ASUS Transformers have micro-HDMI connector directly available. After Tegra HDMI got bridge/connector support, we should use connector framework for proper HW description.

---
 .../tegra20-asus-transformer-common.dtsi      | 22 ++++++++++++++++---
 .../tegra30-asus-transformer-common.dtsi      | 21 ++++++++++++++++--
 2 files changed, 38 insertions(+), 5 deletions(-)
arch/arm/boot/dts/nvidia/tegra20-asus-transformer-common.dtsi +19 -3
index 73c7ee378865..fe05cfd2312f 100644
@@ -79,9 +79,11 @@ hdmi@54280000 {
 			pll-supply = <&hdmi_pll_reg>;
 			hdmi-supply = <&vdd_hdmi_en>;
 
-			nvidia,ddc-i2c-bus = <&hdmi_ddc>;
-			nvidia,hpd-gpio = <&gpio TEGRA_GPIO(N, 7)
-				GPIO_ACTIVE_HIGH>;
+			port {
+				hdmi_out: endpoint {
+					remote-endpoint = <&hdmi_connector_in>;
+				};
+			};
 		};
 	};
 
@@ -1029,6 +1031,20 @@ key-volume-up {
 		};
 	};
 
+	hdmi-connector {
+		compatible = "hdmi-connector";
+		type = "d";
+
+		hpd-gpios = <&gpio TEGRA_GPIO(N, 7) GPIO_ACTIVE_HIGH>;
+		ddc-i2c-bus = <&hdmi_ddc>;
+
+		port {
+			hdmi_connector_in: endpoint {
+				remote-endpoint = <&hdmi_out>;
+			};
+		};
+	};
+
 	i2cmux {
 		compatible = "i2c-mux-pinctrl";
 		#address-cells = <1>;
arch/arm/boot/dts/nvidia/tegra30-asus-transformer-common.dtsi +19 -2
index d4a7bae51830..76db928b53bc 100644
@@ -166,8 +166,11 @@ hdmi: hdmi@54280000 {
 			pll-supply = <&vdd_1v8_vio>;
 			vdd-supply = <&vdd_3v3_sys>;
 
-			nvidia,hpd-gpio = <&gpio TEGRA_GPIO(N, 7) GPIO_ACTIVE_HIGH>;
-			nvidia,ddc-i2c-bus = <&hdmi_ddc>;
+			port {
+				hdmi_out: endpoint {
+					remote-endpoint = <&hdmi_connector_in>;
+				};
+			};
 		};
 	};
 
@@ -1701,6 +1704,20 @@ key-volume-up {
 		};
 	};
 
+	hdmi-connector {
+		compatible = "hdmi-connector";
+		type = "d";
+
+		hpd-gpios = <&gpio TEGRA_GPIO(N, 7) GPIO_ACTIVE_HIGH>;
+		ddc-i2c-bus = <&hdmi_ddc>;
+
+		port {
+			hdmi_connector_in: endpoint {
+				remote-endpoint = <&hdmi_out>;
+			};
+		};
+	};
+
 	vdd_5v0_bat: regulator-bat {
 		compatible = "regulator-fixed";
 		regulator-name = "vdd_ac_bat";
Signature · 1 line
2.51.0
#11 lore raw

Re: [PATCH v1 6/9 RESEND] ARM: tegra: transformers: Add connector node for common trees

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider: - [High] Migrating to the DRM bridge framework silently breaks HDMI CEC, audio, and AVI infoframes.…

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [High] Migrating to the DRM bridge framework silently breaks HDMI CEC, audio, and AVI infoframes.
- [High] Strict removal of legacy nvidia,hpd-gpio and nvidia,ddc-i2c-bus breaks older kernels, while retaining them exposes a probe conflict. --

commit fb3e359e4dd58d87afe7ba7cf548657a8457080f
Author: Svyatoslav Ryhel <[email protected]>

ARM: tegra: transformers: Add connector node for common trees

This commit adds a micro-HDMI connector node to the ASUS Transformers device trees to use the connector framework, now that Tegra HDMI has bridge/connector support. It replaces the legacy hpd and ddc properties with an endpoint connecting to the new hdmi-connector node.

arch/arm/boot/dts/nvidia/tegra20-asus-transformer-common.dtsi hdmi@54280000 { · line 84

Quoted 11 lines
arch/arm/boot/dts/nvidia/tegra20-asus-transformer-common.dtsi +0 -3
index b48f53c00efae..5b758aad8d150 100644
@@ -79,9 +79,11 @@ hdmi@54280000 {
 			pll-supply = <&hdmi_pll_reg>;
 			hdmi-supply = <&vdd_hdmi_en>;
 
-			nvidia,ddc-i2c-bus = <&hdmi_ddc>;
-			nvidia,hpd-gpio = <&gpio TEGRA_GPIO(N, 7)
-				GPIO_ACTIVE_HIGH>;

Does the removal of nvidia,hpd-gpio and nvidia,ddc-i2c-bus cause a regression in device tree ABI backward compatibility for older kernels that lack hdmi-connector bridge support?

If these legacy properties are retained to preserve compatibility, will tegra_output_probe() unconditionally request the nvidia,hpd GPIO and conflict with the display-connector driver requesting the same GPIO via hpd-gpios?

Since GPIOs are requested exclusively, this might result in an -EBUSY error that fails the DRM probe entirely.

Does the DRM driver need to be patched to ignore legacy properties when a bridge is present before applying this DT migration?

arch/arm/boot/dts/nvidia/tegra20-asus-transformer-common.dtsi hdmi@54280000 { · line 88

Quoted 7 lines
arch/arm/boot/dts/nvidia/tegra20-asus-transformer-common.dtsi +5 -0
+			port {
+				hdmi_out: endpoint {
+					remote-endpoint = <&hdmi_connector_in>;
+				};
+			};
 		};
 	};

Does migrating to the DRM bridge framework here cause a regression with HDMI CEC, audio, and AVI infoframes?

When hdmi->output.bridge is used, tegra_hdmi_init() dynamically allocates a connector, leaving the internal legacy hdmi->output.connector structure zero-initialized.

Could this cause tegra_output_init() to skip CEC notifier registration because connector_type evaluates to 0?

Additionally, does this cause tegra_output_is_hdmi() to return false (since display_info.is_hdmi is 0), which would force DVI fallback mode in tegra_hdmi_encoder_enable() by setting hdmi->dvi = true?

This fallback mode appears to bypass tegra_hdmi_setup_audio() and skip all AVI and audio infoframe configurations.

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=6
#12 lore raw

PATCH RESEND 7/9 ARM: tegra: tf600t: Configure panel

In reply to Svyatoslav Ryhel

Configure DSI panel used in ASUS VivoTab TF600T.

---
 .../boot/dts/nvidia/tegra30-asus-tf600t.dts   | 62 ++++++++++++++++++-
 1 file changed, 60 insertions(+), 2 deletions(-)
arch/arm/boot/dts/nvidia/tegra30-asus-tf600t.dts +60 -2
index 9296e7970ce4..8b68bfef8dee 100644
@@ -23,6 +23,7 @@ aliases {
 		rtc0 = &pmic;
 		rtc1 = "/rtc@7000e000";
 
+		display0 = &lcd;
 		display1 = &hdmi;
 
 		serial1 = &uartc; /* Bluetooth */
@@ -55,6 +56,37 @@ linux,cma@80000000 {
 	};
 
 	host1x@50000000 {
+		vi@54080000 {
+			status = "okay";
+
+			csi@800 {
+				status = "okay";
+
+				avdd-dsi-csi-supply = <&avdd_dsi_csi>;
+			};
+
+			ports {
+				#address-cells = <1>;
+				#size-cells = <0>;
+
+				port@0 {
+					reg = <0>;
+
+					vi_ppa_input: endpoint {
+						/* Link to the rear camera */
+					};
+				};
+
+				port@1 {
+					reg = <1>;
+
+					vi_ppb_input: endpoint {
+						/* Link to the front camera */
+					};
+				};
+			};
+		};
+
 		hdmi: hdmi@54280000 {
 			status = "okay";
 
@@ -68,6 +100,22 @@ hdmi_out: endpoint {
 				};
 			};
 		};
+
+		lcd: dsi@54300000 {
+			status = "okay";
+
+			avdd-dsi-csi-supply = <&avdd_dsi_csi>;
+
+			panel@0 {
+				compatible = "hydis,hv101hd1";
+				reg = <0>;
+
+				vdd-supply = <&vdd_panel>;
+				vio-supply = <&vio_panel>;
+
+				backlight = <&backlight>;
+			};
+		};
 	};
 
 	vde@6001a000 {
@@ -1123,11 +1171,10 @@ pmic-sleep-hog {
 			};
 
 			regulators {
-				vdd_lcd: vdd1 {
+				vio_panel: vdd1 {
 					regulator-name = "vddio_ddr_1v2";
 					regulator-min-microvolt = <1200000>;
 					regulator-max-microvolt = <1200000>;
-					regulator-always-on;
 					regulator-boot-on;
 					ti,regulator-ext-sleep-control = <8>;
 				};
@@ -2386,6 +2433,17 @@ vdd_5v0_bl: regulator-bl {
 		vin-supply = <&vdd_5v0_bat>;
 	};
 
+	vdd_panel: regulator-panel {
+		compatible = "regulator-fixed";
+		regulator-name = "vdd_panel";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+		regulator-boot-on;
+		gpio = <&gpio TEGRA_GPIO(L, 4) GPIO_ACTIVE_HIGH>;
+		enable-active-high;
+		vin-supply = <&vdd_3v3_sys>;
+	};
+
 	hdmi_5v0_sys: regulator-hdmi {
 		compatible = "regulator-fixed";
 		regulator-name = "hdmi_5v0_sys";
Signature · 1 line
2.51.0
#13 lore raw

Re: [PATCH v1 7/9 RESEND] ARM: tegra: tf600t: Configure panel

Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider: - [High] Removal of `regulator-always-on` from a regulator named `vddio_ddr_1v2`. - [Medium] Undocumented…

Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider:
- [High] Removal of regulator-always-on from a regulator named vddio_ddr_1v2.
- [Medium] Undocumented feature addition of camera and video input subsystems.
- [Low] Incomplete DT graph due to dangling camera endpoints.
--

commit 3e9ff009424216cb47835e1aa1d04e00f8c7e7e8
Author: Svyatoslav Ryhel <[email protected]>

ARM: tegra: tf600t: Configure panel

This commit configures the DSI panel used in the ASUS VivoTab TF600T. It adds the necessary display nodes, modifies the vdd1 regulator to serve as vio_panel, and adds a new vdd_panel regulator for the display.

Quoted 4 lines
arch/arm/boot/dts/nvidia/tegra30-asus-tf600t.dts +0 -0
index 9296e7970ce4e..8b68bfef8dee8 100644

[ ... ]

Quoted 24 lines
arch/arm/boot/dts/nvidia/tegra30-asus-tf600t.dts +20 -0
@@ -55,6 +56,37 @@ linux,cma@80000000 {
 	};
 
 	host1x@50000000 {
+		vi@54080000 {
+			status = "okay";
+
+			csi@800 {
+				status = "okay";
+
+				avdd-dsi-csi-supply = <&avdd_dsi_csi>;
+			};
+
+			ports {
+				#address-cells = <1>;
+				#size-cells = <0>;
+
+				port@0 {
+					reg = <0>;
+
+					vi_ppa_input: endpoint {
+						/* Link to the rear camera */
+					};
+				};

arch/arm/boot/dts/nvidia/tegra30-asus-tf600t.dts linux,cma@80000000 { · line 88

Quoted 10 lines
arch/arm/boot/dts/nvidia/tegra30-asus-tf600t.dts +10 -0
+
+				port@1 {
+					reg = <1>;
+
+					vi_ppb_input: endpoint {
+						/* Link to the front camera */
+					};
+				};
+			};
+		};

The commit message states the goal is to configure the DSI panel, but this adds Video Input and CSI nodes for cameras. Should these camera subsystem additions be split into a separate patch, or documented in the commit message?

Also, do these endpoints need remote-endpoint properties linking them to the actual sensor nodes? Without them, the OF graph appears incomplete and might trigger warnings during device tree schema validation.

[ ... ]

arch/arm/boot/dts/nvidia/tegra30-asus-tf600t.dts pmic-sleep-hog { · line 1180

Quoted 13 lines
arch/arm/boot/dts/nvidia/tegra30-asus-tf600t.dts +1 -2
@@ -1123,11 +1171,10 @@ pmic-sleep-hog {
 			};
 
 			regulators {
-				vdd_lcd: vdd1 {
+				vio_panel: vdd1 {
 					regulator-name = "vddio_ddr_1v2";
 					regulator-min-microvolt = <1200000>;
 					regulator-max-microvolt = <1200000>;
-					regulator-always-on;
 					regulator-boot-on;
 					ti,regulator-ext-sleep-control = <8>;
 				};

Does removing regulator-always-on from vddio_ddr_1v2 risk powering down system memory when the display panel is disabled?

If this regulator is shared with DDR, turning off the panel might cause a system crash.

If it is only used for the panel on this specific board, could the regulator-name be updated to reflect that and avoid confusion?

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=7
#14 lore raw

PATCH RESEND 8/9 ARM: tegra: tf600t: Drop backlight regulator

In reply to Svyatoslav Ryhel

Drop dedicated backlight regulator since the GPIO used in it is actually SFIO controlling backlight and setting it as GPIO causes backlight to freeze at maximum level.

---
 arch/arm/boot/dts/nvidia/tegra30-asus-tf600t.dts | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)
arch/arm/boot/dts/nvidia/tegra30-asus-tf600t.dts +1 -12
index 8b68bfef8dee..0bebea0cb8c4 100644
@@ -2192,7 +2192,7 @@ backlight: backlight {
 		compatible = "pwm-backlight";
 
 		enable-gpios = <&gpio TEGRA_GPIO(H, 2) GPIO_ACTIVE_HIGH>;
-		power-supply = <&vdd_5v0_bl>;
+		power-supply = <&vdd_5v0_sys>;
 		pwms = <&pwm 0 71428>;
 
 		brightness-levels = <1 255>;
@@ -2422,17 +2422,6 @@ vdd_3v3_als: regulator-als {
 		vin-supply = <&vdd_3v3_sys>;
 	};
 
-	vdd_5v0_bl: regulator-bl {
-		compatible = "regulator-fixed";
-		regulator-name = "vdd_5v0_bl";
-		regulator-min-microvolt = <5000000>;
-		regulator-max-microvolt = <5000000>;
-		regulator-boot-on;
-		gpio = <&gpio TEGRA_GPIO(H, 0) GPIO_ACTIVE_HIGH>;
-		enable-active-high;
-		vin-supply = <&vdd_5v0_bat>;
-	};
-
 	vdd_panel: regulator-panel {
 		compatible = "regulator-fixed";
 		regulator-name = "vdd_panel";
Signature · 1 line
2.51.0
#15 lore raw

PATCH RESEND 9/9 ARM: tegra: tf600t: Invert accelerometer calibration matrix

In reply to Svyatoslav Ryhel

IMU calibration matrix used in the device tree is inverted when testing on the device which results in wrong screen orientation. Invert it to match the matrix dumped from the device.

---
 arch/arm/boot/dts/nvidia/tegra30-asus-tf600t.dts | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
arch/arm/boot/dts/nvidia/tegra30-asus-tf600t.dts +3 -3
index 0bebea0cb8c4..5c634b0f3f46 100644
@@ -1091,9 +1091,9 @@ imu@69 {
 			vdd-supply   = <&vdd_3v3_sys>;
 			vddio-supply = <&vdd_1v8_vio>;
 
-			mount-matrix =	 "0", "-1",  "0",
-					"-1",  "0",  "0",
-					 "0",  "0", "-1";
+			mount-matrix =	 "0",  "1",  "0",
+					 "1",  "0",  "0",
+					 "0",  "0",  "1";
 
 			/* External I2C interface */
 			i2c-gate {
Signature · 1 line
2.51.0
#16 lore raw

Re: [PATCH v1 9/9 RESEND] ARM: tegra: tf600t: Invert accelerometer calibration matrix

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [High] The new `mount-matrix` for the IMU has a determinant of -1, representing an impossible physical…

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] The new mount-matrix for the IMU has a determinant of -1, representing an impossible physical mounting (a reflection) that converts the right-handed IMU coordinate system into a left-handed one, breaking 3D sensor fusion. --

commit 932efe31306f429e067a9046fd4c2c18e88b38ee
Author: Svyatoslav Ryhel <[email protected]>

ARM: tegra: tf600t: Invert accelerometer calibration matrix

IMU calibration matrix used in the device tree is inverted when testing on the device which results in wrong screen orientation. Invert it to match the matrix dumped from the device.

Quoted 5 lines
arch/arm/boot/dts/nvidia/tegra30-asus-tf600t.dts +0 -0
index 0bebea0cb8c48..5c634b0f3f46a 100644

arch/arm/boot/dts/nvidia/tegra30-asus-tf600t.dts imu@69 { · line 1096

Quoted 9 lines
arch/arm/boot/dts/nvidia/tegra30-asus-tf600t.dts +3 -3
@@ -1091,9 +1091,9 @@ imu@69 {
 			vdd-supply   = <&vdd_3v3_sys>;
 			vddio-supply = <&vdd_1v8_vio>;
 
-			mount-matrix =	 "0", "-1",  "0",
-					"-1",  "0",  "0",
-					 "0",  "0", "-1";
+			mount-matrix =	 "0",  "1",  "0",
+					 "1",  "0",  "0",
+					 "0",  "0",  "1";

Does this new matrix create an impossible physical mounting by introducing a reflection?

A physical IMU mount-matrix must represent a pure 3D rotation, which mathematically requires an orthogonal matrix with a determinant of exactly +1 to preserve the right-hand rule. The previous matrix had a determinant of +1.

The new matrix negates all elements from the original, resulting in a matrix with a determinant of -1. This applies a spatial point reflection, transforming the IMU's right-handed coordinate system into a left-handed one.

While this may superficially fix 2D screen auto-rotation (which only relies on the accelerometer's linear projection of gravity), will this break the mathematical parity between the accelerometer (a polar vector) and the gyroscope (a pseudovector)? 3D sensor fusion algorithms (e.g., Android's Game Rotation Vector, VR/AR tracking, compasses) may receive contradictory data and fail or behave erratically.

To properly swap the X and Y axes to fix the screen orientation while maintaining a right-handed coordinate system, should the Z axis be inverted relative to the swap, resulting in a matrix of "0", "1", "0"; "1", "0", "0"; "0", "0", "-1"?

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=9
maintainer Applied
#17 lore raw
In reply to Svyatoslav Ryhel

From: Thierry Reding <[email protected]>

Quoted 8 lines · Svyatoslav Ryhel

Configure camera support for ASUS Transformers, Google Nexus 7 and LG X3 devices. Fix RTC on LG X3 devices. Lower throttling temperature for LG P880. Add panel support for TF600T.

Ion Agorria (1):
ARM: tegra: p880: Lower CPU thermal limit

[...]

Applied, thanks!

[1/9] ARM: tegra: lg-x3: Complete video device graph

      commit: 8399055d9f98e94c33608fe9d61afc09a43cc4df
[2/9] ARM: tegra: lg-x3: Set PMIC's RTC address
      commit: 61cf0112f79d6c6de2a002874b8618e802b664f2
[3/9] ARM: tegra: p880: Lower CPU thermal limit
      commit: ece4229e457de4ceeec80890c5c760f0c858eeea
[4/9] ARM: tegra: grouper: Add support for front camera
      commit: a5acde8adb4d4d921a004b8df995d50255253afa
[5/9] ARM: tegra: transformer: Add support for front camera
      commit: 34d89435081d07b052dd522a57054132dada5400
[6/9] ARM: tegra: transformers: Add connector node for common trees
      commit: 5333a49e51c2d0d5fe1615f721898036733ed5b0
[7/9] ARM: tegra: tf600t: Configure panel
      commit: 2ecff0cda80b9ba0e513620003d156cfef7394df
[8/9] ARM: tegra: tf600t: Drop backlight regulator
      commit: d9c890d753034adcae0f74de578deed60d58233a
[9/9] ARM: tegra: tf600t: Invert accelerometer calibration matrix
      commit: 774bc2764647cfd6b65727cfa978d809f11df392

Best regards,

Signature · 1 line
Thierry Reding <[email protected]>