[PATCH v7 03/14] phy: tegra: xusb: Move usb3 port init for Tegra210

2021-01-19 Thread JC Kuo
tegra210_usb3_phy_power_on() if the lane is assigned for XUSB super-speed. Signed-off-by: JC Kuo Acked-by: Thierry Reding --- v7: no change v6: no change v5: no change v4: mutex_lock()/mutex_unlock() fix update copyright string v3: new, was a part of "phy: tegra: xusb: Rear

[PATCH v7 05/14] phy: tegra: xusb: Add Tegra210 lane_iddq operation

2021-01-19 Thread JC Kuo
As per Tegra210 TRM, before changing lane assignments, driver should keep lanes in IDDQ and sleep state; after changing lane assignments, driver should bring lanes out of IDDQ. This commit implements the required operations. Signed-off-by: JC Kuo Acked-by: Thierry Reding --- v7: no change v6

[PATCH v7 06/14] phy: tegra: xusb: Add sleepwalk and suspend/resume

2021-01-19 Thread JC Kuo
and restore XUSB PADCTL context during system suspend and resume. - tegra_xusb_padctl_suspend_noirq() - tegra_xusb_padctl_resume_noirq() Signed-off-by: JC Kuo Acked-by: Thierry Reding --- v7: add 'Acked-by: Thierry Reding ' v6: no change v5: no change v4: move sleepwalk/wake stubs

[PATCH v7 07/14] soc/tegra: pmc: Provide USB sleepwalk register map

2021-01-19 Thread JC Kuo
This commit implements a register map which grants USB (UTMI and HSIC) sleepwalk registers access to USB PHY drivers. The USB sleepwalk logic is in PMC hardware block but USB PHY drivers have the best knowledge of proper programming sequence. Signed-off-by: JC Kuo Acked-by: Thierry Reding

[PATCH v7 11/14] phy: tegra: xusb: Tegra210 host mode VBUS control

2021-01-19 Thread JC Kuo
host driver invokes .phy_exit() which indicates disabling a USB port. Signed-off-by: JC Kuo Acked-by: Thierry Reding --- v7: no change v6: no change v5: no change v4: no change v3: new, was a part of "phy: tegra: xusb: Add wake/sleepwalk for Tegra210" drivers/phy/

[PATCH v7 12/14] phy: tegra: xusb: Add wake/sleepwalk for Tegra186

2021-01-19 Thread JC Kuo
This commit implements Tegra186/Tegra194 XUSB PADCTL/AO wake and sleepwalk operations. Signed-off-by: JC Kuo Acked-by: Thierry Reding --- v7: add 'Acked-by: Thierry Reding ' v6: no change v5: no change v4: move sleepwalk/wake stubs from 'struct tegra_xusb_padctl_ops' to 'struct

[PATCH v7 13/14] usb: host: xhci-tegra: Unlink power domain devices

2021-01-19 Thread JC Kuo
, it invokes pm_runtime_put_sync() to request power driver to power down partitions; If power domain devices are not available, tegra_powergate_power_off() will be used to power down partitions. Signed-off-by: JC Kuo Acked-by: Thierry Reding --- v7: add 'Acked-by: Thierry

[PATCH v7 01/14] clk: tegra: Add PLLE HW power sequencer control

2021-01-19 Thread JC Kuo
whether PLLE hardware sequencer has been enabled or not. Signed-off-by: JC Kuo Acked-by: Thierry Reding --- v7: no change v6: no change v5: no change v4: update copyright strings v3: rename 'val' with 'value drivers/clk/tegra/clk-tegra210.c | 53

[PATCH v7 14/14] xhci: tegra: Enable ELPG for runtime/system PM

2021-01-19 Thread JC Kuo
event. At runtime resume, xhci-tegra driver brings XUSB host controller out of ELPG to handle the wake events. The same ELPG enter/exit procedure will be performed for system suspend/resume path so USB devices can remain connected across SC7. Signed-off-by: JC Kuo Acked-by: Thierry Reding --- v7

[PATCH v7 10/14] phy: tegra: xusb: Add wake/sleepwalk for Tegra210

2021-01-19 Thread JC Kuo
This commit implements Tegra210 XUSB PADCTL wake and sleepwalk routines. Sleepwalk logic is in PMC (always-on) hardware block. PMC driver provides managed access to the sleepwalk registers via regmap framework. Signed-off-by: JC Kuo Acked-by: Thierry Reding --- v7: add 'Acked-by: Thierry

[PATCH v7 09/14] dt-bindings: phy: tegra-xusb: Add nvidia,pmc prop

2021-01-19 Thread JC Kuo
This commit describes the "nvidia,pmc" property for Tegra210 tegra-xusb PHY driver. It is a phandle and specifier referring to the Tegra210 pmc@7000e400 node. Signed-off-by: JC Kuo Acked-by: Rob Herring --- v7: no change v6: no change v5: replace "pmc@7000e400 node&quo

[PATCH v7 08/14] arm64: tegra210: XUSB PADCTL add "nvidia,pmc" prop

2021-01-19 Thread JC Kuo
PMC driver provides USB sleepwalk registers access to XUSB PADCTL driver. This commit adds a "nvidia,pmc" property which points to PMC node to XUSB PADCTL device node. Signed-off-by: JC Kuo --- v7: no change v6: no change v5: no change v4: no change v3: no change arch/

[PATCH v7 04/14] phy: tegra: xusb: Rearrange UPHY init on Tegra210

2021-01-19 Thread JC Kuo
ng lanes out of IDDQ, and then AUX_MUX_LP0_* bits will be cleared by tegra210_aux_mux_lp0_clamp_disable(). 3. Once UPHY PLL hardware power sequencer is enabled, do not assert reset to PEX/SATA PLLs, otherwise UPHY PLL operation will be broken. Signed-off-by: JC Kuo Acked-by: Thierry Re

