clk: tegra114: Add CSI pad clock gates
v2 cover clk: tegra114: Add CSI pad clock gates
Tegra114 has CSI pad bits in both PLLD and PLLD2 clocks that are required for the correct work of the CSI block. Add CSI pad A and pad B clock gates with PLLD/PLLD2 parents, respectively.
This change is similar to Tegra30 pad clocks and is required for CSI block.
---
Changes in v2:
- dropped CLK_SET_RATE_PARENT form tegra114 pad clocks
- added commit to drop CLK_SET_RATE_PARENT from tegra30 pad clocks
---
Svyatoslav Ryhel (3):
dt-bindings: clock: tegra114: Add IDs for CSI pad clocks
clk: tegra114: Add CSI pad clock gates
clk: tegra30: Remove CLK_SET_RATE_PARENT from CSI pad clock gates
drivers/clk/tegra/clk-tegra114.c | 11 +++++++++++ drivers/clk/tegra/clk-tegra30.c | 4 ++-- include/dt-bindings/clock/tegra114-car.h | 3 ++- 3 files changed, 15 insertions(+), 3 deletions(-)
Signature · 1 line
2.53.0
PATCH v2 1/3 dt-bindings: clock: tegra114: Add IDs for CSI pad clocks
Tegra114 has CSI pad clock enable bits embedded into PLLD/PLLD2 registers. Add ids for these clocks. Additionally, move TEGRA114_CLK_CLK_MAX into clk-tegra114 source.
--- drivers/clk/tegra/clk-tegra114.c | 1 + include/dt-bindings/clock/tegra114-car.h | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-)
drivers/clk/tegra/clk-tegra114.c +1 -0
@@ -47,6 +47,7 @@#define CPU_FINETRIM_R_FCPU_6_MASK (0x3 << CPU_FINETRIM_R_FCPU_6_SHIFT)#define TEGRA114_CLK_PERIPH_BANKS 5 +#define TEGRA114_CLK_CLK_MAX 314#define PLLC_BASE 0x80#define PLLC_MISC2 0x88
include/dt-bindings/clock/tegra114-car.h +2 -1
@@ -341,6 +341,7 @@#define TEGRA114_CLK_DSIA_MUX 309#define TEGRA114_CLK_DSIB_MUX 310#define TEGRA114_CLK_XUSB_SS_DIV2 311 -#define TEGRA114_CLK_CLK_MAX 312 +#define TEGRA114_CLK_CSIA_PAD 312 +#define TEGRA114_CLK_CSIB_PAD 313#endif /* _DT_BINDINGS_CLOCK_TEGRA114_CAR_H */
Signature · 1 line
2.53.0
PATCH v2 2/3 clk: tegra114: Add CSI pad clock gates
In reply to Svyatoslav RyhelTegra114 has CSI pad bits in both PLLD and PLLD2 clocks that are required for the correct work of the CSI block. Add CSI pad A and pad B clock gates with PLLD/PLLD2 parents, respectively.
--- drivers/clk/tegra/clk-tegra114.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
drivers/clk/tegra/clk-tegra114.c +10 -0
@@ -1041,6 +1041,16 @@ static __init void tegra114_periph_clk_init(void __iomem *clk_base, 0, 82, periph_clk_enb_refcnt); clks[TEGRA114_CLK_DSIB ] = clk; +/* csia_pad */ + clk =clk_register_gate (NULL ,"csia_pad" ,"pll_d" ,0 , + clk_base +PLLD_BASE ,26 ,0 , &pll_d_lock); + clks[TEGRA114_CLK_CSIA_PAD ] = clk; + +/* csib_pad */ + clk =clk_register_gate (NULL ,"csib_pad" ,"pll_d2" ,0 , + clk_base +PLLD2_BASE ,26 ,0 , &pll_d2_lock); + clks[TEGRA114_CLK_CSIB_PAD ] = clk; +/* csus */ clk = tegra_clk_register_periph_gate("csus", "vi_sensor", 0, clk_base, 0, TEGRA114_CLK_CSUS,
Signature · 1 line
2.53.0
PATCH v2 3/3 clk: tegra30: Remove CLK_SET_RATE_PARENT from CSI pad clock gates
In reply to Svyatoslav RyhelRemove CLK_SET_RATE_PARENT from CSI pad clock gates since changing the PLL clock rate is undesirable by changing pad clocks.
--- drivers/clk/tegra/clk-tegra30.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/clk/tegra/clk-tegra30.c +2 -2
@@ -1010,12 +1010,12 @@ static void __init tegra30_periph_clk_init(void) clks[TEGRA30_CLK_DSIA ] = clk;/* csia_pad */ - clk =clk_register_gate (NULL ,"csia_pad" ,"pll_d" ,CLK_SET_RATE_PARENT , + clk =clk_register_gate (NULL ,"csia_pad" ,"pll_d" ,0 , clk_base +PLLD_BASE ,26 ,0 , &pll_d_lock); clks[TEGRA30_CLK_CSIA_PAD ] = clk;/* csib_pad */ - clk =clk_register_gate (NULL ,"csib_pad" ,"pll_d2" ,CLK_SET_RATE_PARENT , + clk =clk_register_gate (NULL ,"csib_pad" ,"pll_d2" ,0 , clk_base +PLLD2_BASE ,26 ,0 , &pll_d2_lock); clks[TEGRA30_CLK_CSIB_PAD ] = clk;
Signature · 1 line
2.53.0
Jerome Brunet
AppliedApplied to clk/linux.git (clk-next), thanks!
[1/3] dt-bindings: clock: tegra114: Add IDs for CSI pad clocks
https://git.kernel.org/clk/linux/c/61b67dfc9c24 [2/3] clk: tegra114: Add CSI pad clock gates https://git.kernel.org/clk/linux/c/ecb755d4fe97 [3/3] clk: tegra30: Remove CLK_SET_RATE_PARENT from CSI pad clock gates https://git.kernel.org/clk/linux/c/4d55ffabc35d
Best regards,
--
Jerome