[PATCH v3 03/15] phy: rockchip-emmc: configure default output tap delay

2016-06-20 Thread Douglas Anderson
's bump up to 4 (approx 90 degree phase?). If we need to configure this any further (e.g., based on board or speed factors), we may need to consider a device tree representation. Suggested-by: Shawn Lin Signed-off-by: Brian Norris Signed-off-by: Douglas Anderson Acked-by: Kishon Vijay Abrah

[PATCH v3 06/15] mmc: sdhci-of-arasan: Always power the PHY off/on when clock changes

2016-06-20 Thread Douglas Anderson
nd will cause problems if picked without that change. Signed-off-by: Douglas Anderson Reviewed-by: Shawn Lin Tested-by: Heiko Stuebner --- Changes in v3: - Add collected tags Changes in v2: None drivers/mmc/host/sdhci-of-arasan.c | 23 --- 1 file changed, 8 insertions(+), 1

[PATCH v3 05/15] phy: rockchip-emmc: Increase lock time allowance

2016-06-20 Thread Douglas Anderson
ck was set to at least 50 MHz before, though this reliance wasn't documented anywhere. This change will be even more useful in future changes where we actually need to be able to wait for a DLL lock at slower clock speeds. Signed-off-by: Douglas Anderson Acked-by: Kishon Vijay Abraham I Rev

[PATCH v3 0/15] Changes to support 150 MHz eMMC on rk3399

2016-06-20 Thread Douglas Anderson
wn) Brian Norris (2): phy: rockchip-emmc: configure default output tap delay phy: rockchip-emmc: reindent the register definitions Douglas Anderson (11): phy: rockchip-emmc: Increase lock time allowance mmc: sdhci-of-arasan: Always power the PHY off/on when clock changes Documentation: m

[PATCH v3 11/15] mmc: sdhci-of-arasan: Add ability to export card clock

2016-06-20 Thread Douglas Anderson
s the PHY a good chance to query our clock. Signed-off-by: Douglas Anderson Reviewed-by: Heiko Stuebner Tested-by: Heiko Stuebner --- Changes in v3: - Add dependency on COMMON_CLK (actually in v2.1) (Guenter Roeck) - Add collected tags Changes in v2: None drivers/mmc/host/Kconfig

[PATCH v3 12/15] Documentation: phy: Let the rockchip eMMC PHY get an exported card clock

2016-06-20 Thread Douglas Anderson
the idea is the same. [1]: https://arasan.com/wp-content/media/eMMC-5-1-Total-Solution_Rev-1-3.pdf Signed-off-by: Douglas Anderson Acked-by: Kishon Vijay Abraham I Acked-by: Rob Herring Reviewed-by: Heiko Stuebner --- Changes in v3: - Add collected tags Changes in v2: - List out clocks and cloc

[PATCH v3 15/15] arm64: dts: rockchip: Provide emmcclk to PHY for rk3399

2016-06-20 Thread Douglas Anderson
Previous changes in this series allowed exposing the card clock from the rk3399 SDHCI device and allowed consuming the card clock in the rk3399 eMMC PHY. Hook things up in the main rk3399 dtsi file. Signed-off-by: Douglas Anderson Tested-by: Heiko Stuebner --- Changes in v3: - Add collected

[PATCH v3 08/15] mmc: sdhci-of-arasan: Properly set corecfg_baseclkfreq on rk3399

2016-06-20 Thread Douglas Anderson
r SoCs. Note that a specific compatible string for rk3399 is already in use and so we add that to the table to match rk3399. [1]: https://arasan.com/wp-content/media/eMMC-5-1-Total-Solution_Rev-1-3.pdf Signed-off-by: Douglas Anderson Reviewed-by: Heiko Stuebner Reviewed-by: Shawn Lin Tested-

[PATCH v3 14/15] phy: rockchip-emmc: Set phyctrl_frqsel based on card clock

