2020-02-03 22:35:27

by Justin Swartz

[permalink] [raw]
Subject: [PATCH v4 0/3] Add rga to rk322x device tree

This patchset aims to enable use of Rockchip's RGA, a 2D raster
graphic acceleration unit, on rk322x based devices.

Changes in v4:
- Add a compatible value entry for the rk3228 to the rockchip-rga
device tree binding documentation.

Changes in v3:
- Relocate rga node to the correct position in rk322x.dtsi, as
indicated by Johan Jonker.

Changes in v2:
- Remove unnecessary "rockchip,rk3228-rga" device tree compatibility
string patch, as advised by Ezequiel Garcia.

- Use both "rockchip,rk3228-rga" and "rockchip,rk3288-rga" in the
rga node's compatibility property, as suggested by Heiko Stuebner.

Justin Swartz (3):
[media] dt-bindings: Add binding for rk3228 rga
ARM: dts: rockchip: add rga node for rk322x
ARM: dts: rockchip: enable rga for rk3229-xms6

Documentation/devicetree/bindings/media/rockchip-rga.txt | 5 +++--
arch/arm/boot/dts/rk3229-xms6.dts | 4 ++++
arch/arm/boot/dts/rk322x.dtsi | 11 +++++++++++
3 files changed, 18 insertions(+), 2 deletions(-)

--
2.11.0


2020-02-03 22:44:54

by Justin Swartz

[permalink] [raw]
Subject: [PATCH v4 3/3] ARM: dts: rockchip: enable rga for rk3229-xms6

Enable RGA for Mecer Xtreme Mini S6.

Signed-off-by: Justin Swartz <[email protected]>
---
arch/arm/boot/dts/rk3229-xms6.dts | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/arch/arm/boot/dts/rk3229-xms6.dts b/arch/arm/boot/dts/rk3229-xms6.dts
index 679fc2b00..894f64a4a 100644
--- a/arch/arm/boot/dts/rk3229-xms6.dts
+++ b/arch/arm/boot/dts/rk3229-xms6.dts
@@ -202,6 +202,10 @@
status = "okay";
};

+&rga {
+ status = "okay";
+};
+
&sdmmc {
cap-mmc-highspeed;
disable-wp;
--
2.11.0

2020-02-03 22:44:54

by Justin Swartz

[permalink] [raw]
Subject: [PATCH v4 1/3] [media] dt-bindings: Add binding for rk3228 rga

Indicate that the rk3228 rga is compatible with that of the rk3288.

But if any rk3228-specific quirks are identified in future that
require handling logic that differs from what is provided for the
rk3288, then allow for the compatibility string "rockchip,rk3228-rga"
to be matched instead of "rockchip,rk3288-rga".

Signed-off-by: Justin Swartz <[email protected]>
---
Documentation/devicetree/bindings/media/rockchip-rga.txt | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/media/rockchip-rga.txt b/Documentation/devicetree/bindings/media/rockchip-rga.txt
index fd5276abf..c53a8e513 100644
--- a/Documentation/devicetree/bindings/media/rockchip-rga.txt
+++ b/Documentation/devicetree/bindings/media/rockchip-rga.txt
@@ -6,8 +6,9 @@ BitBLT, alpha blending and image blur/sharpness.

Required properties:
- compatible: value should be one of the following
- "rockchip,rk3288-rga";
- "rockchip,rk3399-rga";
+ "rockchip,rk3228-rga", "rockchip,rk3288-rga": for Rockchip RK3228
+ "rockchip,rk3288-rga": for Rockchip RK3288
+ "rockchip,rk3399-rga": for Rockchip RK3399

- interrupts: RGA interrupt specifier.

--
2.11.0

2020-02-03 22:45:47

by Justin Swartz

[permalink] [raw]
Subject: [PATCH v4 2/3] ARM: dts: rockchip: add rga node for rk322x

Add a node to define the presence of RGA, a 2D raster
graphic acceleration unit.

Signed-off-by: Justin Swartz <[email protected]>
---
arch/arm/boot/dts/rk322x.dtsi | 11 +++++++++++
1 file changed, 11 insertions(+)

diff --git a/arch/arm/boot/dts/rk322x.dtsi b/arch/arm/boot/dts/rk322x.dtsi
index 340ed6ccb..29d50bebc 100644
--- a/arch/arm/boot/dts/rk322x.dtsi
+++ b/arch/arm/boot/dts/rk322x.dtsi
@@ -621,6 +621,17 @@
status = "disabled";
};