[PATCH v7 00/14] Tegra XHCI controller ELPG support

2021-01-19 Thread JC Kuo
. JC Kuo (14): clk: tegra: Add PLLE HW power sequencer control clk: tegra: Don't enable PLLE HW sequencer at init phy: tegra: xusb: Move usb3 port init for Tegra210 phy: tegra: xusb: Rearrange UPHY init on Tegra210 phy: tegra: xusb: Add Tegra210 lane_iddq operation phy: tegra: xusb: Add

[PATCH v7 02/14] clk: tegra: Don't enable PLLE HW sequencer at init

2021-01-19 Thread JC Kuo
PLLE hardware power sequencer references PEX/SATA UPHY PLL hardware power sequencers' output to enable/disable PLLE. PLLE hardware power sequencer has to be enabled only after PEX/SATA UPHY PLL's sequencers are enabled. Signed-off-by: JC Kuo Acked-by: Thierry Reding --- v7: no change v6

Re: [PATCH v6 04/15] phy: tegra: xusb: tegra210: Do not reset UPHY PLL

2021-01-19 Thread JC Kuo
On 1/19/21 9:52 PM, Thierry Reding wrote: > On Tue, Jan 19, 2021 at 04:55:35PM +0800, JC Kuo wrote: >> Once UPHY PLL hardware power sequencer is enabled, do not assert >> reset to PEX/SATA PLLs, otherwise UPHY PLL operation will be broken. >> This commit removes reset_con

[PATCH v6 11/15] phy: tegra: xusb: Add wake/sleepwalk for Tegra210

2021-01-19 Thread JC Kuo
This commit implements Tegra210 XUSB PADCTL wake and sleepwalk routines. Sleepwalk logic is in PMC (always-on) hardware block. PMC driver provides managed access to the sleepwalk registers via regmap framework. Signed-off-by: JC Kuo --- v6: no change v5: no change v4: move sleepwalk

[PATCH v6 08/15] soc/tegra: pmc: Provide USB sleepwalk register map

2021-01-19 Thread JC Kuo
This commit implements a register map which grants USB (UTMI and HSIC) sleepwalk registers access to USB PHY drivers. The USB sleepwalk logic is in PMC hardware block but USB PHY drivers have the best knowledge of proper programming sequence. Signed-off-by: JC Kuo Acked-by: Thierry Reding

[PATCH v6 09/15] arm64: tegra210: XUSB PADCTL add "nvidia,pmc" prop

2021-01-19 Thread JC Kuo
PMC driver provides USB sleepwalk registers access to XUSB PADCTL driver. This commit adds a "nvidia,pmc" property which points to PMC node to XUSB PADCTL device node. Signed-off-by: JC Kuo --- v6: no change v5: no change v4: no change v3: no change arch/arm64/boot/

[PATCH v6 10/15] dt-bindings: phy: tegra-xusb: Add nvidia,pmc prop

2021-01-19 Thread JC Kuo
This commit describes the "nvidia,pmc" property for Tegra210 tegra-xusb PHY driver. It is a phandle and specifier referring to the Tegra210 pmc@7000e400 node. Signed-off-by: JC Kuo Acked-by: Rob Herring --- v6: no change v5: replace "pmc@7000e400 node" -> with "

[PATCH v6 03/15] phy: tegra: xusb: Move usb3 port init for Tegra210

2021-01-19 Thread JC Kuo
tegra210_usb3_phy_power_on() if the lane is assigned for XUSB super-speed. Signed-off-by: JC Kuo Acked-by: Thierry Reding --- v6: no change v5: no change v4: mutex_lock()/mutex_unlock() fix update copyright string v3: new, was a part of "phy: tegra: xusb: Rearrange UPHY

[PATCH v6 05/15] phy: tegra: xusb: Rearrange UPHY init on Tegra210

2021-01-19 Thread JC Kuo
ng lanes out of IDDQ, and then AUX_MUX_LP0_* bits will be cleared by tegra210_aux_mux_lp0_clamp_disable(). Signed-off-by: JC Kuo Acked-by: Thierry Reding --- v6: no change v5: no change v4: no change v3: make separate changes use "unsigned int" instead "int"

[PATCH v6 01/15] clk: tegra: Add PLLE HW power sequencer control

2021-01-19 Thread JC Kuo
whether PLLE hardware sequencer has been enabled or not. Signed-off-by: JC Kuo Acked-by: Thierry Reding --- v6: no change v5: no change v4: update copyright strings v3: rename 'val' with 'value drivers/clk/tegra/clk-tegra210.c | 53 +++- include/linux/clk/tegra.h

[PATCH v6 02/15] clk: tegra: Don't enable PLLE HW sequencer at init

2021-01-19 Thread JC Kuo
PLLE hardware power sequencer references PEX/SATA UPHY PLL hardware power sequencers' output to enable/disable PLLE. PLLE hardware power sequencer has to be enabled only after PEX/SATA UPHY PLL's sequencers are enabled. Signed-off-by: JC Kuo Acked-by: Thierry Reding --- v6: no change v5

[PATCH v6 06/15] phy: tegra: xusb: Add Tegra210 lane_iddq operation

2021-01-19 Thread JC Kuo
As per Tegra210 TRM, before changing lane assignments, driver should keep lanes in IDDQ and sleep state; after changing lane assignments, driver should bring lanes out of IDDQ. This commit implements the required operations. Signed-off-by: JC Kuo Acked-by: Thierry Reding --- v6: no change v5

[PATCH v6 07/15] phy: tegra: xusb: Add sleepwalk and suspend/resume