2016-06-20 Thread Douglas Anderson
s series, since performance is still good but signal integrity problems are less prevelant at 150 MHz. [1]: https://arasan.com/wp-content/media/eMMC-5-1-Total-Solution_Rev-1-3.pdf Signed-off-by: Douglas Anderson Acked-by: Kishon Vijay Abraham I --- Changes in v3: - Use phy_init / phy_exit (Heiko)

[PATCH v3 09/15] arm64: dts: rockchip: Add soc-ctl-syscon to sdhci for rk3399

2016-06-20 Thread Douglas Anderson
On rk3399 we'd like to be able to properly set corecfg registers in the Arasan SDHCI component. Specify the syscon to enable that. Signed-off-by: Douglas Anderson Tested-by: Heiko Stuebner --- Changes in v3: - Add collected tags Changes in v2: None arch/arm64/boot/dts/rockchip/rk3399

[PATCH v3 13/15] phy: rockchip-emmc: Minor code cleanup in rockchip_emmc_phy_power_on/off()

2016-06-20 Thread Douglas Anderson
There's no reason to store the return value of rockchip_emmc_phy_power() in a variable nor to check it. Just return it. Signed-off-by: Douglas Anderson Acked-by: Kishon Vijay Abraham I Reviewed-by: Shawn Lin Tested-by: Heiko Stuebner --- Changes in v3: - Add collected tags Changes

[PATCH v3 02/15] phy: rockchip-emmc: configure frequency range and drive impedance

2016-06-20 Thread Douglas Anderson
From: Shawn Lin Signal integrity analysis has suggested we set these values. Do this in power_on(), so that they get reconfigured after suspend/resume. Signed-off-by: Shawn Lin Signed-off-by: Brian Norris Signed-off-by: Douglas Anderson Acked-by: Kishon Vijay Abraham I Tested-by: Heiko

[PATCH v3 01/15] phy: rockchip-emmc: give DLL some extra time to be ready

2016-06-20 Thread Douglas Anderson
Norris Signed-off-by: Douglas Anderson Acked-by: Kishon Vijay Abraham I Tested-by: Heiko Stuebner --- Changes in v3: - Add Brian's PHY patches into my series Changes in v2: None drivers/phy/phy-rockchip-emmc.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/driver

[PATCH v3 10/15] Documentation: mmc: sdhci-of-arasan: Add ability to export card clock

2016-06-20 Thread Douglas Anderson
xport the SDHCI card clock using a standard device tree mechanism so that the PHY can get access to it and query the card clock frequency. Signed-off-by: Douglas Anderson Acked-by: Rob Herring Reviewed-by: Heiko Stuebner --- Changes in v3: - Add collected tags Changes in v2: - Adjust commit me

[PATCH v3 04/15] phy: rockchip-emmc: reindent the register definitions

2016-06-20 Thread Douglas Anderson
From: Brian Norris Some of the spacing was wrong (spaces instead of tabs), and due to longer entries added later, the columns weren't aligned. Let's get everything consistent. Signed-off-by: Brian Norris Signed-off-by: Douglas Anderson Acked-by: Kishon Vijay Abraham I Reviewed

[PATCH v3 07/15] Documentation: mmc: sdhci-of-arasan: Add soc-ctl-syscon for corecfg regs

2016-06-20 Thread Douglas Anderson
et the corecfg also include a reference to the syscon. [1]: https://arasan.com/wp-content/media/eMMC-5-1-Total-Solution_Rev-1-3.pdf Signed-off-by: Douglas Anderson Acked-by: Rob Herring Reviewed-by: Heiko Stuebner Reviewed-by: Shawn Lin --- Changes in v3: - Add collected tags Changes in v2: -

[PATCH v3 1/2] regulator: pwm: Add support for a fixed delay after duty cycle changes

2016-08-30 Thread Douglas Anderson
the device tree property "settle-time-up-us" which allows us to specify a fixed delay after a voltage increase. We don't add an option of a fixed delay on the way down for now because the way down is probably modelled best with a ramp rate, not a fixed delay. Signed-off-by: Matthias Ka

[PATCH v3 2/2] regulator: pwm: Prevent falling too fast

