[PATCH] regulator: core: Clean enabling always-on regulators + their supplies

2018-12-06 Thread Douglas Anderson
Fixes: 1fc12b05895e ("regulator: core: Avoid propagating to supplies when possible") Reported-by: Evan Green Signed-off-by: Douglas Anderson --- drivers/regulator/core.c | 19 --- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/drivers/regulator/core.c b/

[PATCH v2] arm64: dts: sdm845: Add videocc node

2018-12-03 Thread Douglas Anderson
From: Taniya Das This adds the video clock controller node to sdm845 based on the examples in the bindings. Signed-off-by: Taniya Das Signed-off-by: Douglas Anderson --- Changes in v2: - Add #reset-cells = <1>. - Sort properly. arch/arm64/boot/dts/qcom/sdm845.dtsi | 9 +

[PATCH 2/2] arm64: dts: sdm845: Add gpu clock controller node

2018-11-28 Thread Douglas Anderson
Add the GPU clock controller nodes as per the example. Signed-off-by: Douglas Anderson --- arch/arm64/boot/dts/qcom/sdm845.dtsi | 11 +++ 1 file changed, 11 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom/sdm845.dtsi index 1419b0098cb3

[PATCH 1/2] dt-bindings: clock: qcom: Fix the xo parent in gpucc example

2018-11-28 Thread Douglas Anderson
is actually provided by the RPMh Clock Controller. Presumably that's the one that was wanted. Let's update the example to make this clearer. Fixes: e431c92188a9 ("dt-bindings: clock: Introduce QCOM Graphics clock bindings") Signed-off-by: Douglas Anderson --- Documentation/device

[PATCH] clk: qcom: gpu_cc_gmu_clk_src has 5 parents, not 6

2018-11-28 Thread Douglas Anderson
is goes boom at bootup. Fixes: 453361cdd757 ("clk: qcom: Add graphics clock controller driver for SDM845") Signed-off-by: Douglas Anderson --- drivers/clk/qcom/gpucc-sdm845.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/qcom/gpucc-sdm845.c b/drivers/cl

[PATCH] dt-bindings: clock: Require #reset-cells in sdm845-videocc

2018-11-27 Thread Douglas Anderson
1603 ("dt-bindings: clock: Introduce QCOM Video clock bindings") Suggested-by: Stephen Boyd Signed-off-by: Douglas Anderson --- Documentation/devicetree/bindings/clock/qcom,videocc.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/clo

[PATCH] regulator: core: Apply system load even if no consumer loads

2018-11-26 Thread Douglas Anderson
) Reported-by: Brian Masney Signed-off-by: Douglas Anderson Tested-by: Brian Masney --- drivers/regulator/core.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index dbe2f2e6e625..dffee5432ca1 100644 --- a/drivers/regulator/core.c +++

[PATCH v2 2/2] regulator: core: Avoid propagating to supplies when possible

