Stephen Boyd | 26 Jun 07:56 2016

[PATCH] extcon: Add support for qcom SPMI PMIC USB id detection hardware

Some Qualcomm PMICs have a misc device that performs USB id pin
detection via an interrupt. When the interrupt triggers, we
should read the interrupt line to see if it has gone high or low.
If the interrupt is low then the ID pin is grounded, and if the
interrupt is high then the ID pin is being held high.

Cc: Roger Quadros <rogerq <at>>
Cc: Chanwoo Choi <cw00.choi <at>>
Signed-off-by: Stephen Boyd <stephen.boyd <at>>
 .../bindings/extcon/qcom,pm8941-misc.txt           |  41 +++++
 drivers/extcon/Kconfig                             |   6 +
 drivers/extcon/Makefile                            |   1 +
 drivers/extcon/extcon-qcom-spmi-misc.c             | 170 +++++++++++++++++++++
 4 files changed, 218 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/extcon/qcom,pm8941-misc.txt
 create mode 100644 drivers/extcon/extcon-qcom-spmi-misc.c

diff --git a/Documentation/devicetree/bindings/extcon/qcom,pm8941-misc.txt b/Documentation/devicetree/bindings/extcon/qcom,pm8941-misc.txt
new file mode 100644
index 000000000000..35383adb10f1
--- /dev/null
+++ b/Documentation/devicetree/bindings/extcon/qcom,pm8941-misc.txt
 <at>  <at>  -0,0 +1,41  <at>  <at> 
+Qualcomm's PM8941 USB ID Extcon device
+Some Qualcomm PMICs have a "misc" module that can be used to detect when
+the USB ID pin has been pulled low or high.
(Continue reading)

Stephen Boyd | 26 Jun 07:52 2016

[PATCH 0/3] Update pm8941 spmi regulators for USB OTG

While rewriting the USB support for MSM SoCs I ran into a few
minor bugs with the pm8941 regulator driver that hadn't been found
before. These patches are part of a larger series that allows me
to get proper USB OTG support working on the apq8074 dragonboard.

Stephen Boyd (3):
  regulator: qcom_spmi: Add support for S4 supply on pm8941
  regulator: qcom_spmi: Update mvs1/mvs2 switches on pm8941
  regulator: qcom_spmi: Add support for get_mode/set_mode on switches

 .../devicetree/bindings/regulator/qcom,spmi-regulator.txt          | 6 +++---
 drivers/regulator/qcom_spmi-regulator.c                            | 7 +++++--
 2 files changed, 8 insertions(+), 5 deletions(-)



Stephen Boyd | 26 Jun 07:21 2016

[PATCH 0/2] Support HSIC "pins" on msm8974 tlmm

This is part of a larger patch series that adds support for the
USB HSIC controller on msm8974 based SoCs. The first patch here
is a minor fix for a problem that isn't happening yet but could
happen in the future. The second patch adds an hsic pin so
we can configure the hsic bits that live in the TLMM register

Stephen Boyd (2):
  pinctrl: qcom: Clear all function selection bits
  pinctrl: qcom: msm8974: Add hsic_ctl pinmux

 .../bindings/pinctrl/qcom,msm8974-pinctrl.txt      |  5 ++-
 drivers/pinctrl/qcom/pinctrl-msm.c                 |  6 ++-
 drivers/pinctrl/qcom/pinctrl-msm8x74.c             | 43 +++++++++++++++++++++-
 3 files changed, 50 insertions(+), 4 deletions(-)



Georgi Djakov | 24 Jun 17:07 2016

[PATCH] mmc: sdhci-msm: Add support for UHS cards

Enabling support for ultra high speed mode cards requires some
voltage switching and interaction with the PMIC via a special
power IRQ. Add support for this.

Signed-off-by: Georgi Djakov <georgi.djakov <at>>
 drivers/mmc/host/sdhci-msm.c |   66 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 66 insertions(+)

diff --git a/drivers/mmc/host/sdhci-msm.c b/drivers/mmc/host/sdhci-msm.c
index 0653fe730150..ac5700233e12 100644
--- a/drivers/mmc/host/sdhci-msm.c
+++ b/drivers/mmc/host/sdhci-msm.c
 <at>  <at>  -32,6 +32,21  <at>  <at> 
 #define CORE_POWER		0x0
 #define CORE_SW_RST		BIT(7)

+#define CORE_PWRCTL_STATUS	0xdc
+#define CORE_PWRCTL_MASK	0xe0
+#define CORE_PWRCTL_CLEAR	0xe4
+#define CORE_PWRCTL_CTL		0xe8
+#define REQ_BUS_OFF		BIT(0)
+#define REQ_BUS_ON		BIT(1)
+#define REQ_IO_LOW		BIT(2)
(Continue reading)

