mbox series

[v11,0/6] Add interconnect driver for IPQ9574 SoC

Message ID 20240430064214.2030013-1-quic_varada@quicinc.com (mailing list archive)
Headers show
Series Add interconnect driver for IPQ9574 SoC | expand

Message

Varadarajan Narayanan April 30, 2024, 6:42 a.m. UTC
MSM platforms manage NoC related clocks and scaling from RPM.
However, in IPQ SoCs, RPM is not involved in managing NoC
related clocks and there is no NoC scaling.

However, there is a requirement to enable some NoC interface
clocks for the accessing the peripherals present in the
system. Hence add a minimalistic interconnect driver that
establishes a path from the processor/memory to those peripherals
and vice versa.

Change icc-clk driver to take master and slave ids instead
of auto generating.

Currently, drivers/clk/qcom/clk-cbf-8996.c is the only user of
icc-clk. And, it had exactly one master and one slave node.
For this the auto generated master (= 1) and slave (= 0) was
enough.

However, when drivers/clk/qcom/gcc-ipq9574.c wanted to make use
of the icc-clk framework, it had more number of master and slave
nodes and the auto generated ids did not suit the usage.

---
v11:	No code changes
	Commit log changed for the first patch
	Added Acked-By: to 3 patches
v10:	Set gcc-ipq9574 driver's sync_state to icc_sync_state
v9:	Squash icc-clk driver change and cbf-msm8996 change
	Remove HWS_DATA macro
v8:	Change icc-clk driver to take master and slave ids instead
	of auto generating
	Remove ICC_xxx defines from dt-bindings header
	Define MASTER/SLAVE_xxx macros from 0 .. n

v7:	Fix macro names in dt-bindings header
	Do clock get in icc driver

v6:	Removed 'Reviewed-by: Krzysztof' from dt-bindings patch
	Remove clock get from ICC driver as suggested by Stephen Boyd
	so that the actual peripheral can do the clock get
	first_id -> icc_first_node_id
	Remove tristate from INTERCONNECT_CLK
v5:
	Split gcc-ipq9574.c and common.c changes into separate patches
	Introduce devm_icc_clk_register
	Fix error handling
v4:
gcc-ipq9574.c
	Use clk_hw instead of indices
common.c
	Do icc register in qcom_cc_probe() call stream
common.h
	Add icc clock info to qcom_cc_desc structure

v3:
qcom,ipq9574.h
	Move 'first id' define to clock driver
gcc-ipq9574.c:
	Use indexed identifiers here to avoid confusion
	Fix error messages and move code to common.c as it can be
	shared with future SoCs

v2:
qcom,ipq9574.h
	Fix license identifier
	Rename macros
qcom,ipq9574-gcc.yaml
	Include interconnect-cells
gcc-ipq9574.c
	Update commit log
	Remove IS_ENABLED(CONFIG_INTERCONNECT) and auto select it from Kconfig
ipq9574.dtsi
	Moved to separate patch
	Include interconnect-cells to clock controller node
drivers/clk/qcom/Kconfig:
	Auto select CONFIG_INTERCONNECT & CONFIG_INTERCONNECT_CLK

Varadarajan Narayanan (6):
  interconnect: icc-clk: Specify master/slave ids
  dt-bindings: interconnect: Add Qualcomm IPQ9574 support
  interconnect: icc-clk: Add devm_icc_clk_register
  clk: qcom: common: Add interconnect clocks support
  clk: qcom: ipq9574: Use icc-clk for enabling NoC related clocks
  arm64: dts: qcom: ipq9574: Add icc provider ability to gcc

 .../bindings/clock/qcom,ipq9574-gcc.yaml      |  3 +
 arch/arm64/boot/dts/qcom/ipq9574.dtsi         |  2 +
 drivers/clk/qcom/Kconfig                      |  2 +
 drivers/clk/qcom/clk-cbf-8996.c               |  7 ++-
 drivers/clk/qcom/common.c                     | 35 ++++++++++-
 drivers/clk/qcom/common.h                     |  9 +++
 drivers/clk/qcom/gcc-ipq9574.c                | 33 +++++++++++
 drivers/interconnect/icc-clk.c                | 24 +++++++-
 .../dt-bindings/interconnect/qcom,ipq9574.h   | 59 +++++++++++++++++++
 include/linux/interconnect-clk.h              |  4 ++
 10 files changed, 173 insertions(+), 5 deletions(-)
 create mode 100644 include/dt-bindings/interconnect/qcom,ipq9574.h

