Enable onboard SDHCI for Nexus 5X (msm8992)
Subsystems (7)
v4 cover Enable onboard SDHCI for Nexus 5X (msm8992)
Here links to previous versions:
[V1]
https://www.spinics.net/lists/devicetree/msg151845.html
[V2]
http://www.spinics.net/lists/devicetree/msg158808.html
[V3]
http://www.spinics.net/lists/devicetree/msg160644.html
What changed V3->V4:
* Dropped [V3] (2/6) Add quirk for delayed IRQ ACK as this workaround was improving detection time but masking another issue with rpm-smd specific to msm899(2/4).
* Including the C code to enable/add missing clock branch. In V3 this change was split up between dt-bindings and C but the C part didn't get sent to the mailing list. Its in my inbox and tree ;-)
Note:
-only the AHB clock was added for SDCC1 as it was tested.
SDCC[2->4] ADB_CLK will be added once these branches are investigated against downstream. ie) are they all clock branches the same as SDCC1_AHB ?
6/6 was not separated out into dt-bindings and devicetree
as it was just a simple search and replace.
Jeremy McNicoll (6):
clk: qcom: SDHCI enablement on Nexus 5X / 6P
dt-bindings: qcom: clk: Add missing binding for SDCHI enablement on
Nexus 5X/6P
arm64: dts: msm8992 add fixed regulator
arm64: dts: smem enablement for msm8992
dts: arm64: Enable onboard SDHCI on msm8992
dts: doc: rename rpm_requests to respect DT naming conventions
.../devicetree/bindings/clock/qcom,rpmcc.txt | 2 +- .../bindings/regulator/qcom,smd-rpm-regulator.txt | 2 +- .../devicetree/bindings/soc/qcom/qcom,smd-rpm.txt | 6 +- .../devicetree/bindings/soc/qcom/qcom,smd.txt | 2 +- arch/arm/boot/dts/qcom-apq8074-dragonboard.dts | 2 +- arch/arm/boot/dts/qcom-apq8084.dtsi | 2 +- .../dts/qcom-msm8974-lge-nexus5-hammerhead.dts | 2 +- .../boot/dts/qcom-msm8974-sony-xperia-honami.dts | 2 +- arch/arm/boot/dts/qcom-msm8974.dtsi | 2 +- arch/arm64/boot/dts/qcom/msm8916.dtsi | 2 +- .../boot/dts/qcom/msm8992-bullhead-rev-101.dts | 2 + arch/arm64/boot/dts/qcom/msm8992-pins.dtsi | 60 +++++ arch/arm64/boot/dts/qcom/msm8992.dtsi | 143 ++++++++++- arch/arm64/boot/dts/qcom/msm8994-smd-rpm.dtsi | 276 +++++++++++++++++++++ drivers/clk/qcom/gcc-msm8994.c | 18 ++ include/dt-bindings/clock/qcom,gcc-msm8994.h | 1 + 16 files changed, 511 insertions(+), 13 deletions(-) create mode 100644 arch/arm64/boot/dts/qcom/msm8994-smd-rpm.dtsi
Signature · 1 line
2.6.1
PATCH v4 1/6 clk: qcom: SDHCI enablement on Nexus 5X / 6P
Add missing clock branch to enable onboard storage for msm899(2/4).
--- drivers/clk/qcom/gcc-msm8994.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+)
drivers/clk/qcom/gcc-msm8994.c +18 -0
@@ -1888,6 +1888,23 @@ static struct clk_branch gcc_sdcc1_apps_clk = { }, }; +static struct clk_branch gcc_sdcc1_ahb_clk = { + .halt_reg =0x04c8 , + .clkr = { + .enable_reg =0x04c8 , + .enable_mask =BIT (0 ), + .hw.init = &(struct clk_init_data ) + { + .name ="gcc_sdcc1_ahb_clk" , + .parent_names = (const char *[]){ +"periph_noc_clk_src" , + }, + .num_parents =1 , + .ops = &clk_branch2_ops, + }, + }, +}; +static struct clk_branch gcc_sdcc2_apps_clk = { .halt_reg =0x0504 , .clkr = {
@@ -2231,6 +2248,7 @@ static struct clk_regmap *gcc_msm8994_clocks[] = { [GCC_SDCC2_APPS_CLK] = &gcc_sdcc2_apps_clk.clkr, [GCC_SDCC3_APPS_CLK] = &gcc_sdcc3_apps_clk.clkr, [GCC_SDCC4_APPS_CLK] = &gcc_sdcc4_apps_clk.clkr, + [GCC_SDCC1_AHB_CLK] = &gcc_sdcc1_ahb_clk.clkr, [GCC_SYS_NOC_UFS_AXI_CLK] = &gcc_sys_noc_ufs_axi_clk.clkr, [GCC_SYS_NOC_USB3_AXI_CLK] = &gcc_sys_noc_usb3_axi_clk.clkr, [GCC_TSIF_REF_CLK] = &gcc_tsif_ref_clk.clkr,
Signature · 1 line
2.6.1
PATCH v4 2/6 dt-bindings: qcom: clk: Add missing binding for SDCHI enablement on Nexus 5X/6P
In reply to a message not in the archiveAHB clock branch is needed in order to enable SDHCI on msm899(2/4).
--- include/dt-bindings/clock/qcom,gcc-msm8994.h | 1 + 1 file changed, 1 insertion(+)
include/dt-bindings/clock/qcom,gcc-msm8994.h +1 -0
@@ -133,5 +133,6 @@#define GCC_USB30_MOCK_UTMI_CLK 115#define GCC_USB3_PHY_AUX_CLK 116#define GCC_USB_HS_SYSTEM_CLK 117 +#define GCC_SDCC1_AHB_CLK 118#endif
Signature · 6 lines
2.6.1 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH v4 3/6 arm64: dts: msm8992 add fixed regulator
In reply to Jeremy McNicollThis regulator is not moving anywhere. Sit, stay...
--- arch/arm64/boot/dts/qcom/msm8992.dtsi | 11 +++++++++++ 1 file changed, 11 insertions(+)
arch/arm64/boot/dts/qcom/msm8992.dtsi +11 -0
@@ -68,6 +68,17 @@ clock-frequency = <32768>; }; + vreg_vph_pwr: vreg-vph-pwr { + compatible = "regulator-fixed"; + status = "okay"; + regulator-name = "vph-pwr"; + + regulator-min-microvolt = <3600000>; + regulator-max-microvolt = <3600000>; + + regulator-always-on; + }; + soc { #address-cells = <1>; #size-cells = <1>;
Signature · 1 line
2.6.1
PATCH v4 4/6 arm64: dts: smem enablement for msm8992
In reply to Jeremy McNicollSMEM allows various subsystems/processors to share memory/data (heap format) in order to enable various peripherals.
--- arch/arm64/boot/dts/qcom/msm8992.dtsi | 42 +++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+)
arch/arm64/boot/dts/qcom/msm8992.dtsi +42 -0
@@ -93,6 +93,11 @@ <0xf9002000 0x1000>; }; + apcs: syscon@f900d000 { + compatible = "syscon"; + reg = <0xf900d000 0x2000>; + }; + timer@f9020000 { #address-cells = <1>; #size-cells = <1>;
@@ -183,12 +188,49 @@ #power-domain-cells = <1>; reg = <0xfc400000 0x2000>; }; + + rpm_msg_ram: memory@fc428000 { + compatible = "qcom,rpm-msg-ram"; + reg = <0xfc428000 0x4000>; + }; + + sfpb_mutex_regs: syscon@fd484000 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "syscon"; + reg = <0xfd484000 0x400>; + }; + + sfpb_mutex: hwmutex { + compatible = "qcom,sfpb-mutex"; + syscon = <&sfpb_mutex_regs 0x0 0x100>; + #hwlock-cells = <1>; + }; + + smem { + compatible = "qcom,smem"; + memory-region = <&smem_region>; + qcom,rpm-msg-ram = <&rpm_msg_ram>; + hwlocks = <&sfpb_mutex 3>; + }; }; memory { device_type = "memory"; reg = <0 0 0 0>; // bootloader will update }; + + reserved-memory { + #address-cells = <2>; + #size-cells = <2>; + ranges; + + smem_region: smem@6a00000 { + reg = <0x0 0x6a00000 0x0 0x200000>; + no-map; + }; + }; + };
Signature · 1 line
2.6.1
PATCH v4 5/6 dts: arm64: Enable onboard SDHCI on msm8992
In reply to Jeremy McNicollThis enables SDHCI on the Nexus 5X as well creates common smd_rpm node which can be shared between both 5X and 6P as per HW design.
Given the lack of documentation, only downstream code was used as a reference and it eludes to the fact that 8994-rpm-regulator is common between both msm8992
& msm8994. [ see msm.git branch: msm-angler-3.10-marshmallow-mr1, msm8992.dtsi]
At this early stage of development it makes sense for the 8994-rpm-regulator to be common until data / documentation suggests otherwise.
--- .../boot/dts/qcom/msm8992-bullhead-rev-101.dts | 2 + arch/arm64/boot/dts/qcom/msm8992-pins.dtsi | 60 +++++ arch/arm64/boot/dts/qcom/msm8992.dtsi | 87 ++++++- arch/arm64/boot/dts/qcom/msm8994-smd-rpm.dtsi | 276 +++++++++++++++++++++ 4 files changed, 424 insertions(+), 1 deletion(-) create mode 100644 arch/arm64/boot/dts/qcom/msm8994-smd-rpm.dtsi
arch/arm64/boot/dts/qcom/msm8992-bullhead-rev-101.dts +2 -0
@@ -39,3 +39,5 @@ }; }; }; + +#include "msm8994-smd-rpm.dtsi"
arch/arm64/boot/dts/qcom/msm8992-pins.dtsi +60 -0
64 lines not on this page · raw message
arch/arm64/boot/dts/qcom/msm8992.dtsi +86 -1
99 lines not on this page · raw message
arch/arm64/boot/dts/qcom/msm8994-smd-rpm.dtsi new file +276 -0
276 lines not on this page · raw message
Signature · 1 line
2.6.1
PATCH v4 6/6 dts: doc: rename rpm_requests to respect DT naming conventions
In reply to Jeremy McNicollNode names cannot have an underscore '_' in the name. Simply rename 'rpm_request' nodes to 'rpm-request' and adjust associated documentation to reflect reality.
---
Note:
Kept bindings and dts together as this is a simple search and replace.
Documentation/devicetree/bindings/clock/qcom,rpmcc.txt | 2 +- .../devicetree/bindings/regulator/qcom,smd-rpm-regulator.txt | 2 +- Documentation/devicetree/bindings/soc/qcom/qcom,smd-rpm.txt | 6 +++--- Documentation/devicetree/bindings/soc/qcom/qcom,smd.txt | 2 +- arch/arm/boot/dts/qcom-apq8074-dragonboard.dts | 2 +- arch/arm/boot/dts/qcom-apq8084.dtsi | 2 +- arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dts | 2 +- arch/arm/boot/dts/qcom-msm8974-sony-xperia-honami.dts | 2 +- arch/arm/boot/dts/qcom-msm8974.dtsi | 2 +- arch/arm64/boot/dts/qcom/msm8916.dtsi | 2 +- arch/arm64/boot/dts/qcom/msm8994-smd-rpm.dtsi | 2 +- 11 files changed, 13 insertions(+), 13 deletions(-)
Documentation/devicetree/bindings/clock/qcom,rpmcc.txt +1 -1
@@ -24,7 +24,7 @@ Example: qcom,ipc = <&apcs 8 0>; qcom,smd-edge = <15>; - rpm_requests { + rpm-requests { compatible = "qcom,rpm-msm8916"; qcom,smd-channels = "rpm_requests";
Documentation/devicetree/bindings/regulator/qcom,smd-rpm-regulator.txt +1 -1
@@ -187,7 +187,7 @@ see regulator.txt. qcom,ipc = <&apcs 8 0>; qcom,smd-edge = <15>; - rpm_requests { + rpm-requests { compatible = "qcom,rpm-msm8974"; qcom,smd-channels = "rpm_requests";
Documentation/devicetree/bindings/soc/qcom/qcom,smd-rpm.txt +3 -3
@@ -11,7 +11,7 @@ RPM node itself. = SUBDEVICES -The RPM exposes resources to its subnodes. The rpm_requests node must be +The RPM exposes resources to its subnodes. The rpm-requests node must be present and this subnode may contain children that designate regulator resources.
@@ -29,7 +29,7 @@ resources. 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. +for information on the regulator subnodes that can exist under the rpm-requests. Example:
@@ -48,7 +48,7 @@ Example: qcom,ipc = <&apcs 8 0>; qcom,smd-edge = <15>; - rpm_requests { + rpm-requests { compatible = "qcom,rpm-msm8974"; qcom,smd-channels = "rpm_requests";
Documentation/devicetree/bindings/soc/qcom/qcom,smd.txt +1 -1
@@ -82,7 +82,7 @@ The following example represents a smd node, with one edge representing the qcom,ipc = <&apcs 8 0>; qcom,smd-edge = <15>; - rpm_requests { + rpm-requests { compatible = "qcom,rpm-msm8974"; qcom,smd-channels = "rpm_requests";
arch/arm/boot/dts/qcom-apq8074-dragonboard.dts +1 -1
@@ -126,7 +126,7 @@ smd { rpm { - rpm_requests { + rpm-requests { pm8841-regulators { s1 { regulator-min-microvolt = <675000>;
arch/arm/boot/dts/qcom-apq8084.dtsi +1 -1
@@ -461,7 +461,7 @@ qcom,ipc = <&apcs 8 0>; qcom,smd-edge = <15>; - rpm_requests { + rpm-requests { compatible = "qcom,rpm-apq8084"; qcom,smd-channels = "rpm_requests";
arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dts +1 -1
@@ -19,7 +19,7 @@ smd { rpm { - rpm_requests { + rpm-requests { pm8841-regulators { s1 { regulator-min-microvolt = <675000>;
arch/arm/boot/dts/qcom-msm8974-sony-xperia-honami.dts +1 -1
@@ -60,7 +60,7 @@ smd { rpm { - rpm_requests { + rpm-requests { pm8841-regulators { s1 { regulator-min-microvolt = <675000>;
arch/arm/boot/dts/qcom-msm8974.dtsi +1 -1
@@ -672,7 +672,7 @@ qcom,ipc = <&apcs 8 0>; qcom,smd-edge = <15>; - rpm_requests { + rpm-requests { compatible = "qcom,rpm-msm8974"; qcom,smd-channels = "rpm_requests";
arch/arm64/boot/dts/qcom/msm8916.dtsi +1 -1
@@ -866,7 +866,7 @@ qcom,ipc = <&apcs 8 0>; qcom,smd-edge = <15>; - rpm_requests { + rpm-requests { compatible = "qcom,rpm-msm8916"; qcom,smd-channels = "rpm_requests";
arch/arm64/boot/dts/qcom/msm8994-smd-rpm.dtsi +1 -1
@@ -13,7 +13,7 @@ &smd_rpm { rpm { - rpm_requests { + rpm-requests { pm8994-regulators { vdd_l1-supply = <&pm8994_s1>;
Signature · 1 line
2.6.1
kbuild test robot
build botRe: [PATCH V4 1/6] clk: qcom: SDHCI enablement on Nexus 5X / 6P
In reply to Jeremy McNicollreproduce: wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree…
Hi Jeremy,
[auto build test ERROR on robh/for-next]
[also build test ERROR on v4.10-rc5 next-20170125]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Jeremy-McNicoll/Enable-onboard-SDHCI-for-Nexus-5X-msm8992/20170127-171555 base: https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next config: arm-allyesconfig (attached as .config) compiler: arm-linux-gnueabi-gcc (Debian 6.1.1-9) 6.1.1 20160705
reproduce:
wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=arm
Note: the linux-review/Jeremy-McNicoll/Enable-onboard-SDHCI-for-Nexus-5X-msm8992/20170127-171555 HEAD 2d5a2b64c15910ea3011d16aac5fe40f7edae2fd builds fine.
It only hurts bisectibility.
All errors (new ones prefixed by >>):
>> drivers/clk/qcom/gcc-msm8994.c:2251:3: error: 'GCC_SDCC1_AHB_CLK' undeclared here (not in a function)
[GCC_SDCC1_AHB_CLK] = &gcc_sdcc1_ahb_clk.clkr,
^~~~~~~~~~~~~~~~~
>> drivers/clk/qcom/gcc-msm8994.c:2251:3: error: array index in initializer not of integer type drivers/clk/qcom/gcc-msm8994.c:2251:3: note: (near initialization for 'gcc_msm8994_clocks')
vim +/GCC_SDCC1_AHB_CLK +2251 drivers/clk/qcom/gcc-msm8994.c
2245 [GCC_PCIE_1_PIPE_CLK] = &gcc_pcie_1_pipe_clk.clkr,
2246 [GCC_PDM2_CLK] = &gcc_pdm2_clk.clkr,
2247 [GCC_SDCC1_APPS_CLK] = &gcc_sdcc1_apps_clk.clkr,
2248 [GCC_SDCC2_APPS_CLK] = &gcc_sdcc2_apps_clk.clkr,
2249 [GCC_SDCC3_APPS_CLK] = &gcc_sdcc3_apps_clk.clkr,
2250 [GCC_SDCC4_APPS_CLK] = &gcc_sdcc4_apps_clk.clkr,
> 2251 [GCC_SDCC1_AHB_CLK] = &gcc_sdcc1_ahb_clk.clkr,
2252 [GCC_SYS_NOC_UFS_AXI_CLK] = &gcc_sys_noc_ufs_axi_clk.clkr,
2253 [GCC_SYS_NOC_USB3_AXI_CLK] = &gcc_sys_noc_usb3_axi_clk.clkr,
2254 [GCC_TSIF_REF_CLK] = &gcc_tsif_ref_clk.clkr,
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
Re: [PATCH V4 4/6] arm64: dts: smem enablement for msm8992
In reply to Jeremy McNicollQuoted 7 lines · Jeremy McNicoll
arch/arm64/boot/dts/qcom/msm8992.dtsi +3
-0+ + sfpb_mutex: hwmutex { + compatible = "qcom,sfpb-mutex";
arch/arm64/boot/dts/qcom/msm8992.dtsi line 215
Quoted 10 lines
arch/arm64/boot/dts/qcom/msm8992.dtsi +10
-0+ syscon = <&sfpb_mutex_regs 0x0 0x100>; + #hwlock-cells = <1>; + }; + + smem { + compatible = "qcom,smem"; + memory-region = <&smem_region>; + qcom,rpm-msg-ram = <&rpm_msg_ram>; + hwlocks = <&sfpb_mutex 3>; + };
Move these nodes outside soc node please.
Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project
Stephen Boyd
AppliedRe: [PATCH V4 2/6] dt-bindings: qcom: clk: Add missing binding for SDCHI enablement on Nexus 5X/6P
In reply to Jeremy McNicollQuoted 5 lines · Jeremy McNicoll
AHB clock branch is needed in order to enable SDHCI on msm899(2/4).
Signed-off-by Jeremy McNicoll <[email protected]>---
Applied to clk-next
Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project
Stephen Boyd
AppliedRe: [PATCH V4 1/6] clk: qcom: SDHCI enablement on Nexus 5X / 6P
In reply to Jeremy McNicollQuoted 5 lines · Jeremy McNicoll
Add missing clock branch to enable onboard storage for msm899(2/4).
Signed-off-by Jeremy McNicoll <[email protected]>---
Applied to clk-next
Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project
PATCH v4 4/6 arm64: dts: smem enablement for msm8992
In reply to Stephen BoydSMEM allows various subsystems/processors to share memory/data (heap format) in order to enable various peripherals.
---
[ Moved sfpb_mutex and smem outside sock as they didn't have
'reg' entries. Everything else is exactly the same. ]
arch/arm64/boot/dts/qcom/msm8992.dtsi | 42 +++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+)
arch/arm64/boot/dts/qcom/msm8992.dtsi +42 -0
@@ -79,6 +79,19 @@ regulator-always-on; }; + sfpb_mutex: hwmutex { + compatible = "qcom,sfpb-mutex"; + syscon = <&sfpb_mutex_regs 0x0 0x100>; + #hwlock-cells = <1>; + }; + + smem { + compatible = "qcom,smem"; + memory-region = <&smem_region>; + qcom,rpm-msg-ram = <&rpm_msg_ram>; + hwlocks = <&sfpb_mutex 3>; + }; + soc { #address-cells = <1>; #size-cells = <1>;
@@ -93,6 +106,11 @@ <0xf9002000 0x1000>; }; + apcs: syscon@f900d000 { + compatible = "syscon"; + reg = <0xf900d000 0x2000>; + }; + timer@f9020000 { #address-cells = <1>; #size-cells = <1>;
@@ -183,12 +201,36 @@ #power-domain-cells = <1>; reg = <0xfc400000 0x2000>; }; + + rpm_msg_ram: memory@fc428000 { + compatible = "qcom,rpm-msg-ram"; + reg = <0xfc428000 0x4000>; + }; + + sfpb_mutex_regs: syscon@fd484000 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "syscon"; + reg = <0xfd484000 0x400>; + }; }; memory { device_type = "memory"; reg = <0 0 0 0>; // bootloader will update }; + + reserved-memory { + #address-cells = <2>; + #size-cells = <2>; + ranges; + + smem_region: smem@6a00000 { + reg = <0x0 0x6a00000 0x0 0x200000>; + no-map; + }; + }; + };
Signature · 1 line
2.6.1
Re: [PATCH V4 6/6] dts: doc: rename rpm_requests to respect DT naming conventions
In reply to Jeremy McNicollQuoted 1 line · Jeremy McNicoll
Node names cannot have an underscore '_' in the name.
Well, they can, it's just convention.
Quoted 11 lines
Simply rename '
rpm_request' nodes to 'rpm-request' and adjust associated documentation to reflect reality.Signed-off-by Jeremy McNicoll <[email protected]>---
Note:
Kept bindings and dts together as this is a simple search and replace.
Quoted 12 lines
Documentation/devicetree/bindings/clock/qcom,rpmcc.txt | 2 +- .../devicetree/bindings/regulator/qcom,smd-rpm-regulator.txt | 2 +- Documentation/devicetree/bindings/soc/qcom/qcom,smd-rpm.txt | 6 +++--- Documentation/devicetree/bindings/soc/qcom/qcom,smd.txt | 2 +- arch/arm/boot/dts/qcom-apq8074-dragonboard.dts | 2 +- arch/arm/boot/dts/qcom-apq8084.dtsi | 2 +- arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dts | 2 +- arch/arm/boot/dts/qcom-msm8974-sony-xperia-honami.dts | 2 +- arch/arm/boot/dts/qcom-msm8974.dtsi | 2 +- arch/arm64/boot/dts/qcom/msm8916.dtsi | 2 +- arch/arm64/boot/dts/qcom/msm8994-smd-rpm.dtsi | 2 +- 11 files changed, 13 insertions(+), 13 deletions(-)
Re: [PATCH V4 4/6] arm64: dts: smem enablement for msm8992
In reply to Jeremy McNicollQuoted 4 lines · Jeremy McNicoll
SMEM allows various subsystems/processors to share memory/data (heap format) in order to enable various peripherals.
Fyi, the sfpb_mutex is actually called tcsr_mutex, but downstream kept the old name...
Regards,
Bjorn
Quoted 85 lines
Signed-off-by Jeremy McNicoll <[email protected]>---
[ Moved
sfpb_mutexand smem outside sock as they didn't have
'reg' entries. Everything else is exactly the same. ]arch/arm64/boot/dts/qcom/msm8992.dtsi | 42 +++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+)arch/arm64/boot/dts/qcom/msm8992.dtsi +42
-0@@ -79,6 +79,19 @@ regulator-always-on; }; + sfpb_mutex: hwmutex { + compatible = "qcom,sfpb-mutex"; + syscon = <&sfpb_mutex_regs 0x0 0x100>; + #hwlock-cells = <1>; + }; + + smem { + compatible = "qcom,smem"; + memory-region = <&smem_region>; + qcom,rpm-msg-ram = <&rpm_msg_ram>; + hwlocks = <&sfpb_mutex 3>; + }; + soc { #address-cells = <1>; #size-cells = <1>;@@ -93,6 +106,11 @@ <0xf9002000 0x1000>; }; + apcs: syscon@f900d000 { + compatible = "syscon"; + reg = <0xf900d000 0x2000>; + }; + timer@f9020000 { #address-cells = <1>; #size-cells = <1>;@@ -183,12 +201,36 @@ #power-domain-cells = <1>; reg = <0xfc400000 0x2000>; }; + + rpm_msg_ram: memory@fc428000 { + compatible = "qcom,rpm-msg-ram"; + reg = <0xfc428000 0x4000>; + }; + + sfpb_mutex_regs: syscon@fd484000 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "syscon"; + reg = <0xfd484000 0x400>; + }; }; memory { device_type = "memory"; reg = <0 0 0 0>; // bootloader will update }; + + reserved-memory { + #address-cells = <2>; + #size-cells = <2>; + ranges; + + smem_region: smem@6a00000 { + reg = <0x0 0x6a00000 0x0 0x200000>; + no-map; + }; + }; + };Signature · 1 line
2.6.1
Re: [PATCH V4 5/6] dts: arm64: Enable onboard SDHCI on msm8992
In reply to Jeremy McNicollQuoted 10 lines · Jeremy McNicoll
This enables SDHCI on the Nexus 5X as well creates common
smd_rpmnode which can be shared between both 5X and 6P as per HW design.Given the lack of documentation, only downstream code was used as a reference and it eludes to the fact that 8994-rpm-regulator is common between both msm8992
& msm8994. [ see msm.git branch: msm-angler-3.10-marshmallow-mr1,msm8992.dtsi]At this early stage of development it makes sense for the 8994-rpm-regulator to be common until data / documentation suggests otherwise.
Saw this as I looked through patchworks, still applies and compiles cleanly.
Regards,
Bjorn
Quoted 478 lines
Signed-off-by Jeremy McNicoll <[email protected]>--- .../boot/dts/qcom/msm8992-bullhead-rev-101.dts | 2 + arch/arm64/boot/dts/qcom/msm8992-pins.dtsi | 60 +++++ arch/arm64/boot/dts/qcom/msm8992.dtsi | 87 ++++++- arch/arm64/boot/dts/qcom/msm8994-smd-rpm.dtsi | 276 +++++++++++++++++++++ 4 files changed, 424 insertions(+), 1 deletion(-) create mode 100644 arch/arm64/boot/dts/qcom/msm8994-smd-rpm.dtsiarch/arm64/boot/dts/qcom/msm8992-bullhead-rev-101.dts +2
-0@@ -39,3 +39,5 @@ }; }; }; + +#include "msm8994-smd-rpm.dtsi"arch/arm64/boot/dts/qcom/msm8992-pins.dtsi +60
-0@@ -35,4 +35,64 @@ bias-pull-down; }; }; + + /* 0-3 for sdc1 4-6 for sdc2 */ + /* Order of pins */ + /* SDC1: CLK -> 0, CMD -> 1, DATA -> 2, RCLK -> 3 */ + /* SDC2: CLK -> 4, CMD -> 5, DATA -> 6 */ + sdc1_clk_on: clk-on { + pinconf { + pins = "sdc1_clk"; + bias-disable = <0>; /* No pull */ + drive-strength = <16>; /* 16mA */ + }; + }; + + sdc1_clk_off: clk-off { + pinconf { + pins = "sdc1_clk"; + bias-disable = <0>; /* No pull */ + drive-strength = <2>; /* 2mA */ + }; + }; + + sdc1_cmd_on: cmd-on { + pinconf { + pins = "sdc1_cmd"; + bias-pull-up; + drive-strength = <8>; + }; + }; + + sdc1_cmd_off: cmd-off { + pinconf { + pins = "sdc1_cmd"; + bias-pull-up = <0x3>; /* same as 3.10 ?? */ + drive-strength = <2>; /* 2mA */ + }; + }; + + sdc1_data_on: data-on { + pinconf { + pins = "sdc1_data"; + bias-pull-up; + drive-strength = <8>; /* 8mA */ + }; + }; + + sdc1_data_off: data-off { + pinconf { + pins = "sdc1_data"; + bias-pull-up; + drive-strength = <2>; + }; + }; + + sdc1_rclk_on: rclk-on { + bias-pull-down; /* pull down */ + }; + + sdc1_rclk_off: rclk-off { + bias-pull-down; /* pull down */ + }; };arch/arm64/boot/dts/qcom/msm8992.dtsi +86
-1@@ -189,6 +189,31 @@ reg = <0xfc400000 0x2000>; }; + sdhci1: mmc@f9824900 { + compatible = "qcom,sdhci-msm-v4"; + reg = <0xf9824900 0x1a0>, <0xf9824000 0x800>; + reg-names = "hc_mem", "core_mem"; + + interrupts = <GIC_SPI 123 IRQ_TYPE_NONE>, + <GIC_SPI 138 IRQ_TYPE_NONE>; + interrupt-names = "hc_irq", "pwr_irq"; + + clocks = <&clock_gcc GCC_SDCC1_APPS_CLK>, + <&clock_gcc GCC_SDCC1_AHB_CLK>; + clock-names = "core", "iface"; + + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&sdc1_clk_on &sdc1_cmd_on &sdc1_data_on + &sdc1_rclk_on>; + pinctrl-1 = <&sdc1_clk_off &sdc1_cmd_off &sdc1_data_off + &sdc1_rclk_off>; + + regulator-always-on; + bus-width = <8>; + mmc-hs400-1_8v; + status = "okay"; + }; + rpm_msg_ram: memory@fc428000 { compatible = "qcom,rpm-msg-ram"; reg = <0xfc428000 0x4000>;@@ -231,7 +256,67 @@ }; }; + smd_rpm: smd { + compatible = "qcom,smd"; + rpm { + interrupts = <GIC_SPI 168 IRQ_TYPE_EDGE_RISING>; + qcom,ipc = <&apcs 8 0>; + qcom,smd-edge = <15>; + qcom,local-pid = <0>; + qcom,remote-pid = <6>; + + rpm-requests { + compatible = "qcom,rpm-msm8994"; + qcom,smd-channels = "rpm_requests"; + + pm8994-regulators { + compatible = "qcom,rpm-pm8994-regulators"; + + pm8994_s1: s1 {}; + pm8994_s2: s2 {}; + pm8994_s3: s3 {}; + pm8994_s4: s4 {}; + pm8994_s5: s5 {}; + pm8994_s6: s6 {}; + pm8994_s7: s7 {}; + + pm8994_l1: l1 {}; + pm8994_l2: l2 {}; + pm8994_l3: l3 {}; + pm8994_l4: l4 {}; + pm8994_l6: l6 {}; + pm8994_l8: l8 {}; + pm8994_l9: l9 {}; + pm8994_l10: l10 {}; + pm8994_l11: l11 {}; + pm8994_l12: l12 {}; + pm8994_l13: l13 {}; + pm8994_l14: l14 {}; + pm8994_l15: l15 {}; + pm8994_l16: l16 {}; + pm8994_l17: l17 {}; + pm8994_l18: l18 {}; + pm8994_l19: l19 {}; + pm8994_l20: l20 {}; + pm8994_l21: l21 {}; + pm8994_l22: l22 {}; + pm8994_l23: l23 {}; + pm8994_l24: l24 {}; + pm8994_l25: l25 {}; + pm8994_l26: l26 {}; + pm8994_l27: l27 {}; + pm8994_l28: l28 {}; + pm8994_l29: l29 {}; + pm8994_l30: l30 {}; + pm8994_l31: l31 {}; + pm8994_l32: l32 {}; + + pm8994_lvs1: lvs1 {}; + pm8994_lvs2: lvs2 {}; + }; + }; + }; + }; }; - #include "msm8992-pins.dtsi"arch/arm64/boot/dts/qcom/msm8994-smd-rpm.dtsi new file +276
-0@@ -0,0 +1,276 @@ +/* Copyright (c) 2015, LGE Inc. All rights reserved. + * Copyright (c) 2016, The Linux Foundation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 and + * only version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +&smd_rpm { + rpm { + rpm_requests { + pm8994-regulators { + + vdd_l1-supply = <&pm8994_s1>; + vdd_l2_26_28-supply = <&pm8994_s3>; + vdd_l3_11-supply = <&pm8994_s3>; + vdd_l4_27_31-supply = <&pm8994_s3>; + vdd_l5_7-supply = <&pm8994_s3>; + vdd_l6_12_32-supply = <&pm8994_s5>; + vdd_l8_16_30-supply = <&vreg_vph_pwr>; + vdd_l9_10_18_22-supply = <&vreg_vph_pwr>; + vdd_l13_19_23_24-supply = <&vreg_vph_pwr>; + vdd_l14_15-supply = <&pm8994_s5>; + vdd_l17_29-supply = <&vreg_vph_pwr>; + vdd_l20_21-supply = <&vreg_vph_pwr>; + vdd_l25-supply = <&pm8994_s5>; + vdd_lvs1_2 = <&pm8994_s4>; + + s1 { + regulator-min-microvolt = <800000>; + regulator-max-microvolt = <800000>; + }; + + s2 { + /* TODO */ + }; + + s3 { + regulator-min-microvolt = <1300000>; + regulator-max-microvolt = <1300000>; + }; + + s4 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-allow-set-load; + regulator-system-load = <325000>; + }; + + s5 { + regulator-min-microvolt = <2150000>; + regulator-max-microvolt = <2150000>; + }; + + s7 { + regulator-min-microvolt = <1000000>; + regulator-max-microvolt = <1000000>; + }; + + l1 { + regulator-min-microvolt = <1000000>; + regulator-max-microvolt = <1000000>; + }; + + l2 { + regulator-min-microvolt = <1250000>; + regulator-max-microvolt = <1250000>; + }; + + l3 { + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + }; + + l4 { + regulator-min-microvolt = <1225000>; + regulator-max-microvolt = <1225000>; + }; + + l5 { + /* TODO */ + }; + + l6 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + }; + + l7 { + /* TODO */ + }; + + l8 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + }; + + l9 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + }; + + l10 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + qcom,init-voltage = <1800000>; + }; + + l11 { + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + qcom,init-voltage = <1200000>; + }; + + l12 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + qcom,init-voltage = <1800000>; + proxy-supply = <&pm8994_l12>; + qcom,proxy-consumer-enable; + qcom,proxy-consumer-current = <10000>; + status = "okay"; + }; + + l13 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <2950000>; + qcom,init-voltage = <2950000>; + status = "okay"; + }; + + l14 { + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + qcom,init-voltage = <1200000>; + proxy-supply = <&pm8994_l14>; + qcom,proxy-consumer-enable; + qcom,proxy-consumer-current = <10000>; + status = "okay"; + }; + + l15 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + qcom,init-voltage = <1800000>; + status = "okay"; + }; + + l16 { + regulator-min-microvolt = <2700000>; + regulator-max-microvolt = <2700000>; + qcom,init-voltage = <2700000>; + status = "okay"; + }; + + l17 { + regulator-min-microvolt = <2700000>; + regulator-max-microvolt = <2700000>; + qcom,init-voltage = <2700000>; + status = "okay"; + }; + + l18 { + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3000000>; + regulator-always-on; + qcom,init-voltage = <3000000>; + qcom,init-ldo-mode = <1>; + }; + + l19 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + qcom,init-voltage = <1800000>; + status = "okay"; + }; + + l20 { + regulator-min-microvolt = <2950000>; + regulator-max-microvolt = <2950000>; + regulator-always-on; + regulator-boot-on; + regulator-allow-set-load; + regulator-system-load = <570000>; + }; + + l21 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-always-on; + qcom,init-voltage = <1800000>; + }; + + l22 { + regulator-min-microvolt = <3100000>; + regulator-max-microvolt = <3100000>; + qcom,init-voltage = <3100000>; + }; + + l23 { + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <2800000>; + qcom,init-voltage = <2800000>; + }; + + l24 { + regulator-min-microvolt = <3075000>; + regulator-max-microvolt = <3150000>; + qcom,init-voltage = <3075000>; + }; + + l25 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + qcom,init-voltage = <1800000>; + }; + + l26 { + /* TODO: value from downstream + regulator-min-microvolt = <987500>; + fails to apply */ + }; + + l27 { + regulator-min-microvolt = <1050000>; + regulator-max-microvolt = <1050000>; + qcom,init-voltage = <1050000>; + }; + + l28 { + regulator-min-microvolt = <1000000>; + regulator-max-microvolt = <1000000>; + qcom,init-voltage = <1000000>; + proxy-supply = <&pm8994_l28>; + qcom,proxy-consumer-enable; + qcom,proxy-consumer-current = <10000>; + }; + + l29 { + /* TODO: Unsupported voltage range. + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <2800000>; + qcom,init-voltage = <2800000>; + */ + }; + + l30 { + /* TODO: get this verified + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + qcom,init-voltage = <1800000>; + */ + }; + + l31 { + regulator-min-microvolt = <1262500>; + regulator-max-microvolt = <1262500>; + qcom,init-voltage = <1262500>; + }; + + l32 { + /* TODO: get this verified + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + qcom,init-voltage = <1800000>; + */ + }; + }; + }; + }; +};Signature · 1 line
2.6.1