2021-01-19 Thread JC Kuo
and restore XUSB PADCTL context during system suspend and resume. - tegra_xusb_padctl_suspend_noirq() - tegra_xusb_padctl_resume_noirq() Signed-off-by: JC Kuo --- v6: no change v5: no change v4: move sleepwalk/wake stubs from 'struct tegra_xusb_padctl_ops' to 'struct

[PATCH v6 13/15] phy: tegra: xusb: Add wake/sleepwalk for Tegra186

2021-01-19 Thread JC Kuo
This commit implements Tegra186/Tegra194 XUSB PADCTL/AO wake and sleepwalk operations. Signed-off-by: JC Kuo --- v6: no change v5: no change v4: move sleepwalk/wake stubs from 'struct tegra_xusb_padctl_ops' to 'struct tegra_xusb_lane_ops' v3: move 'ao_regs' to the top of 'struct

[PATCH v6 14/15] usb: host: xhci-tegra: Unlink power domain devices

2021-01-19 Thread JC Kuo
, it invokes pm_runtime_put_sync() to request power driver to power down partitions; If power domain devices are not available, tegra_powergate_power_off() will be used to power down partitions. Signed-off-by: JC Kuo --- v6: no change v5: no change v4: commit message improveme

[PATCH v6 15/15] xhci: tegra: Enable ELPG for runtime/system PM

2021-01-19 Thread JC Kuo
event. At runtime resume, xhci-tegra driver brings XUSB host controller out of ELPG to handle the wake events. The same ELPG enter/exit procedure will be performed for system suspend/resume path so USB devices can remain connected across SC7. Signed-off-by: JC Kuo --- v6: fix compiling warning

[PATCH v6 00/15] Tegra XHCI controller ELPG support

2021-01-19 Thread JC Kuo
. JC Kuo (15): clk: tegra: Add PLLE HW power sequencer control clk: tegra: Don't enable PLLE HW sequencer at init phy: tegra: xusb: Move usb3 port init for Tegra210 phy: tegra: xusb: tegra210: Do not reset UPHY PLL phy: tegra: xusb: Rearrange UPHY init on Tegra210 phy: tegra: xusb: Add

[PATCH v6 12/15] phy: tegra: xusb: Tegra210 host mode VBUS control

2021-01-19 Thread JC Kuo
host driver invokes .phy_exit() which indicates disabling a USB port. Signed-off-by: JC Kuo Acked-by: Thierry Reding --- v6: no change v5: no change v4: no change v3: new, was a part of "phy: tegra: xusb: Add wake/sleepwalk for Tegra210" drivers/phy/tegra/xusb-tegra

[PATCH v6 04/15] phy: tegra: xusb: tegra210: Do not reset UPHY PLL

2021-01-19 Thread JC Kuo
Once UPHY PLL hardware power sequencer is enabled, do not assert reset to PEX/SATA PLLs, otherwise UPHY PLL operation will be broken. This commit removes reset_control_assert(pcie->rst) and reset_control_assert(sata->rst) from PEX/SATA UPHY disable procedure. Signed-off-by: JC Kuo

[PATCH] arm64: tegra: Enable Jetson-Xavier J512 USB host

2021-01-18 Thread JC Kuo
This commit enables USB host mode at J512 type-C port of Jetson-Xavier. Signed-off-by: JC Kuo --- .../arm64/boot/dts/nvidia/tegra194-p2888.dtsi | 8 +++ .../boot/dts/nvidia/tegra194-p2972-.dts | 24 +-- 2 files changed, 30 insertions(+), 2 deletions(-) diff --git

[PATCH v5 03/16] phy: tegra: xusb: Move usb3 port init for Tegra210

2020-11-19 Thread JC Kuo
tegra210_usb3_phy_power_on() if the lane is assigned for XUSB super-speed. Signed-off-by: JC Kuo Acked-by: Thierry Reding --- v5: no change v4: mutex_lock()/mutex_unlock() fix update copyright string v3: new, was a part of "phy: tegra: xusb: Rearrange UPHY init on Tegra210" d

[PATCH v5 16/16] xhci: tegra: Enable ELPG for runtime/system PM

2020-11-19 Thread JC Kuo
event. At runtime resume, xhci-tegra driver brings XUSB host controller out of ELPG to handle the wake events. The same ELPG enter/exit procedure will be performed for system suspend/resume path so USB devices can remain connected across SC7. Signed-off-by: JC Kuo --- v5: avoid using

[PATCH v5 14/16] arm64: tegra210/tegra186/tegra194: XUSB PADCTL irq

2020-11-19 Thread JC Kuo
This commit adds "interrupts" property to Tegra210/Tegra186/Tegra194 XUSB PADCTL node. XUSB PADCTL interrupt will be raised when USB wake event happens. This is required for supporting XUSB host controller ELPG. Signed-off-by: JC Kuo --- v5: no change v4: no change v3: no cha

[PATCH v5 13/16] phy: tegra: xusb: Add wake/sleepwalk for Tegra186

2020-11-19 Thread JC Kuo
This commit implements Tegra186/Tegra194 XUSB PADCTL/AO wake and sleepwalk operations. Signed-off-by: JC Kuo --- v5: no change v4: move sleepwalk/wake stubs from 'struct tegra_xusb_padctl_ops' to 'struct tegra_xusb_lane_ops' v3: move 'ao_regs' to the top of 'struct

[PATCH v5 15/16] usb: host: xhci-tegra: Unlink power domain devices

2020-11-19 Thread JC Kuo
, it invokes pm_runtime_put_sync() to request power driver to power down partitions; If power domain devices are not available, tegra_powergate_power_off() will be used to power down partitions. Signed-off-by: JC Kuo --- v5: no change v4: commit message improvement update copy

