Skip to content

Commit 3dcf7b5

Browse files
robimarkoandersson
authored andcommitted
clk: qcom: gcc-ipq6018: add QUP6 I2C clock
QUP6 I2C clock is listed in the dt bindings but it was never included in the GCC driver. So lets add support for it, it is marked as criticial as it is used by RPM to communicate to the external PMIC over I2C so this clock must not be disabled. Signed-off-by: Robert Marko <[email protected]> Reviewed-by: Kathiravan Thirumoorthy <[email protected]> Reviewed-by: Konrad Dybcio <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Andersson <[email protected]>
1 parent 0033122 commit 3dcf7b5

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

drivers/clk/qcom/gcc-ipq6018.c

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2125,6 +2125,26 @@ static struct clk_branch gcc_blsp1_qup5_spi_apps_clk = {
21252125
},
21262126
};
21272127

2128+
static struct clk_branch gcc_blsp1_qup6_i2c_apps_clk = {
2129+
.halt_reg = 0x07010,
2130+
.clkr = {
2131+
.enable_reg = 0x07010,
2132+
.enable_mask = BIT(0),
2133+
.hw.init = &(struct clk_init_data){
2134+
.name = "gcc_blsp1_qup6_i2c_apps_clk",
2135+
.parent_hws = (const struct clk_hw *[]){
2136+
&blsp1_qup6_i2c_apps_clk_src.clkr.hw },
2137+
.num_parents = 1,
2138+
/*
2139+
* RPM uses QUP6 I2C to communicate with the external
2140+
* PMIC so it must not be disabled.
2141+
*/
2142+
.flags = CLK_SET_RATE_PARENT | CLK_IS_CRITICAL,
2143+
.ops = &clk_branch2_ops,
2144+
},
2145+
},
2146+
};
2147+
21282148
static struct clk_branch gcc_blsp1_qup6_spi_apps_clk = {
21292149
.halt_reg = 0x0700c,
21302150
.clkr = {
@@ -4281,6 +4301,7 @@ static struct clk_regmap *gcc_ipq6018_clks[] = {
42814301
[GCC_BLSP1_QUP4_SPI_APPS_CLK] = &gcc_blsp1_qup4_spi_apps_clk.clkr,
42824302
[GCC_BLSP1_QUP5_I2C_APPS_CLK] = &gcc_blsp1_qup5_i2c_apps_clk.clkr,
42834303
[GCC_BLSP1_QUP5_SPI_APPS_CLK] = &gcc_blsp1_qup5_spi_apps_clk.clkr,
4304+
[GCC_BLSP1_QUP6_I2C_APPS_CLK] = &gcc_blsp1_qup6_i2c_apps_clk.clkr,
42844305
[GCC_BLSP1_QUP6_SPI_APPS_CLK] = &gcc_blsp1_qup6_spi_apps_clk.clkr,
42854306
[GCC_BLSP1_UART1_APPS_CLK] = &gcc_blsp1_uart1_apps_clk.clkr,
42864307
[GCC_BLSP1_UART2_APPS_CLK] = &gcc_blsp1_uart2_apps_clk.clkr,

0 commit comments

Comments
 (0)