Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
ee98a7d
HACK: don't break GIC
boddob Nov 16, 2016
76951f5
hack disable uart0
Srinivas-Kandagatla Dec 9, 2016
dea3fe3
defconfig
May 2, 2018
00ee013
defconfig updates for sdm845
May 23, 2018
30aa524
Serial DTS node
May 23, 2018
4fbf29d
drivers: qcom: rpmh-rsc: add RPMH controller for QCOM SoCs
May 9, 2018
cd73d06
dt-bindings: introduce RPMH RSC bindings for Qualcomm SoCs
May 9, 2018
893d06e
drivers: qcom: rpmh-rsc: log RPMH requests in FTRACE
May 9, 2018
720e557
drivers: qcom: rpmh: add RPMH helper functions
May 9, 2018
b7f25b2
drivers: qcom: rpmh-rsc: write sleep/wake requests to TCS
May 9, 2018
cd5fd64
drivers: qcom: rpmh-rsc: allow invalidation of sleep/wake TCS
May 9, 2018
8f8cca2
drivers: qcom: rpmh: cache sleep/wake state requests
May 9, 2018
71ecfd1
drivers: qcom: rpmh: allow requests to be sent asynchronously
May 9, 2018
7515b74
drivers: qcom: rpmh: add support for batch RPMH request
May 9, 2018
23b3310
drivers: qcom: rpmh-rsc: allow active requests from wake TCS
May 9, 2018
cf70ddb
Add RPMH DT entry
May 23, 2018
e70e5b2
mmc: sdhci-msm: Adapt the driver to use OPPs to set clocks/performanc…
Mar 16, 2018
ef2345a
dt-bindings: power: Add qcom rpm power domain driver bindings
Mar 16, 2018
c0d05d0
soc: qcom: rpmpd: Add a Power domain driver to model corners
Mar 16, 2018
7c4c26e
soc: qcom: rpmpd: Add support for get/set performance state
Mar 16, 2018
3f2ae5a
arm64: dts: msm8996: Add rpmpd device node
Mar 16, 2018
748d221
dt-bindings: power: Add qcom rpmh power domain driver bindings
Mar 9, 2018
dba6830
soc: qcom: Add RPMh Power domain driver
Mar 9, 2018
287397e
soc: qcom: rpmpd/rpmhpd: Add a max vote on all corners at init
Mar 16, 2018
85f2762
Merge branch 'rpm-powerdomain-post2' into master-rpm-rpmh-pd
Jun 12, 2018
9231ea7
print some logs
May 2, 2018
76bad61
PM / Domains: dt: Allow power-domain property to be a list of specifiers
storulf May 31, 2018
06ffb34
PM / Domains: Don't attach devices in genpd with multi PM domains
storulf May 31, 2018
74990e5
PM / Domains: Split genpd_dev_pm_attach()
storulf May 31, 2018
99b3d70
PM / Domains: Add support for multi PM domains per device to genpd
storulf May 31, 2018
5516930
PM / Domains: Add dev_pm_domain_attach_by_id() to manage multi PM dom…
storulf May 31, 2018
ca67e64
clk: qcom: Add support to request power domain state
Jun 21, 2018
095c4df
clk: qcom: Initialize the genpd class for each clock
Jun 21, 2018
818cdaf
clk: qcom: Add prepare/unprepare clock ops for PLL/RCG
Jun 21, 2018
4da3088
clk: qcom: sdm845: Test code for Multiple genpds
Jun 21, 2018
4fa606f
clk: qcom: sdm845: Test code for Multiple genpds
Jun 21, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 14 additions & 5 deletions Documentation/devicetree/bindings/power/power_domain.txt
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@ Example 3:
==PM domain consumers==

Required properties:
- power-domains : A phandle and PM domain specifier as defined by bindings of
the power controller specified by phandle.
- power-domains : A list of PM domain specifiers, as defined by bindings of
the power controller that is the PM domain provider.

Example:

Expand All @@ -122,9 +122,18 @@ Example:
power-domains = <&power 0>;
};