[PATCH v5 12/16] phy: tegra: xusb: Tegra210 host mode VBUS control

2020-11-19 Thread JC Kuo
host driver invokes .phy_exit() which indicates disabling a USB port. Signed-off-by: JC Kuo Acked-by: Thierry Reding --- v5: no change v4: no change v3: new, was a part of "phy: tegra: xusb: Add wake/sleepwalk for Tegra210" drivers/phy/tegra/xusb-tegra

[PATCH v5 11/16] phy: tegra: xusb: Add wake/sleepwalk for Tegra210

2020-11-19 Thread JC Kuo
This commit implements Tegra210 XUSB PADCTL wake and sleepwalk routines. Sleepwalk logic is in PMC (always-on) hardware block. PMC driver provides managed access to the sleepwalk registers via regmap framework. Signed-off-by: JC Kuo --- v5: no change v4: move sleepwalk/wake stubs from

[PATCH v5 10/16] dt-bindings: phy: tegra-xusb: Add nvidia,pmc prop

2020-11-19 Thread JC Kuo
This commit describes the "nvidia,pmc" property for Tegra210 tegra-xusb PHY driver. It is a phandle and specifier referring to the Tegra210 pmc@7000e400 node. Signed-off-by: JC Kuo --- v5: replace "pmc@7000e400 node" -> with "PMC node" v4: new cha

[PATCH v5 09/16] arm64: tegra210: XUSB PADCTL add "nvidia,pmc" prop

2020-11-19 Thread JC Kuo
PMC driver provides USB sleepwalk registers access to XUSB PADCTL driver. This commit adds a "nvidia,pmc" property which points to PMC node to XUSB PADCTL device node. Signed-off-by: JC Kuo --- v5: no change v4: no change v3: no change arch/arm64/boot/dts/nvidia/tegra210.dts

[PATCH v5 08/16] soc/tegra: pmc: Provide USB sleepwalk register map

2020-11-19 Thread JC Kuo
This commit implements a register map which grants USB (UTMI and HSIC) sleepwalk registers access to USB PHY drivers. The USB sleepwalk logic is in PMC hardware block but USB PHY drivers have the best knowledge of proper programming sequence. Signed-off-by: JC Kuo Acked-by: Thierry Reding

[PATCH v5 07/16] phy: tegra: xusb: Add sleepwalk and suspend/resume

2020-11-19 Thread JC Kuo
and restore XUSB PADCTL context during system suspend and resume. - tegra_xusb_padctl_suspend_noirq() - tegra_xusb_padctl_resume_noirq() Signed-off-by: JC Kuo --- v5: no change v4: move sleepwalk/wake stubs from 'struct tegra_xusb_padctl_ops' to 'struct tegra_xusb_lane_ops' v3: commit

[PATCH v5 05/16] phy: tegra: xusb: Rearrange UPHY init on Tegra210

2020-11-19 Thread JC Kuo
ng lanes out of IDDQ, and then AUX_MUX_LP0_* bits will be cleared by tegra210_aux_mux_lp0_clamp_disable(). Signed-off-by: JC Kuo Acked-by: Thierry Reding --- v5: no change v4: no change v3: make separate changes use "unsigned int" instead "int" type for PHY in

[PATCH v5 06/16] phy: tegra: xusb: Add Tegra210 lane_iddq operation

2020-11-19 Thread JC Kuo
As per Tegra210 TRM, before changing lane assignments, driver should keep lanes in IDDQ and sleep state; after changing lane assignments, driver should bring lanes out of IDDQ. This commit implements the required operations. Signed-off-by: JC Kuo Acked-by: Thierry Reding --- v5: no change v4

[PATCH v5 04/16] phy: tegra: xusb: tegra210: Do not reset UPHY PLL

2020-11-19 Thread JC Kuo
Once UPHY PLL hardware power sequencer is enabled, do not assert reset to PEX/SATA PLLs, otherwise UPHY PLL operation will be broken. This commit removes reset_control_assert(pcie->rst) and reset_control_assert(sata->rst) from PEX/SATA UPHY disable procedure. Signed-off-by: JC Kuo

[PATCH v5 02/16] clk: tegra: Don't enable PLLE HW sequencer at init

2020-11-19 Thread JC Kuo
PLLE hardware power sequencer references PEX/SATA UPHY PLL hardware power sequencers' output to enable/disable PLLE. PLLE hardware power sequencer has to be enabled only after PEX/SATA UPHY PLL's sequencers are enabled. Signed-off-by: JC Kuo Acked-by: Thierry Reding --- v5: no change v4

[PATCH v5 01/16] clk: tegra: Add PLLE HW power sequencer control

2020-11-19 Thread JC Kuo
whether PLLE hardware sequencer has been enabled or not. Signed-off-by: JC Kuo Acked-by: Thierry Reding --- v5: no change v4: update copyright strings v3: rename 'val' with 'value drivers/clk/tegra/clk-tegra210.c | 53 +++- include/linux/clk/tegra.h| 4 ++- 2

[PATCH v5 00/16] Tegra XHCI controller ELPG support

2020-11-19 Thread JC Kuo
. JC Kuo (16): clk: tegra: Add PLLE HW power sequencer control clk: tegra: Don't enable PLLE HW sequencer at init phy: tegra: xusb: Move usb3 port init for Tegra210 phy: tegra: xusb: tegra210: Do not reset UPHY PLL phy: tegra: xusb: Rearrange UPHY init on Tegra210 phy: tegra: xusb: Add

[PATCH v3] arm64: tegra: jetson-tx1: Fix USB_VBUS_EN0 regulator

