diff mbox

[1/3] dt: cpufreq: brcm: New binding document for brcm-avs-cpufreq

Message ID 1471044331-2480-2-git-send-email-mmayer@broadcom.com (mailing list archive)
State Changes Requested, archived
Headers show

Commit Message

Markus Mayer Aug. 12, 2016, 11:25 p.m. UTC
Add the binding document for the new brcm-avs-cpufreq driver.

Signed-off-by: Markus Mayer <mmayer@broadcom.com>
---
 .../bindings/cpufreq/brcm-avs-cpufreq.txt          | 84 ++++++++++++++++++++++
 MAINTAINERS                                        |  7 ++
 2 files changed, 91 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/cpufreq/brcm-avs-cpufreq.txt

Comments

Rob Herring Aug. 16, 2016, 1:16 p.m. UTC | #1
On Fri, Aug 12, 2016 at 04:25:29PM -0700, Markus Mayer wrote:
> Add the binding document for the new brcm-avs-cpufreq driver.
> 
> Signed-off-by: Markus Mayer <mmayer@broadcom.com>
> ---
>  .../bindings/cpufreq/brcm-avs-cpufreq.txt          | 84 ++++++++++++++++++++++
>  MAINTAINERS                                        |  7 ++
>  2 files changed, 91 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/cpufreq/brcm-avs-cpufreq.txt
> 
> diff --git a/Documentation/devicetree/bindings/cpufreq/brcm-avs-cpufreq.txt b/Documentation/devicetree/bindings/cpufreq/brcm-avs-cpufreq.txt
> new file mode 100644
> index 0000000..707ebe5
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/cpufreq/brcm-avs-cpufreq.txt
> @@ -0,0 +1,84 @@
> +Broadcom AVS CPUfreq driver
> +===========================
> +
> +This driver provides voltage and frequency scaling on Broadcom SoCs using

Bindings describe h/w (or firmware interfaces) not drivers. CPUFreq is a 
Linux term. Please re-word.

> +the AVS firmware with DVFS support. The AVS firmware is running on its own
> +co-processor. The driver supports both uniprocessor (UP) and symmetric
> +multiprocessor (SMP) systems which share clock and voltage across all CPUs.
> +
> +Actual voltage and frequency scaling is done solely by the AVS firmware.
> +This driver does not change frequency or voltage itself. It provides a
> +standard CPUfreq interface to the rest of the kernel and to userland. It
> +interfaces with the AVS firmware to effect the requested changes and to
> +report back the current system status in a way that is expected by existing
> +tools.
> +
> +This driver requires two DT nodes. One node (brcm,avs-cpu-data-mem)
> +references the mailbox register used to communicate with the AVS CPU. The
> +second node (brcm,avs-cpu-l2-intr) is required to trigger an interrupt on
> +the AVS CPU. The interrupt tells the AVS CPU that it needs to process a
> +command sent to it by this driver. Interrupting the AVS CPU is mandatory for
> +commands to be processed.

The mailbox and interrupt to the AVS CPU are only for DVFS? 
--
To unsubscribe from this list: send the line "unsubscribe linux-pm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Markus Mayer Sept. 12, 2016, 5:05 p.m. UTC | #2
On 16 August 2016 at 06:16, Rob Herring <robh@kernel.org> wrote:
> On Fri, Aug 12, 2016 at 04:25:29PM -0700, Markus Mayer wrote:
>> Add the binding document for the new brcm-avs-cpufreq driver.
>>
>> Signed-off-by: Markus Mayer <mmayer@broadcom.com>
>> ---
>>  .../bindings/cpufreq/brcm-avs-cpufreq.txt          | 84 ++++++++++++++++++++++
>>  MAINTAINERS                                        |  7 ++
>>  2 files changed, 91 insertions(+)
>>  create mode 100644 Documentation/devicetree/bindings/cpufreq/brcm-avs-cpufreq.txt
>>
>> diff --git a/Documentation/devicetree/bindings/cpufreq/brcm-avs-cpufreq.txt b/Documentation/devicetree/bindings/cpufreq/brcm-avs-cpufreq.txt
>> new file mode 100644
>> index 0000000..707ebe5
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/cpufreq/brcm-avs-cpufreq.txt
>> @@ -0,0 +1,84 @@
>> +Broadcom AVS CPUfreq driver
>> +===========================
>> +
>> +This driver provides voltage and frequency scaling on Broadcom SoCs using
>
> Bindings describe h/w (or firmware interfaces) not drivers. CPUFreq is a
> Linux term. Please re-word.

Will do.

>> +the AVS firmware with DVFS support. The AVS firmware is running on its own
>> +co-processor. The driver supports both uniprocessor (UP) and symmetric
>> +multiprocessor (SMP) systems which share clock and voltage across all CPUs.
>> +
>> +Actual voltage and frequency scaling is done solely by the AVS firmware.
>> +This driver does not change frequency or voltage itself. It provides a
>> +standard CPUfreq interface to the rest of the kernel and to userland. It
>> +interfaces with the AVS firmware to effect the requested changes and to
>> +report back the current system status in a way that is expected by existing
>> +tools.
>> +
>> +This driver requires two DT nodes. One node (brcm,avs-cpu-data-mem)
>> +references the mailbox register used to communicate with the AVS CPU. The
>> +second node (brcm,avs-cpu-l2-intr) is required to trigger an interrupt on
>> +the AVS CPU. The interrupt tells the AVS CPU that it needs to process a
>> +command sent to it by this driver. Interrupting the AVS CPU is mandatory for
>> +commands to be processed.
>
> The mailbox and interrupt to the AVS CPU are only for DVFS?

