Re: [PATCH] mmc: tegra: fix inconsistent IS_ERR and PTR_ERR

2018-09-04 Thread Aapo Vienamo
On Tue, 4 Sep 2018 10:59:09 +0800 YueHaibing wrote: > Fix inconsistent IS_ERR and PTR_ERR in tegra_sdhci_init_pinctrl_info, > the proper pointer to be passed as argument is 'pinctrl_state_1v8' > > Signed-off-by: YueHaibing Reviewed-by: Aapo Vienamo > --- > drivers/mmc/

Re: [PATCH] mmc: tegra: fix inconsistent IS_ERR and PTR_ERR

2018-09-04 Thread Aapo Vienamo
On Tue, 4 Sep 2018 10:59:09 +0800 YueHaibing wrote: > Fix inconsistent IS_ERR and PTR_ERR in tegra_sdhci_init_pinctrl_info, > the proper pointer to be passed as argument is 'pinctrl_state_1v8' > > Signed-off-by: YueHaibing Reviewed-by: Aapo Vienamo > --- > drivers/mmc/

[PATCH v3 14/38] mmc: tegra: Power on the calibration pad

2018-08-30 Thread Aapo Vienamo
Automatic pad drive strength calibration is performed on a separate pad identical to the ones used for driving the actual bus. Power on the calibration pad during the calibration procedure and power it off afterwards to save power. Signed-off-by: Aapo Vienamo Reviewed-by: Mikko Perttunen Acked

[PATCH v3 14/38] mmc: tegra: Power on the calibration pad

2018-08-30 Thread Aapo Vienamo
Automatic pad drive strength calibration is performed on a separate pad identical to the ones used for driving the actual bus. Power on the calibration pad during the calibration procedure and power it off afterwards to save power. Signed-off-by: Aapo Vienamo Reviewed-by: Mikko Perttunen Acked

[PATCH v3 38/38] arm64: dts: tegra210: Assign clocks for sdmmc1 and sdmmc4

2018-08-30 Thread Aapo Vienamo
Use assigned-clock properties to configure pllc4 as the parent clock for sdmmc4 on Tegra210. pllc4 offers better jitter perfomance than the default pllp and is required by HS200 and HS400 modes. Signed-off-by: Aapo Vienamo Acked-by: Thierry Reding --- arch/arm64/boot/dts/nvidia/tegra210.dtsi

[PATCH v3 38/38] arm64: dts: tegra210: Assign clocks for sdmmc1 and sdmmc4

2018-08-30 Thread Aapo Vienamo
Use assigned-clock properties to configure pllc4 as the parent clock for sdmmc4 on Tegra210. pllc4 offers better jitter perfomance than the default pllp and is required by HS200 and HS400 modes. Signed-off-by: Aapo Vienamo Acked-by: Thierry Reding --- arch/arm64/boot/dts/nvidia/tegra210.dtsi

[PATCH v3 35/38] arm64: dts: tegra210: Add SDHCI tap and trim values

2018-08-30 Thread Aapo Vienamo
Add SDHCI inbound and outbound SDHCI sampling trimmer values for Tegra210. Signed-off-by: Aapo Vienamo Acked-by: Thierry Reding --- arch/arm64/boot/dts/nvidia/tegra210.dtsi | 8 1 file changed, 8 insertions(+) diff --git a/arch/arm64/boot/dts/nvidia/tegra210.dtsi b/arch/arm64/boot

[PATCH v3 37/38] arm64: dts: tegra186: Assign clocks for sdmmc1 and sdmmc4

2018-08-30 Thread Aapo Vienamo
Configure sdmmc4 parent clock to pllc4 and sdmmc1 to pllp_out0 by setting the assigned-clocks device tree properties. pllc4 offer better jitter performance and should be used with higher speed modes like HS200 and HS400. Signed-off-by: Aapo Vienamo Acked-by: Thierry Reding --- arch/arm64/boot

[PATCH v3 35/38] arm64: dts: tegra210: Add SDHCI tap and trim values

2018-08-30 Thread Aapo Vienamo
Add SDHCI inbound and outbound SDHCI sampling trimmer values for Tegra210. Signed-off-by: Aapo Vienamo Acked-by: Thierry Reding --- arch/arm64/boot/dts/nvidia/tegra210.dtsi | 8 1 file changed, 8 insertions(+) diff --git a/arch/arm64/boot/dts/nvidia/tegra210.dtsi b/arch/arm64/boot

[PATCH v3 37/38] arm64: dts: tegra186: Assign clocks for sdmmc1 and sdmmc4

2018-08-30 Thread Aapo Vienamo
Configure sdmmc4 parent clock to pllc4 and sdmmc1 to pllp_out0 by setting the assigned-clocks device tree properties. pllc4 offer better jitter performance and should be used with higher speed modes like HS200 and HS400. Signed-off-by: Aapo Vienamo Acked-by: Thierry Reding --- arch/arm64/boot

[PATCH v3 36/38] arm64: dts: tegra186: Add SDHCI tap and trim values

2018-08-30 Thread Aapo Vienamo
Add SDHCI inbound and outbound SDHCI sampling trimmer values for Tegra186. Signed-off-by: Aapo Vienamo Acked-by: Thierry Reding --- arch/arm64/boot/dts/nvidia/tegra186.dtsi | 8 1 file changed, 8 insertions(+) diff --git a/arch/arm64/boot/dts/nvidia/tegra186.dtsi b/arch/arm64/boot

[PATCH v3 36/38] arm64: dts: tegra186: Add SDHCI tap and trim values

2018-08-30 Thread Aapo Vienamo
Add SDHCI inbound and outbound SDHCI sampling trimmer values for Tegra186. Signed-off-by: Aapo Vienamo Acked-by: Thierry Reding --- arch/arm64/boot/dts/nvidia/tegra186.dtsi | 8 1 file changed, 8 insertions(+) diff --git a/arch/arm64/boot/dts/nvidia/tegra186.dtsi b/arch/arm64/boot

