* [PATCH v4 1/3] dt-bindings: display: bcm2711-hdmi: Add interrupt details for BCM2712
2024-12-18 14:48 [PATCH v4 0/3] drm/vc4: Fixup DT and DT binding issues from recent patchset Dave Stevenson
@ 2024-12-18 14:48 ` Dave Stevenson
2024-12-19 8:38 ` Krzysztof Kozlowski
2024-12-18 14:48 ` [PATCH v4 2/3] dt-bindings: display: Fix BCM2835 HVS bindings " Dave Stevenson
2024-12-18 14:48 ` [PATCH v4 3/3] dt-bindings: interrupt-controller: brcm,bcm2836-l1-intc: Drop interrupt-controller requirement Dave Stevenson
2 siblings, 1 reply; 10+ messages in thread
From: Dave Stevenson @ 2024-12-18 14:48 UTC (permalink / raw)
To: Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
Simona Vetter, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Florian Fainelli, Broadcom internal kernel review list,
Eric Anholt, Maíra Canal, Raspberry Pi Kernel Maintenance,
Ray Jui, Scott Branden, Doug Berger, Linus Walleij,
Bartosz Golaszewski, Thomas Gleixner, Stefan Wahren
Cc: dri-devel, devicetree, linux-rpi-kernel, linux-arm-kernel,
linux-kernel, Florian Fainelli, linux-gpio, Dave Stevenson
Commit 62948c62abca ("dt-bindings: display: Add BCM2712 HDMI bindings")
added the compatible strings for BCM2712, but missed out that the
number of interrupts changed.
Update the schema to include the interrupt requirements.
Fixes: 62948c62abca ("dt-bindings: display: Add BCM2712 HDMI bindings")
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
---
.../bindings/display/brcm,bcm2711-hdmi.yaml | 81 ++++++++++++++++++----
1 file changed, 67 insertions(+), 14 deletions(-)
diff --git a/Documentation/devicetree/bindings/display/brcm,bcm2711-hdmi.yaml b/Documentation/devicetree/bindings/display/brcm,bcm2711-hdmi.yaml
index 6d11f5955b51..83c058728ef1 100644
--- a/Documentation/devicetree/bindings/display/brcm,bcm2711-hdmi.yaml
+++ b/Documentation/devicetree/bindings/display/brcm,bcm2711-hdmi.yaml
@@ -56,22 +56,12 @@ properties:
- const: cec
interrupts:
- items:
- - description: CEC TX interrupt
- - description: CEC RX interrupt
- - description: CEC stuck at low interrupt
- - description: Wake-up interrupt
- - description: Hotplug connected interrupt
- - description: Hotplug removed interrupt
+ minItems: 5
+ maxItems: 6
interrupt-names:
- items:
- - const: cec-tx
- - const: cec-rx
- - const: cec-low
- - const: wakeup
- - const: hpd-connected
- - const: hpd-removed
+ minItems: 5
+ maxItems: 6
ddc:
$ref: /schemas/types.yaml#/definitions/phandle
@@ -112,6 +102,66 @@ required:
additionalProperties: false
+allOf:
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - brcm,bcm2711-hdmi0
+ - brcm,bcm2711-hdmi1
+ then:
+ properties:
+ interrupts:
+ items:
+ - description: CEC TX interrupt
+ - description: CEC RX interrupt
+ - description: CEC stuck at low interrupt
+ - description: Wake-up interrupt
+ - description: Hotplug connected interrupt
+ - description: Hotplug removed interrupt
+ interrupt-names:
+ items:
+ - const: cec-tx
+ - const: cec-rx
+ - const: cec-low
+ - const: wakeup
+ - const: hpd-connected
+ - const: hpd-removed
+
+
+ required:
+ - interrupts
+ - interrupt-names
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - brcm,bcm2712-hdmi0
+ - brcm,bcm2712-hdmi1
+ then:
+ properties:
+ interrupts:
+ items:
+ - description: CEC TX interrupt
+ - description: CEC RX interrupt
+ - description: CEC stuck at low interrupt
+ - description: Hotplug connected interrupt
+ - description: Hotplug removed interrupt
+ interrupts-names:
+ items:
+ - const: cec-tx
+ - const: cec-rx
+ - const: cec-low
+ - const: hpd-connected
+ - const: hpd-removed
+
+ required:
+ - interrupts
+ - interrupt-names
+
examples:
- |
hdmi0: hdmi@7ef00700 {
@@ -136,6 +186,9 @@ examples:
"hd";
clocks = <&firmware_clocks 13>, <&firmware_clocks 14>, <&dvp 1>, <&clk_27MHz>;
clock-names = "hdmi", "bvb", "audio", "cec";
+ interrupts = <0>, <1>, <2>, <3>, <4>, <5>;
+ interrupt-names = "cec-tx", "cec-rx", "cec-low", "wakeup",
+ "hpd-connected", "hpd-removed";
resets = <&dvp 0>;
ddc = <&ddc0>;
};
--
2.34.1
^ permalink raw reply related [flat|nested] 10+ messages in thread* Re: [PATCH v4 1/3] dt-bindings: display: bcm2711-hdmi: Add interrupt details for BCM2712
2024-12-18 14:48 ` [PATCH v4 1/3] dt-bindings: display: bcm2711-hdmi: Add interrupt details for BCM2712 Dave Stevenson
@ 2024-12-19 8:38 ` Krzysztof Kozlowski
0 siblings, 0 replies; 10+ messages in thread
From: Krzysztof Kozlowski @ 2024-12-19 8:38 UTC (permalink / raw)
To: Dave Stevenson
Cc: Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
Simona Vetter, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Florian Fainelli, Broadcom internal kernel review list,
Eric Anholt, Maíra Canal, Raspberry Pi Kernel Maintenance,
Ray Jui, Scott Branden, Doug Berger, Linus Walleij,
Bartosz Golaszewski, Thomas Gleixner, Stefan Wahren, dri-devel,
devicetree, linux-rpi-kernel, linux-arm-kernel, linux-kernel,
Florian Fainelli, linux-gpio
On Wed, Dec 18, 2024 at 02:48:32PM +0000, Dave Stevenson wrote:
> Commit 62948c62abca ("dt-bindings: display: Add BCM2712 HDMI bindings")
> added the compatible strings for BCM2712, but missed out that the
> number of interrupts changed.
>
> Update the schema to include the interrupt requirements.
>
> Fixes: 62948c62abca ("dt-bindings: display: Add BCM2712 HDMI bindings")
> Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
> ---
> .../bindings/display/brcm,bcm2711-hdmi.yaml | 81 ++++++++++++++++++----
> 1 file changed, 67 insertions(+), 14 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/display/brcm,bcm2711-hdmi.yaml b/Documentation/devicetree/bindings/display/brcm,bcm2711-hdmi.yaml
> index 6d11f5955b51..83c058728ef1 100644
> --- a/Documentation/devicetree/bindings/display/brcm,bcm2711-hdmi.yaml
> +++ b/Documentation/devicetree/bindings/display/brcm,bcm2711-hdmi.yaml
> @@ -56,22 +56,12 @@ properties:
> - const: cec
>
> interrupts:
> - items:
> - - description: CEC TX interrupt
> - - description: CEC RX interrupt
> - - description: CEC stuck at low interrupt
> - - description: Wake-up interrupt
> - - description: Hotplug connected interrupt
> - - description: Hotplug removed interrupt
> + minItems: 5
> + maxItems: 6
>
> interrupt-names:
> - items:
> - - const: cec-tx
> - - const: cec-rx
> - - const: cec-low
> - - const: wakeup
> - - const: hpd-connected
> - - const: hpd-removed
> + minItems: 5
> + maxItems: 6
>
> ddc:
> $ref: /schemas/types.yaml#/definitions/phandle
> @@ -112,6 +102,66 @@ required:
>
> additionalProperties: false
>
> +allOf:
> + - if:
> + properties:
> + compatible:
> + contains:
> + enum:
> + - brcm,bcm2711-hdmi0
> + - brcm,bcm2711-hdmi1
> + then:
> + properties:
> + interrupts:
> + items:
> + - description: CEC TX interrupt
> + - description: CEC RX interrupt
> + - description: CEC stuck at low interrupt
> + - description: Wake-up interrupt
> + - description: Hotplug connected interrupt
> + - description: Hotplug removed interrupt
> + interrupt-names:
> + items:
> + - const: cec-tx
> + - const: cec-rx
> + - const: cec-low
> + - const: wakeup
> + - const: hpd-connected
> + - const: hpd-removed
> +
> +
Only one blank line
> + required:
> + - interrupts
> + - interrupt-names
But anyway this is unusual. Why this was added? Nothing in commit msg
explains this.
> +
> + - if:
> + properties:
> + compatible:
> + contains:
> + enum:
> + - brcm,bcm2712-hdmi0
> + - brcm,bcm2712-hdmi1
> + then:
> + properties:
> + interrupts:
> + items:
> + - description: CEC TX interrupt
> + - description: CEC RX interrupt
> + - description: CEC stuck at low interrupt
> + - description: Hotplug connected interrupt
> + - description: Hotplug removed interrupt
> + interrupts-names:
> + items:
> + - const: cec-tx
> + - const: cec-rx
> + - const: cec-low
> + - const: hpd-connected
> + - const: hpd-removed
> +
> + required:
> + - interrupts
> + - interrupt-names
Same question.
> +
> examples:
> - |
> hdmi0: hdmi@7ef00700 {
> @@ -136,6 +186,9 @@ examples:
> "hd";
> clocks = <&firmware_clocks 13>, <&firmware_clocks 14>, <&dvp 1>, <&clk_27MHz>;
> clock-names = "hdmi", "bvb", "audio", "cec";
> + interrupts = <0>, <1>, <2>, <3>, <4>, <5>;
> + interrupt-names = "cec-tx", "cec-rx", "cec-low", "wakeup",
> + "hpd-connected", "hpd-removed";
Fix alignment with opening " from earlier line (see DTS coding style).
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v4 2/3] dt-bindings: display: Fix BCM2835 HVS bindings for BCM2712
2024-12-18 14:48 [PATCH v4 0/3] drm/vc4: Fixup DT and DT binding issues from recent patchset Dave Stevenson
2024-12-18 14:48 ` [PATCH v4 1/3] dt-bindings: display: bcm2711-hdmi: Add interrupt details for BCM2712 Dave Stevenson
@ 2024-12-18 14:48 ` Dave Stevenson
2024-12-19 8:41 ` Krzysztof Kozlowski
2024-12-18 14:48 ` [PATCH v4 3/3] dt-bindings: interrupt-controller: brcm,bcm2836-l1-intc: Drop interrupt-controller requirement Dave Stevenson
2 siblings, 1 reply; 10+ messages in thread
From: Dave Stevenson @ 2024-12-18 14:48 UTC (permalink / raw)
To: Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
Simona Vetter, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Florian Fainelli, Broadcom internal kernel review list,
Eric Anholt, Maíra Canal, Raspberry Pi Kernel Maintenance,
Ray Jui, Scott Branden, Doug Berger, Linus Walleij,
Bartosz Golaszewski, Thomas Gleixner, Stefan Wahren
Cc: dri-devel, devicetree, linux-rpi-kernel, linux-arm-kernel,
linux-kernel, Florian Fainelli, linux-gpio, Dave Stevenson
Commit 6cfcbe548a3a ("dt-bindings: display: Add BCM2712 HVS bindings")
added the compatible string for BCM2712, but missed out that
the number of interrupts and clocks changed too, and both need to be
named.
Update to validate clock, interrupts, and their names for the variants.
Fixes: 6cfcbe548a3a ("dt-bindings: display: Add BCM2712 HVS bindings")
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
---
.../bindings/display/brcm,bcm2835-hvs.yaml | 84 ++++++++++++++++++----
1 file changed, 70 insertions(+), 14 deletions(-)
diff --git a/Documentation/devicetree/bindings/display/brcm,bcm2835-hvs.yaml b/Documentation/devicetree/bindings/display/brcm,bcm2835-hvs.yaml
index f91c9dce2a44..fd25ee5ce301 100644
--- a/Documentation/devicetree/bindings/display/brcm,bcm2835-hvs.yaml
+++ b/Documentation/devicetree/bindings/display/brcm,bcm2835-hvs.yaml
@@ -20,11 +20,20 @@ properties:
maxItems: 1
interrupts:
- maxItems: 1
+ minItems: 1
+ maxItems: 3
+
+ interrupt-names:
+ minItems: 1
+ maxItems: 3
clocks:
- maxItems: 1
- description: Core Clock
+ minItems: 1
+ maxItems: 2
+
+ clock-names:
+ minItems: 1
+ maxItems: 2
required:
- compatible
@@ -33,17 +42,64 @@ required:
additionalProperties: false
-if:
- properties:
- compatible:
- contains:
- enum:
- - brcm,bcm2711-hvs
- - brcm,bcm2712-hvs
-
-then:
- required:
- - clocks
+allOf:
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: brcm,bcm2711-hvs
+
+ then:
+ properties:
+ clocks:
+ items:
+ - description: Core Clock
+ interrupts:
+ maxItems: 1
+
+ required:
+ - clocks
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: brcm,bcm2712-hvs
+
+ then:
+ properties:
+ clocks:
+ minItems: 2
+ maxItems: 2
+ clock-names:
+ items:
+ - const: core
+ - const: disp
+ interrupts:
+ items:
+ - description: Channel 0 End of frame
+ - description: Channel 1 End of frame
+ - description: Channel 2 End of frame
+ interrupt-names:
+ items:
+ - const: ch0-eof
+ - const: ch1-eof
+ - const: ch2-eof
+ required:
+ - clocks
+ - clock-names
+ - interrupt-names
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: brcm,bcm2835-hvs
+
+ then:
+ properties:
+ interrupts:
+ maxItems: 1
examples:
- |
--
2.34.1
^ permalink raw reply related [flat|nested] 10+ messages in thread* Re: [PATCH v4 2/3] dt-bindings: display: Fix BCM2835 HVS bindings for BCM2712
2024-12-18 14:48 ` [PATCH v4 2/3] dt-bindings: display: Fix BCM2835 HVS bindings " Dave Stevenson
@ 2024-12-19 8:41 ` Krzysztof Kozlowski
2024-12-19 11:54 ` Dave Stevenson
0 siblings, 1 reply; 10+ messages in thread
From: Krzysztof Kozlowski @ 2024-12-19 8:41 UTC (permalink / raw)
To: Dave Stevenson
Cc: Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
Simona Vetter, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Florian Fainelli, Broadcom internal kernel review list,
Eric Anholt, Maíra Canal, Raspberry Pi Kernel Maintenance,
Ray Jui, Scott Branden, Doug Berger, Linus Walleij,
Bartosz Golaszewski, Thomas Gleixner, Stefan Wahren, dri-devel,
devicetree, linux-rpi-kernel, linux-arm-kernel, linux-kernel,
Florian Fainelli, linux-gpio
On Wed, Dec 18, 2024 at 02:48:33PM +0000, Dave Stevenson wrote:
> Commit 6cfcbe548a3a ("dt-bindings: display: Add BCM2712 HVS bindings")
> added the compatible string for BCM2712, but missed out that
> the number of interrupts and clocks changed too, and both need to be
> named.
>
> Update to validate clock, interrupts, and their names for the variants.
>
> Fixes: 6cfcbe548a3a ("dt-bindings: display: Add BCM2712 HVS bindings")
> Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
> ---
> .../bindings/display/brcm,bcm2835-hvs.yaml | 84 ++++++++++++++++++----
> 1 file changed, 70 insertions(+), 14 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/display/brcm,bcm2835-hvs.yaml b/Documentation/devicetree/bindings/display/brcm,bcm2835-hvs.yaml
> index f91c9dce2a44..fd25ee5ce301 100644
> --- a/Documentation/devicetree/bindings/display/brcm,bcm2835-hvs.yaml
> +++ b/Documentation/devicetree/bindings/display/brcm,bcm2835-hvs.yaml
> @@ -20,11 +20,20 @@ properties:
> maxItems: 1
>
> interrupts:
> - maxItems: 1
> + minItems: 1
> + maxItems: 3
> +
> + interrupt-names:
> + minItems: 1
> + maxItems: 3
>
> clocks:
> - maxItems: 1
> - description: Core Clock
> + minItems: 1
> + maxItems: 2
> +
> + clock-names:
> + minItems: 1
> + maxItems: 2
>
> required:
> - compatible
> @@ -33,17 +42,64 @@ required:
>
> additionalProperties: false
>
> -if:
> - properties:
> - compatible:
> - contains:
> - enum:
> - - brcm,bcm2711-hvs
> - - brcm,bcm2712-hvs
> -
> -then:
> - required:
> - - clocks
> +allOf:
> + - if:
> + properties:
> + compatible:
> + contains:
> + const: brcm,bcm2711-hvs
> +
> + then:
> + properties:
> + clocks:
> + items:
> + - description: Core Clock
> + interrupts:
> + maxItems: 1
clock-names and interrupt-names: false, unless driver needs them but all
this should be explained in the commit msg because it would be a change
to the binding.
> +
> + required:
> + - clocks
> +
> + - if:
> + properties:
> + compatible:
> + contains:
> + const: brcm,bcm2712-hvs
> +
> + then:
> + properties:
> + clocks:
> + minItems: 2
> + maxItems: 2
> + clock-names:
> + items:
> + - const: core
> + - const: disp
> + interrupts:
> + items:
> + - description: Channel 0 End of frame
> + - description: Channel 1 End of frame
> + - description: Channel 2 End of frame
> + interrupt-names:
> + items:
> + - const: ch0-eof
> + - const: ch1-eof
> + - const: ch2-eof
> + required:
> + - clocks
> + - clock-names
> + - interrupt-names
My previous comment still stands. Reply to people's feedback instead of
ignoring it.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: [PATCH v4 2/3] dt-bindings: display: Fix BCM2835 HVS bindings for BCM2712
2024-12-19 8:41 ` Krzysztof Kozlowski
@ 2024-12-19 11:54 ` Dave Stevenson
2024-12-19 12:14 ` Krzysztof Kozlowski
0 siblings, 1 reply; 10+ messages in thread
From: Dave Stevenson @ 2024-12-19 11:54 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
Simona Vetter, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Florian Fainelli, Broadcom internal kernel review list,
Eric Anholt, Maíra Canal, Raspberry Pi Kernel Maintenance,
Ray Jui, Scott Branden, Doug Berger, Linus Walleij,
Bartosz Golaszewski, Thomas Gleixner, Stefan Wahren, dri-devel,
devicetree, linux-rpi-kernel, linux-arm-kernel, linux-kernel,
Florian Fainelli, linux-gpio
Hi Krzysztof
On Thu, 19 Dec 2024 at 08:42, Krzysztof Kozlowski <krzk@kernel.org> wrote:
>
> On Wed, Dec 18, 2024 at 02:48:33PM +0000, Dave Stevenson wrote:
> > Commit 6cfcbe548a3a ("dt-bindings: display: Add BCM2712 HVS bindings")
> > added the compatible string for BCM2712, but missed out that
> > the number of interrupts and clocks changed too, and both need to be
> > named.
> >
> > Update to validate clock, interrupts, and their names for the variants.
> >
> > Fixes: 6cfcbe548a3a ("dt-bindings: display: Add BCM2712 HVS bindings")
> > Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
> > ---
> > .../bindings/display/brcm,bcm2835-hvs.yaml | 84 ++++++++++++++++++----
> > 1 file changed, 70 insertions(+), 14 deletions(-)
> >
> > diff --git a/Documentation/devicetree/bindings/display/brcm,bcm2835-hvs.yaml b/Documentation/devicetree/bindings/display/brcm,bcm2835-hvs.yaml
> > index f91c9dce2a44..fd25ee5ce301 100644
> > --- a/Documentation/devicetree/bindings/display/brcm,bcm2835-hvs.yaml
> > +++ b/Documentation/devicetree/bindings/display/brcm,bcm2835-hvs.yaml
> > @@ -20,11 +20,20 @@ properties:
> > maxItems: 1
> >
> > interrupts:
> > - maxItems: 1
> > + minItems: 1
> > + maxItems: 3
> > +
> > + interrupt-names:
> > + minItems: 1
> > + maxItems: 3
> >
> > clocks:
> > - maxItems: 1
> > - description: Core Clock
> > + minItems: 1
> > + maxItems: 2
> > +
> > + clock-names:
> > + minItems: 1
> > + maxItems: 2
> >
> > required:
> > - compatible
> > @@ -33,17 +42,64 @@ required:
> >
> > additionalProperties: false
> >
> > -if:
> > - properties:
> > - compatible:
> > - contains:
> > - enum:
> > - - brcm,bcm2711-hvs
> > - - brcm,bcm2712-hvs
> > -
> > -then:
> > - required:
> > - - clocks
> > +allOf:
> > + - if:
> > + properties:
> > + compatible:
> > + contains:
> > + const: brcm,bcm2711-hvs
> > +
> > + then:
> > + properties:
> > + clocks:
> > + items:
> > + - description: Core Clock
> > + interrupts:
> > + maxItems: 1
>
>
> clock-names and interrupt-names: false, unless driver needs them but all
> this should be explained in the commit msg because it would be a change
> to the binding.
False it is then.
Is there actually a full guide to binding requirements?
https://www.kernel.org/doc/html/latest/devicetree/bindings/writing-schema.html
is the closest I've found, but it doesn't obviously cover these types
of things.
> > +
> > + required:
> > + - clocks
> > +
> > + - if:
> > + properties:
> > + compatible:
> > + contains:
> > + const: brcm,bcm2712-hvs
> > +
> > + then:
> > + properties:
> > + clocks:
> > + minItems: 2
> > + maxItems: 2
> > + clock-names:
> > + items:
> > + - const: core
> > + - const: disp
> > + interrupts:
> > + items:
> > + - description: Channel 0 End of frame
> > + - description: Channel 1 End of frame
> > + - description: Channel 2 End of frame
> > + interrupt-names:
> > + items:
> > + - const: ch0-eof
> > + - const: ch1-eof
> > + - const: ch2-eof
> > + required:
> > + - clocks
> > + - clock-names
> > + - interrupt-names
>
> My previous comment still stands. Reply to people's feedback instead of
> ignoring it.
Your previous comment was
"Why requiring last two names? Commit msg does not explain that."
I didn't ignore it. The driver needs them, and the commit msg states
" but missed out that the number of interrupts and clocks changed too,
and *both need to be
named*.
Update to validate clock, interrupts, and *their names* for the variants."
Is that insufficient?
Dave
> Best regards,
> Krzysztof
>
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: [PATCH v4 2/3] dt-bindings: display: Fix BCM2835 HVS bindings for BCM2712
2024-12-19 11:54 ` Dave Stevenson
@ 2024-12-19 12:14 ` Krzysztof Kozlowski
2024-12-19 12:18 ` Dave Stevenson
0 siblings, 1 reply; 10+ messages in thread
From: Krzysztof Kozlowski @ 2024-12-19 12:14 UTC (permalink / raw)
To: Dave Stevenson
Cc: Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
Simona Vetter, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Florian Fainelli, Broadcom internal kernel review list,
Eric Anholt, Maíra Canal, Raspberry Pi Kernel Maintenance,
Ray Jui, Scott Branden, Doug Berger, Linus Walleij,
Bartosz Golaszewski, Thomas Gleixner, Stefan Wahren, dri-devel,
devicetree, linux-rpi-kernel, linux-arm-kernel, linux-kernel,
Florian Fainelli, linux-gpio
On 19/12/2024 12:54, Dave Stevenson wrote:
> Hi Krzysztof
>
> On Thu, 19 Dec 2024 at 08:42, Krzysztof Kozlowski <krzk@kernel.org> wrote:
>>
>> On Wed, Dec 18, 2024 at 02:48:33PM +0000, Dave Stevenson wrote:
>>> Commit 6cfcbe548a3a ("dt-bindings: display: Add BCM2712 HVS bindings")
>>> added the compatible string for BCM2712, but missed out that
>>> the number of interrupts and clocks changed too, and both need to be
>>> named.
>>>
>>> Update to validate clock, interrupts, and their names for the variants.
>>>
>>> Fixes: 6cfcbe548a3a ("dt-bindings: display: Add BCM2712 HVS bindings")
>>> Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
>>> ---
>>> .../bindings/display/brcm,bcm2835-hvs.yaml | 84 ++++++++++++++++++----
>>> 1 file changed, 70 insertions(+), 14 deletions(-)
>>>
>>> diff --git a/Documentation/devicetree/bindings/display/brcm,bcm2835-hvs.yaml b/Documentation/devicetree/bindings/display/brcm,bcm2835-hvs.yaml
>>> index f91c9dce2a44..fd25ee5ce301 100644
>>> --- a/Documentation/devicetree/bindings/display/brcm,bcm2835-hvs.yaml
>>> +++ b/Documentation/devicetree/bindings/display/brcm,bcm2835-hvs.yaml
>>> @@ -20,11 +20,20 @@ properties:
>>> maxItems: 1
>>>
>>> interrupts:
>>> - maxItems: 1
>>> + minItems: 1
>>> + maxItems: 3
>>> +
>>> + interrupt-names:
>>> + minItems: 1
>>> + maxItems: 3
>>>
>>> clocks:
>>> - maxItems: 1
>>> - description: Core Clock
>>> + minItems: 1
>>> + maxItems: 2
>>> +
>>> + clock-names:
>>> + minItems: 1
>>> + maxItems: 2
>>>
>>> required:
>>> - compatible
>>> @@ -33,17 +42,64 @@ required:
>>>
>>> additionalProperties: false
>>>
>>> -if:
>>> - properties:
>>> - compatible:
>>> - contains:
>>> - enum:
>>> - - brcm,bcm2711-hvs
>>> - - brcm,bcm2712-hvs
>>> -
>>> -then:
>>> - required:
>>> - - clocks
>>> +allOf:
>>> + - if:
>>> + properties:
>>> + compatible:
>>> + contains:
>>> + const: brcm,bcm2711-hvs
>>> +
>>> + then:
>>> + properties:
>>> + clocks:
>>> + items:
>>> + - description: Core Clock
>>> + interrupts:
>>> + maxItems: 1
>>
>>
>> clock-names and interrupt-names: false, unless driver needs them but all
>> this should be explained in the commit msg because it would be a change
>> to the binding.
>
> False it is then.
>
> Is there actually a full guide to binding requirements?
> https://www.kernel.org/doc/html/latest/devicetree/bindings/writing-schema.html
> is the closest I've found, but it doesn't obviously cover these types
> of things.
>
>>> +
>>> + required:
>>> + - clocks
>>> +
>>> + - if:
>>> + properties:
>>> + compatible:
>>> + contains:
>>> + const: brcm,bcm2712-hvs
>>> +
>>> + then:
>>> + properties:
>>> + clocks:
>>> + minItems: 2
>>> + maxItems: 2
>>> + clock-names:
>>> + items:
>>> + - const: core
>>> + - const: disp
>>> + interrupts:
>>> + items:
>>> + - description: Channel 0 End of frame
>>> + - description: Channel 1 End of frame
>>> + - description: Channel 2 End of frame
>>> + interrupt-names:
>>> + items:
>>> + - const: ch0-eof
>>> + - const: ch1-eof
>>> + - const: ch2-eof
>>> + required:
>>> + - clocks
>>> + - clock-names
>>> + - interrupt-names
>>
>> My previous comment still stands. Reply to people's feedback instead of
>> ignoring it.
>
> Your previous comment was
> "Why requiring last two names? Commit msg does not explain that."
>
> I didn't ignore it. The driver needs them, and the commit msg states
Uh, so someone added undocumented ABI. How this passed any checks? Or no
one cared to run validation?
> " but missed out that the number of interrupts and clocks changed too,
> and *both need to be
> named*.
Ah, I really did not get this.
> Update to validate clock, interrupts, and *their names* for the variants."
Please say explicitly that since some commit driver needs this. There
should be a clear reason in the commit msg why you are adding this ABI.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: [PATCH v4 2/3] dt-bindings: display: Fix BCM2835 HVS bindings for BCM2712
2024-12-19 12:14 ` Krzysztof Kozlowski
@ 2024-12-19 12:18 ` Dave Stevenson
0 siblings, 0 replies; 10+ messages in thread
From: Dave Stevenson @ 2024-12-19 12:18 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
Simona Vetter, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Florian Fainelli, Broadcom internal kernel review list,
Eric Anholt, Maíra Canal, Raspberry Pi Kernel Maintenance,
Ray Jui, Scott Branden, Doug Berger, Linus Walleij,
Bartosz Golaszewski, Thomas Gleixner, Stefan Wahren, dri-devel,
devicetree, linux-rpi-kernel, linux-arm-kernel, linux-kernel,
Florian Fainelli, linux-gpio
On Thu, 19 Dec 2024 at 12:14, Krzysztof Kozlowski <krzk@kernel.org> wrote:
>
> On 19/12/2024 12:54, Dave Stevenson wrote:
> > Hi Krzysztof
> >
> > On Thu, 19 Dec 2024 at 08:42, Krzysztof Kozlowski <krzk@kernel.org> wrote:
> >>
> >> On Wed, Dec 18, 2024 at 02:48:33PM +0000, Dave Stevenson wrote:
> >>> Commit 6cfcbe548a3a ("dt-bindings: display: Add BCM2712 HVS bindings")
> >>> added the compatible string for BCM2712, but missed out that
> >>> the number of interrupts and clocks changed too, and both need to be
> >>> named.
> >>>
> >>> Update to validate clock, interrupts, and their names for the variants.
> >>>
> >>> Fixes: 6cfcbe548a3a ("dt-bindings: display: Add BCM2712 HVS bindings")
> >>> Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
> >>> ---
> >>> .../bindings/display/brcm,bcm2835-hvs.yaml | 84 ++++++++++++++++++----
> >>> 1 file changed, 70 insertions(+), 14 deletions(-)
> >>>
> >>> diff --git a/Documentation/devicetree/bindings/display/brcm,bcm2835-hvs.yaml b/Documentation/devicetree/bindings/display/brcm,bcm2835-hvs.yaml
> >>> index f91c9dce2a44..fd25ee5ce301 100644
> >>> --- a/Documentation/devicetree/bindings/display/brcm,bcm2835-hvs.yaml
> >>> +++ b/Documentation/devicetree/bindings/display/brcm,bcm2835-hvs.yaml
> >>> @@ -20,11 +20,20 @@ properties:
> >>> maxItems: 1
> >>>
> >>> interrupts:
> >>> - maxItems: 1
> >>> + minItems: 1
> >>> + maxItems: 3
> >>> +
> >>> + interrupt-names:
> >>> + minItems: 1
> >>> + maxItems: 3
> >>>
> >>> clocks:
> >>> - maxItems: 1
> >>> - description: Core Clock
> >>> + minItems: 1
> >>> + maxItems: 2
> >>> +
> >>> + clock-names:
> >>> + minItems: 1
> >>> + maxItems: 2
> >>>
> >>> required:
> >>> - compatible
> >>> @@ -33,17 +42,64 @@ required:
> >>>
> >>> additionalProperties: false
> >>>
> >>> -if:
> >>> - properties:
> >>> - compatible:
> >>> - contains:
> >>> - enum:
> >>> - - brcm,bcm2711-hvs
> >>> - - brcm,bcm2712-hvs
> >>> -
> >>> -then:
> >>> - required:
> >>> - - clocks
> >>> +allOf:
> >>> + - if:
> >>> + properties:
> >>> + compatible:
> >>> + contains:
> >>> + const: brcm,bcm2711-hvs
> >>> +
> >>> + then:
> >>> + properties:
> >>> + clocks:
> >>> + items:
> >>> + - description: Core Clock
> >>> + interrupts:
> >>> + maxItems: 1
> >>
> >>
> >> clock-names and interrupt-names: false, unless driver needs them but all
> >> this should be explained in the commit msg because it would be a change
> >> to the binding.
> >
> > False it is then.
> >
> > Is there actually a full guide to binding requirements?
> > https://www.kernel.org/doc/html/latest/devicetree/bindings/writing-schema.html
> > is the closest I've found, but it doesn't obviously cover these types
> > of things.
> >
> >>> +
> >>> + required:
> >>> + - clocks
> >>> +
> >>> + - if:
> >>> + properties:
> >>> + compatible:
> >>> + contains:
> >>> + const: brcm,bcm2712-hvs
> >>> +
> >>> + then:
> >>> + properties:
> >>> + clocks:
> >>> + minItems: 2
> >>> + maxItems: 2
> >>> + clock-names:
> >>> + items:
> >>> + - const: core
> >>> + - const: disp
> >>> + interrupts:
> >>> + items:
> >>> + - description: Channel 0 End of frame
> >>> + - description: Channel 1 End of frame
> >>> + - description: Channel 2 End of frame
> >>> + interrupt-names:
> >>> + items:
> >>> + - const: ch0-eof
> >>> + - const: ch1-eof
> >>> + - const: ch2-eof
> >>> + required:
> >>> + - clocks
> >>> + - clock-names
> >>> + - interrupt-names
> >>
> >> My previous comment still stands. Reply to people's feedback instead of
> >> ignoring it.
> >
> > Your previous comment was
> > "Why requiring last two names? Commit msg does not explain that."
> >
> > I didn't ignore it. The driver needs them, and the commit msg states
>
> Uh, so someone added undocumented ABI. How this passed any checks? Or no
> one cared to run validation?
See the cover letter:
"I missed the DT errors from the recent patchset[1] (DT patches
in linux-next via Florian, DRM bindings patches on dri-misc-next)
as Rob's bot report got spam filtered, so this is a fixup set."
> > " but missed out that the number of interrupts and clocks changed too,
> > and *both need to be
> > named*.
>
> Ah, I really did not get this.
>
> > Update to validate clock, interrupts, and *their names* for the variants."
>
> Please say explicitly that since some commit driver needs this. There
> should be a clear reason in the commit msg why you are adding this ABI.
OK, will do.
Dave
> Best regards,
> Krzysztof
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v4 3/3] dt-bindings: interrupt-controller: brcm,bcm2836-l1-intc: Drop interrupt-controller requirement
2024-12-18 14:48 [PATCH v4 0/3] drm/vc4: Fixup DT and DT binding issues from recent patchset Dave Stevenson
2024-12-18 14:48 ` [PATCH v4 1/3] dt-bindings: display: bcm2711-hdmi: Add interrupt details for BCM2712 Dave Stevenson
2024-12-18 14:48 ` [PATCH v4 2/3] dt-bindings: display: Fix BCM2835 HVS bindings " Dave Stevenson
@ 2024-12-18 14:48 ` Dave Stevenson
2024-12-18 17:30 ` Florian Fainelli
2 siblings, 1 reply; 10+ messages in thread
From: Dave Stevenson @ 2024-12-18 14:48 UTC (permalink / raw)
To: Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
Simona Vetter, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Florian Fainelli, Broadcom internal kernel review list,
Eric Anholt, Maíra Canal, Raspberry Pi Kernel Maintenance,
Ray Jui, Scott Branden, Doug Berger, Linus Walleij,
Bartosz Golaszewski, Thomas Gleixner, Stefan Wahren
Cc: dri-devel, devicetree, linux-rpi-kernel, linux-arm-kernel,
linux-kernel, Florian Fainelli, linux-gpio, Dave Stevenson,
Krzysztof Kozlowski
Since commit 88bbe85dcd37 ("irqchip: bcm2836: Move SMP startup code to
arch/arm (v2)") the bcm2836-l1-intc block on bcm2711 is only used as a
base address for the smp_boot_secondary hook on 32 bit kernels. It is
not used as an interrupt controller.
Drop the binding requirement for interrupt-controller and interrupt-cells
to satisfy validation on this platform.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
.../devicetree/bindings/interrupt-controller/brcm,bcm2836-l1-intc.yaml | 2 --
1 file changed, 2 deletions(-)
diff --git a/Documentation/devicetree/bindings/interrupt-controller/brcm,bcm2836-l1-intc.yaml b/Documentation/devicetree/bindings/interrupt-controller/brcm,bcm2836-l1-intc.yaml
index 5fda626c80ce..2ff390c1705b 100644
--- a/Documentation/devicetree/bindings/interrupt-controller/brcm,bcm2836-l1-intc.yaml
+++ b/Documentation/devicetree/bindings/interrupt-controller/brcm,bcm2836-l1-intc.yaml
@@ -34,8 +34,6 @@ properties:
required:
- compatible
- reg
- - interrupt-controller
- - '#interrupt-cells'
additionalProperties: false
--
2.34.1
^ permalink raw reply related [flat|nested] 10+ messages in thread* Re: [PATCH v4 3/3] dt-bindings: interrupt-controller: brcm,bcm2836-l1-intc: Drop interrupt-controller requirement
2024-12-18 14:48 ` [PATCH v4 3/3] dt-bindings: interrupt-controller: brcm,bcm2836-l1-intc: Drop interrupt-controller requirement Dave Stevenson
@ 2024-12-18 17:30 ` Florian Fainelli
0 siblings, 0 replies; 10+ messages in thread
From: Florian Fainelli @ 2024-12-18 17:30 UTC (permalink / raw)
To: Dave Stevenson, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Florian Fainelli,
Broadcom internal kernel review list, Eric Anholt,
Maíra Canal, Raspberry Pi Kernel Maintenance, Ray Jui,
Scott Branden, Doug Berger, Linus Walleij, Bartosz Golaszewski,
Thomas Gleixner, Stefan Wahren
Cc: dri-devel, devicetree, linux-rpi-kernel, linux-arm-kernel,
linux-kernel, linux-gpio, Krzysztof Kozlowski
On 12/18/24 06:48, Dave Stevenson wrote:
> Since commit 88bbe85dcd37 ("irqchip: bcm2836: Move SMP startup code to
> arch/arm (v2)") the bcm2836-l1-intc block on bcm2711 is only used as a
> base address for the smp_boot_secondary hook on 32 bit kernels. It is
> not used as an interrupt controller.
>
> Drop the binding requirement for interrupt-controller and interrupt-cells
> to satisfy validation on this platform.
>
> Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
--
Florian
^ permalink raw reply [flat|nested] 10+ messages in thread