mbox series

[0/3] interconnect: qcom: Add SM4450 interconnect driver

Message ID 20230908064427.26999-1-quic_tengfan@quicinc.com
Headers show
Series interconnect: qcom: Add SM4450 interconnect driver | expand

Message

Tengfei Fan Sept. 8, 2023, 6:44 a.m. UTC
Add SM4450 interconnect provider driver for support enable uart console.

Tengfei Fan (3):
  dt-bindings: interconnect: Add Qualcomm SM4450
  interconnect: qcom: Add SM4450 interconnect provider driver
  arm64: defconfig: enable interconnect for SM4450

 .../interconnect/qcom,sm4450-rpmh.yaml        |  133 ++
 arch/arm64/configs/defconfig                  |    1 +
 drivers/interconnect/qcom/Kconfig             |    9 +
 drivers/interconnect/qcom/Makefile            |    2 +
 drivers/interconnect/qcom/sm4450.c            | 1848 +++++++++++++++++
 drivers/interconnect/qcom/sm4450.h            |  152 ++
 .../dt-bindings/interconnect/qcom,sm4450.h    |  163 ++
 7 files changed, 2308 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/interconnect/qcom,sm4450-rpmh.yaml
 create mode 100644 drivers/interconnect/qcom/sm4450.c
 create mode 100644 drivers/interconnect/qcom/sm4450.h
 create mode 100644 include/dt-bindings/interconnect/qcom,sm4450.h


base-commit: a47fc304d2b678db1a5d760a7d644dac9b067752

Comments

Konrad Dybcio Sept. 8, 2023, 8:16 a.m. UTC | #1
On 8.09.2023 08:44, Tengfei Fan wrote:
> Add driver for the Qualcomm interconnect buses found in SM4450 based
> platforms. The topology consists of several NoCs that are controlled
> by a remote processor that collects the aggregated bandwidth for each
> master-slave pairs.
> 
> Signed-off-by: Tengfei Fan <quic_tengfan@quicinc.com>
> ---
[...]

> +++ b/drivers/interconnect/qcom/sm4450.c
> @@ -0,0 +1,1848 @@
> +// SPDX-License-Identifier: GPL-2.0-only
> +/*
> + * Copyright (c) 2023, Qualcomm Innovation Center, Inc. All rights reserved.
> + *
Stray blank line
> + */
> +
> +#include <linux/device.h>
> +#include <linux/interconnect.h>
> +#include <linux/interconnect-provider.h>
> +#include <linux/io.h>
Is this necessary?

> +#include <linux/module.h>
> +#include <linux/of_device.h>
> +#include <linux/of_platform.h>
> +#include <linux/platform_device.h>
> +#include <dt-bindings/interconnect/qcom,sm4450.h>
> +
[...]

> +static struct qcom_icc_node * const mmss_noc_nodes[] = {
> +	[MASTER_CAMNOC_HF] = &qnm_camnoc_hf,
> +	[MASTER_CAMNOC_ICP] = &qnm_camnoc_icp,
> +	[MASTER_CAMNOC_SF] = &qnm_camnoc_sf,
> +	[MASTER_MDP] = &qnm_mdp,
> +	[MASTER_CNOC_MNOC_CFG] = &qnm_mnoc_cfg,
> +	[MASTER_VIDEO_P0_MMNOC] = &qnm_video0,
> +	[MASTER_VIDEO_PROC_MMNOC] = &qnm_video_cpu,
> +	[SLAVE_MNOC_HF_MEM_NOC] = &qns_mem_noc_hf,
> +	[SLAVE_MNOC_SF_MEM_NOC] = &qns_mem_noc_sf,
> +	[SLAVE_SERVICE_MNOC] = &srvc_mnoc,
> +	[MASTER_MDP_DISP] = &qnm_mdp_disp,
> +	[SLAVE_MNOC_HF_MEM_NOC_DISP] = &qns_mem_noc_hf_disp,
Please drop the _DISP paths, upstream will handle these with icc
tags.

[...]

> +
> +static const struct of_device_id qnoc_of_match[] = {
> +	{ .compatible = "qcom,sm4450-aggre1-noc",
> +	  .data = &sm4450_aggre1_noc},
Nit, but please:

- make these one line, like this:
{ .compatible = "qcom,sm4450-aggre1-noc", .data = &sm4450_aggre1_noc },

- add the missing space before '}'

Konrad
Tengfei Fan Sept. 8, 2023, 8:26 a.m. UTC | #2
在 9/8/2023 4:16 PM, Konrad Dybcio 写道:
> On 8.09.2023 08:44, Tengfei Fan wrote:
>> Add driver for the Qualcomm interconnect buses found in SM4450 based
>> platforms. The topology consists of several NoCs that are controlled
>> by a remote processor that collects the aggregated bandwidth for each
>> master-slave pairs.
>>
>> Signed-off-by: Tengfei Fan <quic_tengfan@quicinc.com>
>> ---
> [...]
> 
>> +++ b/drivers/interconnect/qcom/sm4450.c
>> @@ -0,0 +1,1848 @@
>> +// SPDX-License-Identifier: GPL-2.0-only
>> +/*
>> + * Copyright (c) 2023, Qualcomm Innovation Center, Inc. All rights reserved.
>> + *
> Stray blank line
>> + */
>> +
>> +#include <linux/device.h>
>> +#include <linux/interconnect.h>
>> +#include <linux/interconnect-provider.h>
>> +#include <linux/io.h>
> Is this necessary?
> 
>> +#include <linux/module.h>
>> +#include <linux/of_device.h>
>> +#include <linux/of_platform.h>
>> +#include <linux/platform_device.h>
>> +#include <dt-bindings/interconnect/qcom,sm4450.h>
>> +
> [...]
> 
>> +static struct qcom_icc_node * const mmss_noc_nodes[] = {
>> +	[MASTER_CAMNOC_HF] = &qnm_camnoc_hf,
>> +	[MASTER_CAMNOC_ICP] = &qnm_camnoc_icp,
>> +	[MASTER_CAMNOC_SF] = &qnm_camnoc_sf,
>> +	[MASTER_MDP] = &qnm_mdp,
>> +	[MASTER_CNOC_MNOC_CFG] = &qnm_mnoc_cfg,
>> +	[MASTER_VIDEO_P0_MMNOC] = &qnm_video0,
>> +	[MASTER_VIDEO_PROC_MMNOC] = &qnm_video_cpu,
>> +	[SLAVE_MNOC_HF_MEM_NOC] = &qns_mem_noc_hf,
>> +	[SLAVE_MNOC_SF_MEM_NOC] = &qns_mem_noc_sf,
>> +	[SLAVE_SERVICE_MNOC] = &srvc_mnoc,
>> +	[MASTER_MDP_DISP] = &qnm_mdp_disp,
>> +	[SLAVE_MNOC_HF_MEM_NOC_DISP] = &qns_mem_noc_hf_disp,
> Please drop the _DISP paths, upstream will handle these with icc
> tags.
sure, will handle this.
> 
> [...]
> 
>> +
>> +static const struct of_device_id qnoc_of_match[] = {
>> +	{ .compatible = "qcom,sm4450-aggre1-noc",
>> +	  .data = &sm4450_aggre1_noc},
> Nit, but please:
> 
> - make these one line, like this:
> { .compatible = "qcom,sm4450-aggre1-noc", .data = &sm4450_aggre1_noc },
> 
> - add the missing space before '}'
sure, will handle this.
> 
> Konrad