2020-11-18 Thread JC Kuo
;) Cc: sta...@vger.kernel.org Signed-off-by: JC Kuo Reviewed-by: Jon Hunter --- v3: add 'Cc: sta...@vger.kernel.org' tag v2: add 'Fixes:' tag add Reviewed-by: Jon Hunter .../arm64/boot/dts/nvidia/tegra210-p2597.dtsi | 20 +-- 1 file changed, 10 insertions(+), 10 deletions(-)

Re: [PATCH v4 10/16] dt-bindings: phy: tegra-xusb: Add nvidia,pmc prop

2020-11-18 Thread JC Kuo
On 11/14/20 12:20 AM, Thierry Reding wrote: > On Mon, Oct 19, 2020 at 04:40:46PM -0500, Rob Herring wrote: >> On Fri, Oct 16, 2020 at 09:07:20PM +0800, JC Kuo wrote: >>> This commit describes the "nvidia,pmc" property for Tegra210 tegra-xusb >>> PHY driver. It

[PATCH v2] arm64: tegra: jetson-tx1: Fix USB_VBUS_EN0 regulator

2020-11-18 Thread JC Kuo
USB_VBUS_EN0 regulator (regulator@11) is being overwritten by vdd-cam-1v2 regulator. This commit rearrange USB_VBUS_EN0 to be regulator@14. Fixes: 257c8047be44 ("arm64: tegra: jetson-tx1: Add camera supplies") Signed-off-by: JC Kuo Reviewed-by: Jon Hunter --- v2: add 'Fixes:' t

Re: [PATCH v1] arm64: tegra: jetson-tx1: Fix USB_VBUS_EN0 regulator

2020-11-18 Thread JC Kuo
On 11/18/20 7:24 PM, Jon Hunter wrote: > > On 18/11/2020 03:46, JC Kuo wrote: >> USB_VBUS_EN0 regulator (regulator@11) is being overwritten by vdd-cam-1v2 >> regulator. This commit rearrange USB_VBUS_EN0 to be regulator@14. >> >> Signed-off-by: JC Kuo >&g

[PATCH v1] arm64: tegra: jetson-tx1: Fix USB_VBUS_EN0 regulator

2020-11-17 Thread JC Kuo
USB_VBUS_EN0 regulator (regulator@11) is being overwritten by vdd-cam-1v2 regulator. This commit rearrange USB_VBUS_EN0 to be regulator@14. Signed-off-by: JC Kuo --- .../arm64/boot/dts/nvidia/tegra210-p2597.dtsi | 20 +-- 1 file changed, 10 insertions(+), 10 deletions(-) diff

[PATCH v1] phy: tegra: xusb: Fix usb_phy device driver field

2020-11-17 Thread JC Kuo
74/0x180 [ 153.757663] Code: aa0303e2 94000f64 f9405680 b4e0 (f9402803) [ 153.763826] ---[ end trace 81543a3394cb409d ]--- Fixes: e8f7d2f409a1 ("phy: tegra: xusb: Add usb-phy support") Signed-off-by: JC Kuo --- drivers/phy/tegra/xusb.c | 2 +- 1 file changed, 1 insertion(+), 1 delet

Re: [PATCH v4 00/16] Tegra XHCI controller ELPG support

2020-11-16 Thread JC Kuo
On 11/14/20 12:44 AM, Thierry Reding wrote: > On Fri, Oct 16, 2020 at 09:07:10PM +0800, JC Kuo wrote: >> Tegra XHCI controler can be placed in ELPG (Engine Level PowerGated) >> state for power saving when all of the connected USB devices are in >> suspended state. This patc

Re: [PATCH] phy: tegra: Don't warn on probe deferral

2020-11-13 Thread JC Kuo
to get regulators: %d\n", err); > + dev_err_probe(>dev, err, "failed to get regulators\n"); > goto remove; > } > > Acked-by: JC Kuo

Re: [PATCH v4 10/16] dt-bindings: phy: tegra-xusb: Add nvidia,pmc prop

2020-10-28 Thread JC Kuo
On 10/20/20 5:40 AM, Rob Herring wrote: > On Fri, Oct 16, 2020 at 09:07:20PM +0800, JC Kuo wrote: >> This commit describes the "nvidia,pmc" property for Tegra210 tegra-xusb >> PHY driver. It is a phandle and specifier referring to the Tegra210 >> pmc@7000e400 no

[PATCH v4 12/16] phy: tegra: xusb: Tegra210 host mode VBUS control

2020-10-16 Thread JC Kuo
host driver invokes .phy_exit() which indicates disabling a USB port. Signed-off-by: JC Kuo Acked-by: Thierry Reding --- v4: no change v3: new, was a part of "phy: tegra: xusb: Add wake/sleepwalk for Tegra210" drivers/phy/tegra/xusb-tegra210.c | 52 -

[PATCH v4 11/16] phy: tegra: xusb: Add wake/sleepwalk for Tegra210

2020-10-16 Thread JC Kuo
This commit implements Tegra210 XUSB PADCTL wake and sleepwalk routines. Sleepwalk logic is in PMC (always-on) hardware block. PMC driver provides managed access to the sleepwalk registers via regmap framework. Signed-off-by: JC Kuo --- v4: move sleepwalk/wake stubs from 'struct

[PATCH v4 16/16] xhci: tegra: Enable ELPG for runtime/system PM

2020-10-16 Thread JC Kuo
event. At runtime resume, xhci-tegra driver brings XUSB host controller out of ELPG to handle the wake events. The same ELPG enter/exit procedure will be performed for system suspend/resume path so USB devices can remain connected across SC7. Signed-off-by: JC Kuo --- v4: reshuffle the code

[PATCH v4 13/16] phy: tegra: xusb: Add wake/sleepwalk for Tegra186