2018-11-20 Thread Douglas Anderson
gether in one patch. Also: since this comes after commit f8702f9e4aa7 ("regulator: core: Use ww_mutex for regulators locking") we can now move to use _regulator_disable() for our supply and keep it in the lock. Signed-off-by: Douglas Anderson --- NOTE: this patch is based atop the patch (&q

[PATCH v2 1/2] regulator: core: Only count load for enabled consumers

2018-11-20 Thread Douglas Anderson
optimization still for some cases, it's cleaner to just remove it. A later patch will attempt to get some efficiency back by not propogating enables up unnecessarily. Signed-off-by: Douglas Anderson --- Please give this patch lots of extra review. It seems to work for me, but I haven't d

[PATCH 3/7] regulator: core: Don't double-disable supplies in regulator_disable_deferred()

2018-11-19 Thread Douglas Anderson
e: Use ww_mutex for regulators locking") Signed-off-by: Douglas Anderson --- drivers/regulator/core.c | 10 -- 1 file changed, 10 deletions(-) diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index 0052bbc8c531..63a8af1e2256 100644 --- a/drivers/regulator/core.c +++

[PATCH 6/7] regulator: core: Avoid propagating to supplies when possible

2018-11-19 Thread Douglas Anderson
ulators. Signed-off-by: Douglas Anderson --- drivers/regulator/core.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index 23e852d38b88..2eda87520832 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -1822

[PATCH 5/7] regulator: core: add enable_count for consumers to debug fs

2018-11-19 Thread Douglas Anderson
Now that consumers all keep track of their own enable count, let's add it into the regulator_summary. Signed-off-by: Douglas Anderson --- drivers/regulator/core.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index

[PATCH 4/7] regulator: core: Only count load for enabled consumers

2018-11-19 Thread Douglas Anderson
optimization still for some cases, it's cleaner to just remove it. A later patch will attempt to get some efficiency back by not propogating enables up unnecessarily. Signed-off-by: Douglas Anderson --- Please give this patch lots of extra review. It seems to work for me, but I haven't d

[PATCH 7/7] regulator: core: Remove loop disabling supplies in regulator_force_disable()

2018-11-19 Thread Douglas Anderson
_count, but even that might be a little strange. For now let's just remove the code and we can add something back in if someone can explain what's expected. Fixes: f8702f9e4aa7 ("regulator: core: Use ww_mutex for regulators locking") Signed-off-by: Douglas Anderson --- drivers/regulator/co

[PATCH 2/7] regulator: core: Don't assume always_on when is_enabled returns err

2018-11-19 Thread Douglas Anderson
n the code were not properly checking for errors. Let's resolve this. Signed-off-by: Douglas Anderson --- drivers/regulator/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index ff5ca185bb8f..0052bbc8c531 100644 ---

[PATCH 1/7] regulator: core: Properly expose requested_microamps in sysfs

2018-11-19 Thread Douglas Anderson
The "requested_microamps" sysfs attribute was only being exposed for "current" regulators. This didn't make sense. Allow it to be exposed always. Signed-off-by: Douglas Anderson --- drivers/regulator/core.c | 4 1 file changed, 4 deletions(-) diff --git a/driver

[PATCH 2/2] arm64: dts: qcom: Add SoC-specific string for sdhci-msm-v4 nodes

2018-11-05 Thread Douglas Anderson
As per upstream discussion [1], we should have an SoC-specific compatible string for Qualcomm's SDHCI nodes. Let's add it. [1] https://lkml.kernel.org/r/20181105203657.GA32282@bogus Signed-off-by: Douglas Anderson --- arch/arm64/boot/dts/qcom/msm8916.dtsi | 4 ++-- arch/arm64/boot/dts/qcom

[PATCH 1/2] ARM: dts: qcom: Add SoC-specific string for sdhci-msm-v4 nodes

2018-11-05 Thread Douglas Anderson
As per upstream discussion [1], we should have an SoC-specific compatible string for Qualcomm's SDHCI nodes. Let's add it. [1] https://lkml.kernel.org/r/20181105203657.GA32282@bogus Signed-off-by: Douglas Anderson --- arch/arm/boot/dts/qcom-apq8084.dtsi | 4 ++-- arch/arm/boot/dts/qcom

[PATCH 1/6] dt-bindings: drm/panel: simple: Add no-hpd property

2018-10-22 Thread Douglas Anderson
the HPD isn't hooked up you can look at the timing diagram on the panel datasheet and insert a delay for the maximum amount of time that the HPD might take to come up. Let's add a property in the device tree for this concept. Signed-off-by: Douglas Anderson --- .../devicetree/bindings/display/panel

[PATCH] tty: serial: qcom_geni_serial: Don't slow all ports just for kgdb

2018-10-15 Thread Douglas Anderson
-off-by: Douglas Anderson --- drivers/tty/serial/qcom_geni_serial.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/drivers/tty/serial/qcom_geni_serial.c b/drivers/tty/serial/qcom_geni_serial.c index d3b5261ee80a..9ee6ce725e43 100644 --- a/drivers/tty/serial

[PATCH] dt-bindings: ufs: Fix the compatible string definition

2018-10-12 Thread Douglas Anderson
licit. We'll include a nod to the existing driver and the old binding and say that we should always include the "qcom,ufshc" string in addition to the SoC compatible string. While we're at it we'll also include another example SoC known to have UFS: sdm845. Fixes: 47555a5c8a11 ("scs

[PATCH] dt-bindings: phy-qcom-qmp: Fix several mistakes from prior commits

2018-10-12 Thread Douglas Anderson
more obvious which types of PHYs need clocks and resets. This was sorta implicit in the "-names" description but I found myself confused. * As per the code not all "pcie qmp phys" have resets. Specifically note that the "has_lane_rst" property in the driver is false for

[PATCH v2] arm64: dts: qcom: sdm845: Add qspi (quad SPI) node

2018-10-08 Thread Douglas Anderson
dm845 to header") to add the needed defines. It also shouldn't land until the patch ("dt-bindings: spi: Qualcomm Quad SPI(QSPI) documentation") [1] lands. [1] https://lkml.kernel.org/r/20181002214709.162330-1-ryandc...@chromium.org Signed-off-by: Douglas Anderson --- Changes in

[PATCH] arm64: dts: qcom: sdm845: Add qspi (quad SPI) node

2018-10-04 Thread Douglas Anderson
dm845 to header") to add the needed defines. It also shouldn't land until the patch ("dt-bindings: spi: Qualcomm Quad SPI(QSPI) documentation") [1] lands. [1] https://lkml.kernel.org/r/20181002214709.162330-1-ryandc...@chromium.org Signed-off-by: Douglas Anderson --- arch/arm64/

[RFC PATCH] PM / core: skip suspend next time if resume returns an error

2018-09-27 Thread Douglas Anderson
was intermittent for some reason). Obviously this patch is pretty simplistic and certainly doesn't fix the world, but perhaps it moves us in the right direction? Signed-off-by: Douglas Anderson --- drivers/base/power/main.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git

[PATCH v3 2/2] soc: qcom: geni: geni_se_clk_freq_match() should always accept multiples

2018-09-06 Thread Douglas Anderson
ate we can make. [1] https://lkml.kernel.org/r/1535107336-2214-1-git-send-email-dk...@codeaurora.org Fixes: eddac5af0654 ("soc: qcom: Add GENI based QUP Wrapper driver") Signed-off-by: Douglas Anderson Reviewed-by: Matthias Kaehlcke --- Changes in v3: None Changes in v2: - Init best_delt

[PATCH v3 1/2] soc: qcom: geni: Don't ignore clk_round_rate() errors in geni_se_clk_tbl_get()

2018-09-06 Thread Douglas Anderson
. ...this patch doesn't try to fix those problems, it just makes the error handling more correct. Fixes: eddac5af0654 ("soc: qcom: Add GENI based QUP Wrapper driver") Signed-off-by: Douglas Anderson Reviewed-by: Matthias Kaehlcke --- Changes in v3: - Init "freq" again since remo

