clk: ti: dra7: add cam clkctrl data
authorBenoit Parrot <bparrot@ti.com>
Wed, 11 Dec 2019 14:05:49 +0000 (08:05 -0600)
committerTero Kristo <t-kristo@ti.com>
Mon, 20 Jan 2020 07:36:50 +0000 (09:36 +0200)
Add clkctrl data for CAM domain.

Signed-off-by: Benoit Parrot <bparrot@ti.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Acked-by: Rob Herring <robh@kernel.org>
Acked-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Tero Kristo <t-kristo@ti.com>
drivers/clk/ti/clk-7xx.c
include/dt-bindings/clock/dra7.h

index 5f46782cebeb2131b9435ac09d49191193c1485d..43b2bb690c71882dbae60876db2809c4ed0351ab 100644 (file)
@@ -146,6 +146,24 @@ static const struct omap_clkctrl_reg_data dra7_rtc_clkctrl_regs[] __initconst =
        { 0 },
 };
 
+static const char * const dra7_cam_gfclk_mux_parents[] __initconst = {
+       "l3_iclk_div",
+       "core_iss_main_clk",
+       NULL,
+};
+
+static const struct omap_clkctrl_bit_data dra7_cam_bit_data[] __initconst = {
+       { 24, TI_CLK_MUX, dra7_cam_gfclk_mux_parents, NULL },
+       { 0 },
+};
+
+static const struct omap_clkctrl_reg_data dra7_cam_clkctrl_regs[] __initconst = {
+       { DRA7_CAM_VIP1_CLKCTRL, dra7_cam_bit_data, CLKF_HW_SUP, "l3_iclk_div" },
+       { DRA7_CAM_VIP2_CLKCTRL, dra7_cam_bit_data, CLKF_HW_SUP, "l3_iclk_div" },
+       { DRA7_CAM_VIP3_CLKCTRL, dra7_cam_bit_data, CLKF_HW_SUP, "l3_iclk_div" },
+       { 0 },
+};
+
 static const struct omap_clkctrl_reg_data dra7_coreaon_clkctrl_regs[] __initconst = {
        { DRA7_COREAON_SMARTREFLEX_MPU_CLKCTRL, NULL, CLKF_SW_SUP, "wkupaon_iclk_mux" },
        { DRA7_COREAON_SMARTREFLEX_CORE_CLKCTRL, NULL, CLKF_SW_SUP, "wkupaon_iclk_mux" },
@@ -777,6 +795,7 @@ const struct omap_clkctrl_data dra7_clkctrl_data[] __initconst = {
        { 0x4a008c00, dra7_atl_clkctrl_regs },
        { 0x4a008d20, dra7_l4cfg_clkctrl_regs },
        { 0x4a008e20, dra7_l3instr_clkctrl_regs },
+       { 0x4a009020, dra7_cam_clkctrl_regs },
        { 0x4a009120, dra7_dss_clkctrl_regs },
        { 0x4a009320, dra7_l3init_clkctrl_regs },
        { 0x4a0093b0, dra7_pcie_clkctrl_regs },
index 72f2e8411523d7297d72ad29dc5b9def9d38e97e..d5d112bc632decdc84735ba4c35bb64031ec170d 100644 (file)
 #define DRA7_RTC_CLKCTRL_INDEX(offset) ((offset) - DRA7_RTC_CLKCTRL_OFFSET)
 #define DRA7_RTCSS_CLKCTRL     DRA7_RTC_CLKCTRL_INDEX(0x44)
 
+/* vip clocks */
+#define DRA7_VIP1_CLKCTRL      DRA7_CLKCTRL_INDEX(0x20)
+#define DRA7_VIP2_CLKCTRL      DRA7_CLKCTRL_INDEX(0x28)
+#define DRA7_VIP3_CLKCTRL      DRA7_CLKCTRL_INDEX(0x30)
+
 /* coreaon clocks */
 #define DRA7_SMARTREFLEX_MPU_CLKCTRL   DRA7_CLKCTRL_INDEX(0x28)
 #define DRA7_SMARTREFLEX_CORE_CLKCTRL  DRA7_CLKCTRL_INDEX(0x38)
 /* rtc clocks */
 #define DRA7_RTC_RTCSS_CLKCTRL DRA7_CLKCTRL_INDEX(0x44)
 
+/* vip clocks */
+#define DRA7_CAM_VIP1_CLKCTRL  DRA7_CLKCTRL_INDEX(0x20)
+#define DRA7_CAM_VIP2_CLKCTRL  DRA7_CLKCTRL_INDEX(0x28)
+#define DRA7_CAM_VIP3_CLKCTRL  DRA7_CLKCTRL_INDEX(0x30)
+
 /* coreaon clocks */
 #define DRA7_COREAON_SMARTREFLEX_MPU_CLKCTRL   DRA7_CLKCTRL_INDEX(0x28)
 #define DRA7_COREAON_SMARTREFLEX_CORE_CLKCTRL  DRA7_CLKCTRL_INDEX(0x38)