From d0a36464d1ef9e55cd671a74c8bf7ff407beb4b1 Mon Sep 17 00:00:00 2001 From: "shuanshuan.jiang" Date: Thu, 28 Sep 2023 14:25:57 +0800 Subject: [PATCH] camera: support dual camera [2/3] PD#SWPL-122409 PD#SWPL-122408 Problem: config dual camera dts Solution: config dual camera dts Verify: local Signed-off-by: shuanshuan.jiang Change-Id: I0c48be7ad05b28913ddc56d5357b7aa81485e324 --- .../boot/dts/amlogic/g12b_a311d_w400.dts | 37 ++++++++++++------- .../dts/amlogic/g12b_a311d_w400_debian.dts | 37 ++++++++++++------- .../dts/amlogic/g12b_a311d_w400_linux.dts | 37 ++++++++++++------- arch/arm64/boot/dts/amlogic/mesong12b.dtsi | 4 +- 4 files changed, 74 insertions(+), 41 deletions(-) diff --git a/arch/arm64/boot/dts/amlogic/g12b_a311d_w400.dts b/arch/arm64/boot/dts/amlogic/g12b_a311d_w400.dts index 38b222d0c..61cf7f82e 100644 --- a/arch/arm64/boot/dts/amlogic/g12b_a311d_w400.dts +++ b/arch/arm64/boot/dts/amlogic/g12b_a311d_w400.dts @@ -9,7 +9,6 @@ #include "mesong12b_w400-panel.dtsi" #include "mesong12b_drm.dtsi" #include "partition_normal_linux.dtsi" - / { amlogic-dt-id = "g12b_w400_a"; compatible = "g12b_w400_a"; @@ -175,7 +174,7 @@ compatible = "shared-dma-pool"; reusable; status = "okay"; - size = <0x0 0x5400000>; + size = <0x0 0x8000000>; alignment = <0x0 0x400000>; }; @@ -183,7 +182,7 @@ compatible = "shared-dma-pool"; reusable; status = "okay"; - size = <0x0 0x400000>; + size = <0x0 0x4000000>; }; }; galcore { @@ -888,13 +887,7 @@ compatible = "soc, sensor"; status = "okay"; sensor-name = "imx290"; /*imx290;os08a10;imx227*/ - pinctrl-names="default"; - pinctrl-0=<&clk12_24_z_pins>; - clocks = <&clkc CLKID_24M_CLK_GATE>; - clock-names = "24m"; reset = <&gpio GPIOZ_12 GPIO_ACTIVE_HIGH>; - ir_cut_gpio = <&gpio GPIOZ_11 GPIO_ACTIVE_HIGH - &gpio GPIOZ_7 GPIO_ACTIVE_HIGH>; }; iq: iq { @@ -927,15 +920,23 @@ &isp { status = "okay"; temper-line-offset = <0x1680>; - temper-buf-size = <12>; + temper-buf-size = <6>; temper-frame-num = <1>; - temper-frame-size = <0x0c00000>; + temper-frame-size = <0x5EEC00>; + temper-line-offset1 = <0x1680>; + temper-buf-size1 = <6>; + temper-frame-num1 = <1>; + temper-frame-size1 = <0x5EEC00>; + temper-line-offset2 = <0x1680>; + temper-buf-size2 = <6>; + temper-frame-num2 = <1>; + temper-frame-size2 = <0x5EEC00>; memory-region = <&isp_cma_reserved>; }; &adapter { status = "okay"; - mem_alloc = <4>; + mem_alloc = <64>; memory-region = <&adapt_cma_reserved>; }; @@ -970,11 +971,21 @@ }; &i2c0 { - status = "disable"; + status = "okay"; pinctrl-names = "default"; pinctrl-0 = <&i2c0_master_pins2>; clock-frequency = <400000>; + sensor-i2c@34 { + compatible = "arm, i2c-sensor-sub"; + reg = <0x34>; + reg-names = "i2c-sensor"; + slave-addr = <0x34>; + reg-type = <2>; + reg-data-type = <1>; + link-device = <&phycsi>; + }; + touchscreen@38 { compatible = "focaltech,fts"; status = "disabled"; diff --git a/arch/arm64/boot/dts/amlogic/g12b_a311d_w400_debian.dts b/arch/arm64/boot/dts/amlogic/g12b_a311d_w400_debian.dts index a3d9f953b..bcb8dcbb4 100644 --- a/arch/arm64/boot/dts/amlogic/g12b_a311d_w400_debian.dts +++ b/arch/arm64/boot/dts/amlogic/g12b_a311d_w400_debian.dts @@ -4,7 +4,6 @@ */ /dts-v1/; - #include "mesong12b.dtsi" #include "mesong12b_w400-panel.dtsi" #include "mesong12b_drm_dual_disp.dtsi" @@ -175,7 +174,7 @@ compatible = "shared-dma-pool"; reusable; status = "okay"; - size = <0x0 0x5400000>; + size = <0x0 0x8000000>; alignment = <0x0 0x400000>; }; @@ -183,7 +182,7 @@ compatible = "shared-dma-pool"; reusable; status = "okay"; - size = <0x0 0x400000>; + size = <0x0 0x4000000>; }; }; galcore { @@ -889,13 +888,7 @@ compatible = "soc, sensor"; status = "okay"; sensor-name = "imx290"; /*imx290;os08a10;imx227*/ - pinctrl-names="default"; - pinctrl-0=<&clk12_24_z_pins>; - clocks = <&clkc CLKID_24M_CLK_GATE>; - clock-names = "24m"; reset = <&gpio GPIOZ_12 GPIO_ACTIVE_HIGH>; - ir_cut_gpio = <&gpio GPIOZ_11 GPIO_ACTIVE_HIGH - &gpio GPIOZ_7 GPIO_ACTIVE_HIGH>; }; iq: iq { @@ -928,15 +921,23 @@ &isp { status = "okay"; temper-line-offset = <0x1680>; - temper-buf-size = <12>; + temper-buf-size = <6>; temper-frame-num = <1>; - temper-frame-size = <0x0c00000>; + temper-frame-size = <0x5EEC00>; + temper-line-offset1 = <0x1680>; + temper-buf-size1 = <6>; + temper-frame-num1 = <1>; + temper-frame-size1 = <0x5EEC00>; + temper-line-offset2 = <0x1680>; + temper-buf-size2 = <6>; + temper-frame-num2 = <1>; + temper-frame-size2 = <0x5EEC00>; memory-region = <&isp_cma_reserved>; }; &adapter { status = "okay"; - mem_alloc = <4>; + mem_alloc = <64>; memory-region = <&adapt_cma_reserved>; }; @@ -977,11 +978,21 @@ }; &i2c0 { - status = "disable"; + status = "okay"; pinctrl-names = "default"; pinctrl-0 = <&i2c0_master_pins2>; clock-frequency = <400000>; + sensor-i2c@34 { + compatible = "arm, i2c-sensor-sub"; + reg = <0x34>; + reg-names = "i2c-sensor"; + slave-addr = <0x34>; + reg-type = <2>; + reg-data-type = <1>; + link-device = <&phycsi>; + }; + touchscreen@38 { compatible = "focaltech,fts"; status = "disabled"; diff --git a/arch/arm64/boot/dts/amlogic/g12b_a311d_w400_linux.dts b/arch/arm64/boot/dts/amlogic/g12b_a311d_w400_linux.dts index 4f322d083..b109f8ece 100644 --- a/arch/arm64/boot/dts/amlogic/g12b_a311d_w400_linux.dts +++ b/arch/arm64/boot/dts/amlogic/g12b_a311d_w400_linux.dts @@ -4,7 +4,6 @@ */ /dts-v1/; - #include "mesong12b.dtsi" #include "mesong12b_w400-panel.dtsi" #include "mesong12b_drm_dual_disp.dtsi" @@ -175,7 +174,7 @@ compatible = "shared-dma-pool"; reusable; status = "okay"; - size = <0x0 0x5400000>; + size = <0x0 0x8000000>; alignment = <0x0 0x400000>; }; @@ -183,7 +182,7 @@ compatible = "shared-dma-pool"; reusable; status = "okay"; - size = <0x0 0x400000>; + size = <0x0 0x4000000>; }; }; galcore { @@ -888,13 +887,7 @@ compatible = "soc, sensor"; status = "okay"; sensor-name = "imx290"; /*imx290;os08a10;imx227*/ - pinctrl-names="default"; - pinctrl-0=<&clk12_24_z_pins>; - clocks = <&clkc CLKID_24M_CLK_GATE>; - clock-names = "24m"; reset = <&gpio GPIOZ_12 GPIO_ACTIVE_HIGH>; - ir_cut_gpio = <&gpio GPIOZ_11 GPIO_ACTIVE_HIGH - &gpio GPIOZ_7 GPIO_ACTIVE_HIGH>; }; iq: iq { @@ -927,15 +920,23 @@ &isp { status = "okay"; temper-line-offset = <0x1680>; - temper-buf-size = <12>; + temper-buf-size = <6>; temper-frame-num = <1>; - temper-frame-size = <0x0c00000>; + temper-frame-size = <0x5EEC00>; + temper-line-offset1 = <0x1680>; + temper-buf-size1 = <6>; + temper-frame-num1 = <1>; + temper-frame-size1 = <0x5EEC00>; + temper-line-offset2 = <0x1680>; + temper-buf-size2 = <6>; + temper-frame-num2 = <1>; + temper-frame-size2 = <0x5EEC00>; memory-region = <&isp_cma_reserved>; }; &adapter { status = "okay"; - mem_alloc = <4>; + mem_alloc = <64>; memory-region = <&adapt_cma_reserved>; }; @@ -975,11 +976,21 @@ }; &i2c0 { - status = "disable"; + status = "okay"; pinctrl-names = "default"; pinctrl-0 = <&i2c0_master_pins2>; clock-frequency = <400000>; + sensor-i2c@34 { + compatible = "arm, i2c-sensor-sub"; + reg = <0x34>; + reg-names = "i2c-sensor"; + slave-addr = <0x34>; + reg-type = <2>; + reg-data-type = <1>; + link-device = <&phycsi>; + }; + touchscreen@38 { compatible = "focaltech,fts"; status = "disabled"; diff --git a/arch/arm64/boot/dts/amlogic/mesong12b.dtsi b/arch/arm64/boot/dts/amlogic/mesong12b.dtsi index 9987ff133..8bd8bf8db 100644 --- a/arch/arm64/boot/dts/amlogic/mesong12b.dtsi +++ b/arch/arm64/boot/dts/amlogic/mesong12b.dtsi @@ -1924,8 +1924,8 @@ temper-buf-size = <24>; clocks = <&clkc CLKID_MIPI_ISP_CLK>, <&clkc CLKID_MIPI_CSI_PHY_CLK0>; - clock-names = "cts_mipi_isp_clk", - "cts_mipi_csi_phy_clk0"; + clock-names = "cts_mipi_isp_clk_composite", + "cts_mipi_csi_phy_clk0_composite"; link-device = <&isp_sc>; };