Comments

Varadarajan Narayanan May 4, 2024, 8:01 a.m. UTC | #1
Bjorn,

> On Tue, Apr 30, 2024 at 12:12:08PM +0530, Varadarajan Narayanan wrote:
> MSM platforms manage NoC related clocks and scaling from RPM.
> However, in IPQ SoCs, RPM is not involved in managing NoC
> related clocks and there is no NoC scaling.
>
> However, there is a requirement to enable some NoC interface
> clocks for the accessing the peripherals present in the
> system. Hence add a minimalistic interconnect driver that
> establishes a path from the processor/memory to those peripherals
> and vice versa.
>
> Change icc-clk driver to take master and slave ids instead
> of auto generating.
>
> Currently, drivers/clk/qcom/clk-cbf-8996.c is the only user of
> icc-clk. And, it had exactly one master and one slave node.
> For this the auto generated master (= 1) and slave (= 0) was
> enough.
>
> However, when drivers/clk/qcom/gcc-ipq9574.c wanted to make use
> of the icc-clk framework, it had more number of master and slave
> nodes and the auto generated ids did not suit the usage.
>
> ---
> v11:	No code changes
> 	Commit log changed for the first patch
> 	Added Acked-By: to 3 patches

Can this be included in your driver changes for 6.10?

Thanks
Varada

