]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
arm64: dts: ti: k3-j722s-evm: Add overlay for quad IMX219
authorVaishnav Achath <vaishnav.a@ti.com>
Fri, 9 May 2025 09:19:10 +0000 (14:49 +0530)
committerNishanth Menon <nm@ti.com>
Fri, 9 May 2025 11:21:57 +0000 (06:21 -0500)
RPi v2 Camera (IMX219) is an 8MP camera that can be used with J722S EVM
through the 22-pin CSI-RX connector. Add a reference overlay for quad
IMX219 RPI camera v2 modules on J722S EVM

Signed-off-by: Vaishnav Achath <vaishnav.a@ti.com>
Signed-off-by: Yemike Abhilash Chandra <y-abhilashchandra@ti.com>
Reviewed-by: Udit Kumar <u-kumar1@ti.com>
Link: https://lore.kernel.org/r/20250509091911.2442934-4-y-abhilashchandra@ti.com
Signed-off-by: Nishanth Menon <nm@ti.com>
arch/arm64/boot/dts/ti/Makefile
arch/arm64/boot/dts/ti/k3-j722s-evm-csi2-quad-rpi-cam-imx219.dtso [new file with mode: 0644]

index 3c3aa09a94b64a5c3f94339079bf742d7ecad527..281a282fcbfbcc1d37dfa71c284c84c308e2e7b7 100644 (file)
@@ -132,6 +132,7 @@ dtb-$(CONFIG_ARCH_K3) += k3-j721s2-evm-pcie1-ep.dtbo
 # Boards with J722s SoC
 dtb-$(CONFIG_ARCH_K3) += k3-am67a-beagley-ai.dtb
 dtb-$(CONFIG_ARCH_K3) += k3-j722s-evm.dtb
+dtb-$(CONFIG_ARCH_K3) += k3-j722s-evm-csi2-quad-rpi-cam-imx219.dtbo
 
 # Boards with J784s4 SoC
 dtb-$(CONFIG_ARCH_K3) += k3-am69-sk.dtb
@@ -225,6 +226,8 @@ k3-j721e-sk-csi2-dual-imx219-dtbs := k3-j721e-sk.dtb \
        k3-j721e-sk-csi2-dual-imx219.dtbo
 k3-j721s2-evm-pcie1-ep-dtbs := k3-j721s2-common-proc-board.dtb \
        k3-j721s2-evm-pcie1-ep.dtbo
+k3-j722s-evm-csi2-quad-rpi-cam-imx219-dtbs := k3-j722s-evm.dtb \
+       k3-j722s-evm-csi2-quad-rpi-cam-imx219.dtbo
 k3-j742s2-evm-usb0-type-a-dtbs := k3-j742s2-evm.dtb \
        k3-j784s4-j742s2-evm-usb0-type-a.dtbo
 k3-j784s4-evm-pcie0-pcie1-ep-dtbs := k3-j784s4-evm.dtb \
@@ -263,6 +266,7 @@ dtb- += k3-am625-beagleplay-csi2-ov5640.dtb \
        k3-j721e-evm-pcie1-ep.dtb \
        k3-j721e-sk-csi2-dual-imx219.dtb \
        k3-j721s2-evm-pcie1-ep.dtb \
+       k3-j722s-evm-csi2-quad-rpi-cam-imx219.dtb \
        k3-j742s2-evm-usb0-type-a.dtb \
        k3-j784s4-evm-pcie0-pcie1-ep.dtb \
        k3-j784s4-evm-quad-port-eth-exp1.dtb \
@@ -288,5 +292,6 @@ DTC_FLAGS_k3-j721e-common-proc-board += -@
 DTC_FLAGS_k3-j721e-evm-pcie0-ep += -@
 DTC_FLAGS_k3-j721e-sk += -@
 DTC_FLAGS_k3-j721s2-common-proc-board += -@
+DTC_FLAGS_k3-j722s-evm += -@
 DTC_FLAGS_k3-j784s4-evm += -@
 DTC_FLAGS_k3-j742s2-evm += -@
