Commit 1f41bada authored by Georgi Djakov's avatar Georgi Djakov
Browse files

Merge branch 'icc-msm8996' into icc-next

This series adds a driver for interconnects on MSM8996. This fixes some rare display underflows
and provides a slight heat reduction.

* icc-msm8996
  dt-bindings: interconnect: Combine SDM660 bindings into RPM schema
  interconnect: icc-rpm: Add support for bus power domain
  dt-bindings: interconnect: Add Qualcomm MSM8996 DT bindings
  interconnect: qcom: Add MSM8996 interconnect provider driver

Link: https://lore.kernel.org/r/20211021132329.234942-1-y.oudjana@protonmail.com


Signed-off-by: default avatarGeorgi Djakov <djakov@kernel.org>
parents a7d9436a 7add937f
Loading
Loading
Loading
Loading
+136 −7
Original line number Diff line number Diff line
@@ -27,13 +27,76 @@ properties:
      - qcom,msm8939-pcnoc
      - qcom,msm8939-snoc
      - qcom,msm8939-snoc-mm
      - qcom,msm8996-a0noc
      - qcom,msm8996-a1noc
      - qcom,msm8996-a2noc
      - qcom,msm8996-bimc
      - qcom,msm8996-cnoc
      - qcom,msm8996-mnoc
      - qcom,msm8996-pnoc
      - qcom,msm8996-snoc
      - qcom,qcs404-bimc
      - qcom,qcs404-pcnoc
      - qcom,qcs404-snoc
      - qcom,sdm660-a2noc
      - qcom,sdm660-bimc
      - qcom,sdm660-cnoc
      - qcom,sdm660-gnoc
      - qcom,sdm660-mnoc
      - qcom,sdm660-snoc

  '#interconnect-cells':
    const: 1

  clocks:
    minItems: 2
    maxItems: 7

  clock-names:
    minItems: 2
    maxItems: 7

  power-domains:
    maxItems: 1

required:
  - compatible
  - reg
  - '#interconnect-cells'
  - clock-names
  - clocks

additionalProperties: false

allOf:
  - if:
      properties:
        compatible:
          contains:
            enum:
              - qcom,msm8916-bimc
              - qcom,msm8916-pcnoc
              - qcom,msm8916-snoc
              - qcom,msm8939-bimc
              - qcom,msm8939-pcnoc
              - qcom,msm8939-snoc
              - qcom,msm8939-snoc-mm
              - qcom,msm8996-a1noc
              - qcom,msm8996-a2noc
              - qcom,msm8996-bimc
              - qcom,msm8996-cnoc
              - qcom,msm8996-pnoc
              - qcom,msm8996-snoc
              - qcom,qcs404-bimc
              - qcom,qcs404-pcnoc
              - qcom,qcs404-snoc
              - qcom,sdm660-bimc
              - qcom,sdm660-cnoc
              - qcom,sdm660-gnoc
              - qcom,sdm660-snoc

      then:
        properties:
          clock-names:
            items:
              - const: bus
@@ -44,14 +107,80 @@ properties:
              - description: Bus Clock
              - description: Bus A Clock

  - if:
      properties:
        compatible:
          contains:
            enum:
              - qcom,msm8996-mnoc
              - qcom,sdm660-mnoc

    then:
      properties:
        clock-names:
          items:
            - const: bus
            - const: bus_a
            - const: iface

        clocks:
          items:
            - description: Bus Clock.
            - description: Bus A Clock.
            - description: CPU-NoC High-performance Bus Clock.

  - if:
      properties:
        compatible:
          contains:
            enum:
              - qcom,msm8996-a0noc

    then:
      properties:
        clock-names:
          items:
            - const: aggre0_snoc_axi
            - const: aggre0_cnoc_ahb
            - const: aggre0_noc_mpu_cfg

        clocks:
          items:
            - description: Aggregate0 System NoC AXI Clock.
            - description: Aggregate0 Config NoC AHB Clock.
            - description: Aggregate0 NoC MPU Clock.

      required:
  - compatible
  - reg
  - '#interconnect-cells'
  - clock-names
  - clocks
        - power-domains

