dispcc-sm8250 misc fixes
v2 cover dispcc-sm8250 misc fixes
Changes since v1:
- Added new a-b/r-b tags
- Improved commit message - Dmitry
- Configure dp/edp link parent_hw for sm8150/sc8180
Robert Foss (5):
clk: qcom: dispcc-sm8250: Disable EDP_GTC for sm8350
clk: qcom: dispcc-sm8250: Add RETAIN_FF_ENABLE flag for mdss_gdsc
dt-bindings: clock: dispcc-sm8250: Add EDP_LINK_DIV_CLK_SRC index
clk: qcom: dispcc-sm8250: Add missing EDP clocks for sm8350
clk: qcom: dispcc-sm8250: Disable link_div_clk_src for sm8150
drivers/clk/qcom/dispcc-sm8250.c | 38 ++++++++++++++++++- .../dt-bindings/clock/qcom,dispcc-sm8250.h | 1 + 2 files changed, 37 insertions(+), 2 deletions(-)
Signature · 1 line
2.34.1
PATCH v2 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 v2 2/5 clk: qcom: dispcc-sm8250: Add RETAIN_FF_ENABLE flag for mdss_gdsc
In reply to Robert FossAll 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 v2 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 v2 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 accounted for.
--- 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
Re: [PATCH v2 4/5] clk: qcom: dispcc-sm8250: Add missing EDP clocks for sm8350
Quoted 7 lines · Robert Foss
SM8350 supports embedded displayport, but the clocks for this were previously not accounted for.
Signed-off-by Robert Foss <[email protected]>--- drivers/clk/qcom/dispcc-sm8250.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-)
Signature · 2 lines
With best wishes Dmitry
PATCH v2 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 | 11 +++++++++++ 1 file changed, 11 insertions(+)
drivers/clk/qcom/dispcc-sm8250.c +11 -0
@@ -1289,6 +1289,17 @@ 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_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; + + 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 v2 5/5] clk: qcom: dispcc-sm8250: Disable link_div_clk_src for sm8150
Quoted 7 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 | 11 +++++++++++ 1 file changed, 11 insertions(+)
Signature · 2 lines
With best wishes Dmitry
Quoted 5 lines · Robert Foss
Changes since v1:
- Added new a-b/r-b tags
- Improved commit message - Dmitry
- Configure dp/edp linkparent_hwfor sm8150/sc8180
Quoted 8 lines
Robert Foss (5):
clk: qcom: dispcc-sm8250: DisableEDP_GTCfor sm8350
clk: qcom: dispcc-sm8250: AddRETAIN_FF_ENABLEflag formdss_gdsc
dt-bindings: clock: dispcc-sm8250: AddEDP_LINK_DIV_CLK_SRCindex
clk: qcom: dispcc-sm8250: Add missing EDP clocks for sm8350
clk: qcom: dispcc-sm8250: Disablelink_div_clk_srcfor sm8150[...]
Applied, thanks!
[1/5] clk: qcom: dispcc-sm8250: Disable EDP_GTC for sm8350
commit: b5f84650fb0d6ebaa48a5f99183de70d32d0b115
[2/5] clk: qcom: dispcc-sm8250: Add RETAIN_FF_ENABLE flag for mdss_gdsc
commit: e1a297a681bc4ab2c5cfe31eb4b59bb6f202035a
[3/5] dt-bindings: clock: dispcc-sm8250: Add EDP_LINK_DIV_CLK_SRC index
commit: c2b6ad72959771730806bbab76aa69e99444bf29
[4/5] clk: qcom: dispcc-sm8250: Add missing EDP clocks for sm8350
commit: 8305ff41c7426b49090b236da659e2e9bb05fcb9
[5/5] clk: qcom: dispcc-sm8250: Disable link_div_clk_src for sm8150
commit: f05dbd1a500661a9e3af59f0690301d031140da7Best regards,
Signature · 1 line
Bjorn Andersson <[email protected]>