[PATCH v2 1/2] soc: qcom: geni: Don't ignore clk_round_rate() errors in geni_se_clk_tbl_get()

2018-09-06 Thread Douglas Anderson
. ...this patch doesn't try to fix those problems, it just makes the error handling more correct. Fixes: eddac5af0654 ("soc: qcom: Add GENI based QUP Wrapper driver") Signed-off-by: Douglas Anderson Reviewed-by: Matthias Kaehlcke --- Changes in v2: - Get rid of unneeded init of "freq&q

[PATCH v2 2/2] soc: qcom: geni: geni_se_clk_freq_match() should always accept multiples

2018-09-06 Thread Douglas Anderson
ate we can make. [1] https://lkml.kernel.org/r/1535107336-2214-1-git-send-email-dk...@codeaurora.org Fixes: eddac5af0654 ("soc: qcom: Add GENI based QUP Wrapper driver") Signed-off-by: Douglas Anderson Reviewed-by: Matthias Kaehlcke --- Changes in v2: - Init best_delta to ULONG_MAX and av

[PATCH] tty: serial: qcom_geni_serial: Fix serial when not used as console

2018-09-05 Thread Douglas Anderson
gt; 0 qcom_geni_serial_startup qcom_geni_serial_port_setup qcom_geni_serial_pm: 0 => 3 qcom_geni_serial_pm: 3 => 0 qcom_geni_serial_startup qcom_geni_serial_start_tx Fixes: c4f528795d1a ("tty: serial: msm_geni_serial: Add serial driver support for GENI based QUP") Signed-of

[PATCH 1/2] soc: qcom: geni: Don't ignore clk_round_rate() errors in geni_se_clk_tbl_get()

2018-08-30 Thread Douglas Anderson
he error handling more correct. Fixes: eddac5af0654 ("soc: qcom: Add GENI based QUP Wrapper driver") Signed-off-by: Douglas Anderson --- drivers/soc/qcom/qcom-geni-se.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/soc/qcom/qcom-geni-se.c b/drivers/so

[PATCH 2/2] soc: qcom: geni: geni_se_clk_freq_match() should always accept multiples

2018-08-30 Thread Douglas Anderson
ate we can make. [1] https://lkml.kernel.org/r/1535107336-2214-1-git-send-email-dk...@codeaurora.org Fixes: eddac5af0654 ("soc: qcom: Add GENI based QUP Wrapper driver") Signed-off-by: Douglas Anderson --- drivers/soc/qcom/qcom-geni-se.c | 37 - 1 file

[PATCH] clk: qcom: Allocate space for NULL terimation in DFS table

2018-08-30 Thread Douglas Anderson
: cc4f6944d0e3 ("clk: qcom: Add support for RCG to register for DFS") Signed-off-by: Douglas Anderson --- drivers/clk/qcom/clk-rcg2.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/clk/qcom/clk-rcg2.c b/drivers/clk/qcom/clk-rcg2.c index d5d77f9ad170..6e3bd195d

[RFT PATCH 1/2] pinctrl: ssbi-gpio: Fix pm8xxx_pin_config_get() to be compliant

2018-08-30 Thread Douglas Anderson
Fix msm_config_group_get() to be compliant"), but it was pointed out that ssbi-gpio has the same problem. Let's fix it there too. Fixes: b4c45fe974bc ("pinctrl: qcom: ssbi: Family A gpio & mpp drivers") Signed-off-by: Douglas Anderson --- drivers/pinctrl/qcom/pinctrl-ssbi-

[RFT PATCH 2/2] pinctrl: spmi-mpp: Fix pmic_mpp_config_get() to be compliant

2018-08-30 Thread Douglas Anderson
oing that. It seems like another driver (ssbi-gpio) uses a custom attribute (PM8XXX_QCOM_PULL_UP_STRENGTH) for something similar so maybe a future change should do that here too. Fixes: cfb24f6ebd38 ("pinctrl: Qualcomm SPMI PMIC MPP pin controller driver") Signed-off-by: Douglas Ander

[RFT PATCH 0/2] pinctrl: Fix two more xxx_config_get() functions to be compliant

2018-08-30 Thread Douglas Anderson
phen found. Hopefully someone can test them out and make sure they work as advertised. Douglas Anderson (2): pinctrl: ssbi-gpio: Fix pm8xxx_pin_config_get() to be compliant pinctrl: spmi-mpp: Fix pmic_mpp_config_get() to be compliant drivers/pinctrl/qcom/pinctrl-spmi-mpp.c | 19 ++-

[PATCH v3 1/3] arm64: dts: qcom: sdm845: Add USB-related nodes

2018-08-22 Thread Douglas Anderson
From: Manu Gautam This adds nodes for USB and related PHYs. Signed-off-by: Manu Gautam [dianders: reworked quite a bit] Signed-off-by: Douglas Anderson --- Changes in v3: - Don't just fix qfprom unit address, fix the reg too (Stephen). - Rebased to next-20180822 Changes in v2: - Use

[PATCH v3 2/3] arm64: dts: qcom: sdm845-mtp: Add RPMh VRM/XOB regulators

2018-08-22 Thread Douglas Anderson
with lots of patches adding regulator_set_load() calls to drivers. NOTE: This patch is loosely based on one originally shared to me by David Collins. Signed-off-by: Douglas Anderson --- Changes in v3: - Set vin-supply for s4a_1p8 properly (Stephen). - All regulators now HPM / disallow mode c