[PATCH v3 31/38] arm64: dts: tegra210-p2180: Correct sdmmc4 vqmmc-supply

2018-08-30 Thread Aapo Vienamo
On p2180 sdmmc4 is powered from a fixed 1.8 V regulator. Signed-off-by: Aapo Vienamo Reviewed-by: Mikko Perttunen Acked-by: Thierry Reding --- arch/arm64/boot/dts/nvidia/tegra210-p2180.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/boot/dts/nvidia/tegra210-p2180.dtsi b

[PATCH v3 30/38] arm64: dts: tegra210-p2180: Allow ldo2 to go down to 1.8 V

2018-08-30 Thread Aapo Vienamo
applies. Signed-off-by: Aapo Vienamo Reviewed-by: Mikko Perttunen Acked-by: Thierry Reding --- arch/arm64/boot/dts/nvidia/tegra210-p2180.dtsi | 11 +-- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/arch/arm64/boot/dts/nvidia/tegra210-p2180.dtsi b/arch/arm64/boot/dts

[PATCH v3 31/38] arm64: dts: tegra210-p2180: Correct sdmmc4 vqmmc-supply

2018-08-30 Thread Aapo Vienamo
On p2180 sdmmc4 is powered from a fixed 1.8 V regulator. Signed-off-by: Aapo Vienamo Reviewed-by: Mikko Perttunen Acked-by: Thierry Reding --- arch/arm64/boot/dts/nvidia/tegra210-p2180.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/boot/dts/nvidia/tegra210-p2180.dtsi b

[PATCH v3 30/38] arm64: dts: tegra210-p2180: Allow ldo2 to go down to 1.8 V

2018-08-30 Thread Aapo Vienamo
applies. Signed-off-by: Aapo Vienamo Reviewed-by: Mikko Perttunen Acked-by: Thierry Reding --- arch/arm64/boot/dts/nvidia/tegra210-p2180.dtsi | 11 +-- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/arch/arm64/boot/dts/nvidia/tegra210-p2180.dtsi b/arch/arm64/boot/dts

[PATCH v3 33/38] arm64: dts: tegra186: Add sdmmc pad auto calibration offsets

2018-08-30 Thread Aapo Vienamo
Add the calibration offset properties used for automatic pad drive strength calibration. Signed-off-by: Aapo Vienamo Acked-by: Thierry Reding --- arch/arm64/boot/dts/nvidia/tegra186.dtsi | 20 1 file changed, 20 insertions(+) diff --git a/arch/arm64/boot/dts/nvidia

[PATCH v3 34/38] arm64: dts: tegra210: Add sdmmc pad auto calibration offsets

2018-08-30 Thread Aapo Vienamo
Add the calibration offset properties used for automatic pad drive strength calibration. Signed-off-by: Aapo Vienamo Acked-by: Thierry Reding --- arch/arm64/boot/dts/nvidia/tegra210.dtsi | 12 1 file changed, 12 insertions(+) diff --git a/arch/arm64/boot/dts/nvidia/tegra210.dtsi

[PATCH v3 32/38] arm64: dts: tegra210-p2597: Remove no-1-8-v from sdmmc1

2018-08-30 Thread Aapo Vienamo
Allow sdmmc1 to set the signaling voltage to 1.8 V in order to support faster signaling modes. Signed-off-by: Aapo Vienamo Acked-by: Thierry Reding --- arch/arm64/boot/dts/nvidia/tegra210-p2597.dtsi | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/arm64/boot/dts/nvidia/tegra210-p2597

[PATCH v3 33/38] arm64: dts: tegra186: Add sdmmc pad auto calibration offsets

2018-08-30 Thread Aapo Vienamo
Add the calibration offset properties used for automatic pad drive strength calibration. Signed-off-by: Aapo Vienamo Acked-by: Thierry Reding --- arch/arm64/boot/dts/nvidia/tegra186.dtsi | 20 1 file changed, 20 insertions(+) diff --git a/arch/arm64/boot/dts/nvidia

[PATCH v3 34/38] arm64: dts: tegra210: Add sdmmc pad auto calibration offsets

2018-08-30 Thread Aapo Vienamo
Add the calibration offset properties used for automatic pad drive strength calibration. Signed-off-by: Aapo Vienamo Acked-by: Thierry Reding --- arch/arm64/boot/dts/nvidia/tegra210.dtsi | 12 1 file changed, 12 insertions(+) diff --git a/arch/arm64/boot/dts/nvidia/tegra210.dtsi

[PATCH v3 32/38] arm64: dts: tegra210-p2597: Remove no-1-8-v from sdmmc1

2018-08-30 Thread Aapo Vienamo
Allow sdmmc1 to set the signaling voltage to 1.8 V in order to support faster signaling modes. Signed-off-by: Aapo Vienamo Acked-by: Thierry Reding --- arch/arm64/boot/dts/nvidia/tegra210-p2597.dtsi | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/arm64/boot/dts/nvidia/tegra210-p2597

[PATCH v3 27/38] mmc: tegra: Enable UHS and HS200 modes for Tegra186

2018-08-30 Thread Aapo Vienamo
Set nvquirks to enable higher speed modes. Signed-off-by: Aapo Vienamo Acked-by: Thierry Reding --- drivers/mmc/host/sdhci-tegra.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/host/sdhci-tegra.c b/drivers/mmc/host/sdhci-tegra.c index 73ea947e9c0c

[PATCH v3 28/38] arm64: dts: Add Tegra210 sdmmc pinctrl voltage states

2018-08-30 Thread Aapo Vienamo
Add pad voltage configuration nodes for sdmmc pads with configurable voltages on Tegra210. Signed-off-by: Aapo Vienamo Reviewed-by: Mikko Perttunen Acked-by: Thierry Reding --- arch/arm64/boot/dts/nvidia/tegra210.dtsi | 27 1 file changed, 27 insertions(+) diff --git