The node above defines a typical PM domain consumer device, which is located
inside a PM domain with index 0 of a power controller represented by a node
with the label "power".
leaky-device@12351000 {
compatible = "foo,i-leak-current";
reg = <0x12351000 0x1000>;
power-domains = <&power 0>, <&power 1> ;
};

The first example above defines a typical PM domain consumer device, which is
located inside a PM domain with index 0 of a power controller represented by a
node with the label "power".
In the second example the consumer device are partitioned across two PM domains,
the first with index 0 and the second with index 1, of a power controller that
is represented by a node with the label "power.

Optional properties:
- required-opps: This contains phandle to an OPP node in another device's OPP
Expand Down
65 changes: 65 additions & 0 deletions Documentation/devicetree/bindings/power/qcom,rpmhpd.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
Qualcomm RPMh Power domains

For RPMh Power domains, we communicate a performance state to RPMh
which then translates it into a corresponding voltage on a rail

Required Properties:
- compatible: Should be one of the following
* qcom,sdm845-rpmhpd: RPMh Power domain for the sdm845 family of SoC
- power-domain-cells: number of cells in power domain specifier
must be 1
- operating-points-v2: Phandle to the OPP table for the power-domain.
Refer to Documentation/devicetree/bindings/power/power_domain.txt
and Documentation/devicetree/bindings/opp/qcom-opp.txt for more details

Example:

rpmhpd: power-controller {
compatible = "qcom,sdm845-rpmhpd";
#power-domain-cells = <1>;
operating-points-v2 = <&rpmhpd_opp_table>;
};

rpmhpd_opp_table: opp-table {
compatible = "operating-points-v2-qcom-level";

rpmhpd_opp_ret: opp1 {
qcom-level = <16>;
};

rpmhpd_opp_min_svs: opp2 {
qcom-level = <48>;
};

rpmhpd_opp_low_svs: opp3 {
qcom-level = <64>;
};

rpmhpd_opp_svs: opp4 {
qcom-level = <128>;
};

rpmhpd_opp_svs_l1: opp5 {
qcom-level = <192>;
};

rpmhpd_opp_nom: opp6 {
qcom-level = <256>;
};

rpmhpd_opp_nom_l1: opp7 {
qcom-level = <320>;
};

rpmhpd_opp_nom_l2: opp8 {
qcom-level = <336>;
};

rpmhpd_opp_turbo: opp9 {
qcom-level = <384>;
};

rpmhpd_opp_turbo_l1: opp10 {
qcom-level = <416>;
};
};
49 changes: 49 additions & 0 deletions Documentation/devicetree/bindings/power/qcom,rpmpd.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
Qualcomm RPM Power domains

For RPM Power domains, we communicate a performance state to RPM
which then translates it into a corresponding voltage on a rail

Required Properties:
- compatible: Should be one of the following
* qcom,msm8996-rpmpd: RPM Power domain for the msm8996 family of SoC
- power-domain-cells: number of cells in Power domain specifier
must be 1.
- operating-points-v2: Phandle to the OPP table for the Power domain.
Refer to Documentation/devicetree/bindings/power/power_domain.txt
and Documentation/devicetree/bindings/opp/qcom-opp.txt for more details

Example:

rpmpd: power-controller {
compatible = "qcom,msm8996-rpmpd";
#power-domain-cells = <1>;
operating-points-v2 = <&rpmpd_opp_table>;
};

rpmpd_opp_table: opp-table {
compatible = "operating-points-v2-qcom-level";

rpmpd_opp1: opp1 {
qcom,level = <1>;
};

rpmpd_opp2: opp2 {
qcom,level = <2>;
};

rpmpd_opp3: opp3 {
qcom,level = <3>;
};

rpmpd_opp4: opp4 {
qcom,level = <4>;
};

rpmpd_opp5: opp5 {
qcom,level = <5>;
};

rpmpd_opp6: opp6 {
qcom,level = <6>;
};
};
137 changes: 137 additions & 0 deletions Documentation/devicetree/bindings/soc/qcom/rpmh-rsc.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
RPMH RSC:
------------