> v10:	Set gcc-ipq9574 driver's sync_state to icc_sync_state
> v9:	Squash icc-clk driver change and cbf-msm8996 change
> 	Remove HWS_DATA macro
> v8:	Change icc-clk driver to take master and slave ids instead
> 	of auto generating
> 	Remove ICC_xxx defines from dt-bindings header
> 	Define MASTER/SLAVE_xxx macros from 0 .. n
>
> v7:	Fix macro names in dt-bindings header
> 	Do clock get in icc driver
>
> v6:	Removed 'Reviewed-by: Krzysztof' from dt-bindings patch
> 	Remove clock get from ICC driver as suggested by Stephen Boyd
> 	so that the actual peripheral can do the clock get
> 	first_id -> icc_first_node_id
> 	Remove tristate from INTERCONNECT_CLK
> v5:
> 	Split gcc-ipq9574.c and common.c changes into separate patches
> 	Introduce devm_icc_clk_register
> 	Fix error handling
> v4:
> gcc-ipq9574.c
> 	Use clk_hw instead of indices
> common.c
> 	Do icc register in qcom_cc_probe() call stream
> common.h
> 	Add icc clock info to qcom_cc_desc structure
>
> v3:
> qcom,ipq9574.h
> 	Move 'first id' define to clock driver
> gcc-ipq9574.c:
> 	Use indexed identifiers here to avoid confusion
> 	Fix error messages and move code to common.c as it can be
> 	shared with future SoCs
>
> v2:
> qcom,ipq9574.h
> 	Fix license identifier
> 	Rename macros
> qcom,ipq9574-gcc.yaml
> 	Include interconnect-cells
> gcc-ipq9574.c
> 	Update commit log
> 	Remove IS_ENABLED(CONFIG_INTERCONNECT) and auto select it from Kconfig
> ipq9574.dtsi
> 	Moved to separate patch
> 	Include interconnect-cells to clock controller node
> drivers/clk/qcom/Kconfig:
> 	Auto select CONFIG_INTERCONNECT & CONFIG_INTERCONNECT_CLK
>
> Varadarajan Narayanan (6):
>   interconnect: icc-clk: Specify master/slave ids
>   dt-bindings: interconnect: Add Qualcomm IPQ9574 support
>   interconnect: icc-clk: Add devm_icc_clk_register
>   clk: qcom: common: Add interconnect clocks support
>   clk: qcom: ipq9574: Use icc-clk for enabling NoC related clocks
>   arm64: dts: qcom: ipq9574: Add icc provider ability to gcc
>
>  .../bindings/clock/qcom,ipq9574-gcc.yaml      |  3 +
>  arch/arm64/boot/dts/qcom/ipq9574.dtsi         |  2 +
>  drivers/clk/qcom/Kconfig                      |  2 +
>  drivers/clk/qcom/clk-cbf-8996.c               |  7 ++-
>  drivers/clk/qcom/common.c                     | 35 ++++++++++-
>  drivers/clk/qcom/common.h                     |  9 +++
>  drivers/clk/qcom/gcc-ipq9574.c                | 33 +++++++++++
>  drivers/interconnect/icc-clk.c                | 24 +++++++-
>  .../dt-bindings/interconnect/qcom,ipq9574.h   | 59 +++++++++++++++++++
>  include/linux/interconnect-clk.h              |  4 ++
>  10 files changed, 173 insertions(+), 5 deletions(-)
>  create mode 100644 include/dt-bindings/interconnect/qcom,ipq9574.h
>
> --
> 2.34.1
>
Konrad Dybcio June 6, 2024, 2:07 p.m. UTC | #2
On 4.05.2024 10:01 AM, Varadarajan Narayanan wrote:
> Bjorn,
> 
>> On Tue, Apr 30, 2024 at 12:12:08PM +0530, Varadarajan Narayanan wrote:
>> MSM platforms manage NoC related clocks and scaling from RPM.
>> However, in IPQ SoCs, RPM is not involved in managing NoC
>> related clocks and there is no NoC scaling.
>>
>> However, there is a requirement to enable some NoC interface
>> clocks for the accessing the peripherals present in the
>> system. Hence add a minimalistic interconnect driver that
>> establishes a path from the processor/memory to those peripherals
>> and vice versa.
>>
>> Change icc-clk driver to take master and slave ids instead
>> of auto generating.
>>
>> Currently, drivers/clk/qcom/clk-cbf-8996.c is the only user of
>> icc-clk. And, it had exactly one master and one slave node.
>> For this the auto generated master (= 1) and slave (= 0) was
>> enough.
>>
>> However, when drivers/clk/qcom/gcc-ipq9574.c wanted to make use
>> of the icc-clk framework, it had more number of master and slave
>> nodes and the auto generated ids did not suit the usage.
>>
>> ---
>> v11:	No code changes
>> 	Commit log changed for the first patch
>> 	Added Acked-By: to 3 patches
> 
> Can this be included in your driver changes for 6.10?

FWIW there is still an open discussion at v9
<CAA8EJpqENsojPQmCbma_nQLEZq8nK1fz1K0JdtvLd=kPrH_DBw@mail.gmail.com>

