[parent not found: <1435355419-23602-1-git-send-email-bjorn.andersson-/MT0OVThwyLZJqsBc5GL+g@public.gmane.org>]
* [PATCH v2 01/11] soc: qcom: Add device tree binding for SMEM
[not found] ` <1435355419-23602-1-git-send-email-bjorn.andersson-/MT0OVThwyLZJqsBc5GL+g@public.gmane.org>
@ 2015-06-26 21:50 ` bjorn-UYDU3/A3LUY
2015-07-08 23:56 ` Stephen Boyd
2015-07-23 20:49 ` Andy Gross
0 siblings, 2 replies; 25+ messages in thread
From: bjorn-UYDU3/A3LUY @ 2015-06-26 21:50 UTC (permalink / raw)
To: Andy Gross, Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell,
Kumar Gala
Cc: Jeffrey Hugo, devicetree-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
linux-arm-msm-u79uwXL29TY76Z2rM5mHXA
From: Bjorn Andersson <bjorn.andersson-/MT0OVThwyLZJqsBc5GL+g@public.gmane.org>
Add device tree binding documentation for the Qualcom Shared Memory
Manager.
Signed-off-by: Bjorn Andersson <bjorn.andersson-/MT0OVThwyLZJqsBc5GL+g@public.gmane.org>
---
.../devicetree/bindings/soc/qcom/qcom,smem.txt | 51 ++++++++++++++++++++++
1 file changed, 51 insertions(+)
create mode 100644 Documentation/devicetree/bindings/soc/qcom/qcom,smem.txt
diff --git a/Documentation/devicetree/bindings/soc/qcom/qcom,smem.txt b/Documentation/devicetree/bindings/soc/qcom/qcom,smem.txt
new file mode 100644
index 0000000..19cad6c
--- /dev/null
+++ b/Documentation/devicetree/bindings/soc/qcom/qcom,smem.txt
@@ -0,0 +1,51 @@
+Qualcomm Shared Memory Manager binding
+
+This binding describes the Qualcomm Shared Memory Manager, used to share data
+between various subsystems and OSes in Qualcomm platforms.
+
+- compatible:
+ Usage: required
+ Value type: <stringlist>
+ Definition: must be:
+ "qcom,smem"
+
+- memory-region:
+ Usage: required
+ Value type: <prop-encoded-array>
+ Definition: handle to memory reservation for main SMEM memory region.
+
+- reg:
+ Usage: optional
+ Value type: <prop-encoded-array>
+ Definition: base address and size pair for any additional memory areas
+ of the shared memory.
+
+- hwlocks:
+ Usage: required
+ Value type: <prop-encoded-array>
+ Definition: reference to a hwspinlock used to protect allocations from
+ the shared memory
+
+= EXAMPLE
+The following example shows the SMEM setup for MSM8974, with a main SMEM region
+at 0xfa00000 and an auxiliary region at 0xfc428000:
+
+ reserved-memory {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges;
+
+ smem_region: smem@fa00000 {
+ reg = <0xfa00000 0x200000>;
+ no-map;
+ };
+ };
+
+ smem@fa00000 {
+ compatible = "qcom,smem";
+
+ memory-region = <&smem_region>;
+ reg = <0xfc428000 0x4000>;
+
+ hwlocks = <&tcsr_mutex 3>;
+ };
--
1.9.3 (Apple Git-50)
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 25+ messages in thread
* Re: [PATCH v2 01/11] soc: qcom: Add device tree binding for SMEM
2015-06-26 21:50 ` [PATCH v2 01/11] soc: qcom: Add device tree binding for SMEM bjorn-UYDU3/A3LUY
@ 2015-07-08 23:56 ` Stephen Boyd
2015-07-09 3:50 ` Andy Gross
[not found] ` <559DB8B2.2090202-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2015-07-23 20:49 ` Andy Gross
1 sibling, 2 replies; 25+ messages in thread
From: Stephen Boyd @ 2015-07-08 23:56 UTC (permalink / raw)
To: bjorn, Andy Gross, Rob Herring, Pawel Moll, Mark Rutland,
Ian Campbell, Kumar Gala
Cc: Jeffrey Hugo, devicetree, linux-kernel, linux-arm-msm
On 06/26/2015 02:50 PM, bjorn@kryo.se wrote:
> += EXAMPLE
> +The following example shows the SMEM setup for MSM8974, with a main SMEM region
> +at 0xfa00000 and an auxiliary region at 0xfc428000:
> +
> + reserved-memory {
> + #address-cells = <1>;
> + #size-cells = <1>;
> + ranges;
> +
> + smem_region: smem@fa00000 {
> + reg = <0xfa00000 0x200000>;
> + no-map;
> + };
> + };
> +
> + smem@fa00000 {
This should be smem@fc428000 matching the first reg property. It's weird
though, because if smem is using a secondary region it will be under the
SoC node and have a reg property. Otherwise it would be directly under
the root node and only have a memory-region. It would be nice if we
could somehow move the rpm message ram (0xfc428000) into the
reserved-memory node so that we could use memory-region for both regions.
> + compatible = "qcom,smem";
> +
> + memory-region = <&smem_region>;
> + reg = <0xfc428000 0x4000>;
> +
> + hwlocks = <&tcsr_mutex 3>;
> + };
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH v2 01/11] soc: qcom: Add device tree binding for SMEM
2015-07-08 23:56 ` Stephen Boyd
@ 2015-07-09 3:50 ` Andy Gross
[not found] ` <559DB8B2.2090202-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
1 sibling, 0 replies; 25+ messages in thread
From: Andy Gross @ 2015-07-09 3:50 UTC (permalink / raw)
To: Stephen Boyd
Cc: bjorn, Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell,
Kumar Gala, Jeffrey Hugo, devicetree, linux-kernel, linux-arm-msm
On Wed, Jul 08, 2015 at 04:56:34PM -0700, Stephen Boyd wrote:
> On 06/26/2015 02:50 PM, bjorn@kryo.se wrote:
> > += EXAMPLE
> > +The following example shows the SMEM setup for MSM8974, with a main SMEM region
> > +at 0xfa00000 and an auxiliary region at 0xfc428000:
> > +
> > + reserved-memory {
> > + #address-cells = <1>;
> > + #size-cells = <1>;
> > + ranges;
> > +
> > + smem_region: smem@fa00000 {
> > + reg = <0xfa00000 0x200000>;
> > + no-map;
> > + };
> > + };
> > +
> > + smem@fa00000 {
>
> This should be smem@fc428000 matching the first reg property. It's weird
> though, because if smem is using a secondary region it will be under the
> SoC node and have a reg property. Otherwise it would be directly under
> the root node and only have a memory-region. It would be nice if we
> could somehow move the rpm message ram (0xfc428000) into the
> reserved-memory node so that we could use memory-region for both regions.
The memory-region is just used to describe 'real' memory. The RPM message is IO
memory and part of the SOC. Thats my take at least.
>
> > + compatible = "qcom,smem";
> > +
> > + memory-region = <&smem_region>;
> > + reg = <0xfc428000 0x4000>;
> > +
> > + hwlocks = <&tcsr_mutex 3>;
> > + };
--
Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
^ permalink raw reply [flat|nested] 25+ messages in thread
[parent not found: <559DB8B2.2090202-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>]
* Re: [PATCH v2 01/11] soc: qcom: Add device tree binding for SMEM
[not found] ` <559DB8B2.2090202-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
@ 2015-07-13 22:30 ` Bjorn Andersson
0 siblings, 0 replies; 25+ messages in thread
From: Bjorn Andersson @ 2015-07-13 22:30 UTC (permalink / raw)
To: Stephen Boyd
Cc: bjorn-UYDU3/A3LUY, Andy Gross, Rob Herring, Pawel Moll,
Mark Rutland, Ian Campbell, Kumar Gala, Jeffrey Hugo,
devicetree-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
linux-arm-msm-u79uwXL29TY76Z2rM5mHXA
On Wed 08 Jul 16:56 PDT 2015, Stephen Boyd wrote:
> On 06/26/2015 02:50 PM, bjorn-UYDU3/A3LUY@public.gmane.org wrote:
> > += EXAMPLE
> > +The following example shows the SMEM setup for MSM8974, with a main SMEM region
> > +at 0xfa00000 and an auxiliary region at 0xfc428000:
> > +
> > + reserved-memory {
> > + #address-cells = <1>;
> > + #size-cells = <1>;
> > + ranges;
> > +
> > + smem_region: smem@fa00000 {
> > + reg = <0xfa00000 0x200000>;
> > + no-map;
> > + };
> > + };
> > +
> > + smem@fa00000 {
>
> This should be smem@fc428000 matching the first reg property. It's weird
> though, because if smem is using a secondary region it will be under the
> SoC node and have a reg property. Otherwise it would be directly under
> the root node and only have a memory-region. It would be nice if we
> could somehow move the rpm message ram (0xfc428000) into the
> reserved-memory node so that we could use memory-region for both regions.
>
I agree, the semantics here became a little bit odd.
I do not think we should list the 0xfc428000 region as a memory-region,
as it's "device memory" and I do like the fact that we don't repeat
ourselves with listing the memory-region as a reg.
Therefor I think this is the least ugly option, but the address in the
name of the node should be updated.
> > + compatible = "qcom,smem";
> > +
> > + memory-region = <&smem_region>;
> > + reg = <0xfc428000 0x4000>;
> > +
> > + hwlocks = <&tcsr_mutex 3>;
> > + };
>
Thanks,
Bjorn
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH v2 01/11] soc: qcom: Add device tree binding for SMEM
2015-06-26 21:50 ` [PATCH v2 01/11] soc: qcom: Add device tree binding for SMEM bjorn-UYDU3/A3LUY
2015-07-08 23:56 ` Stephen Boyd
@ 2015-07-23 20:49 ` Andy Gross
1 sibling, 0 replies; 25+ messages in thread
From: Andy Gross @ 2015-07-23 20:49 UTC (permalink / raw)
To: bjorn
Cc: Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala,
Jeffrey Hugo, devicetree, linux-kernel, linux-arm-msm
On Fri, Jun 26, 2015 at 02:50:09PM -0700, bjorn@kryo.se wrote:
> From: Bjorn Andersson <bjorn.andersson@sonymobile.com>
>
> Add device tree binding documentation for the Qualcom Shared Memory
> Manager.
>
> Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
<snip>
> + smem@fa00000 {
> + compatible = "qcom,smem";
> +
> + memory-region = <&smem_region>;
> + reg = <0xfc428000 0x4000>;
I'll fixup the address here before applying.
Applied, thanks!
--
Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
^ permalink raw reply [flat|nested] 25+ messages in thread
* [PATCH v2 03/11] soc: qcom: Add device tree binding for Shared Memory Device
2015-06-26 21:50 [PATCH v2 00/11] Qualcomm Shared Memory & RPM drivers bjorn
[not found] ` <1435355419-23602-1-git-send-email-bjorn.andersson-/MT0OVThwyLZJqsBc5GL+g@public.gmane.org>
@ 2015-06-26 21:50 ` bjorn
2015-06-26 21:50 ` [PATCH v2 05/11] mfd: devicetree: bindings: Add Qualcomm SMD based RPM DT binding bjorn
` (4 subsequent siblings)
6 siblings, 0 replies; 25+ messages in thread
From: bjorn @ 2015-06-26 21:50 UTC (permalink / raw)
To: Andy Gross, Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell,
Kumar Gala
Cc: devicetree, linux-kernel, Jeffrey Hugo, linux-arm-msm
From: Bjorn Andersson <bjorn.andersson@sonymobile.com>
Add device tree binding documentation for the Qualcomm Shared Memory
Device, used for communication between the various CPUs in the Qualcomm
SoCs.
Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
---
.../devicetree/bindings/soc/qcom/qcom,smd.txt | 79 ++++++++++++++++++++++
1 file changed, 79 insertions(+)
create mode 100644 Documentation/devicetree/bindings/soc/qcom/qcom,smd.txt
diff --git a/Documentation/devicetree/bindings/soc/qcom/qcom,smd.txt b/Documentation/devicetree/bindings/soc/qcom/qcom,smd.txt
new file mode 100644
index 0000000..f65c76d
--- /dev/null
+++ b/Documentation/devicetree/bindings/soc/qcom/qcom,smd.txt
@@ -0,0 +1,79 @@
+Qualcomm Shared Memory Driver (SMD) binding
+
+This binding describes the Qualcomm Shared Memory Driver, a fifo based
+communication channel for sending data between the various subsystems in
+Qualcomm platforms.
+
+- compatible:
+ Usage: required
+ Value type: <stringlist>
+ Definition: must be "qcom,smd"
+
+= EDGES
+
+Each subnode of the SMD node represents a remote subsystem or a remote
+processor of some sort - or in SMD language an "edge". The name of the edges
+are not important.
+The edge is described by the following properties:
+
+- interrupts:
+ Usage: required
+ Value type: <prop-encoded-array>
+ Definition: should specify the IRQ used by the remote processor to
+ signal this processor about communication related updates
+
+- qcom,ipc:
+ Usage: required
+ Value type: <prop-encoded-array>
+ Definition: three entries specifying the outgoing ipc bit used for
+ signaling the remote processor:
+ - phandle to a syscon node representing the apcs registers
+ - u32 representing offset to the register within the syscon
+ - u32 representing the ipc bit within the register
+
+- qcom,smd-edge:
+ Usage: required
+ Value type: <u32>
+ Definition: the identifier of the remote processor in the smd channel
+ allocation table
+
+= SMD DEVICES
+
+In turn, subnodes of the "edges" represent devices tied to SMD channels on that
+"edge". The names of the devices are not important. The properties of these
+nodes are defined by the individual bindings for the SMD devices - but must
+contain the following property:
+
+- qcom,smd-channels:
+ Usage: required
+ Value type: <stringlist>
+ Definition: a list of channels tied to this device, used for matching
+ the device to channels
+
+= EXAMPLE
+
+The following example represents a smd node, with one edge representing the
+"rpm" subsystem. For the "rpm" subsystem we have a device tied to the
+"rpm_request" channel.
+
+ 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";
+
+ ...
+ };
+ };
+ };
--
1.9.3 (Apple Git-50)
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [PATCH v2 05/11] mfd: devicetree: bindings: Add Qualcomm SMD based RPM DT binding
2015-06-26 21:50 [PATCH v2 00/11] Qualcomm Shared Memory & RPM drivers bjorn
[not found] ` <1435355419-23602-1-git-send-email-bjorn.andersson-/MT0OVThwyLZJqsBc5GL+g@public.gmane.org>
2015-06-26 21:50 ` [PATCH v2 03/11] soc: qcom: Add device tree binding for Shared Memory Device bjorn
@ 2015-06-26 21:50 ` bjorn
2015-07-07 12:16 ` Lee Jones
2015-06-26 21:50 ` [PATCH v2 08/11] ARM: dts: msm8974: Add tcsr mutex node bjorn
` (3 subsequent siblings)
6 siblings, 1 reply; 25+ messages in thread
From: bjorn @ 2015-06-26 21:50 UTC (permalink / raw)
To: Andy Gross, Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell,
Kumar Gala, Lee Jones, Samuel Ortiz
Cc: devicetree, Mark Brown, linux-kernel, linux-arm-msm
From: Bjorn Andersson <bjorn.andersson@sonymobile.com>
Add binding documentation for the Qualcomm Resource Power Manager (RPM)
using shared memory (Qualcomm SMD) as transport mechanism. This is found
in 8974 and newer based devices.
The binding currently describes the rpm itself and the regulator
subnodes.
Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
---
.../devicetree/bindings/mfd/qcom-rpm-smd.txt | 117 +++++++++++++++++++++
include/dt-bindings/mfd/qcom-smd-rpm.h | 28 +++++
2 files changed, 145 insertions(+)
create mode 100644 Documentation/devicetree/bindings/mfd/qcom-rpm-smd.txt
create mode 100644 include/dt-bindings/mfd/qcom-smd-rpm.h
diff --git a/Documentation/devicetree/bindings/mfd/qcom-rpm-smd.txt b/Documentation/devicetree/bindings/mfd/qcom-rpm-smd.txt
new file mode 100644
index 0000000..e27f5c4
--- /dev/null
+++ b/Documentation/devicetree/bindings/mfd/qcom-rpm-smd.txt
@@ -0,0 +1,117 @@
+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.
+
+- compatible:
+ Usage: required
+ Value type: <string>
+ Definition: must be one of:
+ "qcom,rpm-msm8974"
+
+- qcom,smd-channels:
+ Usage: required
+ Value type: <stringlist>
+ Definition: Shared Memory channel used for communication with the RPM
+
+= SUBDEVICES
+
+The RPM exposes resources to its subnodes. The below bindings specify the set
+of valid subnodes that can operate on these resources.
+
+== Regulators
+
+Regulator nodes are identified by their compatible:
+
+- compatible:
+ Usage: required
+ Value type: <string>
+ Definition: must be one of:
+ "qcom,rpm-pm8841-regulators"
+ "qcom,rpm-pm8941-regulators"
+
+- vdd_s1-supply:
+- vdd_s2-supply:
+- vdd_s3-supply:
+- vdd_s4-supply:
+- vdd_s5-supply:
+- vdd_s6-supply:
+- vdd_s7-supply:
+- vdd_s8-supply:
+ Usage: optional (pm8841 only)
+ Value type: <phandle>
+ Definition: reference to regulator supplying the input pin, as
+ described in the data sheet
+
+- vdd_s1-supply:
+- vdd_s2-supply:
+- vdd_s3-supply:
+- vdd_l1_l3-supply:
+- vdd_l2_lvs1_2_3-supply:
+- vdd_l4_l11-supply:
+- vdd_l5_l7-supply:
+- vdd_l6_l12_l14_l15-supply:
+- vdd_l8_l16_l18_l19-supply:
+- vdd_l9_l10_l17_l22-supply:
+- vdd_l13_l20_l23_l24-supply:
+- vdd_l21-supply:
+- vin_5vs-supply:
+ Usage: optional (pm8941 only)
+ Value type: <phandle>
+ Definition: reference to regulator supplying the input pin, as
+ described in the data sheet
+
+The regulator node houses sub-nodes for each regulator within the device. Each
+sub-node is identified using the node's name, with valid values listed for each
+of the pmics below.
+
+pm8841:
+ s1, s2, s3, s4, s5, s6, s7, s8
+
+pm8941:
+ s1, s2, s3, s4, l1, l2, l3, l4, l5, l6, l7, l8, l9, l10, l11, l12, l13,
+ l14, l15, l16, l17, l18, l19, l20, l21, l22, l23, l24, lvs1, lvs2,
+ lvs3, 5vs1, 5vs2
+
+The content of each sub-node is defined by the standard binding for regulators -
+see regulator.txt.
+
+= EXAMPLE
+
+ 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";
+
+ pm8941-regulators {
+ compatible = "qcom,rpm-pm8941-regulators";
+ vdd_l13_l20_l23_l24-supply = <&pm8941_boost>;
+
+ pm8941_s3: s3 {
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ };
+
+ pm8941_boost: s4 {
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ };
+
+ pm8941_l20: l20 {
+ regulator-min-microvolt = <2950000>;
+ regulator-max-microvolt = <2950000>;
+ };
+ };
+ };
+ };
+ };
+
diff --git a/include/dt-bindings/mfd/qcom-smd-rpm.h b/include/dt-bindings/mfd/qcom-smd-rpm.h
new file mode 100644
index 0000000..890ca52
--- /dev/null
+++ b/include/dt-bindings/mfd/qcom-smd-rpm.h
@@ -0,0 +1,28 @@
+/*
+ * This header provides constants for the Qualcomm RPM bindings.
+ */
+
+#ifndef _DT_BINDINGS_MFD_QCOM_SMD_RPM_H
+#define _DT_BINDINGS_MFD_QCOM_SMD_RPM_H
+
+/*
+ * Constants used for addressing resources in the RPM.
+ */
+#define QCOM_SMD_RPM_BUS_CLK 0x316b6c63
+#define QCOM_SMD_RPM_BUS_MASTER 0x73616d62
+#define QCOM_SMD_RPM_BUS_SLAVE 0x766c7362
+#define QCOM_SMD_RPM_CLK_BUF_A 0x616B6C63
+#define QCOM_SMD_RPM_LDOA 0x616f646c
+#define QCOM_SMD_RPM_LDOB 0x626F646C
+#define QCOM_SMD_RPM_MEM_CLK 0x326b6c63
+#define QCOM_SMD_RPM_MISC_CLK 0x306b6c63
+#define QCOM_SMD_RPM_NCPA 0x6170636E
+#define QCOM_SMD_RPM_NCPB 0x6270636E
+#define QCOM_SMD_RPM_OCMEM_PWR 0x706d636f
+#define QCOM_SMD_RPM_QPIC_CLK 0x63697071
+#define QCOM_SMD_RPM_SMPA 0x61706d73
+#define QCOM_SMD_RPM_SMPB 0x62706d73
+#define QCOM_SMD_RPM_SPDM 0x63707362
+#define QCOM_SMD_RPM_VSA 0x00617376
+
+#endif
--
1.9.3 (Apple Git-50)
^ permalink raw reply related [flat|nested] 25+ messages in thread
* Re: [PATCH v2 05/11] mfd: devicetree: bindings: Add Qualcomm SMD based RPM DT binding
2015-06-26 21:50 ` [PATCH v2 05/11] mfd: devicetree: bindings: Add Qualcomm SMD based RPM DT binding bjorn
@ 2015-07-07 12:16 ` Lee Jones
2015-07-13 21:48 ` Bjorn Andersson
0 siblings, 1 reply; 25+ messages in thread
From: Lee Jones @ 2015-07-07 12:16 UTC (permalink / raw)
To: bjorn
Cc: Andy Gross, Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell,
Kumar Gala, Samuel Ortiz, devicetree, Mark Brown, linux-kernel,
linux-arm-msm
FAO Mark and DT chaps,
> From: Bjorn Andersson <bjorn.andersson@sonymobile.com>
>
> Add binding documentation for the Qualcomm Resource Power Manager (RPM)
> using shared memory (Qualcomm SMD) as transport mechanism. This is found
> in 8974 and newer based devices.
>
> The binding currently describes the rpm itself and the regulator
> subnodes.
>
> Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
> ---
> .../devicetree/bindings/mfd/qcom-rpm-smd.txt | 117 +++++++++++++++++++++
> include/dt-bindings/mfd/qcom-smd-rpm.h | 28 +++++
> 2 files changed, 145 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/mfd/qcom-rpm-smd.txt
> create mode 100644 include/dt-bindings/mfd/qcom-smd-rpm.h
>
> diff --git a/Documentation/devicetree/bindings/mfd/qcom-rpm-smd.txt b/Documentation/devicetree/bindings/mfd/qcom-rpm-smd.txt
> new file mode 100644
> index 0000000..e27f5c4
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/mfd/qcom-rpm-smd.txt
> @@ -0,0 +1,117 @@
> +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.
> +
> +- compatible:
> + Usage: required
> + Value type: <string>
> + Definition: must be one of:
> + "qcom,rpm-msm8974"
> +
> +- qcom,smd-channels:
> + Usage: required
> + Value type: <stringlist>
> + Definition: Shared Memory channel used for communication with the RPM
This is going to require a DT Ack.
Also, I don't see it being used anywhere.
> += SUBDEVICES
> +
> +The RPM exposes resources to its subnodes. The below bindings specify the set
> +of valid subnodes that can operate on these resources.
> +
> +== Regulators
> +
> +Regulator nodes are identified by their compatible:
> +
> +- compatible:
> + Usage: required
> + Value type: <string>
> + Definition: must be one of:
> + "qcom,rpm-pm8841-regulators"
> + "qcom,rpm-pm8941-regulators"
> +
> +- vdd_s1-supply:
> +- vdd_s2-supply:
> +- vdd_s3-supply:
> +- vdd_s4-supply:
> +- vdd_s5-supply:
> +- vdd_s6-supply:
> +- vdd_s7-supply:
> +- vdd_s8-supply:
> + Usage: optional (pm8841 only)
> + Value type: <phandle>
> + Definition: reference to regulator supplying the input pin, as
> + described in the data sheet
> +
> +- vdd_s1-supply:
> +- vdd_s2-supply:
> +- vdd_s3-supply:
> +- vdd_l1_l3-supply:
> +- vdd_l2_lvs1_2_3-supply:
> +- vdd_l4_l11-supply:
> +- vdd_l5_l7-supply:
> +- vdd_l6_l12_l14_l15-supply:
> +- vdd_l8_l16_l18_l19-supply:
> +- vdd_l9_l10_l17_l22-supply:
> +- vdd_l13_l20_l23_l24-supply:
> +- vdd_l21-supply:
> +- vin_5vs-supply:
> + Usage: optional (pm8941 only)
> + Value type: <phandle>
> + Definition: reference to regulator supplying the input pin, as
> + described in the data sheet
> +
> +The regulator node houses sub-nodes for each regulator within the device. Each
> +sub-node is identified using the node's name, with valid values listed for each
> +of the pmics below.
> +
> +pm8841:
> + s1, s2, s3, s4, s5, s6, s7, s8
> +
> +pm8941:
> + s1, s2, s3, s4, l1, l2, l3, l4, l5, l6, l7, l8, l9, l10, l11, l12, l13,
> + l14, l15, l16, l17, l18, l19, l20, l21, l22, l23, l24, lvs1, lvs2,
> + lvs3, 5vs1, 5vs2
> +
> +The content of each sub-node is defined by the standard binding for regulators -
> +see regulator.txt.
s-regulator.txt-../regulator/regulator.txt-
> +
> += EXAMPLE
> +
> + smd {
> + compatible = "qcom,smd";
Is an SMD (Shared Memory Device?) real hardware?
> + rpm {
> + interrupts = <0 168 1>;
> + qcom,ipc = <&apcs 8 0>;
> + qcom,smd-edge = <15>;
The child node won't probe without a compatible string. Shouldn't
"qcom,rpm-msm8974" be in here instead?
> + rpm_requests {
This node appears to be undocumented.
Does it represent real h/w?
> + compatible = "qcom,rpm-msm8974";
> + qcom,smd-channels = "rpm_requests";
> +
> + pm8941-regulators {
> + compatible = "qcom,rpm-pm8941-regulators";
> + vdd_l13_l20_l23_l24-supply = <&pm8941_boost>;
I'd like Mark to glance at this.
> + pm8941_s3: s3 {
> + regulator-min-microvolt = <1800000>;
> + regulator-max-microvolt = <1800000>;
Aren't these fixed regulators?
> + };
> +
> + pm8941_boost: s4 {
> + regulator-min-microvolt = <5000000>;
> + regulator-max-microvolt = <5000000>;
> + };
> +
> + pm8941_l20: l20 {
> + regulator-min-microvolt = <2950000>;
> + regulator-max-microvolt = <2950000>;
> + };
> + };
> + };
> + };
> + };
> +
> diff --git a/include/dt-bindings/mfd/qcom-smd-rpm.h b/include/dt-bindings/mfd/qcom-smd-rpm.h
> new file mode 100644
> index 0000000..890ca52
> --- /dev/null
> +++ b/include/dt-bindings/mfd/qcom-smd-rpm.h
> @@ -0,0 +1,28 @@
> +/*
> + * This header provides constants for the Qualcomm RPM bindings.
> + */
> +
> +#ifndef _DT_BINDINGS_MFD_QCOM_SMD_RPM_H
> +#define _DT_BINDINGS_MFD_QCOM_SMD_RPM_H
> +
> +/*
> + * Constants used for addressing resources in the RPM.
> + */
> +#define QCOM_SMD_RPM_BUS_CLK 0x316b6c63
> +#define QCOM_SMD_RPM_BUS_MASTER 0x73616d62
> +#define QCOM_SMD_RPM_BUS_SLAVE 0x766c7362
> +#define QCOM_SMD_RPM_CLK_BUF_A 0x616B6C63
> +#define QCOM_SMD_RPM_LDOA 0x616f646c
> +#define QCOM_SMD_RPM_LDOB 0x626F646C
> +#define QCOM_SMD_RPM_MEM_CLK 0x326b6c63
> +#define QCOM_SMD_RPM_MISC_CLK 0x306b6c63
> +#define QCOM_SMD_RPM_NCPA 0x6170636E
> +#define QCOM_SMD_RPM_NCPB 0x6270636E
> +#define QCOM_SMD_RPM_OCMEM_PWR 0x706d636f
> +#define QCOM_SMD_RPM_QPIC_CLK 0x63697071
> +#define QCOM_SMD_RPM_SMPA 0x61706d73
> +#define QCOM_SMD_RPM_SMPB 0x62706d73
> +#define QCOM_SMD_RPM_SPDM 0x63707362
> +#define QCOM_SMD_RPM_VSA 0x00617376
> +
> +#endif
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH v2 05/11] mfd: devicetree: bindings: Add Qualcomm SMD based RPM DT binding
2015-07-07 12:16 ` Lee Jones
@ 2015-07-13 21:48 ` Bjorn Andersson
2015-07-23 13:31 ` Lee Jones
0 siblings, 1 reply; 25+ messages in thread
From: Bjorn Andersson @ 2015-07-13 21:48 UTC (permalink / raw)
To: Lee Jones
Cc: bjorn, Andy Gross, Rob Herring, Pawel Moll, Mark Rutland,
Ian Campbell, Kumar Gala, Samuel Ortiz, devicetree, Mark Brown,
linux-kernel, linux-arm-msm
On Tue 07 Jul 05:16 PDT 2015, Lee Jones wrote:
> FAO Mark and DT chaps,
>
> > From: Bjorn Andersson <bjorn.andersson@sonymobile.com>
> >
> > Add binding documentation for the Qualcomm Resource Power Manager (RPM)
> > using shared memory (Qualcomm SMD) as transport mechanism. This is found
> > in 8974 and newer based devices.
> >
> > The binding currently describes the rpm itself and the regulator
> > subnodes.
> >
> > Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
> > ---
> > .../devicetree/bindings/mfd/qcom-rpm-smd.txt | 117 +++++++++++++++++++++
> > include/dt-bindings/mfd/qcom-smd-rpm.h | 28 +++++
> > 2 files changed, 145 insertions(+)
> > create mode 100644 Documentation/devicetree/bindings/mfd/qcom-rpm-smd.txt
> > create mode 100644 include/dt-bindings/mfd/qcom-smd-rpm.h
> >
> > diff --git a/Documentation/devicetree/bindings/mfd/qcom-rpm-smd.txt b/Documentation/devicetree/bindings/mfd/qcom-rpm-smd.txt
[..]
> > +- qcom,smd-channels:
> > + Usage: required
> > + Value type: <stringlist>
> > + Definition: Shared Memory channel used for communication with the RPM
>
> This is going to require a DT Ack.
>
> Also, I don't see it being used anywhere.
>
It's a common property of all smd devices, defining the smd channel this
driver should bind to.
> > += SUBDEVICES
> > +
> > +The RPM exposes resources to its subnodes. The below bindings specify the set
> > +of valid subnodes that can operate on these resources.
> > +
> > +== Regulators
> > +
[..]
> > +The content of each sub-node is defined by the standard binding for regulators -
> > +see regulator.txt.
>
> s-regulator.txt-../regulator/regulator.txt-
>
Right.
> > +
> > += EXAMPLE
> > +
> > + smd {
> > + compatible = "qcom,smd";
>
> Is an SMD (Shared Memory Device?) real hardware?
>
SMD is a mechanism for using shared memory for point-to-point
communication channels with remote processors in all Qualcomm platforms.
So it's not hardware, it's the control mechanism for communicating with
real hardware.
> > + rpm {
> > + interrupts = <0 168 1>;
> > + qcom,ipc = <&apcs 8 0>;
> > + qcom,smd-edge = <15>;
>
> The child node won't probe without a compatible string. Shouldn't
> "qcom,rpm-msm8974" be in here instead?
>
These sub-nodes represents a logical grouping of the various channels
that exist to this remote processor. For the rpm there is only the
"rpm_requests" channel - used for sending regulator & clock requests.
> > + rpm_requests {
>
> This node appears to be undocumented.
>
This is the actual rpm device node, the smd & rpm nodes above are
included for completeness of the example.
They should perhaps be dropped to make this clearer.
> Does it represent real h/w?
>
The other end of this smd channel is a micro controller that handles
regulator and clock requests for the platform - so this is hardware.
This is equivalent to the qcom_rpm driver, but instead of a hardware
like register window this uses the same packet based messaging mechanism
that's used for other remote peripherals in the Qualcomm platform.
> > + compatible = "qcom,rpm-msm8974";
> > + qcom,smd-channels = "rpm_requests";
> > +
> > + pm8941-regulators {
> > + compatible = "qcom,rpm-pm8941-regulators";
> > + vdd_l13_l20_l23_l24-supply = <&pm8941_boost>;
>
> I'd like Mark to glance at this.
>
Right.
> > + pm8941_s3: s3 {
> > + regulator-min-microvolt = <1800000>;
> > + regulator-max-microvolt = <1800000>;
>
> Aren't these fixed regulators?
>
In this system configuration most of the regulators have fixed values,
but the regulators (hw) are not fixed.
> > + };
> > +
> > + pm8941_boost: s4 {
> > + regulator-min-microvolt = <5000000>;
> > + regulator-max-microvolt = <5000000>;
> > + };
> > +
> > + pm8941_l20: l20 {
> > + regulator-min-microvolt = <2950000>;
> > + regulator-max-microvolt = <2950000>;
> > + };
> > + };
> > + };
> > + };
> > + };
> > +
Thanks,
Bjorn
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH v2 05/11] mfd: devicetree: bindings: Add Qualcomm SMD based RPM DT binding
2015-07-13 21:48 ` Bjorn Andersson
@ 2015-07-23 13:31 ` Lee Jones
2015-07-23 16:41 ` Bjorn Andersson
0 siblings, 1 reply; 25+ messages in thread
From: Lee Jones @ 2015-07-23 13:31 UTC (permalink / raw)
To: Bjorn Andersson
Cc: bjorn, Andy Gross, Rob Herring, Pawel Moll, Mark Rutland,
Ian Campbell, Kumar Gala, Samuel Ortiz, devicetree, Mark Brown,
linux-kernel, linux-arm-msm
On Mon, 13 Jul 2015, Bjorn Andersson wrote:
> On Tue 07 Jul 05:16 PDT 2015, Lee Jones wrote:
>
> > FAO Mark and DT chaps,
> >
> > > From: Bjorn Andersson <bjorn.andersson@sonymobile.com>
> > >
> > > Add binding documentation for the Qualcomm Resource Power Manager (RPM)
> > > using shared memory (Qualcomm SMD) as transport mechanism. This is found
> > > in 8974 and newer based devices.
> > >
> > > The binding currently describes the rpm itself and the regulator
> > > subnodes.
> > >
> > > Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
> > > ---
> > > .../devicetree/bindings/mfd/qcom-rpm-smd.txt | 117 +++++++++++++++++++++
> > > include/dt-bindings/mfd/qcom-smd-rpm.h | 28 +++++
> > > 2 files changed, 145 insertions(+)
> > > create mode 100644 Documentation/devicetree/bindings/mfd/qcom-rpm-smd.txt
> > > create mode 100644 include/dt-bindings/mfd/qcom-smd-rpm.h
> > >
> > > diff --git a/Documentation/devicetree/bindings/mfd/qcom-rpm-smd.txt b/Documentation/devicetree/bindings/mfd/qcom-rpm-smd.txt
>
> [..]
>
> > > +- qcom,smd-channels:
> > > + Usage: required
> > > + Value type: <stringlist>
> > > + Definition: Shared Memory channel used for communication with the RPM
> >
> > This is going to require a DT Ack.
> >
> > Also, I don't see it being used anywhere.
>
> It's a common property of all smd devices, defining the smd channel this
> driver should bind to.
Well it's not in the kernel and I can't find the patch that uses it,
so my points still stand.
> > > += EXAMPLE
> > > +
> > > + smd {
> > > + compatible = "qcom,smd";
> >
> > Is an SMD (Shared Memory Device?) real hardware?
> >
>
> SMD is a mechanism for using shared memory for point-to-point
> communication channels with remote processors in all Qualcomm platforms.
>
> So it's not hardware, it's the control mechanism for communicating with
> real hardware.
Then you can't have a node for it. Virtual nodes which do not
represent real h/w are not allowed in Device Tree.
> > > + rpm {
> > > + interrupts = <0 168 1>;
> > > + qcom,ipc = <&apcs 8 0>;
> > > + qcom,smd-edge = <15>;
> >
> > The child node won't probe without a compatible string. Shouldn't
> > "qcom,rpm-msm8974" be in here instead?
> >
>
> These sub-nodes represents a logical grouping of the various channels
> that exist to this remote processor. For the rpm there is only the
> "rpm_requests" channel - used for sending regulator & clock requests.
Again, if it's not real h/w and don't have a proper driver, there
should be no reason for this node to exist.
> > > + rpm_requests {
> >
> > This node appears to be undocumented.
>
> This is the actual rpm device node, the smd & rpm nodes above are
> included for completeness of the example.
>
> They should perhaps be dropped to make this clearer.
>
> > Does it represent real h/w?
> >
>
> The other end of this smd channel is a micro controller that handles
> regulator and clock requests for the platform - so this is hardware.
>
> This is equivalent to the qcom_rpm driver, but instead of a hardware
> like register window this uses the same packet based messaging mechanism
> that's used for other remote peripherals in the Qualcomm platform.
This needs a good review by the DT guys.
> > > + compatible = "qcom,rpm-msm8974";
> > > + qcom,smd-channels = "rpm_requests";
> > > +
> > > + pm8941-regulators {
> > > + compatible = "qcom,rpm-pm8941-regulators";
> > > + vdd_l13_l20_l23_l24-supply = <&pm8941_boost>;
> >
> > I'd like Mark to glance at this.
> >
>
> Right.
>
> > > + pm8941_s3: s3 {
> > > + regulator-min-microvolt = <1800000>;
> > > + regulator-max-microvolt = <1800000>;
> >
> > Aren't these fixed regulators?
> >
>
> In this system configuration most of the regulators have fixed values,
> but the regulators (hw) are not fixed.
I'm not sure that's how it works. I believe 'max' and 'min' should
describe the upper and lower constraints of the regulator. The actual
value it runs it is selected elsewhere.
We still need Mark to look at this.
> > > + };
> > > +
> > > + pm8941_boost: s4 {
> > > + regulator-min-microvolt = <5000000>;
> > > + regulator-max-microvolt = <5000000>;
> > > + };
> > > +
> > > + pm8941_l20: l20 {
> > > + regulator-min-microvolt = <2950000>;
> > > + regulator-max-microvolt = <2950000>;
> > > + };
> > > + };
> > > + };
> > > + };
> > > + };
> > > +
>
> Thanks,
> Bjorn
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH v2 05/11] mfd: devicetree: bindings: Add Qualcomm SMD based RPM DT binding
2015-07-23 13:31 ` Lee Jones
@ 2015-07-23 16:41 ` Bjorn Andersson
[not found] ` <20150723164128.GD4753-P9SbAA3LsXe39TS3lRcy0mP6iJigPa5YXqFh9Ls21Oc@public.gmane.org>
0 siblings, 1 reply; 25+ messages in thread
From: Bjorn Andersson @ 2015-07-23 16:41 UTC (permalink / raw)
To: Lee Jones, Mark Brown
Cc: bjorn-UYDU3/A3LUY@public.gmane.org, Andy Gross, Rob Herring,
Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala, Samuel Ortiz,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
On Thu 23 Jul 06:31 PDT 2015, Lee Jones wrote:
> On Mon, 13 Jul 2015, Bjorn Andersson wrote:
>
> > On Tue 07 Jul 05:16 PDT 2015, Lee Jones wrote:
> >
> > > FAO Mark and DT chaps,
> > >
> > > > From: Bjorn Andersson <bjorn.andersson-/MT0OVThwyLZJqsBc5GL+g@public.gmane.org>
> > > >
> > > > Add binding documentation for the Qualcomm Resource Power Manager (RPM)
> > > > using shared memory (Qualcomm SMD) as transport mechanism. This is found
> > > > in 8974 and newer based devices.
> > > >
> > > > The binding currently describes the rpm itself and the regulator
> > > > subnodes.
> > > >
> > > > Signed-off-by: Bjorn Andersson <bjorn.andersson-/MT0OVThwyLZJqsBc5GL+g@public.gmane.org>
> > > > ---
> > > > .../devicetree/bindings/mfd/qcom-rpm-smd.txt | 117 +++++++++++++++++++++
> > > > include/dt-bindings/mfd/qcom-smd-rpm.h | 28 +++++
> > > > 2 files changed, 145 insertions(+)
> > > > create mode 100644 Documentation/devicetree/bindings/mfd/qcom-rpm-smd.txt
> > > > create mode 100644 include/dt-bindings/mfd/qcom-smd-rpm.h
> > > >
> > > > diff --git a/Documentation/devicetree/bindings/mfd/qcom-rpm-smd.txt b/Documentation/devicetree/bindings/mfd/qcom-rpm-smd.txt
> >
> > [..]
> >
> > > > +- qcom,smd-channels:
> > > > + Usage: required
> > > > + Value type: <stringlist>
> > > > + Definition: Shared Memory channel used for communication with the RPM
> > >
> > > This is going to require a DT Ack.
> > >
> > > Also, I don't see it being used anywhere.
> >
> > It's a common property of all smd devices, defining the smd channel this
> > driver should bind to.
>
> Well it's not in the kernel and I can't find the patch that uses it,
> so my points still stand.
>
Patch 3 in this series defines the binding and patch 4 is an
implementation of this binding.
> > > > += EXAMPLE
> > > > +
> > > > + smd {
> > > > + compatible = "qcom,smd";
> > >
> > > Is an SMD (Shared Memory Device?) real hardware?
> > >
> >
> > SMD is a mechanism for using shared memory for point-to-point
> > communication channels with remote processors in all Qualcomm platforms.
> >
> > So it's not hardware, it's the control mechanism for communicating with
> > real hardware.
>
> Then you can't have a node for it. Virtual nodes which do not
> represent real h/w are not allowed in Device Tree.
>
It represent the structure of a Qualcomm platform, but there's not a 1:1
mapping between this node and a discrete component. And without the
information it carries there's no way for us to reach e.g. the RPM -
which is a discrete physical component.
But I understand that this discussion should be held on patch 3 and with
the DT maintainers.
> > > > + rpm {
> > > > + interrupts = <0 168 1>;
> > > > + qcom,ipc = <&apcs 8 0>;
> > > > + qcom,smd-edge = <15>;
> > >
> > > The child node won't probe without a compatible string. Shouldn't
> > > "qcom,rpm-msm8974" be in here instead?
> > >
> >
> > These sub-nodes represents a logical grouping of the various channels
> > that exist to this remote processor. For the rpm there is only the
> > "rpm_requests" channel - used for sending regulator & clock requests.
>
> Again, if it's not real h/w and don't have a proper driver, there
> should be no reason for this node to exist.
>
We need to get hold of the interrupts and that regmap to be able to
communicate with the RPM. If this information is not in DT there will be
no communication - further we can not move it into the RPM node as with
all other remote processors (WiFi, DSP etc) these resources are shared
between a number of drivers.
> > > > + rpm_requests {
> > >
> > > This node appears to be undocumented.
> >
> > This is the actual rpm device node, the smd & rpm nodes above are
> > included for completeness of the example.
> >
> > They should perhaps be dropped to make this clearer.
> >
> > > Does it represent real h/w?
> > >
> >
> > The other end of this smd channel is a micro controller that handles
> > regulator and clock requests for the platform - so this is hardware.
> >
> > This is equivalent to the qcom_rpm driver, but instead of a hardware
> > like register window this uses the same packet based messaging mechanism
> > that's used for other remote peripherals in the Qualcomm platform.
>
> This needs a good review by the DT guys.
>
Sure
> > > > + compatible = "qcom,rpm-msm8974";
> > > > + qcom,smd-channels = "rpm_requests";
> > > > +
> > > > + pm8941-regulators {
> > > > + compatible = "qcom,rpm-pm8941-regulators";
> > > > + vdd_l13_l20_l23_l24-supply = <&pm8941_boost>;
> > >
> > > I'd like Mark to glance at this.
> > >
> >
> > Right.
> >
> > > > + pm8941_s3: s3 {
> > > > + regulator-min-microvolt = <1800000>;
> > > > + regulator-max-microvolt = <1800000>;
> > >
> > > Aren't these fixed regulators?
> > >
> >
> > In this system configuration most of the regulators have fixed values,
> > but the regulators (hw) are not fixed.
>
> I'm not sure that's how it works. I believe 'max' and 'min' should
> describe the upper and lower constraints of the regulator. The actual
> value it runs it is selected elsewhere.
>
The specified range of the regulator is 1.75-1.85V and this is handled
by the implementation, however the board designers have stated that it
is only allowed to be configured to 1.8V.
So DT is used to narrow the capabilities of the individual component to
something that's suitable for this particular system.
> We still need Mark to look at this.
>
Mark, would you mind giving us a statement on the regulator subnode of
this binding?
Regards,
Bjorn
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 25+ messages in thread
* [PATCH v2 08/11] ARM: dts: msm8974: Add tcsr mutex node
2015-06-26 21:50 [PATCH v2 00/11] Qualcomm Shared Memory & RPM drivers bjorn
` (2 preceding siblings ...)
2015-06-26 21:50 ` [PATCH v2 05/11] mfd: devicetree: bindings: Add Qualcomm SMD based RPM DT binding bjorn
@ 2015-06-26 21:50 ` bjorn
[not found] ` <1435355419-23602-9-git-send-email-bjorn.andersson-/MT0OVThwyLZJqsBc5GL+g@public.gmane.org>
2015-06-26 21:50 ` [PATCH v2 09/11] ARM: dts: msm8974: Add smem reservation and node bjorn
` (2 subsequent siblings)
6 siblings, 1 reply; 25+ messages in thread
From: bjorn @ 2015-06-26 21:50 UTC (permalink / raw)
To: Andy Gross
Cc: Mark Rutland, devicetree, Pawel Moll, Ian Campbell, linux-arm-msm,
linux-kernel, Rob Herring, Kumar Gala, linux-arm-kernel
From: Bjorn Andersson <bjorn.andersson@sonymobile.com>
Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
---
arch/arm/boot/dts/qcom-msm8974.dtsi | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/arch/arm/boot/dts/qcom-msm8974.dtsi b/arch/arm/boot/dts/qcom-msm8974.dtsi
index 37b47b5..7c7b7dc 100644
--- a/arch/arm/boot/dts/qcom-msm8974.dtsi
+++ b/arch/arm/boot/dts/qcom-msm8974.dtsi
@@ -220,6 +220,11 @@
reg = <0xfc400000 0x4000>;
};
+ tcsr_mutex_block: syscon@fd484000 {
+ compatible = "syscon";
+ reg = <0xfd484000 0x2000>;
+ };
+
mmcc: clock-controller@fd8c0000 {
compatible = "qcom,mmcc-msm8974";
#clock-cells = <1>;
@@ -227,6 +232,13 @@
reg = <0xfd8c0000 0x6000>;
};
+ tcsr_mutex: tcsr-mutex {
+ compatible = "qcom,tcsr-mutex";
+ syscon = <&tcsr_mutex_block 0 0x80>;
+
+ #hwlock-cells = <1>;
+ };
+
serial@f991e000 {
compatible = "qcom,msm-uartdm-v1.4", "qcom,msm-uartdm";
reg = <0xf991e000 0x1000>;
--
1.9.3 (Apple Git-50)
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [PATCH v2 09/11] ARM: dts: msm8974: Add smem reservation and node
2015-06-26 21:50 [PATCH v2 00/11] Qualcomm Shared Memory & RPM drivers bjorn
` (3 preceding siblings ...)
2015-06-26 21:50 ` [PATCH v2 08/11] ARM: dts: msm8974: Add tcsr mutex node bjorn
@ 2015-06-26 21:50 ` bjorn
2015-07-23 20:51 ` Andy Gross
2015-06-26 21:50 ` [PATCH v2 10/11] ARM: dts: msm8974: Add smd, rpm and regulator nodes bjorn
2015-06-26 21:50 ` [PATCH v2 11/11] ARM: dts: xperia-honami: Add regulator nodes for Honami bjorn
6 siblings, 1 reply; 25+ messages in thread
From: bjorn @ 2015-06-26 21:50 UTC (permalink / raw)
To: Andy Gross
Cc: Mark Rutland, devicetree, Pawel Moll, Ian Campbell, linux-arm-msm,
linux-kernel, Rob Herring, Kumar Gala, linux-arm-kernel
From: Bjorn Andersson <bjorn.andersson@sonymobile.com>
Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
---
arch/arm/boot/dts/qcom-msm8974.dtsi | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/arch/arm/boot/dts/qcom-msm8974.dtsi b/arch/arm/boot/dts/qcom-msm8974.dtsi
index 7c7b7dc..d7c99b8 100644
--- a/arch/arm/boot/dts/qcom-msm8974.dtsi
+++ b/arch/arm/boot/dts/qcom-msm8974.dtsi
@@ -9,6 +9,17 @@
compatible = "qcom,msm8974";
interrupt-parent = <&intc>;
+ reserved-memory {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges;
+
+ smem_region: smem@fa00000 {
+ reg = <0xfa00000 0x200000>;
+ no-map;
+ };
+ };
+
cpus {
#address-cells = <1>;
#size-cells = <0>;
@@ -239,6 +250,15 @@
#hwlock-cells = <1>;
};
+ smem@fa00000 {
+ compatible = "qcom,smem";
+
+ memory-region = <&smem_region>;
+ reg = <0xfc428000 0x4000>;
+
+ hwlocks = <&tcsr_mutex 3>;
+ };
+
serial@f991e000 {
compatible = "qcom,msm-uartdm-v1.4", "qcom,msm-uartdm";
reg = <0xf991e000 0x1000>;
--
1.9.3 (Apple Git-50)
^ permalink raw reply related [flat|nested] 25+ messages in thread
* Re: [PATCH v2 09/11] ARM: dts: msm8974: Add smem reservation and node
2015-06-26 21:50 ` [PATCH v2 09/11] ARM: dts: msm8974: Add smem reservation and node bjorn
@ 2015-07-23 20:51 ` Andy Gross
0 siblings, 0 replies; 25+ messages in thread
From: Andy Gross @ 2015-07-23 20:51 UTC (permalink / raw)
To: bjorn
Cc: Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala,
devicetree, linux-arm-kernel, linux-kernel, linux-arm-msm
On Fri, Jun 26, 2015 at 02:50:17PM -0700, bjorn@kryo.se wrote:
> From: Bjorn Andersson <bjorn.andersson@sonymobile.com>
>
> Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
> ---
Applied, thanks.
--
Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
^ permalink raw reply [flat|nested] 25+ messages in thread
* [PATCH v2 10/11] ARM: dts: msm8974: Add smd, rpm and regulator nodes
2015-06-26 21:50 [PATCH v2 00/11] Qualcomm Shared Memory & RPM drivers bjorn
` (4 preceding siblings ...)
2015-06-26 21:50 ` [PATCH v2 09/11] ARM: dts: msm8974: Add smem reservation and node bjorn
@ 2015-06-26 21:50 ` bjorn
2015-06-26 21:50 ` [PATCH v2 11/11] ARM: dts: xperia-honami: Add regulator nodes for Honami bjorn
6 siblings, 0 replies; 25+ messages in thread
From: bjorn @ 2015-06-26 21:50 UTC (permalink / raw)
To: Andy Gross
Cc: Mark Rutland, devicetree, Pawel Moll, Ian Campbell, linux-arm-msm,
linux-kernel, Rob Herring, Kumar Gala, linux-arm-kernel
From: Bjorn Andersson <bjorn.andersson@sonymobile.com>
Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
---
arch/arm/boot/dts/qcom-msm8974.dtsi | 74 +++++++++++++++++++++++++++++++++++++
1 file changed, 74 insertions(+)
diff --git a/arch/arm/boot/dts/qcom-msm8974.dtsi b/arch/arm/boot/dts/qcom-msm8974.dtsi
index d7c99b8..65f5496 100644
--- a/arch/arm/boot/dts/qcom-msm8974.dtsi
+++ b/arch/arm/boot/dts/qcom-msm8974.dtsi
@@ -114,6 +114,11 @@
<0xf9002000 0x1000>;
};
+ apcs: syscon@f9011000 {
+ compatible = "syscon";
+ reg = <0xf9011000 0x1000>;
+ };
+
timer@f9020000 {
#address-cells = <1>;
#size-cells = <1>;
@@ -334,4 +339,73 @@
#interrupt-cells = <4>;
};
};
+
+ 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";
+
+ pm8841-regulators {
+ compatible = "qcom,rpm-pm8841-regulators";
+
+ pm8841_s1: s1 {};
+ pm8841_s2: s2 {};
+ pm8841_s3: s3 {};
+ pm8841_s4: s4 {};
+ pm8841_s5: s5 {};
+ pm8841_s6: s6 {};
+ pm8841_s7: s7 {};
+ pm8841_s8: s8 {};
+ };
+
+ pm8941-regulators {
+ compatible = "qcom,rpm-pm8941-regulators";
+
+ pm8941_s1: s1 {};
+ pm8941_s2: s2 {};
+ pm8941_s3: s3 {};
+ pm8941_5v: s4 {};
+
+ pm8941_l1: l1 {};
+ pm8941_l2: l2 {};
+ pm8941_l3: l3 {};
+ pm8941_l4: l4 {};
+ pm8941_l5: l5 {};
+ pm8941_l6: l6 {};
+ pm8941_l7: l7 {};
+ pm8941_l8: l8 {};
+ pm8941_l9: l9 {};
+ pm8941_l10: l10 {};
+ pm8941_l11: l11 {};
+ pm8941_l12: l12 {};
+ pm8941_l13: l13 {};
+ pm8941_l14: l14 {};
+ pm8941_l15: l15 {};
+ pm8941_l16: l16 {};
+ pm8941_l17: l17 {};
+ pm8941_l18: l18 {};
+ pm8941_l19: l19 {};
+ pm8941_l20: l20 {};
+ pm8941_l21: l21 {};
+ pm8941_l22: l22 {};
+ pm8941_l23: l23 {};
+ pm8941_l24: l24 {};
+
+ pm8941_lvs1: lvs1 {};
+ pm8941_lvs2: lvs2 {};
+ pm8941_lvs3: lvs3 {};
+
+ pm8941_5vs1: 5vs1 {};
+ pm8941_5vs2: 5vs2 {};
+ };
+ };
+ };
+ };
};
--
1.9.3 (Apple Git-50)
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [PATCH v2 11/11] ARM: dts: xperia-honami: Add regulator nodes for Honami
2015-06-26 21:50 [PATCH v2 00/11] Qualcomm Shared Memory & RPM drivers bjorn
` (5 preceding siblings ...)
2015-06-26 21:50 ` [PATCH v2 10/11] ARM: dts: msm8974: Add smd, rpm and regulator nodes bjorn
@ 2015-06-26 21:50 ` bjorn
6 siblings, 0 replies; 25+ messages in thread
From: bjorn @ 2015-06-26 21:50 UTC (permalink / raw)
To: Andy Gross
Cc: Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala,
devicetree, linux-arm-kernel, linux-kernel, linux-arm-msm
From: Bjorn Andersson <bjorn.andersson@sonymobile.com>
Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
---
.../boot/dts/qcom-msm8974-sony-xperia-honami.dts | 199 +++++++++++++++++++++
1 file changed, 199 insertions(+)
diff --git a/arch/arm/boot/dts/qcom-msm8974-sony-xperia-honami.dts b/arch/arm/boot/dts/qcom-msm8974-sony-xperia-honami.dts
index bd35b06..49605ca 100644
--- a/arch/arm/boot/dts/qcom-msm8974-sony-xperia-honami.dts
+++ b/arch/arm/boot/dts/qcom-msm8974-sony-xperia-honami.dts
@@ -10,10 +10,209 @@
reg = <0 0x40000000>, <0x40000000 0x40000000>;
device_type = "memory";
};
+
+ smd {
+ rpm {
+ rpm_requests {
+ pm8941-regulators {
+ vdd_l1_l3-supply = <&pm8941_s1>;
+ vdd_l2_lvs1_2_3-supply = <&pm8941_s3>;
+ vdd_l4_l11-supply = <&pm8941_s1>;
+ vdd_l5_l7-supply = <&pm8941_s2>;
+ vdd_l6_l12_l14_l15-supply = <&pm8941_s2>;
+ vdd_l9_l10_l17_l22-supply = <&vreg_boost_bypass>;
+ vdd_l13_l20_l23_l24-supply = <&vreg_boost_bypass>;
+ vdd_l21-supply = <&vreg_boost_bypass>;
+ vin_5vs-supply = <&pm8941_5v>;
+
+ s1 {
+ regulator-min-microvolt = <1300000>;
+ regulator-max-microvolt = <1300000>;
+ regulator-always-on;
+ regulator-boot-on;
+ };
+
+ s2 {
+ regulator-min-microvolt = <2150000>;
+ regulator-max-microvolt = <2150000>;
+ regulator-boot-on;
+ };
+
+ s3 {
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-always-on;
+ regulator-boot-on;
+ };
+
+ s4 {
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ };
+
+ l1 {
+ regulator-min-microvolt = <1225000>;
+ regulator-max-microvolt = <1225000>;
+ regulator-always-on;
+ regulator-boot-on;
+ };
+
+ l2 {
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+ };
+
+ l3 {
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+ };
+
+ l4 {
+ regulator-min-microvolt = <1225000>;
+ regulator-max-microvolt = <1225000>;
+ };
+
+ l5 {
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ };
+
+ l6 {
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-boot-on;
+ };
+
+ l7 {
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-boot-on;
+ };
+
+ l8 {
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ };
+
+ l9 {
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <2950000>;
+ };
+
+ l11 {
+ regulator-min-microvolt = <1300000>;
+ regulator-max-microvolt = <1350000>;
+ };
+
+ l12 {
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-boot-on;
+ };
+
+ l13 {
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <2950000>;
+ regulator-boot-on;
+ };
+
+ l14 {
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ };
+
+ l15 {
+ regulator-min-microvolt = <2050000>;
+ regulator-max-microvolt = <2050000>;
+ };
+
+ l16 {
+ regulator-min-microvolt = <2700000>;
+ regulator-max-microvolt = <2700000>;
+ };
+
+ l17 {
+ regulator-min-microvolt = <2700000>;
+ regulator-max-microvolt = <2700000>;
+ };
+
+ l18 {
+ regulator-min-microvolt = <2850000>;
+ regulator-max-microvolt = <2850000>;
+ };
+
+ l19 {
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ };
+
+ l20 {
+ regulator-min-microvolt = <2950000>;
+ regulator-max-microvolt = <2950000>;
+ regulator-boot-on;
+ };
+
+ l21 {
+ regulator-min-microvolt = <2950000>;
+ regulator-max-microvolt = <2950000>;
+ regulator-boot-on;
+ };
+
+ l22 {
+ regulator-min-microvolt = <3000000>;
+ regulator-max-microvolt = <3000000>;
+ };
+
+ l23 {
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <2800000>;
+ };
+
+ l24 {
+ regulator-min-microvolt = <3075000>;
+ regulator-max-microvolt = <3075000>;
+ regulator-boot-on;
+ };
+ };
+ };
+ };
+ };
+
+ vreg_boost_bypass: vreg-boost-bypass {
+ compatible = "regulator-fixed";
+
+ regulator-name = "vreg-boost-bypass";
+ regulator-min-microvolt = <3150000>;
+ regulator-max-microvolt = <3150000>;
+
+ regulator-always-on;
+ regulator-boot-on;
+
+ gpio = <&pm8941_gpios 21 0>;
+ enable-active-high;
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&boost_bypass_en>;
+
+ };
};
&soc {
serial@f991e000 {
status = "ok";
};
+
+};
+
+&spmi_bus {
+ pm8941@0 {
+ gpios@c000 {
+ boost_bypass_en: boost-bypass-en {
+ always-on {
+ pins = "gpio21";
+ function = "normal";
+ };
+ };
+ };
+ };
};
--
1.9.3 (Apple Git-50)
^ permalink raw reply related [flat|nested] 25+ messages in thread