dts: add arm isp device node [1/1]
authorkeke.li <keke.li@amlogic.com>
Tue, 19 Mar 2019 05:46:35 +0000 (13:46 +0800)
committerTao Zeng <tao.zeng@amlogic.com>
Thu, 16 May 2019 02:36:58 +0000 (19:36 -0700)
PD#SWPL-70

Problem:
arm isp driver need to use dts

Solution:
add arm isp device node

Verify:
w400

Test: camera preview and capture OK

Change-Id: Idc603890f07afe25beba5deab3ab391825aee584
Signed-off-by: Keke Li <keke.li@amlogic.com>
arch/arm/boot/dts/amlogic/g12b_a311d_w400.dts
arch/arm/boot/dts/amlogic/g12b_a311d_w400_a.dts
arch/arm64/boot/dts/amlogic/g12b_a311d_w400.dts
arch/arm64/boot/dts/amlogic/g12b_a311d_w400_a.dts

index 133db08..cce633a 100644 (file)
                        alignment = <0x400000>;
                        linux,contiguous-region;
                };
+               isp_cma_reserved:linux,isp_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       status = "okay";
+                       size = <0x06800000>;
+                       alignment = <0x400000>;
+               };
+               adapt_cma_reserved:linux,adapt_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       status = "okay";
+                       size = <0x01800000>;
+                       alignment = <0x400000>;
+               };
        };
 
        galcore {
                status = "okay";
        };
 
-
+       sensor: sensor {
+               compatible = "soc, sensor";
+               status = "okay";
+               sensor-name = "imx290"; /*imx290;os08a10;imx227*/
+               pinctrl-names="default";
+               pinctrl-0=<&clk12_24_z_pins>;
+               clocks = <&clkc CLKID_24M>;
+               clock-names = "g12a_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 {
+               compatible = "soc, iq";
+               status = "okay";
+               sensor-name = "imx290"; /*imx290;os08a10;imx227*/
+       };
 }; /* end of / */
 
+&i2c2 {
+       status = "okay";
+       pinctrl-names="default";
+       pinctrl-0=<&i2c2_master_pins2>;
+       clock-frequency = <100000>; /* default 100k */
+       sensor-i2c@6c {
+               compatible = "arm, i2c-sensor";
+               reg = <0x6c>;
+               reg-names = "i2c-sensor";
+               slave-addr = <0x6c>;
+               reg-type = <2>;
+               reg-data-type = <1>;
+               link-device = <&phycsi>;
+       };
+};
+
+&isp {
+       status = "okay";
+       memory-region = <&isp_cma_reserved>;
+};
+
+&adapter {
+       status = "okay";
+       memory-region = <&adapt_cma_reserved>;
+};
+
 &meson_fb {
        status = "okay";
        display_size_default = <1920 1080 1920 2160 32>;
                };
        };
 
+       clk12_24_z_pins:clk12_24_z_pins {
+               mux {
+                       groups = "clk12_24_z";
+                       function = "clk12_24_ee";
+                       drive-strength = <3>;
+               };
+       };
 }; /* end of pinctrl_periphs */
 
 &pinctrl_aobus {
 };
 &ethmac {
        status = "okay";
+/*     //conflict with isp i2c
        pinctrl-names = "internal_eth_pins";
        pinctrl-0 = <&internal_eth_pins>;
+*/
        mc_val = <0x4be04>;
 
        internal_phy=<1>;
index 3eed3bd..55ed7c9 100644 (file)
                        alignment = <0x400000>;
                        linux,contiguous-region;
                };
+               isp_cma_reserved:linux,isp_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       status = "okay";
+                       size = <0x68000000>;
+                       alignment = <0x400000>;
+               };
+               adapt_cma_reserved:linux,adapt_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       status = "okay";
+                       size = <0x01800000>;
+                       alignment = <0x400000>;
+               };
        };
 
        galcore {
                status = "okay";
        };
 
-
+       sensor: sensor {
+               compatible = "soc, sensor";
+               status = "okay";
+               sensor-name = "imx290"; /*imx290;os08a10;imx227*/
+               pinctrl-names="default";
+               pinctrl-0=<&clk12_24_z_pins>;
+               clocks = <&clkc CLKID_24M>;
+               clock-names = "g12a_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 {
+               compatible = "soc, iq";
+               status = "okay";
+               sensor-name = "imx290"; /*imx290;os08a10;imx227*/
+       };
 }; /* end of / */
 
+&i2c2 {
+       status = "okay";
+       pinctrl-names="default";
+       pinctrl-0=<&i2c2_master_pins2>;
+       clock-frequency = <100000>; /* default 100k */
+       sensor-i2c@6c {
+               compatible = "arm, i2c-sensor";
+               reg = <0x6c>;
+               reg-names = "i2c-sensor";
+               slave-addr = <0x6c>;
+               reg-type = <2>;
+               reg-data-type = <1>;
+               link-device = <&phycsi>;
+       };
+};
+
+&isp {
+       status = "okay";
+       memory-region = <&isp_cma_reserved>;
+};
+
+&adapter {
+       status = "okay";
+       memory-region = <&adapt_cma_reserved>;
+};
+
 &meson_fb {
        status = "okay";
        display_size_default = <1920 1080 1920 2160 32>;
                };
        };
 
