SM8150 and SM8250 dispcc drivers
Subsystems (5)
v3 cover SM8150 and SM8250 dispcc drivers
Add display clock drivers required to get DSI and DP displays working on SM8150 and SM8250 SoCs.
Derived from downstream drivers. Notable changes compared to downstream:
- EDP clks removed (nothing uses these even in downstream it seems)
- freq_tbl values for dp_link clk is in Hz and not kHz
v2:
- updated dts example to reflect the change (first patch)
- updated config_ctl_hi1_val in sm8250 dispcc to latest downstream
v3:
- combined dt-binding: "gcc_disp_gpll0_clk_src" is needed by sc7180 too
- use the right order in drivers/clk/qcom/Kconfig
Jonathan Marek (7):
dt-bindings: clock: sdm845-dispcc: same name for dp_phy clocks as
sc7180
arm64: dts: qcom: sdm845-dispcc: same name for dp_phy clocks as sc7180
dt-bindings: clock: combine qcom,sdm845-dispcc and qcom,sc7180-dispcc
dt-bindings: clock: Introduce QCOM SM8150 display clock bindings
dt-bindings: clock: Introduce QCOM SM8250 display clock bindings
clk: qcom: Add display clock controller driver for SM8150
clk: qcom: Add display clock controller driver for SM8250
...om,sdm845-dispcc.yaml => qcom,dispcc.yaml} | 32 +-
.../bindings/clock/qcom,sc7180-dispcc.yaml | 86 --
arch/arm64/boot/dts/qcom/sdm845.dtsi | 4 +-
drivers/clk/qcom/Kconfig | 18 +
drivers/clk/qcom/Makefile | 2 +
drivers/clk/qcom/dispcc-sm8150.c | 1152 +++++++++++++++++
drivers/clk/qcom/dispcc-sm8250.c | 1100 ++++++++++++++++
.../dt-bindings/clock/qcom,dispcc-sm8150.h | 69 +
.../dt-bindings/clock/qcom,dispcc-sm8250.h | 66 +
9 files changed, 2430 insertions(+), 99 deletions(-)
rename Documentation/devicetree/bindings/clock/{qcom,sdm845-dispcc.yaml => qcom,dispcc.yaml} (74%)
delete mode 100644 Documentation/devicetree/bindings/clock/qcom,sc7180-dispcc.yaml
create mode 100644 drivers/clk/qcom/dispcc-sm8150.c
create mode 100644 drivers/clk/qcom/dispcc-sm8250.c
create mode 100644 include/dt-bindings/clock/qcom,dispcc-sm8150.h
create mode 100644 include/dt-bindings/clock/qcom,dispcc-sm8250.hSignature · 1 line
2.26.1
PATCH v3 1/7 dt-bindings: clock: sdm845-dispcc: same name for dp_phy clocks as sc7180
This makes it easier to combine dt bindings for sdm845/sc7180 dispcc.
Note: nothing upstream provides these clocks and the sdm845 dispcc driver hasn't switched to using .fw_name for these clocks (these properties are ignored), so changing this shouldn't be a problem.
--- .../devicetree/bindings/clock/qcom,sdm845-dispcc.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
Documentation/devicetree/bindings/clock/qcom,sdm845-dispcc.yaml +4 -4
@@ -43,8 +43,8 @@ properties: - const: dsi0_phy_pll_out_dsiclk - const: dsi1_phy_pll_out_byteclk - const: dsi1_phy_pll_out_dsiclk - - const: dp_link_clk_divsel_ten - - const: dp_vco_divided_clk_src_mux + - const: dp_phy_pll_link_clk + - const: dp_phy_pll_vco_div_clk '#clock-cells': const: 1
@@ -92,8 +92,8 @@ examples: "dsi0_phy_pll_out_dsiclk", "dsi1_phy_pll_out_byteclk", "dsi1_phy_pll_out_dsiclk", - "dp_link_clk_divsel_ten", - "dp_vco_divided_clk_src_mux"; + "dp_phy_pll_link_clk", + "dp_phy_pll_vco_div_clk"; #clock-cells = <1>; #reset-cells = <1>; #power-domain-cells = <1>;
Signature · 1 line
2.26.1
Re: [PATCH v3 1/7] dt-bindings: clock: sdm845-dispcc: same name for dp_phy clocks as sc7180
Quoted 11 lines · Jonathan Marek
This makes it easier to combine dt bindings for sdm845/sc7180 dispcc.
Note: nothing upstream provides these clocks and the sdm845 dispcc driver hasn't switched to using .fw_name for these clocks (these properties are ignored), so changing this shouldn't be a problem.
Signed-off-by Jonathan Marek <[email protected]>--- .../devicetree/bindings/clock/qcom,sdm845-dispcc.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
PATCH v3 2/7 arm64: dts: qcom: sdm845-dispcc: same name for dp_phy clocks as sc7180
In reply to Jonathan MarekThis makes it easier to combine dt bindings for sdm845/sc7180 dispcc.
Note: nothing upstream provides these clocks and the sdm845 dispcc driver hasn't switched to using .fw_name for these clocks (these properties are ignored), so changing this shouldn't be a problem.
--- arch/arm64/boot/dts/qcom/sdm845.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/qcom/sdm845.dtsi +2 -2
@@ -4139,8 +4139,8 @@ dispcc: clock-controller@af00000 { "dsi0_phy_pll_out_dsiclk", "dsi1_phy_pll_out_byteclk", "dsi1_phy_pll_out_dsiclk", - "dp_link_clk_divsel_ten", - "dp_vco_divided_clk_src_mux"; + "dp_phy_pll_link_clk", + "dp_phy_pll_vco_div_clk"; #clock-cells = <1>; #reset-cells = <1>; #power-domain-cells = <1>;
Signature · 1 line
2.26.1
PATCH v3 3/7 dt-bindings: clock: combine qcom,sdm845-dispcc and qcom,sc7180-dispcc
In reply to Jonathan MarekThese two bindings are almost identical, so combine them into one. This will make it easier to add the sm8150 and sm8250 dispcc bindings.
---
...om,sdm845-dispcc.yaml => qcom,dispcc.yaml} | 18 ++--
.../bindings/clock/qcom,sc7180-dispcc.yaml | 86 -------------------
2 files changed, 12 insertions(+), 92 deletions(-)
rename Documentation/devicetree/bindings/clock/{qcom,sdm845-dispcc.yaml => qcom,dispcc.yaml} (86%)
delete mode 100644 Documentation/devicetree/bindings/clock/qcom,sc7180-dispcc.yamlDocumentation/devicetree/bindings/clock/qcom,dispcc.yaml renamed from Documentation/devicetree/bindings/clock/qcom,sdm845-dispcc.yaml +12 -6
@@ -1,32 +1,37 @@ # SPDX-License-Identifier: GPL-2.0-only %YAML 1.2 --- -$id: http://devicetree.org/schemas/clock/qcom,sdm845-dispcc.yaml# +$id: http://devicetree.org/schemas/clock/qcom,dispcc.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# -title: Qualcomm Display Clock & Reset Controller Binding for SDM845 +title: Qualcomm Display Clock & Reset Controller Binding maintainers: - Taniya Das <[email protected]> description: | Qualcomm display clock control module which supports the clocks, resets and - power domains on SDM845. + power domains on SDM845/SC7180. - See also dt-bindings/clock/qcom,dispcc-sdm845.h. + See also: + dt-bindings/clock/qcom,dispcc-sdm845.h + dt-bindings/clock/qcom,dispcc-sc7180.h properties: compatible: - const: qcom,sdm845-dispcc + enum: + - qcom,sdm845-dispcc + - qcom,sc7180-dispcc # NOTE: sdm845.dtsi existed for quite some time and specified no clocks. # The code had to use hardcoded mechanisms to find the input clocks. # New dts files should have these clocks. clocks: + minItems: 8 items: - description: Board XO source - description: GPLL0 source from GCC - - description: GPLL0 div source from GCC + - description: GPLL0 div source from GCC (sdm845 only) - description: Byte clock from DSI PHY0 - description: Pixel clock from DSI PHY0 - description: Byte clock from DSI PHY1
@@ -35,6 +40,7 @@ properties: - description: VCO DIV clock from DP PHY clock-names: + minItems: 8 items: - const: bi_tcxo - const: gcc_disp_gpll0_clk_src
Documentation/devicetree/bindings/clock/qcom,sc7180-dispcc.yaml deleted +0 -86
86 lines not on this page · raw message
Signature · 1 line
2.26.1
Stephen Boyd
maintainerRe: [PATCH v3 3/7] dt-bindings: clock: combine qcom,sdm845-dispcc and qcom,sc7180-dispcc
Quoting Jonathan Marek (2020-09-11 08:34:03)
Quoted 2 lines
These two bindings are almost identical, so combine them into one. This will make it easier to add the sm8150 and sm8250 dispcc bindings.
Why not just add the sm8150 and sm8250 to the sc7180 binding?
Quoted 29 lines
Signed-off-by Jonathan Marek <[email protected]>--- ...om,sdm845-dispcc.yaml => qcom,dispcc.yaml} | 18 ++-- .../bindings/clock/qcom,sc7180-dispcc.yaml | 86 ------------------- 2 files changed, 12 insertions(+), 92 deletions(-) rename Documentation/devicetree/bindings/clock/{qcom,sdm845-dispcc.yaml => qcom,dispcc.yaml} (86%) delete mode 100644 Documentation/devicetree/bindings/clock/qcom,sc7180-dispcc.yamlDocumentation/devicetree/bindings/clock/qcom,dispcc.yaml renamed from Documentation/devicetree/bindings/clock/qcom,sdm845-dispcc.yaml +2
-2@@ -1,32 +1,37 @@ # SPDX-License-Identifier: GPL-2.0-only %YAML 1.2 --- -$id: http://devicetree.org/schemas/clock/qcom,sdm845-dispcc.yaml# +$id: http://devicetree.org/schemas/clock/qcom,dispcc.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# -title: Qualcomm Display Clock & Reset Controller Binding for SDM845 +title: Qualcomm Display Clock & Reset Controller Binding maintainers: - Taniya Das <[email protected]>
Documentation/devicetree/bindings/clock/qcom,dispcc.yaml line 18
Quoted 10 lines
Documentation/devicetree/bindings/clock/qcom,dispcc.yaml renamed from Documentation/devicetree/bindings/clock/qcom,sdm845-dispcc.yaml +4
-2description: | Qualcomm display clock control module which supports the clocks, resets and - power domains on SDM845. + power domains on SDM845/SC7180. - See also dt-bindings/clock/qcom,dispcc-sdm845.h. + See also: + dt-bindings/clock/qcom,dispcc-sdm845.h + dt-bindings/clock/qcom,dispcc-sc7180.h
Sort please.
Documentation/devicetree/bindings/clock/qcom,dispcc.yaml line 24
Quoted 7 lines
Documentation/devicetree/bindings/clock/qcom,dispcc.yaml renamed from Documentation/devicetree/bindings/clock/qcom,sdm845-dispcc.yaml +3
-1properties: compatible: - const: qcom,sdm845-dispcc + enum: + - qcom,sdm845-dispcc + - qcom,sc7180-dispcc
Sort please.
Documentation/devicetree/bindings/clock/qcom,dispcc.yaml line 34
Quoted 11 lines
Documentation/devicetree/bindings/clock/qcom,dispcc.yaml renamed from Documentation/devicetree/bindings/clock/qcom,sdm845-dispcc.yaml +2
-1# NOTE: sdm845.dtsi existed for quite some time and specified no clocks. # The code had to use hardcoded mechanisms to find the input clocks. # New dts files should have these clocks. clocks: + minItems: 8 items: - description: Board XO source - description: GPLL0 source from GCC - - description: GPLL0 div source from GCC + - description: GPLL0 div source from GCC (sdm845 only)
They're not the same. Why are we combining them?
Quoted 11 lines
Documentation/devicetree/bindings/clock/qcom,dispcc.yaml renamed from Documentation/devicetree/bindings/clock/qcom,sdm845-dispcc.yaml +1
-0- description: Byte clock from DSI PHY0 - description: Pixel clock from DSI PHY0 - description: Byte clock from DSI PHY1@@ -35,6 +40,7 @@ properties: - description: VCO DIV clock from DP PHY clock-names: + minItems: 8 items: - const: bi_tcxo - const: gcc_disp_gpll0_clk_src
PATCH v3 4/7 dt-bindings: clock: Introduce QCOM SM8150 display clock bindings
In reply to Jonathan MarekAdd device tree bindings for display clock controller for Qualcomm Technology Inc's SM8150 SoCs.
--- .../bindings/clock/qcom,dispcc.yaml | 10 +-- .../dt-bindings/clock/qcom,dispcc-sm8150.h | 69 +++++++++++++++++++ 2 files changed, 75 insertions(+), 4 deletions(-) create mode 100644 include/dt-bindings/clock/qcom,dispcc-sm8150.h
Documentation/devicetree/bindings/clock/qcom,dispcc.yaml +6 -4
@@ -11,26 +11,28 @@ maintainers: description: | Qualcomm display clock control module which supports the clocks, resets and - power domains on SDM845/SC7180. + power domains on SDM845/SC7180/SM8150. See also: dt-bindings/clock/qcom,dispcc-sdm845.h dt-bindings/clock/qcom,dispcc-sc7180.h + dt-bindings/clock/qcom,dispcc-sm8150.h properties: compatible: enum: - qcom,sdm845-dispcc - qcom,sc7180-dispcc + - qcom,sm8150-dispcc # NOTE: sdm845.dtsi existed for quite some time and specified no clocks. # The code had to use hardcoded mechanisms to find the input clocks. # New dts files should have these clocks. clocks: - minItems: 8 + minItems: 7 items: - description: Board XO source - - description: GPLL0 source from GCC + - description: GPLL0 source from GCC (sdm845/sc7180 only) - description: GPLL0 div source from GCC (sdm845 only) - description: Byte clock from DSI PHY0 - description: Pixel clock from DSI PHY0
@@ -40,7 +42,7 @@ properties: - description: VCO DIV clock from DP PHY clock-names: - minItems: 8 + minItems: 7 items: - const: bi_tcxo - const: gcc_disp_gpll0_clk_src
include/dt-bindings/clock/qcom,dispcc-sm8150.h new file +69 -0
69 lines not on this page · raw message
Signature · 1 line
2.26.1
PATCH v3 5/7 dt-bindings: clock: Introduce QCOM SM8250 display clock bindings
In reply to Jonathan MarekAdd device tree bindings for display clock controller for Qualcomm Technology Inc's SM8250 SoCs.
--- .../bindings/clock/qcom,dispcc.yaml | 4 +- .../dt-bindings/clock/qcom,dispcc-sm8250.h | 66 +++++++++++++++++++ 2 files changed, 69 insertions(+), 1 deletion(-) create mode 100644 include/dt-bindings/clock/qcom,dispcc-sm8250.h
Documentation/devicetree/bindings/clock/qcom,dispcc.yaml +3 -1
@@ -11,12 +11,13 @@ maintainers: description: | Qualcomm display clock control module which supports the clocks, resets and - power domains on SDM845/SC7180/SM8150. + power domains on SDM845/SC7180/SM8150/SM8250. See also: dt-bindings/clock/qcom,dispcc-sdm845.h dt-bindings/clock/qcom,dispcc-sc7180.h dt-bindings/clock/qcom,dispcc-sm8150.h + dt-bindings/clock/qcom,dispcc-sm8250.h properties: compatible:
@@ -24,6 +25,7 @@ properties: - qcom,sdm845-dispcc - qcom,sc7180-dispcc - qcom,sm8150-dispcc + - qcom,sm8250-dispcc # NOTE: sdm845.dtsi existed for quite some time and specified no clocks. # The code had to use hardcoded mechanisms to find the input clocks.
include/dt-bindings/clock/qcom,dispcc-sm8250.h new file +66 -0
66 lines not on this page · raw message
Signature · 1 line
2.26.1
Stephen Boyd
maintainerRe: [PATCH v3 5/7] dt-bindings: clock: Introduce QCOM SM8250 display clock bindings
Quoting Jonathan Marek (2020-09-11 08:34:05)
Quoted 5 lines
Add device tree bindings for display clock controller for Qualcomm Technology Inc's SM8250 SoCs.
Signed-off-by Jonathan Marek <[email protected]>---
Or it really looks like we should introduce an sm8150/sm8250 binding doc. Who cares if it is mostly the same? When using git format-patch it may be possible to see that it's a copy of another doc to minimize the diff.
Quoted 5 lines
.../bindings/clock/qcom,dispcc.yaml | 4 +- .../dt-bindings/clock/qcom,dispcc-sm8250.h | 66 +++++++++++++++++++ 2 files changed, 69 insertions(+), 1 deletion(-) create mode 100644 include/dt-bindings/clock/qcom,dispcc-sm8250.h
PATCH v3 6/7 clk: qcom: Add display clock controller driver for SM8150
In reply to Jonathan MarekAdd support for the display clock controller found on SM8150 based devices. This would allow display drivers to probe and control their clocks.
--- drivers/clk/qcom/Kconfig | 9 + drivers/clk/qcom/Makefile | 1 + drivers/clk/qcom/dispcc-sm8150.c | 1152 ++++++++++++++++++++++++++++++ 3 files changed, 1162 insertions(+) create mode 100644 drivers/clk/qcom/dispcc-sm8150.c
drivers/clk/qcom/Kconfig +9 -0
@@ -413,6 +413,15 @@ config SDM_LPASSCC_845 Say Y if you want to use the LPASS branch clocks of the LPASS clock controller to reset the LPASS subsystem. +config SM_DISPCC_8150 + tristate "SM8150 Display Clock Controller" + select SM_GCC_8150 + help + Support for the display clock controller on Qualcomm Technologies, Inc + SM8150 devices. + Say Y if you want to support display devices and functionality such as + splash screen. + config SM_GCC_8150 tristate "SM8150 Global Clock Controller" help
drivers/clk/qcom/Makefile +1 -0
@@ -64,6 +64,7 @@ obj-$(CONFIG_SDM_GCC_845) += gcc-sdm845.o obj-$(CONFIG_SDM_GPUCC_845) += gpucc-sdm845.o obj-$(CONFIG_SDM_LPASSCC_845) += lpasscc-sdm845.o obj-$(CONFIG_SDM_VIDEOCC_845) += videocc-sdm845.o +obj-$(CONFIG_SM_DISPCC_8150) += dispcc-sm8150.o obj-$(CONFIG_SM_GCC_8150) += gcc-sm8150.o obj-$(CONFIG_SM_GCC_8250) += gcc-sm8250.o obj-$(CONFIG_SM_GPUCC_8150) += gpucc-sm8150.o
drivers/clk/qcom/dispcc-sm8150.c new file +1152 -0
1,152 lines not on this page · raw message
Signature · 1 line
2.26.1
Stephen Boyd
maintainerRe: [PATCH v3 6/7] clk: qcom: Add display clock controller driver for SM8150
Quoting Jonathan Marek (2020-09-11 08:34:06)
Quoted 11 lines
Add support for the display clock controller found on SM8150 based devices. This would allow display drivers to probe and control their clocks.
Signed-off-by Jonathan Marek <[email protected]>--- drivers/clk/qcom/Kconfig | 9 + drivers/clk/qcom/Makefile | 1 + drivers/clk/qcom/dispcc-sm8150.c | 1152 ++++++++++++++++++++++++++++++ 3 files changed, 1162 insertions(+) create mode 100644 drivers/clk/qcom/dispcc-sm8150.c
If the bindings are the same for these two drivers I wonder if there is anything different between the two. Maybe the two drivers can be one driver?
Re: [PATCH v3 6/7] clk: qcom: Add display clock controller driver for SM8150
Quoted 13 lines · Stephen Boyd
Quoting Jonathan Marek (2020-09-11 08:34:06)
Quoted 11 lines
Add support for the display clock controller found on SM8150 based devices. This would allow display drivers to probe and control their clocks.
Signed-off-by Jonathan Marek <[email protected]>--- drivers/clk/qcom/Kconfig | 9 + drivers/clk/qcom/Makefile | 1 + drivers/clk/qcom/dispcc-sm8150.c | 1152 ++++++++++++++++++++++++++++++ 3 files changed, 1162 insertions(+)create mode 100644
drivers/clk/qcom/dispcc-sm8150.c
Quoted 4 lines
If the bindings are the same for these two drivers I wonder if there is anything different between the two. Maybe the two drivers can be one driver?
Possibly, the biggest difference seems to be the plls (trion vs lucid, different config), which could be resolved in the probe() function. If you think combining the drivers is the right thing to do then I can do that.
Stephen Boyd
maintainerRe: [PATCH v3 6/7] clk: qcom: Add display clock controller driver for SM8150
Quoting Jonathan Marek (2020-09-23 09:24:04)
Quoted 14 lines · Stephen Boyd
Quoted 13 lines
Quoting Jonathan Marek (2020-09-11 08:34:06)
Quoted 11 lines
Add support for the display clock controller found on SM8150 based devices. This would allow display drivers to probe and control their clocks.
Signed-off-by Jonathan Marek <[email protected]>--- drivers/clk/qcom/Kconfig | 9 + drivers/clk/qcom/Makefile | 1 + drivers/clk/qcom/dispcc-sm8150.c | 1152 ++++++++++++++++++++++++++++++ 3 files changed, 1162 insertions(+)create mode 100644
drivers/clk/qcom/dispcc-sm8150.c
Quoted 8 lines
Quoted 4 lines
If the bindings are the same for these two drivers I wonder if there is anything different between the two. Maybe the two drivers can be one driver?
Possibly, the biggest difference seems to be the plls (trion vs lucid, different config), which could be resolved in the
probe()function. If you think combining the drivers is the right thing to do then I can do that.
If that's the main difference then it sounds OK to merge the two.
PATCH v3 7/7 clk: qcom: Add display clock controller driver for SM8250
In reply to Jonathan MarekAdd support for the display clock controller found on SM8250 based devices. This would allow display drivers to probe and control their clocks.
--- drivers/clk/qcom/Kconfig | 9 + drivers/clk/qcom/Makefile | 1 + drivers/clk/qcom/dispcc-sm8250.c | 1100 ++++++++++++++++++++++++++++++ 3 files changed, 1110 insertions(+) create mode 100644 drivers/clk/qcom/dispcc-sm8250.c
drivers/clk/qcom/Kconfig +9 -0
@@ -422,6 +422,15 @@ config SM_DISPCC_8150 Say Y if you want to support display devices and functionality such as splash screen. +config SM_DISPCC_8250 + tristate "SM8250 Display Clock Controller" + select SM_GCC_8250 + help + Support for the display clock controller on Qualcomm Technologies, Inc + SM8250 devices. + Say Y if you want to support display devices and functionality such as + splash screen. + config SM_GCC_8150 tristate "SM8150 Global Clock Controller" help
drivers/clk/qcom/Makefile +1 -0
@@ -65,6 +65,7 @@ obj-$(CONFIG_SDM_GPUCC_845) += gpucc-sdm845.o obj-$(CONFIG_SDM_LPASSCC_845) += lpasscc-sdm845.o obj-$(CONFIG_SDM_VIDEOCC_845) += videocc-sdm845.o obj-$(CONFIG_SM_DISPCC_8150) += dispcc-sm8150.o +obj-$(CONFIG_SM_DISPCC_8250) += dispcc-sm8250.o obj-$(CONFIG_SM_GCC_8150) += gcc-sm8150.o obj-$(CONFIG_SM_GCC_8250) += gcc-sm8250.o obj-$(CONFIG_SM_GPUCC_8150) += gpucc-sm8150.o
drivers/clk/qcom/dispcc-sm8250.c new file +1100 -0
1,100 lines not on this page · raw message
Signature · 1 line
2.26.1
Stephen Boyd
maintainerRe: [PATCH v3 7/7] clk: qcom: Add display clock controller driver for SM8250
Quoting Jonathan Marek (2020-09-11 08:34:07)
Quoted 11 lines
drivers/clk/qcom/dispcc-sm8250.c new file +5
-0@@ -0,0 +1,1100 @@ +// SPDX-License-Identifier: GPL-2.0 +/* +* Copyright (c) 2018-2020, The Linux Foundation. All rights reserved. +*/ +
[...]
drivers/clk/qcom/dispcc-sm8250.c line 166
Quoted 5 lines
drivers/clk/qcom/dispcc-sm8250.c new file +5
-0+ +static const struct clk_parent_data disp_cc_parent_data_6[] = { + { .fw_name ="bi_tcxo" }, + { .fw_name ="dsi0_phy_pll_out_dsiclk" }, + { .fw_name ="dsi1_phy_pll_out_dsiclk" },
Can we remove clk postfix on these clk names?
Quoted 29 lines
drivers/clk/qcom/dispcc-sm8250.c new file +29
-0+}; + +static const struct freq_tbl ftbl_disp_cc_mdss_ahb_clk_src[] = { +F (19200000 ,P_BI_TCXO ,1 ,0 ,0 ), +F (37500000 ,P_DISP_CC_PLL1_OUT_MAIN ,16 ,0 ,0 ), +F (75000000 ,P_DISP_CC_PLL1_OUT_MAIN ,8 ,0 ,0 ), + { } +}; + +static struct clk_rcg2 disp_cc_mdss_ahb_clk_src = { + .cmd_rcgr =0x22bc , + .mnd_width =0 , + .hid_width =5 , + .parent_map = disp_cc_parent_map_3, + .freq_tbl = ftbl_disp_cc_mdss_ahb_clk_src, + .clkr.hw.init = &(struct clk_init_data ){ + .name ="disp_cc_mdss_ahb_clk_src" , + .parent_data = disp_cc_parent_data_3, + .num_parents =ARRAY_SIZE (disp_cc_parent_data_3), + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_rcg2_shared_ops, + }, +}; + +static const struct freq_tbl ftbl_disp_cc_mdss_byte0_clk_src[] = { +F (19200000 ,P_BI_TCXO ,1 ,0 ,0 ), + { } +}; +
drivers/clk/qcom/dispcc-sm8250.c line 205
Quoted 10 lines
drivers/clk/qcom/dispcc-sm8250.c new file +10
-0+static struct clk_rcg2 disp_cc_mdss_byte0_clk_src = { + .cmd_rcgr =0x2110 , + .mnd_width =0 , + .hid_width =5 , + .parent_map = disp_cc_parent_map_2, + .clkr.hw.init = &(struct clk_init_data ){ + .name ="disp_cc_mdss_byte0_clk_src" , + .parent_data = disp_cc_parent_data_2, + .num_parents =ARRAY_SIZE (disp_cc_parent_data_2), + .flags =CLK_SET_RATE_PARENT |CLK_GET_RATE_NOCACHE ,
Why do we need CLK_GET_RATE_NOCACHE? Please remove it.
Quoted 87 lines
drivers/clk/qcom/dispcc-sm8250.c new file +87
-0+ .ops = &clk_byte2_ops, + }, +}; + +static struct clk_rcg2 disp_cc_mdss_byte1_clk_src = { + .cmd_rcgr =0x212c , + .mnd_width =0 , + .hid_width =5 , + .parent_map = disp_cc_parent_map_2, + .clkr.hw.init = &(struct clk_init_data ){ + .name ="disp_cc_mdss_byte1_clk_src" , + .parent_data = disp_cc_parent_data_2, + .num_parents =ARRAY_SIZE (disp_cc_parent_data_2), + .flags =CLK_SET_RATE_PARENT |CLK_GET_RATE_NOCACHE , + .ops = &clk_byte2_ops, + }, +}; + +static struct clk_rcg2 disp_cc_mdss_dp_aux1_clk_src = { + .cmd_rcgr =0x2240 , + .mnd_width =0 , + .hid_width =5 , + .parent_map = disp_cc_parent_map_1, + .freq_tbl = ftbl_disp_cc_mdss_byte0_clk_src, + .clkr.hw.init = &(struct clk_init_data ){ + .name ="disp_cc_mdss_dp_aux1_clk_src" , + .parent_data = disp_cc_parent_data_1, + .num_parents =ARRAY_SIZE (disp_cc_parent_data_1), + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_rcg2_ops, + }, +}; + +static struct clk_rcg2 disp_cc_mdss_dp_aux_clk_src = { + .cmd_rcgr =0x21dc , + .mnd_width =0 , + .hid_width =5 , + .parent_map = disp_cc_parent_map_1, + .freq_tbl = ftbl_disp_cc_mdss_byte0_clk_src, + .clkr.hw.init = &(struct clk_init_data ){ + .name ="disp_cc_mdss_dp_aux_clk_src" , + .parent_data = disp_cc_parent_data_1, + .num_parents =ARRAY_SIZE (disp_cc_parent_data_1), + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_rcg2_ops, + }, +}; + +static const struct freq_tbl ftbl_disp_cc_mdss_dp_link1_clk_src[] = { +F (162000000 ,P_DP_PHY_PLL_LINK_CLK ,1 ,0 ,0 ), +F (270000000 ,P_DP_PHY_PLL_LINK_CLK ,1 ,0 ,0 ), +F (540000000 ,P_DP_PHY_PLL_LINK_CLK ,1 ,0 ,0 ), +F (810000000 ,P_DP_PHY_PLL_LINK_CLK ,1 ,0 ,0 ), + { } +}; + +static struct clk_rcg2 disp_cc_mdss_dp_link1_clk_src = { + .cmd_rcgr =0x220c , + .mnd_width =0 , + .hid_width =5 , + .parent_map = disp_cc_parent_map_0, + .freq_tbl = ftbl_disp_cc_mdss_dp_link1_clk_src, + .clkr.hw.init = &(struct clk_init_data ){ + .name ="disp_cc_mdss_dp_link1_clk_src" , + .parent_data = disp_cc_parent_data_0, + .num_parents =ARRAY_SIZE (disp_cc_parent_data_0), + .flags =CLK_SET_RATE_PARENT |CLK_GET_RATE_NOCACHE , + .ops = &clk_rcg2_ops, + }, +}; + +static struct clk_rcg2 disp_cc_mdss_dp_link_clk_src = { + .cmd_rcgr =0x2178 , + .mnd_width =0 , + .hid_width =5 , + .parent_map = disp_cc_parent_map_0, + .freq_tbl = ftbl_disp_cc_mdss_dp_link1_clk_src, + .clkr.hw.init = &(struct clk_init_data ){ + .name ="disp_cc_mdss_dp_link_clk_src" , + .parent_data = disp_cc_parent_data_0, + .num_parents =ARRAY_SIZE (disp_cc_parent_data_0), + .flags =CLK_SET_RATE_PARENT |CLK_GET_RATE_NOCACHE , + .ops = &clk_rcg2_ops, + }, +}; + +static struct clk_rcg2 disp_cc_mdss_dp_pixel1_clk_src = {
drivers/clk/qcom/dispcc-sm8250.c line 302
Quoted 10 lines
drivers/clk/qcom/dispcc-sm8250.c new file +10
-0+ .cmd_rcgr = 0x21c4, + .mnd_width = 16, + .hid_width = 5, + .parent_map = disp_cc_parent_map_0, + .clkr.hw.init = &(struct clk_init_data ){ + .name ="disp_cc_mdss_dp_pixel1_clk_src" , + .parent_data = disp_cc_parent_data_0, + .num_parents =ARRAY_SIZE (disp_cc_parent_data_0), + .flags =CLK_SET_RATE_PARENT |CLK_GET_RATE_NOCACHE , + .ops = &clk_dp_ops,
This is affected by the patch I just applied 355a7d754b92 ("clk: qcom:
dispcc: Update DP clk ops for phy design"). Please resend.
Quoted 17 lines
drivers/clk/qcom/dispcc-sm8250.c new file +17
-0+ }, +}; + +static struct clk_rcg2 disp_cc_mdss_dp_pixel2_clk_src = { + .cmd_rcgr =0x21f4 , + .mnd_width =16 , + .hid_width =5 , + .parent_map = disp_cc_parent_map_0, + .clkr.hw.init = &(struct clk_init_data ){ + .name ="disp_cc_mdss_dp_pixel2_clk_src" , + .parent_data = disp_cc_parent_data_0, + .num_parents =ARRAY_SIZE (disp_cc_parent_data_0), + .flags =CLK_SET_RATE_PARENT |CLK_GET_RATE_NOCACHE , + .ops = &clk_dp_ops, + }, +}; +
Re: [PATCH v3 7/7] clk: qcom: Add display clock controller driver for SM8250
Quoted 13 lines · Stephen Boyd
Quoting Jonathan Marek (2020-09-11 08:34:07)
Quoted 11 lines
drivers/clk/qcom/dispcc-sm8250.c new file +5
-0@@ -0,0 +1,1100 @@ +// SPDX-License-Identifier: GPL-2.0 +/* +* Copyright (c) 2018-2020, The Linux Foundation. All rights reserved. +*/ +[...]
Quoted 8 lines
drivers/clk/qcom/dispcc-sm8250.c line 166
Quoted 5 lines
drivers/clk/qcom/dispcc-sm8250.c new file +5
-0+ +static const struct clk_parent_data disp_cc_parent_data_6[] = { + { .fw_name ="bi_tcxo" }, + { .fw_name ="dsi0_phy_pll_out_dsiclk" }, + { .fw_name ="dsi1_phy_pll_out_dsiclk" },Can we remove clk postfix on these clk names?
This is consistent with the names used in both sdm845 and sc7180 drivers. If this should change then those should be changed too?
Quoted 160 lines
Quoted 29 lines
drivers/clk/qcom/dispcc-sm8250.c new file +29
-0+}; + +static const struct freq_tbl ftbl_disp_cc_mdss_ahb_clk_src[] = { +F (19200000 ,P_BI_TCXO ,1 ,0 ,0 ), +F (37500000 ,P_DISP_CC_PLL1_OUT_MAIN ,16 ,0 ,0 ), +F (75000000 ,P_DISP_CC_PLL1_OUT_MAIN ,8 ,0 ,0 ), + { } +}; + +static struct clk_rcg2 disp_cc_mdss_ahb_clk_src = { + .cmd_rcgr =0x22bc , + .mnd_width =0 , + .hid_width =5 , + .parent_map = disp_cc_parent_map_3, + .freq_tbl = ftbl_disp_cc_mdss_ahb_clk_src, + .clkr.hw.init = &(struct clk_init_data ){ + .name ="disp_cc_mdss_ahb_clk_src" , + .parent_data = disp_cc_parent_data_3, + .num_parents =ARRAY_SIZE (disp_cc_parent_data_3), + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_rcg2_shared_ops, + }, +}; + +static const struct freq_tbl ftbl_disp_cc_mdss_byte0_clk_src[] = { +F (19200000 ,P_BI_TCXO ,1 ,0 ,0 ), + { } +}; +drivers/clk/qcom/dispcc-sm8250.c line 205
Quoted 10 lines
drivers/clk/qcom/dispcc-sm8250.c new file +10
-0+static struct clk_rcg2 disp_cc_mdss_byte0_clk_src = { + .cmd_rcgr =0x2110 , + .mnd_width =0 , + .hid_width =5 , + .parent_map = disp_cc_parent_map_2, + .clkr.hw.init = &(struct clk_init_data ){ + .name ="disp_cc_mdss_byte0_clk_src" , + .parent_data = disp_cc_parent_data_2, + .num_parents =ARRAY_SIZE (disp_cc_parent_data_2), + .flags =CLK_SET_RATE_PARENT |CLK_GET_RATE_NOCACHE ,Why do we need
CLK_GET_RATE_NOCACHE? Please remove it.Quoted 87 lines
drivers/clk/qcom/dispcc-sm8250.c new file +87
-0+ .ops = &clk_byte2_ops, + }, +}; + +static struct clk_rcg2 disp_cc_mdss_byte1_clk_src = { + .cmd_rcgr =0x212c , + .mnd_width =0 , + .hid_width =5 , + .parent_map = disp_cc_parent_map_2, + .clkr.hw.init = &(struct clk_init_data ){ + .name ="disp_cc_mdss_byte1_clk_src" , + .parent_data = disp_cc_parent_data_2, + .num_parents =ARRAY_SIZE (disp_cc_parent_data_2), + .flags =CLK_SET_RATE_PARENT |CLK_GET_RATE_NOCACHE , + .ops = &clk_byte2_ops, + }, +}; + +static struct clk_rcg2 disp_cc_mdss_dp_aux1_clk_src = { + .cmd_rcgr =0x2240 , + .mnd_width =0 , + .hid_width =5 , + .parent_map = disp_cc_parent_map_1, + .freq_tbl = ftbl_disp_cc_mdss_byte0_clk_src, + .clkr.hw.init = &(struct clk_init_data ){ + .name ="disp_cc_mdss_dp_aux1_clk_src" , + .parent_data = disp_cc_parent_data_1, + .num_parents =ARRAY_SIZE (disp_cc_parent_data_1), + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_rcg2_ops, + }, +}; + +static struct clk_rcg2 disp_cc_mdss_dp_aux_clk_src = { + .cmd_rcgr =0x21dc , + .mnd_width =0 , + .hid_width =5 , + .parent_map = disp_cc_parent_map_1, + .freq_tbl = ftbl_disp_cc_mdss_byte0_clk_src, + .clkr.hw.init = &(struct clk_init_data ){ + .name ="disp_cc_mdss_dp_aux_clk_src" , + .parent_data = disp_cc_parent_data_1, + .num_parents =ARRAY_SIZE (disp_cc_parent_data_1), + .flags =CLK_SET_RATE_PARENT , + .ops = &clk_rcg2_ops, + }, +}; + +static const struct freq_tbl ftbl_disp_cc_mdss_dp_link1_clk_src[] = { +F (162000000 ,P_DP_PHY_PLL_LINK_CLK ,1 ,0 ,0 ), +F (270000000 ,P_DP_PHY_PLL_LINK_CLK ,1 ,0 ,0 ), +F (540000000 ,P_DP_PHY_PLL_LINK_CLK ,1 ,0 ,0 ), +F (810000000 ,P_DP_PHY_PLL_LINK_CLK ,1 ,0 ,0 ), + { } +}; + +static struct clk_rcg2 disp_cc_mdss_dp_link1_clk_src = { + .cmd_rcgr =0x220c , + .mnd_width =0 , + .hid_width =5 , + .parent_map = disp_cc_parent_map_0, + .freq_tbl = ftbl_disp_cc_mdss_dp_link1_clk_src, + .clkr.hw.init = &(struct clk_init_data ){ + .name ="disp_cc_mdss_dp_link1_clk_src" , + .parent_data = disp_cc_parent_data_0, + .num_parents =ARRAY_SIZE (disp_cc_parent_data_0), + .flags =CLK_SET_RATE_PARENT |CLK_GET_RATE_NOCACHE , + .ops = &clk_rcg2_ops, + }, +}; + +static struct clk_rcg2 disp_cc_mdss_dp_link_clk_src = { + .cmd_rcgr =0x2178 , + .mnd_width =0 , + .hid_width =5 , + .parent_map = disp_cc_parent_map_0, + .freq_tbl = ftbl_disp_cc_mdss_dp_link1_clk_src, + .clkr.hw.init = &(struct clk_init_data ){ + .name ="disp_cc_mdss_dp_link_clk_src" , + .parent_data = disp_cc_parent_data_0, + .num_parents =ARRAY_SIZE (disp_cc_parent_data_0), + .flags =CLK_SET_RATE_PARENT |CLK_GET_RATE_NOCACHE , + .ops = &clk_rcg2_ops, + }, +}; + +static struct clk_rcg2 disp_cc_mdss_dp_pixel1_clk_src = {drivers/clk/qcom/dispcc-sm8250.c line 302
Quoted 10 lines
drivers/clk/qcom/dispcc-sm8250.c new file +10
-0+ .cmd_rcgr = 0x21c4, + .mnd_width = 16, + .hid_width = 5, + .parent_map = disp_cc_parent_map_0, + .clkr.hw.init = &(struct clk_init_data ){ + .name ="disp_cc_mdss_dp_pixel1_clk_src" , + .parent_data = disp_cc_parent_data_0, + .num_parents =ARRAY_SIZE (disp_cc_parent_data_0), + .flags =CLK_SET_RATE_PARENT |CLK_GET_RATE_NOCACHE , + .ops = &clk_dp_ops,This is affected by the patch I just applied
355a7d754b92("clk: qcom:
dispcc: Update DP clk ops for phy design"). Please resend.Quoted 17 lines
drivers/clk/qcom/dispcc-sm8250.c new file +17
-0+ }, +}; + +static struct clk_rcg2 disp_cc_mdss_dp_pixel2_clk_src = { + .cmd_rcgr =0x21f4 , + .mnd_width =16 , + .hid_width =5 , + .parent_map = disp_cc_parent_map_0, + .clkr.hw.init = &(struct clk_init_data ){ + .name ="disp_cc_mdss_dp_pixel2_clk_src" , + .parent_data = disp_cc_parent_data_0, + .num_parents =ARRAY_SIZE (disp_cc_parent_data_0), + .flags =CLK_SET_RATE_PARENT |CLK_GET_RATE_NOCACHE , + .ops = &clk_dp_ops, + }, +}; +
Stephen Boyd
maintainerRe: [PATCH v3 7/7] clk: qcom: Add display clock controller driver for SM8250
Quoting Jonathan Marek (2020-09-23 09:10:04)
Quoted 23 lines · Stephen Boyd
Quoted 13 lines
Quoting Jonathan Marek (2020-09-11 08:34:07)
Quoted 11 lines
drivers/clk/qcom/dispcc-sm8250.c new file +5
-0@@ -0,0 +1,1100 @@ +// SPDX-License-Identifier: GPL-2.0 +/* +* Copyright (c) 2018-2020, The Linux Foundation. All rights reserved. +*/ +[...]
Quoted 8 lines
drivers/clk/qcom/dispcc-sm8250.c line 166
Quoted 5 lines
drivers/clk/qcom/dispcc-sm8250.c new file +5
-0+ +static const struct clk_parent_data disp_cc_parent_data_6[] = { + { .fw_name ="bi_tcxo" }, + { .fw_name ="dsi0_phy_pll_out_dsiclk" }, + { .fw_name ="dsi1_phy_pll_out_dsiclk" },Can we remove clk postfix on these clk names?
Quoted 2 lines
This is consistent with the names used in both sdm845 and sc7180 drivers. If this should change then those should be changed too?
If DT isn't using it already then it sounds OK to change the other SoCs. Otherwise fix it just for this one.
Re: [PATCH v3 7/7] clk: qcom: Add display clock controller driver for SM8250
Quoted 24 lines · Stephen Boyd
Quoting Jonathan Marek (2020-09-23 09:10:04)
Quoted 23 lines · Stephen Boyd
Quoted 21 lines
Quoting Jonathan Marek (2020-09-11 08:34:07)
Quoted 11 lines
drivers/clk/qcom/dispcc-sm8250.c new file +5
-0@@ -0,0 +1,1100 @@ +// SPDX-License-Identifier: GPL-2.0 +/* +* Copyright (c) 2018-2020, The Linux Foundation. All rights reserved. +*/ +[...]
drivers/clk/qcom/dispcc-sm8250.c line 166
Quoted 5 lines
drivers/clk/qcom/dispcc-sm8250.c new file +5
-0+ +static const struct clk_parent_data disp_cc_parent_data_6[] = { + { .fw_name ="bi_tcxo" }, + { .fw_name ="dsi0_phy_pll_out_dsiclk" }, + { .fw_name ="dsi1_phy_pll_out_dsiclk" },Can we remove clk postfix on these clk names?
Quoted 6 lines
Quoted 2 lines
This is consistent with the names used in both sdm845 and sc7180 drivers. If this should change then those should be changed too?
If DT isn't using it already then it sounds OK to change the other SoCs. Otherwise fix it just for this one.
Both sdm845 and sc7180 DT are using these names. I kept these names in the V4 I just sent, keeping things consistent is a lot more beneficial than dropping 3 extra characters from the DT names.
The sc7180 dispcc driver is recent and has all of these:
- dp_phy_pll_link_clk
- dp_phy_pll_vco_div_clk
- dsi0_phy_pll_out_byteclk
- dsi0_phy_pll_out_dsiclk
So I just can't imagine dropping the clk postfix is actually important.