clk: qcom: dispcc-sm8250: Disable EDP_GTC for sm8350
PATCH 1/5 clk: qcom: dispcc-sm8250: Disable EDP_GTC for sm8350
SM8350 does not have the EDP_GTC clock, so let's disable it for this SoC.
--- drivers/clk/qcom/dispcc-sm8250.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/clk/qcom/dispcc-sm8250.c +3 -0
@@ -1330,6 +1330,9 @@ static int disp_cc_sm8250_probe(struct platform_device *pdev) disp_cc_pll1_config.test_ctl_hi1_val =0x01800000 ; disp_cc_pll1_init.ops = &clk_alpha_pll_lucid_5lpe_ops; disp_cc_pll1.vco_table = lucid_5lpe_vco; + + disp_cc_sm8250_clocks[DISP_CC_MDSS_EDP_GTC_CLK ] =NULL ; + disp_cc_sm8250_clocks[DISP_CC_MDSS_EDP_GTC_CLK_SRC ] =NULL ; }clk_lucid_pll_configure (&disp_cc_pll0, regmap, &disp_cc_pll0_config);
Signature · 1 line
2.34.1
PATCH 2/5 clk: qcom: dispcc-sm8250: Add RETAIN_FF_ENABLE flag for mdss_gdsc
All SoC supported by this driver supports the RETAIN_FF_ENABLE flag, so it should be enabled here.
This feature enables registers to maintain their state after dis/re-enabling the GDSC.
--- drivers/clk/qcom/dispcc-sm8250.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/qcom/dispcc-sm8250.c +1 -1
@@ -1137,7 +1137,7 @@ static struct gdsc mdss_gdsc = { .name = "mdss_gdsc", }, .pwrsts = PWRSTS_OFF_ON, - .flags = HW_CTRL, + .flags = HW_CTRL | RETAIN_FF_ENABLE, }; static struct clk_regmap *disp_cc_sm8250_clocks[] = {
Signature · 1 line
2.34.1
PATCH 3/5 dt-bindings: clock: dispcc-sm8250: Add EDP_LINK_DIV_CLK_SRC index
In reply to Robert FossAdd this previously missing index, since it is supported by the SoCs targeted by the dispcc-sm8250 driver.
--- include/dt-bindings/clock/qcom,dispcc-sm8250.h | 1 + 1 file changed, 1 insertion(+)
include/dt-bindings/clock/qcom,dispcc-sm8250.h +1 -0
@@ -64,6 +64,7 @@#define DISP_CC_MDSS_EDP_LINK_INTF_CLK 54#define DISP_CC_MDSS_EDP_PIXEL_CLK 55#define DISP_CC_MDSS_EDP_PIXEL_CLK_SRC 56 +#define DISP_CC_MDSS_EDP_LINK_DIV_CLK_SRC 57/* DISP_CC Reset */ #define DISP_CC_MDSS_CORE_BCR 0
Signature · 1 line
2.34.1
PATCH 4/5 clk: qcom: dispcc-sm8250: Add missing EDP clocks for sm8350
In reply to Robert FossSM8350 supports embedded displayport, but the clocks for this were previously not enabled.
--- drivers/clk/qcom/dispcc-sm8250.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-)
drivers/clk/qcom/dispcc-sm8250.c +21 -1
@@ -462,6 +462,20 @@ static struct clk_branch disp_cc_mdss_edp_link_clk = { }, }; +static struct clk_regmap_div disp_cc_mdss_edp_link_div_clk_src = { + .reg =0x2288 , + .shift =0 , + .width =2 , + .clkr.hw.init = &(struct clk_init_data ) { + .name ="disp_cc_mdss_edp_link_div_clk_src" , + .parent_hws = (const struct clk_hw *[]){ + &disp_cc_mdss_edp_link_clk_src.clkr.hw, + }, + .num_parents =1 , + .ops = &clk_regmap_div_ro_ops, + }, +}; +static struct clk_branch disp_cc_mdss_edp_link_intf_clk = { .halt_reg =0x2074 , .halt_check =BRANCH_HALT ,
@@ -471,7 +485,7 @@ static struct clk_branch disp_cc_mdss_edp_link_intf_clk = { .hw.init = &(struct clk_init_data){ .name ="disp_cc_mdss_edp_link_intf_clk" , .parent_hws = (const struct clk_hw *[]){ - &disp_cc_mdss_edp_link_clk_src.clkr.hw, + &disp_cc_mdss_edp_link_div_clk_src.clkr.hw, }, .num_parents =1 , .flags =CLK_GET_RATE_NOCACHE ,
@@ -1175,6 +1189,7 @@ static struct clk_regmap *disp_cc_sm8250_clocks[] = { [DISP_CC_MDSS_EDP_GTC_CLK_SRC] = &disp_cc_mdss_edp_gtc_clk_src.clkr, [DISP_CC_MDSS_EDP_LINK_CLK] = &disp_cc_mdss_edp_link_clk.clkr, [DISP_CC_MDSS_EDP_LINK_CLK_SRC] = &disp_cc_mdss_edp_link_clk_src.clkr, + [DISP_CC_MDSS_EDP_LINK_DIV_CLK_SRC] = &disp_cc_mdss_edp_link_div_clk_src.clkr, [DISP_CC_MDSS_EDP_LINK_INTF_CLK] = &disp_cc_mdss_edp_link_intf_clk.clkr, [DISP_CC_MDSS_EDP_PIXEL_CLK] = &disp_cc_mdss_edp_pixel_clk.clkr, [DISP_CC_MDSS_EDP_PIXEL_CLK_SRC] = &disp_cc_mdss_edp_pixel_clk_src.clkr,
@@ -1285,7 +1300,11 @@ static int disp_cc_sm8250_probe(struct platform_device *pdev) &disp_cc_mdss_dp_pixel1_clk_src, &disp_cc_mdss_dp_pixel2_clk_src, &disp_cc_mdss_dp_pixel_clk_src, + &disp_cc_mdss_edp_aux_clk_src, + &disp_cc_mdss_edp_link_clk_src, + &disp_cc_mdss_edp_pixel_clk_src, &disp_cc_mdss_esc0_clk_src, + &disp_cc_mdss_esc1_clk_src, &disp_cc_mdss_mdp_clk_src, &disp_cc_mdss_pclk0_clk_src, &disp_cc_mdss_pclk1_clk_src,
@@ -1297,6 +1316,7 @@ static int disp_cc_sm8250_probe(struct platform_device *pdev) &disp_cc_mdss_byte1_div_clk_src, &disp_cc_mdss_dp_link1_div_clk_src, &disp_cc_mdss_dp_link_div_clk_src, + &disp_cc_mdss_edp_link_div_clk_src, };unsigned int i;static bool offset_applied;
Signature · 1 line
2.34.1
PATCH 5/5 clk: qcom: dispcc-sm8250: Disable link_div_clk_src for sm8150
In reply to Robert FossSM8150 does not have any of the link_div_clk_src clocks, so let's disable them for this SoC.
--- drivers/clk/qcom/dispcc-sm8250.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/clk/qcom/dispcc-sm8250.c +4 -0
@@ -1289,6 +1289,10 @@ static int disp_cc_sm8250_probe(struct platform_device *pdev) disp_cc_pll1_config.config_ctl_hi1_val =0x00000024 ; disp_cc_pll1_config.user_ctl_hi1_val =0x000000D0 ; disp_cc_pll1_init.ops = &clk_alpha_pll_trion_ops; + + disp_cc_sm8250_clocks[DISP_CC_MDSS_DP_LINK1_DIV_CLK_SRC ] =NULL ; + disp_cc_sm8250_clocks[DISP_CC_MDSS_DP_LINK_DIV_CLK_SRC ] =NULL ; + disp_cc_sm8250_clocks[DISP_CC_MDSS_EDP_LINK_DIV_CLK_SRC ] =NULL ; }else if (of_device_is_compatible (pdev->dev.of_node,"qcom,sm8350-dispcc" )) {static struct clk_rcg2 *const rcgs[] = { &disp_cc_mdss_byte0_clk_src,
Signature · 1 line
2.34.1
Re: [PATCH v1 5/5] clk: qcom: dispcc-sm8250: Disable link_div_clk_src for sm8150
Quoted 13 lines · Robert Foss
SM8150 does not have any of the
link_div_clk_srcclocks, so let's disable them for this SoC.Signed-off-by Robert Foss <[email protected]>--- drivers/clk/qcom/dispcc-sm8250.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/clk/qcom/dispcc-sm8250.c +0
-0
drivers/clk/qcom/dispcc-sm8250.c static int disp_cc_sm8250_probe(struct platform_device *pdev) · line 1295
Quoted 7 lines
drivers/clk/qcom/dispcc-sm8250.c +4
-0@@ -1289,6 +1289,10 @@ static int disp_cc_sm8250_probe(struct platform_device *pdev) disp_cc_pll1_config.config_ctl_hi1_val =0x00000024 ; disp_cc_pll1_config.user_ctl_hi1_val =0x000000D0 ; disp_cc_pll1_init.ops = &clk_alpha_pll_trion_ops; + + disp_cc_sm8250_clocks[DISP_CC_MDSS_DP_LINK1_DIV_CLK_SRC ] =NULL ; + disp_cc_sm8250_clocks[DISP_CC_MDSS_DP_LINK_DIV_CLK_SRC ] =NULL ; + disp_cc_sm8250_clocks[DISP_CC_MDSS_EDP_LINK_DIV_CLK_SRC ] =NULL ;
We also have to fix link_intf clocks:
disp_cc_mdss_dp_link_intf_clk.clkr.hw.init->parent_hws[0] = &disp_cc_mdss_dp_link_clk_src.clkr.hw; disp_cc_mdss_dp_link1_intf_clk.clkr.hw.init->parent_hws[0] = &disp_cc_mdss_dp_link1_clk_src.clkr.hw; disp_cc_mdss_edp_link_intf_clk.clkr.hw.init->parent_hws[0] = &disp_cc_mdss_edp_link_clk_src.clkr.hw;
Quoted 3 lines
drivers/clk/qcom/dispcc-sm8250.c +0
-0}else if (of_device_is_compatible (pdev->dev.of_node,"qcom,sm8350-dispcc" )) {static struct clk_rcg2 *const rcgs[] = { &disp_cc_mdss_byte0_clk_src,
Signature · 2 lines
With best wishes Dmitry
Re: [PATCH v1 4/5] clk: qcom: dispcc-sm8250: Add missing EDP clocks for sm8350
In reply to Robert FossQuoted 2 lines · Robert Foss
SM8350 supports embedded displayport, but the clocks for this were previously not enabled.
I'd say 'not accounted for' instead. Bjorn has added eDP clocks, but they were following the 8150 (no div_clk_src) and the offsets were not updated.
Quoted 68 lines
Signed-off-by Robert Foss <[email protected]>--- drivers/clk/qcom/dispcc-sm8250.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-)drivers/clk/qcom/dispcc-sm8250.c +21
-1@@ -462,6 +462,20 @@ static struct clk_branch disp_cc_mdss_edp_link_clk = { }, }; +static struct clk_regmap_div disp_cc_mdss_edp_link_div_clk_src = { + .reg =0x2288 , + .shift =0 , + .width =2 , + .clkr.hw.init = &(struct clk_init_data ) { + .name ="disp_cc_mdss_edp_link_div_clk_src" , + .parent_hws = (const struct clk_hw *[]){ + &disp_cc_mdss_edp_link_clk_src.clkr.hw, + }, + .num_parents =1 , + .ops = &clk_regmap_div_ro_ops, + }, +}; +static struct clk_branch disp_cc_mdss_edp_link_intf_clk = { .halt_reg =0x2074 , .halt_check =BRANCH_HALT ,@@ -471,7 +485,7 @@ static struct clk_branch disp_cc_mdss_edp_link_intf_clk = { .hw.init = &(struct clk_init_data){ .name ="disp_cc_mdss_edp_link_intf_clk" , .parent_hws = (const struct clk_hw *[]){ - &disp_cc_mdss_edp_link_clk_src.clkr.hw, + &disp_cc_mdss_edp_link_div_clk_src.clkr.hw, }, .num_parents =1 , .flags =CLK_GET_RATE_NOCACHE ,@@ -1175,6 +1189,7 @@ static struct clk_regmap *disp_cc_sm8250_clocks[] = { [DISP_CC_MDSS_EDP_GTC_CLK_SRC] = &disp_cc_mdss_edp_gtc_clk_src.clkr, [DISP_CC_MDSS_EDP_LINK_CLK] = &disp_cc_mdss_edp_link_clk.clkr, [DISP_CC_MDSS_EDP_LINK_CLK_SRC] = &disp_cc_mdss_edp_link_clk_src.clkr, + [DISP_CC_MDSS_EDP_LINK_DIV_CLK_SRC] = &disp_cc_mdss_edp_link_div_clk_src.clkr, [DISP_CC_MDSS_EDP_LINK_INTF_CLK] = &disp_cc_mdss_edp_link_intf_clk.clkr, [DISP_CC_MDSS_EDP_PIXEL_CLK] = &disp_cc_mdss_edp_pixel_clk.clkr, [DISP_CC_MDSS_EDP_PIXEL_CLK_SRC] = &disp_cc_mdss_edp_pixel_clk_src.clkr,@@ -1285,7 +1300,11 @@ static int disp_cc_sm8250_probe(struct platform_device *pdev) &disp_cc_mdss_dp_pixel1_clk_src, &disp_cc_mdss_dp_pixel2_clk_src, &disp_cc_mdss_dp_pixel_clk_src, + &disp_cc_mdss_edp_aux_clk_src, + &disp_cc_mdss_edp_link_clk_src, + &disp_cc_mdss_edp_pixel_clk_src, &disp_cc_mdss_esc0_clk_src, + &disp_cc_mdss_esc1_clk_src, &disp_cc_mdss_mdp_clk_src, &disp_cc_mdss_pclk0_clk_src, &disp_cc_mdss_pclk1_clk_src,@@ -1297,6 +1316,7 @@ static int disp_cc_sm8250_probe(struct platform_device *pdev) &disp_cc_mdss_byte1_div_clk_src, &disp_cc_mdss_dp_link1_div_clk_src, &disp_cc_mdss_dp_link_div_clk_src, + &disp_cc_mdss_edp_link_div_clk_src, };unsigned int i;static bool offset_applied;
Signature · 2 lines
With best wishes Dmitry
Quoted 7 lines · Robert Foss
SM8350 does not have the
EDP_GTCclock, so let's disable it for this SoC.Signed-off-by Robert Foss <[email protected]>--- drivers/clk/qcom/dispcc-sm8250.c | 3 +++ 1 file changed, 3 insertions(+)
Signature · 2 lines
With best wishes Dmitry
Re: [PATCH v1 2/5] clk: qcom: dispcc-sm8250: Add RETAIN_FF_ENABLE flag for mdss_gdsc
In reply to Robert FossQuoted 10 lines · Robert Foss
All SoC supported by this driver supports the
RETAIN_FF_ENABLEflag, so it should be enabled here.This feature enables registers to maintain their state after dis/re-enabling the GDSC.
Signed-off-by Robert Foss <[email protected]>--- drivers/clk/qcom/dispcc-sm8250.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Signature · 2 lines
With best wishes Dmitry
Re: [PATCH v1 2/5] clk: qcom: dispcc-sm8250: Add RETAIN_FF_ENABLE flag for mdss_gdsc
In reply to Robert FossQuoted 8 lines · Robert Foss
All SoC supported by this driver supports the
RETAIN_FF_ENABLEflag, so it should be enabled here.This feature enables registers to maintain their state after dis/re-enabling the GDSC.
Signed-off-by Robert Foss <[email protected]>---
Konrad
Quoted 16 lines
drivers/clk/qcom/dispcc-sm8250.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/clk/qcom/dispcc-sm8250.c +1
-1@@ -1137,7 +1137,7 @@ static struct gdsc mdss_gdsc = { .name = "mdss_gdsc", }, .pwrsts = PWRSTS_OFF_ON, - .flags = HW_CTRL, + .flags = HW_CTRL | RETAIN_FF_ENABLE, }; static struct clk_regmap *disp_cc_sm8250_clocks[] = {
Re: [PATCH v1 3/5] dt-bindings: clock: dispcc-sm8250: Add EDP_LINK_DIV_CLK_SRC index
In reply to Robert FossQuoted 4 lines · Robert Foss
Add this previously missing index, since it is supported by the SoCs targeted by the dispcc-sm8250 driver.
Signed-off-by Robert Foss <[email protected]>
Best regards,
Krzysztof
Re: [PATCH v1 4/5] clk: qcom: dispcc-sm8250: Add missing EDP clocks for sm8350
In reply to Dmitry BaryshkovQuoted 8 lines · Dmitry Baryshkov
Quoted 2 lines · Robert Foss
SM8350 supports embedded displayport, but the clocks for this were previously not enabled.
I'd say 'not accounted for' instead. Bjorn has added eDP clocks, but they were following the 8150 (no
div_clk_src) and the offsets were not updated.
Ack.
Quoted 74 lines
Quoted 62 lines
Signed-off-by Robert Foss <[email protected]>--- drivers/clk/qcom/dispcc-sm8250.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-)drivers/clk/qcom/dispcc-sm8250.c +20
-1@@ -462,6 +462,20 @@ static struct clk_branch disp_cc_mdss_edp_link_clk = { }, }; +static struct clk_regmap_div disp_cc_mdss_edp_link_div_clk_src = { + .reg =0x2288 , + .shift =0 , + .width =2 , + .clkr.hw.init = &(struct clk_init_data ) { + .name ="disp_cc_mdss_edp_link_div_clk_src" , + .parent_hws = (const struct clk_hw *[]){ + &disp_cc_mdss_edp_link_clk_src.clkr.hw, + }, + .num_parents =1 , + .ops = &clk_regmap_div_ro_ops, + }, +}; +static struct clk_branch disp_cc_mdss_edp_link_intf_clk = { .halt_reg =0x2074 , .halt_check =BRANCH_HALT ,@@ -471,7 +485,7 @@ static struct clk_branch disp_cc_mdss_edp_link_intf_clk = { .hw.init = &(struct clk_init_data){ .name ="disp_cc_mdss_edp_link_intf_clk" , .parent_hws = (const struct clk_hw *[]){ - &disp_cc_mdss_edp_link_clk_src.clkr.hw, + &disp_cc_mdss_edp_link_div_clk_src.clkr.hw, }, .num_parents =1 , .flags =CLK_GET_RATE_NOCACHE ,@@ -1175,6 +1189,7 @@ static struct clk_regmap *disp_cc_sm8250_clocks[] = { [DISP_CC_MDSS_EDP_GTC_CLK_SRC] = &disp_cc_mdss_edp_gtc_clk_src.clkr, [DISP_CC_MDSS_EDP_LINK_CLK] = &disp_cc_mdss_edp_link_clk.clkr, [DISP_CC_MDSS_EDP_LINK_CLK_SRC] = &disp_cc_mdss_edp_link_clk_src.clkr, + [DISP_CC_MDSS_EDP_LINK_DIV_CLK_SRC] = &disp_cc_mdss_edp_link_div_clk_src.clkr, [DISP_CC_MDSS_EDP_LINK_INTF_CLK] = &disp_cc_mdss_edp_link_intf_clk.clkr, [DISP_CC_MDSS_EDP_PIXEL_CLK] = &disp_cc_mdss_edp_pixel_clk.clkr, [DISP_CC_MDSS_EDP_PIXEL_CLK_SRC] = &disp_cc_mdss_edp_pixel_clk_src.clkr,@@ -1285,7 +1300,11 @@ static int disp_cc_sm8250_probe(struct platform_device *pdev) &disp_cc_mdss_dp_pixel1_clk_src, &disp_cc_mdss_dp_pixel2_clk_src, &disp_cc_mdss_dp_pixel_clk_src, + &disp_cc_mdss_edp_aux_clk_src, + &disp_cc_mdss_edp_link_clk_src, + &disp_cc_mdss_edp_pixel_clk_src, &disp_cc_mdss_esc0_clk_src, + &disp_cc_mdss_esc1_clk_src, &disp_cc_mdss_mdp_clk_src, &disp_cc_mdss_pclk0_clk_src, &disp_cc_mdss_pclk1_clk_src,drivers/clk/qcom/dispcc-sm8250.c static int disp_cc_sm8250_probe(struct platform_device *pdev) · line 1322
Quoted 7 lines
drivers/clk/qcom/dispcc-sm8250.c +1
-0@@ -1297,6 +1316,7 @@ static int disp_cc_sm8250_probe(struct platform_device *pdev) &disp_cc_mdss_byte1_div_clk_src, &disp_cc_mdss_dp_link1_div_clk_src, &disp_cc_mdss_dp_link_div_clk_src, + &disp_cc_mdss_edp_link_div_clk_src, };unsigned int i;static bool offset_applied;--
With best wishes
Dmitry