]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
arm64: dts: st: enable imx335/csi/dcmipp pipeline on stm32mp257f-ev1
authorAlain Volmat <alain.volmat@foss.st.com>
Thu, 12 Dec 2024 09:17:39 +0000 (10:17 +0100)
committerAlexandre Torgue <alexandre.torgue@foss.st.com>
Fri, 20 Dec 2024 07:20:25 +0000 (08:20 +0100)
Enable the camera pipeline with a imx335 sensor connected to the
dcmipp via the csi interface.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
arch/arm64/boot/dts/st/stm32mp257f-ev1.dts

index 753df49dbcb5196bc758497779070cadf98b6a23..1b88485a62a1f837770654eee6c970208fef6edc 100644 (file)
        };
 
        clocks {
+               clk_ext_camera: clk-ext-camera {
+                       #clock-cells = <0>;
+                       compatible = "fixed-clock";
+                       clock-frequency = <24000000>;
+               };
+
                pad_clk: pad-clk {
                        #clock-cells = <0>;
                        compatible = "fixed-clock";
                };
        };
 
+       imx335_2v9: regulator-2v9 {
+               compatible = "regulator-fixed";
+               regulator-name = "imx335-avdd";
+               regulator-min-microvolt = <2900000>;
+               regulator-max-microvolt = <2900000>;
+               regulator-always-on;
+       };
+
+       imx335_1v8: regulator-1v8 {
+               compatible = "regulator-fixed";
+               regulator-name = "imx335-ovdd";
+               regulator-min-microvolt = <1800000>;
+               regulator-max-microvolt = <1800000>;
+               regulator-always-on;
+       };
+
+       imx335_1v2: regulator-1v2 {
+               compatible = "regulator-fixed";
+               regulator-name = "imx335-dvdd";
+               regulator-min-microvolt = <1200000>;
+               regulator-max-microvolt = <1200000>;
+               regulator-always-on;
+       };
+
        memory@80000000 {
                device_type = "memory";
                reg = <0x0 0x80000000 0x1 0x0>;
        status = "okay";
 };
 
+&csi {
+       vdd-supply =  <&scmi_vddcore>;
+       vdda18-supply = <&scmi_v1v8>;
+       status = "okay";
+       ports {
+               #address-cells = <1>;
+               #size-cells = <0>;
+               port@0 {
+                       reg = <0>;
+                       csi_sink: endpoint {
+                               remote-endpoint = <&imx335_ep>;
+                               data-lanes = <1 2>;
+                               bus-type = <4>;
+                       };
+               };
+               port@1 {
+                       reg = <1>;
+                       csi_source: endpoint {
+                               remote-endpoint = <&dcmipp_0>;
+                       };
+               };
+       };
+};
+
+&dcmipp {
+       status = "okay";
+       port {
+               dcmipp_0: endpoint {
+                       remote-endpoint = <&csi_source>;
+                       bus-type = <4>;
+               };
+       };
+};
+
 &ethernet2 {
        pinctrl-names = "default", "sleep";
        pinctrl-0 = <&eth2_rgmii_pins_a>;
        i2c-scl-falling-time-ns = <13>;
        clock-frequency = <400000>;
        status = "okay";
+
+       imx335: camera@1a {
+               compatible = "sony,imx335";
+               reg = <0x1a>;
+               clocks = <&clk_ext_camera>;
+               avdd-supply = <&imx335_2v9>;
+               ovdd-supply = <&imx335_1v8>;
+               dvdd-supply = <&imx335_1v2>;
+               reset-gpios = <&gpioi 7 (GPIO_ACTIVE_LOW | GPIO_PUSH_PULL)>;
+
+               port {
+                       imx335_ep: endpoint {
+                               remote-endpoint = <&csi_sink>;
+                               clock-lanes = <0>;
+                               data-lanes = <1 2>;
+                               link-frequencies = /bits/ 64 <594000000>;
+                       };
+               };
+       };
 };
 
 &i2c8 {