2016-08-30 Thread Douglas Anderson
e() call until we've finished delaying. A future patch atop this one might choose to return more immediately and let the voltages fall in the background. That would possibly to allow us to cancel a slow downward decay if there was a request to go back up. Signed-off-by: Douglas Anderson ---

[PATCH] arm64: dts: rockchip: Add pinctrl entry for 32k clock on rk3399

2016-09-01 Thread Douglas Anderson
On some rk3399 boards GPIO0_A0 is hooked up to a 32 kHz clock. This can be used as the source for various clocks in the system. Add a pinmux so boards can get this pin properly configured. Signed-off-by: Douglas Anderson --- arch/arm64/boot/dts/rockchip/rk3399.dtsi | 6 ++ 1 file changed

[PATCH] clk: rockchip: mark aclk_emmc_noc as a critical clock on rk3399

2016-08-24 Thread Douglas Anderson
t;clk: rockchip: fix incorrect aclk_emmc source gate bits on rk3399"). Before that change we were presumably not actually gating any of these clocks because we were setting the wrong gate. Signed-off-by: Xing Zheng Signed-off-by: Douglas Anderson --- drivers/clk/rockchip/clk-rk3399.c

[PATCH v4 2/2] kbuild: Cache a few more calls to the compiler

2017-10-16 Thread Douglas Anderson
These are a few stragglers that I left out of the original patch to cache calls to the C compiler ("kbuild: Add a cache for generated variables") because they bleed out into the main Makefile and thus uglify things a little bit. The idea is the same here, though. Signed-off-by: Dougla

[PATCH v4 0/2] kbuild: Cache exploratory calls to the compiler

2017-10-16 Thread Douglas Anderson
ore doc changes - Moved cache stuff below cc-cross-prefix - Removed duplicate documentation of try-run (oops) - Add Tested-by for Ingo and Guenter since v2 and v3 are very similar Changes in v2: - Abstract at a different level (like shell-cached) per Masahiro Yamada - Include ld-version, which I missed

[PATCH v4 1/2] kbuild: Add a cache for generated variables

