[PATCH 07/11] soc/tegra: pmc: Add Tegra264 support

Thierry Reding thierry.reding at gmail.com
Wed May 7 07:32:43 PDT 2025


On Wed, May 07, 2025 at 12:03:39PM +0100, Jon Hunter wrote:
> 
> On 06/05/2025 14:31, Thierry Reding wrote:
> > From: Thierry Reding <treding at nvidia.com>
> > 
> > The PMC block on Tegra264 has undergone a few small changes since it's
> > Tegra234 predecessor. Match on the new compatible string to select the
> > updated SoC-specific data.
> > 
> > Signed-off-by: Thierry Reding <treding at nvidia.com>
> > ---
> >   drivers/soc/tegra/pmc.c | 132 +++++++++++++++++++++++++++++++++++++++-
> >   1 file changed, 129 insertions(+), 3 deletions(-)
> > 
> > diff --git a/drivers/soc/tegra/pmc.c b/drivers/soc/tegra/pmc.c
> > index 51b9d852bb6a..6f1ea5b6b9db 100644
> > --- a/drivers/soc/tegra/pmc.c
> > +++ b/drivers/soc/tegra/pmc.c
> > @@ -2892,9 +2892,14 @@ static int tegra_pmc_probe(struct platform_device *pdev)
> >   		if (IS_ERR(pmc->wake))
> >   			return PTR_ERR(pmc->wake);
> > -		pmc->aotag = devm_platform_ioremap_resource_byname(pdev, "aotag");
> > -		if (IS_ERR(pmc->aotag))
> > -			return PTR_ERR(pmc->aotag);
> > +		res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "aotag");
> > +		if (res) {
> > +			pmc->aotag = devm_ioremap_resource(&pdev->dev, res);
> > +			if (IS_ERR(pmc->aotag))
> > +				return PTR_ERR(pmc->aotag);
> > +		} else {
> > +			pmc->aotag = NULL;
> > +		}
> 
> This part make aotag optional, if I understand this correctly. This is not
> mentioned above and probably should be. Also, I believe that currently
> dt-binding has this as required and so we should update the dt-binding doc
> to make this optional too.

Good catch. I actually noticed earlier, as I was going over the next set
of patches once more, that there's actually an AOTAG region in the PMC's
address space, so I'm leaning towards dropping the above hunk and leave
the DT bindings as they are.

When it comes to these AOTAG registers, it's a bit difficult to tell
because we don't ever use them after mapping them, even on older Tegra
generations. Keeping it for now should be fine, and we can subsequently
drop them (and the driver could always just continue ignoring them) if
there's a good reason.

Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20250507/533de388/attachment.sig>


More information about the linux-arm-kernel mailing list