[PATCH v3 3/3] arm64: dts: qcom: sdm845-mtp: Add nodes for USB

2018-08-22 Thread Douglas Anderson
rites on pmi8998: - pm_comm_write_byte(2, 0x1153, 0x2C, 0); - pm_comm_write_byte(2, 0x1152, 0x07, 0); - pm_comm_write_byte(2, 0x1140, 0x00, 0); - pm_comm_write_byte(2, 0x1140, 0x01, 0); Signed-off-by: Douglas Anderson --- Changes in v3: None Changes in v2: None arch/arm64/boot/dts/qcom/sdm845-mtp.dt

[PATCH v3 0/3] arm64: dts: sdm845: Add RPMh-regulators and usb

2018-08-22 Thread Douglas Anderson
oo - LDO14 initial mode is LPM and shouldn't be always on (Vivek G) - LDO25 should have min voltage of 3.3V Douglas Anderson (2): arm64: dts: qcom: sdm845-mtp: Add RPMh VRM/XOB regulators arm64: dts: qcom: sdm845-mtp: Add nodes for USB Manu Gautam (1): arm64: dts: qcom: sdm845: Add USB-rel

[PATCH v2 2/3] regulator: core: Add consumer-requested load in regulator_summary

2018-08-16 Thread Douglas Anderson
It's handy to see the load requested by a regulator consumer in the regulator_summary. Add it. Signed-off-by: Douglas Anderson --- Changes in v2: - No longer consider consumers that don't call regulator_set_load(). drivers/regulator/core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion

[PATCH v2 0/3] regulator: core: Improve regulator_summary

2018-08-16 Thread Douglas Anderson
be applied separately but some rebasing would be required since the patches touch much of the same code. Changes in v2: - No longer consider consumers that don't call regulator_set_load(). Douglas Anderson (3): regulator: core: Add the opmode to regulator_summary regulator: core: Add consumer

[PATCH v2 3/3] regulator: core: Add locking to debugfs regulator_summary

2018-08-16 Thread Douglas Anderson
Most functions that access the rdev lock the rdev mutex before looking at data. ...but not the code that implements the debugfs regulator_summary. It probably should though, so let's do it. Note: this fixes no known issues. The problem was found only by code inspection. Signed-off-by: Douglas

[PATCH v2 1/3] regulator: core: Add the opmode to regulator_summary

2018-08-16 Thread Douglas Anderson
It's handy to know what opmode a regulator has been configured to in the summary. Add it. Signed-off-by: Douglas Anderson --- Changes in v2: None drivers/regulator/core.c | 28 +--- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/drivers/regulator

[PATCH 1/4] regulator: core: If consumers don't call regulator_set_load() assume max

2018-08-14 Thread Douglas Anderson
first. Signed-off-by: Douglas Anderson --- drivers/regulator/core.c | 10 +- drivers/regulator/internal.h | 1 + 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index 6ed568b96c0e..a4da68775b49 100644 --- a/drivers

[PATCH 4/4] regulator: core: Add locking to debugfs regulator_summary

2018-08-14 Thread Douglas Anderson
Most functions that access the rdev lock the rdev mutex before looking at data. ...but not the code that implements the debugfs regulator_summary. It probably should though, so let's do it. Signed-off-by: Douglas Anderson --- drivers/regulator/core.c | 51

[PATCH 2/4] regulator: core: Add the opmode to regulator_summary

2018-08-14 Thread Douglas Anderson
It's handy to know what opmode a regulator has been configured to in the summary. Add it. Signed-off-by: Douglas Anderson --- drivers/regulator/core.c | 28 +--- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/drivers/regulator/core.c b/drivers

[PATCH 3/4] regulator: core: Add consumer-requested load in regulator_summary

2018-08-14 Thread Douglas Anderson
n't called regulator_set_load() and the case where a consumer called it but the load is currently 0 mA. Signed-off-by: Douglas Anderson --- drivers/regulator/core.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index b8

[PATCH 0/4] regulator: core: A few useful patches for regulators that need load set

2018-08-14 Thread Douglas Anderson
likely to work. The rest of the patches just work on regulator_summary to try to make it so we can confirm that the first patch works. Douglas Anderson (4): regulator: core: If consumers don't call regulator_set_load() assume max regulator: core: Add the opmode to regulator_summary

[PATCH 2/3] arm64: dts: qcom: sdm845-mtp: Add RPMh VRM/XOB regulators

2018-08-10 Thread Douglas Anderson
: This patch is loosely based on one originally shared to me by David Collins. Signed-off-by: Douglas Anderson --- Changes in v2: - LDO14 initial mode is LPM and shouldn't be always on (Vivek G) - LDO25 should have min voltage of 3.3V arch/arm64/boot/dts/qcom/sdm845-mtp.dts | 445

[PATCH 1/3] arm64: dts: qcom: sdm845: Add USB-related nodes

2018-08-10 Thread Douglas Anderson
From: Manu Gautam This adds nodes for USB and related PHYs. Signed-off-by: Manu Gautam [dianders: reworked quite a bit] Signed-off-by: Douglas Anderson --- Changes in v2: - Use "0x784000" for qfprom rather than "0x78" as per docs. - Add calibration for 2nd USB port t

[PATCH 3/3] arm64: dts: qcom: sdm845-mtp: Add nodes for USB

