The VOP2 driver sitting in next uses named register spaces, but the binding lacks documentation for that. Add the missing documentation and while at it take the opportunity to rename the register spaces from too generic "regs" to "vop" and from "gamma_lut" to better looking "gamma-lut".
Changes since v1: - Fix dt_binding_check errors
Sascha Hauer (3): dt-bindings: display: rockchip: make reg-names mandatory for VOP2 drm: rockchip: Change register space names arm64: dts: rockchip: rk356x: Change VOP2 register space names
.../bindings/display/rockchip/rockchip-vop2.yaml | 8 +++++++- arch/arm64/boot/dts/rockchip/rk356x.dtsi | 2 +- drivers/gpu/drm/rockchip/rockchip_drm_vop2.c | 4 ++-- 3 files changed, 10 insertions(+), 4 deletions(-)
The VOP2 driver relies on reg-names properties, but these are not documented. Add the missing documentation, make reg-names mandatory and increase minItems to 2 as always both register spaces are needed.
Signed-off-by: Sascha Hauer s.hauer@pengutronix.de ---
Notes: Changes since v1: - Drop minItems - Add reg-names properties to example
.../bindings/display/rockchip/rockchip-vop2.yaml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/display/rockchip/rockchip-vop2.yaml b/Documentation/devicetree/bindings/display/rockchip/rockchip-vop2.yaml index 655d9b327f7d3..fba45091d9092 100644 --- a/Documentation/devicetree/bindings/display/rockchip/rockchip-vop2.yaml +++ b/Documentation/devicetree/bindings/display/rockchip/rockchip-vop2.yaml @@ -22,7 +22,6 @@ properties: - rockchip,rk3568-vop
reg: - minItems: 1 items: - description: Must contain one entry corresponding to the base address and length @@ -31,6 +30,11 @@ properties: Can optionally contain a second entry corresponding to the CRTC gamma LUT address.
+ reg-names: + items: + - const: vop + - const: gamma-lut + interrupts: maxItems: 1 description: @@ -86,6 +90,7 @@ properties: required: - compatible - reg + - reg-names - interrupts - clocks - clock-names @@ -104,6 +109,7 @@ examples: vop: vop@fe040000 { compatible = "rockchip,rk3568-vop"; reg = <0x0 0xfe040000 0x0 0x3000>, <0x0 0xfe044000 0x0 0x1000>; + reg-names = "vop", "gamma-lut"; interrupts = <GIC_SPI 148 IRQ_TYPE_LEVEL_HIGH>; clocks = <&cru ACLK_VOP>, <&cru HCLK_VOP>,
Hi Rob, Krzysztof,
Am Mittwoch, 11. Mai 2022, 10:21:07 CEST schrieb Sascha Hauer:
The VOP2 driver relies on reg-names properties, but these are not documented. Add the missing documentation, make reg-names mandatory and increase minItems to 2 as always both register spaces are needed.
Signed-off-by: Sascha Hauer s.hauer@pengutronix.de
does this look ok now?
Thanks Heiko
Notes: Changes since v1: - Drop minItems - Add reg-names properties to example
.../bindings/display/rockchip/rockchip-vop2.yaml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/display/rockchip/rockchip-vop2.yaml b/Documentation/devicetree/bindings/display/rockchip/rockchip-vop2.yaml index 655d9b327f7d3..fba45091d9092 100644 --- a/Documentation/devicetree/bindings/display/rockchip/rockchip-vop2.yaml +++ b/Documentation/devicetree/bindings/display/rockchip/rockchip-vop2.yaml @@ -22,7 +22,6 @@ properties: - rockchip,rk3568-vop
reg:
- minItems: 1 items:
- description: Must contain one entry corresponding to the base address and length
@@ -31,6 +30,11 @@ properties: Can optionally contain a second entry corresponding to the CRTC gamma LUT address.
- reg-names:
- items:
- const: vop
- const: gamma-lut
- interrupts: maxItems: 1 description:
@@ -86,6 +90,7 @@ properties: required:
- compatible
- reg
- reg-names
- interrupts
- clocks
- clock-names
@@ -104,6 +109,7 @@ examples: vop: vop@fe040000 { compatible = "rockchip,rk3568-vop"; reg = <0x0 0xfe040000 0x0 0x3000>, <0x0 0xfe044000 0x0 0x1000>;
reg-names = "vop", "gamma-lut"; interrupts = <GIC_SPI 148 IRQ_TYPE_LEVEL_HIGH>; clocks = <&cru ACLK_VOP>, <&cru HCLK_VOP>,
On 14/05/2022 00:26, Heiko Stuebner wrote:
Hi Rob, Krzysztof,
Am Mittwoch, 11. Mai 2022, 10:21:07 CEST schrieb Sascha Hauer:
The VOP2 driver relies on reg-names properties, but these are not documented. Add the missing documentation, make reg-names mandatory and increase minItems to 2 as always both register spaces are needed.
Signed-off-by: Sascha Hauer s.hauer@pengutronix.de
does this look ok now?
Neither Rob nor me was Cced on original email, so I don't have it in my mailbox... I would expect that scripts/get_maintainers.pl is a known tool.
Best regards, Krzysztof
Am Dienstag, 17. Mai 2022, 11:02:06 CEST schrieb Krzysztof Kozlowski:
On 14/05/2022 00:26, Heiko Stuebner wrote:
Hi Rob, Krzysztof,
Am Mittwoch, 11. Mai 2022, 10:21:07 CEST schrieb Sascha Hauer:
The VOP2 driver relies on reg-names properties, but these are not documented. Add the missing documentation, make reg-names mandatory and increase minItems to 2 as always both register spaces are needed.
Signed-off-by: Sascha Hauer s.hauer@pengutronix.de
does this look ok now?
Neither Rob nor me was Cced on original email, so I don't have it in my mailbox... I would expect that scripts/get_maintainers.pl is a known tool.
Rob wrote in the past that he's working off of the devicetree-patchwork, and has reviewed the binding yesterday [0].
But you're right, including all the maintainers get_maintainers.pl suggests would be better in the future.
[0] https://lore.kernel.org/r/20220516151226.GA2653888-robh@kernel.org
On Wed, 11 May 2022 10:21:07 +0200, Sascha Hauer wrote:
The VOP2 driver relies on reg-names properties, but these are not documented. Add the missing documentation, make reg-names mandatory and increase minItems to 2 as always both register spaces are needed.
Signed-off-by: Sascha Hauer s.hauer@pengutronix.de
Notes: Changes since v1: - Drop minItems - Add reg-names properties to example
.../bindings/display/rockchip/rockchip-vop2.yaml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
Reviewed-by: Rob Herring robh@kernel.org
Heiko,
On Mon, May 16, 2022 at 10:12:26AM -0500, Rob Herring wrote:
On Wed, 11 May 2022 10:21:07 +0200, Sascha Hauer wrote:
The VOP2 driver relies on reg-names properties, but these are not documented. Add the missing documentation, make reg-names mandatory and increase minItems to 2 as always both register spaces are needed.
Could you drop the minItems part while applying? That is no longer correct.
Sascha
Signed-off-by: Sascha Hauer s.hauer@pengutronix.de
Notes: Changes since v1: - Drop minItems - Add reg-names properties to example
.../bindings/display/rockchip/rockchip-vop2.yaml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
Reviewed-by: Rob Herring robh@kernel.org
"regs" seems to generic when there are multiple register spaces, so rename that one to "vop". Also change "gamma_lut" to better looking "gamma-lut".
Signed-off-by: Sascha Hauer s.hauer@pengutronix.de --- drivers/gpu/drm/rockchip/rockchip_drm_vop2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c index 8d1323a47f822..d463ea80b6569 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c @@ -2620,7 +2620,7 @@ static int vop2_bind(struct device *dev, struct device *master, void *data)
dev_set_drvdata(dev, vop2);
- res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "regs"); + res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "vop"); if (!res) { drm_err(vop2->drm, "failed to get vop2 register byname\n"); return -EINVAL; @@ -2637,7 +2637,7 @@ static int vop2_bind(struct device *dev, struct device *master, void *data) if (ret) return ret;
- res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "gamma_lut"); + res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "gamma-lut"); if (res) { vop2->lut_regs = devm_ioremap_resource(dev, res); if (IS_ERR(vop2->lut_regs))
"regs" seems to generic when there are multiple register spaces, so rename to "vop". Also, replace "gamma_lut" with better looking "gamma-lut". This has been changed in the driver and binding documentation as well.
Signed-off-by: Sascha Hauer s.hauer@pengutronix.de --- arch/arm64/boot/dts/rockchip/rk356x.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/rockchip/rk356x.dtsi b/arch/arm64/boot/dts/rockchip/rk356x.dtsi index 49eb45e23f8c9..646e60ee48c99 100644 --- a/arch/arm64/boot/dts/rockchip/rk356x.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk356x.dtsi @@ -576,7 +576,7 @@ gmac1_mtl_tx_setup: tx-queues-config {
vop: vop@fe040000 { reg = <0x0 0xfe040000 0x0 0x3000>, <0x0 0xfe044000 0x0 0x1000>; - reg-names = "regs", "gamma_lut"; + reg-names = "vop", "gamma-lut"; interrupts = <GIC_SPI 148 IRQ_TYPE_LEVEL_HIGH>; clocks = <&cru ACLK_VOP>, <&cru HCLK_VOP>, <&cru DCLK_VOP0>, <&cru DCLK_VOP1>, <&cru DCLK_VOP2>;
On Wed, 11 May 2022 10:21:06 +0200, Sascha Hauer wrote:
The VOP2 driver sitting in next uses named register spaces, but the binding lacks documentation for that. Add the missing documentation and while at it take the opportunity to rename the register spaces from too generic "regs" to "vop" and from "gamma_lut" to better looking "gamma-lut".
Changes since v1:
- Fix dt_binding_check errors
[...]
Applied, thanks!
[1/3] dt-bindings: display: rockchip: make reg-names mandatory for VOP2 commit: 54eb8d446e710b5f77969bd34f0a162cf86b8d29 [2/3] drm: rockchip: Change register space names commit: 5ee8c8f930ba7d20717c4fc2d9f1ce0e757d1155
Best regards,
On Wed, 11 May 2022 10:21:06 +0200, Sascha Hauer wrote:
The VOP2 driver sitting in next uses named register spaces, but the binding lacks documentation for that. Add the missing documentation and while at it take the opportunity to rename the register spaces from too generic "regs" to "vop" and from "gamma_lut" to better looking "gamma-lut".
Changes since v1:
- Fix dt_binding_check errors
[...]
Applied, thanks!
[3/3] arm64: dts: rockchip: rk356x: Change VOP2 register space names
applied as fixup to [16/24] arm64: dts: rockchip: rk356x: Add VOP2 nodes commit: 9b3c9f6e57ef26b8478da64e3d49d0438291a98a
Best regards,
dri-devel@lists.freedesktop.org