2020-10-16 Thread JC Kuo
This commit implements Tegra186/Tegra194 XUSB PADCTL/AO wake and sleepwalk operations. Signed-off-by: JC Kuo --- v4: move sleepwalk/wake stubs from 'struct tegra_xusb_padctl_ops' to 'struct tegra_xusb_lane_ops' v3: move 'ao_regs' to the top of 'struct tegra186_xusb_padctl' change

[PATCH v4 14/16] arm64: tegra210/tegra186/tegra194: XUSB PADCTL irq

2020-10-16 Thread JC Kuo
This commit adds "interrupts" property to Tegra210/Tegra186/Tegra194 XUSB PADCTL node. XUSB PADCTL interrupt will be raised when USB wake event happens. This is required for supporting XUSB host controller ELPG. Signed-off-by: JC Kuo --- v4: no change v3: no change arch/arm6

[PATCH v4 15/16] usb: host: xhci-tegra: Unlink power domain devices

2020-10-16 Thread JC Kuo
, it invokes pm_runtime_put_sync() to request power driver to power down partitions; If power domain devices are not available, tegra_powergate_power_off() will be used to power down partitions. Signed-off-by: JC Kuo --- v4: commit message improvement update copyright strin

[PATCH v4 03/16] phy: tegra: xusb: Move usb3 port init for Tegra210

2020-10-16 Thread JC Kuo
tegra210_usb3_phy_power_on() if the lane is assigned for XUSB super-speed. Signed-off-by: JC Kuo Acked-by: Thierry Reding --- v4: mutex_lock()/mutex_unlock() fix update copyright string v3: new, was a part of "phy: tegra: xusb: Rearrange UPHY init on Tegra210" drivers/phy/

[PATCH v4 09/16] arm64: tegra210: XUSB PADCTL add "nvidia,pmc" prop

2020-10-16 Thread JC Kuo
PMC driver provides USB sleepwalk registers access to XUSB PADCTL driver. This commit adds a "nvidia,pmc" property which points to PMC node to XUSB PADCTL device node. Signed-off-by: JC Kuo --- v4: no change v3: no change arch/arm64/boot/dts/nvidia/tegra210.dtsi | 1 + 1 file

[PATCH v4 10/16] dt-bindings: phy: tegra-xusb: Add nvidia,pmc prop

2020-10-16 Thread JC Kuo
This commit describes the "nvidia,pmc" property for Tegra210 tegra-xusb PHY driver. It is a phandle and specifier referring to the Tegra210 pmc@7000e400 node. Signed-off-by: JC Kuo --- v4: new change to document "nvidia,pmc" prop .../devicetree/bindings/phy/nvidia,tegr

[PATCH v4 05/16] phy: tegra: xusb: Rearrange UPHY init on Tegra210

2020-10-16 Thread JC Kuo
ng lanes out of IDDQ, and then AUX_MUX_LP0_* bits will be cleared by tegra210_aux_mux_lp0_clamp_disable(). Signed-off-by: JC Kuo Acked-by: Thierry Re

[PATCH v4 01/16] clk: tegra: Add PLLE HW power sequencer control

2020-10-16 Thread JC Kuo
whether PLLE hardware sequencer has been enabled or not. Signed-off-by: JC Kuo Acked-by: Thierry Reding --- v4: update copyright strings v3: rename 'val' with 'value drivers/clk/tegra/clk-tegra210.c | 53 +++- include/linux/clk/tegra.h| 4 ++- 2 files

[PATCH v4 07/16] phy: tegra: xusb: Add sleepwalk and suspend/resume

2020-10-16 Thread JC Kuo
and restore XUSB PADCTL context during system suspend and resume. - tegra_xusb_padctl_suspend_noirq() - tegra_xusb_padctl_resume_noirq() Signed-off-by: JC Kuo --- v4: move sleepwalk/wake stubs from 'struct tegra_xusb_padctl_ops' to 'struct tegra_xusb_lane_ops' v3: commit message

[PATCH v4 08/16] soc/tegra: pmc: Provide USB sleepwalk register map

2020-10-16 Thread JC Kuo
This commit implements a register map which grants USB (UTMI and HSIC) sleepwalk registers access to USB PHY drivers. The USB sleepwalk logic is in PMC hardware block but USB PHY drivers have the best knowledge of proper programming sequence. Signed-off-by: JC Kuo Acked-by: Thierry Reding

[PATCH v4 06/16] phy: tegra: xusb: Add Tegra210 lane_iddq operation

2020-10-16 Thread JC Kuo
As per Tegra210 TRM, before changing lane assignments, driver should keep lanes in IDDQ and sleep state; after changing lane assignments, driver should bring lanes out of IDDQ. This commit implements the required operations. Signed-off-by: JC Kuo Acked-by: Thierry Reding --- v4: no change v3

[PATCH v4 02/16] clk: tegra: Don't enable PLLE HW sequencer at init

2020-10-16 Thread JC Kuo
PLLE hardware power sequencer references PEX/SATA UPHY PLL hardware power sequencers' output to enable/disable PLLE. PLLE hardware power sequencer has to be enabled only after PEX/SATA UPHY PLL's sequencers are enabled. Signed-off-by: JC Kuo Acked-by: Thierry Reding --- v4: no change v3

[PATCH v4 04/16] phy: tegra: xusb: tegra210: Do not reset UPHY PLL

2020-10-16 Thread JC Kuo
Once UPHY PLL hardware power sequencer is enabled, do not assert reset to PEX/SATA PLLs, otherwise UPHY PLL operation will be broken. This commit removes reset_control_assert(pcie->rst) and reset_control_assert(sata->rst) from PEX/SATA UPHY disable procedure. Signed-off-by: JC Kuo

[PATCH v4 00/16] Tegra XHCI controller ELPG support