2018-08-10 Thread Douglas Anderson
rites on pmi8998: - pm_comm_write_byte(2, 0x1153, 0x2C, 0); - pm_comm_write_byte(2, 0x1152, 0x07, 0); - pm_comm_write_byte(2, 0x1140, 0x00, 0); - pm_comm_write_byte(2, 0x1140, 0x01, 0); Signed-off-by: Douglas Anderson --- Changes in v2: None arch/arm64/boot/dts/qcom/sdm845-mtp.dts | 61 +

[PATCH 0/3] arm64: dts: sdm845: Add RPMh-regulators and usb

2018-08-10 Thread Douglas Anderson
000" for qfprom rather than "0x78" as per docs. - Add calibration for 2nd USB port too - LDO14 initial mode is LPM and shouldn't be always on (Vivek G) - LDO25 should have min voltage of 3.3V Douglas Anderson (2): arm64: dts: qcom: sdm845-mtp: Add RPMh VRM/XOB regulators arm6

[PATCH] regulator: qcom-rpmh: Add stylistic breaks in the default cases

2018-08-10 Thread Douglas Anderson
No functional change here but it can make the code more readable to have breaks in the "default" case even though it's the last case. Let's add them. Signed-off-by: Douglas Anderson --- drivers/regulator/qcom-rpmh-regulator.c | 3 +++ 1 file changed, 3 insertions(+) diff --git

[PATCH] dt-bindings: phy: qcom-qmp: Cleanup the 'reg' documentation as per review

2018-08-06 Thread Douglas Anderson
er already landed relying on reg-names so we'll just document it and move on. Fixes: 8b1087fa3a27 ("phy: qcom-qmp: Fix dts bindings to reflect reality") Suggested-by: Rob Herring Signed-off-by: Douglas Anderson --- .../devicetree/bindings/phy/qcom-qmp-phy.txt | 19 +++

[PATCH v3 2/2] clk: qcom: Add qspi (Quad SPI) clocks for sdm845