[PATCH v3 29/38] arm64: dts: Add Tegra186 sdmmc pinctrl voltage states

2018-08-30 Thread Aapo Vienamo
Add pad voltage configuration nodes for sdmmc pads with configurable voltages on Tegra186. Signed-off-by: Aapo Vienamo Reviewed-by: Mikko Perttunen Acked-by: Thierry Reding --- arch/arm64/boot/dts/nvidia/tegra186.dtsi | 40 1 file changed, 40 insertions(+) diff --git

[PATCH v3 23/38] mmc: tegra: Use standard SDHCI tuning on Tegra210 and Tegra186

2018-08-30 Thread Aapo Vienamo
Add a new sdhci_ops struct for Tegra210 and Tegra186 which doesn't set the custom tuning callback used on previous SoC generations. Signed-off-by: Aapo Vienamo Acked-by: Thierry Reding --- drivers/mmc/host/sdhci-tegra.c | 17 +++-- 1 file changed, 15 insertions(+), 2 deletions

[PATCH v3 24/38] mmc: tegra: Remove tegra_sdhci_writew() from tegra210_sdhci_ops

2018-08-30 Thread Aapo Vienamo
to. This results in tuning failures on Tegra210. Signed-off-by: Aapo Vienamo --- drivers/mmc/host/sdhci-tegra.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/mmc/host/sdhci-tegra.c b/drivers/mmc/host/sdhci-tegra.c index f68557a01d5d..0bdce437e752 100644 --- a/drivers/mmc/host/sdhci

[PATCH v3 25/38] mmc: tegra: Disable card clock during tuning cmd on Tegra210

2018-08-30 Thread Aapo Vienamo
Implement tegra210_sdhci_writew() to disable card clock and issue a reset when the tuning command is sent. This is done to prevent an intermittent hang with around 10 % failure rate during tuning. Add tegra186_sdhci_ops because this workaround is specific to Tegra210. Signed-off-by: Aapo Vienamo

[PATCH v3 27/38] mmc: tegra: Enable UHS and HS200 modes for Tegra186

2018-08-30 Thread Aapo Vienamo
Set nvquirks to enable higher speed modes. Signed-off-by: Aapo Vienamo Acked-by: Thierry Reding --- drivers/mmc/host/sdhci-tegra.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/host/sdhci-tegra.c b/drivers/mmc/host/sdhci-tegra.c index 73ea947e9c0c

[PATCH v3 28/38] arm64: dts: Add Tegra210 sdmmc pinctrl voltage states

2018-08-30 Thread Aapo Vienamo
Add pad voltage configuration nodes for sdmmc pads with configurable voltages on Tegra210. Signed-off-by: Aapo Vienamo Reviewed-by: Mikko Perttunen Acked-by: Thierry Reding --- arch/arm64/boot/dts/nvidia/tegra210.dtsi | 27 1 file changed, 27 insertions(+) diff --git

[PATCH v3 29/38] arm64: dts: Add Tegra186 sdmmc pinctrl voltage states

2018-08-30 Thread Aapo Vienamo
Add pad voltage configuration nodes for sdmmc pads with configurable voltages on Tegra186. Signed-off-by: Aapo Vienamo Reviewed-by: Mikko Perttunen Acked-by: Thierry Reding --- arch/arm64/boot/dts/nvidia/tegra186.dtsi | 40 1 file changed, 40 insertions(+) diff --git

[PATCH v3 23/38] mmc: tegra: Use standard SDHCI tuning on Tegra210 and Tegra186

2018-08-30 Thread Aapo Vienamo
Add a new sdhci_ops struct for Tegra210 and Tegra186 which doesn't set the custom tuning callback used on previous SoC generations. Signed-off-by: Aapo Vienamo Acked-by: Thierry Reding --- drivers/mmc/host/sdhci-tegra.c | 17 +++-- 1 file changed, 15 insertions(+), 2 deletions

[PATCH v3 24/38] mmc: tegra: Remove tegra_sdhci_writew() from tegra210_sdhci_ops

2018-08-30 Thread Aapo Vienamo
to. This results in tuning failures on Tegra210. Signed-off-by: Aapo Vienamo --- drivers/mmc/host/sdhci-tegra.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/mmc/host/sdhci-tegra.c b/drivers/mmc/host/sdhci-tegra.c index f68557a01d5d..0bdce437e752 100644 --- a/drivers/mmc/host/sdhci

[PATCH v3 25/38] mmc: tegra: Disable card clock during tuning cmd on Tegra210

2018-08-30 Thread Aapo Vienamo
Implement tegra210_sdhci_writew() to disable card clock and issue a reset when the tuning command is sent. This is done to prevent an intermittent hang with around 10 % failure rate during tuning. Add tegra186_sdhci_ops because this workaround is specific to Tegra210. Signed-off-by: Aapo Vienamo

[PATCH v3 26/38] mmc: tegra: Enable UHS and HS200 modes for Tegra210

2018-08-30 Thread Aapo Vienamo
Set nvquirks to enable higher speed modes. Signed-off-by: Aapo Vienamo Acked-by: Thierry Reding --- drivers/mmc/host/sdhci-tegra.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/host/sdhci-tegra.c b/drivers/mmc/host/sdhci-tegra.c index aa1574b8d96c

[PATCH v3 21/38] mmc: tegra: Configure default tap values

2018-08-30 Thread Aapo Vienamo
Set the default inbound timing adjustment tap value on reset and on non-tunable modes. The default tap value is not programmed on tunable modes because the tuning sequence is used instead to determine the tap value. Signed-off-by: Aapo Vienamo Acked-by: Thierry Reding --- drivers/mmc/host

[PATCH v3 22/38] mmc: tegra: Configure default trim value on reset