+ rga: rga@20060000 {
+ compatible = "rockchip,rk3228-rga", "rockchip,rk3288-rga";
+ reg = <0x20060000 0x1000>;
+ interrupts = <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&cru ACLK_RGA>, <&cru HCLK_RGA>, <&cru SCLK_RGA>;
+ clock-names = "aclk", "hclk", "sclk";
+ resets = <&cru SRST_RGA>, <&cru SRST_RGA_A>, <&cru SRST_RGA_H>;
+ reset-names = "core", "axi", "ahb";
+ status = "disabled";
+ };
+
iep_mmu: iommu@20070800 {
compatible = "rockchip,iommu";
reg = <0x20070800 0x100>;
--
2.11.0

2020-02-06 20:48:33

by Rob Herring (Arm)

[permalink] [raw]
Subject: Re: [PATCH v4 1/3] [media] dt-bindings: Add binding for rk3228 rga

On Mon, 3 Feb 2020 22:40:15 +0000, Justin Swartz wrote:
> Indicate that the rk3228 rga is compatible with that of the rk3288.
>
> But if any rk3228-specific quirks are identified in future that
> require handling logic that differs from what is provided for the
> rk3288, then allow for the compatibility string "rockchip,rk3228-rga"
> to be matched instead of "rockchip,rk3288-rga".
>
> Signed-off-by: Justin Swartz <[email protected]>
> ---
> Documentation/devicetree/bindings/media/rockchip-rga.txt | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>

Acked-by: Rob Herring <[email protected]>

2020-03-01 00:30:10

by Heiko Stuebner

[permalink] [raw]
Subject: Re: [PATCH v4 1/3] [media] dt-bindings: Add binding for rk3228 rga

Hi Mauro,

Am Montag, 3. Februar 2020, 23:40:15 CET schrieb Justin Swartz:
> Indicate that the rk3228 rga is compatible with that of the rk3288.
>
> But if any rk3228-specific quirks are identified in future that
> require handling logic that differs from what is provided for the
> rk3288, then allow for the compatibility string "rockchip,rk3228-rga"
> to be matched instead of "rockchip,rk3288-rga".
>
> Signed-off-by: Justin Swartz <[email protected]>

what is the process in the media-world for this dt-binding only patch?

Do you want to apply it, or should I just also apply it with the following
2 dt-patches? There shouldn't be any conflicts with the media tree
as this patch really only affects the rga binding document.

Thanks
Heiko

> ---
> Documentation/devicetree/bindings/media/rockchip-rga.txt | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/media/rockchip-rga.txt b/Documentation/devicetree/bindings/media/rockchip-rga.txt
> index fd5276abf..c53a8e513 100644
> --- a/Documentation/devicetree/bindings/media/rockchip-rga.txt
> +++ b/Documentation/devicetree/bindings/media/rockchip-rga.txt
> @@ -6,8 +6,9 @@ BitBLT, alpha blending and image blur/sharpness.
>
> Required properties:
> - compatible: value should be one of the following
> - "rockchip,rk3288-rga";
> - "rockchip,rk3399-rga";
> + "rockchip,rk3228-rga", "rockchip,rk3288-rga": for Rockchip RK3228
> + "rockchip,rk3288-rga": for Rockchip RK3288
> + "rockchip,rk3399-rga": for Rockchip RK3399
>
> - interrupts: RGA interrupt specifier.
>
>




2020-04-18 09:16:51

by Johan Jonker

[permalink] [raw]
Subject: Re: [PATCH v4 2/3] ARM: dts: rockchip: add rga node for rk322x

Hi Justin, Heiko,

In the discussion about "rockchip,px30-rga" it was mentioned that:
"no status for soc internal components without any board-specifics".
The binding is in mainline, but the dts node is missing I think.
Should this also be changed?

Johan

+&rga {
+ status = "okay";
+};
+

> Add a node to define the presence of RGA, a 2D raster
> graphic acceleration unit.
>
> Signed-off-by: Justin Swartz <[email protected]>
> ---
> arch/arm/boot/dts/rk322x.dtsi | 11 +++++++++++
> 1 file changed, 11 insertions(+)
>
> diff --git a/arch/arm/boot/dts/rk322x.dtsi b/arch/arm/boot/dts/rk322x.dtsi
> index 340ed6ccb..29d50bebc 100644
> --- a/arch/arm/boot/dts/rk322x.dtsi
> +++ b/arch/arm/boot/dts/rk322x.dtsi
> @@ -621,6 +621,17 @@
> status = "disabled";
> };
>
> + rga: rga@20060000 {
> + compatible = "rockchip,rk3228-rga", "rockchip,rk3288-rga";
> + reg = <0x20060000 0x1000>;
> + interrupts = <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>;
> + clocks = <&cru ACLK_RGA>, <&cru HCLK_RGA>, <&cru SCLK_RGA>;
> + clock-names = "aclk", "hclk", "sclk";
> + resets = <&cru SRST_RGA>, <&cru SRST_RGA_A>, <&cru SRST_RGA_H>;
> + reset-names = "core", "axi", "ahb";

> + status = "disabled";

remove?

> + };
> +
> iep_mmu: iommu@20070800 {
> compatible = "rockchip,iommu";
> reg = <0x20070800 0x100>;
> --
> 2.11.0

2020-04-18 09:53:39

by Heiko Stuebner

[permalink] [raw]
Subject: Re: [PATCH v4 2/3] ARM: dts: rockchip: add rga node for rk322x

Am Samstag, 18. April 2020, 11:15:27 CEST schrieb Johan Jonker:
> Hi Justin, Heiko,
>
> In the discussion about "rockchip,px30-rga" it was mentioned that:
> "no status for soc internal components without any board-specifics".
> The binding is in mainline, but the dts node is missing I think.
> Should this also be changed?

yep, drop the status disabled from the dtsi and that then results
in not needing the board-level enablement

(background: rga is a simple mem2mem device without any
board-specific hooks)

>
> Johan
>
> +&rga {
> + status = "okay";
> +};
> +
>
> > Add a node to define the presence of RGA, a 2D raster
> > graphic acceleration unit.
> >
> > Signed-off-by: Justin Swartz <[email protected]>
> > ---
> > arch/arm/boot/dts/rk322x.dtsi | 11 +++++++++++
> > 1 file changed, 11 insertions(+)
> >
> > diff --git a/arch/arm/boot/dts/rk322x.dtsi b/arch/arm/boot/dts/rk322x.dtsi
> > index 340ed6ccb..29d50bebc 100644
> > --- a/arch/arm/boot/dts/rk322x.dtsi
> > +++ b/arch/arm/boot/dts/rk322x.dtsi
> > @@ -621,6 +621,17 @@
> > status = "disabled";
> > };
> >
> > + rga: rga@20060000 {
> > + compatible = "rockchip,rk3228-rga", "rockchip,rk3288-rga";
> > + reg = <0x20060000 0x1000>;
> > + interrupts = <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>;
> > + clocks = <&cru ACLK_RGA>, <&cru HCLK_RGA>, <&cru SCLK_RGA>;
> > + clock-names = "aclk", "hclk", "sclk";
> > + resets = <&cru SRST_RGA>, <&cru SRST_RGA_A>, <&cru SRST_RGA_H>;
> > + reset-names = "core", "axi", "ahb";
>
> > + status = "disabled";
>
> remove?
>
> > + };
> > +
> > iep_mmu: iommu@20070800 {
> > compatible = "rockchip,iommu";
> > reg = <0x20070800 0x100>;
>
>




2020-04-18 09:59:46

by Justin Swartz

[permalink] [raw]
Subject: Re: [PATCH v4 2/3] ARM: dts: rockchip: add rga node for rk322x

Hi Johan, Heiko,

On 2020-04-18 11:49, Heiko Stuebner wrote:

> Am Samstag, 18. April 2020, 11:15:27 CEST schrieb Johan Jonker:
>
>> Hi Justin, Heiko,
>>
>> In the discussion about "rockchip,px30-rga" it was mentioned that:
>> "no status for soc internal components without any board-specifics".
>> The binding is in mainline, but the dts node is missing I think.
>> Should this also be changed?
>
> yep, drop the status disabled from the dtsi and that then results
> in not needing the board-level enablement
>
> (background: rga is a simple mem2mem device without any
> board-specific hooks)

Shall I submit version 5 of this patch series?

> Johan
>
> +&rga {
> + status = "okay";
> +};
> +
>
> Add a node to define the presence of RGA, a 2D raster
> graphic acceleration unit.
>
> Signed-off-by: Justin Swartz <[email protected]>
> ---
> arch/arm/boot/dts/rk322x.dtsi | 11 +++++++++++
> 1 file changed, 11 insertions(+)
>
> diff --git a/arch/arm/boot/dts/rk322x.dtsi
> b/arch/arm/boot/dts/rk322x.dtsi
> index 340ed6ccb..29d50bebc 100644
> --- a/arch/arm/boot/dts/rk322x.dtsi
> +++ b/arch/arm/boot/dts/rk322x.dtsi
> @@ -621,6 +621,17 @@
> status = "disabled";
> };
>
> + rga: rga@20060000 {
> + compatible = "rockchip,rk3228-rga", "rockchip,rk3288-rga";
> + reg = <0x20060000 0x1000>;
> + interrupts = <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>;
> + clocks = <&cru ACLK_RGA>, <&cru HCLK_RGA>, <&cru SCLK_RGA>;
> + clock-names = "aclk", "hclk", "sclk";
> + resets = <&cru SRST_RGA>, <&cru SRST_RGA_A>, <&cru
> SRST_RGA_H>;
> + reset-names = "core", "axi", "ahb";
> + status = "disabled";
> remove?
>
> + };
> +
> iep_mmu: iommu@20070800 {
> compatible = "rockchip,iommu";
> reg = <0x20070800 0x100>;

2020-04-18 10:57:19

by Heiko Stuebner

[permalink] [raw]
Subject: Re: [PATCH v4 2/3] ARM: dts: rockchip: add rga node for rk322x

Am Samstag, 18. April 2020, 11:56:03 CEST schrieb Justin Swartz:
> Hi Johan, Heiko,
>
> On 2020-04-18 11:49, Heiko Stuebner wrote:
>
> > Am Samstag, 18. April 2020, 11:15:27 CEST schrieb Johan Jonker:
> >
> >> Hi Justin, Heiko,
> >>
> >> In the discussion about "rockchip,px30-rga" it was mentioned that:
> >> "no status for soc internal components without any board-specifics".
> >> The binding is in mainline, but the dts node is missing I think.
> >> Should this also be changed?
> >
> > yep, drop the status disabled from the dtsi and that then results
> > in not needing the board-level enablement
> >
> > (background: rga is a simple mem2mem device without any
> > board-specific hooks)
>
> Shall I submit version 5 of this patch series?

I guess so ... especially as we expect patch1 to go through the
media tree and sending a new version might serve as a ping :-)
and include the Ack by Rob for easy applying


