Skip to contentSkip to conversation

dt-bindings: tegra: pmc: Update aotag as an optional aperture

PATCH Applied Jon Hunter 4 participants 5 messages Nov 19, 2025 – Jan 16

Subsystems (2)
lore
Share & tools
lore

Jon Hunter

author maintainer
#0 lore raw

PATCH v2 1/2 dt-bindings: tegra: pmc: Update aotag as an optional aperture

Not all Tegra SoCs or all versions of a particular Tegra SoC may include the AOTAG aperture. This change makes "aotag" as an optional aperture for Tegra234 and Tegra264.

---
Changes since V1:
- Simplified reg-names handling of optional aotag range by upon Krzysztof's feedback.
- Dropped removal of reg modifications for tegra186 and tegra194.
- Updated reg minItems for tegra186.

 .../bindings/arm/tegra/nvidia,tegra186-pmc.yaml       | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)
Documentation/devicetree/bindings/arm/tegra/nvidia,tegra186-pmc.yaml +7 -4
index be70819020c5..dcd1c5376507 100644
@@ -19,15 +19,15 @@ properties:
       - nvidia,tegra264-pmc
 
   reg:
-    minItems: 4
+    minItems: 3
     maxItems: 5
 
   reg-names:
-    minItems: 4
+    minItems: 3
     items:
       - const: pmc
       - const: wake
-      - const: aotag
+      - enum: [ aotag, scratch, misc ]
       - enum: [ scratch, misc ]
       - const: misc
 
@@ -51,6 +51,7 @@ allOf:
     then:
       properties:
         reg:
+          minItems: 4
           maxItems: 4
         reg-names:
           maxItems: 4
@@ -73,7 +74,9 @@ allOf:
       properties:
         compatible:
           contains:
-            const: nvidia,tegra234-pmc
+            enum:
+              - nvidia,tegra234-pmc
+              - nvidia,tegra264-pmc
     then:
       properties:
         reg-names:
Signature · 1 line
2.43.0
author maintainer
#1 lore raw

PATCH v2 2/2 soc/tegra: pmc: don't fail if "aotag" is not present

From: Prathamesh Shete <[email protected]>

The "aotog" is an optional aperture, so if that aperture is not defined for a given device, then initialise the 'aotag' pointer to NULL instead of returning an error. Note that the PMC driver will not use 'aotag' pointer if initialised to NULL.

---
Changes since V2:
- None

 drivers/soc/tegra/pmc.c | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)
drivers/soc/tegra/pmc.c +10 -3
index 034a2a535a1e..d8c8894a8f38 100644
@@ -2897,9 +2897,16 @@ 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);
+		/* "aotag" is an optional aperture */
+		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;
+		}
 
 		/* "scratch" is an optional aperture */
 		res = platform_get_resource_byname(pdev, IORESOURCE_MEM,
Signature · 1 line
2.43.0
Reviewed-by Tested-by on v2 2/2
#2 lore raw

Re: [PATCH V2 2/2] soc/tegra: pmc: don't fail if "aotag" is not present

Hi Jon,

Quoted 11 lines · Jon Hunter

From: Prathamesh Shete <[email protected]>

The "aotog" is an optional aperture, so if that aperture is not defined for a given device, then initialise the 'aotag' pointer to NULL instead of returning an error. Note that the PMC driver will not use 'aotag' pointer if initialised to NULL.

Quoted 6 lines

---
Changes since V2:
- None

 drivers/soc/tegra/pmc.c | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

~Stan

Reviewed-by on v2 1/2
#3 lore raw
In reply to Jon Hunter
Quoted 8 lines · Jon Hunter

Not all Tegra SoCs or all versions of a particular Tegra SoC may include the AOTAG aperture. This change makes "aotag" as an optional aperture for Tegra234 and Tegra264.

---

Best regards,
Krzysztof

#4 lore raw

Re: (subset) [PATCH V2 1/2] dt-bindings: tegra: pmc: Update aotag as an optional aperture

In reply to Jon Hunter

From: Thierry Reding <[email protected]>

Quoted 5 lines · Jon Hunter

Not all Tegra SoCs or all versions of a particular Tegra SoC may include the AOTAG aperture. This change makes "aotag" as an optional aperture for Tegra234 and Tegra264.

Applied, thanks!

[1/2] dt-bindings: tegra: pmc: Update aotag as an optional aperture
(no commit info)

Best regards,

Signature · 1 line
Thierry Reding <[email protected]>