2020-10-16 Thread JC Kuo
. JC Kuo (16): clk: tegra: Add PLLE HW power sequencer control clk: tegra: Don't enable PLLE HW sequencer at init phy: tegra: xusb: Move usb3 port init for Tegra210 phy: tegra: xusb: tegra210: Do not reset UPHY PLL phy: tegra: xusb: Rearrange UPHY init on Tegra210 phy: tegra: xusb: Add

Re: [PATCH v3 15/15] xhci: tegra: Enable ELPG for runtime/system PM

2020-10-15 Thread JC Kuo
I will amend accordingly and submit new patch. Thanks for review. JC On 9/28/20 10:06 PM, Thierry Reding wrote: > On Wed, Sep 09, 2020 at 04:10:41PM +0800, JC Kuo wrote: >> This commit implements the complete programming sequence for ELPG >> entry and exit. >> >>

Re: [PATCH v3 14/15] usb: host: xhci-tegra: Unlink power domain devices

2020-10-15 Thread JC Kuo
I will modify the commit message accordingly. Thanks for review. JC On 9/28/20 9:53 PM, Thierry Reding wrote: > On Wed, Sep 09, 2020 at 04:10:40PM +0800, JC Kuo wrote: >> This commit unlinks xhci-tegra platform device with ss/host power >> domain devices. Reasons for this chan

Re: [PATCH v3 12/15] phy: tegra: xusb: Add wake/sleepwalk for Tegra186

2020-10-15 Thread JC Kuo
I will amend accordingly and submit new patch. Thanks for review. JC On 9/28/20 9:50 PM, Thierry Reding wrote: > On Wed, Sep 09, 2020 at 04:10:38PM +0800, JC Kuo wrote: >> This commit implements Tegra186/Tegra194 XUSB PADCTL/AO wake and >> sleepwalk operations. >> >

Re: [PATCH v3 10/15] phy: tegra: xusb: Add wake/sleepwalk for Tegra210

2020-10-14 Thread JC Kuo
On 9/28/20 9:40 PM, Thierry Reding wrote: > On Wed, Sep 09, 2020 at 04:10:36PM +0800, JC Kuo wrote: > [...] >> diff --git a/drivers/phy/tegra/xusb-tegra210.c >> b/drivers/phy/tegra/xusb-tegra210.c > [...] > > Could we add function pointers to struct

Re: [PATCH v3 09/15] arm64: tegra210: XUSB PADCTL add "nvidia,pmc" prop

2020-10-13 Thread JC Kuo
I will add a dt-bindings commit for this change. Thanks for review. JC On 9/28/20 9:18 PM, Thierry Reding wrote: > On Wed, Sep 09, 2020 at 04:10:35PM +0800, JC Kuo wrote: >> PMC driver provides USB sleepwalk registers access to XUSB PADCTL >> driver. This commit adds a "

Re: [PATCH v3 08/15] soc/tegra: pmc: Provide usb sleepwalk register map

2020-10-13 Thread JC Kuo
I will amend commit accordingly and submit a new patch. Thanks for review. JC On 9/28/20 9:17 PM, Thierry Reding wrote: > On Wed, Sep 09, 2020 at 04:10:34PM +0800, JC Kuo wrote: >> This commit implements a register map which grants USB (UTMI and HSIC) >> sleepwalk registers ac

Re: [PATCH v3 04/15] phy: tegra: xusb: tegra210: Do not reset UPHY PLL

2020-10-13 Thread JC Kuo
Asserting reset to a PLL when it's managed by hardware power sequencer would break sequencer's state machine. Putting PLL in reset doesn't save some extra power. Thanks for review. JC On 9/28/20 9:06 PM, Thierry Reding wrote: > On Wed, Sep 09, 2020 at 04:10:30PM +0800, JC Kuo wrote: >

Re: [PATCH v3 00/15] Tegra XHCI controller ELPG support

2020-10-13 Thread JC Kuo
ll clients are in low power state, i.e., software has to explicitly power off PLLE. Thanks for review. JC On 9/28/20 8:54 PM, Thierry Reding wrote: > On Wed, Sep 09, 2020 at 04:10:26PM +0800, JC Kuo wrote: >> Tegra XHCI controler can be placed in ELPG (Engine Level PowerGated) >> state

[PATCH v3 04/15] phy: tegra: xusb: tegra210: Do not reset UPHY PLL

2020-09-09 Thread JC Kuo
Once UPHY PLL hardware power sequencer is enabled, do not assert reset to PEX/SATA PLLs, otherwise UPHY PLL operation will be broken. This commit removes reset_control_assert(pcie->rst) and reset_control_assert(sata->rst) from PEX/SATA UPHY disable procedure. Signed-off-by: JC Kuo --- v3:

[PATCH v3 03/15] phy: tegra: xusb: Move usb3 port init for Tegra210

2020-09-09 Thread JC Kuo
tegra210_usb3_phy_power_on() if the lane is assigned for XUSB super-speed. Signed-off-by: JC Kuo --- v3: new, was a part of "phy: tegra: xusb: Rearrange UPHY init on Tegra210" drivers/phy/tegra/xusb-tegra210.c | 298 +- drivers/phy/tegra/xusb.c

[PATCH v3 05/15] phy: tegra: xusb: Rearrange UPHY init on Tegra210

2020-09-09 Thread JC Kuo
ng lanes out of IDDQ, and then AUX_MUX_LP0_* bits will be cleared by tegra210_aux_mux_lp0_clamp_disable(). Signed-off-by: JC Kuo --- v3: make separate changes use "unsigned int" instead "int" type for PHY index add blank line for better readability drivers

[PATCH v3 06/15] phy: tegra: xusb: Add Tegra210 lane_iddq operation