Heiko


>
> > Johan
> >
> > +&rga {
> > + status = "okay";
> > +};
> > +
> >
> > Add a node to define the presence of RGA, a 2D raster
> > graphic acceleration unit.
> >
> > Signed-off-by: Justin Swartz <[email protected]>
> > ---
> > arch/arm/boot/dts/rk322x.dtsi | 11 +++++++++++
> > 1 file changed, 11 insertions(+)
> >
> > diff --git a/arch/arm/boot/dts/rk322x.dtsi
> > b/arch/arm/boot/dts/rk322x.dtsi
> > index 340ed6ccb..29d50bebc 100644
> > --- a/arch/arm/boot/dts/rk322x.dtsi
> > +++ b/arch/arm/boot/dts/rk322x.dtsi
> > @@ -621,6 +621,17 @@
> > status = "disabled";
> > };
> >
> > + rga: rga@20060000 {
> > + compatible = "rockchip,rk3228-rga", "rockchip,rk3288-rga";
> > + reg = <0x20060000 0x1000>;
> > + interrupts = <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>;
> > + clocks = <&cru ACLK_RGA>, <&cru HCLK_RGA>, <&cru SCLK_RGA>;
> > + clock-names = "aclk", "hclk", "sclk";
> > + resets = <&cru SRST_RGA>, <&cru SRST_RGA_A>, <&cru
> > SRST_RGA_H>;
> > + reset-names = "core", "axi", "ahb";
> > + status = "disabled";
> > remove?
> >
> > + };
> > +
> > iep_mmu: iommu@20070800 {
> > compatible = "rockchip,iommu";
> > reg = <0x20070800 0x100>;
>




2020-04-18 12:16:36

by Johan Jonker

[permalink] [raw]
Subject: Re: [PATCH v4 2/3] ARM: dts: rockchip: add rga node for rk322x

On 4/18/20 12:53 PM, Heiko Stuebner wrote:
> Am Samstag, 18. April 2020, 11:56:03 CEST schrieb Justin Swartz:
>> Hi Johan, Heiko,
>>
>> On 2020-04-18 11:49, Heiko Stuebner wrote:
>>
>>> Am Samstag, 18. April 2020, 11:15:27 CEST schrieb Johan Jonker:
>>>
>>>> Hi Justin, Heiko,
>>>>
>>>> In the discussion about "rockchip,px30-rga" it was mentioned that:
>>>> "no status for soc internal components without any board-specifics".
>>>> The binding is in mainline, but the dts node is missing I think.
>>>> Should this also be changed?
>>>
>>> yep, drop the status disabled from the dtsi and that then results
>>> in not needing the board-level enablement
>>>
>>> (background: rga is a simple mem2mem device without any
>>> board-specific hooks)
>>
>> Shall I submit version 5 of this patch series?
>
> I guess so ... especially as we expect patch1 to go through the
> media tree and sending a new version might serve as a ping :-)
> and include the Ack by Rob for easy applying