2017-10-16 Thread Douglas Anderson
already in our cache. The cache is stored in a format that it shouldn't need any invalidation since anything that might change should affect the "key" and any old cached value won't be used. NOTE: This change requires commit fa9acf703d64 ("kbuild: add forward declaration of

[RFC PATCH] ASoC: Intel: sst: Delete sst_save_shim64(); saved regs are never used

2017-05-26 Thread Douglas Anderson
rs we were storing data in. Note that the saving code (and the comments talking about how important it is to do the save) has been around since commit 336cfbb05edf ("ASoC: Intel: mrfld- add ACPI module"). Signed-off-by: Douglas Anderson --- This problem was found only by code inspection and

[RFC PATCH v2] ASoC: Intel: sst: Delete sst_shim_regs64; saved regs are never used

2017-05-30 Thread Douglas Anderson
nefit of avoiding an error path in the init code. Note that the saving code that we're removing (and the comments talking about how important it is to do the save) has been around since commit 336cfbb05edf ("ASoC: Intel: mrfld- add ACPI module"). Signed-off-by: Douglas Anderson ---

[PATCH] usb: dwc2: host: Don't retry NAKed transactions right away

2017-10-25 Thread Douglas Anderson
igned-off-by: Douglas Anderson --- drivers/usb/dwc2/core.h | 1 + drivers/usb/dwc2/hcd.c | 7 drivers/usb/dwc2/hcd.h | 9 + drivers/usb/dwc2/hcd_intr.c | 12 +++ drivers/usb/dwc2/hcd_queue.c | 81 +--- 5 files changed

[PATCH v2] usb: dwc2: host: Don't retry NAKed transactions right away

2017-10-26 Thread Douglas Anderson
igned-off-by: Douglas Anderson Reviewed-by: Julius Werner --- Changes in v2: - Address http://crosreview.com/737520 feedback drivers/usb/dwc2/core.h | 1 + drivers/usb/dwc2/hcd.c | 7 drivers/usb/dwc2/hcd.h | 9 + drivers/usb/dwc2/hcd_intr.c | 20 +++ driver

[PATCH v3 2/2] usb: dwc2: host: Convert hcd_queue to timer_setup

2017-10-30 Thread Douglas Anderson
Convert the timers in hcd_queue to use the new timer_setup() call introduced in commit 686fef928bba ("timer: Prepare to change timer callback argument type"). Suggested-by: Stefan Wahren Signed-off-by: Douglas Anderson Cc: Kees Cook --- Changes in v3: - Convert hcd_queue to timer

[PATCH v3 1/2] usb: dwc2: host: Don't retry NAKed transactions right away

2017-10-30 Thread Douglas Anderson
igned-off-by: Douglas Anderson Cc: sta...@vger.kernel.org Reviewed-by: Julius Werner Tested-by: Stefan Wahren --- Changes in v3: - Add tested-by for Stefan Wahren - Sent to Felipe Balbi as candiate to land this. - Add Cc for stable (it's always been broken so go as far is as easy) Cha

[PATCH 3/5] CHROMIUM: usb: dwc2: Avoid double-reset at boot time

2015-10-07 Thread Douglas Anderson
mes we could avoid the reset, we remove "irq" and rename "select_phy" to "initial_setup" and adjust the callers accordingly. Signed-off-by: Douglas Anderson --- drivers/usb/dwc2/core.c | 29 ++--- drivers/usb/dwc2/core.h | 2 +- drivers/usb/dwc2

[PATCH 0/5] usb: dwc2: fix dwc2_get_hwparams() + optimize probe time a bit

2015-10-07 Thread Douglas Anderson
v4.3-rc1) with a few linuxnext dwc2 patches pulled in to avoid conflicts. These patches have either landed or are planned to land on the chromeos-3.14 branch for use in several Chromebooks that use rk3288. Douglas Anderson (3): usb: dwc2: Restore GUSBCFG in dwc2_get_hwparams() CHROMIUM: usb:

[PATCH 5/5] usb: dwc2: reduce dwc2 driver probe time

2015-10-07 Thread Douglas Anderson
patch in my RK3288-evb board. It works well. Signed-off-by: Yunzhi Li Signed-off-by: Douglas Anderson --- drivers/usb/dwc2/core.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/usb/dwc2/core.c b/drivers/usb/dwc2/core.c index 27ade0c..59fe48f 100644 --- a

[PATCH 1/5] usb: dwc2: Restore GUSBCFG in dwc2_get_hwparams()

2015-10-07 Thread Douglas Anderson
t way. Since we're now looking at GUSBCFG, it's obvious that we shouldn't need all the extra delays if FORCEHOSTMODE was already set. This will avoid some delays for any ports that have forced host mode. Signed-off-by: Douglas Anderson --- drivers/usb/dwc2/core.c | 16 +--

[PATCH 4/5] usb: dwc2: Speed dwc2_get_hwparams() on some host-only ports

2015-10-07 Thread Douglas Anderson
dwc2_core_reset() is always called before dwc2_get_hwparams() and we know dwc2_core_reset() should have set GUSBCFG_FORCEHOSTMODE whenever hsotg->dr_mode == USB_DR_MODE_HOST, we can just check hsotg->dr_mode to decide that we can skip the delays in dwc2_get_hwparams(). Signed-off-by: Douglas A

[PATCH 2/5] usb: dwc2: reset dwc2 core before dwc2_get_hwparams()

2015-10-07 Thread Douglas Anderson
registers. This patch could avoid warnning massage like in rk3288 platform: [2.074764] dwc2 ff58.usb: 256 invalid for host_perio_tx_fifo_size. Check HW configuration. Signed-off-by: Yunzhi Li Signed-off-by: Douglas Anderson --- drivers/usb/dwc2/core.c | 2 +- drivers/usb/dwc2/core.h

[PATCH] usb: dwc2: host: Fix use after free w/ simultaneous irqs

2015-10-14 Thread Douglas Anderson
Though we could add specific code to handle this case, adding the general purpose code to check for all cases where qtd might be freed seemed safer. Signed-off-by: Douglas Anderson --- drivers/usb/dwc2/hcd_intr.c | 80 +++-- 1 file changed, 70 insertio

[PATCH v2] usb: dwc2: host: Fix use after free w/ simultaneous irqs

2015-10-14 Thread Douglas Anderson
Though we could add specific code to handle this case, adding the general purpose code to check for all cases where qtd might be freed seemed safer. Signed-off-by: Douglas Anderson --- Changes in v2: - Add static as correctly pointed by kbuild test robot drivers/usb/dwc2/hcd_intr.c | 80

[PATCH] usb: dwc2: host: Protect PCGCTL with lock in dwc2_port_resume()

2015-10-14 Thread Douglas Anderson
>From code inspection, it appears to be unsafe to do a read-modify-write of PCGCTL in dwc2_port_resume(). Let's make sure the spinlock is held around this operation. Signed-off-by: Douglas Anderson --- drivers/usb/dwc2/hcd.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) di

[PATCH v3] usb: dwc2: host: Fix use after free w/ simultaneous irqs

2015-10-16 Thread Douglas Anderson
neral purpose code to check for all cases where qtd might be freed seemed safer. Signed-off-by: Douglas Anderson --- Changes in v3: - Don't pass NULL if qtd freed, just return (John Youn) - Don't keep track of interrupts left: list_first_entry() is fast. Changes in v2: - Add static

[PATCH 2/2] usb: dwc2: host: Clear interrupts before handling them

2015-10-16 Thread Douglas Anderson
ct 5. dwc2_handle_common_intr() - calls dwc2_hcd_disconnect() ...but with different timing then sometimes we'd still miss cable insertions. In any case, though this patch doesn't fix any (known) problems, it still seems wise as a general policy to clear interrupt before handling them. Signed-

[PATCH 1/2] usb: dwc2: host: Fix missing device insertions

2015-10-16 Thread Douglas Anderson
connect interrupt and re-connecting after the disconnect is posted. We don't skip the disconnect because if there is a transitory disconnect we really want to de-enumerate and re-enumerate. Signed-off-by: Douglas Anderson --- drivers/usb/dwc2/core.h | 2 ++ dr

[PATCH v4] usb: dwc2: host: Fix use after free w/ simultaneous irqs

2015-10-16 Thread Douglas Anderson
neral purpose code to check for all cases where qtd might be freed seemed safer. Signed-off-by: Douglas Anderson --- Changes in v4: - Fix NULL qh case Changes in v3: - Don't pass NULL if qtd freed, just return (John Youn) - Don't keep track of interrupts left: list_first_entry() is

[PATCH] usb: dwc2: host: Fix ahbcfg for rk3066

2015-10-20 Thread Douglas Anderson
peed for i in $(seq 10); do dd if=/dev/zero of=/dev/sdb bs=1M count=750 done With the above tests I found that speeds went from ~15MB/s to ~18MB/s. Note that most other tests I did (including reading from the same USB reader) didn't show any difference in performance. Signe

[REPOST PATCH v2] drivers/pinctrl: Add the concept of an "init" state

2015-10-20 Thread Douglas Anderson
nly present (and only transitioned in to and out of) when (optional) power management is enabled. Signed-off-by: Doug Anderson Signed-off-by: Douglas Anderson Acked-by: Greg Kroah-Hartman Tested-by: Caesar Wang --- Changes in v2: - Added comment to pinctrl_init_done() as per Linus W. Rep

[PATCH v3] drivers/pinctrl: Add the concept of an "init" state

2015-10-20 Thread Douglas Anderson
ansitioned in to and out of) when (optional) power management is enabled. Signed-off-by: Douglas Anderson Acked-by: Greg Kroah-Hartman Tested-by: Caesar Wang --- Changes in v3: - Moved declarations to pinctrl/devinfo.h - Fixed author/SoB Changes in v2: - Added comment to pinctrl_init_done() a