2018-08-30 Thread Aapo Vienamo
Program the outbound sampling trim value in tegra_sdhci_reset(). Unlike the outbound tap value this does not depend on the signaling mode and needs to be only programmed once. Signed-off-by: Aapo Vienamo Acked-by: Thierry Reding --- drivers/mmc/host/sdhci-tegra.c | 7 ++- 1 file changed, 6

[PATCH v3 26/38] mmc: tegra: Enable UHS and HS200 modes for Tegra210

2018-08-30 Thread Aapo Vienamo
Set nvquirks to enable higher speed modes. Signed-off-by: Aapo Vienamo Acked-by: Thierry Reding --- drivers/mmc/host/sdhci-tegra.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/host/sdhci-tegra.c b/drivers/mmc/host/sdhci-tegra.c index aa1574b8d96c

[PATCH v3 21/38] mmc: tegra: Configure default tap values

2018-08-30 Thread Aapo Vienamo
Set the default inbound timing adjustment tap value on reset and on non-tunable modes. The default tap value is not programmed on tunable modes because the tuning sequence is used instead to determine the tap value. Signed-off-by: Aapo Vienamo Acked-by: Thierry Reding --- drivers/mmc/host

[PATCH v3 22/38] mmc: tegra: Configure default trim value on reset

2018-08-30 Thread Aapo Vienamo
Program the outbound sampling trim value in tegra_sdhci_reset(). Unlike the outbound tap value this does not depend on the signaling mode and needs to be only programmed once. Signed-off-by: Aapo Vienamo Acked-by: Thierry Reding --- drivers/mmc/host/sdhci-tegra.c | 7 ++- 1 file changed, 6

[PATCH v3 20/38] mmc: tegra: Parse default trim and tap from dt

2018-08-30 Thread Aapo Vienamo
Parse the default inbound and outbound sampling trimmer values from the device tree. Signed-off-by: Aapo Vienamo Acked-by: Thierry Reding --- drivers/mmc/host/sdhci-tegra.c | 22 ++ 1 file changed, 22 insertions(+) diff --git a/drivers/mmc/host/sdhci-tegra.c b/drivers/mmc

[PATCH v3 16/38] mmc: tegra: Program pad autocal offsets from dt

2018-08-30 Thread Aapo Vienamo
Parse the pad drive strength calibration offsets from the device tree. Program the calibration offsets in accordance with the current signaling mode. Signed-off-by: Aapo Vienamo Acked-by: Thierry Reding --- drivers/mmc/host/sdhci-tegra.c | 152 - 1 file changed

[PATCH v3 19/38] mmc: tegra: Add a workaround for tap value change glitch

2018-08-30 Thread Aapo Vienamo
Add quirk to disable the card clock during configuration of the tap value in tegra_sdhci_set_tap() and issue sdhci_reset() after value change. This is a workaround to avoid propagation of a potential glitch caused by setting the tap value. Signed-off-by: Aapo Vienamo Acked-by: Thierry Reding

[PATCH v3 17/38] mmc: tegra: Perform pad calibration after voltage switch

2018-08-30 Thread Aapo Vienamo
Run the automatic pad calibration after voltage switching if tegra_host->pad_calib_required is set. Signed-off-by: Aapo Vienamo Acked-by: Thierry Reding --- drivers/mmc/host/sdhci-tegra.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/mmc/host/sdhci-tegra.c b/drivers/mmc/h

[PATCH v3 18/38] mmc: tegra: Enable pad calibration on Tegra210 and Tegra186

2018-08-30 Thread Aapo Vienamo
Set NVQUIRK_HAS_PADCALIB on Tegra210 and Tegra186 to enable automatic pad drive strength calibration. Signed-off-by: Aapo Vienamo Acked-by: Thierry Reding --- drivers/mmc/host/sdhci-tegra.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/host/sdhci-tegra.c

[PATCH v3 20/38] mmc: tegra: Parse default trim and tap from dt

2018-08-30 Thread Aapo Vienamo
Parse the default inbound and outbound sampling trimmer values from the device tree. Signed-off-by: Aapo Vienamo Acked-by: Thierry Reding --- drivers/mmc/host/sdhci-tegra.c | 22 ++ 1 file changed, 22 insertions(+) diff --git a/drivers/mmc/host/sdhci-tegra.c b/drivers/mmc

[PATCH v3 16/38] mmc: tegra: Program pad autocal offsets from dt

2018-08-30 Thread Aapo Vienamo
Parse the pad drive strength calibration offsets from the device tree. Program the calibration offsets in accordance with the current signaling mode. Signed-off-by: Aapo Vienamo Acked-by: Thierry Reding --- drivers/mmc/host/sdhci-tegra.c | 152 - 1 file changed

[PATCH v3 19/38] mmc: tegra: Add a workaround for tap value change glitch

2018-08-30 Thread Aapo Vienamo
Add quirk to disable the card clock during configuration of the tap value in tegra_sdhci_set_tap() and issue sdhci_reset() after value change. This is a workaround to avoid propagation of a potential glitch caused by setting the tap value. Signed-off-by: Aapo Vienamo Acked-by: Thierry Reding

[PATCH v3 17/38] mmc: tegra: Perform pad calibration after voltage switch

2018-08-30 Thread Aapo Vienamo
Run the automatic pad calibration after voltage switching if tegra_host->pad_calib_required is set. Signed-off-by: Aapo Vienamo Acked-by: Thierry Reding --- drivers/mmc/host/sdhci-tegra.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/mmc/host/sdhci-tegra.c b/drivers/mmc/h

[PATCH v3 18/38] mmc: tegra: Enable pad calibration on Tegra210 and Tegra186

2018-08-30 Thread Aapo Vienamo
Set NVQUIRK_HAS_PADCALIB on Tegra210 and Tegra186 to enable automatic pad drive strength calibration. Signed-off-by: Aapo Vienamo Acked-by: Thierry Reding --- drivers/mmc/host/sdhci-tegra.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/host/sdhci-tegra.c

