vpu: add g12b support
authorEvoke Zhang <evoke.zhang@amlogic.com>
Mon, 7 May 2018 03:11:34 +0000 (11:11 +0800)
committerYixun Lan <yixun.lan@amlogic.com>
Fri, 29 Jun 2018 06:38:22 +0000 (23:38 -0700)
PD#165090: vpu: add g12b support

Change-Id: I16fcd32700a5868209cd30563435b54f27a157a5
Signed-off-by: Evoke Zhang <evoke.zhang@amlogic.com>
arch/arm64/boot/dts/amlogic/mesong12b.dtsi
drivers/amlogic/media/common/vpu/vpu.c
drivers/amlogic/media/common/vpu/vpu.h

index 88bf049..f587066 100644 (file)
        };
 
        vpu {
-               /*compatible = "amlogic, vpu-g12a";*/
+               compatible = "amlogic, vpu-g12b";
                dev_name = "vpu";
                status = "okay";
                clocks = <&clkc CLKID_VAPB_MUX>,
index 590877d..a10c7ef 100644 (file)
@@ -1339,6 +1339,28 @@ static struct vpu_data_s vpu_data_g12a = {
        .power_off = vpu_power_off_txlx,
 };
 
+static struct vpu_data_s vpu_data_g12b = {
+       .chip_type = VPU_CHIP_G12B,
+       .chip_name = "g12b",
+       .clk_level_dft = CLK_LEVEL_DFT_G12A,
+       .clk_level_max = CLK_LEVEL_MAX_G12A,
+       .fclk_div_table = fclk_div_table_g12a,
+
+       .gp_pll_valid = 0,
+       .mem_pd_reg1_valid = 1,
+       .mem_pd_reg2_valid = 1,
+
+       .mem_pd_table_cnt =
+               sizeof(vpu_mem_pd_g12a) / sizeof(struct vpu_ctrl_s),
+       .clk_gate_table_cnt =
+               sizeof(vpu_clk_gate_g12a) / sizeof(struct vpu_ctrl_s),
+       .mem_pd_table = vpu_mem_pd_g12a,
+       .clk_gate_table = vpu_clk_gate_g12a,
+
+       .power_on  = vpu_power_on_txlx,
+       .power_off = vpu_power_off_txlx,
+};
+
 static const struct of_device_id vpu_of_table[] = {
        {
                .compatible = "amlogic, vpu-gxbb",
@@ -1368,6 +1390,10 @@ static const struct of_device_id vpu_of_table[] = {
                .compatible = "amlogic, vpu-g12a",
                .data = &vpu_data_g12a,
        },
+       {
+               .compatible = "amlogic, vpu-g12b",
+               .data = &vpu_data_g12b,
+       },
        {},
 };
 
index d4d02b2..32ca9bb 100644 (file)
@@ -33,6 +33,7 @@ enum vpu_chip_e {
        VPU_CHIP_TXLX,
        VPU_CHIP_AXG,
        VPU_CHIP_G12A,
+       VPU_CHIP_G12B,
        VPU_CHIP_MAX,
 };