Commit d76cfc7c authored by Arnd Bergmann's avatar Arnd Bergmann
Browse files

Merge tag 'qcom-drivers-for-5.9-2' of...

Merge tag 'qcom-drivers-for-5.9-2' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/drivers

Qualcomm driver additional updates for 5.9

This fixes a potential race condition with remoteprocs by not sending
acknowledgements until after registered drivers has processed the event.
It adds IPQ6018 support to the SMD RPM driver, fixes kerneldoc in the
same and converts the related DT binding to YAML.
Finally it fixes a compilation warning in the geni serial engine driver
when compiled without CONFIG_SERIAL_EARLYCON.

* tag 'qcom-drivers-for-5.9-2' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux:
  soc: qcom: geni: Fix unused label warning
  soc: qcom: smd-rpm: Fix kerneldoc
  soc: qcom: pdr: Reorder the PD state indication ack
  dt-bindings: soc: qcom: smd-rpm: Convert binding to YAML schema
  soc: qcom: smd-rpm: Add IPQ6018 compatible
  dt-bindings: soc: qcom: smd-rpm: Add IPQ6018 compatible

Link: https://lore.kernel.org/r/20200730051852.649761-1-bjorn.andersson@linaro.org


Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
parents d7c6dbc0 0fec8617
Loading
Loading
Loading
Loading
+0 −64
Original line number Diff line number Diff line
Qualcomm Resource Power Manager (RPM) over SMD

This driver is used to interface with the Resource Power Manager (RPM) found in
various Qualcomm platforms. The RPM allows each component in the system to vote
for state of the system resources, such as clocks, regulators and bus
frequencies.

The SMD information for the RPM edge should be filled out.  See qcom,smd.txt for
the required edge properties.  All SMD related properties will reside within the
RPM node itself.

= SUBDEVICES

The RPM exposes resources to its subnodes.  The rpm_requests node must be
present and this subnode may contain children that designate regulator
resources.

- compatible:
	Usage: required
	Value type: <string>
	Definition: must be one of:
		    "qcom,rpm-apq8084"
		    "qcom,rpm-msm8916"
		    "qcom,rpm-msm8936"
		    "qcom,rpm-msm8974"
		    "qcom,rpm-msm8976"
		    "qcom,rpm-msm8994"
		    "qcom,rpm-msm8998"
		    "qcom,rpm-sdm660"
		    "qcom,rpm-qcs404"

- qcom,smd-channels:
	Usage: required
	Value type: <string>
	Definition: must be "rpm_requests"

Refer to Documentation/devicetree/bindings/regulator/qcom,smd-rpm-regulator.txt
for information on the regulator subnodes that can exist under the rpm_requests.

Example:

	soc {
		apcs: syscon@f9011000 {
			compatible = "syscon";
			reg = <0xf9011000 0x1000>;
		};
	};

	smd {
		compatible = "qcom,smd";

		rpm {
			interrupts = <0 168 1>;
			qcom,ipc = <&apcs 8 0>;
			qcom,smd-edge = <15>;

			rpm_requests {
				compatible = "qcom,rpm-msm8974";
				qcom,smd-channels = "rpm_requests";

				...
			};
		};
	};
+87 −0
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/soc/qcom/qcom,smd-rpm.yaml#"
$schema: "http://devicetree.org/meta-schemas/core.yaml#"

title: Qualcomm Resource Power Manager (RPM) over SMD

description: |
  This driver is used to interface with the Resource Power Manager (RPM) found
  in various Qualcomm platforms. The RPM allows each component in the system
  to vote for state of the system resources, such as clocks, regulators and bus
  frequencies.

  The SMD information for the RPM edge should be filled out.  See qcom,smd.txt
  for the required edge properties.  All SMD related properties will reside
  within the RPM node itself.

  The RPM exposes resources to its subnodes.  The rpm_requests node must be
  present and this subnode may contain children that designate regulator
  resources.

  Refer to Documentation/devicetree/bindings/regulator/qcom,smd-rpm-regulator.txt
  for information on the regulator subnodes that can exist under the
  rpm_requests.