Yes, it is. -- The AVS CPU can run in DFS and DVFS mode. But I don't
think you are looking at that kind of distinction here. Linux wouldn't
even notice the difference between the two. (Linux can ask the
firmware "which mode you are in", but it doesn't have to.)

Thanks,
-Markus
--
To unsubscribe from this list: send the line "unsubscribe linux-pm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/Documentation/devicetree/bindings/cpufreq/brcm-avs-cpufreq.txt b/Documentation/devicetree/bindings/cpufreq/brcm-avs-cpufreq.txt
new file mode 100644
index 0000000..707ebe5
--- /dev/null
+++ b/Documentation/devicetree/bindings/cpufreq/brcm-avs-cpufreq.txt
@@ -0,0 +1,84 @@ 
+Broadcom AVS CPUfreq driver
+===========================
+
+This driver provides voltage and frequency scaling on Broadcom SoCs using
+the AVS firmware with DVFS support. The AVS firmware is running on its own
+co-processor. The driver supports both uniprocessor (UP) and symmetric
+multiprocessor (SMP) systems which share clock and voltage across all CPUs.
+
+Actual voltage and frequency scaling is done solely by the AVS firmware.
+This driver does not change frequency or voltage itself. It provides a
+standard CPUfreq interface to the rest of the kernel and to userland. It
+interfaces with the AVS firmware to effect the requested changes and to
+report back the current system status in a way that is expected by existing
+tools.
+
+This driver requires two DT nodes. One node (brcm,avs-cpu-data-mem)
+references the mailbox register used to communicate with the AVS CPU. The
+second node (brcm,avs-cpu-l2-intr) is required to trigger an interrupt on
+the AVS CPU. The interrupt tells the AVS CPU that it needs to process a
+command sent to it by this driver. Interrupting the AVS CPU is mandatory for
+commands to be processed.
+
+It also requires a reference to the AVS host interrrupt controller, so the
+driver can react to interrupts generated by the AVS CPU whenever a command
+has been processed. See [1] for more information on the brcm,l2-intc.
+
+[1] Documentation/devicetree/bindings/interrupt-controller/brcm,l2-intc.txt
+
+
+Node brcm,avs-cpu-data-mem
+--------------------------
+
+Required properties:
+- compatible: Sould be one of: brcm,avs-cpu-data-mem,
+              brcm,bcm7271-avs-cpu-data-mem or brcm,bcm7268-avs-cpu-data-mem
+- reg: Specifies base physical address and size of the registers.
+- interrupts: The interrupt that the AVS CPU will use to interrupt the host
+              when a command completed.
+- interrupt-parent: The interrupt controller the above interrupt is routed
+                    through.
+- interrupt-names: The name of the interrupt used to interrupt the host.
+
+Optional properties:
+- None
+
+Node brcm,avs-cpu-l2-intr
+-------------------------
+
+Required properties:
+- compatible: Sould be one of: brcm,avs-cpu-l2-intr,
+              brcm,bcm7271-avs-cpu-l2-intr or brcm,bcm7268-avs-cpu-l2-intr
+- reg: Specifies base physical address and size of the registers.
+
+Optional properties:
+- None
+
+
+Example
+=======
+
+	avs_host_l2_intc: interrupt-controller@f04d1200 {                
+		#interrupt-cells = <1>;                                  
+		compatible = "brcm,l2-intc";                             
+		interrupt-parent = <&intc>;                              
+		reg = <0xf04d1200 0x48>;                                 
+		interrupt-controller;                                    
+		interrupts = <0x0 0x19 0x0>;                             
+		interrupt-names = "avs";                                 
+	};                                                               
+
+	avs-cpu-data-mem@f04c4000 {
+		compatible = "brcm,bcm7271-avs-cpu-data-mem",
+				"brcm,avs-cpu-data-mem";
+		reg = <0xf04c4000 0x60>;
+		interrupts = <0x1a>;
+		interrupt-parent = <&avs_host_l2_intc>;
+		interrupt-names = "sw_intr";
+	};
+
+	avs-cpu-l2-intr@f04d1100 {
+		compatible = "brcm,bcm7271-avs-cpu-l2-intr",
+				"brcm,avs-cpu-l2-intr";
+		reg = <0xf04d1100 0x10>;
+	};
diff --git a/MAINTAINERS b/MAINTAINERS
index 20bb1d0..228a5a8 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -2689,6 +2689,13 @@  L:	bcm-kernel-feedback-list@broadcom.com
 S:	Maintained
 F:	drivers/mtd/nand/brcmnand/
 
+BROADCOM STB CPUFREQ DRIVER
+M:	Markus Mayer <mmayer@broadcom.com>
+M:	bcm-kernel-feedback-list@broadcom.com
+L:	linux-pm@vger.kernel.org
+S:	Maintained
+F:	Documentation/devicetree/bindings/cpufreq/brcm-avs-cpufreq.txt
+
 BROADCOM SPECIFIC AMBA DRIVER (BCMA)
 M:	Rafał Miłecki <zajec5@gmail.com>
 L:	linux-wireless@vger.kernel.org