The conversion to rockchip-rga.yaml including rockchip,rk3228-rga is
already reviewed by robh.

>
>
> Heiko
>
>
>>
>>> Johan
>>>
>>> +&rga {
>>> + status = "okay";
>>> +};
>>> +
>>>
>>> Add a node to define the presence of RGA, a 2D raster
>>> graphic acceleration unit.
>>>
>>> Signed-off-by: Justin Swartz <[email protected]>
>>> ---
>>> arch/arm/boot/dts/rk322x.dtsi | 11 +++++++++++
>>> 1 file changed, 11 insertions(+)
>>>
>>> diff --git a/arch/arm/boot/dts/rk322x.dtsi
>>> b/arch/arm/boot/dts/rk322x.dtsi
>>> index 340ed6ccb..29d50bebc 100644
>>> --- a/arch/arm/boot/dts/rk322x.dtsi
>>> +++ b/arch/arm/boot/dts/rk322x.dtsi
>>> @@ -621,6 +621,17 @@
>>> status = "disabled";
>>> };
>>>
>>> + rga: rga@20060000 {
>>> + compatible = "rockchip,rk3228-rga", "rockchip,rk3288-rga";
>>> + reg = <0x20060000 0x1000>;
>>> + interrupts = <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>;
>>> + clocks = <&cru ACLK_RGA>, <&cru HCLK_RGA>, <&cru SCLK_RGA>;
>>> + clock-names = "aclk", "hclk", "sclk";
>>> + resets = <&cru SRST_RGA>, <&cru SRST_RGA_A>, <&cru
>>> SRST_RGA_H>;
>>> + reset-names = "core", "axi", "ahb";
>>> + status = "disabled";
>>> remove?
>>>
>>> + };
>>> +
>>> iep_mmu: iommu@20070800 {
>>> compatible = "rockchip,iommu";
>>> reg = <0x20070800 0x100>;
>>
>
>
>
>

2020-04-19 12:57:22

by Justin Swartz

[permalink] [raw]
Subject: [PATCH v5 0/1] Add rga to rk322x device tree

This patchset aims to enable use of Rockchip's RGA, a 2D raster
graphic acceleration unit, on rk322x based devices.

Changes in v5:
- Remove the patch to rockchip-rga device tree binding documentation
as Johan Jonker has already included mention of "rockchip,rk3228-rga"
since the conversion to YAML.

- Remove the assignment of "disabled" to the rga "status" attribute
in rk322x.dtsi, as Heiko Stuebner has said:
"no status for soc internal components without any board-specifics"

- Remove the now unnecessary patch to enable rga for the rk3229-xms6
board.

Changes in v4:
- Add a compatible value entry for the rk3228 to the rockchip-rga
device tree binding documentation.

Changes in v3:
- Relocate rga node to the correct position in rk322x.dtsi, as
indicated by Johan Jonker.

Changes in v2:
- Remove unnecessary "rockchip,rk3228-rga" device tree compatibility
string patch, as advised by Ezequiel Garcia.

- Use both "rockchip,rk3228-rga" and "rockchip,rk3288-rga" in the
rga node's compatibility property, as suggested by Heiko Stuebner.

Justin Swartz (1):
ARM: dts: rockchip: add rga node for rk322x

arch/arm/boot/dts/rk322x.dtsi | 10 ++++++++++
1 file changed, 10 insertions(+)

2020-04-19 12:59:55

by Justin Swartz

[permalink] [raw]
Subject: [PATCH v5 1/1] ARM: dts: rockchip: add rga node for rk322x

Add a node to define the presence of RGA, a 2D raster graphic
acceleration unit.

Signed-off-by: Justin Swartz <[email protected]>
---
arch/arm/boot/dts/rk322x.dtsi | 10 ++++++++++
1 file changed, 10 insertions(+)

diff --git a/arch/arm/boot/dts/rk322x.dtsi b/arch/arm/boot/dts/rk322x.dtsi
index 4e90efdc9..ce88f5bd6 100644
--- a/arch/arm/boot/dts/rk322x.dtsi
+++ b/arch/arm/boot/dts/rk322x.dtsi
@@ -621,6 +621,16 @@
status = "disabled";
};