[PATCH v3 09/38] soc/tegra: pmc: Remove public pad voltage APIs

2018-08-30 Thread Aapo Vienamo
-off-by: Aapo Vienamo Acked-by: Jon Hunter Acked-by: Thierry Reding --- drivers/soc/tegra/pmc.c | 17 - include/soc/tegra/pmc.h | 19 --- 2 files changed, 8 insertions(+), 28 deletions(-) diff --git a/drivers/soc/tegra/pmc.c b/drivers/soc/tegra/pmc.c index

[PATCH v3 11/38] mmc: tegra: Reconfigure pad voltages during voltage switching

2018-08-30 Thread Aapo Vienamo
it for Tegra210 and Tegra186. The pad configuration is done in the mmc callback because the order of pad reconfiguration and sdhci voltage switch depend on the voltage to which the transition occurs. Signed-off-by: Aapo Vienamo Acked-by: Thierry Reding --- drivers/mmc/host/sdhci-tegra.c | 136

[PATCH v3 10/38] soc/tegra: pmc: Implement pad configuration via pinctrl

2018-08-30 Thread Aapo Vienamo
Register a pinctrl device and implement get and set functions for PIN_CONFIG_LOW_POWER_MODE and PIN_CONFIG_POWER_SOURCE parameters. Signed-off-by: Aapo Vienamo Acked-by: Jon Hunter Acked-by: Thierry Reding --- drivers/soc/tegra/pmc.c | 187 +++- 1 file

[PATCH v3 09/38] soc/tegra: pmc: Remove public pad voltage APIs

2018-08-30 Thread Aapo Vienamo
-off-by: Aapo Vienamo Acked-by: Jon Hunter Acked-by: Thierry Reding --- drivers/soc/tegra/pmc.c | 17 - include/soc/tegra/pmc.h | 19 --- 2 files changed, 8 insertions(+), 28 deletions(-) diff --git a/drivers/soc/tegra/pmc.c b/drivers/soc/tegra/pmc.c index

[PATCH v3 11/38] mmc: tegra: Reconfigure pad voltages during voltage switching

2018-08-30 Thread Aapo Vienamo
it for Tegra210 and Tegra186. The pad configuration is done in the mmc callback because the order of pad reconfiguration and sdhci voltage switch depend on the voltage to which the transition occurs. Signed-off-by: Aapo Vienamo Acked-by: Thierry Reding --- drivers/mmc/host/sdhci-tegra.c | 136

[PATCH v3 10/38] soc/tegra: pmc: Implement pad configuration via pinctrl

2018-08-30 Thread Aapo Vienamo
Register a pinctrl device and implement get and set functions for PIN_CONFIG_LOW_POWER_MODE and PIN_CONFIG_POWER_SOURCE parameters. Signed-off-by: Aapo Vienamo Acked-by: Jon Hunter Acked-by: Thierry Reding --- drivers/soc/tegra/pmc.c | 187 +++- 1 file

[PATCH v3 12/38] mmc: tegra: Poll for calibration completion

2018-08-30 Thread Aapo Vienamo
Implement polling with 10 ms timeout for automatic pad drive strength calibration. Signed-off-by: Aapo Vienamo Acked-by: Thierry Reding --- drivers/mmc/host/sdhci-tegra.c | 22 +- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/drivers/mmc/host/sdhci-tegra.c

[PATCH v3 13/38] mmc: tegra: Set calibration pad voltage reference

2018-08-30 Thread Aapo Vienamo
Configure the voltage reference used by the automatic pad drive strength calibration procedure. The value is a magic number from the TRM. Signed-off-by: Aapo Vienamo Acked-by: Thierry Reding --- drivers/mmc/host/sdhci-tegra.c | 56 -- 1 file changed, 33

[PATCH v3 15/38] mmc: tegra: Disable card clock during pad calibration

2018-08-30 Thread Aapo Vienamo
Disable the card clock during automatic pad drive strength calibration and re-enable it afterwards. Signed-off-by: Aapo Vienamo Acked-by: Thierry Reding --- drivers/mmc/host/sdhci-tegra.c | 26 ++ 1 file changed, 26 insertions(+) diff --git a/drivers/mmc/host/sdhci

[PATCH v3 12/38] mmc: tegra: Poll for calibration completion

2018-08-30 Thread Aapo Vienamo
Implement polling with 10 ms timeout for automatic pad drive strength calibration. Signed-off-by: Aapo Vienamo Acked-by: Thierry Reding --- drivers/mmc/host/sdhci-tegra.c | 22 +- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/drivers/mmc/host/sdhci-tegra.c

[PATCH v3 13/38] mmc: tegra: Set calibration pad voltage reference

2018-08-30 Thread Aapo Vienamo
Configure the voltage reference used by the automatic pad drive strength calibration procedure. The value is a magic number from the TRM. Signed-off-by: Aapo Vienamo Acked-by: Thierry Reding --- drivers/mmc/host/sdhci-tegra.c | 56 -- 1 file changed, 33

[PATCH v3 15/38] mmc: tegra: Disable card clock during pad calibration

2018-08-30 Thread Aapo Vienamo
Disable the card clock during automatic pad drive strength calibration and re-enable it afterwards. Signed-off-by: Aapo Vienamo Acked-by: Thierry Reding --- drivers/mmc/host/sdhci-tegra.c | 26 ++ 1 file changed, 26 insertions(+) diff --git a/drivers/mmc/host/sdhci

[PATCH v3 08/38] soc/tegra: pmc: Use X macro to generate IO pad tables

2018-08-30 Thread Aapo Vienamo
Refactor the IO pad tables into macro tables so that they can be reused to generate pinctrl pin descriptors. Also add a name field which is needed by pinctrl. Signed-off-by: Aapo Vienamo Acked-by: Thierry Reding --- drivers/soc/tegra/pmc.c | 233 ++-- 1 file

