diff mbox

[v2,4/4] soc/tegra: pmc: apply MBIST work around fo Tegra210

Message ID 1510842542-16451-5-git-send-email-pdeschrijver@nvidia.com (mailing list archive)
State Changes Requested, archived
Headers show

Commit Message

Peter De Schrijver Nov. 16, 2017, 2:29 p.m. UTC
Apply the memory built-in self test work around when ungating certain
Tegra210 power domains.

Signed-off-by: Peter De Schrijver <pdeschrijver@nvidia.com>
---
 drivers/soc/tegra/pmc.c | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Jon Hunter Dec. 20, 2017, 10:06 a.m. UTC | #1
On 16/11/17 14:29, Peter De Schrijver wrote:
> Apply the memory built-in self test work around when ungating certain
> Tegra210 power domains.
> 
> Signed-off-by: Peter De Schrijver <pdeschrijver@nvidia.com>
> ---
>  drivers/soc/tegra/pmc.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/soc/tegra/pmc.c b/drivers/soc/tegra/pmc.c
> index 0453ff6..4c0582d 100644
> --- a/drivers/soc/tegra/pmc.c
> +++ b/drivers/soc/tegra/pmc.c
> @@ -142,6 +142,7 @@ struct tegra_pmc_soc {
>  
>  	bool has_tsense_reset;
>  	bool has_gpu_clamps;
> +	bool needs_mbist_war;
>  
>  	const struct tegra_io_pad_soc *io_pads;
>  	unsigned int num_io_pads;
> @@ -411,6 +412,9 @@ static int tegra_powergate_power_up(struct tegra_powergate *pg,
>  
>  	usleep_range(10, 20);
>  
> +	if (pg->pmc->soc->needs_mbist_war)
> +		tegra210_handle_mbist_war(pg->id);
> +
>  	if (disable_clocks)
>  		tegra_powergate_disable_clocks(pg);
>  
> @@ -1712,6 +1716,7 @@ static int tegra_pmc_resume(struct device *dev)
>  	.cpu_powergates = tegra210_cpu_powergates,
>  	.has_tsense_reset = true,
>  	.has_gpu_clamps = true,
> +	.needs_mbist_war = true,
>  	.num_io_pads = ARRAY_SIZE(tegra210_io_pads),
>  	.io_pads = tegra210_io_pads,
>  };

After applying this series, tegra210-smaug no longer boots (no output
from the console). Reverting this patch allows it to boot again. So
something here is not working ...

Cheers
Jon
Peter De Schrijver Dec. 21, 2017, 9:05 a.m. UTC | #2
On Wed, Dec 20, 2017 at 10:06:13AM +0000, Jon Hunter wrote:
> 
> On 16/11/17 14:29, Peter De Schrijver wrote:
> > Apply the memory built-in self test work around when ungating certain
> > Tegra210 power domains.
> > 
> > Signed-off-by: Peter De Schrijver <pdeschrijver@nvidia.com>
> > ---
> >  drivers/soc/tegra/pmc.c | 5 +++++
> >  1 file changed, 5 insertions(+)
> > 
> > diff --git a/drivers/soc/tegra/pmc.c b/drivers/soc/tegra/pmc.c
> > index 0453ff6..4c0582d 100644
> > --- a/drivers/soc/tegra/pmc.c
> > +++ b/drivers/soc/tegra/pmc.c
> > @@ -142,6 +142,7 @@ struct tegra_pmc_soc {
> >  
> >  	bool has_tsense_reset;
> >  	bool has_gpu_clamps;
> > +	bool needs_mbist_war;
> >  
> >  	const struct tegra_io_pad_soc *io_pads;
> >  	unsigned int num_io_pads;
> > @@ -411,6 +412,9 @@ static int tegra_powergate_power_up(struct tegra_powergate *pg,
> >  
> >  	usleep_range(10, 20);
> >  
> > +	if (pg->pmc->soc->needs_mbist_war)
> > +		tegra210_handle_mbist_war(pg->id);
> > +
> >  	if (disable_clocks)
> >  		tegra_powergate_disable_clocks(pg);
> >  
> > @@ -1712,6 +1716,7 @@ static int tegra_pmc_resume(struct device *dev)
> >  	.cpu_powergates = tegra210_cpu_powergates,
> >  	.has_tsense_reset = true,
> >  	.has_gpu_clamps = true,
> > +	.needs_mbist_war = true,
> >  	.num_io_pads = ARRAY_SIZE(tegra210_io_pads),
> >  	.io_pads = tegra210_io_pads,
> >  };
> 
> After applying this series, tegra210-smaug no longer boots (no output
> from the console). Reverting this patch allows it to boot again. So
> something here is not working ...
> 

Annoyingly I don't have smaug, only jetson TX1.. Did you try earlycon?

Peter.
--
To unsubscribe from this list: send the line "unsubscribe linux-clk" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Jon Hunter Dec. 21, 2017, 11:08 a.m. UTC | #3
On 21/12/17 09:05, Peter De Schrijver wrote:
> On Wed, Dec 20, 2017 at 10:06:13AM +0000, Jon Hunter wrote:
>>
>> On 16/11/17 14:29, Peter De Schrijver wrote:
>>> Apply the memory built-in self test work around when ungating certain
>>> Tegra210 power domains.
>>>
>>> Signed-off-by: Peter De Schrijver <pdeschrijver@nvidia.com>
>>> ---
>>>  drivers/soc/tegra/pmc.c | 5 +++++
>>>  1 file changed, 5 insertions(+)
>>>
>>> diff --git a/drivers/soc/tegra/pmc.c b/drivers/soc/tegra/pmc.c
>>> index 0453ff6..4c0582d 100644
>>> --- a/drivers/soc/tegra/pmc.c
>>> +++ b/drivers/soc/tegra/pmc.c
>>> @@ -142,6 +142,7 @@ struct tegra_pmc_soc {
>>>  
>>>  	bool has_tsense_reset;
>>>  	bool has_gpu_clamps;
>>> +	bool needs_mbist_war;
>>>  
>>>  	const struct tegra_io_pad_soc *io_pads;
>>>  	unsigned int num_io_pads;
>>> @@ -411,6 +412,9 @@ static int tegra_powergate_power_up(struct tegra_powergate *pg,
>>>  
>>>  	usleep_range(10, 20);
>>>  
>>> +	if (pg->pmc->soc->needs_mbist_war)
>>> +		tegra210_handle_mbist_war(pg->id);
>>> +
>>>  	if (disable_clocks)
>>>  		tegra_powergate_disable_clocks(pg);
>>>  
>>> @@ -1712,6 +1716,7 @@ static int tegra_pmc_resume(struct device *dev)
>>>  	.cpu_powergates = tegra210_cpu_powergates,
>>>  	.has_tsense_reset = true,
>>>  	.has_gpu_clamps = true,
>>> +	.needs_mbist_war = true,
>>>  	.num_io_pads = ARRAY_SIZE(tegra210_io_pads),
>>>  	.io_pads = tegra210_io_pads,
>>>  };
>>
>> After applying this series, tegra210-smaug no longer boots (no output
>> from the console). Reverting this patch allows it to boot again. So
>> something here is not working ...
>>
> 
> Annoyingly I don't have smaug, only jetson TX1.. Did you try earlycon?

I can take a look, but one difference between TX1 and Smaug is that for
TX1 if believe all power domains are enabled by default whereas for
Smaug they are not. There is a workaround in the pmc driver to turn on
the XUSB power domain if it is off and the xHCI driver is enabled (we
plan to remove this when we figure out how to properly manage the XUSB
powergates). So you could try manually disabling the XUSB power domains
on TX1 and booting.

Cheers
Jon
diff mbox

Patch

diff --git a/drivers/soc/tegra/pmc.c b/drivers/soc/tegra/pmc.c
index 0453ff6..4c0582d 100644
--- a/drivers/soc/tegra/pmc.c
+++ b/drivers/soc/tegra/pmc.c
@@ -142,6 +142,7 @@  struct tegra_pmc_soc {
 
 	bool has_tsense_reset;
 	bool has_gpu_clamps;
+	bool needs_mbist_war;
 
 	const struct tegra_io_pad_soc *io_pads;
 	unsigned int num_io_pads;
@@ -411,6 +412,9 @@  static int tegra_powergate_power_up(struct tegra_powergate *pg,
 
 	usleep_range(10, 20);
 
+	if (pg->pmc->soc->needs_mbist_war)
+		tegra210_handle_mbist_war(pg->id);
+
 	if (disable_clocks)
 		tegra_powergate_disable_clocks(pg);
 
@@ -1712,6 +1716,7 @@  static int tegra_pmc_resume(struct device *dev)
 	.cpu_powergates = tegra210_cpu_powergates,
 	.has_tsense_reset = true,
 	.has_gpu_clamps = true,
+	.needs_mbist_war = true,
 	.num_io_pads = ARRAY_SIZE(tegra210_io_pads),
 	.io_pads = tegra210_io_pads,
 };