+ rga: rga@20060000 {
+ compatible = "rockchip,rk3228-rga", "rockchip,rk3288-rga";
+ reg = <0x20060000 0x1000>;
+ interrupts = <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&cru ACLK_RGA>, <&cru HCLK_RGA>, <&cru SCLK_RGA>;
+ clock-names = "aclk", "hclk", "sclk";
+ resets = <&cru SRST_RGA>, <&cru SRST_RGA_A>, <&cru SRST_RGA_H>;
+ reset-names = "core", "axi", "ahb";
+ };
+
iep_mmu: iommu@20070800 {
compatible = "rockchip,iommu";
reg = <0x20070800 0x100>;
--
2.11.0

2020-05-18 22:54:50

by Heiko Stuebner

[permalink] [raw]
Subject: Re: [PATCH v5 0/1] Add rga to rk322x device tree

On Sun, 19 Apr 2020 12:51:32 +0000, Justin Swartz wrote:
> This patchset aims to enable use of Rockchip's RGA, a 2D raster
> graphic acceleration unit, on rk322x based devices.
>
> Changes in v5:
> - Remove the patch to rockchip-rga device tree binding documentation
> as Johan Jonker has already included mention of "rockchip,rk3228-rga"
> since the conversion to YAML.
>
> [...]

Applied, thanks!

[1/1] ARM: dts: rockchip: add rga node for rk322x
commit: 54b1a4e070330c3fba5becfb0b619bf360bc2657

Best regards,
--
Heiko Stuebner <[email protected]>