drm/imagination: add support for j721e,j784s4,j722s,am62p
Subsystems (8)
cover drm/imagination: add support for j721e,j784s4,j722s,am62p
Hello all,
Some TI/IMG dts GPU nodes are not present upstream, while others are. This series adds support for missing devices upstream.
Including patches ([1][2]) from Michael Walle, that did not get picked up. That add support j722s and am62p.
In regards to the j721e patch:
The clock[3] and power[4] info was captured from docs listed below. While interrupt info was captured from [5], TI downstream binding in commit 6ae5ecfde2f2 ("arm64: dts: ti: k3-j721e-main: add gpu node").
In regards to the j784s4 patch:
The clock[6] and power[7] info was captured from docs listed below. While interrupt info was captured from [8], looking at "Interrupts (inputs)" and "GPU_BXS464_WRAP0_GPU_SS_0_OS_IRQ_OUT_0".
[1]: https://lore.kernel.org/all/[email protected]/
[2]: https://lore.kernel.org/all/[email protected]/
[3]: https://downloads.ti.com/tisci/esd/latest/5_soc_doc/j721e/clocks.html#clocks-for-gpu0-gpu-0-device
[4]: https://downloads.ti.com/tisci/esd/latest/5_soc_doc/j721e/devices.html
[5]: https://git.ti.com/cgit/ti-linux-kernel/ti-linux-kernel
[6]: https://downloads.ti.com/tisci/esd/latest/5_soc_doc/j784s4/clocks.html#clocks-for-j7aep-gpu-bxs464-wrap0-gpu-ss-0-device
[7]: https://downloads.ti.com/tisci/esd/latest/5_soc_doc/j784s4/devices.html
[8]: https://www.ti.com/lit/zip/spruj52
---
Antonios Christidis (3):
arm64: dts: ti: k3-j721e: Add GPU node
dt-bindings: gpu: img: Add J721e SoC specific compatible
arm64: dts: ti: k3-j784s4: Add GPU nodeMichael Walle (2):
arm64: dts: ti: add GPU node
clk: keystone: don't cache clock rate
.../devicetree/bindings/gpu/img,powervr-rogue.yaml | 7 ++++++- arch/arm64/boot/dts/ti/k3-am62p-j722s-common-main.dtsi | 11 +++++++++++ arch/arm64/boot/dts/ti/k3-j721e-main.dtsi | 14 ++++++++++++++ arch/arm64/boot/dts/ti/k3-j784s4-main.dtsi | 14 ++++++++++++++ drivers/clk/keystone/sci-clk.c | 8 ++++++++ 5 files changed, 53 insertions(+), 1 deletion(-)
---
base-commit: 3ef088b0c5772a6f75634e54aa34f5fc0a2c041c
change-id: 20260224-gpu_dts-ab32c568d756
Best regards,
Signature · 1 line
Antonios Christidis <[email protected]>
PATCH 1/5 arm64: dts: ti: k3-j721e: Add GPU node
Add the series 8XE GPU node for j721e device tree.
--- arch/arm64/boot/dts/ti/k3-j721e-main.dtsi | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
arch/arm64/boot/dts/ti/k3-j721e-main.dtsi +14 -0
@@ -2624,6 +2624,20 @@ icssg1_mdio: mdio@32400 { }; }; + gpu: gpu@4e20000000 { + compatible = "ti,j721e-gpu", "img,img-ge8430", "img,img-rogue"; + reg = <0x4e 0x20000000 0x00 0x80000>; + clocks = <&k3_clks 125 0>; + clock-names = "core"; + assigned-clocks = <&k3_clks 125 0>; + assigned-clock-rates = <750000000>; + interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>; + power-domains = <&k3_pds 125 TI_SCI_PD_EXCLUSIVE>, + <&k3_pds 126 TI_SCI_PD_EXCLUSIVE>; + power-domain-names = "a", "b"; + dma-coherent; + }; + main_mcan0: can@2701000 { compatible = "bosch,m_can"; reg = <0x00 0x02701000 0x00 0x200>,
Signature · 1 line
2.34.1
PATCH 2/5 dt-bindings: gpu: img: Add J721e SoC specific compatible
In reply to Antonios ChristidisAdd J721e SoC specific compatible.
--- Documentation/devicetree/bindings/gpu/img,powervr-rogue.yaml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/gpu/img,powervr-rogue.yaml +6 -1
@@ -44,7 +44,11 @@ properties: - ti,j721s2-gpu - const: img,img-bxs-4-64 - const: img,img-rogue - + - items: + - enum: + - ti,j721e-gpu + - const: img,img-ge8430 + - const: img,img-rogue # This legacy combination of compatible strings was introduced early on # before the more specific GPU identifiers were used. - items:
@@ -103,6 +107,7 @@ allOf: - ti,am62-gpu - ti,am62p-gpu - ti,j721s2-gpu + - ti,j721e-gpu then: properties: clocks:
Signature · 1 line
2.34.1
Re: [PATCH 2/5] dt-bindings: gpu: img: Add J721e SoC specific compatible
Quoted 12 lines · Antonios Christidis
Add J721e SoC specific compatible.
Signed-off-by Antonios Christidis <[email protected]>--- Documentation/devicetree/bindings/gpu/img,powervr-rogue.yaml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)Documentation/devicetree/bindings/gpu/img,powervr-rogue.yaml +0
-0
Documentation/devicetree/bindings/gpu/img,powervr-rogue.yaml properties: · line 51
Quoted 9 lines
Documentation/devicetree/bindings/gpu/img,powervr-rogue.yaml +5
-1@@ -44,7 +44,11 @@ properties: - ti,j721s2-gpu - const: img,img-bxs-4-64 - const: img,img-rogue - + - items: + - enum: + - ti,j721e-gpu + - const: img,img-ge8430 + - const: img,img-rogue
Leave the newline at the end here before the comment.
Also, binding updates need to go before you make use of them. This patch needs to go first in the series.
Andrew
Quoted 12 lines
Documentation/devicetree/bindings/gpu/img,powervr-rogue.yaml +1
-0# This legacy combination of compatible strings was introduced early on # before the more specific GPU identifiers were used. - items:@@ -103,6 +107,7 @@ allOf: - ti,am62-gpu - ti,am62p-gpu - ti,j721s2-gpu + - ti,j721e-gpu then: properties: clocks:
Re: [PATCH 2/5] dt-bindings: gpu: img: Add J721e SoC specific compatible
In reply to Antonios ChristidisQuoted 25 lines · Antonios Christidis
Add J721e SoC specific compatible.
Signed-off-by Antonios Christidis <[email protected]>--- Documentation/devicetree/bindings/gpu/img,powervr-rogue.yaml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)Documentation/devicetree/bindings/gpu/img,powervr-rogue.yaml +5
-1@@ -44,7 +44,11 @@ properties: - ti,j721s2-gpu - const: img,img-bxs-4-64 - const: img,img-rogue - + - items: + - enum: + - ti,j721e-gpu + - const: img,img-ge8430 + - const: img,img-rogue # This legacy combination of compatible strings was introduced early on # before the more specific GPU identifiers were used. - items:
Documentation/devicetree/bindings/gpu/img,powervr-rogue.yaml allOf: · line 110
Quoted 4 lines
Documentation/devicetree/bindings/gpu/img,powervr-rogue.yaml +1
-0@@ -103,6 +107,7 @@ allOf: - ti,am62-gpu - ti,am62p-gpu - ti,j721s2-gpu + - ti,j721e-gpu
What about img,img-ge8430? Why this one does not have constraints?
What about all other constraints?
Documentation/devicetree/bindings/gpu/img,powervr-rogue.yaml allOf: · line 113
Quoted 3 lines
Documentation/devicetree/bindings/gpu/img,powervr-rogue.yaml +0
-0then: properties: clocks:
Best regards,
Krzysztof
PATCH 3/5 arm64: dts: ti: k3-j784s4: Add GPU node
In reply to Antonios ChristidisAdd the Series BXS GPU node for j784s4 device tree.
--- arch/arm64/boot/dts/ti/k3-j784s4-main.dtsi | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
arch/arm64/boot/dts/ti/k3-j784s4-main.dtsi +14 -0
@@ -137,6 +137,20 @@ serdes2: serdes@5020000 { }; }; + gpu: gpu@4e20000000 { + compatible = "ti,j721s2-gpu", "img,img-bxs-4-64", "img,img-rogue"; + reg = <0x4e 0x20000000 0x00 0x80000>; + clocks = <&k3_clks 181 1>; + clock-names = "core"; + assigned-clocks = <&k3_clks 181 1>; + assigned-clock-rates = <800000000>; + interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>; + power-domains = <&k3_pds 181 TI_SCI_PD_EXCLUSIVE>, + <&k3_pds 182 TI_SCI_PD_EXCLUSIVE>; + power-domain-names = "a", "b"; + dma-coherent; + }; + c71_3: dsp@67800000 { compatible = "ti,j721s2-c71-dsp"; reg = <0x00 0x67800000 0x00 0x00080000>,
Signature · 1 line
2.34.1
PATCH 4/5 arm64: dts: ti: add GPU node
In reply to Antonios ChristidisFrom: Michael Walle <[email protected]>
The J722S features a BXS-4 GPU. Add the node for it.
--- arch/arm64/boot/dts/ti/k3-am62p-j722s-common-main.dtsi | 11 +++++++++++ 1 file changed, 11 insertions(+)
arch/arm64/boot/dts/ti/k3-am62p-j722s-common-main.dtsi +11 -0
@@ -1110,6 +1110,17 @@ dphy0: phy@30110000 { status = "disabled"; }; + gpu: gpu@fd80000 { + compatible = "ti,am62p-gpu", "img,img-bxs-4-64", "img,img-rogue"; + reg = <0x00 0x0fd80000 0x00 0x80000>; + clocks = <&k3_clks 237 3>; + clock-names = "core"; + interrupts = <GIC_SPI 241 IRQ_TYPE_LEVEL_HIGH>; + power-domains = <&k3_pds 237 TI_SCI_PD_EXCLUSIVE>, + <&k3_pds 242 TI_SCI_PD_EXCLUSIVE>; + power-domain-names = "a", "b"; + }; + vpu: video-codec@30210000 { compatible = "ti,j721s2-wave521c", "cnm,wave521c"; reg = <0x00 0x30210000 0x00 0x10000>;
Signature · 1 line
2.34.1
PATCH 5/5 clk: keystone: don't cache clock rate
In reply to Antonios ChristidisFrom: Michael Walle <[email protected]>
The TISCI firmware will return 0 if the clock or consumer is not enabled although there is a stored value in the firmware. IOW a call to set rate will work but at get rate will always return 0 if the clock is disabled.
The clk framework will try to cache the clock rate when it's requested by a consumer. If the clock or consumer is not enabled at that point, the cached value is 0, which is wrong. Thus, disable the cache altogether.
--- drivers/clk/keystone/sci-clk.c | 8 ++++++++ 1 file changed, 8 insertions(+)
drivers/clk/keystone/sci-clk.c +8 -0
@@ -333,6 +333,14 @@ static int _sci_clk_build(struct sci_clk_provider *provider, init.ops = &sci_clk_ops; init.num_parents = sci_clk->num_parents; + +/* +* A clock rate query to the SCI firmware will return 0 if either the +* clock itself is disabled or the attached device/consumer is disabled. +* This makes it inherently unsuitable for the caching of the clk +* framework. +*/ + init.flags =CLK_GET_RATE_NOCACHE ; sci_clk->hw.init = &init; ret =devm_clk_hw_register (provider->dev, &sci_clk->hw);
Signature · 1 line
2.34.1
Nishanth Menon
maintainerQuoted 8 lines · Antonios Christidis
---
Antonios Christidis (3):arm64: dts: ti: k3-j721e: Add GPU node dt-bindings: gpu: img: Add J721e SoC specific compatible arm64: dts: ti: k3-j784s4: Add GPU nodeMichael Walle (2):
arm64: dts: ti: add GPU node
Now that you are picking this up, please Fix the $subject.
Quoted 1 line
clk: keystone: don't cache clock rate
Bunch of interleaved "kind of related" patches in a single series. please do not do this.
j784s4 can go in on it's own.
j722s/am62p needs to wait for clk-cache patch to go in, but the clk-cache patch probably needs to be submitted individually to linux-clk mailing list for Stephen to pick up.
Please provide reference in the patch diffstat as to where the previous version of the patch is.
Finally: j721e - please get the binding accepted through drm mailing list, then we can see about the dts.
Quoted 15 lines
.../devicetree/bindings/gpu/img,powervr-rogue.yaml | 7 ++++++- arch/arm64/boot/dts/ti/k3-am62p-j722s-common-main.dtsi | 11 +++++++++++ arch/arm64/boot/dts/ti/k3-j721e-main.dtsi | 14 ++++++++++++++ arch/arm64/boot/dts/ti/k3-j784s4-main.dtsi | 14 ++++++++++++++ drivers/clk/keystone/sci-clk.c | 8 ++++++++ 5 files changed, 53 insertions(+), 1 deletion(-)---
base-commit:3ef088b0c5772a6f75634e54aa34f5fc0a2c041c
change-id: 20260224-gpu_dts-ab32c568d756Best regards,
Signature · 1 line
Antonios Christidis <[email protected]>
Signature · 4 lines
Regards, Nishanth Menon Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D https://ti.com/opensource
Alessio Belle
maintainerHi,
Quoted 13 lines · Nishanth Menon
Quoted 8 lines · Antonios Christidis
---
Antonios Christidis (3):arm64: dts: ti: k3-j721e: Add GPU node dt-bindings: gpu: img: Add J721e SoC specific compatible arm64: dts: ti: k3-j784s4: Add GPU nodeMichael Walle (2):
arm64: dts: ti: add GPU nodeNow that you are picking this up, please Fix the $subject.
Quoted 1 line
clk: keystone: don't cache clock rate
Quoted 8 lines
Bunch of interleaved "kind of related" patches in a single series. please do not do this.
j784s4 can go in on it's own.
j722s/am62p needs to wait for clk-cache patch to go in, but the clk-cache patch probably needs to be submitted individually to linux-clk mailing list for Stephen to pick up.
The clock cache patch is in 7.2 now (a80b32a140c8).
Is there anything else blocking the other patch for j722s/am62p?
Thanks,
Alessio
Quoted 24 lines
Please provide reference in the patch diffstat as to where the previous version of the patch is.
Finally: j721e - please get the binding accepted through drm mailing list, then we can see about the dts.
Quoted 15 lines
.../devicetree/bindings/gpu/img,powervr-rogue.yaml | 7 ++++++- arch/arm64/boot/dts/ti/k3-am62p-j722s-common-main.dtsi | 11 +++++++++++ arch/arm64/boot/dts/ti/k3-j721e-main.dtsi | 14 ++++++++++++++ arch/arm64/boot/dts/ti/k3-j784s4-main.dtsi | 14 ++++++++++++++ drivers/clk/keystone/sci-clk.c | 8 ++++++++ 5 files changed, 53 insertions(+), 1 deletion(-)---
base-commit:3ef088b0c5772a6f75634e54aa34f5fc0a2c041c
change-id: 20260224-gpu_dts-ab32c568d756Best regards,
Signature · 1 line
Antonios Christidis <[email protected]>
Nishanth Menon
maintainerQuoted 5 lines · Alessio Belle
The clock cache patch is in 7.2 now (
a80b32a140c8).Is there anything else blocking the other patch for j722s/am62p?
Do check linux-next.
https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux.git/log/
Signature · 4 lines
Regards, Nishanth Menon Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D https://ti.com/opensource