Linux-Clk Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] dt-bindings: arm: bcm: Add a select to the RPI Firmware binding
@ 2020-06-26 11:54 Maxime Ripard
  2020-06-26 16:03 ` Florian Fainelli
  0 siblings, 1 reply; 2+ messages in thread
From: Maxime Ripard @ 2020-06-26 11:54 UTC (permalink / raw)
  To: Nicolas Saenz Julienne, Mike Turquette, Stephen Boyd
  Cc: linux-rpi-kernel, bcm-kernel-feedback-list, linux-clk,
	Mark Rutland, Rob Herring, Frank Rowand, devicetree,
	Florian Fainelli, Maxime Ripard

The RaspberryPi firmware binding uses two compatible, include simple-bus.
The select statement generated by default will thus select any node that
has simple-bus, not all of them being the raspberrypi firmware node.

This results in warnings being wrongfully reported. Let's add a custom
select statement to fix that.

Fixes: 5bc0b9be8544 ("dt-bindings: arm: bcm: Convert BCM2835 firmware binding to YAML")
Signed-off-by: Maxime Ripard <maxime@cerno.tech>

---

The original binding has been merged through the clock tree, so it should
be merged there.

Even though the original binding (and the DT) are using the simple-bus
compatible, this creates some DTC warnings since the firmware really isn't
a bus, so the node name doesn't match what a bus should have, none of the
children have a reg property, #address-cells and #size-cells are missing,
etc.

I can only guess that simple-bus was used to make the sub-devices probe,
but maybe simple-mfd would be more appropriate here?
---
 .../bindings/arm/bcm/raspberrypi,bcm2835-firmware.yaml   | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835-firmware.yaml b/Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835-firmware.yaml
index b48ed875eb8e..17e4f20c8d39 100644
--- a/Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835-firmware.yaml
+++ b/Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835-firmware.yaml
@@ -10,6 +10,15 @@ maintainers:
   - Eric Anholt <eric@anholt.net>
   - Stefan Wahren <wahrenst@gmx.net>
 
+select:
+  properties:
+    compatible:
+      contains:
+        const: raspberrypi,bcm2835-firmware
+
+  required:
+    - compatible
+
 properties:
   compatible:
     items:
-- 
2.26.2


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] dt-bindings: arm: bcm: Add a select to the RPI Firmware binding
  2020-06-26 11:54 [PATCH] dt-bindings: arm: bcm: Add a select to the RPI Firmware binding Maxime Ripard
@ 2020-06-26 16:03 ` Florian Fainelli
  0 siblings, 0 replies; 2+ messages in thread
From: Florian Fainelli @ 2020-06-26 16:03 UTC (permalink / raw)
  To: Maxime Ripard, Nicolas Saenz Julienne, Mike Turquette, Stephen Boyd
  Cc: linux-rpi-kernel, bcm-kernel-feedback-list, linux-clk,
	Mark Rutland, Rob Herring, Frank Rowand, devicetree



On 6/26/2020 4:54 AM, Maxime Ripard wrote:
> The RaspberryPi firmware binding uses two compatible, include simple-bus.
> The select statement generated by default will thus select any node that
> has simple-bus, not all of them being the raspberrypi firmware node.
> 
> This results in warnings being wrongfully reported. Let's add a custom
> select statement to fix that.
> 
> Fixes: 5bc0b9be8544 ("dt-bindings: arm: bcm: Convert BCM2835 firmware binding to YAML")
> Signed-off-by: Maxime Ripard <maxime@cerno.tech>

Acked-by: Florian Fainelli <f.fainelli@gmail.com>

Thanks Maxime!
-- 
Florian

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-26 11:54 [PATCH] dt-bindings: arm: bcm: Add a select to the RPI Firmware binding Maxime Ripard
2020-06-26 16:03 ` Florian Fainelli

Linux-Clk Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-clk/0 linux-clk/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-clk linux-clk/ https://lore.kernel.org/linux-clk \
		linux-clk@vger.kernel.org
	public-inbox-index linux-clk

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-clk


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git