2020-09-09 Thread JC Kuo
As per Tegra210 TRM, before changing lane assignments, driver should keep lanes in IDDQ and sleep state; after changing lane assignments, driver should bring lanes out of IDDQ. This commit implements the required operations. Signed-off-by: JC Kuo --- v3: add 'misc_ctl2' data member to UPHY

[PATCH v3 10/15] phy: tegra: xusb: Add wake/sleepwalk for Tegra210

2020-09-09 Thread JC Kuo
This commit implements Tegra210 XUSB PADCTL wake and sleepwalk routines. Sleepwalk logic is in PMC (always-on) hardware block. PMC driver provides managed access to the sleepwalk registers via regmap framework. Signed-off-by: JC Kuo --- v3: rename 'pmc_reg" with 'regmap' and move to th

[PATCH v3 08/15] soc/tegra: pmc: Provide usb sleepwalk register map

2020-09-09 Thread JC Kuo
-off-by: JC Kuo --- v3: commit message improvement drop regmap_reg() usage rename 'reg' with 'offset' rename 'val' with 'value' drop '__force' when invokes devm_regmap_init() print error code of devm_regmap_init() move devm_regmap_init() a litter bit earlier explicitly set

[PATCH v3 12/15] phy: tegra: xusb: Add wake/sleepwalk for Tegra186

2020-09-09 Thread JC Kuo
This commit implements Tegra186/Tegra194 XUSB PADCTL/AO wake and sleepwalk operations. Signed-off-by: JC Kuo --- v3: move 'ao_regs' to the top of 'struct tegra186_xusb_padctl' change return data of .phy_remote_wake_detected() to 'bool' change input parameter of .phy_remote_wake_detected

[PATCH v3 14/15] usb: host: xhci-tegra: Unlink power domain devices

2020-09-09 Thread JC Kuo
, it invokes pm_runtime_put_sync() to request power driver to power down partitions; If power domain devices are not available, tegra_powergate_power_off() will be used to power down partitions. Signed-off-by: JC Kuo --- v3: 'use_genpd' base on the results of tegra_xusb_powe

[PATCH v3 11/15] phy: tegra: xusb: Tegra210 host mode VBUS control

2020-09-09 Thread JC Kuo
host driver invokes .phy_exit() which indicates disabling a USB port. Signed-off-by: JC Kuo --- v3: new, was a part of "phy: tegra: xusb: Add wake/sleepwalk for Tegra210" drivers/phy/tegra/xusb-tegra210.c | 52 --- 1 file changed, 40 insertions(+), 12

[PATCH v3 15/15] xhci: tegra: Enable ELPG for runtime/system PM

2020-09-09 Thread JC Kuo
event. At runtime resume, xhci-tegra driver brings XUSB host controller out of ELPG to handle the wake events. The same ELPG enter/exit procedure will be performed for system suspend/resume path so USB devices can remain connected across SC7. Signed-off-by: JC Kuo --- v3: use 'unsigned int

[PATCH v3 13/15] arm64: tegra210/tegra186/tegra194: XUSB PADCTL irq

2020-09-09 Thread JC Kuo
This commit adds "interrupts" property to Tegra210/Tegra186/Tegra194 XUSB PADCTL node. XUSB PADCTL interrupt will be raised when USB wake event happens. This is required for supporting XUSB host controller ELPG. Signed-off-by: JC Kuo --- v3: no change arch/arm64/boot/dts/nvidi

[PATCH v3 09/15] arm64: tegra210: XUSB PADCTL add "nvidia,pmc" prop

2020-09-09 Thread JC Kuo
PMC driver provides USB sleepwalk registers access to XUSB PADCTL driver. This commit adds a "nvidia,pmc" property which points to PMC node to XUSB PADCTL device node. Signed-off-by: JC Kuo --- v3: no change arch/arm64/boot/dts/nvidia/tegra210.dtsi | 1 + 1 file changed, 1

[PATCH v3 00/15] Tegra XHCI controller ELPG support

2020-09-09 Thread JC Kuo
. JC Kuo (15): clk: tegra: Add PLLE HW power sequencer control clk: tegra: Don't enable PLLE HW sequencer at init phy: tegra: xusb: Move usb3 port init for Tegra210 phy: tegra: xusb: tegra210: Do not reset UPHY PLL phy: tegra: xusb: Rearrange UPHY init on Tegra210 phy: tegra: xusb: Add

[PATCH v3 02/15] clk: tegra: Don't enable PLLE HW sequencer at init

2020-09-09 Thread JC Kuo
PLLE hardware power sequencer references PEX/SATA UPHY PLL hardware power sequencers' output to enable/disable PLLE. PLLE hardware power sequencer has to be enabled only after PEX/SATA UPHY PLL's sequencers are enabled. Signed-off-by: JC Kuo --- v3: no change drivers/clk/tegra/clk-pll.c

[PATCH v3 07/15] phy: tegra: xusb: Add sleepwalk and suspend/resume

2020-09-09 Thread JC Kuo
and restore XUSB PADCTL context during system suspend and resume. - tegra_xusb_padctl_suspend_noirq() - tegra_xusb_padctl_resume_noirq() Signed-off-by: JC Kuo --- v3: commit message improvement, no change in code drivers/phy/tegra/xusb.c | 73 ++ drivers

[PATCH v3 01/15] clk: tegra: Add PLLE HW power sequencer control

2020-09-09 Thread JC Kuo
whether PLLE hardware sequencer has been enabled or not. Signed-off-by: JC Kuo --- v3: rename 'val' with 'value drivers/clk/tegra/clk-tegra210.c | 51 include/linux/clk/tegra.h| 2 ++ 2 files changed, 53 insertions(+) diff --git a/drivers/clk/tegra/clk

  1   2   >