maintainers:
  - Kathiravan T <kathirav@codeaurora.org>

properties:
  compatible:
    enum:
      - qcom,rpm-apq8084
      - qcom,rpm-ipq6018
      - qcom,rpm-msm8916
      - qcom,rpm-msm8974
      - qcom,rpm-msm8976
      - qcom,rpm-msm8996
      - qcom,rpm-msm8998
      - qcom,rpm-sdm660
      - qcom,rpm-qcs404

  qcom,smd-channels:
    $ref: /schemas/types.yaml#/definitions/string-array
    description: Channel name used for the RPM communication
    items:
      - const: rpm_requests

if:
  properties:
    compatible:
      contains:
        enum:
          - qcom,rpm-apq8084
          - qcom,rpm-msm8916
          - qcom,rpm-msm8974
then:
  required:
    - qcom,smd-channels

required:
  - compatible

additionalProperties: false

examples:
  - |
    #include <dt-bindings/interrupt-controller/arm-gic.h>
    #include <dt-bindings/interrupt-controller/irq.h>

    smd {
        compatible = "qcom,smd";

        rpm {
            interrupts = <GIC_SPI 168 IRQ_TYPE_EDGE_RISING>;
            qcom,ipc = <&apcs 8 0>;
            qcom,smd-edge = <15>;

                rpm_requests {
                        compatible = "qcom,rpm-msm8974";
                        qcom,smd-channels = "rpm_requests";

                        /* Regulator nodes to follow */
                };
            };
     };
...
+3 −1
Original line number Diff line number Diff line
@@ -278,13 +278,15 @@ static void pdr_indack_work(struct work_struct *work)

	list_for_each_entry_safe(ind, tmp, &pdr->indack_list, node) {
		pds = ind->pds;
		pdr_send_indack_msg(pdr, pds, ind->transaction_id);

		mutex_lock(&pdr->status_lock);
		pds->state = ind->curr_state;
		pdr->status(pds->state, pds->service_path, pdr->priv);
		mutex_unlock(&pdr->status_lock);

		/* Ack the indication after clients release the PD resources */
		pdr_send_indack_msg(pdr, pds, ind->transaction_id);

		mutex_lock(&pdr->list_lock);
		list_del(&ind->node);
		mutex_unlock(&pdr->list_lock);
+1 −1
Original line number Diff line number Diff line
@@ -910,8 +910,8 @@ static int geni_se_probe(struct platform_device *pdev)
	if (of_get_compatible_child(pdev->dev.of_node, "qcom,geni-debug-uart"))
		earlycon_wrapper = wrapper;
	of_node_put(pdev->dev.of_node);
#endif
exit:
#endif
	dev_set_drvdata(dev, wrapper);
	dev_dbg(dev, "GENI SE Driver probed\n");
	return devm_of_platform_populate(dev);
+3 −0
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@
 * struct qcom_smd_rpm - state of the rpm device driver
 * @rpm_channel:	reference to the smd channel
 * @icc:		interconnect proxy device
 * @dev:		rpm device
 * @ack:		completion for acks
 * @lock:		mutual exclusion around the send/complete pair
 * @ack_status:		result of the rpm request
@@ -86,6 +87,7 @@ struct qcom_rpm_message {
/**
 * qcom_rpm_smd_write - write @buf to @type:@id
 * @rpm:	rpm handle
 * @state:	active/sleep state flags
 * @type:	resource type
 * @id:		resource identifier
 * @buf:	the data to be written
@@ -230,6 +232,7 @@ static void qcom_smd_rpm_remove(struct rpmsg_device *rpdev)

static const struct of_device_id qcom_smd_rpm_of_match[] = {
	{ .compatible = "qcom,rpm-apq8084" },
	{ .compatible = "qcom,rpm-ipq6018" },
	{ .compatible = "qcom,rpm-msm8916" },
	{ .compatible = "qcom,rpm-msm8936" },
	{ .compatible = "qcom,rpm-msm8974" },