additionalProperties: false
  - if:
      properties:
        compatible:
          contains:
            enum:
              - qcom,sdm660-a2noc

    then:
      properties:
        clock-names:
          items:
            - const: bus
            - const: bus_a
            - const: ipa
            - const: ufs_axi
            - const: aggre2_ufs_axi
            - const: aggre2_usb3_axi
            - const: cfg_noc_usb2_axi

        clocks:
          items:
            - description: Bus Clock.
            - description: Bus A Clock.
            - description: IPA Clock.
            - description: UFS AXI Clock.
            - description: Aggregate2 UFS AXI Clock.
            - description: Aggregate2 USB3 AXI Clock.
            - description: Config NoC USB2 AXI Clock.

examples:
  - |
+0 −185
Original line number Diff line number Diff line
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/interconnect/qcom,sdm660.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Qualcomm SDM660 Network-On-Chip interconnect

maintainers:
  - AngeloGioacchino Del Regno <kholk11@gmail.com>

description: |
  The Qualcomm SDM660 interconnect providers support adjusting the
  bandwidth requirements between the various NoC fabrics.

properties:
  reg:
    maxItems: 1

  compatible:
    enum:
      - qcom,sdm660-a2noc
      - qcom,sdm660-bimc
      - qcom,sdm660-cnoc
      - qcom,sdm660-gnoc
      - qcom,sdm660-mnoc
      - qcom,sdm660-snoc

  '#interconnect-cells':
    const: 1

  clocks:
    minItems: 1
    maxItems: 7

  clock-names:
    minItems: 1
    maxItems: 7

required:
  - compatible
  - reg
  - '#interconnect-cells'
  - clock-names
  - clocks

additionalProperties: false

allOf:
  - if:
      properties:
        compatible:
          contains:
            enum:
              - qcom,sdm660-mnoc
    then:
      properties:
        clocks:
          items:
            - description: Bus Clock.
            - description: Bus A Clock.
            - description: CPU-NoC High-performance Bus Clock.
        clock-names:
          items:
            - const: bus
            - const: bus_a
            - const: iface

  - if:
      properties:
        compatible:
          contains:
            enum:
              - qcom,sdm660-a2noc
    then:
      properties:
        clocks:
          items:
            - description: Bus Clock.
            - description: Bus A Clock.
            - description: IPA Clock.
            - description: UFS AXI Clock.
            - description: Aggregate2 UFS AXI Clock.
            - description: Aggregate2 USB3 AXI Clock.
            - description: Config NoC USB2 AXI Clock.
        clock-names:
          items:
            - const: bus
            - const: bus_a
            - const: ipa
            - const: ufs_axi
            - const: aggre2_ufs_axi
            - const: aggre2_usb3_axi
            - const: cfg_noc_usb2_axi

  - if:
      properties:
        compatible:
          contains:
            enum:
              - qcom,sdm660-bimc
              - qcom,sdm660-cnoc
              - qcom,sdm660-gnoc
              - qcom,sdm660-snoc
    then:
      properties:
        clocks:
          items:
            - description: Bus Clock.
            - description: Bus A Clock.
        clock-names:
          items:
            - const: bus
            - const: bus_a

examples:
  - |
      #include <dt-bindings/clock/qcom,rpmcc.h>
      #include <dt-bindings/clock/qcom,mmcc-sdm660.h>
      #include <dt-bindings/clock/qcom,gcc-sdm660.h>

      bimc: interconnect@1008000 {
              compatible = "qcom,sdm660-bimc";
              reg = <0x01008000 0x78000>;
              #interconnect-cells = <1>;
              clock-names = "bus", "bus_a";
              clocks = <&rpmcc RPM_SMD_BIMC_CLK>,
                       <&rpmcc RPM_SMD_BIMC_A_CLK>;
      };

      cnoc: interconnect@1500000 {
              compatible = "qcom,sdm660-cnoc";
              reg = <0x01500000 0x10000>;
              #interconnect-cells = <1>;
              clock-names = "bus", "bus_a";
              clocks = <&rpmcc RPM_SMD_CNOC_CLK>,
                       <&rpmcc RPM_SMD_CNOC_A_CLK>;
      };

      snoc: interconnect@1626000 {
              compatible = "qcom,sdm660-snoc";
              reg = <0x01626000 0x7090>;
              #interconnect-cells = <1>;
              clock-names = "bus", "bus_a";
              clocks = <&rpmcc RPM_SMD_SNOC_CLK>,
                       <&rpmcc RPM_SMD_SNOC_A_CLK>;
      };

      a2noc: interconnect@1704000 {
              compatible = "qcom,sdm660-a2noc";
              reg = <0x01704000 0xc100>;
              #interconnect-cells = <1>;
              clock-names = "bus",
                            "bus_a",
                            "ipa",
                            "ufs_axi",
                            "aggre2_ufs_axi",
                            "aggre2_usb3_axi",
                            "cfg_noc_usb2_axi";
              clocks = <&rpmcc RPM_SMD_AGGR2_NOC_CLK>,
                       <&rpmcc RPM_SMD_AGGR2_NOC_A_CLK>,
                       <&rpmcc RPM_SMD_IPA_CLK>,
                       <&gcc GCC_UFS_AXI_CLK>,
                       <&gcc GCC_AGGRE2_UFS_AXI_CLK>,
                       <&gcc GCC_AGGRE2_USB3_AXI_CLK>,
                       <&gcc GCC_CFG_NOC_USB2_AXI_CLK>;
      };

      mnoc: interconnect@1745000 {
              compatible = "qcom,sdm660-mnoc";
              reg = <0x01745000 0xa010>;
              #interconnect-cells = <1>;
              clock-names = "bus", "bus_a", "iface";
              clocks = <&rpmcc RPM_SMD_MMSSNOC_AXI_CLK>,
                       <&rpmcc RPM_SMD_MMSSNOC_AXI_CLK_A>,
                       <&mmcc AHB_CLK_SRC>;
      };

      gnoc: interconnect@17900000 {
              compatible = "qcom,sdm660-gnoc";
              reg = <0x17900000 0xe000>;
              #interconnect-cells = <1>;
              clock-names = "bus", "bus_a";
              clocks = <&xo_board>, <&xo_board>;
      };
