]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
ARM: tegra: grouper: Add support for front camera
authorSvyatoslav Ryhel <clamor95@gmail.com>
Mon, 11 May 2026 07:48:54 +0000 (10:48 +0300)
committerThierry Reding <treding@nvidia.com>
Fri, 29 May 2026 12:36:14 +0000 (14:36 +0200)
Add front camera video path.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
arch/arm/boot/dts/nvidia/tegra30-asus-nexus7-grouper-common.dtsi
arch/arm/boot/dts/nvidia/tegra30-asus-nexus7-grouper-maxim-pmic.dtsi
arch/arm/boot/dts/nvidia/tegra30-asus-nexus7-grouper-ti-pmic.dtsi

index 15f53babdc21779464022f50b8e51f9516b2d191..892d718294dd105fcfbf290c38de74fc3f93ed6b 100644 (file)
@@ -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>
 
                };
        };
 
+       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>;
                        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>;
                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";
index 694c7fe37eb880993ecea09a596773d783173d90..4bd98935031b401cf712e56d5d0a27029bbeb21f 100644 (file)
                                        regulator-boot-on;
                                };
 
-                               ldo5 {
+                               vddio_cam: ldo5 {
                                        regulator-name = "vdd_camera";
                                        regulator-min-microvolt = <1800000>;
                                        regulator-max-microvolt = <1800000>;
                                        regulator-boot-on;
                                };
 
-                               ldo7 {
+                               avdd_dsi_csi: ldo7 {
                                        regulator-name = "avdd_dsi_csi";
                                        regulator-min-microvolt = <1200000>;
                                        regulator-max-microvolt = <1200000>;
index ee4a3f4827690b25323397053e14a4924e0590dc..8fe3c62c90520d0da3a7eec9a0aa237c40f67f6d 100644 (file)
                                        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>;