From f6a38ab51bd551d205625c67cf5fa5599dd148c1 Mon Sep 17 00:00:00 2001 From: Mohammed Tayyab Date: Wed, 12 Aug 2026 15:30:00 +0530 Subject: [PATCH] arm: dts: alif: Add camera support to appkit DTS files Add camera-related nodes to appkit-e6.dts, appkit-e8.dts, and appkit-e8-unicore.dts to enable camera functionality on the appkit boards. Changes include: - Add video-interfaces header include - Add reg_camera_power regulator - Update reg_2p7v to vaa-supply with status - Update reg_1p2v to vdd-supply with status - Add i2cmux with arx3a0 camera sensor - Add dphy, csi, cpi nodes for camera interface - Add pinctrl_csi_cam pinmux group - Enable gpio7 controller Signed-off-by: Mohammed Tayyab --- .../dts/alif/ensemble/appkit/appkit-e6.dts | 118 +++++++++++++++++- .../ensemble/appkit/appkit-e8-unicore.dts | 118 +++++++++++++++++- .../dts/alif/ensemble/appkit/appkit-e8.dts | 118 +++++++++++++++++- 3 files changed, 348 insertions(+), 6 deletions(-) diff --git a/arch/arm/boot/dts/alif/ensemble/appkit/appkit-e6.dts b/arch/arm/boot/dts/alif/ensemble/appkit/appkit-e6.dts index 65d43f37f537..50ec0bafdaac 100644 --- a/arch/arm/boot/dts/alif/ensemble/appkit/appkit-e6.dts +++ b/arch/arm/boot/dts/alif/ensemble/appkit/appkit-e6.dts @@ -6,6 +6,7 @@ #include "../common/ensemble-ex.dtsi" #include "../common/devkit_ex_dct_defines.h" +#include / { model = "appkit-e6"; @@ -26,12 +27,21 @@ regulator-max-microvolt = <3300000>; regulator-always-on; }; + reg_camera_power: reg_camera { + compatible = "regulator-fixed"; + regulator-name = "camera-power"; + regulator-min-microvolt = <2700000>; + regulator-max-microvolt = <2700000>; + regulator-always-on; + status = "okay"; + }; reg_2p7v: regulator-2v7 { compatible = "regulator-fixed"; - regulator-name = "fixed-2.7V"; + regulator-name = "vaa-supply"; regulator-min-microvolt = <2700000>; regulator-max-microvolt = <2700000>; regulator-always-on; + status = "okay"; }; reg_1p8v: regulator-1v8 { compatible = "regulator-fixed"; @@ -42,10 +52,11 @@ }; reg_1p2v: regulator-1v2 { compatible = "regulator-fixed"; - regulator-name = "fixed-1.2V"; + regulator-name = "vdd-supply"; regulator-min-microvolt = <1200000>; regulator-max-microvolt = <1200000>; regulator-always-on; + status = "okay"; }; chosen { @@ -334,6 +345,99 @@ status = ETHOSU_NPU_STATUS; }; +/ { + i2cmux { + compatible = "i2c-mux-gpio"; + #address-cells = <1>; + #size-cells = <0>; + mux-gpios = <&port15 3 GPIO_ACTIVE_HIGH>; + i2c-parent = <&i2c1>; + status = "okay"; + i2c@0 { + #address-cells = <1>; + #size-cells = <0>; + reg = <0>; + + arx3a0_selfie: arx3a0@36 { + compatible = "onnn,arx3a0"; + reg = <0x36>; + clocks = <&psclks ENSEMBLE_EXT_CLK>; + clock-names = "extclk"; + pinctrl-0 = <&pinctrl_csi_cam>; + pinctrl-names = "default"; + reset-gpios = <&port15 4 GPIO_ACTIVE_LOW>; + power-gpios = <&port8 5 GPIO_ACTIVE_HIGH>; + vaa-supply = <®_2p7v>; + vdd-supply = <®_1p2v>; + vdd_io-supply = <®_1p8v>; + status = "okay"; + port { + arx3a0_csi2_ep: endpoint { + bus-type = ; + data-lanes = <1 2>; + remote-endpoint = <&csi2_in>; + link-frequencies = /bits/ 64 <400000000>; + }; + }; + }; + }; + }; +}; + +&dphy { + status = CSI_STATUS; +}; + +&csi { + status = CSI_STATUS; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + csi2_in: endpoint { + bus-type = ; + remote-endpoint = <&arx3a0_csi2_ep>; + data-lanes = <1 2>; + }; + }; + + port@1 { + reg = <1>; + csi_out_ep: endpoint { + remote-endpoint = <&cpi_ep_in>; + bus-type = ; + }; + }; + }; +}; + +&cpi { + status = CPI_STATUS; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + cpi_ep_in: endpoint { + remote-endpoint = <&csi_out_ep>; + bus-type = ; + }; + }; + + port@1 { + reg = <1>; + cpi_isp_out: endpoint { + }; + }; + + }; +}; + &pinmux { /* * syntax: @@ -483,6 +587,12 @@ >; }; + pinctrl_csi_cam: camera1grp { + pinmux = < + PIN_P0_3__CAM_XVCLK_A 0x23 + >; + }; + pinctrl_camera: camera0grp { pinmux = < PIN_P10_2__CAM_PCLK_B 0x0 @@ -549,3 +659,7 @@ }; }; + +&gpio7 { + status = "okay"; +}; diff --git a/arch/arm/boot/dts/alif/ensemble/appkit/appkit-e8-unicore.dts b/arch/arm/boot/dts/alif/ensemble/appkit/appkit-e8-unicore.dts index c968f0b8bd68..48d9fe6c8336 100644 --- a/arch/arm/boot/dts/alif/ensemble/appkit/appkit-e8-unicore.dts +++ b/arch/arm/boot/dts/alif/ensemble/appkit/appkit-e8-unicore.dts @@ -6,6 +6,7 @@ #include "../common/ensemble-ex.dtsi" #include "../common/devkit_ex_dct_defines.h" +#include / { model = "appkit-e8"; @@ -26,12 +27,21 @@ regulator-max-microvolt = <3300000>; regulator-always-on; }; + reg_camera_power: reg_camera { + compatible = "regulator-fixed"; + regulator-name = "camera-power"; + regulator-min-microvolt = <2700000>; + regulator-max-microvolt = <2700000>; + regulator-always-on; + status = "okay"; + }; reg_2p7v: regulator-2v7 { compatible = "regulator-fixed"; - regulator-name = "fixed-2.7V"; + regulator-name = "vaa-supply"; regulator-min-microvolt = <2700000>; regulator-max-microvolt = <2700000>; regulator-always-on; + status = "okay"; }; reg_1p8v: regulator-1v8 { compatible = "regulator-fixed"; @@ -42,10 +52,11 @@ }; reg_1p2v: regulator-1v2 { compatible = "regulator-fixed"; - regulator-name = "fixed-1.2V"; + regulator-name = "vdd-supply"; regulator-min-microvolt = <1200000>; regulator-max-microvolt = <1200000>; regulator-always-on; + status = "okay"; }; chosen { @@ -334,6 +345,99 @@ status = ETHOSU_NPU_STATUS; }; +/ { + i2cmux { + compatible = "i2c-mux-gpio"; + #address-cells = <1>; + #size-cells = <0>; + mux-gpios = <&port15 3 GPIO_ACTIVE_HIGH>; + i2c-parent = <&i2c1>; + status = "okay"; + i2c@0 { + #address-cells = <1>; + #size-cells = <0>; + reg = <0>; + + arx3a0_selfie: arx3a0@36 { + compatible = "onnn,arx3a0"; + reg = <0x36>; + clocks = <&psclks ENSEMBLE_EXT_CLK>; + clock-names = "extclk"; + pinctrl-0 = <&pinctrl_csi_cam>; + pinctrl-names = "default"; + reset-gpios = <&port15 4 GPIO_ACTIVE_LOW>; + power-gpios = <&port8 5 GPIO_ACTIVE_HIGH>; + vaa-supply = <®_2p7v>; + vdd-supply = <®_1p2v>; + vdd_io-supply = <®_1p8v>; + status = "okay"; + port { + arx3a0_csi2_ep: endpoint { + bus-type = ; + data-lanes = <1 2>; + remote-endpoint = <&csi2_in>; + link-frequencies = /bits/ 64 <400000000>; + }; + }; + }; + }; + }; +}; + +&dphy { + status = CSI_STATUS; +}; + +&csi { + status = CSI_STATUS; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + csi2_in: endpoint { + bus-type = ; + remote-endpoint = <&arx3a0_csi2_ep>; + data-lanes = <1 2>; + }; + }; + + port@1 { + reg = <1>; + csi_out_ep: endpoint { + remote-endpoint = <&cpi_ep_in>; + bus-type = ; + }; + }; + }; +}; + +&cpi { + status = CPI_STATUS; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + cpi_ep_in: endpoint { + remote-endpoint = <&csi_out_ep>; + bus-type = ; + }; + }; + + port@1 { + reg = <1>; + cpi_isp_out: endpoint { + }; + }; + + }; +}; + &pinmux { /* * syntax: @@ -483,6 +587,12 @@ >; }; + pinctrl_csi_cam: camera1grp { + pinmux = < + PIN_P0_3__CAM_XVCLK_A 0x23 + >; + }; + pinctrl_camera: camera0grp { pinmux = < PIN_P10_2__CAM_PCLK_B 0x0 @@ -549,3 +659,7 @@ }; }; + +&gpio7 { + status = "okay"; +}; diff --git a/arch/arm/boot/dts/alif/ensemble/appkit/appkit-e8.dts b/arch/arm/boot/dts/alif/ensemble/appkit/appkit-e8.dts index df0648b91474..de39d3125acf 100644 --- a/arch/arm/boot/dts/alif/ensemble/appkit/appkit-e8.dts +++ b/arch/arm/boot/dts/alif/ensemble/appkit/appkit-e8.dts @@ -6,6 +6,7 @@ #include "../common/ensemble-ex.dtsi" #include "../common/devkit_ex_dct_defines.h" +#include / { model = "appkit-e8"; @@ -22,12 +23,21 @@ regulator-max-microvolt = <3300000>; regulator-always-on; }; + reg_camera_power: reg_camera { + compatible = "regulator-fixed"; + regulator-name = "camera-power"; + regulator-min-microvolt = <2700000>; + regulator-max-microvolt = <2700000>; + regulator-always-on; + status = "okay"; + }; reg_2p7v: regulator-2v7 { compatible = "regulator-fixed"; - regulator-name = "fixed-2.7V"; + regulator-name = "vaa-supply"; regulator-min-microvolt = <2700000>; regulator-max-microvolt = <2700000>; regulator-always-on; + status = "okay"; }; reg_1p8v: regulator-1v8 { compatible = "regulator-fixed"; @@ -38,10 +48,11 @@ }; reg_1p2v: regulator-1v2 { compatible = "regulator-fixed"; - regulator-name = "fixed-1.2V"; + regulator-name = "vdd-supply"; regulator-min-microvolt = <1200000>; regulator-max-microvolt = <1200000>; regulator-always-on; + status = "okay"; }; chosen { @@ -337,6 +348,99 @@ status = ETHOSU_NPU_STATUS; }; +/ { + i2cmux { + compatible = "i2c-mux-gpio"; + #address-cells = <1>; + #size-cells = <0>; + mux-gpios = <&port15 3 GPIO_ACTIVE_HIGH>; + i2c-parent = <&i2c1>; + status = "okay"; + i2c@0 { + #address-cells = <1>; + #size-cells = <0>; + reg = <0>; + + arx3a0_selfie: arx3a0@36 { + compatible = "onnn,arx3a0"; + reg = <0x36>; + clocks = <&psclks ENSEMBLE_EXT_CLK>; + clock-names = "extclk"; + pinctrl-0 = <&pinctrl_csi_cam>; + pinctrl-names = "default"; + reset-gpios = <&port15 4 GPIO_ACTIVE_LOW>; + power-gpios = <&port8 5 GPIO_ACTIVE_HIGH>; + vaa-supply = <®_2p7v>; + vdd-supply = <®_1p2v>; + vdd_io-supply = <®_1p8v>; + status = "okay"; + port { + arx3a0_csi2_ep: endpoint { + bus-type = ; + data-lanes = <1 2>; + remote-endpoint = <&csi2_in>; + link-frequencies = /bits/ 64 <400000000>; + }; + }; + }; + }; + }; +}; + +&dphy { + status = CSI_STATUS; +}; + +&csi { + status = CSI_STATUS; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + csi2_in: endpoint { + bus-type = ; + remote-endpoint = <&arx3a0_csi2_ep>; + data-lanes = <1 2>; + }; + }; + + port@1 { + reg = <1>; + csi_out_ep: endpoint { + remote-endpoint = <&cpi_ep_in>; + bus-type = ; + }; + }; + }; +}; + +&cpi { + status = CPI_STATUS; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + cpi_ep_in: endpoint { + remote-endpoint = <&csi_out_ep>; + bus-type = ; + }; + }; + + port@1 { + reg = <1>; + cpi_isp_out: endpoint { + }; + }; + + }; +}; + &pinmux { /* * syntax: @@ -486,6 +590,12 @@ >; }; + pinctrl_csi_cam: camera1grp { + pinmux = < + PIN_P0_3__CAM_XVCLK_A 0x23 + >; + }; + pinctrl_camera: camera0grp { pinmux = < PIN_P10_2__CAM_PCLK_B 0x0 @@ -552,3 +662,7 @@ }; }; + +&gpio7 { + status = "okay"; +};