[PATCH] usb: dwc2: host: Fix remote wakeup when not in DWC2_L2

2015-10-22 Thread Douglas Anderson
ly never sets this), so we'll update the former "else" case based on this test. Fixes: 734643dfbdde ("usb: dwc2: host: add flag to reflect bus state") Signed-off-by: Douglas Anderson --- drivers/usb/dwc2/hcd.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) d

[PATCH] ARM: dts: Add ddc i2c reference to veyron

2015-09-02 Thread Douglas Anderson
The ddc-i2c-bus property was missing from the veyron dtsi file since downstream the ddc-i2c-bus was still being specified in rk3288.dtsi and nobody noticed when the veyron dtsi was sent upstream. Add it. Signed-off-by: Douglas Anderson --- Note: I noticed that this was wrong but I don&#

[PATCH] ARM: dts: Add the hdmi-ddc pinctrl settings for rk3288

2015-09-02 Thread Douglas Anderson
if it's known to work. Once driver support in dw_hdmi lands, boards would use this by selecting this pinctrl for the HDMI block and then _not_ specifying a ddc-i2c-bus and _not_ setting the status to "okay" for i2c5 (which uses the same pins). Signed-off-by: Douglas Anderson ---

[PATCH 4/4] ARM: dts: rockchip: Point rk3288 dwc2 usb at phy port reset

