mbox series

[0/2] Add interconnect support for SM7150 SoC

Message ID 20240218183239.85319-1-danila@jiaxyga.com
Headers show
Series Add interconnect support for SM7150 SoC | expand

Message

Danila Tikhonov Feb. 18, 2024, 6:32 p.m. UTC
Add dtbindings and driver support for the Qualcomm SM7150 SoC.

To: Bjorn Andersson <andersson@kernel.org>
To: Konrad Dybcio <konrad.dybcio@linaro.org>
To: Georgi Djakov <djakov@kernel.org>
To: Rob Herring <robh@kernel.org>
To: Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>
To: Conor Dooley <conor+dt@kernel.org>
Cc: linux-arm-msm@vger.kernel.org
Cc: linux-pm@vger.kernel.org
Cc: devicetree@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Danila Tikhonov <danila@jiaxyga.com>

Danila Tikhonov (2):
  dt-bindings: interconnect: Add Qualcomm SM7150 DT bindings
  interconnect: qcom: Add SM7150 driver support

 .../interconnect/qcom,sm7150-rpmh.yaml        |   88 +
 drivers/interconnect/qcom/Kconfig             |    9 +
 drivers/interconnect/qcom/Makefile            |    2 +
 drivers/interconnect/qcom/sm7150.c            | 1753 +++++++++++++++++
 drivers/interconnect/qcom/sm7150.h            |  140 ++
 .../interconnect/qcom,sm7150-rpmh.h           |  150 ++
 6 files changed, 2142 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/interconnect/qcom,sm7150-rpmh.yaml
 create mode 100644 drivers/interconnect/qcom/sm7150.c
 create mode 100644 drivers/interconnect/qcom/sm7150.h
 create mode 100644 include/dt-bindings/interconnect/qcom,sm7150-rpmh.h

Comments

Naman Jain Feb. 19, 2024, 9:48 a.m. UTC | #1
On 2/19/2024 12:02 AM, Danila Tikhonov wrote:
> Add dtbindings and driver support for the Qualcomm SM7150 SoC.

Nitpick.
s/dtbindings/dt-bindings

Please add that you are adding this support for Interconnect driver. Its
there in Subject of this patch, but reading above line gives wrong
impression.

Regards,
Naman Jain

> 
> To: Bjorn Andersson <andersson@kernel.org>
> To: Konrad Dybcio <konrad.dybcio@linaro.org>
> To: Georgi Djakov <djakov@kernel.org>
> To: Rob Herring <robh@kernel.org>
> To: Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>
> To: Conor Dooley <conor+dt@kernel.org>
> Cc: linux-arm-msm@vger.kernel.org
> Cc: linux-pm@vger.kernel.org
> Cc: devicetree@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org
> Signed-off-by: Danila Tikhonov <danila@jiaxyga.com>
> 
> Danila Tikhonov (2):
>    dt-bindings: interconnect: Add Qualcomm SM7150 DT bindings
>    interconnect: qcom: Add SM7150 driver support
> 
>   .../interconnect/qcom,sm7150-rpmh.yaml        |   88 +
>   drivers/interconnect/qcom/Kconfig             |    9 +
>   drivers/interconnect/qcom/Makefile            |    2 +
>   drivers/interconnect/qcom/sm7150.c            | 1753 +++++++++++++++++
>   drivers/interconnect/qcom/sm7150.h            |  140 ++
>   .../interconnect/qcom,sm7150-rpmh.h           |  150 ++
>   6 files changed, 2142 insertions(+)
>   create mode 100644 Documentation/devicetree/bindings/interconnect/qcom,sm7150-rpmh.yaml
>   create mode 100644 drivers/interconnect/qcom/sm7150.c
>   create mode 100644 drivers/interconnect/qcom/sm7150.h
>   create mode 100644 include/dt-bindings/interconnect/qcom,sm7150-rpmh.h
>
Konrad Dybcio Feb. 19, 2024, 10:14 a.m. UTC | #2
On 18.02.2024 19:32, Danila Tikhonov wrote:
> Add a driver that handles the different NoCs found on SM7150, based on the
> downstream dtb.
> 
> Signed-off-by: Danila Tikhonov <danila@jiaxyga.com>
> ---

Looks rather good, just 3 minor things:


> +
> +static const struct of_device_id qnoc_of_match[] = {
> +	{ .compatible = "qcom,sm7150-aggre1-noc",
> +	  .data = &sm7150_aggre1_noc},

Please unwrap these and add a space before the closing curly bracket

> +	{ .compatible = "qcom,sm7150-aggre2-noc",
> +	  .data = &sm7150_aggre2_noc},
> +	{ .compatible = "qcom,sm7150-camnoc-virt",
> +	  .data = &sm7150_camnoc_virt},
> +	{ .compatible = "qcom,sm7150-compute-noc",
> +	  .data = &sm7150_compute_noc},
> +	{ .compatible = "qcom,sm7150-config-noc",
> +	  .data = &sm7150_config_noc},
> +	{ .compatible = "qcom,sm7150-dc-noc",
> +	  .data = &sm7150_dc_noc},
> +	{ .compatible = "qcom,sm7150-gem-noc",
> +	  .data = &sm7150_gem_noc},
> +	{ .compatible = "qcom,sm7150-mc-virt",
> +	  .data = &sm7150_mc_virt},
> +	{ .compatible = "qcom,sm7150-mmss-noc",
> +	  .data = &sm7150_mmss_noc},
> +	{ .compatible = "qcom,sm7150-system-noc",
> +	  .data = &sm7150_system_noc},
> +	{ }
> +};
> +MODULE_DEVICE_TABLE(of, qnoc_of_match);
> +
> +static struct platform_driver qnoc_driver = {
> +	.probe = qcom_icc_rpmh_probe,
> +	.remove_new = qcom_icc_rpmh_remove,
> +	.driver = {
> +		.name = "qnoc-sm7150",
> +		.of_match_table = qnoc_of_match,
> +		.sync_state = icc_sync_state,
> +	},
> +};
> +module_platform_driver(qnoc_driver);

This is most certainly a bad choice, but at the same time it doesn't
matter for now.. It's going to be badly delayed anyway, I have some
fixes in the pipeline. Please change it to core_initcall (which may make
your boot slower as of torvalds/master, counter-intuitively.. but I will
surely forget to update this otherwise)

[...]

> +
> +MODULE_DESCRIPTION("Qualcomm SM7150 NoC driver");
> +MODULE_LICENSE("GPL");
> diff --git a/drivers/interconnect/qcom/sm7150.h b/drivers/interconnect/qcom/sm7150.h
> new file mode 100644
> index 000000000000..e00a9b0c1279
> --- /dev/null
> +++ b/drivers/interconnect/qcom/sm7150.h
> @@ -0,0 +1,140 @@
> +/* SPDX-License-Identifier: GPL-2.0-only */

GPL2+BSD3?

Konrad