[PATCH v3 08/38] soc/tegra: pmc: Use X macro to generate IO pad tables

2018-08-30 Thread Aapo Vienamo
Refactor the IO pad tables into macro tables so that they can be reused to generate pinctrl pin descriptors. Also add a name field which is needed by pinctrl. Signed-off-by: Aapo Vienamo Acked-by: Thierry Reding --- drivers/soc/tegra/pmc.c | 233 ++-- 1 file

[PATCH v3 06/38] soc/tegra: pmc: Factor out DPD register bit calculation

2018-08-30 Thread Aapo Vienamo
Factor out the the code to calculate the correct DPD register and bit number for a given pad. This logic will be needed to query the status register. Signed-off-by: Aapo Vienamo Acked-by: Jon Hunter Acked-by: Thierry Reding --- drivers/soc/tegra/pmc.c | 20 +--- 1 file changed

[PATCH v3 05/38] soc/tegra: pmc: Fix pad voltage configuration for Tegra186

2018-08-30 Thread Aapo Vienamo
Implement support for the PMC_IMPL_E_33V_PWR register which replaces PMC_PWR_DET register interface of the SoC generations preceding Tegra186. Also add the voltage bit offsets to the tegra186_io_pads[] table and the AO_HV pad. Signed-off-by: Aapo Vienamo Acked-by: Jon Hunter Acked-by: Thierry

[PATCH v3 07/38] soc/tegra: pmc: Implement tegra_io_pad_is_powered()

2018-08-30 Thread Aapo Vienamo
Implement a function to query whether a pad is in deep power down mode. This is needed by the pinctrl callbacks. Signed-off-by: Aapo Vienamo Acked-by: Jon Hunter Acked-by: Thierry Reding --- drivers/soc/tegra/pmc.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/drivers

[PATCH v3 06/38] soc/tegra: pmc: Factor out DPD register bit calculation

2018-08-30 Thread Aapo Vienamo
Factor out the the code to calculate the correct DPD register and bit number for a given pad. This logic will be needed to query the status register. Signed-off-by: Aapo Vienamo Acked-by: Jon Hunter Acked-by: Thierry Reding --- drivers/soc/tegra/pmc.c | 20 +--- 1 file changed

[PATCH v3 05/38] soc/tegra: pmc: Fix pad voltage configuration for Tegra186

2018-08-30 Thread Aapo Vienamo
Implement support for the PMC_IMPL_E_33V_PWR register which replaces PMC_PWR_DET register interface of the SoC generations preceding Tegra186. Also add the voltage bit offsets to the tegra186_io_pads[] table and the AO_HV pad. Signed-off-by: Aapo Vienamo Acked-by: Jon Hunter Acked-by: Thierry

[PATCH v3 07/38] soc/tegra: pmc: Implement tegra_io_pad_is_powered()

2018-08-30 Thread Aapo Vienamo
Implement a function to query whether a pad is in deep power down mode. This is needed by the pinctrl callbacks. Signed-off-by: Aapo Vienamo Acked-by: Jon Hunter Acked-by: Thierry Reding --- drivers/soc/tegra/pmc.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/drivers

[PATCH v3 04/38] dt-bindings: mmc: Add Tegra SDHCI sampling trimmer values

2018-08-30 Thread Aapo Vienamo
Document the Tegra SDHCI inbound and outbound sampling trimmer values. Signed-off-by: Aapo Vienamo Acked-by: Thierry Reding --- .../devicetree/bindings/mmc/nvidia,tegra20-sdhci.txt | 11 +++ 1 file changed, 11 insertions(+) diff --git a/Documentation/devicetree/bindings/mmc/nvidia

[PATCH v3 04/38] dt-bindings: mmc: Add Tegra SDHCI sampling trimmer values

2018-08-30 Thread Aapo Vienamo
Document the Tegra SDHCI inbound and outbound sampling trimmer values. Signed-off-by: Aapo Vienamo Acked-by: Thierry Reding --- .../devicetree/bindings/mmc/nvidia,tegra20-sdhci.txt | 11 +++ 1 file changed, 11 insertions(+) diff --git a/Documentation/devicetree/bindings/mmc/nvidia

[PATCH v3 02/38] dt-bindings: mmc: tegra: Add pad voltage control properties

2018-08-30 Thread Aapo Vienamo
Document the pinctrl bindings used by the SDHCI driver to reconfigure pad voltages on controllers supporting multiple voltage levels. Signed-off-by: Aapo Vienamo Reviewed-by: Mikko Perttunen Reviewed-by: Rob Herring Acked-by: Thierry Reding --- .../bindings/mmc/nvidia,tegra20-sdhci.txt

[PATCH v3 01/38] dt-bindings: Add Tegra PMC pad configuration bindings

2018-08-30 Thread Aapo Vienamo
-off-by: Aapo Vienamo Acked-by: Jon Hunter Reviewed-by: Rob Herring Acked-by: Thierry Reding --- .../arm/tegra/nvidia,tegra186-pmc.txt | 93 .../bindings/arm/tegra/nvidia,tegra20-pmc.txt | 103 ++ .../pinctrl/pinctrl-tegra-io-pad.h| 18 +++ 3

[PATCH v3 03/38] dt-bindings: Add Tegra SDHCI pad pdpu offset bindings

2018-08-30 Thread Aapo Vienamo
Add bindings documentation for pad pull up and pull down offset values to be programmed before executing automatic pad drive strength calibration. Signed-off-by: Aapo Vienamo Acked-by: Thierry Reding --- .../bindings/mmc/nvidia,tegra20-sdhci.txt | 35 +++ 1 file changed, 35

[PATCH v3 02/38] dt-bindings: mmc: tegra: Add pad voltage control properties