2015-10-23 Thread Douglas Anderson
unrelated to the current hardware errata. Only the host port gets the quirk property, though. Signed-off-by: Douglas Anderson --- arch/arm/boot/dts/rk3288.dtsi | 5 + 1 file changed, 5 insertions(+) diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi index 4f76805..03de4

[PATCH 3/4] ARM: dts: rockchip: Enable the USB phys as reset providers on rk3288

2015-10-23 Thread Douglas Anderson
As per the change to the rk3288 USB phy driver, we can now enable the PHYs as reset providers. Do so. Signed-off-by: Douglas Anderson --- arch/arm/boot/dts/rk3288.dtsi | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi index

[PATCH 0/4] Patches to fix remote wakeup on rk3288 dwc2 "host" port

2015-10-23 Thread Douglas Anderson
#x27;s usb-next merged in. These patches currently conflict with patches that I posted previously to enable USB wakeup from S3, specifically: * https://patchwork.kernel.org/patch/6727081/ * https://patchwork.kernel.org/patch/6727121/ ...those patches no longer apply anyway, so presumably they need t

[PATCH 1/4] phy: rockchip-usb: Support the PHY's "port reset"

2015-10-23 Thread Douglas Anderson
s reset. This reset seems to have the ability to unwedge the dwc2 "host" port when a remote wakeup happens. It may have other redeeming qualities as well. Signed-off-by: Douglas Anderson --- .../devicetree/bindings/phy/rockchip-usb-phy.txt | 6 ++ drivers/phy/phy-rockchip-usb.c

[PATCH 2/4] usb: dwc2: optionally assert phy "port reset" when waking up

2015-10-23 Thread Douglas Anderson
ot;") for some details on the reset that we plan to use. Signed-off-by: Douglas Anderson Signed-off-by: Yunzhi Li --- Documentation/devicetree/bindings/usb/dwc2.txt | 7 +++ drivers/usb/dwc2/core.h| 5 + drivers/usb/dwc2/core_intr.c | 7

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

2018-08-06 Thread Douglas Anderson
n this case reg-names wasn't needed but the driver 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 --- .../device

