Add support for MSM8996 clock controllers
v2 cover Add support for MSM8996 clock controllers
These patches add support for the global and multimedia clock controllers found on MSM8996 devices. The first patch allows us to implement a "power of two" divider of different widths with a table based divider. The second patch adds support for Alpha PLLs and the 3rd and 5th patches add support for the two clock controllers. The fourth patch is a new type of clock ops for the graphics clock that does some custom ping-pong between different PLLs when switching graphics frequencies.
Changes from v1:
* Added some missing clocks in gcc and mmcc drivers
* Updated PLL settings in mmcc
Stephen Boyd (5):
clk: divider: Cap table divider values to 'width' member
clk: qcom: Add Alpha PLL support
clk: qcom: Add MSM8996 Global Clock Control (GCC) driver
clk: qcom: Add gfx3d ping-pong PLL frequency switching
clk: qcom: Add MSM8996 Multimedia Clock Controller (MMCC) driver
.../devicetree/bindings/clock/qcom,gcc.txt | 1 + .../devicetree/bindings/clock/qcom,mmcc.txt | 1 + drivers/clk/clk-divider.c | 9 +- drivers/clk/qcom/Kconfig | 17 + drivers/clk/qcom/Makefile | 3 + drivers/clk/qcom/clk-alpha-pll.c | 355 ++ drivers/clk/qcom/clk-alpha-pll.h | 57 + drivers/clk/qcom/clk-rcg.h | 1 + drivers/clk/qcom/clk-rcg2.c | 87 + drivers/clk/qcom/gcc-msm8996.c | 3422 ++++++++++++++++++++ drivers/clk/qcom/mmcc-msm8996.c | 3217 ++++++++++++++++++ include/dt-bindings/clock/qcom,gcc-msm8996.h | 339 ++ include/dt-bindings/clock/qcom,mmcc-msm8996.h | 285 ++ 13 files changed, 7790 insertions(+), 4 deletions(-) create mode 100644 drivers/clk/qcom/clk-alpha-pll.c create mode 100644 drivers/clk/qcom/clk-alpha-pll.h create mode 100644 drivers/clk/qcom/gcc-msm8996.c create mode 100644 drivers/clk/qcom/mmcc-msm8996.c create mode 100644 include/dt-bindings/clock/qcom,gcc-msm8996.h create mode 100644 include/dt-bindings/clock/qcom,mmcc-msm8996.h
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project
PATCH v2 1/5 clk: divider: Cap table divider values to 'width' member
When we use a clk divider with a divider table, we limit the maximum divider value in divider_get_val() to the div_mask(width), but when we calculate the divider in divider_round_rate() we don't consider that the maximum divider may be limited by the width. Pass the width along to _get_table_maxdiv() so that we only return the maximum divider that is valid. This is useful for clocks that want to share the same divider table while limiting the available dividers to some subset of the table depending on the width of the bitfield.
--- drivers/clk/clk-divider.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
drivers/clk/clk-divider.c +5 -4
@@ -32,13 +32,14 @@#define div_mask (width) ((1 << (width)) - 1) -static unsigned int _get_table_maxdiv (const struct clk_div_table *table) +static unsigned int _get_table_maxdiv (const struct clk_div_table *table, +u8 width) { -unsigned int maxdiv =0 ; +unsigned int maxdiv =0 , mask =div_mask (width);const struct clk_div_table *clkt;for (clkt = table; clkt->div; clkt++) -if (clkt->div > maxdiv) +if (clkt->div > maxdiv && clkt->val <= mask) maxdiv = clkt->div;return maxdiv; }
@@ -62,7 +63,7 @@ static unsigned int _get_maxdiv(const struct clk_div_table *table, u8 width,if (flags &CLK_DIVIDER_POWER_OF_TWO )return 1 <<div_mask (width);if (table) -return _get_table_maxdiv (table); +return _get_table_maxdiv (table, width);return div_mask (width) +1 ; }
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project
PATCH v2 2/5 clk: qcom: Add Alpha PLL support
In reply to Stephen BoydAdd support for configuring rates of, enabling, and disabling Alpha PLLs. This is sufficient for the types of PLLs found in the global and multimedia clock controllers.
--- drivers/clk/qcom/Makefile | 1 + drivers/clk/qcom/clk-alpha-pll.c | 355 +++++++++++++++++++++++++++++++++++++++ drivers/clk/qcom/clk-alpha-pll.h | 57 +++++++ 3 files changed, 413 insertions(+) create mode 100644 drivers/clk/qcom/clk-alpha-pll.c create mode 100644 drivers/clk/qcom/clk-alpha-pll.h
drivers/clk/qcom/Makefile +1 -0
@@ -2,6 +2,7 @@ obj-$(CONFIG_COMMON_CLK_QCOM) += clk-qcom.o clk-qcom-y += common.o clk-qcom-y += clk-regmap.o +clk-qcom-y += clk-alpha-pll.o clk-qcom-y += clk-pll.o clk-qcom-y += clk-rcg.o clk-qcom-y += clk-rcg2.o
drivers/clk/qcom/clk-alpha-pll.c new file +355 -0
355 lines not on this page · raw message
drivers/clk/qcom/clk-alpha-pll.h new file +57 -0
57 lines not on this page · raw message
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project
PATCH v2 3/5 clk: qcom: Add MSM8996 Global Clock Control (GCC) driver
In reply to Stephen BoydAdd support for the global clock controller found on MSM8996 based devices. This should allow most non-multimedia device drivers to probe and control their clocks.
--- .../devicetree/bindings/clock/qcom,gcc.txt | 1 + drivers/clk/qcom/Kconfig | 8 + drivers/clk/qcom/Makefile | 1 + drivers/clk/qcom/gcc-msm8996.c | 3422 ++++++++++++++++++++ include/dt-bindings/clock/qcom,gcc-msm8996.h | 339 ++ 5 files changed, 3771 insertions(+) create mode 100644 drivers/clk/qcom/gcc-msm8996.c create mode 100644 include/dt-bindings/clock/qcom,gcc-msm8996.h
Documentation/devicetree/bindings/clock/qcom,gcc.txt +1 -0
@@ -13,6 +13,7 @@ Required properties : "qcom,gcc-msm8974" "qcom,gcc-msm8974pro" "qcom,gcc-msm8974pro-ac" + "qcom,gcc-msm8996" - reg : shall contain base register location and length - #clock-cells : shall contain 1
drivers/clk/qcom/Kconfig +8 -0
@@ -106,3 +106,11 @@ config MSM_MMCC_8974 Support for the multimedia clock controller on msm8974 devices. Say Y if you want to support multimedia devices such as display, graphics, video encode/decode, camera, etc. + +config MSM_GCC_8996 + tristate "MSM8996 Global Clock Controller" + depends on COMMON_CLK_QCOM + help + Support for the global clock controller on msm8996 devices. + Say Y if you want to use peripheral devices such as UART, SPI, + i2c, USB, UFS, SD/eMMC, PCIe, etc.
drivers/clk/qcom/Makefile +1 -0
@@ -21,5 +21,6 @@ obj-$(CONFIG_MSM_GCC_8916) += gcc-msm8916.o obj-$(CONFIG_MSM_GCC_8960) += gcc-msm8960.o obj-$(CONFIG_MSM_LCC_8960) += lcc-msm8960.o obj-$(CONFIG_MSM_GCC_8974) += gcc-msm8974.o +obj-$(CONFIG_MSM_GCC_8996) += gcc-msm8996.o obj-$(CONFIG_MSM_MMCC_8960) += mmcc-msm8960.o obj-$(CONFIG_MSM_MMCC_8974) += mmcc-msm8974.o
drivers/clk/qcom/gcc-msm8996.c new file +3422 -0
2,976 lines not on this page · raw message
include/dt-bindings/clock/qcom,gcc-msm8996.h new file +339 -0
339 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project
Part of the diff is not shown here. View the raw message.
Re: [v2,3/5] clk: qcom: Add MSM8996 Global Clock Control (GCC) driver
Quoted 7 lines · Stephen Boyd
Add support for the global clock controller found on MSM8996 based devices. This should allow most non-multimedia device drivers to probe and control their clocks.
Signed-off-by Stephen Boyd <[email protected]>---
I saw that this complete set of patches was pulled into clk-next. Would it be possible for you to host an immutable branch so that I can get the DTS pulled in properly with all the dependencies?
Thanks,
Andy
Re: [v2,3/5] clk: qcom: Add MSM8996 Global Clock Control (GCC) driver
Hi Andy,
Quoted 5 lines · Andy Gross
Quoted 4 lines · Stephen Boyd
Add support for the global clock controller found on MSM8996 based devices. This should allow most non-multimedia device drivers to probe and control their clocks.
Quoted 7 lines
Quoted 3 lines
Signed-off-by Stephen Boyd <[email protected]>---
I saw that this complete set of patches was pulled into clk-next. Would it be possible for you to host an immutable branch so that I can get the DTS pulled in properly with all the dependencies?
We already have this in our git tree (as part of our normal topic branch process):
git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git clk-msm8996
I'll be sure not to blow it up.
Regards,
Mike
Quoted 4 lines
Thanks,
Andy
Signature · 4 lines
Michael Turquette CEO BayLibre - At the Heart of Embedded Linux http://baylibre.com/
Re: [PATCH v2 3/5] clk: qcom: Add MSM8996 Global Clock Control (GCC) driver
In reply to Stephen BoydStephen,
Quoted 3 lines · Stephen Boyd
Add support for the global clock controller found on MSM8996 based devices. This should allow most non-multimedia device drivers to probe and control their clocks.
On my 8096 board I see the following orphan clocks,
/sys/kernel/debug/clk # cat clk_orphan_summary
clock enable_cnt prepare_cnt rate accuracy phase
--------------------------------------------------------------------------------------- -
gcc_ufs_rx_symbol_1_clk 0 0 0 0 0 gcc_ufs_rx_symbol_0_clk 0 0 0 0 0 gcc_ufs_tx_symbol_0_clk 0 0 0 0 0 gcc_pcie_2_pipe_clk 0 0 0 0 0 gcc_pcie_1_pipe_clk 0 0 0 0 0 gcc_pcie_0_pipe_clk 0 0 0 0 0 gcc_usb3_phy_pipe_clk 0 0 0 0 0
I was looking at some ufs clocks which lead me to this. something that needs to be fixed?
regards,
Rajendra
Quoted 3,825 lines
Signed-off-by Stephen Boyd <[email protected]>--- .../devicetree/bindings/clock/qcom,gcc.txt | 1 + drivers/clk/qcom/Kconfig | 8 + drivers/clk/qcom/Makefile | 1 + drivers/clk/qcom/gcc-msm8996.c | 3422 ++++++++++++++++++++ include/dt-bindings/clock/qcom,gcc-msm8996.h | 339 ++ 5 files changed, 3771 insertions(+) create mode 100644 drivers/clk/qcom/gcc-msm8996.c create mode 100644 include/dt-bindings/clock/qcom,gcc-msm8996.hDocumentation/devicetree/bindings/clock/qcom,gcc.txt +1
-0@@ -13,6 +13,7 @@ Required properties : "qcom,gcc-msm8974" "qcom,gcc-msm8974pro" "qcom,gcc-msm8974pro-ac" + "qcom,gcc-msm8996" - reg : shall contain base register location and length - #clock-cells : shall contain 1drivers/clk/qcom/Kconfig +8
-0@@ -106,3 +106,11 @@ config MSM_MMCC_8974 Support for the multimedia clock controller on msm8974 devices. Say Y if you want to support multimedia devices such as display, graphics, video encode/decode, camera, etc. + +config MSM_GCC_8996 + tristate "MSM8996 Global Clock Controller" + depends on COMMON_CLK_QCOM + help + Support for the global clock controller on msm8996 devices. + Say Y if you want to use peripheral devices such as UART, SPI, + i2c, USB, UFS, SD/eMMC, PCIe, etc.drivers/clk/qcom/Makefile +1
-0@@ -21,5 +21,6 @@ obj-$(CONFIG_MSM_GCC_8916) += gcc-msm8916.o obj-$(CONFIG_MSM_GCC_8960) += gcc-msm8960.o obj-$(CONFIG_MSM_LCC_8960) += lcc-msm8960.o obj-$(CONFIG_MSM_GCC_8974) += gcc-msm8974.o +obj-$(CONFIG_MSM_GCC_8996) += gcc-msm8996.o obj-$(CONFIG_MSM_MMCC_8960) += mmcc-msm8960.o obj-$(CONFIG_MSM_MMCC_8974) += mmcc-msm8974.odrivers/clk/qcom/gcc-msm8996.c new file +3422
-0@@ -0,0 +1,3422 @@ +/* +* Copyright (c) 2015, The Linux Foundation. All rights reserved. +* +* This software is licensed under the terms of the GNU General Public +* License version 2, as published by the Free Software Foundation, and +* may be copied, distributed, and modified under those terms. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +*/ + +#include <linux/kernel.h> +#include <linux/bitops.h> +#include <linux/err.h> +#include <linux/platform_device.h> +#include <linux/module.h> +#include <linux/of.h> +#include <linux/of_device.h> +#include <linux/clk-provider.h> +#include <linux/regmap.h> +#include <linux/reset-controller.h> + +#include <dt-bindings/clock/qcom,gcc-msm8996.h> + +#include "common.h" +#include "clk-regmap.h" +#include "clk-alpha-pll.h" +#include "clk-rcg.h" +#include "clk-branch.h" +#include "reset.h" + +#define F (f, s, h, m, n) { (f), (s), (2 * (h) - 1), (m), (n) } + +enum { +P_XO , +P_GPLL0 , +P_GPLL2 , +P_GPLL3 , +P_GPLL1 , +P_GPLL2_EARLY , +P_GPLL0_EARLY_DIV , +P_SLEEP_CLK , +P_GPLL4 , +P_AUD_REF_CLK , +P_GPLL1_EARLY_DIV +}; + +static const struct parent_map gcc_sleep_clk_map[] = { + {P_SLEEP_CLK ,5 } +}; + +static const char *const gcc_sleep_clk[] = { +"sleep_clk" +}; + +static const struct parent_map gcc_xo_gpll0_map[] = { + {P_XO ,0 }, + {P_GPLL0 ,1 } +}; + +static const char *const gcc_xo_gpll0[] = { +"xo" , +"gpll0" +}; + +static const struct parent_map gcc_xo_sleep_clk_map[] = { + {P_XO ,0 }, + {P_SLEEP_CLK ,5 } +}; + +static const char *const gcc_xo_sleep_clk[] = { +"xo" , +"sleep_clk" +}; + +static const struct parent_map gcc_xo_gpll0_gpll0_early_div_map[] = { + {P_XO ,0 }, + {P_GPLL0 ,1 }, + {P_GPLL0_EARLY_DIV ,6 } +}; + +static const char *const gcc_xo_gpll0_gpll0_early_div[] = { +"xo" , +"gpll0" , +"gpll0_early_div" +}; + +static const struct parent_map gcc_xo_gpll0_gpll4_map[] = { + {P_XO ,0 }, + {P_GPLL0 ,1 }, + {P_GPLL4 ,5 } +}; + +static const char *const gcc_xo_gpll0_gpll4[] = { +"xo" , +"gpll0" , +"gpll4" +}; + +static const struct parent_map gcc_xo_gpll0_aud_ref_clk_map[] = { + {P_XO ,0 }, + {P_GPLL0 ,1 }, + {P_AUD_REF_CLK ,2 } +}; + +static const char *const gcc_xo_gpll0_aud_ref_clk[] = { +"xo" , +"gpll0" , +"aud_ref_clk" +}; + +static const struct parent_map gcc_xo_gpll0_sleep_clk_gpll0_early_div_map[] = { + {P_XO ,0 }, + {P_GPLL0 ,1 }, + {P_SLEEP_CLK ,5 }, + {P_GPLL0_EARLY_DIV ,6 } +}; + +static const char *const gcc_xo_gpll0_sleep_clk_gpll0_early_div[] = { +"xo" , +"gpll0" , +"sleep_clk" , +"gpll0_early_div" +}; + +static const struct parent_map gcc_xo_gpll0_gpll4_gpll0_early_div_map[] = { + {P_XO ,0 }, + {P_GPLL0 ,1 }, + {P_GPLL4 ,5 }, + {P_GPLL0_EARLY_DIV ,6 } +}; + +static const char *const gcc_xo_gpll0_gpll4_gpll0_early_div[] = { +"xo" , +"gpll0" , +"gpll4" , +"gpll0_early_div" +}; + +static const struct parent_map gcc_xo_gpll0_gpll2_gpll3_gpll0_early_div_map[] = { + {P_XO ,0 }, + {P_GPLL0 ,1 }, + {P_GPLL2 ,2 }, + {P_GPLL3 ,3 }, + {P_GPLL0_EARLY_DIV ,6 } +}; + +static const char *const gcc_xo_gpll0_gpll2_gpll3_gpll0_early_div[] = { +"xo" , +"gpll0" , +"gpll2" , +"gpll3" , +"gpll0_early_div" +}; + +static const struct parent_map gcc_xo_gpll0_gpll1_early_div_gpll1_gpll4_gpll0_early_div_map[] = { + {P_XO ,0 }, + {P_GPLL0 ,1 }, + {P_GPLL1_EARLY_DIV ,3 }, + {P_GPLL1 ,4 }, + {P_GPLL4 ,5 }, + {P_GPLL0_EARLY_DIV ,6 } +}; + +static const char *const gcc_xo_gpll0_gpll1_early_div_gpll1_gpll4_gpll0_early_div[] = { +"xo" , +"gpll0" , +"gpll1_early_div" , +"gpll1" , +"gpll4" , +"gpll0_early_div" +}; + +static const struct parent_map gcc_xo_gpll0_gpll2_gpll3_gpll1_gpll2_early_gpll0_early_div_map[] = { + {P_XO ,0 }, + {P_GPLL0 ,1 }, + {P_GPLL2 ,2 }, + {P_GPLL3 ,3 }, + {P_GPLL1 ,4 }, + {P_GPLL2_EARLY ,5 }, + {P_GPLL0_EARLY_DIV ,6 } +}; + +static const char *const gcc_xo_gpll0_gpll2_gpll3_gpll1_gpll2_early_gpll0_early_div[] = { +"xo" , +"gpll0" , +"gpll2" , +"gpll3" , +"gpll1" , +"gpll2_early" , +"gpll0_early_div" +}; + +static const struct parent_map gcc_xo_gpll0_gpll2_gpll3_gpll1_gpll4_gpll0_early_div_map[] = { + {P_XO ,0 }, + {P_GPLL0 ,1 }, + {P_GPLL2 ,2 }, + {P_GPLL3 ,3 }, + {P_GPLL1 ,4 }, + {P_GPLL4 ,5 }, + {P_GPLL0_EARLY_DIV ,6 } +}; + +static const char *const gcc_xo_gpll0_gpll2_gpll3_gpll1_gpll4_gpll0_early_div[] = { +"xo" , +"gpll0" , +"gpll2" , +"gpll3" , +"gpll1" , +"gpll4" , +"gpll0_early_div" +}; + +static struct clk_fixed_factor xo = { + .mult =1 , + .div =1 , + .hw.init = &(struct clk_init_data ){ + .name ="xo" , + .parent_names = (const char *[]){"xo_board" }, + .num_parents =1 , + .ops = &clk_fixed_factor_ops, + }, +}; + +static struct clk_alpha_pll gpll0_early = { + .offset =0x00000 , + .clkr = { + .enable_reg =0x52000 , + .enable_mask =BIT (0 ), + .hw.init = &(struct clk_init_data ){ + .name ="gpll0_early" , + .parent_names = (const char *[]){"xo" }, + .num_parents =1 , + .ops = &clk_alpha_pll_ops, + }, + }, +}; + +static struct clk_fixed_factor gpll0_early_div = { + .mult =1 , + .div =2 , + .hw.init = &(struct clk_init_data ){ + .name ="gpll0_early_div" , + .parent_names = (const char *[]){"gpll0_early" }, + .num_parents =1 , + .ops = &clk_fixed_factor_ops, + }, +}; + +static struct clk_alpha_pll_postdiv gpll0 = { + .offset =0x00000 , + .clkr.hw.init = &(struct clk_init_data ){ + .name ="gpll0" , + .parent_names = (const char *[]){"gpll0_early" }, + .num_parents =1 , + .ops = &clk_alpha_pll_postdiv_ops, + }, +}; + +static struct clk_alpha_pll gpll4_early = { + .offset =0x77000 , + .clkr = { + .enable_reg =0x52000 , + .enable_mask =BIT (4 ), + .hw.init = &(struct clk_init_data ){ + .name ="gpll4_early" , + .parent_names = (const char *[]){"xo" }, + .num_parents =1 , + .ops = &clk_alpha_pll_ops, + }, + }, +}; + +static struct clk_alpha_pll_postdiv gpll4 = { + .offset =0x77000 , + .clkr.hw.init = &(struct clk_init_data ){ + .name ="gpll4" , + .parent_names = (const char *[]){"gpll4_early" }, + .num_parents =1 , + .ops = &clk_alpha_pll_postdiv_ops, + }, +}; + +static const struct freq_tbl ftbl_system_noc_clk_src[] = { +F (19200000 ,P_XO ,1 ,0 ,0 ), +F (50000000 ,P_GPLL0_EARLY_DIV ,6 ,0 ,0 ), +F (100000000 ,P_GPLL0 ,6 ,0 ,0 ), +F (150000000 ,P_GPLL0 ,4 ,0 ,0 ), +F (200000000 ,P_GPLL0 ,3 ,0 ,0 ), +F (240000000 ,P_GPLL0 ,2.5 ,0 ,0 ), + { } +}; + +static struct clk_rcg2 system_noc_clk_src = { + .cmd_rcgr =0x0401c , + .hid_width =5 , + .parent_map = gcc_xo_gpll0_gpll2_gpll3_gpll1_gpll2_early_gpll0_early_div_map, + .freq_tbl = ftbl_system_noc_clk_src, + .clkr.hw.init = &(struct clk_init_data ){ + .name ="system_noc_clk_src" , + .parent_names = gcc_xo_gpll0_gpll2_gpll3_gpll1_gpll2_early_gpll0_early_div, + .num_parents =7 , + .ops = &clk_rcg2_ops, + }, +}; + +static const struct freq_tbl ftbl_config_noc_clk_src[] = { +F (19200000 ,P_XO ,1 ,0 ,0 ), +F (37500000 ,P_GPLL0 ,16 ,0 ,0 ), +F (75000000 ,P_GPLL0 ,8 ,0 ,0 ), + { } +}; + +static struct clk_rcg2 config_noc_clk_src = { + .cmd_rcgr =0x0500c , + .hid_width =5 , + .parent_map = gcc_xo_gpll0_map, + .freq_tbl = ftbl_config_noc_clk_src, + .clkr.hw.init = &(struct clk_init_data ){ + .name ="config_noc_clk_src" , + .parent_names = gcc_xo_gpll0, + .num_parents =2 , + .ops = &clk_rcg2_ops, + }, +}; + +static const struct freq_tbl ftbl_periph_noc_clk_src[] = { +F (19200000 ,P_XO ,1 ,0 ,0 ), +F (37500000 ,P_GPLL0 ,16 ,0 ,0 ), +F (50000000 ,P_GPLL0 ,12 ,0 ,0 ), +F (75000000 ,P_GPLL0 ,8 ,0 ,0 ), +F (100000000 ,P_GPLL0 ,6 ,0 ,0 ), + { } +}; + +static struct clk_rcg2 periph_noc_clk_src = { + .cmd_rcgr =0x06014 , + .hid_width =5 , + .parent_map = gcc_xo_gpll0_map, + .freq_tbl = ftbl_periph_noc_clk_src, + .clkr.hw.init = &(struct clk_init_data ){ + .name ="periph_noc_clk_src" , + .parent_names = gcc_xo_gpll0, + .num_parents =2 , + .ops = &clk_rcg2_ops, + }, +}; + +static const struct freq_tbl ftbl_usb30_master_clk_src[] = { +F (19200000 ,P_XO ,1 ,0 ,0 ), +F (120000000 ,P_GPLL0 ,5 ,0 ,0 ), +F (150000000 ,P_GPLL0 ,4 ,0 ,0 ), + { } +}; + +static struct clk_rcg2 usb30_master_clk_src = { + .cmd_rcgr =0x0f014 , + .mnd_width =8 , + .hid_width =5 , + .parent_map = gcc_xo_gpll0_gpll0_early_div_map, + .freq_tbl = ftbl_usb30_master_clk_src, + .clkr.hw.init = &(struct clk_init_data ){ + .name ="usb30_master_clk_src" , + .parent_names = gcc_xo_gpll0_gpll0_early_div, + .num_parents =3 , + .ops = &clk_rcg2_ops, + }, +}; + +static const struct freq_tbl ftbl_usb30_mock_utmi_clk_src[] = { +F (19200000 ,P_XO ,1 ,0 ,0 ), + { } +}; + +static struct clk_rcg2 usb30_mock_utmi_clk_src = { + .cmd_rcgr =0x0f028 , + .hid_width =5 , + .parent_map = gcc_xo_gpll0_gpll0_early_div_map, + .freq_tbl = ftbl_usb30_mock_utmi_clk_src, + .clkr.hw.init = &(struct clk_init_data ){ + .name ="usb30_mock_utmi_clk_src" , + .parent_names = gcc_xo_gpll0_gpll0_early_div, + .num_parents =3 , + .ops = &clk_rcg2_ops, + }, +}; + +static const struct freq_tbl ftbl_usb3_phy_aux_clk_src[] = { +F (1200000 ,P_XO ,16 ,0 ,0 ), + { } +}; + +static struct clk_rcg2 usb3_phy_aux_clk_src = { + .cmd_rcgr =0x5000c , + .hid_width =5 , + .parent_map = gcc_xo_sleep_clk_map, + .freq_tbl = ftbl_usb3_phy_aux_clk_src, + .clkr.hw.init = &(struct clk_init_data ){ + .name ="usb3_phy_aux_clk_src" , + .parent_names = gcc_xo_sleep_clk, + .num_parents =2 , + .ops = &clk_rcg2_ops, + }, +}; + +static const struct freq_tbl ftbl_usb20_master_clk_src[] = { +F (120000000 ,P_GPLL0 ,5 ,0 ,0 ), + { } +}; + +static struct clk_rcg2 usb20_master_clk_src = { + .cmd_rcgr =0x12010 , + .mnd_width =8 , + .hid_width =5 , + .parent_map = gcc_xo_gpll0_gpll0_early_div_map, + .freq_tbl = ftbl_usb20_master_clk_src, + .clkr.hw.init = &(struct clk_init_data ){ + .name ="usb20_master_clk_src" , + .parent_names = gcc_xo_gpll0_gpll0_early_div, + .num_parents =3 , + .ops = &clk_rcg2_ops, + }, +}; + +static struct clk_rcg2 usb20_mock_utmi_clk_src = { + .cmd_rcgr =0x12024 , + .hid_width =5 , + .parent_map = gcc_xo_gpll0_gpll0_early_div_map, + .freq_tbl = ftbl_usb30_mock_utmi_clk_src, + .clkr.hw.init = &(struct clk_init_data ){ + .name ="usb20_mock_utmi_clk_src" , + .parent_names = gcc_xo_gpll0_gpll0_early_div, + .num_parents =3 , + .ops = &clk_rcg2_ops, + }, +}; + +static const struct freq_tbl ftbl_sdcc1_apps_clk_src[] = { +F (144000 ,P_XO ,16 ,3 ,25 ), +F (400000 ,P_XO ,12 ,1 ,4 ), +F (20000000 ,P_GPLL0 ,15 ,1 ,2 ), +F (25000000 ,P_GPLL0 ,12 ,1 ,2 ), +F (50000000 ,P_GPLL0 ,12 ,0 ,0 ), +F (96000000 ,P_GPLL4 ,4 ,0 ,0 ), +F (192000000 ,P_GPLL4 ,2 ,0 ,0 ), +F (384000000 ,P_GPLL4 ,1 ,0 ,0 ), + { } +}; + +static struct clk_rcg2 sdcc1_apps_clk_src = { + .cmd_rcgr =0x13010 , + .mnd_width =8 , + .hid_width =5 , + .parent_map = gcc_xo_gpll0_gpll4_gpll0_early_div_map, + .freq_tbl = ftbl_sdcc1_apps_clk_src, + .clkr.hw.init = &(struct clk_init_data ){ + .name ="sdcc1_apps_clk_src" , + .parent_names = gcc_xo_gpll0_gpll4_gpll0_early_div, + .num_parents =4 , + .ops = &clk_rcg2_ops, + }, +}; + +static struct clk_rcg2 sdcc1_ice_core_clk_src = { + .cmd_rcgr =0x13024 , + .hid_width =5 , + .parent_map = gcc_xo_gpll0_gpll4_gpll0_early_div_map, + .clkr.hw.init = &(struct clk_init_data ){ + .name ="sdcc1_ice_core_clk_src" , + .parent_names = gcc_xo_gpll0_gpll4_gpll0_early_div, + .num_parents =4 , + .ops = &clk_rcg2_ops, + }, +}; + +static const struct freq_tbl ftbl_sdcc2_apps_clk_src[] = { +F (144000 ,P_XO ,16 ,3 ,25 ), +F (400000 ,P_XO ,12 ,1 ,4 ), +F (20000000 ,P_GPLL0 ,15 ,1 ,2 ), +F (25000000 ,P_GPLL0 ,12 ,1 ,2 ), +F (50000000 ,P_GPLL0 ,12 ,0 ,0 ), +F (100000000 ,P_GPLL0 ,6 ,0 ,0 ), +F (200000000 ,P_GPLL0 ,3 ,0 ,0 ), + { } +}; + +static struct clk_rcg2 sdcc2_apps_clk_src = { + .cmd_rcgr =0x14010 , + .mnd_width =8 , + .hid_width =5 , + .parent_map = gcc_xo_gpll0_gpll4_map, + .freq_tbl = ftbl_sdcc2_apps_clk_src, + .clkr.hw.init = &(struct clk_init_data ){ + .name ="sdcc2_apps_clk_src" , + .parent_names = gcc_xo_gpll0_gpll4, + .num_parents =3 , + .ops = &clk_rcg2_ops, + }, +}; + +static struct clk_rcg2 sdcc3_apps_clk_src = { + .cmd_rcgr =0x15010 , + .mnd_width =8 , + .hid_width =5 , + .parent_map = gcc_xo_gpll0_gpll4_map, + .freq_tbl = ftbl_sdcc2_apps_clk_src, + .clkr.hw.init = &(struct clk_init_data ){ + .name ="sdcc3_apps_clk_src" , + .parent_names = gcc_xo_gpll0_gpll4, + .num_parents =3 , + .ops = &clk_rcg2_ops, + }, +}; + +static const struct freq_tbl ftbl_sdcc4_apps_clk_src[] = { +F (144000 ,P_XO ,16 ,3 ,25 ), +F (400000 ,P_XO ,12 ,1 ,4 ), +F (20000000 ,P_GPLL0 ,15 ,1 ,2 ), +F (25000000 ,P_GPLL0 ,12 ,1 ,2 ), +F (50000000 ,P_GPLL0 ,12 ,0 ,0 ), +F (100000000 ,P_GPLL0 ,6 ,0 ,0 ), + { } +}; + +static struct clk_rcg2 sdcc4_apps_clk_src = { + .cmd_rcgr =0x16010 , + .mnd_width =8 , + .hid_width =5 , + .parent_map = gcc_xo_gpll0_map, + .freq_tbl = ftbl_sdcc4_apps_clk_src, + .clkr.hw.init = &(struct clk_init_data ){ + .name ="sdcc4_apps_clk_src" , + .parent_names = gcc_xo_gpll0, + .num_parents =2 , + .ops = &clk_rcg2_ops, + }, +}; + +static const struct freq_tbl ftbl_blsp1_qup1_spi_apps_clk_src[] = { +F (960000 ,P_XO ,10 ,1 ,2 ), +F (4800000 ,P_XO ,4 ,0 ,0 ), +F (9600000 ,P_XO ,2 ,0 ,0 ), +F (15000000 ,P_GPLL0 ,10 ,1 ,4 ), +F (19200000 ,P_XO ,1 ,0 ,0 ), +F (25000000 ,P_GPLL0 ,12 ,1 ,2 ), +F (50000000 ,P_GPLL0 ,12 ,0 ,0 ), + { } +}; + +static struct clk_rcg2 blsp1_qup1_spi_apps_clk_src = { + .cmd_rcgr =0x1900c , + .mnd_width =8 , + .hid_width =5 , + .parent_map = gcc_xo_gpll0_map, + .freq_tbl = ftbl_blsp1_qup1_spi_apps_clk_src, + .clkr.hw.init = &(struct clk_init_data ){ + .name ="blsp1_qup1_spi_apps_clk_src" , + .parent_names = gcc_xo_gpll0, + .num_parents =2 , + .ops = &clk_rcg2_ops, + }, +}; + +static const struct freq_tbl ftbl_blsp1_qup1_i2c_apps_clk_src[] = { +F (19200000 ,P_XO ,1 ,0 ,0 ), +F (50000000 ,P_GPLL0 ,12 ,0 ,0 ), + { } +}; + +static struct clk_rcg2 blsp1_qup1_i2c_apps_clk_src = { + .cmd_rcgr =0x19020 , + .hid_width =5 , + .parent_map = gcc_xo_gpll0_map, + .freq_tbl = ftbl_blsp1_qup1_i2c_apps_clk_src, + .clkr.hw.init = &(struct clk_init_data ){ + .name ="blsp1_qup1_i2c_apps_clk_src" , + .parent_names = gcc_xo_gpll0, + .num_parents =2 , + .ops = &clk_rcg2_ops, + }, +}; + +static const struct freq_tbl ftbl_blsp1_uart1_apps_clk_src[] = { +F (3686400 ,P_GPLL0 ,1 ,96 ,15625 ), +F (7372800 ,P_GPLL0 ,1 ,192 ,15625 ), +F (14745600 ,P_GPLL0 ,1 ,384 ,15625 ), +F (16000000 ,P_GPLL0 ,5 ,2 ,15 ), +F (19200000 ,P_XO ,1 ,0 ,0 ), +F (24000000 ,P_GPLL0 ,5 ,1 ,5 ), +F (32000000 ,P_GPLL0 ,1 ,4 ,75 ), +F (40000000 ,P_GPLL0 ,15 ,0 ,0 ), +F (46400000 ,P_GPLL0 ,1 ,29 ,375 ), +F (48000000 ,P_GPLL0 ,12.5 ,0 ,0 ), +F (51200000 ,P_GPLL0 ,1 ,32 ,375 ), +F (56000000 ,P_GPLL0 ,1 ,7 ,75 ), +F (58982400 ,P_GPLL0 ,1 ,1536 ,15625 ), +F (60000000 ,P_GPLL0 ,10 ,0 ,0 ), +F (63157895 ,P_GPLL0 ,9.5 ,0 ,0 ), + { } +}; + +static struct clk_rcg2 blsp1_uart1_apps_clk_src = { + .cmd_rcgr =0x1a00c , + .mnd_width =16 , + .hid_width =5 , + .parent_map = gcc_xo_gpll0_map, + .freq_tbl = ftbl_blsp1_uart1_apps_clk_src, + .clkr.hw.init = &(struct clk_init_data ){ + .name ="blsp1_uart1_apps_clk_src" , + .parent_names = gcc_xo_gpll0, + .num_parents =2 , + .ops = &clk_rcg2_ops, + }, +}; + +static struct clk_rcg2 blsp1_qup2_spi_apps_clk_src = { + .cmd_rcgr =0x1b00c , + .mnd_width =8 , + .hid_width =5 , + .parent_map = gcc_xo_gpll0_map, + .freq_tbl = ftbl_blsp1_qup1_spi_apps_clk_src, + .clkr.hw.init = &(struct clk_init_data ){ + .name ="blsp1_qup2_spi_apps_clk_src" , + .parent_names = gcc_xo_gpll0, + .num_parents =2 , + .ops = &clk_rcg2_ops, + }, +}; + +static struct clk_rcg2 blsp1_qup2_i2c_apps_clk_src = { + .cmd_rcgr =0x1b020 , + .hid_width =5 , + .parent_map = gcc_xo_gpll0_map, + .freq_tbl = ftbl_blsp1_qup1_i2c_apps_clk_src, + .clkr.hw.init = &(struct clk_init_data ){ + .name ="blsp1_qup2_i2c_apps_clk_src" , + .parent_names = gcc_xo_gpll0, + .num_parents =2 , + .ops = &clk_rcg2_ops, + }, +}; + +static struct clk_rcg2 blsp1_uart2_apps_clk_src = { + .cmd_rcgr =0x1c00c , + .mnd_width =16 , + .hid_width =5 , + .parent_map = gcc_xo_gpll0_map, + .freq_tbl = ftbl_blsp1_uart1_apps_clk_src, + .clkr.hw.init = &(struct clk_init_data ){ + .name ="blsp1_uart2_apps_clk_src" , + .parent_names = gcc_xo_gpll0, + .num_parents =2 , + .ops = &clk_rcg2_ops, + }, +}; + +static struct clk_rcg2 blsp1_qup3_spi_apps_clk_src = { + .cmd_rcgr =0x1d00c , + .mnd_width =8 , + .hid_width =5 , + .parent_map = gcc_xo_gpll0_map, + .freq_tbl = ftbl_blsp1_qup1_spi_apps_clk_src, + .clkr.hw.init = &(struct clk_init_data ){ + .name ="blsp1_qup3_spi_apps_clk_src" , + .parent_names = gcc_xo_gpll0, + .num_parents =2 , + .ops = &clk_rcg2_ops, + }, +}; + +static struct clk_rcg2 blsp1_qup3_i2c_apps_clk_src = { + .cmd_rcgr =0x1d020 , + .hid_width =5 , + .parent_map = gcc_xo_gpll0_map, + .freq_tbl = ftbl_blsp1_qup1_i2c_apps_clk_src, + .clkr.hw.init = &(struct clk_init_data ){ + .name ="blsp1_qup3_i2c_apps_clk_src" , + .parent_names = gcc_xo_gpll0, + .num_parents =2 , + .ops = &clk_rcg2_ops, + }, +}; + +static struct clk_rcg2 blsp1_uart3_apps_clk_src = { + .cmd_rcgr =0x1e00c , + .mnd_width =16 , + .hid_width =5 , + .parent_map = gcc_xo_gpll0_map, + .freq_tbl = ftbl_blsp1_uart1_apps_clk_src, + .clkr.hw.init = &(struct clk_init_data ){ + .name ="blsp1_uart3_apps_clk_src" , + .parent_names = gcc_xo_gpll0, + .num_parents =2 , + .ops = &clk_rcg2_ops, + }, +}; + +static struct clk_rcg2 blsp1_qup4_spi_apps_clk_src = { + .cmd_rcgr =0x1f00c , + .mnd_width =8 , + .hid_width =5 , + .parent_map = gcc_xo_gpll0_map, + .freq_tbl = ftbl_blsp1_qup1_spi_apps_clk_src, + .clkr.hw.init = &(struct clk_init_data ){ + .name ="blsp1_qup4_spi_apps_clk_src" , + .parent_names = gcc_xo_gpll0, + .num_parents =2 , + .ops = &clk_rcg2_ops, + }, +}; + +static struct clk_rcg2 blsp1_qup4_i2c_apps_clk_src = { + .cmd_rcgr =0x1f020 , + .hid_width =5 , + .parent_map = gcc_xo_gpll0_map, + .freq_tbl = ftbl_blsp1_qup1_i2c_apps_clk_src, + .clkr.hw.init = &(struct clk_init_data ){ + .name ="blsp1_qup4_i2c_apps_clk_src" , + .parent_names = gcc_xo_gpll0, + .num_parents =2 , + .ops = &clk_rcg2_ops, + }, +}; + +static struct clk_rcg2 blsp1_uart4_apps_clk_src = { + .cmd_rcgr =0x2000c , + .mnd_width =16 , + .hid_width =5 , + .parent_map = gcc_xo_gpll0_map, + .freq_tbl = ftbl_blsp1_uart1_apps_clk_src, + .clkr.hw.init = &(struct clk_init_data ){ + .name ="blsp1_uart4_apps_clk_src" , + .parent_names = gcc_xo_gpll0, + .num_parents =2 , + .ops = &clk_rcg2_ops, + }, +}; + +static struct clk_rcg2 blsp1_qup5_spi_apps_clk_src = { + .cmd_rcgr =0x2100c , + .mnd_width =8 , + .hid_width =5 , + .parent_map = gcc_xo_gpll0_map, + .freq_tbl = ftbl_blsp1_qup1_spi_apps_clk_src, + .clkr.hw.init = &(struct clk_init_data ){ + .name ="blsp1_qup5_spi_apps_clk_src" , + .parent_names = gcc_xo_gpll0, + .num_parents =2 , + .ops = &clk_rcg2_ops, + }, +}; + +static struct clk_rcg2 blsp1_qup5_i2c_apps_clk_src = { + .cmd_rcgr =0x21020 , + .hid_width =5 , + .parent_map = gcc_xo_gpll0_map, + .freq_tbl = ftbl_blsp1_qup1_i2c_apps_clk_src, + .clkr.hw.init = &(struct clk_init_data ){ + .name ="blsp1_qup5_i2c_apps_clk_src" , + .parent_names = gcc_xo_gpll0, + .num_parents =2 , + .ops = &clk_rcg2_ops, + }, +}; + +static struct clk_rcg2 blsp1_uart5_apps_clk_src = { + .cmd_rcgr =0x2200c , + .mnd_width =16 , + .hid_width =5 , + .parent_map = gcc_xo_gpll0_map, + .freq_tbl = ftbl_blsp1_uart1_apps_clk_src, + .clkr.hw.init = &(struct clk_init_data ){ + .name ="blsp1_uart5_apps_clk_src" , + .parent_names = gcc_xo_gpll0, + .num_parents =2 , + .ops = &clk_rcg2_ops, + }, +}; + +static struct clk_rcg2 blsp1_qup6_spi_apps_clk_src = { + .cmd_rcgr =0x2300c , + .mnd_width =8 , + .hid_width =5 , + .parent_map = gcc_xo_gpll0_map, + .freq_tbl = ftbl_blsp1_qup1_spi_apps_clk_src, + .clkr.hw.init = &(struct clk_init_data ){ + .name ="blsp1_qup6_spi_apps_clk_src" , + .parent_names = gcc_xo_gpll0, + .num_parents =2 , + .ops = &clk_rcg2_ops, + }, +}; + +static struct clk_rcg2 blsp1_qup6_i2c_apps_clk_src = { + .cmd_rcgr =0x23020 , + .hid_width =5 , + .parent_map = gcc_xo_gpll0_map, + .freq_tbl = ftbl_blsp1_qup1_i2c_apps_clk_src, + .clkr.hw.init = &(struct clk_init_data ){ + .name ="blsp1_qup6_i2c_apps_clk_src" , + .parent_names = gcc_xo_gpll0, + .num_parents =2 , + .ops = &clk_rcg2_ops, + }, +}; + +static struct clk_rcg2 blsp1_uart6_apps_clk_src = { + .cmd_rcgr =0x2400c , + .mnd_width =16 , + .hid_width =5 , + .parent_map = gcc_xo_gpll0_map, + .freq_tbl = ftbl_blsp1_uart1_apps_clk_src, + .clkr.hw.init = &(struct clk_init_data ){ + .name ="blsp1_uart6_apps_clk_src" , + .parent_names = gcc_xo_gpll0, + .num_parents =2 , + .ops = &clk_rcg2_ops, + }, +}; + +static struct clk_rcg2 blsp2_qup1_spi_apps_clk_src = { + .cmd_rcgr =0x2600c , + .mnd_width =8 , + .hid_width =5 , + .parent_map = gcc_xo_gpll0_map, + .freq_tbl = ftbl_blsp1_qup1_spi_apps_clk_src, + .clkr.hw.init = &(struct clk_init_data ){ + .name ="blsp2_qup1_spi_apps_clk_src" , + .parent_names = gcc_xo_gpll0, + .num_parents =2 , + .ops = &clk_rcg2_ops, + }, +}; + +static struct clk_rcg2 blsp2_qup1_i2c_apps_clk_src = { + .cmd_rcgr =0x26020 , + .hid_width =5 , + .parent_map = gcc_xo_gpll0_map, + .freq_tbl = ftbl_blsp1_qup1_i2c_apps_clk_src, + .clkr.hw.init = &(struct clk_init_data ){ + .name ="blsp2_qup1_i2c_apps_clk_src" , + .parent_names = gcc_xo_gpll0, + .num_parents =2 , + .ops = &clk_rcg2_ops, + }, +}; + +static struct clk_rcg2 blsp2_uart1_apps_clk_src = { + .cmd_rcgr =0x2700c , + .mnd_width =16 , + .hid_width =5 , + .parent_map = gcc_xo_gpll0_map, + .freq_tbl = ftbl_blsp1_uart1_apps_clk_src, + .clkr.hw.init = &(struct clk_init_data ){ + .name ="blsp2_uart1_apps_clk_src" , + .parent_names = gcc_xo_gpll0, + .num_parents =2 , + .ops = &clk_rcg2_ops, + }, +}; + +static struct clk_rcg2 blsp2_qup2_spi_apps_clk_src = { + .cmd_rcgr =0x2800c , + .mnd_width =8 , + .hid_width =5 , + .parent_map = gcc_xo_gpll0_map, + .freq_tbl = ftbl_blsp1_qup1_spi_apps_clk_src, + .clkr.hw.init = &(struct clk_init_data ){ + .name ="blsp2_qup2_spi_apps_clk_src" , + .parent_names = gcc_xo_gpll0, + .num_parents =2 , + .ops = &clk_rcg2_ops, + }, +}; + +static struct clk_rcg2 blsp2_qup2_i2c_apps_clk_src = { + .cmd_rcgr =0x28020 , + .hid_width =5 , + .parent_map = gcc_xo_gpll0_map, + .freq_tbl = ftbl_blsp1_qup1_i2c_apps_clk_src, + .clkr.hw.init = &(struct clk_init_data ){ + .name ="blsp2_qup2_i2c_apps_clk_src" , + .parent_names = gcc_xo_gpll0, + .num_parents =2 , + .ops = &clk_rcg2_ops, + }, +}; + +static struct clk_rcg2 blsp2_uart2_apps_clk_src = { + .cmd_rcgr =0x2900c , + .mnd_width =16 , + .hid_width =5 , + .parent_map = gcc_xo_gpll0_map, + .freq_tbl = ftbl_blsp1_uart1_apps_clk_src, + .clkr.hw.init = &(struct clk_init_data ){ + .name ="blsp2_uart2_apps_clk_src" , + .parent_names = gcc_xo_gpll0, + .num_parents =2 , + .ops = &clk_rcg2_ops, + }, +}; + +static struct clk_rcg2 blsp2_qup3_spi_apps_clk_src = { + .cmd_rcgr =0x2a00c , + .mnd_width =8 , + .hid_width =5 , + .parent_map = gcc_xo_gpll0_map, + .freq_tbl = ftbl_blsp1_qup1_spi_apps_clk_src, + .clkr.hw.init = &(struct clk_init_data ){ + .name ="blsp2_qup3_spi_apps_clk_src" , + .parent_names = gcc_xo_gpll0, + .num_parents =2 , + .ops = &clk_rcg2_ops, + }, +}; + +static struct clk_rcg2 blsp2_qup3_i2c_apps_clk_src = { + .cmd_rcgr =0x2a020 , + .hid_width =5 , + .parent_map = gcc_xo_gpll0_map, + .freq_tbl = ftbl_blsp1_qup1_i2c_apps_clk_src, + .clkr.hw.init = &(struct clk_init_data ){ + .name ="blsp2_qup3_i2c_apps_clk_src" , + .parent_names = gcc_xo_gpll0, + .num_parents =2 , + .ops = &clk_rcg2_ops, + }, +}; + +static struct clk_rcg2 blsp2_uart3_apps_clk_src = { + .cmd_rcgr =0x2b00c , + .mnd_width =16 , + .hid_width =5 , + .parent_map = gcc_xo_gpll0_map, + .freq_tbl = ftbl_blsp1_uart1_apps_clk_src, + .clkr.hw.init = &(struct clk_init_data ){ + .name ="blsp2_uart3_apps_clk_src" , + .parent_names = gcc_xo_gpll0, + .num_parents =2 , + .ops = &clk_rcg2_ops, + }, +}; + +static struct clk_rcg2 blsp2_qup4_spi_apps_clk_src = { + .cmd_rcgr =0x2c00c , + .mnd_width =8 , + .hid_width =5 , + .parent_map = gcc_xo_gpll0_map, + .freq_tbl = ftbl_blsp1_qup1_spi_apps_clk_src, + .clkr.hw.init = &(struct clk_init_data ){ + .name ="blsp2_qup4_spi_apps_clk_src" , + .parent_names = gcc_xo_gpll0, + .num_parents =2 , + .ops = &clk_rcg2_ops, + }, +}; + +static struct clk_rcg2 blsp2_qup4_i2c_apps_clk_src = { + .cmd_rcgr =0x2c020 , + .hid_width =5 , + .parent_map = gcc_xo_gpll0_map, + .freq_tbl = ftbl_blsp1_qup1_i2c_apps_clk_src, + .clkr.hw.init = &(struct clk_init_data ){ + .name ="blsp2_qup4_i2c_apps_clk_src" , + .parent_names = gcc_xo_gpll0, + .num_parents =2 , + .ops = &clk_rcg2_ops, + }, +}; + +static struct clk_rcg2 blsp2_uart4_apps_clk_src = { + .cmd_rcgr =0x2d00c , + .mnd_width =16 , + .hid_width =5 , + .parent_map = gcc_xo_gpll0_map, + .freq_tbl = ftbl_blsp1_uart1_apps_clk_src, + .clkr.hw.init = &(struct clk_init_data ){ + .name ="blsp2_uart4_apps_clk_src" , + .parent_names = gcc_xo_gpll0, + .num_parents =2 , + .ops = &clk_rcg2_ops, + }, +}; + +static struct clk_rcg2 blsp2_qup5_spi_apps_clk_src = { + .cmd_rcgr =0x2e00c , + .mnd_width =8 , + .hid_width =5 , + .parent_map = gcc_xo_gpll0_map, + .freq_tbl = ftbl_blsp1_qup1_spi_apps_clk_src, + .clkr.hw.init = &(struct clk_init_data ){ + .name ="blsp2_qup5_spi_apps_clk_src" , + .parent_names = gcc_xo_gpll0, + .num_parents =2 , + .ops = &clk_rcg2_ops, + }, +}; + +static struct clk_rcg2 blsp2_qup5_i2c_apps_clk_src = { + .cmd_rcgr =0x2e020 , + .hid_width =5 , + .parent_map = gcc_xo_gpll0_map, + .freq_tbl = ftbl_blsp1_qup1_i2c_apps_clk_src, + .clkr.hw.init = &(struct clk_init_data ){ + .name ="blsp2_qup5_i2c_apps_clk_src" , + .parent_names = gcc_xo_gpll0, + .num_parents =2 , + .ops = &clk_rcg2_ops, + }, +}; + +static struct clk_rcg2 blsp2_uart5_apps_clk_src = { + .cmd_rcgr =0x2f00c , + .mnd_width =16 , + .hid_width =5 , + .parent_map = gcc_xo_gpll0_map, + .freq_tbl = ftbl_blsp1_uart1_apps_clk_src, + .clkr.hw.init = &(struct clk_init_data ){ + .name ="blsp2_uart5_apps_clk_src" , + .parent_names = gcc_xo_gpll0, + .num_parents =2 , + .ops = &clk_rcg2_ops, + }, +}; + +static struct clk_rcg2 blsp2_qup6_spi_apps_clk_src = { + .cmd_rcgr =0x3000c , + .mnd_width =8 , + .hid_width =5 , + .parent_map = gcc_xo_gpll0_map, + .freq_tbl = ftbl_blsp1_qup1_spi_apps_clk_src, + .clkr.hw.init = &(struct clk_init_data ){ + .name ="blsp2_qup6_spi_apps_clk_src" , + .parent_names = gcc_xo_gpll0, + .num_parents =2 , + .ops = &clk_rcg2_ops, + }, +}; + +static struct clk_rcg2 blsp2_qup6_i2c_apps_clk_src = { + .cmd_rcgr =0x30020 , + .hid_width =5 , + .parent_map = gcc_xo_gpll0_map, + .freq_tbl = ftbl_blsp1_qup1_i2c_apps_clk_src, + .clkr.hw.init = &(struct clk_init_data ){ + .name ="blsp2_qup6_i2c_apps_clk_src" , + .parent_names = gcc_xo_gpll0, + .num_parents =2 , + .ops = &clk_rcg2_ops, + }, +}; + +static struct clk_rcg2 blsp2_uart6_apps_clk_src = { + .cmd_rcgr =0x3100c , + .mnd_width =16 , + .hid_width =5 , + .parent_map = gcc_xo_gpll0_map, + .freq_tbl = ftbl_blsp1_uart1_apps_clk_src, + .clkr.hw.init = &(struct clk_init_data ){ + .name ="blsp2_uart6_apps_clk_src" , + .parent_names = gcc_xo_gpll0, + .num_parents =2 , + .ops = &clk_rcg2_ops, + }, +}; + +static const struct freq_tbl ftbl_pdm2_clk_src[] = { +F (60000000 ,P_GPLL0 ,10 ,0 ,0 ), + { } +}; + +static struct clk_rcg2 pdm2_clk_src = { + .cmd_rcgr =0x33010 , + .hid_width =5 , + .parent_map = gcc_xo_gpll0_map, + .freq_tbl = ftbl_pdm2_clk_src, + .clkr.hw.init = &(struct clk_init_data ){ + .name ="pdm2_clk_src" , + .parent_names = gcc_xo_gpll0, + .num_parents =2 , + .ops = &clk_rcg2_ops, + }, +}; + +static const struct freq_tbl ftbl_tsif_ref_clk_src[] = { +F (105495 ,P_XO ,1 ,1 ,182 ), + { } +}; + +static struct clk_rcg2 tsif_ref_clk_src = { + .cmd_rcgr =0x36010 , + .mnd_width =8 , + .hid_width =5 , + .parent_map = gcc_xo_gpll0_aud_ref_clk_map, + .freq_tbl = ftbl_tsif_ref_clk_src, + .clkr.hw.init = &(struct clk_init_data ){ + .name ="tsif_ref_clk_src" , + .parent_names = gcc_xo_gpll0_aud_ref_clk, + .num_parents =3 , + .ops = &clk_rcg2_ops, + }, +}; + +static struct clk_rcg2 gcc_sleep_clk_src = { + .cmd_rcgr =0x43014 , + .hid_width =5 , + .parent_map = gcc_sleep_clk_map, + .clkr.hw.init = &(struct clk_init_data ){ + .name ="gcc_sleep_clk_src" , + .parent_names = gcc_sleep_clk, + .num_parents =1 , + .ops = &clk_rcg2_ops, + }, +}; + +static struct clk_rcg2 hmss_rbcpr_clk_src = { + .cmd_rcgr =0x48040 , + .hid_width =5 , + .parent_map = gcc_xo_gpll0_map, + .freq_tbl = ftbl_usb30_mock_utmi_clk_src, + .clkr.hw.init = &(struct clk_init_data ){ + .name ="hmss_rbcpr_clk_src" , + .parent_names = gcc_xo_gpll0, + .num_parents =2 , + .ops = &clk_rcg2_ops, + }, +}; + +static struct clk_rcg2 hmss_gpll0_clk_src = { + .cmd_rcgr =0x48058 , + .hid_width =5 , + .parent_map = gcc_xo_gpll0_map, + .clkr.hw.init = &(struct clk_init_data ){ + .name ="hmss_gpll0_clk_src" , + .parent_names = gcc_xo_gpll0, + .num_parents =2 , + .ops = &clk_rcg2_ops, + }, +}; + +static const struct freq_tbl ftbl_gp1_clk_src[] = { +F (19200000 ,P_XO ,1 ,0 ,0 ), +F (100000000 ,P_GPLL0 ,6 ,0 ,0 ), +F (200000000 ,P_GPLL0 ,3 ,0 ,0 ), + { } +}; + +static struct clk_rcg2 gp1_clk_src = { + .cmd_rcgr =0x64004 , + .mnd_width =8 , + .hid_width =5 , + .parent_map = gcc_xo_gpll0_sleep_clk_gpll0_early_div_map, + .freq_tbl = ftbl_gp1_clk_src, + .clkr.hw.init = &(struct clk_init_data ){ + .name ="gp1_clk_src" , + .parent_names = gcc_xo_gpll0_sleep_clk_gpll0_early_div, + .num_parents =4 , + .ops = &clk_rcg2_ops, + }, +}; + +static struct clk_rcg2 gp2_clk_src = { + .cmd_rcgr =0x65004 , + .mnd_width =8 , + .hid_width =5 , + .parent_map = gcc_xo_gpll0_sleep_clk_gpll0_early_div_map, + .freq_tbl = ftbl_gp1_clk_src, + .clkr.hw.init = &(struct clk_init_data ){ + .name ="gp2_clk_src" , + .parent_names = gcc_xo_gpll0_sleep_clk_gpll0_early_div, + .num_parents =4 , + .ops = &clk_rcg2_ops, + }, +}; + +static struct clk_rcg2 gp3_clk_src = { + .cmd_rcgr =0x66004 , + .mnd_width =8 , + .hid_width =5 , + .parent_map = gcc_xo_gpll0_sleep_clk_gpll0_early_div_map, + .freq_tbl = ftbl_gp1_clk_src, + .clkr.hw.init = &(struct clk_init_data ){ + .name ="gp3_clk_src" , + .parent_names = gcc_xo_gpll0_sleep_clk_gpll0_early_div, + .num_parents =4 , + .ops = &clk_rcg2_ops, + }, +}; + +static const struct freq_tbl ftbl_pcie_aux_clk_src[] = { +F (1010526 ,P_XO ,1 ,1 ,19 ), + { } +}; + +static struct clk_rcg2 pcie_aux_clk_src = { + .cmd_rcgr =0x6c000 , + .mnd_width =16 , + .hid_width =5 , + .parent_map = gcc_xo_sleep_clk_map, + .freq_tbl = ftbl_pcie_aux_clk_src, + .clkr.hw.init = &(struct clk_init_data ){ + .name ="pcie_aux_clk_src" , + .parent_names = gcc_xo_sleep_clk, + .num_parents =2 , + .ops = &clk_rcg2_ops, + }, +}; + +static const struct freq_tbl ftbl_ufs_axi_clk_src[] = { +F (100000000 ,P_GPLL0 ,6 ,0 ,0 ), +F (200000000 ,P_GPLL0 ,3 ,0 ,0 ), +F (240000000 ,P_GPLL0 ,2.5 ,0 ,0 ), + { } +}; + +static struct clk_rcg2 ufs_axi_clk_src = { + .cmd_rcgr =0x75024 , + .mnd_width =8 , + .hid_width =5 , + .parent_map = gcc_xo_gpll0_map, + .freq_tbl = ftbl_ufs_axi_clk_src, + .clkr.hw.init = &(struct clk_init_data ){ + .name ="ufs_axi_clk_src" , + .parent_names = gcc_xo_gpll0, + .num_parents =2 , + .ops = &clk_rcg2_ops, + }, +}; + +static struct clk_rcg2 ufs_ice_core_clk_src = { + .cmd_rcgr =0x76014 , + .hid_width =5 , + .parent_map = gcc_xo_gpll0_map, + .clkr.hw.init = &(struct clk_init_data ){ + .name ="ufs_ice_core_clk_src" , + .parent_names = gcc_xo_gpll0, + .num_parents =2 , + .ops = &clk_rcg2_ops, + }, +}; + +static struct clk_rcg2 qspi_ser_clk_src = { + .cmd_rcgr =0x8b00c , + .hid_width =5 , + .parent_map = gcc_xo_gpll0_gpll1_early_div_gpll1_gpll4_gpll0_early_div_map, + .clkr.hw.init = &(struct clk_init_data ){ + .name ="qspi_ser_clk_src" , + .parent_names = gcc_xo_gpll0_gpll1_early_div_gpll1_gpll4_gpll0_early_div, + .num_parents =6 , + .ops = &clk_rcg2_ops, + }, +}; + +static struct clk_branch gcc_sys_noc_usb3_axi_clk = { + .halt_reg =0x0f03c , + .clkr = { + .enable_reg =0x0f03c , + .enable_mask =BIT (0 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_sys_noc_usb3_axi_clk" , + .parent_names = (const char *[]){"usb30_master_clk_src" }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_sys_noc_ufs_axi_clk = { + .halt_reg =0x75038 , + .clkr = { + .enable_reg =0x75038 , + .enable_mask =BIT (0 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_sys_noc_ufs_axi_clk" , + .parent_names = (const char *[]){"ufs_axi_clk_src" }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_periph_noc_usb20_ahb_clk = { + .halt_reg =0x6010 , + .clkr = { + .enable_reg =0x6010 , + .enable_mask =BIT (0 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_periph_noc_usb20_ahb_clk" , + .parent_names = (const char *[]){"usb20_master_clk_src" }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_mmss_noc_cfg_ahb_clk = { + .halt_reg =0x9008 , + .clkr = { + .enable_reg =0x9008 , + .enable_mask =BIT (0 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_mmss_noc_cfg_ahb_clk" , + .parent_names = (const char *[]){"config_noc_clk_src" }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT |CLK_IGNORE_UNUSED , + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_mmss_bimc_gfx_clk = { + .halt_reg =0x9010 , + .clkr = { + .enable_reg =0x9010 , + .enable_mask =BIT (0 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_mmss_bimc_gfx_clk" , + .flags =CLK_SET_RATE_PARENT |CLK_IS_ROOT , + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_usb30_master_clk = { + .halt_reg =0x0f008 , + .clkr = { + .enable_reg =0x0f008 , + .enable_mask =BIT (0 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_usb30_master_clk" , + .parent_names = (const char *[]){"usb30_master_clk_src" }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_usb30_sleep_clk = { + .halt_reg =0x0f00c , + .clkr = { + .enable_reg =0x0f00c , + .enable_mask =BIT (0 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_usb30_sleep_clk" , + .parent_names = (const char *[]){"gcc_sleep_clk_src" }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_usb30_mock_utmi_clk = { + .halt_reg =0x0f010 , + .clkr = { + .enable_reg =0x0f010 , + .enable_mask =BIT (0 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_usb30_mock_utmi_clk" , + .parent_names = (const char *[]){"usb30_mock_utmi_clk_src" }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_usb3_phy_aux_clk = { + .halt_reg =0x50000 , + .clkr = { + .enable_reg =0x50000 , + .enable_mask =BIT (0 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_usb3_phy_aux_clk" , + .parent_names = (const char *[]){"usb3_phy_aux_clk_src" }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_usb3_phy_pipe_clk = { + .halt_reg =0x50004 , + .clkr = { + .enable_reg =0x50004 , + .enable_mask =BIT (0 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_usb3_phy_pipe_clk" , + .parent_names = (const char *[]){"usb3_phy_pipe_clk_src" }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_usb20_master_clk = { + .halt_reg =0x12004 , + .clkr = { + .enable_reg =0x12004 , + .enable_mask =BIT (0 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_usb20_master_clk" , + .parent_names = (const char *[]){"usb20_master_clk_src" }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_usb20_sleep_clk = { + .halt_reg =0x12008 , + .clkr = { + .enable_reg =0x12008 , + .enable_mask =BIT (0 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_usb20_sleep_clk" , + .parent_names = (const char *[]){"gcc_sleep_clk_src" }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_usb20_mock_utmi_clk = { + .halt_reg =0x1200c , + .clkr = { + .enable_reg =0x1200c , + .enable_mask =BIT (0 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_usb20_mock_utmi_clk" , + .parent_names = (const char *[]){"usb20_mock_utmi_clk_src" }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_usb_phy_cfg_ahb2phy_clk = { + .halt_reg =0x6a004 , + .clkr = { + .enable_reg =0x6a004 , + .enable_mask =BIT (0 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_usb_phy_cfg_ahb2phy_clk" , + .parent_names = (const char *[]){"periph_noc_clk_src" }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_sdcc1_apps_clk = { + .halt_reg =0x13004 , + .clkr = { + .enable_reg =0x13004 , + .enable_mask =BIT (0 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_sdcc1_apps_clk" , + .parent_names = (const char *[]){"sdcc1_apps_clk_src" }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_sdcc1_ahb_clk = { + .halt_reg =0x13008 , + .clkr = { + .enable_reg =0x13008 , + .enable_mask =BIT (0 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_sdcc1_ahb_clk" , + .parent_names = (const char *[]){"periph_noc_clk_src" }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_sdcc1_ice_core_clk = { + .halt_reg =0x13038 , + .clkr = { + .enable_reg =0x13038 , + .enable_mask =BIT (0 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_sdcc1_ice_core_clk" , + .parent_names = (const char *[]){"sdcc1_ice_core_clk_src" }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_sdcc2_apps_clk = { + .halt_reg =0x14004 , + .clkr = { + .enable_reg =0x14004 , + .enable_mask =BIT (0 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_sdcc2_apps_clk" , + .parent_names = (const char *[]){"sdcc2_apps_clk_src" }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_sdcc2_ahb_clk = { + .halt_reg =0x14008 , + .clkr = { + .enable_reg =0x14008 , + .enable_mask =BIT (0 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_sdcc2_ahb_clk" , + .parent_names = (const char *[]){"periph_noc_clk_src" }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_sdcc3_apps_clk = { + .halt_reg =0x15004 , + .clkr = { + .enable_reg =0x15004 , + .enable_mask =BIT (0 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_sdcc3_apps_clk" , + .parent_names = (const char *[]){"sdcc3_apps_clk_src" }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_sdcc3_ahb_clk = { + .halt_reg =0x15008 , + .clkr = { + .enable_reg =0x15008 , + .enable_mask =BIT (0 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_sdcc3_ahb_clk" , + .parent_names = (const char *[]){"periph_noc_clk_src" }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_sdcc4_apps_clk = { + .halt_reg =0x16004 , + .clkr = { + .enable_reg =0x16004 , + .enable_mask =BIT (0 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_sdcc4_apps_clk" , + .parent_names = (const char *[]){"sdcc4_apps_clk_src" }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_sdcc4_ahb_clk = { + .halt_reg =0x16008 , + .clkr = { + .enable_reg =0x16008 , + .enable_mask =BIT (0 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_sdcc4_ahb_clk" , + .parent_names = (const char *[]){"periph_noc_clk_src" }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_blsp1_ahb_clk = { + .halt_reg =0x17004 , + .halt_check =BRANCH_HALT_VOTED , + .clkr = { + .enable_reg =0x52004 , + .enable_mask =BIT (17 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_blsp1_ahb_clk" , + .parent_names = (const char *[]){"periph_noc_clk_src" }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_blsp1_sleep_clk = { + .halt_reg =0x17008 , + .halt_check =BRANCH_HALT_VOTED , + .clkr = { + .enable_reg =0x52004 , + .enable_mask =BIT (16 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_blsp1_sleep_clk" , + .parent_names = (const char *[]){"gcc_sleep_clk_src" }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_blsp1_qup1_spi_apps_clk = { + .halt_reg =0x19004 , + .clkr = { + .enable_reg =0x19004 , + .enable_mask =BIT (0 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_blsp1_qup1_spi_apps_clk" , + .parent_names = (const char *[]){"blsp1_qup1_spi_apps_clk_src" }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_blsp1_qup1_i2c_apps_clk = { + .halt_reg =0x19008 , + .clkr = { + .enable_reg =0x19008 , + .enable_mask =BIT (0 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_blsp1_qup1_i2c_apps_clk" , + .parent_names = (const char *[]){"blsp1_qup1_i2c_apps_clk_src" }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_blsp1_uart1_apps_clk = { + .halt_reg =0x1a004 , + .clkr = { + .enable_reg =0x1a004 , + .enable_mask =BIT (0 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_blsp1_uart1_apps_clk" , + .parent_names = (const char *[]){"blsp1_uart1_apps_clk_src" }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_blsp1_qup2_spi_apps_clk = { + .halt_reg =0x1b004 , + .clkr = { + .enable_reg =0x1b004 , + .enable_mask =BIT (0 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_blsp1_qup2_spi_apps_clk" , + .parent_names = (const char *[]){"blsp1_qup2_spi_apps_clk_src" }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_blsp1_qup2_i2c_apps_clk = { + .halt_reg =0x1b008 , + .clkr = { + .enable_reg =0x1b008 , + .enable_mask =BIT (0 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_blsp1_qup2_i2c_apps_clk" , + .parent_names = (const char *[]){"blsp1_qup2_i2c_apps_clk_src" }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_blsp1_uart2_apps_clk = { + .halt_reg =0x1c004 , + .clkr = { + .enable_reg =0x1c004 , + .enable_mask =BIT (0 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_blsp1_uart2_apps_clk" , + .parent_names = (const char *[]){"blsp1_uart2_apps_clk_src" }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_blsp1_qup3_spi_apps_clk = { + .halt_reg =0x1d004 , + .clkr = { + .enable_reg =0x1d004 , + .enable_mask =BIT (0 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_blsp1_qup3_spi_apps_clk" , + .parent_names = (const char *[]){"blsp1_qup3_spi_apps_clk_src" }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_blsp1_qup3_i2c_apps_clk = { + .halt_reg =0x1d008 , + .clkr = { + .enable_reg =0x1d008 , + .enable_mask =BIT (0 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_blsp1_qup3_i2c_apps_clk" , + .parent_names = (const char *[]){"blsp1_qup3_i2c_apps_clk_src" }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_blsp1_uart3_apps_clk = { + .halt_reg =0x1e004 , + .clkr = { + .enable_reg =0x1e004 , + .enable_mask =BIT (0 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_blsp1_uart3_apps_clk" , + .parent_names = (const char *[]){"blsp1_uart3_apps_clk_src" }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_blsp1_qup4_spi_apps_clk = { + .halt_reg =0x1f004 , + .clkr = { + .enable_reg =0x1f004 , + .enable_mask =BIT (0 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_blsp1_qup4_spi_apps_clk" , + .parent_names = (const char *[]){"blsp1_qup4_spi_apps_clk_src" }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_blsp1_qup4_i2c_apps_clk = { + .halt_reg =0x1f008 , + .clkr = { + .enable_reg =0x1f008 , + .enable_mask =BIT (0 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_blsp1_qup4_i2c_apps_clk" , + .parent_names = (const char *[]){"blsp1_qup4_i2c_apps_clk_src" }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_blsp1_uart4_apps_clk = { + .halt_reg =0x20004 , + .clkr = { + .enable_reg =0x20004 , + .enable_mask =BIT (0 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_blsp1_uart4_apps_clk" , + .parent_names = (const char *[]){"blsp1_uart4_apps_clk_src" }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_blsp1_qup5_spi_apps_clk = { + .halt_reg =0x21004 , + .clkr = { + .enable_reg =0x21004 , + .enable_mask =BIT (0 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_blsp1_qup5_spi_apps_clk" , + .parent_names = (const char *[]){"blsp1_qup5_spi_apps_clk_src" }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_blsp1_qup5_i2c_apps_clk = { + .halt_reg =0x21008 , + .clkr = { + .enable_reg =0x21008 , + .enable_mask =BIT (0 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_blsp1_qup5_i2c_apps_clk" , + .parent_names = (const char *[]){"blsp1_qup5_i2c_apps_clk_src" }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_blsp1_uart5_apps_clk = { + .halt_reg =0x22004 , + .clkr = { + .enable_reg =0x22004 , + .enable_mask =BIT (0 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_blsp1_uart5_apps_clk" , + .parent_names = (const char *[]){"blsp1_uart5_apps_clk_src" }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_blsp1_qup6_spi_apps_clk = { + .halt_reg =0x23004 , + .clkr = { + .enable_reg =0x23004 , + .enable_mask =BIT (0 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_blsp1_qup6_spi_apps_clk" , + .parent_names = (const char *[]){"blsp1_qup6_spi_apps_clk_src" }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_blsp1_qup6_i2c_apps_clk = { + .halt_reg =0x23008 , + .clkr = { + .enable_reg =0x23008 , + .enable_mask =BIT (0 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_blsp1_qup6_i2c_apps_clk" , + .parent_names = (const char *[]){"blsp1_qup6_i2c_apps_clk_src" }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_blsp1_uart6_apps_clk = { + .halt_reg =0x24004 , + .clkr = { + .enable_reg =0x24004 , + .enable_mask =BIT (0 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_blsp1_uart6_apps_clk" , + .parent_names = (const char *[]){"blsp1_uart6_apps_clk_src" }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_blsp2_ahb_clk = { + .halt_reg =0x25004 , + .halt_check =BRANCH_HALT_VOTED , + .clkr = { + .enable_reg =0x52004 , + .enable_mask =BIT (15 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_blsp2_ahb_clk" , + .parent_names = (const char *[]){"periph_noc_clk_src" }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_blsp2_sleep_clk = { + .halt_reg =0x25008 , + .halt_check =BRANCH_HALT_VOTED , + .clkr = { + .enable_reg =0x52004 , + .enable_mask =BIT (14 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_blsp2_sleep_clk" , + .parent_names = (const char *[]){"gcc_sleep_clk_src" }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_blsp2_qup1_spi_apps_clk = { + .halt_reg =0x26004 , + .clkr = { + .enable_reg =0x26004 , + .enable_mask =BIT (0 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_blsp2_qup1_spi_apps_clk" , + .parent_names = (const char *[]){"blsp2_qup1_spi_apps_clk_src" }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_blsp2_qup1_i2c_apps_clk = { + .halt_reg =0x26008 , + .clkr = { + .enable_reg =0x26008 , + .enable_mask =BIT (0 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_blsp2_qup1_i2c_apps_clk" , + .parent_names = (const char *[]){"blsp2_qup1_i2c_apps_clk_src" }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_blsp2_uart1_apps_clk = { + .halt_reg =0x27004 , + .clkr = { + .enable_reg =0x27004 , + .enable_mask =BIT (0 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_blsp2_uart1_apps_clk" , + .parent_names = (const char *[]){"blsp2_uart1_apps_clk_src" }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_blsp2_qup2_spi_apps_clk = { + .halt_reg =0x28004 , + .clkr = { + .enable_reg =0x28004 , + .enable_mask =BIT (0 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_blsp2_qup2_spi_apps_clk" , + .parent_names = (const char *[]){"blsp2_qup2_spi_apps_clk_src" }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_blsp2_qup2_i2c_apps_clk = { + .halt_reg =0x28008 , + .clkr = { + .enable_reg =0x28008 , + .enable_mask =BIT (0 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_blsp2_qup2_i2c_apps_clk" , + .parent_names = (const char *[]){"blsp2_qup2_i2c_apps_clk_src" }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_blsp2_uart2_apps_clk = { + .halt_reg =0x29004 , + .clkr = { + .enable_reg =0x29004 , + .enable_mask =BIT (0 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_blsp2_uart2_apps_clk" , + .parent_names = (const char *[]){"blsp2_uart2_apps_clk_src" }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_blsp2_qup3_spi_apps_clk = { + .halt_reg =0x2a004 , + .clkr = { + .enable_reg =0x2a004 , + .enable_mask =BIT (0 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_blsp2_qup3_spi_apps_clk" , + .parent_names = (const char *[]){"blsp2_qup3_spi_apps_clk_src" }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_blsp2_qup3_i2c_apps_clk = { + .halt_reg =0x2a008 , + .clkr = { + .enable_reg =0x2a008 , + .enable_mask =BIT (0 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_blsp2_qup3_i2c_apps_clk" , + .parent_names = (const char *[]){"blsp2_qup3_i2c_apps_clk_src" }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_blsp2_uart3_apps_clk = { + .halt_reg =0x2b004 , + .clkr = { + .enable_reg =0x2b004 , + .enable_mask =BIT (0 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_blsp2_uart3_apps_clk" , + .parent_names = (const char *[]){"blsp2_uart3_apps_clk_src" }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_blsp2_qup4_spi_apps_clk = { + .halt_reg =0x2c004 , + .clkr = { + .enable_reg =0x2c004 , + .enable_mask =BIT (0 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_blsp2_qup4_spi_apps_clk" , + .parent_names = (const char *[]){"blsp2_qup4_spi_apps_clk_src" }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_blsp2_qup4_i2c_apps_clk = { + .halt_reg =0x2c008 , + .clkr = { + .enable_reg =0x2c008 , + .enable_mask =BIT (0 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_blsp2_qup4_i2c_apps_clk" , + .parent_names = (const char *[]){"blsp2_qup4_i2c_apps_clk_src" }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_blsp2_uart4_apps_clk = { + .halt_reg =0x2d004 , + .clkr = { + .enable_reg =0x2d004 , + .enable_mask =BIT (0 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_blsp2_uart4_apps_clk" , + .parent_names = (const char *[]){"blsp2_uart4_apps_clk_src" }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_blsp2_qup5_spi_apps_clk = { + .halt_reg =0x2e004 , + .clkr = { + .enable_reg =0x2e004 , + .enable_mask =BIT (0 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_blsp2_qup5_spi_apps_clk" , + .parent_names = (const char *[]){"blsp2_qup5_spi_apps_clk_src" }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_blsp2_qup5_i2c_apps_clk = { + .halt_reg =0x2e008 , + .clkr = { + .enable_reg =0x2e008 , + .enable_mask =BIT (0 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_blsp2_qup5_i2c_apps_clk" , + .parent_names = (const char *[]){"blsp2_qup5_i2c_apps_clk_src" }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_blsp2_uart5_apps_clk = { + .halt_reg =0x2f004 , + .clkr = { + .enable_reg =0x2f004 , + .enable_mask =BIT (0 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_blsp2_uart5_apps_clk" , + .parent_names = (const char *[]){"blsp2_uart5_apps_clk_src" }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_blsp2_qup6_spi_apps_clk = { + .halt_reg =0x30004 , + .clkr = { + .enable_reg =0x30004 , + .enable_mask =BIT (0 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_blsp2_qup6_spi_apps_clk" , + .parent_names = (const char *[]){"blsp2_qup6_spi_apps_clk_src" }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_blsp2_qup6_i2c_apps_clk = { + .halt_reg =0x30008 , + .clkr = { + .enable_reg =0x30008 , + .enable_mask =BIT (0 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_blsp2_qup6_i2c_apps_clk" , + .parent_names = (const char *[]){"blsp2_qup6_i2c_apps_clk_src" }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_blsp2_uart6_apps_clk = { + .halt_reg =0x31004 , + .clkr = { + .enable_reg =0x31004 , + .enable_mask =BIT (0 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_blsp2_uart6_apps_clk" , + .parent_names = (const char *[]){"blsp2_uart6_apps_clk_src" }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_pdm_ahb_clk = { + .halt_reg =0x33004 , + .clkr = { + .enable_reg =0x33004 , + .enable_mask =BIT (0 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_pdm_ahb_clk" , + .parent_names = (const char *[]){"periph_noc_clk_src" }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_pdm2_clk = { + .halt_reg =0x3300c , + .clkr = { + .enable_reg =0x3300c , + .enable_mask =BIT (0 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_pdm2_clk" , + .parent_names = (const char *[]){"pdm2_clk_src" }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_prng_ahb_clk = { + .halt_reg =0x34004 , + .halt_check =BRANCH_HALT_VOTED , + .clkr = { + .enable_reg =0x52004 , + .enable_mask =BIT (13 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_prng_ahb_clk" , + .parent_names = (const char *[]){"config_noc_clk_src" }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_tsif_ahb_clk = { + .halt_reg =0x36004 , + .clkr = { + .enable_reg =0x36004 , + .enable_mask =BIT (0 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_tsif_ahb_clk" , + .parent_names = (const char *[]){"periph_noc_clk_src" }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_tsif_ref_clk = { + .halt_reg =0x36008 , + .clkr = { + .enable_reg =0x36008 , + .enable_mask =BIT (0 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_tsif_ref_clk" , + .parent_names = (const char *[]){"tsif_ref_clk_src" }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_tsif_inactivity_timers_clk = { + .halt_reg =0x3600c , + .clkr = { + .enable_reg =0x3600c , + .enable_mask =BIT (0 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_tsif_inactivity_timers_clk" , + .parent_names = (const char *[]){"gcc_sleep_clk_src" }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_boot_rom_ahb_clk = { + .halt_reg =0x38004 , + .halt_check =BRANCH_HALT_VOTED , + .clkr = { + .enable_reg =0x52004 , + .enable_mask =BIT (10 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_boot_rom_ahb_clk" , + .parent_names = (const char *[]){"config_noc_clk_src" }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_bimc_gfx_clk = { + .halt_reg =0x46018 , + .clkr = { + .enable_reg =0x46018 , + .enable_mask =BIT (0 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_bimc_gfx_clk" , + .flags =CLK_SET_RATE_PARENT |CLK_IS_ROOT , + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_hmss_rbcpr_clk = { + .halt_reg =0x4800c , + .clkr = { + .enable_reg =0x4800c , + .enable_mask =BIT (0 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_hmss_rbcpr_clk" , + .parent_names = (const char *[]){"hmss_rbcpr_clk_src" }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_gp1_clk = { + .halt_reg =0x64000 , + .clkr = { + .enable_reg =0x64000 , + .enable_mask =BIT (0 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_gp1_clk" , + .parent_names = (const char *[]){"gp1_clk_src" }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_gp2_clk = { + .halt_reg =0x65000 , + .clkr = { + .enable_reg =0x65000 , + .enable_mask =BIT (0 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_gp2_clk" , + .parent_names = (const char *[]){"gp2_clk_src" }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_gp3_clk = { + .halt_reg =0x66000 , + .clkr = { + .enable_reg =0x66000 , + .enable_mask =BIT (0 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_gp3_clk" , + .parent_names = (const char *[]){"gp3_clk_src" }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_pcie_0_slv_axi_clk = { + .halt_reg =0x6b008 , + .clkr = { + .enable_reg =0x6b008 , + .enable_mask =BIT (0 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_pcie_0_slv_axi_clk" , + .parent_names = (const char *[]){"system_noc_clk_src" }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_pcie_0_mstr_axi_clk = { + .halt_reg =0x6b00c , + .clkr = { + .enable_reg =0x6b00c , + .enable_mask =BIT (0 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_pcie_0_mstr_axi_clk" , + .parent_names = (const char *[]){"system_noc_clk_src" }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_pcie_0_cfg_ahb_clk = { + .halt_reg =0x6b010 , + .clkr = { + .enable_reg =0x6b010 , + .enable_mask =BIT (0 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_pcie_0_cfg_ahb_clk" , + .parent_names = (const char *[]){"config_noc_clk_src" }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_pcie_0_aux_clk = { + .halt_reg =0x6b014 , + .clkr = { + .enable_reg =0x6b014 , + .enable_mask =BIT (0 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_pcie_0_aux_clk" , + .parent_names = (const char *[]){"pcie_aux_clk_src" }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_pcie_0_pipe_clk = { + .halt_reg =0x6b018 , + .clkr = { + .enable_reg =0x6b018 , + .enable_mask =BIT (0 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_pcie_0_pipe_clk" , + .parent_names = (const char *[]){"pcie_0_pipe_clk_src" }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_pcie_1_slv_axi_clk = { + .halt_reg =0x6d008 , + .clkr = { + .enable_reg =0x6d008 , + .enable_mask =BIT (0 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_pcie_1_slv_axi_clk" , + .parent_names = (const char *[]){"system_noc_clk_src" }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_pcie_1_mstr_axi_clk = { + .halt_reg =0x6d00c , + .clkr = { + .enable_reg =0x6d00c , + .enable_mask =BIT (0 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_pcie_1_mstr_axi_clk" , + .parent_names = (const char *[]){"system_noc_clk_src" }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_pcie_1_cfg_ahb_clk = { + .halt_reg =0x6d010 , + .clkr = { + .enable_reg =0x6d010 , + .enable_mask =BIT (0 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_pcie_1_cfg_ahb_clk" , + .parent_names = (const char *[]){"config_noc_clk_src" }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_pcie_1_aux_clk = { + .halt_reg =0x6d014 , + .clkr = { + .enable_reg =0x6d014 , + .enable_mask =BIT (0 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_pcie_1_aux_clk" , + .parent_names = (const char *[]){"pcie_aux_clk_src" }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_pcie_1_pipe_clk = { + .halt_reg =0x6d018 , + .clkr = { + .enable_reg =0x6d018 , + .enable_mask =BIT (0 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_pcie_1_pipe_clk" , + .parent_names = (const char *[]){"pcie_1_pipe_clk_src" }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_pcie_2_slv_axi_clk = { + .halt_reg =0x6e008 , + .clkr = { + .enable_reg =0x6e008 , + .enable_mask =BIT (0 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_pcie_2_slv_axi_clk" , + .parent_names = (const char *[]){"system_noc_clk_src" }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_pcie_2_mstr_axi_clk = { + .halt_reg =0x6e00c , + .clkr = { + .enable_reg =0x6e00c , + .enable_mask =BIT (0 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_pcie_2_mstr_axi_clk" , + .parent_names = (const char *[]){"system_noc_clk_src" }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_pcie_2_cfg_ahb_clk = { + .halt_reg =0x6e010 , + .clkr = { + .enable_reg =0x6e010 , + .enable_mask =BIT (0 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_pcie_2_cfg_ahb_clk" , + .parent_names = (const char *[]){"config_noc_clk_src" }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_pcie_2_aux_clk = { + .halt_reg =0x6e014 , + .clkr = { + .enable_reg =0x6e014 , + .enable_mask =BIT (0 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_pcie_2_aux_clk" , + .parent_names = (const char *[]){"pcie_aux_clk_src" }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_pcie_2_pipe_clk = { + .halt_reg =0x6e108 , + .clkr = { + .enable_reg =0x6e108 , + .enable_mask =BIT (0 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_pcie_2_pipe_clk" , + .parent_names = (const char *[]){"pcie_2_pipe_clk_src" }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_pcie_phy_cfg_ahb_clk = { + .halt_reg =0x6f004 , + .clkr = { + .enable_reg =0x6f004 , + .enable_mask =BIT (0 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_pcie_phy_cfg_ahb_clk" , + .parent_names = (const char *[]){"config_noc_clk_src" }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_pcie_phy_aux_clk = { + .halt_reg =0x6f008 , + .clkr = { + .enable_reg =0x6f008 , + .enable_mask =BIT (0 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_pcie_phy_aux_clk" , + .parent_names = (const char *[]){"pcie_aux_clk_src" }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_ufs_axi_clk = { + .halt_reg =0x75008 , + .clkr = { + .enable_reg =0x75008 , + .enable_mask =BIT (0 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_ufs_axi_clk" , + .parent_names = (const char *[]){"ufs_axi_clk_src" }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_ufs_ahb_clk = { + .halt_reg =0x7500c , + .clkr = { + .enable_reg =0x7500c , + .enable_mask =BIT (0 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_ufs_ahb_clk" , + .parent_names = (const char *[]){"config_noc_clk_src" }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_fixed_factor ufs_tx_cfg_clk_src = { + .mult =1 , + .div =16 , + .hw.init = &(struct clk_init_data ){ + .name ="ufs_tx_cfg_clk_src" , + .parent_names = (const char *[]){"ufs_axi_clk_src" }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_fixed_factor_ops, + }, +}; + +static struct clk_branch gcc_ufs_tx_cfg_clk = { + .halt_reg =0x75010 , + .clkr = { + .enable_reg =0x75010 , + .enable_mask =BIT (0 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_ufs_tx_cfg_clk" , + .parent_names = (const char *[]){"ufs_tx_cfg_clk_src" }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_fixed_factor ufs_rx_cfg_clk_src = { + .mult =1 , + .div =16 , + .hw.init = &(struct clk_init_data ){ + .name ="ufs_rx_cfg_clk_src" , + .parent_names = (const char *[]){"ufs_axi_clk_src" }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_fixed_factor_ops, + }, +}; + +static struct clk_branch gcc_ufs_rx_cfg_clk = { + .halt_reg =0x75014 , + .clkr = { + .enable_reg =0x75014 , + .enable_mask =BIT (0 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_ufs_rx_cfg_clk" , + .parent_names = (const char *[]){"ufs_rx_cfg_clk_src" }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_ufs_tx_symbol_0_clk = { + .halt_reg =0x75018 , + .clkr = { + .enable_reg =0x75018 , + .enable_mask =BIT (0 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_ufs_tx_symbol_0_clk" , + .parent_names = (const char *[]){"ufs_tx_symbol_0_clk_src" }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_ufs_rx_symbol_0_clk = { + .halt_reg =0x7501c , + .clkr = { + .enable_reg =0x7501c , + .enable_mask =BIT (0 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_ufs_rx_symbol_0_clk" , + .parent_names = (const char *[]){"ufs_rx_symbol_0_clk_src" }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_ufs_rx_symbol_1_clk = { + .halt_reg =0x75020 , + .clkr = { + .enable_reg =0x75020 , + .enable_mask =BIT (0 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_ufs_rx_symbol_1_clk" , + .parent_names = (const char *[]){"ufs_rx_symbol_1_clk_src" }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_fixed_factor ufs_ice_core_postdiv_clk_src = { + .mult =1 , + .div =2 , + .hw.init = &(struct clk_init_data ){ + .name ="ufs_ice_core_postdiv_clk_src" , + .parent_names = (const char *[]){"ufs_ice_core_clk_src" }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_fixed_factor_ops, + }, +}; + +static struct clk_branch gcc_ufs_unipro_core_clk = { + .halt_reg =0x7600c , + .clkr = { + .enable_reg =0x7600c , + .enable_mask =BIT (0 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_ufs_unipro_core_clk" , + .parent_names = (const char *[]){"ufs_ice_core_postdiv_clk_src" }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_ufs_ice_core_clk = { + .halt_reg =0x76010 , + .clkr = { + .enable_reg =0x76010 , + .enable_mask =BIT (0 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_ufs_ice_core_clk" , + .parent_names = (const char *[]){"ufs_ice_core_clk_src" }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_ufs_sys_clk_core_clk = { + .halt_check =BRANCH_HALT_DELAY , + .clkr = { + .enable_reg =0x76030 , + .enable_mask =BIT (0 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_ufs_sys_clk_core_clk" , + .ops = &clk_branch2_ops, + .flags =CLK_IS_ROOT , + }, + }, +}; + +static struct clk_branch gcc_ufs_tx_symbol_clk_core_clk = { + .halt_check =BRANCH_HALT_DELAY , + .clkr = { + .enable_reg =0x76034 , + .enable_mask =BIT (0 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_ufs_tx_symbol_clk_core_clk" , + .ops = &clk_branch2_ops, + .flags =CLK_IS_ROOT , + }, + }, +}; + +static struct clk_branch gcc_aggre0_snoc_axi_clk = { + .halt_reg =0x81008 , + .clkr = { + .enable_reg =0x81008 , + .enable_mask =BIT (0 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_aggre0_snoc_axi_clk" , + .parent_names = (const char *[]){"system_noc_clk_src" }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_aggre0_cnoc_ahb_clk = { + .halt_reg =0x8100c , + .clkr = { + .enable_reg =0x8100c , + .enable_mask =BIT (0 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_aggre0_cnoc_ahb_clk" , + .parent_names = (const char *[]){"config_noc_clk_src" }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_smmu_aggre0_axi_clk = { + .halt_reg =0x81014 , + .clkr = { + .enable_reg =0x81014 , + .enable_mask =BIT (0 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_smmu_aggre0_axi_clk" , + .parent_names = (const char *[]){"system_noc_clk_src" }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_smmu_aggre0_ahb_clk = { + .halt_reg =0x81018 , + .clkr = { + .enable_reg =0x81018 , + .enable_mask =BIT (0 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_smmu_aggre0_ahb_clk" , + .parent_names = (const char *[]){"config_noc_clk_src" }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_aggre1_pnoc_ahb_clk = { + .halt_reg =0x82014 , + .clkr = { + .enable_reg =0x82014 , + .enable_mask =BIT (0 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_aggre1_pnoc_ahb_clk" , + .parent_names = (const char *[]){"periph_noc_clk_src" }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_aggre2_ufs_axi_clk = { + .halt_reg =0x83014 , + .clkr = { + .enable_reg =0x83014 , + .enable_mask =BIT (0 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_aggre2_ufs_axi_clk" , + .parent_names = (const char *[]){"ufs_axi_clk_src" }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_aggre2_usb3_axi_clk = { + .halt_reg =0x83018 , + .clkr = { + .enable_reg =0x83018 , + .enable_mask =BIT (0 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_aggre2_usb3_axi_clk" , + .parent_names = (const char *[]){"usb30_master_clk_src" }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_qspi_ahb_clk = { + .halt_reg =0x8b004 , + .clkr = { + .enable_reg =0x8b004 , + .enable_mask =BIT (0 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_qspi_ahb_clk" , + .parent_names = (const char *[]){"periph_noc_clk_src" }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_qspi_ser_clk = { + .halt_reg =0x8b008 , + .clkr = { + .enable_reg =0x8b008 , + .enable_mask =BIT (0 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_qspi_ser_clk" , + .parent_names = (const char *[]){"qspi_ser_clk_src" }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_usb3_clkref_clk = { + .halt_reg =0x8800C , + .clkr = { + .enable_reg =0x8800C , + .enable_mask =BIT (0 ), + .hw.init = &(struct clk_init_data ){ + .name ="gcc_usb3_clkref_clk" ,Lines of this file are not shown. View the raw message.
include/dt-bindings/clock/qcom,gcc-msm8996.h new file +339
-0Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation
Part of the diff is not shown here. View the raw message.
Re: [PATCH v2 3/5] clk: qcom: Add MSM8996 Global Clock Control (GCC) driver
Quoted 19 lines · Rajendra Nayak
Stephen,
Quoted 3 lines · Stephen Boyd
Add support for the global clock controller found on MSM8996 based devices. This should allow most non-multimedia device drivers to probe and control their clocks.
On my 8096 board I see the following orphan clocks,
/sys/kernel/debug/clk# catclk_orphan_summary
clockenable_cntprepare_cntrate accuracy phase
--------------------------------------------------------------------------------------- -gcc_ufs_rx_symbol_1_clk 0 0 0 0 0 gcc_ufs_rx_symbol_0_clk 0 0 0 0 0 gcc_ufs_tx_symbol_0_clk 0 0 0 0 0 gcc_pcie_2_pipe_clk 0 0 0 0 0 gcc_pcie_1_pipe_clk 0 0 0 0 0 gcc_pcie_0_pipe_clk 0 0 0 0 0 gcc_usb3_phy_pipe_clk 0 0 0 0 0
Quoted 2 lines
I was looking at some ufs clocks which lead me to this. something that needs to be fixed?
Hmm yes. This was a "TODO" because the data says there are parents for these clocks, but they don't seem to exist in the global clock controller. Perhaps they come from the phys? If my suspicion is right, then those phy drivers need to register the source clocks and give them some rate so that these clocks here aren't orphans. In the downstream code they mark these clocks as root clocks, which doesn't seem right, but I suppose that also works given that we don't seem to care about rates, just on/off. It just feels hacky, so I left them as orphans for now.
Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project
PATCH v2 4/5 clk: qcom: Add gfx3d ping-pong PLL frequency switching
In reply to Stephen BoydThe GPU clocks on msm8996 have three dedicated PLLs, MMPLL2, MMPLL8, and MMPLL9. We leave MMPLL9 at the maximum speed (624 MHz), and we use MMPLL2 and MMPLL8 for the other frequencies. To make switching frequencies faster, we ping-pong between MMPLL2 and MMPLL8 when we're switching between frequencies that aren't the maximum. Implement custom rcg clk ops for this type of frequency switching.
--- drivers/clk/qcom/clk-rcg.h | 1 + drivers/clk/qcom/clk-rcg2.c | 87 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 88 insertions(+)
drivers/clk/qcom/clk-rcg.h +1 -0
@@ -178,5 +178,6 @@ extern const struct clk_ops clk_edp_pixel_ops;extern const struct clk_ops clk_byte_ops;extern const struct clk_ops clk_byte2_ops;extern const struct clk_ops clk_pixel_ops; +extern const struct clk_ops clk_gfx3d_ops;#endif
drivers/clk/qcom/clk-rcg2.c +87 -0
90 lines not on this page · raw message
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project
PATCH v2 5/5 clk: qcom: Add MSM8996 Multimedia Clock Controller (MMCC) driver
In reply to Stephen BoydAdd a driver for the multimedia clock controller found on MSM8996 based devices. This should allow most multimedia device drivers to probe and control their clocks.
--- .../devicetree/bindings/clock/qcom,mmcc.txt | 1 + drivers/clk/qcom/Kconfig | 9 + drivers/clk/qcom/Makefile | 1 + drivers/clk/qcom/mmcc-msm8996.c | 3217 ++++++++++++++++++++ include/dt-bindings/clock/qcom,mmcc-msm8996.h | 285 ++ 5 files changed, 3513 insertions(+) create mode 100644 drivers/clk/qcom/mmcc-msm8996.c create mode 100644 include/dt-bindings/clock/qcom,mmcc-msm8996.h
Documentation/devicetree/bindings/clock/qcom,mmcc.txt +1 -0
@@ -9,6 +9,7 @@ Required properties : "qcom,mmcc-msm8660" "qcom,mmcc-msm8960" "qcom,mmcc-msm8974" + "qcom,mmcc-msm8996" - reg : shall contain base register location and length - #clock-cells : shall contain 1
drivers/clk/qcom/Kconfig +9 -0
@@ -114,3 +114,12 @@ config MSM_GCC_8996 Support for the global clock controller on msm8996 devices. Say Y if you want to use peripheral devices such as UART, SPI, i2c, USB, UFS, SD/eMMC, PCIe, etc. + +config MSM_MMCC_8996 + tristate "MSM8996 Multimedia Clock Controller" + select MSM_GCC_8996 + depends on COMMON_CLK_QCOM + help + Support for the multimedia clock controller on msm8996 devices. + Say Y if you want to support multimedia devices such as display, + graphics, video encode/decode, camera, etc.
drivers/clk/qcom/Makefile +1 -0
@@ -24,3 +24,4 @@ obj-$(CONFIG_MSM_GCC_8974) += gcc-msm8974.o obj-$(CONFIG_MSM_GCC_8996) += gcc-msm8996.o obj-$(CONFIG_MSM_MMCC_8960) += mmcc-msm8960.o obj-$(CONFIG_MSM_MMCC_8974) += mmcc-msm8974.o +obj-$(CONFIG_MSM_MMCC_8996) += mmcc-msm8996.o
drivers/clk/qcom/mmcc-msm8996.c new file +3217 -0
2,977 lines not on this page · raw message
include/dt-bindings/clock/qcom,mmcc-msm8996.h new file +285 -0
285 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project
Part of the diff is not shown here. View the raw message.
Quoted 8 lines · Stephen Boyd
These patches add support for the global and multimedia clock controllers found on MSM8996 devices. The first patch allows us to implement a "power of two" divider of different widths with a table based divider. The second patch adds support for Alpha PLLs and the 3rd and 5th patches add support for the two clock controllers. The fourth patch is a new type of clock ops for the graphics clock that does some custom ping-pong between different PLLs when switching graphics frequencies.
Quoted 5 lines
Changes from v1:
* Added some missing clocks in gcc and mmcc drivers
* Updated PLL settings in mmcc
I've pushed this to clk-msm8996 and merged it into clk-next.
Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project