2018-08-30 Thread Aapo Vienamo
Document the pinctrl bindings used by the SDHCI driver to reconfigure pad voltages on controllers supporting multiple voltage levels. Signed-off-by: Aapo Vienamo Reviewed-by: Mikko Perttunen Reviewed-by: Rob Herring Acked-by: Thierry Reding --- .../bindings/mmc/nvidia,tegra20-sdhci.txt

[PATCH v3 01/38] dt-bindings: Add Tegra PMC pad configuration bindings

2018-08-30 Thread Aapo Vienamo
-off-by: Aapo Vienamo Acked-by: Jon Hunter Reviewed-by: Rob Herring Acked-by: Thierry Reding --- .../arm/tegra/nvidia,tegra186-pmc.txt | 93 .../bindings/arm/tegra/nvidia,tegra20-pmc.txt | 103 ++ .../pinctrl/pinctrl-tegra-io-pad.h| 18 +++ 3

[PATCH v3 03/38] dt-bindings: Add Tegra SDHCI pad pdpu offset bindings

2018-08-30 Thread Aapo Vienamo
Add bindings documentation for pad pull up and pull down offset values to be programmed before executing automatic pad drive strength calibration. Signed-off-by: Aapo Vienamo Acked-by: Thierry Reding --- .../bindings/mmc/nvidia,tegra20-sdhci.txt | 35 +++ 1 file changed, 35

[PATCH v3 00/38] Tegra SDHCI add support for HS200 and UHS signaling

2018-08-30 Thread Aapo Vienamo
() in tegra_sdhci_init_pinctrl_info() - Don't change start_signal_voltage_switch callback if pinctrl info invalid - Only call udelay(1) on enable in tegra_sdhci_configure_cal_pad() - Add nvidia, prefix to pad autocal offset dt props in the example See the original patch sets for earlier c

[PATCH v3 00/38] Tegra SDHCI add support for HS200 and UHS signaling

2018-08-30 Thread Aapo Vienamo
() in tegra_sdhci_init_pinctrl_info() - Don't change start_signal_voltage_switch callback if pinctrl info invalid - Only call udelay(1) on enable in tegra_sdhci_configure_cal_pad() - Add nvidia, prefix to pad autocal offset dt props in the example See the original patch sets for earlier c

Re: [PATCH v2 25/40] mmc: sdhci: Add a quirk to disable card clock during tuning

2018-08-28 Thread Aapo Vienamo
On Mon, 27 Aug 2018 14:25:44 +0300 Adrian Hunter wrote: > On 10/08/18 21:08, Aapo Vienamo wrote: > > Add a quirk to disable card clock when the tuning command is sent. > > > > This has to be done to prevent the SDHCI controller from hanging on > > Tegra210

Re: [PATCH v2 25/40] mmc: sdhci: Add a quirk to disable card clock during tuning

2018-08-28 Thread Aapo Vienamo
On Mon, 27 Aug 2018 14:25:44 +0300 Adrian Hunter wrote: > On 10/08/18 21:08, Aapo Vienamo wrote: > > Add a quirk to disable card clock when the tuning command is sent. > > > > This has to be done to prevent the SDHCI controller from hanging on > > Tegra210

Re: [PATCH v2 11/40] mmc: sdhci: Add a quirk to skip clearing the transfer mode register on tuning

2018-08-28 Thread Aapo Vienamo
On Mon, 27 Aug 2018 14:01:52 +0300 Adrian Hunter wrote: > On 10/08/18 21:08, Aapo Vienamo wrote: > > Add SDHCI_QUIRK2_TUNE_SKIP_XFERRMODE_REG_PROG to skip programming the > > SDHCI_TRANSFER_MODE in sdhci_set_transfer_mode() if tuning command is > > being sent. > > &

Re: [PATCH v2 11/40] mmc: sdhci: Add a quirk to skip clearing the transfer mode register on tuning

2018-08-28 Thread Aapo Vienamo
On Mon, 27 Aug 2018 14:01:52 +0300 Adrian Hunter wrote: > On 10/08/18 21:08, Aapo Vienamo wrote: > > Add SDHCI_QUIRK2_TUNE_SKIP_XFERRMODE_REG_PROG to skip programming the > > SDHCI_TRANSFER_MODE in sdhci_set_transfer_mode() if tuning command is > > being sent. > > &

Re: [PATCH v2 00/40] Tegra SDHCI add support for HS200 and UHS signaling

2018-08-27 Thread Aapo Vienamo
On Mon, 27 Aug 2018 17:50:53 +0200 Thierry Reding wrote: > On Mon, Aug 27, 2018 at 02:10:58PM +, Marcel Ziswiler wrote: > > On Fri, 2018-08-10 at 21:08 +0300, Aapo Vienamo wrote: > > > Hi all, > > > > > > This series implements support for faster

Re: [PATCH v2 00/40] Tegra SDHCI add support for HS200 and UHS signaling

2018-08-27 Thread Aapo Vienamo
On Mon, 27 Aug 2018 17:50:53 +0200 Thierry Reding wrote: > On Mon, Aug 27, 2018 at 02:10:58PM +, Marcel Ziswiler wrote: > > On Fri, 2018-08-10 at 21:08 +0300, Aapo Vienamo wrote: > > > Hi all, > > > > > > This series implements support for faster

[PATCH 2/2] mmc: tegra: Implement periodic pad calibration

2018-08-20 Thread Aapo Vienamo
Rerun the pad calibration procedure before sdhci_request() if the 100 ms recalibration interval has been exceeded. Signed-off-by: Aapo Vienamo --- drivers/mmc/host/sdhci-tegra.c | 22 ++ 1 file changed, 22 insertions(+) diff --git a/drivers/mmc/host/sdhci-tegra.c b/drivers

[PATCH 2/2] mmc: tegra: Implement periodic pad calibration

