mbox series

[v5,0/4] clk: qcom: msm8996: add support for the CBF clock

Message ID 20230410200014.432418-1-dmitry.baryshkov@linaro.org
Headers show
Series clk: qcom: msm8996: add support for the CBF clock | expand

Message

Dmitry Baryshkov April 10, 2023, 8 p.m. UTC
On MSM8996 two CPU clusters are interconnected using the Core Bus
Fabric (CBF). In order for the CPU clusters to function properly, it
should be clocked following the core's frequencies to provide adequate
bandwidth.

Register CBF as a clock (required for CPU to boot) and add a tiny
interconnect layer on top of it to let cpufreq/opp scale the CBF clock.

Changes since v4:
- Fixed typos in commit messages

Changes since v3:
- Dropped merged patches
- Moved interconnect shim to drivers/interconnect/icc-clk.c

Changes since v2:
- Added interconnect-related bindings
- Switched CPU and CBF clocks to RPM_SMD_XO_A_CLK_SRC

Changes since v1:
- Relicensed schema to GPL-2.0 + BSD-2-Clause (Krzysztof)
- Changed clock driver to use parent_hws (Konrad)
- Fixed indentation in CBF clock driver (Konrad)
- Changed MODULE_LICENSE of CBF clock driver to GPL from GPL-v2
- Switched CBF to use RPM_SMD_XO_CLK_SRC as one of the parents
- Enabled RPM_SMD_XO_CLK_SRC on msm8996 platform and switch to it from
  RPM_SMD_BB_CLK1 clock


Dmitry Baryshkov (4):
  dt-bindings: interconnect/msm8996-cbf: add defines to be used by CBF
  interconnect: add clk-based icc provider support
  clk: qcom: cbf-msm8996: scale CBF clock according to the CPUfreq
  arm64: dts: qcom: msm8996: scale CBF clock according to the CPUfreq

 arch/arm64/boot/dts/qcom/msm8996.dtsi         |  51 ++++++
 drivers/clk/qcom/Kconfig                      |   1 +
 drivers/clk/qcom/clk-cbf-8996.c               |  59 +++++-
 drivers/interconnect/Kconfig                  |   6 +
 drivers/interconnect/Makefile                 |   2 +
 drivers/interconnect/icc-clk.c                | 168 ++++++++++++++++++
 .../interconnect/qcom,msm8996-cbf.h           |  12 ++
 include/linux/interconnect-clk.h              |  22 +++
 8 files changed, 320 insertions(+), 1 deletion(-)
 create mode 100644 drivers/interconnect/icc-clk.c
 create mode 100644 include/dt-bindings/interconnect/qcom,msm8996-cbf.h
 create mode 100644 include/linux/interconnect-clk.h

Comments

Yassine Oudjana May 3, 2023, 1:08 p.m. UTC | #1
On Monday, April 10th, 2023 at 11:00 PM, Dmitry Baryshkov <dmitry.baryshkov@linaro.org> wrote:

> On MSM8996 two CPU clusters are interconnected using the Core Bus
> Fabric (CBF). In order for the CPU clusters to function properly, it
> should be clocked following the core's frequencies to provide adequate
> bandwidth.
> 
> Register CBF as a clock (required for CPU to boot) and add a tiny
> interconnect layer on top of it to let cpufreq/opp scale the CBF clock.
> 
> Changes since v4:
> - Fixed typos in commit messages
> 
> Changes since v3:
> - Dropped merged patches
> - Moved interconnect shim to drivers/interconnect/icc-clk.c
> 
> Changes since v2:
> - Added interconnect-related bindings
> - Switched CPU and CBF clocks to RPM_SMD_XO_A_CLK_SRC
> 
> Changes since v1:
> - Relicensed schema to GPL-2.0 + BSD-2-Clause (Krzysztof)
> - Changed clock driver to use parent_hws (Konrad)
> - Fixed indentation in CBF clock driver (Konrad)
> - Changed MODULE_LICENSE of CBF clock driver to GPL from GPL-v2
> - Switched CBF to use RPM_SMD_XO_CLK_SRC as one of the parents
> - Enabled RPM_SMD_XO_CLK_SRC on msm8996 platform and switch to it from
> RPM_SMD_BB_CLK1 clock
> 
> 
> Dmitry Baryshkov (4):
> dt-bindings: interconnect/msm8996-cbf: add defines to be used by CBF
> interconnect: add clk-based icc provider support
> clk: qcom: cbf-msm8996: scale CBF clock according to the CPUfreq
> arm64: dts: qcom: msm8996: scale CBF clock according to the CPUfreq
> 
> arch/arm64/boot/dts/qcom/msm8996.dtsi | 51 ++++++
> drivers/clk/qcom/Kconfig | 1 +
> drivers/clk/qcom/clk-cbf-8996.c | 59 +++++-
> drivers/interconnect/Kconfig | 6 +
> drivers/interconnect/Makefile | 2 +
> drivers/interconnect/icc-clk.c | 168 ++++++++++++++++++
> .../interconnect/qcom,msm8996-cbf.h | 12 ++
> include/linux/interconnect-clk.h | 22 +++
> 8 files changed, 320 insertions(+), 1 deletion(-)
> create mode 100644 drivers/interconnect/icc-clk.c
> create mode 100644 include/dt-bindings/interconnect/qcom,msm8996-cbf.h
> create mode 100644 include/linux/interconnect-clk.h
> 
> --
> 2.30.2

After adding support for MSM8996 Pro [1],

Tested-by: Yassine Oudjana <y.oudjana@protonmail.com>

[1] https://lore.kernel.org/linux-arm-msm/20230503130051.144708-1-y.oudjana@protonmail.com/