From: Svyatoslav Ryhel Date: Mon, 11 May 2026 07:48:55 +0000 (+0300) Subject: ARM: tegra: transformer: Add support for front camera X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=34d89435081d07b052dd522a57054132dada5400;p=thirdparty%2Fkernel%2Flinux.git ARM: tegra: transformer: Add support for front camera 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. Signed-off-by: Svyatoslav Ryhel Signed-off-by: Thierry Reding --- diff --git a/arch/arm/boot/dts/nvidia/tegra30-asus-transformer-common.dtsi b/arch/arm/boot/dts/nvidia/tegra30-asus-transformer-common.dtsi index ead95306840f7..e6d079647f772 100644 --- a/arch/arm/boot/dts/nvidia/tegra30-asus-transformer-common.dtsi +++ b/arch/arm/boot/dts/nvidia/tegra30-asus-transformer-common.dtsi @@ -2,6 +2,7 @@ #include #include +#include #include #include "tegra30.dtsi" @@ -73,6 +74,91 @@ }; 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"; @@ -1160,6 +1246,36 @@ 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 = ; + link-frequencies = /bits/ 64 <384000000>; + remote-endpoint = <&csib_input>; + }; + }; + }; + gyroscope@68 { compatible = "invensense,mpu3050"; reg = <0x68>; @@ -1297,7 +1413,7 @@ /* 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>; @@ -1672,6 +1788,26 @@ 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>;