2018-08-20 Thread Aapo Vienamo
Rerun the pad calibration procedure before sdhci_request() if the 100 ms recalibration interval has been exceeded. Signed-off-by: Aapo Vienamo --- drivers/mmc/host/sdhci-tegra.c | 22 ++ 1 file changed, 22 insertions(+) diff --git a/drivers/mmc/host/sdhci-tegra.c b/drivers

[PATCH 1/2] mmc: sdhci: Export sdhci_request()

2018-08-20 Thread Aapo Vienamo
Allow SDHCI drivers to hook code before and after sdhci_request() by making it externally visible. Signed-off-by: Aapo Vienamo --- drivers/mmc/host/sdhci.c | 3 ++- drivers/mmc/host/sdhci.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/host/sdhci.c b/drivers

[PATCH 0/2] Tegra SDHCI rerun pad calibration periodically

2018-08-20 Thread Aapo Vienamo
interval has passed. This series depends on the "Tegra SDHCI add support for HS200 and UHS signaling" series. Aapo Vienamo (2): mmc: sdhci: Export sdhci_request() mmc: tegra: Implement periodic pad calibration drivers/mmc/host/sdhci-tegra.c | 22 ++ driver

[PATCH 1/2] mmc: sdhci: Export sdhci_request()

2018-08-20 Thread Aapo Vienamo
Allow SDHCI drivers to hook code before and after sdhci_request() by making it externally visible. Signed-off-by: Aapo Vienamo --- drivers/mmc/host/sdhci.c | 3 ++- drivers/mmc/host/sdhci.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/host/sdhci.c b/drivers

[PATCH 0/2] Tegra SDHCI rerun pad calibration periodically

2018-08-20 Thread Aapo Vienamo
interval has passed. This series depends on the "Tegra SDHCI add support for HS200 and UHS signaling" series. Aapo Vienamo (2): mmc: sdhci: Export sdhci_request() mmc: tegra: Implement periodic pad calibration drivers/mmc/host/sdhci-tegra.c | 22 ++ driver

[PATCH v2 0/8] Tegra SDHCI support HS400 on Tegra210 and Tegra186

2018-08-10 Thread Aapo Vienamo
_sdhci_hs400_enhanced_strobe() - Use val instead of reg in tegra_sdhci_hs400_enhanced_strobe() - Make commit message of "mmc: tegra: Implement HS400 delay line calibration" more detailed Aapo Vienamo (8): dt-bindings: mmc: Add DQS trim value to Tegra SDHCI mm

[PATCH v2 3/8] mmc: tegra: Implement HS400 enhanced strobe

2018-08-10 Thread Aapo Vienamo
Implement eMMC HS400 enhanced strobe. Enhanced strobe is an alternative mechanism to the HS400 tuning procedure. Signed-off-by: Aapo Vienamo --- drivers/mmc/host/sdhci-tegra.c | 23 +++ 1 file changed, 23 insertions(+) diff --git a/drivers/mmc/host/sdhci-tegra.c b/drivers

[PATCH v2 8/8] arm64: dts: tegra210: Enable HS400

2018-08-10 Thread Aapo Vienamo
Enable HS400 signaling on Tegra210 SDMMC4 controller. Signed-off-by: Aapo Vienamo --- arch/arm64/boot/dts/nvidia/tegra210.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/boot/dts/nvidia/tegra210.dtsi b/arch/arm64/boot/dts/nvidia/tegra210.dtsi index f8e5f09..8fe47d6 100644

[PATCH v2 0/8] Tegra SDHCI support HS400 on Tegra210 and Tegra186

2018-08-10 Thread Aapo Vienamo
_sdhci_hs400_enhanced_strobe() - Use val instead of reg in tegra_sdhci_hs400_enhanced_strobe() - Make commit message of "mmc: tegra: Implement HS400 delay line calibration" more detailed Aapo Vienamo (8): dt-bindings: mmc: Add DQS trim value to Tegra SDHCI mm

[PATCH v2 3/8] mmc: tegra: Implement HS400 enhanced strobe

2018-08-10 Thread Aapo Vienamo
Implement eMMC HS400 enhanced strobe. Enhanced strobe is an alternative mechanism to the HS400 tuning procedure. Signed-off-by: Aapo Vienamo --- drivers/mmc/host/sdhci-tegra.c | 23 +++ 1 file changed, 23 insertions(+) diff --git a/drivers/mmc/host/sdhci-tegra.c b/drivers

[PATCH v2 8/8] arm64: dts: tegra210: Enable HS400

2018-08-10 Thread Aapo Vienamo
Enable HS400 signaling on Tegra210 SDMMC4 controller. Signed-off-by: Aapo Vienamo --- arch/arm64/boot/dts/nvidia/tegra210.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/boot/dts/nvidia/tegra210.dtsi b/arch/arm64/boot/dts/nvidia/tegra210.dtsi index f8e5f09..8fe47d6 100644

[PATCH v2 6/8] arm64: dts: tegra210: Add SDMMC4 DQS trim value

2018-08-10 Thread Aapo Vienamo
Add the HS400 DQS trim value for Tegra210 SDMMC4. Signed-off-by: Aapo Vienamo --- arch/arm64/boot/dts/nvidia/tegra210.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/boot/dts/nvidia/tegra210.dtsi b/arch/arm64/boot/dts/nvidia/tegra210.dtsi index 14da98a..f8e5f09 100644

[PATCH v2 5/8] arm64: dts: tegra186: Add SDMMC4 DQS trim value

2018-08-10 Thread Aapo Vienamo
Add the HS400 DQS trim value for Tegra186 SDMMC4. Signed-off-by: Aapo Vienamo --- arch/arm64/boot/dts/nvidia/tegra186.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/boot/dts/nvidia/tegra186.dtsi b/arch/arm64/boot/dts/nvidia/tegra186.dtsi index 6e9ef26..9e07bc6 100644

  1   2   3   4   5   6   7   >