arm64: tegra: fix DT definitions for GM20B GPU
Subsystems (4)
v2 cover arm64: tegra: fix DT definitions for GM20B GPU
Small series that fixes/completes DT bindings for Tegra GPUs and add two missing entries required for the Tegra210 GPU to operate properly.
Changes since v1:
- Renamed "pllg_ref" clock to "ref" in DT bindings
Alexandre Courbot (5):
dt-bindings: gk20a: Fix typo in compatible name
dt-bindings: gk20a: Document iommus property
dt-bindings: Add documentation for GM20B GPU
arm64: tegra210: Add reference clock to GM20B
arm64: tegra210: Add IOMMU node to GM20B
.../devicetree/bindings/gpu/nvidia,gk20a.txt | 35 +++++++++++++++++++--- arch/arm64/boot/dts/nvidia/tegra210.dtsi | 8 +++-- 2 files changed, 37 insertions(+), 6 deletions(-)
Signature · 1 line
2.7.2
PATCH v2 1/5 dt-bindings: gk20a: Fix typo in compatible name
The correct compatible name is "nvidia,gk20a".
--- Documentation/devicetree/bindings/gpu/nvidia,gk20a.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/gpu/nvidia,gk20a.txt +2 -2
@@ -1,9 +1,9 @@ NVIDIA GK20A Graphics Processing Unit Required properties: -- compatible: "nvidia,<chip>-<gpu>" +- compatible: "nvidia,<gpu>" Currently recognized values: - - nvidia,tegra124-gk20a + - nvidia,gk20a - reg: Physical base address and length of the controller's registers. Must contain two entries: - first entry for bar0
Signature · 1 line
2.7.2
Re: [PATCH v2 1/5] dt-bindings: gk20a: Fix typo in compatible name
Quoted 6 lines · Alexandre Courbot
The correct compatible name is "nvidia,gk20a".
Signed-off-by Alexandre Courbot <[email protected]>--- Documentation/devicetree/bindings/gpu/nvidia,gk20a.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
This may be what is used, but having the SoC name would be preferred assuming gk20a is in multiple SoCs.
Rob
Re: [PATCH v2 1/5] dt-bindings: gk20a: Fix typo in compatible name
Quoted 8 lines · Rob Herring
Quoted 6 lines · Alexandre Courbot
The correct compatible name is "nvidia,gk20a".
Signed-off-by Alexandre Courbot <[email protected]>--- Documentation/devicetree/bindings/gpu/nvidia,gk20a.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Quoted 4 lines
Acked-by Rob Herring <[email protected]>This may be what is used, but having the SoC name would be preferred assuming gk20a is in multiple SoCs.
gk20a is exclusive to t124 (and so is gm20b to t210), so there can be no confusion here. This is why we eventually went for the shorter compatible string (and forgot to update the DT documentation).
PATCH v2 2/5 dt-bindings: gk20a: Document iommus property
In reply to Alexandre CourbotGK20A can optionally make use of an IOMMU.
--- Documentation/devicetree/bindings/gpu/nvidia,gk20a.txt | 4 ++++ 1 file changed, 4 insertions(+)
Documentation/devicetree/bindings/gpu/nvidia,gk20a.txt +4 -0
@@ -24,6 +24,9 @@ Required properties: - reset-names: Must include the following entries: - gpu +Optional properties: +- iommus: A reference to the IOMMU. See ../iommu/iommu.txt for details. + Example: gpu at 0,57000000 {
@@ -39,5 +42,6 @@ Example: clock-names = "gpu", "pwr"; resets = <&tegra_car 184>; reset-names = "gpu"; + iommus = <&mc TEGRA_SWGROUP_GPU>; status = "disabled"; };
Signature · 1 line
2.7.2
Re: [PATCH v2 2/5] dt-bindings: gk20a: Document iommus property
Quoted 6 lines · Alexandre Courbot
GK20A can optionally make use of an IOMMU.
Signed-off-by Alexandre Courbot <[email protected]>--- Documentation/devicetree/bindings/gpu/nvidia,gk20a.txt | 4 ++++ 1 file changed, 4 insertions(+)
PATCH v2 3/5 dt-bindings: Add documentation for GM20B GPU
In reply to Alexandre CourbotGM20B's definition is mostly similar to GK20A's, but requires an additional clock.
--- .../devicetree/bindings/gpu/nvidia,gk20a.txt | 27 ++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/gpu/nvidia,gk20a.txt +25 -2
@@ -1,9 +1,10 @@ -NVIDIA GK20A Graphics Processing Unit +NVIDIA Tegra Graphics Processing Units Required properties: - compatible: "nvidia,<gpu>" Currently recognized values: - nvidia,gk20a + - nvidia,gm20b - reg: Physical base address and length of the controller's registers. Must contain two entries: - first entry for bar0
@@ -19,6 +20,9 @@ Required properties: - clock-names: Must include the following entries: - gpu - pwr +If the compatible string is "nvidia,gm20b", then the following clock +is also required: + - ref - resets: Must contain an entry for each entry in reset-names. See ../reset/reset.txt for details. - reset-names: Must include the following entries:
@@ -27,7 +31,7 @@ Required properties: Optional properties: - iommus: A reference to the IOMMU. See ../iommu/iommu.txt for details. -Example: +Example for GK20A: gpu at 0,57000000 { compatible = "nvidia,gk20a";
@@ -45,3 +49,22 @@ Example: iommus = <&mc TEGRA_SWGROUP_GPU>; status = "disabled"; }; + +Example for GM20B: + + gpu at 0,57000000 { + compatible = "nvidia,gm20b"; + reg = <0x0 0x57000000 0x0 0x01000000>, + <0x0 0x58000000 0x0 0x01000000>; + interrupts = <GIC_SPI 157 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 158 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "stall", "nonstall"; + clocks = <&tegra_car TEGRA210_CLK_GPU>, + <&tegra_car TEGRA210_CLK_PLL_P_OUT5>, + <&tegra_car TEGRA210_CLK_PLL_G_REF>; + clock-names = "gpu", "pwr", "ref"; + resets = <&tegra_car 184>; + reset-names = "gpu"; + iommus = <&mc TEGRA_SWGROUP_GPU>; + status = "disabled"; + };
Signature · 1 line
2.7.2
Re: [PATCH v2 3/5] dt-bindings: Add documentation for GM20B GPU
Quoted 7 lines · Alexandre Courbot
GM20B's definition is mostly similar to GK20A's, but requires an additional clock.
Signed-off-by Alexandre Courbot <[email protected]>--- .../devicetree/bindings/gpu/nvidia,gk20a.txt | 27 ++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-)
One nit below.
Quoted 37 lines
Documentation/devicetree/bindings/gpu/nvidia,gk20a.txt +6
-2@@ -1,9 +1,10 @@ -NVIDIA GK20A Graphics Processing Unit +NVIDIA Tegra Graphics Processing Units Required properties: - compatible: "nvidia,<gpu>" Currently recognized values: - nvidia,gk20a + - nvidia,gm20b - reg: Physical base address and length of the controller's registers. Must contain two entries: - first entry for bar0@@ -19,6 +20,9 @@ Required properties: - clock-names: Must include the following entries: - gpu - pwr +If the compatible string is "nvidia,gm20b", then the following clock +is also required: + - ref - resets: Must contain an entry for each entry in reset-names. See ../reset/reset.txt for details. - reset-names: Must include the following entries:@@ -27,7 +31,7 @@ Required properties: Optional properties: - iommus: A reference to the IOMMU. See ../iommu/iommu.txt for details. -Example: +Example for GK20A: gpu at 0,57000000 { compatible = "nvidia,gk20a";
Documentation/devicetree/bindings/gpu/nvidia,gk20a.txt Example: · line 55
Quoted 7 lines
Documentation/devicetree/bindings/gpu/nvidia,gk20a.txt +4
-0@@ -45,3 +49,22 @@ Example: iommus = <&mc TEGRA_SWGROUP_GPU>; status = "disabled"; }; + +Example for GM20B: + + gpu at 0,57000000 {
Drop the comma and leading zero.
Quoted 22 lines
Documentation/devicetree/bindings/gpu/nvidia,gk20a.txt +15
-0+ compatible = "nvidia,gm20b"; + reg = <0x0 0x57000000 0x0 0x01000000>, + <0x0 0x58000000 0x0 0x01000000>; + interrupts = <GIC_SPI 157 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 158 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "stall", "nonstall"; + clocks = <&tegra_car TEGRA210_CLK_GPU>, + <&tegra_car TEGRA210_CLK_PLL_P_OUT5>, + <&tegra_car TEGRA210_CLK_PLL_G_REF>; + clock-names = "gpu", "pwr", "ref"; + resets = <&tegra_car 184>; + reset-names = "gpu"; + iommus = <&mc TEGRA_SWGROUP_GPU>; + status = "disabled"; + };Signature · 6 lines
2.7.2 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo at vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v2 3/5] dt-bindings: Add documentation for GM20B GPU
Quoted 47 lines · Rob Herring
Quoted 7 lines · Alexandre Courbot
GM20B's definition is mostly similar to GK20A's, but requires an additional clock.
Signed-off-by Alexandre Courbot <[email protected]>--- .../devicetree/bindings/gpu/nvidia,gk20a.txt | 27 ++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-)Acked-by Rob Herring <[email protected]>One nit below.
Quoted 34 lines
Documentation/devicetree/bindings/gpu/nvidia,gk20a.txt +6
-2@@ -1,9 +1,10 @@ -NVIDIA GK20A Graphics Processing Unit +NVIDIA Tegra Graphics Processing Units Required properties: - compatible: "nvidia,<gpu>" Currently recognized values: - nvidia,gk20a + - nvidia,gm20b - reg: Physical base address and length of the controller's registers. Must contain two entries: - first entry for bar0@@ -19,6 +20,9 @@ Required properties: - clock-names: Must include the following entries: - gpu - pwr +If the compatible string is "nvidia,gm20b", then the following clock +is also required: + - ref - resets: Must contain an entry for each entry in reset-names. See ../reset/reset.txt for details. - reset-names: Must include the following entries:@@ -27,7 +31,7 @@ Required properties: Optional properties: - iommus: A reference to the IOMMU. See ../iommu/iommu.txt for details. -Example: +Example for GK20A:
Quoted 12 lines
Documentation/devicetree/bindings/gpu/nvidia,gk20a.txt Example: · line 55
Quoted 10 lines
Documentation/devicetree/bindings/gpu/nvidia,gk20a.txt +4
-0gpu at 0,57000000 { compatible = "nvidia,gk20a";@@ -45,3 +49,22 @@ Example: iommus = <&mc TEGRA_SWGROUP_GPU>; status = "disabled"; }; + +Example for GM20B: + + gpu at 0,57000000 {Drop the comma and leading zero.
Even though this is how it appears in the actual DT?
Rob Herring
maintainerRe: [PATCH v2 3/5] dt-bindings: Add documentation for GM20B GPU
Quoted 4 lines · Alexandre Courbot
Quoted 3 lines · Rob Herring
Quoted 2 lines · Alexandre Courbot
GM20B's definition is mostly similar to GK20A's, but requires an additional clock.
[...]
Quoted 13 lines
Quoted 4 lines
Quoted 4 lines
gpu at 0,57000000 { compatible = "nvidia,gk20a";Documentation/devicetree/bindings/gpu/nvidia,gk20a.txt +0
-0@@ -45,3 +49,22 @@ Example: iommus = <&mc TEGRA_SWGROUP_GPU>;Quoted 8 lines
Documentation/devicetree/bindings/gpu/nvidia,gk20a.txt Example: · line 55
Quoted 6 lines
Documentation/devicetree/bindings/gpu/nvidia,gk20a.txt +4
-0status = "disabled"; }; + +Example for GM20B: + + gpu at 0,57000000 {Drop the comma and leading zero.
Quoted 1 line
Even though this is how it appears in the actual DT?
Yes, those will need to get fixed, too.
Rob
Re: [PATCH v2 3/5] dt-bindings: Add documentation for GM20B GPU
Quoted 21 lines · Rob Herring
Quoted 4 lines · Alexandre Courbot
Quoted 3 lines · Rob Herring
Quoted 2 lines · Alexandre Courbot
GM20B's definition is mostly similar to GK20A's, but requires an additional clock.
[...]
Quoted 13 lines
Quoted 12 lines
Documentation/devicetree/bindings/gpu/nvidia,gk20a.txt Example: · line 55
Quoted 10 lines
gpu at 0,57000000 { compatible = "nvidia,gk20a";Documentation/devicetree/bindings/gpu/nvidia,gk20a.txt +4
-0@@ -45,3 +49,22 @@ Example: iommus = <&mc TEGRA_SWGROUP_GPU>; status = "disabled"; }; + +Example for GM20B: + + gpu at 0,57000000 {Drop the comma and leading zero.
Quoted 3 lines
Quoted 1 line
Even though this is how it appears in the actual DT?
Yes, those will need to get fixed, too.
Sorry, I just want to confirm that I understand why this needs to be fixed. The parent node has #address-cells = <2>, and the practice of specifying two cells in the node name is consistent with what I see in
http://www.devicetree.org/Device_Tree_Usage.
However in the device tree usage example one can interpret the two cells as being two different components of the address, whereas in our case we are using two cells because the address is 64-bit - hence we should specify it in the name as a single entity. Is this correct?
Thanks,
Alex.
Rob Herring
maintainerRe: [PATCH v2 3/5] dt-bindings: Add documentation for GM20B GPU
Quoted 41 lines · Alexandre Courbot
Quoted 29 lines · Rob Herring
Quoted 7 lines · Alexandre Courbot
Quoted 5 lines · Rob Herring
Quoted 3 lines · Alexandre Courbot
GM20B's definition is mostly similar to GK20A's, but requires an additional clock.
[...]
Quoted 15 lines
Quoted 13 lines
Documentation/devicetree/bindings/gpu/nvidia,gk20a.txt Example: · line 55
Quoted 10 lines
gpu at 0,57000000 { compatible = "nvidia,gk20a";Documentation/devicetree/bindings/gpu/nvidia,gk20a.txt +4
-0@@ -45,3 +49,22 @@ Example: iommus = <&mc TEGRA_SWGROUP_GPU>; status = "disabled"; }; + +Example for GM20B: + + gpu at 0,57000000 {Drop the comma and leading zero.
Quoted 4 lines
Quoted 1 line
Even though this is how it appears in the actual DT?
Yes, those will need to get fixed, too.
Sorry, I just want to confirm that I understand why this needs to be fixed. The parent node has #address-cells = <2>, and the practice of specifying two cells in the node name is consistent with what I see in
http://www.devicetree.org/Device_Tree_Usage.
Quoted 4 lines
However in the device tree usage example one can interpret the two cells as being two different components of the address, whereas in our case we are using two cells because the address is 64-bit - hence we should specify it in the name as a single entity. Is this correct?
Exactly, commas are for separating distinct fields like chip select and offset in the wiki example. A 64-bit address is a single field.
The other reason to fix it is dtc is going to start warning for this.
Rob
PATCH v2 4/5 arm64: tegra210: Add reference clock to GM20B
In reply to Alexandre CourbotThis clock is required for the GPU to operate.
--- arch/arm64/boot/dts/nvidia/tegra210.dtsi | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/nvidia/tegra210.dtsi +3 -2
@@ -309,8 +309,9 @@ <GIC_SPI 158 IRQ_TYPE_LEVEL_HIGH>; interrupt-names = "stall", "nonstall"; clocks = <&tegra_car TEGRA210_CLK_GPU>, - <&tegra_car TEGRA210_CLK_PLL_P_OUT5>; - clock-names = "gpu", "pwr"; + <&tegra_car TEGRA210_CLK_PLL_P_OUT5>, + <&tegra_car TEGRA210_CLK_PLL_G_REF>; + clock-names = "gpu", "pwr", "ref"; resets = <&tegra_car 184>; reset-names = "gpu"; status = "disabled";
Signature · 1 line
2.7.2
PATCH v2 5/5 arm64: tegra210: Add IOMMU node to GM20B
In reply to Alexandre CourbotNouveau can take advantage of this declaration to remove the need for contiguous memory.
--- arch/arm64/boot/dts/nvidia/tegra210.dtsi | 3 +++ 1 file changed, 3 insertions(+)
arch/arm64/boot/dts/nvidia/tegra210.dtsi +3 -0
@@ -314,6 +314,9 @@ clock-names = "gpu", "pwr", "ref"; resets = <&tegra_car 184>; reset-names = "gpu"; + + iommus = <&mc TEGRA_SWGROUP_GPU>; + status = "disabled"; };
Signature · 1 line
2.7.2