2018-07-24 Thread Douglas Anderson
Add both the interface and core clock. Signed-off-by: Douglas Anderson (am from https://lore.kernel.org/patchwork/patch/966680/mbox) --- Changes in v3: - Removed gcc_parent_names_9 which I had left in (doh!). Changes in v2: - Only 19.2, 100, 150, and 300 MHz now. - All clocks come from MAIN

[PATCH v3 0/2] clk: qcom: Quad SPI (qspi) clock support for sdm845

2018-07-24 Thread Douglas Anderson
had left in (doh!). Changes in v2: - Only 19.2, 100, 150, and 300 MHz now. - All clocks come from MAIN rather than EVEN. - Use parent map 0 instead of new parent map 9. Douglas Anderson (2): clk: qcom: Add qspi (Quad SPI) clock defines for sdm845 to header clk: qcom: Add qspi (Quad SPI) clo

[PATCH v3 1/2] clk: qcom: Add qspi (Quad SPI) clock defines for sdm845 to header

2018-07-24 Thread Douglas Anderson
These clocks will need to be defined in the clock driver and referenced in device tree files. Signed-off-by: Douglas Anderson --- Changes in v3: None Changes in v2: None include/dt-bindings/clock/qcom,gcc-sdm845.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/dt-bindings

[PATCH v2 1/2] clk: qcom: Add qspi (Quad SPI) clock defines for sdm845 to header

2018-07-23 Thread Douglas Anderson
These clocks will need to be defined in the clock driver and referenced in device tree files. Signed-off-by: Douglas Anderson --- Changes in v2: None include/dt-bindings/clock/qcom,gcc-sdm845.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/dt-bindings/clock/qcom,gcc-sdm845.h

[PATCH v2 2/2] clk: qcom: Add qspi (Quad SPI) clocks for sdm845

2018-07-23 Thread Douglas Anderson
Add both the interface and core clock. Signed-off-by: Douglas Anderson --- Changes in v2: - Only 19.2, 100, 150, and 300 MHz now. - All clocks come from MAIN rather than EVEN. - Use parent map 0 instead of new parent map 9. drivers/clk/qcom/gcc-sdm845.c | 63

[PATCH v2 0/2] clk: qcom: Quad SPI (qspi) clock support for sdm845

2018-07-23 Thread Douglas Anderson
now. - All clocks come from MAIN rather than EVEN. - Use parent map 0 instead of new parent map 9. Douglas Anderson (2): clk: qcom: Add qspi (Quad SPI) clock defines for sdm845 to header clk: qcom: Add qspi (Quad SPI) clocks for sdm845 drivers/clk/qcom/gcc-sdm845.c |

[RFC PATCH 0/2] clk: qcom: Quad SPI (qspi) clock support for sdm845

2018-07-18 Thread Douglas Anderson
tried to map Qualcomm register definition into the clock driver, so it'd be nice if someone could double-check and make sure I mapped all the numbers correctly. If nothing else it does appear to work though. Douglas Anderson (2): clk: qcom: Add qspi (Quad SPI) clock defines for sdm845 to header

[RFC PATCH 2/2] clk: qcom: Add qspi (Quad SPI) clocks for sdm845

2018-07-18 Thread Douglas Anderson
Add both the interface and core clock. Signed-off-by: Douglas Anderson --- drivers/clk/qcom/gcc-sdm845.c | 73 +++ 1 file changed, 73 insertions(+) diff --git a/drivers/clk/qcom/gcc-sdm845.c b/drivers/clk/qcom/gcc-sdm845.c index 0f694ed4238a..2ee96f9bc217

[RFC PATCH 1/2] clk: qcom: Add qspi (Quad SPI) clock defines for sdm845 to header

2018-07-18 Thread Douglas Anderson
These clocks will need to be defined in the clock driver and referenced in device tree files. Signed-off-by: Douglas Anderson --- include/dt-bindings/clock/qcom,gcc-sdm845.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/dt-bindings/clock/qcom,gcc-sdm845.h b/include/dt

[PATCH 1/3] arm64: dts: qcom: sdm845: Add USB-related nodes

2018-07-10 Thread Douglas Anderson
From: Manu Gautam This adds nodes for USB and related PHYs. Signed-off-by: Manu Gautam [dianders: reworked quite a bit] Signed-off-by: Douglas Anderson --- arch/arm64/boot/dts/qcom/sdm845.dtsi | 189 +++ 1 file changed, 189 insertions(+) diff --git a/arch/arm64/boot

[PATCH 0/3] arm64: dts: sdm845: Add RPMh-regulators and usb

2018-07-10 Thread Douglas Anderson
t them out there to start the review process. Douglas Anderson (2): arm64: dts: qcom: sdm845-mtp: Add RPMh VRM/XOB regulators arm64: dts: qcom: sdm845-mtp: Add nodes for USB Manu Gautam (1): arm64: dts: qcom: sdm845: Add USB-related nodes arch/arm64/boot/dts/qcom/sdm845-mtp

[PATCH 3/3] arm64: dts: qcom: sdm845-mtp: Add nodes for USB

2018-07-10 Thread Douglas Anderson
rites on pmi8998: - pm_comm_write_byte(2, 0x1153, 0x2C, 0); - pm_comm_write_byte(2, 0x1152, 0x07, 0); - pm_comm_write_byte(2, 0x1140, 0x00, 0); - pm_comm_write_byte(2, 0x1140, 0x01, 0); Signed-off-by: Douglas Anderson --- arch/arm64/boot/dts/qcom/sdm845-mtp.dts | 61 + 1 fi

[PATCH 2/3] arm64: dts: qcom: sdm845-mtp: Add RPMh VRM/XOB regulators

2018-07-10 Thread Douglas Anderson
: This patch is loosely based on one originally shared to me by David Collins. Signed-off-by: Douglas Anderson --- arch/arm64/boot/dts/qcom/sdm845-mtp.dts | 446 1 file changed, 446 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sdm845-mtp.dts b/arch/arm64/boot/dts/qcom

[PATCH] phy: qcom-qmp: Fix dts bindings to reflect reality

2018-07-06 Thread Douglas Anderson
0d239936bd ("phy: qcom-qmp: Add support for runtime PM") Signed-off-by: Douglas Anderson --- .../devicetree/bindings/phy/qcom-qmp-phy.txt | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/phy/qcom-qmp-phy.txt b/Docu

[PATCH 3/3] pinctrl: qcom: spmi-gpio: Fix pmic_gpio_config_get() to be compliant

2018-07-02 Thread Douglas Anderson
r was accidentally using "=" instead of "==" and thus was setting some internal state when you tried to query PIN_CONFIG_BIAS_DISABLE. Oops. Fixes: eadff3024472 ("pinctrl: Qualcomm SPMI PMIC GPIO pin controller driver") Signed-off-by: Douglas Anderson --- drivers

[PATCH 2/3] pinctrl: msm: Fix msm_config_group_get() to be compliant

2018-07-02 Thread Douglas Anderson
tion, so I'll follow tradition and return 1 in these cases. While I'm at it, I'll also continue searching for four leaf clovers, kocking on wood three times, and trying not to break mirrors. Fixes: f365be092572 ("pinctrl: Add Qualcomm TLMM driver") Signed-off-by: Douglas Anderson --- drivers/p

[PATCH 1/3] pinctrl: Document pin_config_group_get() return codes like pin_config_get()

2018-07-02 Thread Douglas Anderson
The pinconf_generic_dump_one() function makes the assumption that pin_config_group_get() should return -EINVAL and -ENOTSUPP just like pin_config_get() does. Document that so it's more obvious. Signed-off-by: Douglas Anderson --- include/linux/pinctrl/pinconf.h | 3 ++- 1 file changed, 2

[PATCH] arm64: dts: sdm845: Default qupv3_id_0 as "disabled" like _id_1

2018-06-29 Thread Douglas Anderson
that board currently doesn't have any peripherals under qupv3_id_0. If any board was currently using peripherals under qupv3_id_0 then that board would need to add this snippet to their board dts file: _id_0 { status = "okay"; }; Signed-off-by: Douglas Anderson --- arch/arm64

[PATCH v2 2/2] arm64: dts: sdm845: Add rpmh-clk node

2018-06-18 Thread Douglas Anderson
This adds the rpmh-clk node to sdm845 based on the examples in the bindings. Signed-off-by: Douglas Anderson --- NOTE: to apply this patch cleanly, apply it atop: arm64: dts: qcom: sdm845: Add I2C, SPI, and UART9 nodes https://patchwork.kernel.org/patch/10462691/ Changes in v2: None arch

[PATCH v2 1/2] arm64: dts: sdm845: Add rpmh-rsc node

2018-06-18 Thread Douglas Anderson
This adds the rpmh-rsc node to sdm845 based on the examples in the bindings. Signed-off-by: Douglas Anderson --- Changes in v2: - Fixed ordering of tcs-config as per Lina. arch/arm64/boot/dts/qcom/sdm845.dtsi | 19 +++ 1 file changed, 19 insertions(+) diff --git a/arch/arm64

[PATCH 1/2] arm64: dts: sdm845: Add rpmh-rsc node

2018-06-18 Thread Douglas Anderson
This adds the rpmh-rsc node to sdm845 based on the examples in the bindings. Signed-off-by: Douglas Anderson --- arch/arm64/boot/dts/qcom/sdm845.dtsi | 19 +++ 1 file changed, 19 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom/sdm845

[PATCH 2/2] arm64: dts: sdm845: Add rpmh-clk node

2018-06-18 Thread Douglas Anderson
This adds the rpmh-clk node to sdm845 based on the examples in the bindings. Signed-off-by: Douglas Anderson --- NOTE: to apply this patch cleanly, apply it atop: arm64: dts: qcom: sdm845: Add I2C, SPI, and UART9 nodes https://patchwork.kernel.org/patch/10462691/ arch/arm64/boot/dts/qcom

[PATCH v2] drivers: qcom: rpmh-rsc: Check cmd_db_ready() to help children

2018-06-18 Thread Douglas Anderson
but patches are pretty far along. === This code is based upon v11 of Lina and Raju's RPMh series. Suggested-by: Stephen Boyd Signed-off-by: Douglas Anderson Acked-by: Lina Iyer --- Changes in v2: - 1 space after a period as per Lina drivers/soc/qcom/rpmh-rsc.c | 13 + 1 file changed, 13

[PATCH] drivers: qcom: rpmh-rsc: Check cmd_db_ready() to help children

2018-06-18 Thread Douglas Anderson
Children of RPMh will need access to cmd_db. Rather than having each child have code to check if cmd_db is ready let's add the check to RPMh. Suggested-by: Stephen Boyd Signed-off-by: Douglas Anderson --- This code is based upon v11 of Lina and Raju's RPMh series. With this we'll be able

[PATCH] dt-bindings: soc: qcom: Fix default clock-freq for qcom,geni-i2c

2018-06-13 Thread Douglas Anderson
. Let's fix this. NOTE: since the i2c driver itself hasn't actually landed yet and the SoC here is very new it seems terribly unlikely that anyone was relying on the old 400 kHz number, so I'll assume this is an OK "incompatible" device tree change. Signed-off-by: Douglas Anderson --- Doc

[PATCH v2 1/2] arm64: dts: qcom: sdm845: Add I2C, SPI, and UART9 nodes

2018-06-13 Thread Douglas Anderson
doesn't appear to work in my tests with the latest posted SPI driver. All testing of SPI with this patch has been done by hacking SPI to GPIO chip select. Signed-off-by: Douglas Anderson Reviewed-by: Bjorn Andersson --- Changes in v2: - Got rid of all sleep pinctrl states for now - Add Bjorn's tags

[PATCH v2 2/2] arm64: dts: qcom: sdm845: Enable debug UART and I2C10 on sdm845-mtp

2018-06-13 Thread Douglas Anderson
The debug UART is very useful to have. I2C10 is enabled as an example of a I2C port we can talk on for now. Eventually we'll want to put peripherals under it. Signed-off-by: Douglas Anderson Reviewed-by: Bjorn Andersson Tested-by: Bjorn Andersson --- Changes in v2: - Got rid of all sleep

[PATCH 2/2] arm64: dts: qcom: sdm845: Enable debug UART and I2C10 on sdm845-mtp

2018-06-07 Thread Douglas Anderson
The debug UART is very useful to have. I2C10 is enabled as an example of a I2C port we can talk on for now. Eventually we'll want to put peripherals under it. Signed-off-by: Douglas Anderson --- arch/arm64/boot/dts/qcom/sdm845-mtp.dts | 52 + 1 file changed, 52

[PATCH 1/2] arm64: dts: qcom: sdm845: Add I2C, SPI, and UART9 nodes

2018-06-07 Thread Douglas Anderson
this so that boards only get the nodes they need (or figure out how to get dtc to strip 'disabled' nodes). For now it seems OK. These nodes were programmatically generated with a fairly dumb python script. See http://crosreview.com/1091631 for the source. Signed-off-by: Douglas Anderson --- arch

[PATCH] usb: dwc3: Remove DEBUG define from Qualcomm DWC3 glue driver

2018-05-25 Thread Douglas Anderson
It appears that a "#define DEBUG" was left in on the recent patch landed for the Qualcomm DWC3 glue driver. Let's remove it. Fixes: a4333c3a6ba9 ("usb: dwc3: Add Qualcomm DWC3 glue driver") Signed-off-by: Douglas Anderson <diand...@chromium.org> --- drivers/usb/dwc3

[PATCH] regulator: core: Allow for regulators that can't be read at bootup

2018-05-15 Thread Douglas Anderson
error that you can't recover from rather than some data that can't be recovered). [1] https://patchwork.kernel.org/patch/10340897/ Signed-off-by: Douglas Anderson <diand...@chromium.org> --- If this patch is accepted then we'll need to update the latest RPMh regulator patch to return it.