diff --git a/arch/arm64/boot/dts/ti/k3-j722s-evm-csi2-quad-rpi-cam-imx219.dtso b/arch/arm64/boot/dts/ti/k3-j722s-evm-csi2-quad-rpi-cam-imx219.dtso
new file mode 100644 (file)
index 0000000..4107ef8
--- /dev/null
@@ -0,0 +1,329 @@
+// SPDX-License-Identifier: GPL-2.0-only OR MIT
+/*
+ * DT Overlay for 4 x RPi Camera V2.1 on J722S-EVM board.
+ *
+ * Copyright (C) 2025 Texas Instruments Incorporated - https://www.ti.com/
+ *
+ * Schematics: https://datasheets.raspberrypi.com/camera/camera-v2-schematics.pdf
+ */
+
+/dts-v1/;
+/plugin/;
+
+#include <dt-bindings/gpio/gpio.h>
+#include "k3-pinctrl.h"
+
+&main_pmx0 {
+       cam0_reset_pins_default: cam0-default-reset-pins {
+               pinctrl-single,pins = <
+                       J722S_IOPAD(0x03c, PIN_OUTPUT, 7) /* (R22) GPIO0_15 */
+               >;
+       };
+
+       cam1_reset_pins_default: cam1-default-reset-pins {
+               pinctrl-single,pins = <
+                       J722S_IOPAD(0x044, PIN_OUTPUT, 7) /* (R26) GPIO0_17 */
+               >;
+       };
+
+       cam2_reset_pins_default: cam2-default-reset-pins {
+               pinctrl-single,pins = <
+                       J722S_IOPAD(0x04c, PIN_OUTPUT, 7) /* (T25) GPIO0_19 */
+               >;
+       };
+
+       cam3_reset_pins_default: cam3-default-reset-pins {
+               pinctrl-single,pins = <
+                       J722S_IOPAD(0x054, PIN_OUTPUT, 7) /* (T21) GPIO0_21 */
+               >;
+       };
+};
+
+&{/} {
+       clk_imx219_fixed: clock-24000000 {
+               compatible = "fixed-clock";
+               #clock-cells = <0>;
+               clock-frequency = <24000000>;
+       };
+
+       reg_2p8v: regulator-2p8v {
+               compatible = "regulator-fixed";
+               regulator-name = "2P8V";
+               regulator-min-microvolt = <2800000>;
+               regulator-max-microvolt = <2800000>;
+               vin-supply = <&vsys_3v3_exp>;
+               regulator-always-on;
+       };
+
+       reg_1p8v: regulator-1p8v {
+               compatible = "regulator-fixed";
+               regulator-name = "1P8V";
+               regulator-min-microvolt = <1800000>;
+               regulator-max-microvolt = <1800000>;
+               vin-supply = <&vsys_3v3_exp>;
+               regulator-always-on;
+       };
+
+       reg_1p2v: regulator-1p2v {
+               compatible = "regulator-fixed";
+               regulator-name = "1P2V";
+               regulator-min-microvolt = <1200000>;
+               regulator-max-microvolt = <1200000>;
+               vin-supply = <&vsys_3v3_exp>;
+               regulator-always-on;
+       };
+};
+
+&csi01_mux {
+       idle-state = <1>;
+};
+
+&csi23_mux {
+       idle-state = <1>;
+};
+
+&pca9543_0 {
+       #address-cells = <1>;
+       #size-cells = <0>;
+
+       /* CAM0 I2C */
+       i2c@0 {
+               #address-cells = <1>;
+               #size-cells = <0>;
+               reg = <0>;
+
+               imx219_0: sensor@10 {
+                       compatible = "sony,imx219";
+                       reg = <0x10>;
+
+                       clocks = <&clk_imx219_fixed>;
+
+                       VANA-supply = <&reg_2p8v>;
+                       VDIG-supply = <&reg_1p8v>;
+                       VDDL-supply = <&reg_1p2v>;
+
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&cam0_reset_pins_default>;
+
+                       reset-gpios = <&main_gpio0 15 GPIO_ACTIVE_HIGH>;
+
+                       port {
+                               csi2_cam0: endpoint {
+                                       remote-endpoint = <&csi2rx0_in_sensor>;
+                                       link-frequencies = /bits/ 64 <456000000>;
+                                       clock-lanes = <0>;
+                                       data-lanes = <1 2>;
+                               };
+                       };
+               };
+       };
+
+       /* CAM1 I2C */
+       i2c@1 {
+               #address-cells = <1>;
+               #size-cells = <0>;
+               reg = <1>;
+
+               imx219_1: sensor@10 {
+                       compatible = "sony,imx219";
+                       reg = <0x10>;
+
+                       clocks = <&clk_imx219_fixed>;
+
+                       VANA-supply = <&reg_2p8v>;
+                       VDIG-supply = <&reg_1p8v>;
+                       VDDL-supply = <&reg_1p2v>;
+
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&cam1_reset_pins_default>;
+
+                       reset-gpios = <&main_gpio0 17 GPIO_ACTIVE_HIGH>;
+
+                       port {
+                               csi2_cam1: endpoint {
+                                       remote-endpoint = <&csi2rx1_in_sensor>;
+                                       link-frequencies = /bits/ 64 <456000000>;
+                                       clock-lanes = <0>;
+                                       data-lanes = <1 2>;
+                               };
+                       };
+               };
+       };
+};
+
+&pca9543_1 {
+       #address-cells = <1>;
+       #size-cells = <0>;
+
+       /* CAM0 I2C */
+       i2c@0 {
+               #address-cells = <1>;
+               #size-cells = <0>;
+               reg = <0>;
+
+               imx219_2: sensor@10 {
+                       compatible = "sony,imx219";
+                       reg = <0x10>;
+
+                       clocks = <&clk_imx219_fixed>;
+
+                       VANA-supply = <&reg_2p8v>;
+                       VDIG-supply = <&reg_1p8v>;
+                       VDDL-supply = <&reg_1p2v>;
+
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&cam2_reset_pins_default>;
+
+                       reset-gpios = <&main_gpio0 19 GPIO_ACTIVE_HIGH>;
+
+                       port {
+                               csi2_cam2: endpoint {
+                                       remote-endpoint = <&csi2rx2_in_sensor>;
+                                       link-frequencies = /bits/ 64 <456000000>;
+                                       clock-lanes = <0>;
+                                       data-lanes = <1 2>;
+                               };
+                       };
+               };
+       };
+
+       /* CAM1 I2C */
+       i2c@1 {
+               #address-cells = <1>;
+               #size-cells = <0>;
+               reg = <1>;
+
+               imx219_3: sensor@10 {
+                       compatible = "sony,imx219";
+                       reg = <0x10>;
+
+                       clocks = <&clk_imx219_fixed>;
+
+                       VANA-supply = <&reg_2p8v>;
+                       VDIG-supply = <&reg_1p8v>;
+                       VDDL-supply = <&reg_1p2v>;
+
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&cam3_reset_pins_default>;
+
+                       reset-gpios = <&main_gpio0 21 GPIO_ACTIVE_HIGH>;
+
+                       port {
+                               csi2_cam3: endpoint {
+                                       remote-endpoint = <&csi2rx3_in_sensor>;
+                                       link-frequencies = /bits/ 64 <456000000>;
+                                       clock-lanes = <0>;
+                                       data-lanes = <1 2>;
+                               };
+                       };
+               };
+       };
+};
+
+&cdns_csi2rx0 {
+       ports {
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               csi0_port0: port@0 {
+                       reg = <0>;
+                       status = "okay";
+
+                       csi2rx0_in_sensor: endpoint {
+                               remote-endpoint = <&csi2_cam0>;
+                               bus-type = <4>; /* CSI2 DPHY */
+                               clock-lanes = <0>;
+                               data-lanes = <1 2>;
+                       };
+               };
+       };
+};
+
+&cdns_csi2rx1 {
+       ports {
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               csi1_port0: port@0 {
+                       reg = <0>;
+                       status = "okay";
+
+                       csi2rx1_in_sensor: endpoint {
+                               remote-endpoint = <&csi2_cam1>;
+                               bus-type = <4>; /* CSI2 DPHY */
+                               clock-lanes = <0>;
+                               data-lanes = <1 2>;
+                       };
+               };
+       };
+};
+
+&cdns_csi2rx2 {
+       ports {
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               csi2_port0: port@0 {
+                       reg = <0>;
+                       status = "okay";
+
+                       csi2rx2_in_sensor: endpoint {
+                               remote-endpoint = <&csi2_cam2>;
+                               bus-type = <4>; /* CSI2 DPHY */
+                               clock-lanes = <0>;
+                               data-lanes = <1 2>;
+                       };
+               };
+       };
+};
+
+&cdns_csi2rx3 {
+       ports {
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               csi3_port0: port@0 {
+                       reg = <0>;
+                       status = "okay";
+
+                       csi2rx3_in_sensor: endpoint {
+                               remote-endpoint = <&csi2_cam3>;
+                               bus-type = <4>; /* CSI2 DPHY */
+                               clock-lanes = <0>;
+                               data-lanes = <1 2>;
+                       };
+               };
+       };
+};
+
+&ti_csi2rx0 {
+       status = "okay";
+};
+
+&dphy0 {
+       status = "okay";
+};
+
+&ti_csi2rx1 {
+       status = "okay";
+};
+
+&dphy1 {
+       status = "okay";
+};
+
+&ti_csi2rx2 {
+       status = "okay";
+};
+
+&dphy2 {
+       status = "okay";
+};
+
+&ti_csi2rx3 {
+       status = "okay";
+};
+
+&dphy3 {
+       status = "okay";
+};