Resource Power Manager Hardened (RPMH) is the mechanism for communicating with
the hardened resource accelerators on Qualcomm SoCs. Requests to the resources
can be written to the Trigger Command Set (TCS) registers and using a (addr,
val) pair and triggered. Messages in the TCS are then sent in sequence over an
internal bus.

The hardware block (Direct Resource Voter or DRV) is a part of the h/w entity
(Resource State Coordinator a.k.a RSC) that can handle multiple sleep and
active/wake resource requests. Multiple such DRVs can exist in a SoC and can
be written to from Linux. The structure of each DRV follows the same template
with a few variations that are captured by the properties here.

A TCS may be triggered from Linux or triggered by the F/W after all the CPUs
have powered off to facilitate idle power saving. TCS could be classified as -

SLEEP /* Triggered by F/W */
WAKE /* Triggered by F/W */
ACTIVE /* Triggered by Linux */
CONTROL /* Triggered by F/W */

The order in which they are described in the DT, should match the hardware
configuration.

Requests can be made for the state of a resource, when the subsystem is active
or idle. When all subsystems like Modem, GPU, CPU are idle, the resource state
will be an aggregate of the sleep votes from each of those subsystems. Clients
may request a sleep value for their shared resources in addition to the active
mode requests.

Properties:

- compatible:
Usage: required
Value type: <string>
Definition: Should be "qcom,rpmh-rsc".

- reg:
Usage: required
Value type: <prop-encoded-array>
Definition: The first register specifies the base address of the
DRV(s). The number of DRVs in the dependent on the RSC.
The tcs-offset specifies the start address of the
TCS in the DRVs.

- reg-names:
Usage: required
Value type: <string>
Definition: Maps the register specified in the reg property. Must be
"drv-0", "drv-1", "drv-2" etc and "tcs-offset". The

- interrupts:
Usage: required
Value type: <prop-encoded-interrupt>
Definition: The interrupt that trips when a message complete/response
is received for this DRV from the accelerators.

- qcom,drv-id:
Usage: required
Value type: <u32>
Definition: The id of the DRV in the RSC block that will be used by
this controller.

- qcom,tcs-config:
Usage: required
Value type: <prop-encoded-array>
Definition: The tuple defining the configuration of TCS.
Must have 2 cells which describe each TCS type.
<type number_of_tcs>.
The order of the TCS must match the hardware
configuration.
- Cell #1 (TCS Type): TCS types to be specified -
SLEEP_TCS
WAKE_TCS
ACTIVE_TCS
CONTROL_TCS
- Cell #2 (Number of TCS): <u32>

- label:
Usage: optional
Value type: <string>
Definition: Name for the RSC. The name would be used in trace logs.

Drivers that want to use the RSC to communicate with RPMH must specify their
bindings as child nodes of the RSC controllers they wish to communicate with.

Example 1:

For a TCS whose RSC base address is is 0x179C0000 and is at a DRV id of 2, the
register offsets for DRV2 start at 0D00, the register calculations are like
this -
DRV0: 0x179C0000
DRV2: 0x179C0000 + 0x10000 = 0x179D0000
DRV2: 0x179C0000 + 0x10000 * 2 = 0x179E0000
TCS-OFFSET: 0xD00

apps_rsc: rsc@179c0000 {
label = "apps_rsc";
compatible = "qcom,rpmh-rsc";
reg = <0x179c0000 0x10000>,
<0x179d0000 0x10000>,
<0x179e0000 0x10000>;
reg-names = "drv-0", "drv-1", "drv-2";
interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>;
qcom,tcs-offset = <0xd00>;
qcom,drv-id = <2>;
qcom,tcs-config = <SLEEP_TCS 3>,
<WAKE_TCS 3>,
<ACTIVE_TCS 2>,
<CONTROL_TCS 1>;
};

Example 2:

For a TCS whose RSC base address is 0xAF20000 and is at DRV id of 0, the
register offsets for DRV0 start at 01C00, the register calculations are like
this -
DRV0: 0xAF20000
TCS-OFFSET: 0x1C00

disp_rsc: rsc@af20000 {
label = "disp_rsc";
compatible = "qcom,rpmh-rsc";
reg = <0xaf20000 0x10000>;
reg-names = "drv-0";
interrupts = <GIC_SPI 129 IRQ_TYPE_LEVEL_HIGH>;
qcom,tcs-offset = <0x1c00>;
qcom,drv-id = <0>;
qcom,tcs-config = <SLEEP_TCS 1>,
<WAKE_TCS 1>,
<ACTIVE_TCS 0>,
<CONTROL_TCS 0>;
};
14 changes: 7 additions & 7 deletions arch/arm64/boot/dts/qcom/apq8096-db820c.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,13 @@
pinctrl-1 = <&blsp2_uart1_2pins_sleep>;
};

serial@75b1000 {
label = "LS-UART0";
status = "okay";
pinctrl-names = "default", "sleep";
pinctrl-0 = <&blsp2_uart2_4pins_default>;
pinctrl-1 = <&blsp2_uart2_4pins_sleep>;
};
// serial@75b1000 {
// label = "LS-UART0";
// status = "okay";
// pinctrl-names = "default", "sleep";
// pinctrl-0 = <&blsp2_uart2_4pins_default>;
// pinctrl-1 = <&blsp2_uart2_4pins_sleep>;
// };

i2c@7577000 {
/* On Low speed expansion */
Expand Down
75 changes: 75 additions & 0 deletions arch/arm64/boot/dts/qcom/msm8996.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,40 @@
#clock-cells = <1>;
};

rpmpd: power-controller {
compatible = "qcom,msm8996-rpmpd";
#power-domain-cells = <1>;
operating-points-v2 = <&rpmpd_opp_table>;
};

rpmpd_opp_table: opp-table {
compatible = "operating-points-v2-qcom-level";

rpmpd_opp1: opp1 {
qcom,level = <1>;
};

rpmpd_opp2: opp2 {
qcom,level = <2>;
};

rpmpd_opp3: opp3 {
qcom,level = <3>;
};

rpmpd_opp4: opp4 {
qcom,level = <4>;
};

rpmpd_opp5: opp5 {
qcom,level = <5>;
};

rpmpd_opp6: opp6 {
qcom,level = <6>;
};
};

pm8994-regulators {
compatible = "qcom,rpm-pm8994-regulators";

Expand Down Expand Up @@ -545,8 +579,49 @@
<&gcc GCC_SDCC2_APPS_CLK>,
<&xo_board>;
bus-width = <4>;
power-domains = <&rpmpd 0>;
operating-points-v2 = <&sdhc_opp_table>;
};

sdhc_opp_table: opp_table {
compatible = "operating-points-v2";

opp@144000 {
opp-hz = /bits/ 64 <144000>;
required-opps = <&rpmpd_opp1>;
};

opp@4000000 {
opp-hz = /bits/ 64 <400000>;
required-opps = <&rpmpd_opp1>;
};

opp@20000000 {
opp-hz = /bits/ 64 <20000000>;
required-opps = <&rpmpd_opp2>;
};

opp@25000000 {
opp-hz = /bits/ 64 <25000000>;
required-opps = <&rpmpd_opp2>;
};

opp@50000000 {
opp-hz = /bits/ 64 <50000000>;
required-opps = <&rpmpd_opp2>;
};

opp@100000000 {
opp-hz = /bits/ 64 <100000000>;
required-opps = <&rpmpd_opp3>;
};

opp@200000000 {
opp-hz = /bits/ 64 <200000000>;
required-opps = <&rpmpd_opp3>;
};
};

msmgpio: pinctrl@1010000 {
compatible = "qcom,msm8996-pinctrl";
reg = <0x01010000 0x300000>;
Expand Down
Loading