[PATCH] nvmem: Don't let a NULL cell_id for nvmem_cell_get() crash us

2018-05-15 Thread Douglas Anderson
n Qcom chips") Signed-off-by: Douglas Anderson <diand...@chromium.org> --- drivers/nvmem/core.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/nvmem/core.c b/drivers/nvmem/core.c index b5b0cdc21d01..514d1dfc5630 100644 --- a/drivers/nvmem/core.c +++ b/drivers/nvmem/core.c @@

[PATCH v2] arm64: dts: qcom: sdm845: Sort nodes in the reserved mem by address

2018-05-14 Thread Douglas Anderson
Let's keep the reserved-memory node tidy and neat and keep it sorted by address. This should have no functional change. Signed-off-by: Douglas Anderson <diand...@chromium.org> --- Changes in v2: - Oops! v1 accidentally changed the node name. Fixed. arch/arm64/boot/dts/qcom/sdm845.dts

[PATCH] arm64: dts: qcom: sdm845: Sort nodes in the reserved mem by address

2018-05-14 Thread Douglas Anderson
Let's keep the reserved-memory node tidy and neat and keep it sorted by address. This should have no functional change. Signed-off-by: Douglas Anderson <diand...@chromium.org> --- arch/arm64/boot/dts/qcom/sdm845.dtsi | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-)