+       clk12_24_z_pins:clk12_24_z_pins {
+               mux {
+                       groups = "clk12_24_z";
+                       function = "clk12_24_ee";
+                       drive-strength = <3>;
+               };
+       };
 }; /* end of pinctrl_periphs */
 
 &pinctrl_aobus {
 };
 &ethmac {
        status = "okay";
+/*     //conflict with isp i2c
        pinctrl-names = "internal_eth_pins";
        pinctrl-0 = <&internal_eth_pins>;
+*/
        mc_val = <0x4be04>;
 
        internal_phy=<1>;
index 44bc11f..c8e2006 100644 (file)
                        alignment = <0x400000>;
                        linux,contiguous-region;
                };
+               isp_cma_reserved:linux,isp_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       status = "okay";
+                       size = <0x06800000>;
+                       alignment = <0x400000>;
+               };
+               adapt_cma_reserved:linux,adapt_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       status = "okay";
+                       size = <0x01800000>;
+                       alignment = <0x400000>;
+               };
        };
        galcore {
                status = "okay";
                status = "okay";
        };
 
-
+       sensor: sensor {
+               compatible = "soc, sensor";
+               status = "okay";
+               sensor-name = "imx290"; /*imx290;os08a10;imx227*/
+               pinctrl-names="default";
+               pinctrl-0=<&clk12_24_z_pins>;
+               clocks = <&clkc CLKID_24M>;
+               clock-names = "g12a_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 {
+               compatible = "soc, iq";
+               status = "okay";
+               sensor-name = "imx290"; /*imx290;os08a10;imx227*/
+       };
 }; /* end of / */
 
+&i2c2 {
+       status = "okay";
+       pinctrl-names="default";
+       pinctrl-0=<&i2c2_master_pins2>;
+       clock-frequency = <100000>; /* default 100k */
+       sensor-i2c@6c {
+               compatible = "arm, i2c-sensor";
+               reg = <0x6c>;
+               reg-names = "i2c-sensor";
+               slave-addr = <0x6c>;
+               reg-type = <2>;
+               reg-data-type = <1>;
+               link-device = <&phycsi>;
+       };
+};
+
+&isp {
+       status = "okay";
+       memory-region = <&isp_cma_reserved>;
+};
+
+&adapter {
+       status = "okay";
+       memory-region = <&adapt_cma_reserved>;
+};
+
 &meson_fb {
        status = "okay";
        display_size_default = <1920 1080 1920 2160 32>;
                };
        };
 
+       clk12_24_z_pins:clk12_24_z_pins {
+               mux {
+                       groups = "clk12_24_z";
+                       function = "clk12_24_ee";
+                       drive-strength = <3>;
+               };
+       };
 }; /* end of pinctrl_periphs */
 
 &pinctrl_aobus {
 };
 &ethmac {
        status = "okay";
+/*     //conflict with isp i2c
        pinctrl-names = "internal_eth_pins";
        pinctrl-0 = <&internal_eth_pins>;
+*/
        mc_val = <0x4be04>;
 
        internal_phy=<1>;
index 5f1dbe1..70fb03d 100644 (file)
                        alignment = <0x400000>;
                        linux,contiguous-region;
                };
+               isp_cma_reserved:linux,isp_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       status = "okay";
+                       size = <0x68000000>;
+                       alignment = <0x400000>;
+               };
+               adapt_cma_reserved:linux,adapt_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       status = "okay";
+                       size = <0x01800000>;
+                       alignment = <0x400000>;
+               };
        };
        galcore {
                status = "okay";
                status = "okay";
        };
 
-
+       sensor: sensor {
+               compatible = "soc, sensor";
+               status = "okay";
+               sensor-name = "imx290"; /*imx290;os08a10;imx227*/
+               pinctrl-names="default";
+               pinctrl-0=<&clk12_24_z_pins>;
+               clocks = <&clkc CLKID_24M>;
+               clock-names = "g12a_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 {
+               compatible = "soc, iq";
+               status = "okay";
+               sensor-name = "imx290"; /*imx290;os08a10;imx227*/
+       };
 }; /* end of / */
 
+&i2c2 {
+       status = "okay";
+       pinctrl-names="default";
+       pinctrl-0=<&i2c2_master_pins2>;
+       clock-frequency = <100000>; /* default 100k */
+       sensor-i2c@6c {
+               compatible = "arm, i2c-sensor";
+               reg = <0x6c>;
+               reg-names = "i2c-sensor";
+               slave-addr = <0x6c>;
+               reg-type = <2>;
+               reg-data-type = <1>;
+               link-device = <&phycsi>;
+       };
+};
+
+&isp {
+       status = "okay";
+       memory-region = <&isp_cma_reserved>;
+};
+
+&adapter {
+       status = "okay";
+       memory-region = <&adapt_cma_reserved>;
+};
+
 &meson_fb {
        status = "okay";
        display_size_default = <1920 1080 1920 2160 32>;
                };
        };
 
+       clk12_24_z_pins:clk12_24_z_pins {
+               mux {
+                       groups = "clk12_24_z";
+                       function = "clk12_24_ee";
+                       drive-strength = <3>;
+               };
+       };
 }; /* end of pinctrl_periphs */
 
 &pinctrl_aobus {
 };
 &ethmac {
        status = "okay";
+/*     //conflict with isp i2c
        pinctrl-names = "internal_eth_pins";
        pinctrl-0 = <&internal_eth_pins>;
+*/
        mc_val = <0x4be04>;
 
        internal_phy=<1>;