Sven Eckelmann | 23 Jun 18:20 2016

QCA IPQ4019 support in mainline linux


I was trying to get a IPQ40xx/AP-DK01.1-C1 based board booting with Linux
4.7-rc3. It looks like it fails relative early in the boot process. One of the
problems seems to be that the reserved memory is currently missing for this
SoC. This crashes the system when early_alloc_aligned does the memset for
vectors in devicemaps_init.

I would have expected something like this in

	reserved-memory {
		#address-cells = <1>;
		#size-cells = <1>;
		rsvd1 <at> 87000000 {
			reg = <0x87000000 0x500000>;
		wifi_dump <at> 87500000 {
			reg = <0x87500000 0x600000>;
		rsvd2 <at> 87B00000 {
			reg = <0x87B00000 0x500000>;

But it looks that this is not yet enough. It also hangs slightly later
(Continue reading)

John Stultz | 23 Jun 01:45 2016

[RESEND][PATCH] device-tree: nexus7: Remove power gpio key entry and use pmic8xxx-pwrkey

Since the pmic8xxx-pwrkey driver is already supported in the
qcom-apq8064.dtsi, and the pmic8xxx-pwrkey supports logic to
configure proper device shutdown when ps_hold goes low, it is
better to use that driver then a generic gpio button.

Thus this patch remove the gpio power key entry here, so we
don't get double input events from having two drivers enabled.

Cc: Rob Herring <robh+dt <at>>
Cc: Andy Gross <agross <at>>
Cc: Bjorn Andersson <bjorn.andersson <at>>
Cc: Stephen Boyd <stephen.boyd <at>>
Cc: linux-arm-msm <at>
Cc: devicetree <at>
Acked-by: Rob Herring <robh <at>>
Acked-by: Bjorn Andersson <bjorn.andersson <at>>
Signed-off-by: John Stultz <john.stultz <at>>
 arch/arm/boot/dts/qcom-apq8064-asus-nexus7-flo.dts | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/arch/arm/boot/dts/qcom-apq8064-asus-nexus7-flo.dts b/arch/arm/boot/dts/qcom-apq8064-asus-nexus7-flo.dts
index 32fedfa..7b05f07 100644
--- a/arch/arm/boot/dts/qcom-apq8064-asus-nexus7-flo.dts
+++ b/arch/arm/boot/dts/qcom-apq8064-asus-nexus7-flo.dts
 <at>  <at>  -29,12 +29,6  <at>  <at> 

 	gpio-keys {
 		compatible = "gpio-keys";
-		power {
(Continue reading)

Lina Iyer | 22 Jun 21:36 2016

[PATCH 00/14] PM: SoC idle support using PM domains

Hi all,

Changes since RFC-v3:
- Reorganize the patches. Documentations have their own patch.
- Moved code around with PSCI OS initiated so they would not have compiler
  errors in other configuration.
- Minor bug fixes with genpd power_on functionality.
- Rebased on top of 4.7-rc1

This is the submission of the SoC idle support in the kernel for CPU domains
using genpd. The patches were submitted as RFC's earlier, the last of them is
[1]. Since the RFC, multiple discussions have happened around making the
patches generic across all architectures. For now, the patches address the
needs of the ARM community, but sure enough can be extended to support other
architectures. Some of the limitations in making this patch generic is the lack
of device idle state description in the DT, but that in itself is a bigger
topic for a future discussion.

The patch has been tested on the 410c Dragonboard and the MTK EVB boards. Both
show good power savings when used with OS Initiated PSCI f/w.

Ulf is maintaining a branch tracking the PM/genpd changes that are in
pipleline. This series sits well on his branch. You may find the entire series
at [2].


(Continue reading)

Bjorn Andersson | 20 Jun 23:28 2016

[PATCH v3 1/2] remoteproc: qcom: Driver for the self-authenticating Hexagon v5

From: Bjorn Andersson <bjorn.andersson <at>>

This initial hack powers the q6v5, boots and authenticate the mba and
use that to load the mdt and subsequent bXX files.

Signed-off-by: Bjorn Andersson <bjorn.andersson <at>>
Signed-off-by: Bjorn Andersson <bjorn.andersson <at>>

Changes since v2:
- Balancing the rom_clk calls
- Moved reset wait to the reset function
- Various cleanups per Srinivas review

Changes since v1:
- Corrected boot address in relocation case
- Using rproc_da_to_va() to clean up mdt loader api
- Dynamically allocating scratch space for mdt verification

 drivers/remoteproc/Kconfig           |  12 +
 drivers/remoteproc/Makefile          |   2 +
 drivers/remoteproc/qcom_mdt_loader.c | 179 +++++++
 drivers/remoteproc/qcom_mdt_loader.h |  13 +
 drivers/remoteproc/qcom_q6v5_pil.c   | 916 +++++++++++++++++++++++++++++++++++
 5 files changed, 1122 insertions(+)
 create mode 100644 drivers/remoteproc/qcom_mdt_loader.c
 create mode 100644 drivers/remoteproc/qcom_mdt_loader.h
 create mode 100644 drivers/remoteproc/qcom_q6v5_pil.c

(Continue reading)

Thomas Pedersen | 20 Jun 20:19 2016

[PATCH] dts: ipq4019: support ARMv7 PMU

Add support for cortex-a7-pmu present on ipq4019 SoCs.

Signed-off-by: Thomas Pedersen <twp <at>>
 arch/arm/boot/dts/qcom-ipq4019.dtsi | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/arch/arm/boot/dts/qcom-ipq4019.dtsi b/arch/arm/boot/dts/qcom-ipq4019.dtsi
index 5c08d19..a520ef5 100644
--- a/arch/arm/boot/dts/qcom-ipq4019.dtsi
+++ b/arch/arm/boot/dts/qcom-ipq4019.dtsi
 <at>  <at>  -84,6 +84,12  <at>  <at> 

+	pmu {
+		compatible = "arm,cortex-a7-pmu";
+		interrupts = <GIC_PPI 7 (GIC_CPU_MASK_SIMPLE(4) |
+	};
 	clocks {
 		sleep_clk: sleep_clk {
 			compatible = "fixed-clock";

The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

Bjorn Andersson | 20 Jun 08:19 2016

[PATCH 1/6] wcn36xx: Fold indication payload into message header

From: Bjorn Andersson <bjorn.andersson <at>>

Merge the two allocation instead of separately allocating room for the
indication payload.

Signed-off-by: Bjorn Andersson <bjorn.andersson <at>>
Signed-off-by: Bjorn Andersson <bjorn.andersson <at>>
 drivers/net/wireless/ath/wcn36xx/smd.c | 15 ++++++---------
 drivers/net/wireless/ath/wcn36xx/smd.h |  2 +-
 2 files changed, 7 insertions(+), 10 deletions(-)

diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c
index e8b630c4f11e..1a9580d72077 100644
--- a/drivers/net/wireless/ath/wcn36xx/smd.c
+++ b/drivers/net/wireless/ath/wcn36xx/smd.c
 <at>  <at>  -2229,14 +2229,8  <at>  <at>  static void wcn36xx_smd_rsp_process(struct wcn36xx *wcn, void *buf, size_t len)
-		msg_ind = kmalloc(sizeof(*msg_ind), GFP_KERNEL);
-		if (!msg_ind)
-			goto nomem;
-		msg_ind->msg_len = len;
-		msg_ind->msg = kmemdup(buf, len, GFP_KERNEL);
-		if (!msg_ind->msg) {
-			kfree(msg_ind);
+		msg_ind = kmalloc(sizeof(*msg_ind) + len, GFP_KERNEL);
+		if (!msg_ind) {
(Continue reading)

weiyj_lk | 18 Jun 19:26 2016

[PATCH -next] drm/msm/dsi: Fix return value check in msm_dsi_host_set_display_mode()

From: Wei Yongjun <yongjun_wei <at>>

In case of error, the function drm_mode_duplicate() returns NULL
pointer not ERR_PTR(). The IS_ERR() test in the return value check
should be replaced with NULL test.

Signed-off-by: Wei Yongjun <yongjun_wei <at>>
 drivers/gpu/drm/msm/dsi/dsi_host.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c
index a3e47ad8..97e5a4d 100644
--- a/drivers/gpu/drm/msm/dsi/dsi_host.c
+++ b/drivers/gpu/drm/msm/dsi/dsi_host.c
 <at>  <at>  -2245,9 +2245,9  <at>  <at>  int msm_dsi_host_set_display_mode(struct mipi_dsi_host *host,

 	msm_host->mode = drm_mode_duplicate(msm_host->dev, mode);
-	if (IS_ERR(msm_host->mode)) {
+	if (!msm_host->mode) {
 		pr_err("%s: cannot duplicate mode\n", __func__);
-		return PTR_ERR(msm_host->mode);
+		return -ENOMEM;

 	return 0;