Konrad
Varadarajan Narayanan June 11, 2024, 9:46 a.m. UTC | #3
On Thu, Jun 06, 2024 at 04:07:23PM +0200, Konrad Dybcio wrote:
> On 4.05.2024 10:01 AM, Varadarajan Narayanan wrote:
> > Bjorn,
> >
> >> On Tue, Apr 30, 2024 at 12:12:08PM +0530, Varadarajan Narayanan wrote:
> >> MSM platforms manage NoC related clocks and scaling from RPM.
> >> However, in IPQ SoCs, RPM is not involved in managing NoC
> >> related clocks and there is no NoC scaling.
> >>
> >> However, there is a requirement to enable some NoC interface
> >> clocks for the accessing the peripherals present in the
> >> system. Hence add a minimalistic interconnect driver that
> >> establishes a path from the processor/memory to those peripherals
> >> and vice versa.
> >>
> >> Change icc-clk driver to take master and slave ids instead
> >> of auto generating.
> >>
> >> Currently, drivers/clk/qcom/clk-cbf-8996.c is the only user of
> >> icc-clk. And, it had exactly one master and one slave node.
> >> For this the auto generated master (= 1) and slave (= 0) was
> >> enough.
> >>
> >> However, when drivers/clk/qcom/gcc-ipq9574.c wanted to make use
> >> of the icc-clk framework, it had more number of master and slave
> >> nodes and the auto generated ids did not suit the usage.
> >>
> >> ---
> >> v11:	No code changes
> >> 	Commit log changed for the first patch
> >> 	Added Acked-By: to 3 patches
> >
> > Can this be included in your driver changes for 6.10?
>
Konrad,

> FWIW there is still an open discussion at v9
> <CAA8EJpqENsojPQmCbma_nQLEZq8nK1fz1K0JdtvLd=kPrH_DBw@mail.gmail.com>

Thanks for reminding. Have responded to it.
https://lore.kernel.org/linux-arm-msm/Zmgb+OjdBNw71sC1@hu-varada-blr.qualcomm.com/

-Varada
Varadarajan Narayanan June 26, 2024, 5:27 a.m. UTC | #4
On Tue, Jun 11, 2024 at 03:16:33PM +0530, Varadarajan Narayanan wrote:
> On Thu, Jun 06, 2024 at 04:07:23PM +0200, Konrad Dybcio wrote:
> > On 4.05.2024 10:01 AM, Varadarajan Narayanan wrote:
> > > Bjorn,
> > >
> > >> On Tue, Apr 30, 2024 at 12:12:08PM +0530, Varadarajan Narayanan wrote:
> > >> MSM platforms manage NoC related clocks and scaling from RPM.
> > >> However, in IPQ SoCs, RPM is not involved in managing NoC
> > >> related clocks and there is no NoC scaling.
> > >>
> > >> However, there is a requirement to enable some NoC interface
> > >> clocks for the accessing the peripherals present in the
> > >> system. Hence add a minimalistic interconnect driver that
> > >> establishes a path from the processor/memory to those peripherals
> > >> and vice versa.
> > >>
> > >> Change icc-clk driver to take master and slave ids instead
> > >> of auto generating.
> > >>
> > >> Currently, drivers/clk/qcom/clk-cbf-8996.c is the only user of
> > >> icc-clk. And, it had exactly one master and one slave node.
> > >> For this the auto generated master (= 1) and slave (= 0) was
> > >> enough.
> > >>
> > >> However, when drivers/clk/qcom/gcc-ipq9574.c wanted to make use
> > >> of the icc-clk framework, it had more number of master and slave
> > >> nodes and the auto generated ids did not suit the usage.
> > >>
> > >> ---
> > >> v11:	No code changes
> > >> 	Commit log changed for the first patch
> > >> 	Added Acked-By: to 3 patches
> > >
> > > Can this be included in your driver changes for 6.10?
> >
> Konrad,
>
> > FWIW there is still an open discussion at v9
> > <CAA8EJpqENsojPQmCbma_nQLEZq8nK1fz1K0JdtvLd=kPrH_DBw@mail.gmail.com>
>
> Thanks for reminding. Have responded to it.
> https://lore.kernel.org/linux-arm-msm/Zmgb+OjdBNw71sC1@hu-varada-blr.qualcomm.com/

Bjorn/Konrad,

Can this be merged for 6.11. I believe the discussion open at v9
has been addressed. Please let me know if anything is still pending.

Below patches depend on this series:

	PCI: https://lore.kernel.org/linux-arm-msm/20240512082858.1806694-1-quic_devipriy@quicinc.com/
	NSSCC: https://lore.kernel.org/linux-arm-msm/20240625070536.3043630-1-quic_devipriy@quicinc.com/