[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 ++-

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

2018-08-30 Thread Douglas Anderson
t values so I kept doing 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-o

[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/pin

[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(+)

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

2018-08-10 Thread Douglas Anderson
in v2: - Use "0x784000" 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

[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 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 2/3] arm64: dts: qcom: sdm845-mtp: Add RPMh VRM/XOB regulators

2018-08-10 Thread Douglas Anderson
ct. NOTE: 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/

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

2018-08-14 Thread Douglas Anderson
more 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 regulat

[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/dr

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

2018-08-14 Thread Douglas Anderson
a consumer hasn'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/regul

[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

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

2018-08-14 Thread Douglas Anderson
tness 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/dr

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

2018-08-22 Thread Douglas Anderson
ort 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 arm64: dts: qcom: sdm845-mtp: Add nodes for USB Manu Gautam (1): arm64: dts: qcom: sdm845: A

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

2018-08-22 Thread Douglas Anderson
t need to churn 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 H

[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 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:

[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
0, 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) clocks for sdm845 drivers/clk/qcom/gcc-sdm8

[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 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 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
ent_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 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 qsp

[PATCH v3 1/2] kbuild: Require a 'make clean' if we detect gcc changed underneath us

2018-03-12 Thread Douglas Anderson
98b690b21c ("kbuild: Add a cache for generated variables") Reported-by: Yang Shi Reported-by: Dave Hansen Reported-by: Mathieu Malaterre Signed-off-by: Douglas Anderson --- Changes in v3: - Fix as per Masahiro Yamada (move change to main Makefile) Changes in v2: - Don't erro

[PATCH v3 0/2] kbuild: Fix corner caches with .cache.mk

2018-03-12 Thread Douglas Anderson
ain Makefile instead of Kbuild.include Changes in v2: - Don't error if MAKECMDGOALS is blank. Douglas Anderson (2): kbuild: Require a 'make clean' if we detect gcc changed underneath us kbuild: Don't mess with the .cache.mk when root Makefile | 15 ++

[PATCH v3 2/2] kbuild: Don't mess with the .cache.mk when root

2018-03-12 Thread Douglas Anderson
e'll consider this heuristic good enough because the problem really shouldn't be that serious. Fixes: 3298b690b21c ("kbuild: Add a cache for generated variables") Suggested-by: Masahiro Yamada Signed-off-by: Douglas Anderson --- Changes in v3: - Use "uid 0" as th

[PATCH v2] arm64/debug: Fix registers on sleeping tasks

2018-03-05 Thread Douglas Anderson
be reporting kernel registers. Signed-off-by: Douglas Anderson --- Changes in v2: - Init cpu_context in one line - Explain that task_pt_regs are userspace arch/arm64/kernel/kgdb.c | 21 - 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/arch/arm64/kernel/kgdb.c

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

2018-03-23 Thread Douglas Anderson
We could also just make 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 --- include/linux/serial_core.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/i

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

2018-09-27 Thread Douglas Anderson
ioning again after another suspend/resume cycle (especially if the resume failure 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

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

2018-11-26 Thread Douglas Anderson
mers") 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/

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

2018-11-27 Thread Douglas Anderson
com Fixes: 84b66b211603 ("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/dev

[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/d

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

2018-11-19 Thread Douglas Anderson
w places in 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..0052bbc8

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

2018-11-19 Thread Douglas Anderson
ely resolving regulators. 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/regul

[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

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

2018-11-19 Thread Douglas Anderson
e counts for always-on regulators because they were, well, always on. While we could keep the 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: Dougla

[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 --- drive

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

2018-11-19 Thread Douglas Anderson
: core: 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.

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

2018-11-20 Thread Douglas Anderson
e counts for always-on regulators because they were, well, always on. While we could keep the 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: Dougla

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

2018-11-20 Thread Douglas Anderson
we'll fix it together 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

[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 1/2] dt-bindings: clock: qcom: Fix the xo parent in gpucc example

2018-11-28 Thread Douglas Anderson
tcxo" 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 ---

[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] regulator: core: Clean enabling always-on regulators + their supplies

2018-12-06 Thread Douglas Anderson
enabled and we'd never try them again. 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

[PATCH] debug: Allow forcing entering debug mode on panic/exception

2018-12-09 Thread Douglas Anderson
"fragments" to my debug kernels. Hopefully having this extra config option is OK and useful to others who would also prefer to make sure that kgdb is always entered on a panic no matter what userspace might request. Signed-off-by: Douglas Anderson --- kernel/debug/debug_core.c |

[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 +

  1   2   3   4   5   6   7   8   9   10   >