+9 −0
Original line number Diff line number Diff line
@@ -35,6 +35,15 @@ config INTERCONNECT_QCOM_MSM8974
	 This is a driver for the Qualcomm Network-on-Chip on msm8974-based
	 platforms.

config INTERCONNECT_QCOM_MSM8996
	tristate "Qualcomm MSM8996 interconnect driver"
	depends on INTERCONNECT_QCOM
	depends on QCOM_SMD_RPM
	select INTERCONNECT_QCOM_SMD_RPM
	help
	  This is a driver for the Qualcomm Network-on-Chip on msm8996-based
	  platforms.

config INTERCONNECT_QCOM_OSM_L3
	tristate "Qualcomm OSM L3 interconnect driver"
	depends on INTERCONNECT_QCOM || COMPILE_TEST
+2 −0
Original line number Diff line number Diff line
@@ -4,6 +4,7 @@ icc-bcm-voter-objs := bcm-voter.o
qnoc-msm8916-objs			:= msm8916.o
qnoc-msm8939-objs			:= msm8939.o
qnoc-msm8974-objs			:= msm8974.o
qnoc-msm8996-objs			:= msm8996.o
icc-osm-l3-objs				:= osm-l3.o
qnoc-qcs404-objs			:= qcs404.o
icc-rpmh-obj				:= icc-rpmh.o
@@ -22,6 +23,7 @@ obj-$(CONFIG_INTERCONNECT_QCOM_BCM_VOTER) += icc-bcm-voter.o
obj-$(CONFIG_INTERCONNECT_QCOM_MSM8916) += qnoc-msm8916.o
obj-$(CONFIG_INTERCONNECT_QCOM_MSM8939) += qnoc-msm8939.o
obj-$(CONFIG_INTERCONNECT_QCOM_MSM8974) += qnoc-msm8974.o
obj-$(CONFIG_INTERCONNECT_QCOM_MSM8996) += qnoc-msm8996.o
obj-$(CONFIG_INTERCONNECT_QCOM_OSM_L3) += icc-osm-l3.o
obj-$(CONFIG_INTERCONNECT_QCOM_QCS404) += qnoc-qcs404.o
obj-$(CONFIG_INTERCONNECT_QCOM_RPMH) += icc-rpmh.o
+7 −0
Original line number Diff line number Diff line
@@ -11,6 +11,7 @@
#include <linux/of_device.h>
#include <linux/of_platform.h>
#include <linux/platform_device.h>
#include <linux/pm_domain.h>
#include <linux/regmap.h>
#include <linux/slab.h>

@@ -341,6 +342,12 @@ int qnoc_probe(struct platform_device *pdev)
	if (ret)
		return ret;

	if (desc->has_bus_pd) {
		ret = dev_pm_domain_attach(dev, true);
		if (ret)
			return ret;
	}

	provider = &qp->provider;
	INIT_LIST_HEAD(&provider->nodes);
	provider->dev = dev;
Loading