Thanks
Varada
Konrad Dybcio June 29, 2024, 1:36 p.m. UTC | #5
On 26.06.2024 7:27 AM, Varadarajan Narayanan wrote:
> On Tue, Jun 11, 2024 at 03:16:33PM +0530, Varadarajan Narayanan wrote:
>> On Thu, Jun 06, 2024 at 04:07:23PM +0200, Konrad Dybcio wrote:
>>> On 4.05.2024 10:01 AM, Varadarajan Narayanan wrote:
>>>> Bjorn,
>>>>
>>>>> On Tue, Apr 30, 2024 at 12:12:08PM +0530, Varadarajan Narayanan wrote:
>>>>> MSM platforms manage NoC related clocks and scaling from RPM.
>>>>> However, in IPQ SoCs, RPM is not involved in managing NoC
>>>>> related clocks and there is no NoC scaling.
>>>>>
>>>>> However, there is a requirement to enable some NoC interface
>>>>> clocks for the accessing the peripherals present in the
>>>>> system. Hence add a minimalistic interconnect driver that
>>>>> establishes a path from the processor/memory to those peripherals
>>>>> and vice versa.
>>>>>
>>>>> Change icc-clk driver to take master and slave ids instead
>>>>> of auto generating.
>>>>>
>>>>> Currently, drivers/clk/qcom/clk-cbf-8996.c is the only user of
>>>>> icc-clk. And, it had exactly one master and one slave node.
>>>>> For this the auto generated master (= 1) and slave (= 0) was
>>>>> enough.
>>>>>
>>>>> However, when drivers/clk/qcom/gcc-ipq9574.c wanted to make use
>>>>> of the icc-clk framework, it had more number of master and slave
>>>>> nodes and the auto generated ids did not suit the usage.
>>>>>
>>>>> ---
>>>>> v11:	No code changes
>>>>> 	Commit log changed for the first patch
>>>>> 	Added Acked-By: to 3 patches
>>>>
>>>> Can this be included in your driver changes for 6.10?
>>>
>> Konrad,
>>
>>> FWIW there is still an open discussion at v9
>>> <CAA8EJpqENsojPQmCbma_nQLEZq8nK1fz1K0JdtvLd=kPrH_DBw@mail.gmail.com>
>>
>> Thanks for reminding. Have responded to it.
>> https://lore.kernel.org/linux-arm-msm/Zmgb+OjdBNw71sC1@hu-varada-blr.qualcomm.com/
> 
> Bjorn/Konrad,
> 
> Can this be merged for 6.11. I believe the discussion open at v9
> has been addressed. Please let me know if anything is still pending.
> 
> Below patches depend on this series:
> 
> 	PCI: https://lore.kernel.org/linux-arm-msm/20240512082858.1806694-1-quic_devipriy@quicinc.com/
> 	NSSCC: https://lore.kernel.org/linux-arm-msm/20240625070536.3043630-1-quic_devipriy@quicinc.com/

Looks solved now! Bjorn, feel free to pick this up

Konrad
Bjorn Andersson July 6, 2024, 10:01 p.m. UTC | #6
On Tue, 30 Apr 2024 12:12:08 +0530, Varadarajan Narayanan wrote:
> MSM platforms manage NoC related clocks and scaling from RPM.
> However, in IPQ SoCs, RPM is not involved in managing NoC
> related clocks and there is no NoC scaling.
> 
> However, there is a requirement to enable some NoC interface
> clocks for the accessing the peripherals present in the
> system. Hence add a minimalistic interconnect driver that
> establishes a path from the processor/memory to those peripherals
> and vice versa.
> 
> [...]

Applied, thanks!

[6/6] arm64: dts: qcom: ipq9574: Add icc provider ability to gcc
      commit: 5d0ab61a700214366dfcca5893b87655261e8c94

Best regards,