[PATCH v2] arm64: dts: qcom: sdm845: Sort nodes in the soc by address

2018-05-14 Thread Douglas Anderson
This is pure-churn and should be a no-op. I'm doing it in the hopes of reducing merge conflicts. When things are sorted in a sane way (and by base address seems sane) then it's less likely that future patches will cause merge conflicts. Signed-off-by: Douglas Anderson <diand...@chromium.

[PATCH 2/2] phy: qcom-qusb2: Quiet -EPROBE_DEFER from qusb2_phy_probe()

2018-05-14 Thread Douglas Anderson
The -EPROBE_DEFER virus demands special case code to avoid printing error messages when the error is only -EPROBE_DEFER. Spread the virus to a new host: qusb2_phy_probe(). Specifically handle when our regulators might not be ready yet. Signed-off-by: Douglas Anderson <diand...@chromium.

[PATCH 1/2] phy: qcom-qmp: Quiet -EPROBE_DEFER from qcom_qmp_phy_probe()

2018-05-14 Thread Douglas Anderson
The -EPROBE_DEFER virus demands special case code to avoid printing error messages when the error is only -EPROBE_DEFER. Spread the virus to a new host: qcom_qmp_phy_probe(). Specifically handle when our regulators might not be ready yet. Signed-off-by: Douglas Anderson <diand...@chromium.

[PATCH] regulator: core: Quiet -EPROBE_DEFER from regulator_bulk_get()

2018-05-14 Thread Douglas Anderson
The -EPROBE_DEFER virus demands special case code to avoid printing error messages when the error is only -EPROBE_DEFER. Spread the virus to a new host: regulator_bulk_get() Signed-off-by: Douglas Anderson <diand...@chromium.org> --- drivers/regulator/core.c | 5 +++-- 1 file chan

[PATCH] arm64: dts: sdm845: Add command DB node

2018-05-09 Thread Douglas Anderson
Add command DB node based on the bindings example. Signed-off-by: Douglas Anderson <diand...@chromium.org> --- arch/arm64/boot/dts/qcom/sdm845.dtsi | 12 1 file changed, 12 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom/sdm84

[PATCH] arm64: dts: sdm845: Fix xo_board clock name and speed

2018-05-09 Thread Douglas Anderson
hough. - We could change the RPMh clock driver to use a dash to achieve the same effect as this patch, but all other clocks in the clock tree use underscores. It seems silly to change just this one. Fixes: 7bafa643647f ("arm64: dts: sdm845: Add minimal dts/dtsi files for sdm845 SoC

[PATCH] arm64: dts: qcom: sdm845: Sort nodes in the soc by address

2018-05-04 Thread Douglas Anderson
This is pure-churn and should be a no-op. I'm doing it in the hopes of reducing merge conflicts. When things are sorted in a sane way (and by base address seems sane) then it's less likely that future patches will cause merge conflicts. Signed-off-by: Douglas Anderson <diand...@chromium.

[PATCH v3] regulator: Don't return or expect -errno from of_map_mode()

2018-04-18 Thread Douglas Anderson
pretty clean to just define the regulator mode 0x0 (the lack of any bits set) as an invalid mode. Let's do that. Fixes: 5e5e3a42c653 ("regulator: of: Add support for parsing initial and suspend modes") Suggested-by: Javier Martinez Canillas <javi...@redhat.com> Signed-off-by:

[PATCH v2] regulator: Don't return or expect -errno from of_map_mode()

2018-04-17 Thread Douglas Anderson
pretty clean to just define the regulator mode 0x0 (the lack of any bits set) as an invalid mode. Let's do that. Suggested-by: Javier Martinez Canillas <jav...@dowhile0.org> Fixes: 5e5e3a42c653 ("regulator: of: Add support for parsing initial and suspend modes") Signed-off-by:

[PATCH] regulator: Fix return type of of_map_mode()

2018-04-17 Thread Douglas Anderson
of_map_mode() functions. While we're at it, we'll remove one pointless "inline". Fixes: 5e5e3a42c653 ("regulator: of: Add support for parsing initial and suspend modes") Signed-off-by: Douglas Anderson <diand...@chromium.org> --- drivers/regulator/cpcap-regulator.c

[PATCH] serial: core: Make sure compiler barfs for 16-byte earlycon names

2018-03-23 Thread Douglas Anderson
the name field much bigger so that we're not likely to run into this. ...but both seem like we'll just hit the bug again. Signed-off-by: Douglas Anderson <diand...@chromium.org> --- include/linux/serial_core.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/lin

  1   2   3   4   5   >