linux-pwm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/10] ARM: dts: bcm283x: Improve device-trees and bindings
@ 2023-06-04 12:12 Stefan Wahren
  2023-06-04 12:12 ` [PATCH 01/10] ARM: dts: bcm283x: Fix pinctrl groups Stefan Wahren
                   ` (9 more replies)
  0 siblings, 10 replies; 26+ messages in thread
From: Stefan Wahren @ 2023-06-04 12:12 UTC (permalink / raw)
  To: Vinod Koul, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Florian Fainelli, Ray Jui, Scott Branden, Jassi Brar,
	Thierry Reding, Uwe Kleine-König, Rafael J. Wysocki,
	Daniel Lezcano, Amit Kucheria, Zhang Rui, Thomas Gleixner
  Cc: linux-arm-kernel, dmaengine, devicetree, linux-mmc, linux-pwm,
	linux-pm, bcm-kernel-feedback-list, Stefan Wahren

This series fix some dtbs_check warning for the Raspberry Pi boards
and convert 6 txt DT bindings for BCM2835 to YAML.

Please be aware that there is a functional dependency between patch 2
and 4. So just cherry-picking patch 4 would break boot of BCM2835.

Stefan Wahren (10):
  ARM: dts: bcm283x: Fix pinctrl groups
  dmaengine: bcm2835: also support generic dma-channel-mask
  dt-bindings: dma: convert bcm2835-dma bindings to YAML
  ARM: dts: bcm2835: adjust DMA nodes
  dt-bindings: pwm: convert pwm-bcm2835 bindings to YAML
  ARM: dts: bcm283x: Increase pwm-cells
  dt-bindings: mailbox: convert bcm2835-mbox bindings to YAML
  dt-bindings: mmc: convert bcm2835-sdhost bindings to YAML
  dt-bindings: thermal: convert bcm2835-thermal bindings to YAML
  dt-bindings: timer: convert bcm2835-system-timer bindings to YAML

 .../bindings/dma/brcm,bcm2835-dma.txt         | 83 ----------------
 .../bindings/dma/brcm,bcm2835-dma.yaml        | 98 +++++++++++++++++++
 .../bindings/mailbox/brcm,bcm2835-mbox.txt    | 26 -----
 .../bindings/mailbox/brcm,bcm2835-mbox.yaml   | 40 ++++++++
 .../bindings/mmc/brcm,bcm2835-sdhost.txt      | 23 -----
 .../bindings/mmc/brcm,bcm2835-sdhost.yaml     | 54 ++++++++++
 .../devicetree/bindings/pwm/pwm-bcm2835.txt   | 30 ------
 .../devicetree/bindings/pwm/pwm-bcm2835.yaml  | 43 ++++++++
 .../bindings/thermal/brcm,bcm2835-thermal.txt | 41 --------
 .../thermal/brcm,bcm2835-thermal.yaml         | 48 +++++++++
 .../timer/brcm,bcm2835-system-timer.txt       | 22 -----
 .../timer/brcm,bcm2835-system-timer.yaml      | 44 +++++++++
 arch/arm/boot/dts/bcm2711.dtsi                |  6 +-
 arch/arm/boot/dts/bcm2835-common.dtsi         |  4 +-
 arch/arm/boot/dts/bcm2835-rpi-a-plus.dts      |  1 +
 arch/arm/boot/dts/bcm2835-rpi-a.dts           |  1 +
 arch/arm/boot/dts/bcm2835-rpi-b-plus.dts      |  1 +
 arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts      |  1 +
 arch/arm/boot/dts/bcm2835-rpi-b.dts           |  1 +
 arch/arm/boot/dts/bcm2835-rpi-cm1-io1.dts     |  1 +
 arch/arm/boot/dts/bcm2835-rpi-zero-w.dts      |  2 +
 arch/arm/boot/dts/bcm2835-rpi-zero.dts        |  1 +
 arch/arm/boot/dts/bcm2835-rpi.dtsi            |  2 -
 arch/arm/boot/dts/bcm2836-rpi-2-b.dts         |  1 +
 arch/arm/boot/dts/bcm2837-rpi-cm3-io3.dts     |  1 +
 arch/arm/boot/dts/bcm2837-rpi-zero-2-w.dts    |  2 +
 arch/arm/boot/dts/bcm283x.dtsi                |  2 +-
 drivers/dma/bcm2835-dma.c                     | 18 ++--
 28 files changed, 358 insertions(+), 239 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/dma/brcm,bcm2835-dma.txt
 create mode 100644 Documentation/devicetree/bindings/dma/brcm,bcm2835-dma.yaml
 delete mode 100644 Documentation/devicetree/bindings/mailbox/brcm,bcm2835-mbox.txt
 create mode 100644 Documentation/devicetree/bindings/mailbox/brcm,bcm2835-mbox.yaml
 delete mode 100644 Documentation/devicetree/bindings/mmc/brcm,bcm2835-sdhost.txt
 create mode 100644 Documentation/devicetree/bindings/mmc/brcm,bcm2835-sdhost.yaml
 delete mode 100644 Documentation/devicetree/bindings/pwm/pwm-bcm2835.txt
 create mode 100644 Documentation/devicetree/bindings/pwm/pwm-bcm2835.yaml
 delete mode 100644 Documentation/devicetree/bindings/thermal/brcm,bcm2835-thermal.txt
 create mode 100644 Documentation/devicetree/bindings/thermal/brcm,bcm2835-thermal.yaml
 delete mode 100644 Documentation/devicetree/bindings/timer/brcm,bcm2835-system-timer.txt
 create mode 100644 Documentation/devicetree/bindings/timer/brcm,bcm2835-system-timer.yaml

-- 
2.34.1


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

* [PATCH 01/10] ARM: dts: bcm283x: Fix pinctrl groups
  2023-06-04 12:12 [PATCH 00/10] ARM: dts: bcm283x: Improve device-trees and bindings Stefan Wahren
@ 2023-06-04 12:12 ` Stefan Wahren
  2023-06-04 12:12 ` [PATCH 02/10] dmaengine: bcm2835: also support generic dma-channel-mask Stefan Wahren
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 26+ messages in thread
From: Stefan Wahren @ 2023-06-04 12:12 UTC (permalink / raw)
  To: Vinod Koul, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Florian Fainelli, Ray Jui, Scott Branden, Jassi Brar,
	Thierry Reding, Uwe Kleine-König, Rafael J. Wysocki,
	Daniel Lezcano, Amit Kucheria, Zhang Rui, Thomas Gleixner
  Cc: linux-arm-kernel, dmaengine, devicetree, linux-mmc, linux-pwm,
	linux-pm, bcm-kernel-feedback-list, Stefan Wahren

Currently the dtbs_check for bcm2837 generates warnings like this:

gpio@7e200000: 'pinctrl-0' is a dependency of 'pinctrl-names'

This is caused by the definition of pinctrl-names without matching
pinctrl group and vice versa. So defining both at the same place
make the dts files easier to review.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
---
 arch/arm/boot/dts/bcm2835-rpi-a-plus.dts   | 1 +
 arch/arm/boot/dts/bcm2835-rpi-a.dts        | 1 +
 arch/arm/boot/dts/bcm2835-rpi-b-plus.dts   | 1 +
 arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts   | 1 +
 arch/arm/boot/dts/bcm2835-rpi-b.dts        | 1 +
 arch/arm/boot/dts/bcm2835-rpi-cm1-io1.dts  | 1 +
 arch/arm/boot/dts/bcm2835-rpi-zero-w.dts   | 2 ++
 arch/arm/boot/dts/bcm2835-rpi-zero.dts     | 1 +
 arch/arm/boot/dts/bcm2835-rpi.dtsi         | 2 --
 arch/arm/boot/dts/bcm2836-rpi-2-b.dts      | 1 +
 arch/arm/boot/dts/bcm2837-rpi-cm3-io3.dts  | 1 +
 arch/arm/boot/dts/bcm2837-rpi-zero-2-w.dts | 2 ++
 12 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/bcm2835-rpi-a-plus.dts b/arch/arm/boot/dts/bcm2835-rpi-a-plus.dts
index 02ce817868ba..069b48272aa5 100644
--- a/arch/arm/boot/dts/bcm2835-rpi-a-plus.dts
+++ b/arch/arm/boot/dts/bcm2835-rpi-a-plus.dts
@@ -81,6 +81,7 @@ &gpio {
 			  "SD_DATA2_R",
 			  "SD_DATA3_R";
 
+	pinctrl-names = "default";
 	pinctrl-0 = <&gpioout &alt0 &i2s_alt0>;
 
 	/* I2S interface */
diff --git a/arch/arm/boot/dts/bcm2835-rpi-a.dts b/arch/arm/boot/dts/bcm2835-rpi-a.dts
index 3fdf60eb11dc..2726c00431e8 100644
--- a/arch/arm/boot/dts/bcm2835-rpi-a.dts
+++ b/arch/arm/boot/dts/bcm2835-rpi-a.dts
@@ -83,6 +83,7 @@ &gpio {
 			  "SD_DATA2_R",
 			  "SD_DATA3_R";
 
+	pinctrl-names = "default";
 	pinctrl-0 = <&gpioout &alt0 &i2s_alt2>;
 
 	/* I2S interface */
diff --git a/arch/arm/boot/dts/bcm2835-rpi-b-plus.dts b/arch/arm/boot/dts/bcm2835-rpi-b-plus.dts
index 9956fd06a4b6..c57b999a4520 100644
--- a/arch/arm/boot/dts/bcm2835-rpi-b-plus.dts
+++ b/arch/arm/boot/dts/bcm2835-rpi-b-plus.dts
@@ -83,6 +83,7 @@ &gpio {
 			  "SD_DATA2_R",
 			  "SD_DATA3_R";
 
+	pinctrl-names = "default";
 	pinctrl-0 = <&gpioout &alt0 &i2s_alt0>;
 
 	/* I2S interface */
diff --git a/arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts b/arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts
index 4e1770afb145..ae6d3a9586ab 100644
--- a/arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts
+++ b/arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts
@@ -83,6 +83,7 @@ &gpio {
 			  "SD_DATA2_R",
 			  "SD_DATA3_R";
 
+	pinctrl-names = "default";
 	pinctrl-0 = <&gpioout &alt0 &i2s_alt2>;
 
 	/* I2S interface */
diff --git a/arch/arm/boot/dts/bcm2835-rpi-b.dts b/arch/arm/boot/dts/bcm2835-rpi-b.dts
index eec1d0892d33..72764be75a79 100644
--- a/arch/arm/boot/dts/bcm2835-rpi-b.dts
+++ b/arch/arm/boot/dts/bcm2835-rpi-b.dts
@@ -83,6 +83,7 @@ &gpio {
 			  "SD_DATA2_R",
 			  "SD_DATA3_R";
 
+	pinctrl-names = "default";
 	pinctrl-0 = <&gpioout &alt0>;
 };
 
diff --git a/arch/arm/boot/dts/bcm2835-rpi-cm1-io1.dts b/arch/arm/boot/dts/bcm2835-rpi-cm1-io1.dts
index 87958a96c3e0..3f9d198ac3ab 100644
--- a/arch/arm/boot/dts/bcm2835-rpi-cm1-io1.dts
+++ b/arch/arm/boot/dts/bcm2835-rpi-cm1-io1.dts
@@ -73,6 +73,7 @@ &gpio {
 			  "SD_DATA2_R",
 			  "SD_DATA3_R";
 
+	pinctrl-names = "default";
 	pinctrl-0 = <&gpioout &alt0>;
 };
 
diff --git a/arch/arm/boot/dts/bcm2835-rpi-zero-w.dts b/arch/arm/boot/dts/bcm2835-rpi-zero-w.dts
index dbf825985ec0..1f0b163e400c 100644
--- a/arch/arm/boot/dts/bcm2835-rpi-zero-w.dts
+++ b/arch/arm/boot/dts/bcm2835-rpi-zero-w.dts
@@ -97,6 +97,7 @@ &gpio {
 			  "SD_DATA2_R",
 			  "SD_DATA3_R";
 
+	pinctrl-names = "default";
 	pinctrl-0 = <&gpioout &alt0>;
 };
 
@@ -111,6 +112,7 @@ &led_act {
 };
 
 &sdhci {
+	pinctrl-names = "default";
 	pinctrl-0 = <&emmc_gpio34 &gpclk2_gpio43>;
 };
 
diff --git a/arch/arm/boot/dts/bcm2835-rpi-zero.dts b/arch/arm/boot/dts/bcm2835-rpi-zero.dts
index f80e65a825fd..539c19c10946 100644
--- a/arch/arm/boot/dts/bcm2835-rpi-zero.dts
+++ b/arch/arm/boot/dts/bcm2835-rpi-zero.dts
@@ -85,6 +85,7 @@ &gpio {
 			  "SD_DATA2_R",
 			  "SD_DATA3_R";
 
+	pinctrl-names = "default";
 	pinctrl-0 = <&gpioout &alt0 &i2s_alt0>;
 
 	/* I2S interface */
diff --git a/arch/arm/boot/dts/bcm2835-rpi.dtsi b/arch/arm/boot/dts/bcm2835-rpi.dtsi
index ee9ee9d1fe65..f0acc9390f31 100644
--- a/arch/arm/boot/dts/bcm2835-rpi.dtsi
+++ b/arch/arm/boot/dts/bcm2835-rpi.dtsi
@@ -26,8 +26,6 @@ vchiq: mailbox@7e00b840 {
 };
 
 &gpio {
-	pinctrl-names = "default";
-
 	gpioout: gpioout {
 		brcm,pins = <6>;
 		brcm,function = <BCM2835_FSEL_GPIO_OUT>;
diff --git a/arch/arm/boot/dts/bcm2836-rpi-2-b.dts b/arch/arm/boot/dts/bcm2836-rpi-2-b.dts
index 6068ec390081..79918033750e 100644
--- a/arch/arm/boot/dts/bcm2836-rpi-2-b.dts
+++ b/arch/arm/boot/dts/bcm2836-rpi-2-b.dts
@@ -82,6 +82,7 @@ &gpio {
 			  "SD_DATA2_R",
 			  "SD_DATA3_R";
 
+	pinctrl-names = "default";
 	pinctrl-0 = <&gpioout &alt0 &i2s_alt0>;
 
 	/* I2S interface */
diff --git a/arch/arm/boot/dts/bcm2837-rpi-cm3-io3.dts b/arch/arm/boot/dts/bcm2837-rpi-cm3-io3.dts
index cf84e69fced8..72d26d130efa 100644
--- a/arch/arm/boot/dts/bcm2837-rpi-cm3-io3.dts
+++ b/arch/arm/boot/dts/bcm2837-rpi-cm3-io3.dts
@@ -72,6 +72,7 @@ &gpio {
 			  "SD_DATA2_R",
 			  "SD_DATA3_R";
 
+	pinctrl-names = "default";
 	pinctrl-0 = <&gpioout &alt0>;
 };
 
diff --git a/arch/arm/boot/dts/bcm2837-rpi-zero-2-w.dts b/arch/arm/boot/dts/bcm2837-rpi-zero-2-w.dts
index b9cc4594398b..85cf594724ef 100644
--- a/arch/arm/boot/dts/bcm2837-rpi-zero-2-w.dts
+++ b/arch/arm/boot/dts/bcm2837-rpi-zero-2-w.dts
@@ -95,6 +95,7 @@ &gpio {
 			  "SD_DATA2_R",
 			  "SD_DATA3_R";
 
+	pinctrl-names = "default";
 	pinctrl-0 = <&gpioout &alt0>;
 };
 
@@ -109,6 +110,7 @@ &led_act {
 };
 
 &sdhci {
+	pinctrl-names = "default";
 	pinctrl-0 = <&emmc_gpio34 &gpclk2_gpio43>;
 };
 
-- 
2.34.1


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

* [PATCH 02/10] dmaengine: bcm2835: also support generic dma-channel-mask
  2023-06-04 12:12 [PATCH 00/10] ARM: dts: bcm283x: Improve device-trees and bindings Stefan Wahren
  2023-06-04 12:12 ` [PATCH 01/10] ARM: dts: bcm283x: Fix pinctrl groups Stefan Wahren
@ 2023-06-04 12:12 ` Stefan Wahren
  2023-06-10 10:52   ` Stefan Wahren
  2023-06-04 12:12 ` [PATCH 03/10] dt-bindings: dma: convert bcm2835-dma bindings to YAML Stefan Wahren
                   ` (7 subsequent siblings)
  9 siblings, 1 reply; 26+ messages in thread
From: Stefan Wahren @ 2023-06-04 12:12 UTC (permalink / raw)
  To: Vinod Koul, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Florian Fainelli, Ray Jui, Scott Branden, Jassi Brar,
	Thierry Reding, Uwe Kleine-König, Rafael J. Wysocki,
	Daniel Lezcano, Amit Kucheria, Zhang Rui, Thomas Gleixner
  Cc: linux-arm-kernel, dmaengine, devicetree, linux-mmc, linux-pwm,
	linux-pm, bcm-kernel-feedback-list, Stefan Wahren, John Stultz

Since commit e2d896c08ca3 ("Documentation: bindings: dma: Add
binding for dma-channel-mask") there is a generic property to list
available DMA channels for the kernel to use. The generic property
has been implemented by some other platforms.
So implement support for the generic one and consider the
vendor specific one as deprecated. This also simplifies the YAML
conversion of the BCM2835 DMA DT bindings a little bit.

Cc: John Stultz <john.stultz@linaro.org>
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
---
 drivers/dma/bcm2835-dma.c | 18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)

diff --git a/drivers/dma/bcm2835-dma.c b/drivers/dma/bcm2835-dma.c
index 0807fb9eb262..a0573977a373 100644
--- a/drivers/dma/bcm2835-dma.c
+++ b/drivers/dma/bcm2835-dma.c
@@ -941,12 +941,18 @@ static int bcm2835_dma_probe(struct platform_device *pdev)
 	}
 
 	/* Request DMA channel mask from device tree */
-	if (of_property_read_u32(pdev->dev.of_node,
-			"brcm,dma-channel-mask",
-			&chans_available)) {
-		dev_err(&pdev->dev, "Failed to get channel mask\n");
-		rc = -EINVAL;
-		goto err_no_dma;
+	if (of_property_read_u32(pdev->dev.of_node, "dma-channel-mask",
+				 &chans_available)) {
+		if (of_property_read_u32(pdev->dev.of_node,
+					 "brcm,dma-channel-mask",
+					 &chans_available)) {
+			dev_err(&pdev->dev, "Failed to get channel mask\n");
+			rc = -EINVAL;
+			goto err_no_dma;
+		} else {
+			dev_warn(&pdev->dev,
+				 "brcm,dma-channel-mask is deprecated, update your device-tree\n");
+		}
 	}
 
 	/* get irqs for each channel that we support */
-- 
2.34.1


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

* [PATCH 03/10] dt-bindings: dma: convert bcm2835-dma bindings to YAML
  2023-06-04 12:12 [PATCH 00/10] ARM: dts: bcm283x: Improve device-trees and bindings Stefan Wahren
  2023-06-04 12:12 ` [PATCH 01/10] ARM: dts: bcm283x: Fix pinctrl groups Stefan Wahren
  2023-06-04 12:12 ` [PATCH 02/10] dmaengine: bcm2835: also support generic dma-channel-mask Stefan Wahren
@ 2023-06-04 12:12 ` Stefan Wahren
  2023-06-09 21:48   ` Rob Herring
  2023-06-04 12:12 ` [PATCH 04/10] ARM: dts: bcm2835: adjust DMA nodes Stefan Wahren
                   ` (6 subsequent siblings)
  9 siblings, 1 reply; 26+ messages in thread
From: Stefan Wahren @ 2023-06-04 12:12 UTC (permalink / raw)
  To: Vinod Koul, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Florian Fainelli, Ray Jui, Scott Branden, Jassi Brar,
	Thierry Reding, Uwe Kleine-König, Rafael J. Wysocki,
	Daniel Lezcano, Amit Kucheria, Zhang Rui, Thomas Gleixner
  Cc: linux-arm-kernel, dmaengine, devicetree, linux-mmc, linux-pwm,
	linux-pm, bcm-kernel-feedback-list, Stefan Wahren

Convert the DT binding document for bcm2835-dma from .txt to YAML.
Since brcm,dma-channel-mask is considered deprecated use the
generic property.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
---
 .../bindings/dma/brcm,bcm2835-dma.txt         | 83 ----------------
 .../bindings/dma/brcm,bcm2835-dma.yaml        | 98 +++++++++++++++++++
 2 files changed, 98 insertions(+), 83 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/dma/brcm,bcm2835-dma.txt
 create mode 100644 Documentation/devicetree/bindings/dma/brcm,bcm2835-dma.yaml

diff --git a/Documentation/devicetree/bindings/dma/brcm,bcm2835-dma.txt b/Documentation/devicetree/bindings/dma/brcm,bcm2835-dma.txt
deleted file mode 100644
index b6a8cc0978cd..000000000000
--- a/Documentation/devicetree/bindings/dma/brcm,bcm2835-dma.txt
+++ /dev/null
@@ -1,83 +0,0 @@
-* BCM2835 DMA controller
-
-The BCM2835 DMA controller has 16 channels in total.
-Only the lower 13 channels have an associated IRQ.
-Some arbitrary channels are used by the firmware
-(1,3,6,7 in the current firmware version).
-The channels 0,2 and 3 have special functionality
-and should not be used by the driver.
-
-Required properties:
-- compatible: Should be "brcm,bcm2835-dma".
-- reg: Should contain DMA registers location and length.
-- interrupts: Should contain the DMA interrupts associated
-		to the DMA channels in ascending order.
-- interrupt-names: Should contain the names of the interrupt
-		   in the form "dmaXX".
-		   Use "dma-shared-all" for the common interrupt line
-		   that is shared by all dma channels.
-- #dma-cells: Must be <1>, the cell in the dmas property of the
-		client device represents the DREQ number.
-- brcm,dma-channel-mask: Bit mask representing the channels
-			 not used by the firmware in ascending order,
-			 i.e. first channel corresponds to LSB.
-
-Example:
-
-dma: dma@7e007000 {
-	compatible = "brcm,bcm2835-dma";
-	reg = <0x7e007000 0xf00>;
-	interrupts = <1 16>,
-		     <1 17>,
-		     <1 18>,
-		     <1 19>,
-		     <1 20>,
-		     <1 21>,
-		     <1 22>,
-		     <1 23>,
-		     <1 24>,
-		     <1 25>,
-		     <1 26>,
-		     /* dma channel 11-14 share one irq */
-		     <1 27>,
-		     <1 27>,
-		     <1 27>,
-		     <1 27>,
-		     /* unused shared irq for all channels */
-		     <1 28>;
-	interrupt-names = "dma0",
-			  "dma1",
-			  "dma2",
-			  "dma3",
-			  "dma4",
-			  "dma5",
-			  "dma6",
-			  "dma7",
-			  "dma8",
-			  "dma9",
-			  "dma10",
-			  "dma11",
-			  "dma12",
-			  "dma13",
-			  "dma14",
-			  "dma-shared-all";
-
-	#dma-cells = <1>;
-	brcm,dma-channel-mask = <0x7f35>;
-};
-
-
-DMA clients connected to the BCM2835 DMA controller must use the format
-described in the dma.txt file, using a two-cell specifier for each channel.
-
-Example:
-
-bcm2835_i2s: i2s@7e203000 {
-	compatible = "brcm,bcm2835-i2s";
-	reg = <	0x7e203000 0x24>;
-	clocks = <&clocks BCM2835_CLOCK_PCM>;
-
-	dmas = <&dma 2>,
-	       <&dma 3>;
-	dma-names = "tx", "rx";
-};
diff --git a/Documentation/devicetree/bindings/dma/brcm,bcm2835-dma.yaml b/Documentation/devicetree/bindings/dma/brcm,bcm2835-dma.yaml
new file mode 100644
index 000000000000..a09000a8131f
--- /dev/null
+++ b/Documentation/devicetree/bindings/dma/brcm,bcm2835-dma.yaml
@@ -0,0 +1,98 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/dma/brcm,bcm2835-dma.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: BCM2835 DMA controller
+
+maintainers:
+  - Nicolas Saenz Julienne <nsaenz@kernel.org>
+
+description:
+  The BCM2835 DMA controller has 16 channels in total. Only the lower
+  13 channels have an associated IRQ. Some arbitrary channels are used by the
+  VideoCore firmware (1,3,6,7 in the current firmware version). The channels
+  0, 2 and 3 have special functionality and should not be used by the driver.
+
+allOf:
+  - $ref: "dma-controller.yaml#"
+
+properties:
+  compatible:
+    const: brcm,bcm2835-dma
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    description:
+      Should contain the DMA interrupts associated to the DMA channels in
+      ascending order.
+    minItems: 1
+    maxItems: 16
+
+  interrupt-names:
+    minItems: 1
+    maxItems: 16
+
+  '#dma-cells':
+    description: The single cell represents the DREQ number.
+    const: 1
+
+  dma-channel-mask:
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+  - interrupts
+  - "#dma-cells"
+  - dma-channel-mask
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    dma-controller@7e007000 {
+      compatible = "brcm,bcm2835-dma";
+      reg = <0x7e007000 0xf00>;
+      interrupts = <1 16>,
+                   <1 17>,
+                   <1 18>,
+                   <1 19>,
+                   <1 20>,
+                   <1 21>,
+                   <1 22>,
+                   <1 23>,
+                   <1 24>,
+                   <1 25>,
+                   <1 26>,
+                   /* dma channel 11-14 share one irq */
+                   <1 27>,
+                   <1 27>,
+                   <1 27>,
+                   <1 27>,
+                   /* unused shared irq for all channels */
+                   <1 28>;
+      interrupt-names = "dma0",
+                        "dma1",
+                        "dma2",
+                        "dma3",
+                        "dma4",
+                        "dma5",
+                        "dma6",
+                        "dma7",
+                        "dma8",
+                        "dma9",
+                        "dma10",
+                        "dma11",
+                        "dma12",
+                        "dma13",
+                        "dma14",
+                        "dma-shared-all";
+        #dma-cells = <1>;
+        dma-channel-mask = <0x7f35>;
+    };
+
+...
-- 
2.34.1


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

* [PATCH 04/10] ARM: dts: bcm2835: adjust DMA nodes
  2023-06-04 12:12 [PATCH 00/10] ARM: dts: bcm283x: Improve device-trees and bindings Stefan Wahren
                   ` (2 preceding siblings ...)
  2023-06-04 12:12 ` [PATCH 03/10] dt-bindings: dma: convert bcm2835-dma bindings to YAML Stefan Wahren
@ 2023-06-04 12:12 ` Stefan Wahren
  2023-06-09 21:54   ` Rob Herring
  2023-06-04 12:12 ` [PATCH 05/10] dt-bindings: pwm: convert pwm-bcm2835 bindings to YAML Stefan Wahren
                   ` (5 subsequent siblings)
  9 siblings, 1 reply; 26+ messages in thread
From: Stefan Wahren @ 2023-06-04 12:12 UTC (permalink / raw)
  To: Vinod Koul, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Florian Fainelli, Ray Jui, Scott Branden, Jassi Brar,
	Thierry Reding, Uwe Kleine-König, Rafael J. Wysocki,
	Daniel Lezcano, Amit Kucheria, Zhang Rui, Thomas Gleixner
  Cc: linux-arm-kernel, dmaengine, devicetree, linux-mmc, linux-pwm,
	linux-pm, bcm-kernel-feedback-list, Stefan Wahren

After converting the bcm2835-dma DT binding to YAML, the DT schema
checks gave warnings like:

$nodename:0: 'dma@7e007000' does not match '^dma-controller(@.*)?$'
'dma-channel-mask' is a required property
Unevaluated properties are not allowed ('brcm,dma-channel-mask' was unexpected)

So fix them accordingly.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
---
 arch/arm/boot/dts/bcm2711.dtsi        | 4 ++--
 arch/arm/boot/dts/bcm2835-common.dtsi | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/arm/boot/dts/bcm2711.dtsi b/arch/arm/boot/dts/bcm2711.dtsi
index 097e9f252235..83745672a120 100644
--- a/arch/arm/boot/dts/bcm2711.dtsi
+++ b/arch/arm/boot/dts/bcm2711.dtsi
@@ -76,7 +76,7 @@ thermal: thermal {
 			};
 		};
 
-		dma: dma@7e007000 {
+		dma: dma-controller@7e007000 {
 			compatible = "brcm,bcm2835-dma";
 			reg = <0x7e007000 0xb00>;
 			interrupts = <GIC_SPI 80 IRQ_TYPE_LEVEL_HIGH>,
@@ -103,7 +103,7 @@ dma: dma@7e007000 {
 					  "dma9",
 					  "dma10";
 			#dma-cells = <1>;
-			brcm,dma-channel-mask = <0x07f5>;
+			dma-channel-mask = <0x07f5>;
 		};
 
 		pm: watchdog@7e100000 {
diff --git a/arch/arm/boot/dts/bcm2835-common.dtsi b/arch/arm/boot/dts/bcm2835-common.dtsi
index bb7e8f7facaf..3ba8db8eed0f 100644
--- a/arch/arm/boot/dts/bcm2835-common.dtsi
+++ b/arch/arm/boot/dts/bcm2835-common.dtsi
@@ -8,7 +8,7 @@ / {
 	interrupt-parent = <&intc>;
 
 	soc {
-		dma: dma@7e007000 {
+		dma: dma-controller@7e007000 {
 			compatible = "brcm,bcm2835-dma";
 			reg = <0x7e007000 0xf00>;
 			interrupts = <1 16>,
@@ -46,7 +46,7 @@ dma: dma@7e007000 {
 					  "dma14",
 					  "dma-shared-all";
 			#dma-cells = <1>;
-			brcm,dma-channel-mask = <0x7f35>;
+			dma-channel-mask = <0x7f35>;
 		};
 
 		intc: interrupt-controller@7e00b200 {
-- 
2.34.1


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

* [PATCH 05/10] dt-bindings: pwm: convert pwm-bcm2835 bindings to YAML
  2023-06-04 12:12 [PATCH 00/10] ARM: dts: bcm283x: Improve device-trees and bindings Stefan Wahren
                   ` (3 preceding siblings ...)
  2023-06-04 12:12 ` [PATCH 04/10] ARM: dts: bcm2835: adjust DMA nodes Stefan Wahren
@ 2023-06-04 12:12 ` Stefan Wahren
  2023-06-07  7:56   ` Uwe Kleine-König
  2023-06-09 21:55   ` Rob Herring
  2023-06-04 12:12 ` [PATCH 06/10] ARM: dts: bcm283x: Increase pwm-cells Stefan Wahren
                   ` (4 subsequent siblings)
  9 siblings, 2 replies; 26+ messages in thread
From: Stefan Wahren @ 2023-06-04 12:12 UTC (permalink / raw)
  To: Vinod Koul, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Florian Fainelli, Ray Jui, Scott Branden, Jassi Brar,
	Thierry Reding, Uwe Kleine-König, Rafael J. Wysocki,
	Daniel Lezcano, Amit Kucheria, Zhang Rui, Thomas Gleixner
  Cc: linux-arm-kernel, dmaengine, devicetree, linux-mmc, linux-pwm,
	linux-pm, bcm-kernel-feedback-list, Stefan Wahren

Convert the DT binding document for pwm-bcm2835 from .txt to YAML.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
---
 .../devicetree/bindings/pwm/pwm-bcm2835.txt   | 30 -------------
 .../devicetree/bindings/pwm/pwm-bcm2835.yaml  | 43 +++++++++++++++++++
 2 files changed, 43 insertions(+), 30 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/pwm/pwm-bcm2835.txt
 create mode 100644 Documentation/devicetree/bindings/pwm/pwm-bcm2835.yaml

diff --git a/Documentation/devicetree/bindings/pwm/pwm-bcm2835.txt b/Documentation/devicetree/bindings/pwm/pwm-bcm2835.txt
deleted file mode 100644
index f5753b3f79df..000000000000
--- a/Documentation/devicetree/bindings/pwm/pwm-bcm2835.txt
+++ /dev/null
@@ -1,30 +0,0 @@
-BCM2835 PWM controller (Raspberry Pi controller)
-
-Required properties:
-- compatible: should be "brcm,bcm2835-pwm"
-- reg: physical base address and length of the controller's registers
-- clocks: This clock defines the base clock frequency of the PWM hardware
-  system, the period and the duty_cycle of the PWM signal is a multiple of
-  the base period.
-- #pwm-cells: Should be 3. See pwm.yaml in this directory for a description of
-  the cells format.
-
-Examples:
-
-pwm@2020c000 {
-	compatible = "brcm,bcm2835-pwm";
-	reg = <0x2020c000 0x28>;
-	clocks = <&clk_pwm>;
-	#pwm-cells = <3>;
-};
-
-clocks {
-	....
-		clk_pwm: pwm {
-			compatible = "fixed-clock";
-			reg = <3>;
-			#clock-cells = <0>;
-			clock-frequency = <9200000>;
-		};
-	....
-};
diff --git a/Documentation/devicetree/bindings/pwm/pwm-bcm2835.yaml b/Documentation/devicetree/bindings/pwm/pwm-bcm2835.yaml
new file mode 100644
index 000000000000..15e7fd98defc
--- /dev/null
+++ b/Documentation/devicetree/bindings/pwm/pwm-bcm2835.yaml
@@ -0,0 +1,43 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/pwm/pwm-bcm2835.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: BCM2835 PWM controller (Raspberry Pi controller)
+
+maintainers:
+  - Stefan Wahren <stefan.wahren@i2se.com>
+
+allOf:
+  - $ref: pwm.yaml#
+
+properties:
+  compatible:
+    const: brcm,bcm2835-pwm
+
+  reg:
+    maxItems: 1
+
+  clocks:
+    maxItems: 1
+
+  "#pwm-cells":
+    const: 3
+
+required:
+  - compatible
+  - reg
+  - clocks
+  - "#pwm-cells"
+
+additionalProperties: false
+
+examples:
+  - |
+    pwm@2020c000 {
+      compatible = "brcm,bcm2835-pwm";
+      reg = <0x2020c000 0x28>;
+      clocks = <&clk_pwm>;
+      #pwm-cells = <3>;
+    };
-- 
2.34.1


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

* [PATCH 06/10] ARM: dts: bcm283x: Increase pwm-cells
  2023-06-04 12:12 [PATCH 00/10] ARM: dts: bcm283x: Improve device-trees and bindings Stefan Wahren
                   ` (4 preceding siblings ...)
  2023-06-04 12:12 ` [PATCH 05/10] dt-bindings: pwm: convert pwm-bcm2835 bindings to YAML Stefan Wahren
@ 2023-06-04 12:12 ` Stefan Wahren
  2023-06-07  7:56   ` Uwe Kleine-König
  2023-06-04 12:12 ` [PATCH 07/10] dt-bindings: mailbox: convert bcm2835-mbox bindings to YAML Stefan Wahren
                   ` (3 subsequent siblings)
  9 siblings, 1 reply; 26+ messages in thread
From: Stefan Wahren @ 2023-06-04 12:12 UTC (permalink / raw)
  To: Vinod Koul, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Florian Fainelli, Ray Jui, Scott Branden, Jassi Brar,
	Thierry Reding, Uwe Kleine-König, Rafael J. Wysocki,
	Daniel Lezcano, Amit Kucheria, Zhang Rui, Thomas Gleixner
  Cc: linux-arm-kernel, dmaengine, devicetree, linux-mmc, linux-pwm,
	linux-pm, bcm-kernel-feedback-list, Stefan Wahren

The pwm-bcm2835 supports PWM polarity, so adjust the affected dtsi
files accordingly and fix the dtbs_check warning:

pwm@7e20c000: #pwm-cells:0:0: 3 was expected

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
---
 arch/arm/boot/dts/bcm2711.dtsi | 2 +-
 arch/arm/boot/dts/bcm283x.dtsi | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/bcm2711.dtsi b/arch/arm/boot/dts/bcm2711.dtsi
index 83745672a120..239db6927a02 100644
--- a/arch/arm/boot/dts/bcm2711.dtsi
+++ b/arch/arm/boot/dts/bcm2711.dtsi
@@ -278,7 +278,7 @@ pwm1: pwm@7e20c800 {
 			clocks = <&clocks BCM2835_CLOCK_PWM>;
 			assigned-clocks = <&clocks BCM2835_CLOCK_PWM>;
 			assigned-clock-rates = <10000000>;
-			#pwm-cells = <2>;
+			#pwm-cells = <3>;
 			status = "disabled";
 		};
 
diff --git a/arch/arm/boot/dts/bcm283x.dtsi b/arch/arm/boot/dts/bcm283x.dtsi
index c9c52a19ef3b..2ca8a2505a4d 100644
--- a/arch/arm/boot/dts/bcm283x.dtsi
+++ b/arch/arm/boot/dts/bcm283x.dtsi
@@ -416,7 +416,7 @@ pwm: pwm@7e20c000 {
 			clocks = <&clocks BCM2835_CLOCK_PWM>;
 			assigned-clocks = <&clocks BCM2835_CLOCK_PWM>;
 			assigned-clock-rates = <10000000>;
-			#pwm-cells = <2>;
+			#pwm-cells = <3>;
 			status = "disabled";
 		};
 
-- 
2.34.1


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

* [PATCH 07/10] dt-bindings: mailbox: convert bcm2835-mbox bindings to YAML
  2023-06-04 12:12 [PATCH 00/10] ARM: dts: bcm283x: Improve device-trees and bindings Stefan Wahren
                   ` (5 preceding siblings ...)
  2023-06-04 12:12 ` [PATCH 06/10] ARM: dts: bcm283x: Increase pwm-cells Stefan Wahren
@ 2023-06-04 12:12 ` Stefan Wahren
  2023-06-09 21:56   ` Rob Herring
  2023-06-04 12:12 ` [PATCH 08/10] dt-bindings: mmc: convert bcm2835-sdhost " Stefan Wahren
                   ` (2 subsequent siblings)
  9 siblings, 1 reply; 26+ messages in thread
From: Stefan Wahren @ 2023-06-04 12:12 UTC (permalink / raw)
  To: Vinod Koul, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Florian Fainelli, Ray Jui, Scott Branden, Jassi Brar,
	Thierry Reding, Uwe Kleine-König, Rafael J. Wysocki,
	Daniel Lezcano, Amit Kucheria, Zhang Rui, Thomas Gleixner
  Cc: linux-arm-kernel, dmaengine, devicetree, linux-mmc, linux-pwm,
	linux-pm, bcm-kernel-feedback-list, Stefan Wahren

Convert the DT binding document for bcm2835-mbox from .txt to YAML.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
---
 .../bindings/mailbox/brcm,bcm2835-mbox.txt    | 26 ------------
 .../bindings/mailbox/brcm,bcm2835-mbox.yaml   | 40 +++++++++++++++++++
 2 files changed, 40 insertions(+), 26 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/mailbox/brcm,bcm2835-mbox.txt
 create mode 100644 Documentation/devicetree/bindings/mailbox/brcm,bcm2835-mbox.yaml

diff --git a/Documentation/devicetree/bindings/mailbox/brcm,bcm2835-mbox.txt b/Documentation/devicetree/bindings/mailbox/brcm,bcm2835-mbox.txt
deleted file mode 100644
index b48d7d30012c..000000000000
--- a/Documentation/devicetree/bindings/mailbox/brcm,bcm2835-mbox.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-Broadcom BCM2835 VideoCore mailbox IPC
-
-Required properties:
-
-- compatible:	Should be "brcm,bcm2835-mbox"
-- reg:		Specifies base physical address and size of the registers
-- interrupts:	The interrupt number
-		  See bindings/interrupt-controller/brcm,bcm2835-armctrl-ic.txt
-- #mbox-cells:	Specifies the number of cells needed to encode a mailbox
-		  channel. The value shall be 0, since there is only one
-		  mailbox channel implemented by the device.
-
-Example:
-
-mailbox: mailbox@7e00b880 {
-	compatible = "brcm,bcm2835-mbox";
-	reg = <0x7e00b880 0x40>;
-	interrupts = <0 1>;
-	#mbox-cells = <0>;
-};
-
-firmware: firmware {
-	compatible = "raspberrypi,firmware";
-	mboxes = <&mailbox>;
-	#power-domain-cells = <1>;
-};
diff --git a/Documentation/devicetree/bindings/mailbox/brcm,bcm2835-mbox.yaml b/Documentation/devicetree/bindings/mailbox/brcm,bcm2835-mbox.yaml
new file mode 100644
index 000000000000..9588817f4511
--- /dev/null
+++ b/Documentation/devicetree/bindings/mailbox/brcm,bcm2835-mbox.yaml
@@ -0,0 +1,40 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/mailbox/brcm,bcm2835-mbox.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Broadcom BCM2835 VideoCore mailbox IPC
+
+maintainers:
+  - Stefan Wahren <stefan.wahren@i2se.com>
+
+properties:
+  compatible:
+    const: brcm,bcm2835-mbox
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+  "#mbox-cells":
+    const: 0
+
+required:
+  - compatible
+  - reg
+  - interrupts
+  - "#mbox-cells"
+
+additionalProperties: false
+
+examples:
+  - |
+    mailbox@7e00b880 {
+      compatible = "brcm,bcm2835-mbox";
+      reg = <0x7e00b880 0x40>;
+      interrupts = <0 1>;
+      #mbox-cells = <0>;
+    };
-- 
2.34.1


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

* [PATCH 08/10] dt-bindings: mmc: convert bcm2835-sdhost bindings to YAML
  2023-06-04 12:12 [PATCH 00/10] ARM: dts: bcm283x: Improve device-trees and bindings Stefan Wahren
                   ` (6 preceding siblings ...)
  2023-06-04 12:12 ` [PATCH 07/10] dt-bindings: mailbox: convert bcm2835-mbox bindings to YAML Stefan Wahren
@ 2023-06-04 12:12 ` Stefan Wahren
  2023-06-09 21:56   ` Rob Herring
  2023-06-12 14:16   ` Ulf Hansson
  2023-06-04 12:12 ` [PATCH 09/10] dt-bindings: thermal: convert bcm2835-thermal " Stefan Wahren
  2023-06-04 12:12 ` [PATCH 10/10] dt-bindings: timer: convert bcm2835-system-timer " Stefan Wahren
  9 siblings, 2 replies; 26+ messages in thread
From: Stefan Wahren @ 2023-06-04 12:12 UTC (permalink / raw)
  To: Vinod Koul, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Florian Fainelli, Ray Jui, Scott Branden, Jassi Brar,
	Thierry Reding, Uwe Kleine-König, Rafael J. Wysocki,
	Daniel Lezcano, Amit Kucheria, Zhang Rui, Thomas Gleixner
  Cc: linux-arm-kernel, dmaengine, devicetree, linux-mmc, linux-pwm,
	linux-pm, bcm-kernel-feedback-list, Stefan Wahren

Convert the DT binding document for bcm2835-sdhost from .txt to YAML.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
---
 .../bindings/mmc/brcm,bcm2835-sdhost.txt      | 23 --------
 .../bindings/mmc/brcm,bcm2835-sdhost.yaml     | 54 +++++++++++++++++++
 2 files changed, 54 insertions(+), 23 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/mmc/brcm,bcm2835-sdhost.txt
 create mode 100644 Documentation/devicetree/bindings/mmc/brcm,bcm2835-sdhost.yaml

diff --git a/Documentation/devicetree/bindings/mmc/brcm,bcm2835-sdhost.txt b/Documentation/devicetree/bindings/mmc/brcm,bcm2835-sdhost.txt
deleted file mode 100644
index d876580ae3b8..000000000000
--- a/Documentation/devicetree/bindings/mmc/brcm,bcm2835-sdhost.txt
+++ /dev/null
@@ -1,23 +0,0 @@
-Broadcom BCM2835 SDHOST controller
-
-This file documents differences between the core properties described
-by mmc.txt and the properties that represent the BCM2835 controller.
-
-Required properties:
-- compatible: Should be "brcm,bcm2835-sdhost".
-- clocks: The clock feeding the SDHOST controller.
-
-Optional properties:
-- dmas: DMA channel for read and write.
-          See Documentation/devicetree/bindings/dma/dma.txt for details
-
-Example:
-
-sdhost: mmc@7e202000 {
-	compatible = "brcm,bcm2835-sdhost";
-	reg = <0x7e202000 0x100>;
-	interrupts = <2 24>;
-	clocks = <&clocks BCM2835_CLOCK_VPU>;
-	dmas = <&dma 13>;
-	dma-names = "rx-tx";
-};
diff --git a/Documentation/devicetree/bindings/mmc/brcm,bcm2835-sdhost.yaml b/Documentation/devicetree/bindings/mmc/brcm,bcm2835-sdhost.yaml
new file mode 100644
index 000000000000..3a5a44800675
--- /dev/null
+++ b/Documentation/devicetree/bindings/mmc/brcm,bcm2835-sdhost.yaml
@@ -0,0 +1,54 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/mmc/brcm,bcm2835-sdhost.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Broadcom BCM2835 SDHOST controller
+
+maintainers:
+  - Stefan Wahren <stefan.wahren@i2se.com>
+
+allOf:
+  - $ref: mmc-controller.yaml
+
+properties:
+  compatible:
+    const: brcm,bcm2835-sdhost
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+  clocks:
+    maxItems: 1
+
+  dmas:
+    maxItems: 1
+
+  dma-names:
+    const: rx-tx
+
+required:
+  - compatible
+  - reg
+  - interrupts
+  - clocks
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/clock/bcm2835.h>
+
+    sdhost: mmc@7e202000 {
+      compatible = "brcm,bcm2835-sdhost";
+      reg = <0x7e202000 0x100>;
+      interrupts = <2 24>;
+      clocks = <&clocks BCM2835_CLOCK_VPU>;
+      dmas = <&dma 13>;
+      dma-names = "rx-tx";
+      bus-width = <4>;
+    };
-- 
2.34.1


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

* [PATCH 09/10] dt-bindings: thermal: convert bcm2835-thermal bindings to YAML
  2023-06-04 12:12 [PATCH 00/10] ARM: dts: bcm283x: Improve device-trees and bindings Stefan Wahren
                   ` (7 preceding siblings ...)
  2023-06-04 12:12 ` [PATCH 08/10] dt-bindings: mmc: convert bcm2835-sdhost " Stefan Wahren
@ 2023-06-04 12:12 ` Stefan Wahren
  2023-06-09 21:59   ` Rob Herring
  2023-06-13  8:25   ` Daniel Lezcano
  2023-06-04 12:12 ` [PATCH 10/10] dt-bindings: timer: convert bcm2835-system-timer " Stefan Wahren
  9 siblings, 2 replies; 26+ messages in thread
From: Stefan Wahren @ 2023-06-04 12:12 UTC (permalink / raw)
  To: Vinod Koul, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Florian Fainelli, Ray Jui, Scott Branden, Jassi Brar,
	Thierry Reding, Uwe Kleine-König, Rafael J. Wysocki,
	Daniel Lezcano, Amit Kucheria, Zhang Rui, Thomas Gleixner
  Cc: linux-arm-kernel, dmaengine, devicetree, linux-mmc, linux-pwm,
	linux-pm, bcm-kernel-feedback-list, Stefan Wahren

Convert the DT binding document for bcm2835-thermal from .txt to YAML.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
---
 .../bindings/thermal/brcm,bcm2835-thermal.txt | 41 ----------------
 .../thermal/brcm,bcm2835-thermal.yaml         | 48 +++++++++++++++++++
 2 files changed, 48 insertions(+), 41 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/thermal/brcm,bcm2835-thermal.txt
 create mode 100644 Documentation/devicetree/bindings/thermal/brcm,bcm2835-thermal.yaml

diff --git a/Documentation/devicetree/bindings/thermal/brcm,bcm2835-thermal.txt b/Documentation/devicetree/bindings/thermal/brcm,bcm2835-thermal.txt
deleted file mode 100644
index a3e9ec5dc7ac..000000000000
--- a/Documentation/devicetree/bindings/thermal/brcm,bcm2835-thermal.txt
+++ /dev/null
@@ -1,41 +0,0 @@
-Binding for Thermal Sensor driver for BCM2835 SoCs.
-
-Required parameters:
--------------------
-
-compatible: 		should be one of: "brcm,bcm2835-thermal",
-			"brcm,bcm2836-thermal" or "brcm,bcm2837-thermal"
-reg:			Address range of the thermal registers.
-clocks: 		Phandle of the clock used by the thermal sensor.
-#thermal-sensor-cells:	should be 0 (see Documentation/devicetree/bindings/thermal/thermal-sensor.yaml)
-
-Example:
-
-thermal-zones {
-	cpu_thermal: cpu-thermal {
-		polling-delay-passive = <0>;
-		polling-delay = <1000>;
-
-		thermal-sensors = <&thermal>;
-
-		trips {
-			cpu-crit {
-				temperature	= <80000>;
-				hysteresis	= <0>;
-				type		= "critical";
-			};
-		};
-
-		coefficients = <(-538)	407000>;
-
-		cooling-maps {
-		};
-	};
-};
-
-thermal: thermal@7e212000 {
-	compatible = "brcm,bcm2835-thermal";
-	reg = <0x7e212000 0x8>;
-	clocks = <&clocks BCM2835_CLOCK_TSENS>;
-	#thermal-sensor-cells = <0>;
-};
diff --git a/Documentation/devicetree/bindings/thermal/brcm,bcm2835-thermal.yaml b/Documentation/devicetree/bindings/thermal/brcm,bcm2835-thermal.yaml
new file mode 100644
index 000000000000..2b6026d9fbcf
--- /dev/null
+++ b/Documentation/devicetree/bindings/thermal/brcm,bcm2835-thermal.yaml
@@ -0,0 +1,48 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/thermal/brcm,bcm2835-thermal.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Broadcom BCM2835 thermal sensor
+
+maintainers:
+  - Stefan Wahren <stefan.wahren@i2se.com>
+
+allOf:
+  - $ref: thermal-sensor.yaml#
+
+properties:
+  compatible:
+    enum:
+      - brcm,bcm2835-thermal
+      - brcm,bcm2836-thermal
+      - brcm,bcm2837-thermal
+
+  reg:
+    maxItems: 1
+
+  clocks:
+    maxItems: 1
+
+  "#thermal-sensor-cells":
+    const: 0
+
+unevaluatedProperties: false
+
+required:
+  - compatible
+  - reg
+  - clocks
+  - '#thermal-sensor-cells'
+
+examples:
+  - |
+    #include <dt-bindings/clock/bcm2835.h>
+
+    thermal@7e212000 {
+      compatible = "brcm,bcm2835-thermal";
+      reg = <0x7e212000 0x8>;
+      clocks = <&clocks BCM2835_CLOCK_TSENS>;
+      #thermal-sensor-cells = <0>;
+    };
-- 
2.34.1


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

* [PATCH 10/10] dt-bindings: timer: convert bcm2835-system-timer bindings to YAML
  2023-06-04 12:12 [PATCH 00/10] ARM: dts: bcm283x: Improve device-trees and bindings Stefan Wahren
                   ` (8 preceding siblings ...)
  2023-06-04 12:12 ` [PATCH 09/10] dt-bindings: thermal: convert bcm2835-thermal " Stefan Wahren
@ 2023-06-04 12:12 ` Stefan Wahren
  2023-06-09 22:00   ` Rob Herring
  9 siblings, 1 reply; 26+ messages in thread
From: Stefan Wahren @ 2023-06-04 12:12 UTC (permalink / raw)
  To: Vinod Koul, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Florian Fainelli, Ray Jui, Scott Branden, Jassi Brar,
	Thierry Reding, Uwe Kleine-König, Rafael J. Wysocki,
	Daniel Lezcano, Amit Kucheria, Zhang Rui, Thomas Gleixner
  Cc: linux-arm-kernel, dmaengine, devicetree, linux-mmc, linux-pwm,
	linux-pm, bcm-kernel-feedback-list, Stefan Wahren

Convert the DT binding document for bcm2835-system-timer from .txt
to YAML.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
---
 .../timer/brcm,bcm2835-system-timer.txt       | 22 ----------
 .../timer/brcm,bcm2835-system-timer.yaml      | 44 +++++++++++++++++++
 2 files changed, 44 insertions(+), 22 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/timer/brcm,bcm2835-system-timer.txt
 create mode 100644 Documentation/devicetree/bindings/timer/brcm,bcm2835-system-timer.yaml

diff --git a/Documentation/devicetree/bindings/timer/brcm,bcm2835-system-timer.txt b/Documentation/devicetree/bindings/timer/brcm,bcm2835-system-timer.txt
deleted file mode 100644
index 844bd5fbd04c..000000000000
--- a/Documentation/devicetree/bindings/timer/brcm,bcm2835-system-timer.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-BCM2835 System Timer
-
-The System Timer peripheral provides four 32-bit timer channels and a
-single 64-bit free running counter. Each channel has an output compare
-register, which is compared against the 32 least significant bits of the
-free running counter values, and generates an interrupt.
-
-Required properties:
-
-- compatible : should be "brcm,bcm2835-system-timer"
-- reg : Specifies base physical address and size of the registers.
-- interrupts : A list of 4 interrupt sinks; one per timer channel.
-- clock-frequency : The frequency of the clock that drives the counter, in Hz.
-
-Example:
-
-timer {
-	compatible = "brcm,bcm2835-system-timer";
-	reg = <0x7e003000 0x1000>;
-	interrupts = <1 0>, <1 1>, <1 2>, <1 3>;
-	clock-frequency = <1000000>;
-};
diff --git a/Documentation/devicetree/bindings/timer/brcm,bcm2835-system-timer.yaml b/Documentation/devicetree/bindings/timer/brcm,bcm2835-system-timer.yaml
new file mode 100644
index 000000000000..555fca4897e7
--- /dev/null
+++ b/Documentation/devicetree/bindings/timer/brcm,bcm2835-system-timer.yaml
@@ -0,0 +1,44 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/timer/brcm,bcm2835-system-timer.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: BCM2835 System Timer
+
+maintainers:
+  - Stefan Wahren <stefan.wahren@i2se.com>
+
+description:
+  The System Timer peripheral provides four 32-bit timer channels and a
+  single 64-bit free running counter. Each channel has an output compare
+  register, which is compared against the 32 least significant bits of the
+  free running counter values, and generates an interrupt.
+
+properties:
+  compatible:
+    const: brcm,bcm2835-system-timer
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 4
+
+  clock-frequency: true
+
+required:
+  - compatible
+  - reg
+  - interrupts
+
+additionalProperties: false
+
+examples:
+  - |
+    timer@7e003000 {
+      compatible = "brcm,bcm2835-system-timer";
+      reg = <0x7e003000 0x1000>;
+      interrupts = <1 0>, <1 1>, <1 2>, <1 3>;
+      clock-frequency = <1000000>;
+    };
-- 
2.34.1


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

* Re: [PATCH 05/10] dt-bindings: pwm: convert pwm-bcm2835 bindings to YAML
  2023-06-04 12:12 ` [PATCH 05/10] dt-bindings: pwm: convert pwm-bcm2835 bindings to YAML Stefan Wahren
@ 2023-06-07  7:56   ` Uwe Kleine-König
  2023-06-09 21:59     ` Rob Herring
  2023-06-09 21:55   ` Rob Herring
  1 sibling, 1 reply; 26+ messages in thread
From: Uwe Kleine-König @ 2023-06-07  7:56 UTC (permalink / raw)
  To: Stefan Wahren
  Cc: Vinod Koul, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Florian Fainelli, Ray Jui, Scott Branden, Jassi Brar,
	Thierry Reding, Rafael J. Wysocki, Daniel Lezcano, Amit Kucheria,
	Zhang Rui, Thomas Gleixner, linux-arm-kernel, dmaengine,
	devicetree, linux-mmc, linux-pwm, linux-pm,
	bcm-kernel-feedback-list

[-- Attachment #1: Type: text/plain, Size: 786 bytes --]

Hello,

On Sun, Jun 04, 2023 at 02:12:18PM +0200, Stefan Wahren wrote:
> Convert the DT binding document for pwm-bcm2835 from .txt to YAML.

Both dt_binding_check and dtbs_check (for ARCH=arm) are happy, apart
from errors like:

arch/arm/boot/dts/bcm2711-rpi-4-b.dtb: pwm@7e20c000: #pwm-cells:0:0: 3 was expected
        From schema: Documentation/devicetree/bindings/pwm/pwm-bcm2835.yaml

which is fixed in patch #6. So:

Reviewed-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Who will pick up this patch? Is it supposed to go in via pwm or
arm/broadcom? (I suggest the latter.)

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: [PATCH 06/10] ARM: dts: bcm283x: Increase pwm-cells
  2023-06-04 12:12 ` [PATCH 06/10] ARM: dts: bcm283x: Increase pwm-cells Stefan Wahren
@ 2023-06-07  7:56   ` Uwe Kleine-König
  0 siblings, 0 replies; 26+ messages in thread
From: Uwe Kleine-König @ 2023-06-07  7:56 UTC (permalink / raw)
  To: Stefan Wahren
  Cc: Vinod Koul, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Florian Fainelli, Ray Jui, Scott Branden, Jassi Brar,
	Thierry Reding, Rafael J. Wysocki, Daniel Lezcano, Amit Kucheria,
	Zhang Rui, Thomas Gleixner, linux-arm-kernel, dmaengine,
	devicetree, linux-mmc, linux-pwm, linux-pm,
	bcm-kernel-feedback-list

[-- Attachment #1: Type: text/plain, Size: 1648 bytes --]

On Sun, Jun 04, 2023 at 02:12:19PM +0200, Stefan Wahren wrote:
> The pwm-bcm2835 supports PWM polarity, so adjust the affected dtsi
> files accordingly and fix the dtbs_check warning:
> 
> pwm@7e20c000: #pwm-cells:0:0: 3 was expected
> 
> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
> ---
>  arch/arm/boot/dts/bcm2711.dtsi | 2 +-
>  arch/arm/boot/dts/bcm283x.dtsi | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/bcm2711.dtsi b/arch/arm/boot/dts/bcm2711.dtsi
> index 83745672a120..239db6927a02 100644
> --- a/arch/arm/boot/dts/bcm2711.dtsi
> +++ b/arch/arm/boot/dts/bcm2711.dtsi
> @@ -278,7 +278,7 @@ pwm1: pwm@7e20c800 {
>  			clocks = <&clocks BCM2835_CLOCK_PWM>;
>  			assigned-clocks = <&clocks BCM2835_CLOCK_PWM>;
>  			assigned-clock-rates = <10000000>;
> -			#pwm-cells = <2>;
> +			#pwm-cells = <3>;
>  			status = "disabled";
>  		};
>  
> diff --git a/arch/arm/boot/dts/bcm283x.dtsi b/arch/arm/boot/dts/bcm283x.dtsi
> index c9c52a19ef3b..2ca8a2505a4d 100644
> --- a/arch/arm/boot/dts/bcm283x.dtsi
> +++ b/arch/arm/boot/dts/bcm283x.dtsi
> @@ -416,7 +416,7 @@ pwm: pwm@7e20c000 {
>  			clocks = <&clocks BCM2835_CLOCK_PWM>;
>  			assigned-clocks = <&clocks BCM2835_CLOCK_PWM>;
>  			assigned-clock-rates = <10000000>;
> -			#pwm-cells = <2>;
> +			#pwm-cells = <3>;
>  			status = "disabled";
>  		};

Reviewed-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: [PATCH 03/10] dt-bindings: dma: convert bcm2835-dma bindings to YAML
  2023-06-04 12:12 ` [PATCH 03/10] dt-bindings: dma: convert bcm2835-dma bindings to YAML Stefan Wahren
@ 2023-06-09 21:48   ` Rob Herring
  0 siblings, 0 replies; 26+ messages in thread
From: Rob Herring @ 2023-06-09 21:48 UTC (permalink / raw)
  To: Stefan Wahren
  Cc: Vinod Koul, Krzysztof Kozlowski, Conor Dooley, Florian Fainelli,
	Ray Jui, Scott Branden, Jassi Brar, Thierry Reding,
	Uwe Kleine-König, Rafael J. Wysocki, Daniel Lezcano,
	Amit Kucheria, Zhang Rui, Thomas Gleixner, linux-arm-kernel,
	dmaengine, devicetree, linux-mmc, linux-pwm, linux-pm,
	bcm-kernel-feedback-list

On Sun, Jun 04, 2023 at 02:12:16PM +0200, Stefan Wahren wrote:
> Convert the DT binding document for bcm2835-dma from .txt to YAML.
> Since brcm,dma-channel-mask is considered deprecated use the
> generic property.
> 
> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
> ---
>  .../bindings/dma/brcm,bcm2835-dma.txt         | 83 ----------------
>  .../bindings/dma/brcm,bcm2835-dma.yaml        | 98 +++++++++++++++++++
>  2 files changed, 98 insertions(+), 83 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/dma/brcm,bcm2835-dma.txt
>  create mode 100644 Documentation/devicetree/bindings/dma/brcm,bcm2835-dma.yaml
> 
> diff --git a/Documentation/devicetree/bindings/dma/brcm,bcm2835-dma.txt b/Documentation/devicetree/bindings/dma/brcm,bcm2835-dma.txt
> deleted file mode 100644
> index b6a8cc0978cd..000000000000
> --- a/Documentation/devicetree/bindings/dma/brcm,bcm2835-dma.txt
> +++ /dev/null
> @@ -1,83 +0,0 @@
> -* BCM2835 DMA controller
> -
> -The BCM2835 DMA controller has 16 channels in total.
> -Only the lower 13 channels have an associated IRQ.
> -Some arbitrary channels are used by the firmware
> -(1,3,6,7 in the current firmware version).
> -The channels 0,2 and 3 have special functionality
> -and should not be used by the driver.
> -
> -Required properties:
> -- compatible: Should be "brcm,bcm2835-dma".
> -- reg: Should contain DMA registers location and length.
> -- interrupts: Should contain the DMA interrupts associated
> -		to the DMA channels in ascending order.
> -- interrupt-names: Should contain the names of the interrupt
> -		   in the form "dmaXX".
> -		   Use "dma-shared-all" for the common interrupt line
> -		   that is shared by all dma channels.
> -- #dma-cells: Must be <1>, the cell in the dmas property of the
> -		client device represents the DREQ number.
> -- brcm,dma-channel-mask: Bit mask representing the channels
> -			 not used by the firmware in ascending order,
> -			 i.e. first channel corresponds to LSB.
> -
> -Example:
> -
> -dma: dma@7e007000 {
> -	compatible = "brcm,bcm2835-dma";
> -	reg = <0x7e007000 0xf00>;
> -	interrupts = <1 16>,
> -		     <1 17>,
> -		     <1 18>,
> -		     <1 19>,
> -		     <1 20>,
> -		     <1 21>,
> -		     <1 22>,
> -		     <1 23>,
> -		     <1 24>,
> -		     <1 25>,
> -		     <1 26>,
> -		     /* dma channel 11-14 share one irq */
> -		     <1 27>,
> -		     <1 27>,
> -		     <1 27>,
> -		     <1 27>,
> -		     /* unused shared irq for all channels */
> -		     <1 28>;
> -	interrupt-names = "dma0",
> -			  "dma1",
> -			  "dma2",
> -			  "dma3",
> -			  "dma4",
> -			  "dma5",
> -			  "dma6",
> -			  "dma7",
> -			  "dma8",
> -			  "dma9",
> -			  "dma10",
> -			  "dma11",
> -			  "dma12",
> -			  "dma13",
> -			  "dma14",
> -			  "dma-shared-all";
> -
> -	#dma-cells = <1>;
> -	brcm,dma-channel-mask = <0x7f35>;
> -};
> -
> -
> -DMA clients connected to the BCM2835 DMA controller must use the format
> -described in the dma.txt file, using a two-cell specifier for each channel.
> -
> -Example:
> -
> -bcm2835_i2s: i2s@7e203000 {
> -	compatible = "brcm,bcm2835-i2s";
> -	reg = <	0x7e203000 0x24>;
> -	clocks = <&clocks BCM2835_CLOCK_PCM>;
> -
> -	dmas = <&dma 2>,
> -	       <&dma 3>;
> -	dma-names = "tx", "rx";
> -};
> diff --git a/Documentation/devicetree/bindings/dma/brcm,bcm2835-dma.yaml b/Documentation/devicetree/bindings/dma/brcm,bcm2835-dma.yaml
> new file mode 100644
> index 000000000000..a09000a8131f
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/dma/brcm,bcm2835-dma.yaml
> @@ -0,0 +1,98 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/dma/brcm,bcm2835-dma.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: BCM2835 DMA controller
> +
> +maintainers:
> +  - Nicolas Saenz Julienne <nsaenz@kernel.org>
> +
> +description:
> +  The BCM2835 DMA controller has 16 channels in total. Only the lower
> +  13 channels have an associated IRQ. Some arbitrary channels are used by the
> +  VideoCore firmware (1,3,6,7 in the current firmware version). The channels
> +  0, 2 and 3 have special functionality and should not be used by the driver.
> +
> +allOf:
> +  - $ref: "dma-controller.yaml#"

Drop quotes. Please check elsewhere in the series.

With that fixed,

Reviewed-by: Rob Herring <robh@kernel.org>

> +
> +properties:
> +  compatible:
> +    const: brcm,bcm2835-dma
> +
> +  reg:
> +    maxItems: 1
> +
> +  interrupts:
> +    description:
> +      Should contain the DMA interrupts associated to the DMA channels in
> +      ascending order.
> +    minItems: 1
> +    maxItems: 16
> +
> +  interrupt-names:
> +    minItems: 1
> +    maxItems: 16
> +
> +  '#dma-cells':
> +    description: The single cell represents the DREQ number.
> +    const: 1
> +
> +  dma-channel-mask:
> +    maxItems: 1
> +
> +required:
> +  - compatible
> +  - reg
> +  - interrupts
> +  - "#dma-cells"
> +  - dma-channel-mask
> +
> +unevaluatedProperties: false
> +
> +examples:
> +  - |
> +    dma-controller@7e007000 {
> +      compatible = "brcm,bcm2835-dma";
> +      reg = <0x7e007000 0xf00>;
> +      interrupts = <1 16>,
> +                   <1 17>,
> +                   <1 18>,
> +                   <1 19>,
> +                   <1 20>,
> +                   <1 21>,
> +                   <1 22>,
> +                   <1 23>,
> +                   <1 24>,
> +                   <1 25>,
> +                   <1 26>,
> +                   /* dma channel 11-14 share one irq */
> +                   <1 27>,
> +                   <1 27>,
> +                   <1 27>,
> +                   <1 27>,
> +                   /* unused shared irq for all channels */
> +                   <1 28>;
> +      interrupt-names = "dma0",
> +                        "dma1",
> +                        "dma2",
> +                        "dma3",
> +                        "dma4",
> +                        "dma5",
> +                        "dma6",
> +                        "dma7",
> +                        "dma8",
> +                        "dma9",
> +                        "dma10",
> +                        "dma11",
> +                        "dma12",
> +                        "dma13",
> +                        "dma14",
> +                        "dma-shared-all";
> +        #dma-cells = <1>;
> +        dma-channel-mask = <0x7f35>;
> +    };
> +
> +...
> -- 
> 2.34.1
> 

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

* Re: [PATCH 04/10] ARM: dts: bcm2835: adjust DMA nodes
  2023-06-04 12:12 ` [PATCH 04/10] ARM: dts: bcm2835: adjust DMA nodes Stefan Wahren
@ 2023-06-09 21:54   ` Rob Herring
  0 siblings, 0 replies; 26+ messages in thread
From: Rob Herring @ 2023-06-09 21:54 UTC (permalink / raw)
  To: Stefan Wahren
  Cc: Vinod Koul, Krzysztof Kozlowski, Conor Dooley, Florian Fainelli,
	Ray Jui, Scott Branden, Jassi Brar, Thierry Reding,
	Uwe Kleine-König, Rafael J. Wysocki, Daniel Lezcano,
	Amit Kucheria, Zhang Rui, Thomas Gleixner, linux-arm-kernel,
	dmaengine, devicetree, linux-mmc, linux-pwm, linux-pm,
	bcm-kernel-feedback-list

On Sun, Jun 04, 2023 at 02:12:17PM +0200, Stefan Wahren wrote:
> After converting the bcm2835-dma DT binding to YAML, the DT schema
> checks gave warnings like:
> 
> $nodename:0: 'dma@7e007000' does not match '^dma-controller(@.*)?$'
> 'dma-channel-mask' is a required property
> Unevaluated properties are not allowed ('brcm,dma-channel-mask' was unexpected)
> 
> So fix them accordingly.
> 
> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
> ---
>  arch/arm/boot/dts/bcm2711.dtsi        | 4 ++--
>  arch/arm/boot/dts/bcm2835-common.dtsi | 4 ++--
>  2 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/bcm2711.dtsi b/arch/arm/boot/dts/bcm2711.dtsi
> index 097e9f252235..83745672a120 100644
> --- a/arch/arm/boot/dts/bcm2711.dtsi
> +++ b/arch/arm/boot/dts/bcm2711.dtsi
> @@ -76,7 +76,7 @@ thermal: thermal {
>  			};
>  		};
>  
> -		dma: dma@7e007000 {
> +		dma: dma-controller@7e007000 {
>  			compatible = "brcm,bcm2835-dma";
>  			reg = <0x7e007000 0xb00>;
>  			interrupts = <GIC_SPI 80 IRQ_TYPE_LEVEL_HIGH>,
> @@ -103,7 +103,7 @@ dma: dma@7e007000 {
>  					  "dma9",
>  					  "dma10";
>  			#dma-cells = <1>;
> -			brcm,dma-channel-mask = <0x07f5>;
> +			dma-channel-mask = <0x07f5>;

You're breaking the ABI here. I'd think RPi users would care.

You should either list both properties or just leave this as-is. You 
could also mark the driver "dma-channel-mask" support for stable and 
somewhat avoid the ABI issue.

>  		};
>  
>  		pm: watchdog@7e100000 {
> diff --git a/arch/arm/boot/dts/bcm2835-common.dtsi b/arch/arm/boot/dts/bcm2835-common.dtsi
> index bb7e8f7facaf..3ba8db8eed0f 100644
> --- a/arch/arm/boot/dts/bcm2835-common.dtsi
> +++ b/arch/arm/boot/dts/bcm2835-common.dtsi
> @@ -8,7 +8,7 @@ / {
>  	interrupt-parent = <&intc>;
>  
>  	soc {
> -		dma: dma@7e007000 {
> +		dma: dma-controller@7e007000 {
>  			compatible = "brcm,bcm2835-dma";
>  			reg = <0x7e007000 0xf00>;
>  			interrupts = <1 16>,
> @@ -46,7 +46,7 @@ dma: dma@7e007000 {
>  					  "dma14",
>  					  "dma-shared-all";
>  			#dma-cells = <1>;
> -			brcm,dma-channel-mask = <0x7f35>;
> +			dma-channel-mask = <0x7f35>;
>  		};
>  
>  		intc: interrupt-controller@7e00b200 {
> -- 
> 2.34.1
> 

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

* Re: [PATCH 05/10] dt-bindings: pwm: convert pwm-bcm2835 bindings to YAML
  2023-06-04 12:12 ` [PATCH 05/10] dt-bindings: pwm: convert pwm-bcm2835 bindings to YAML Stefan Wahren
  2023-06-07  7:56   ` Uwe Kleine-König
@ 2023-06-09 21:55   ` Rob Herring
  1 sibling, 0 replies; 26+ messages in thread
From: Rob Herring @ 2023-06-09 21:55 UTC (permalink / raw)
  To: Stefan Wahren
  Cc: Florian Fainelli, Scott Branden, linux-pm, Rob Herring,
	Zhang Rui, Uwe Kleine-König, bcm-kernel-feedback-list,
	dmaengine, Rafael J. Wysocki, linux-mmc, Jassi Brar,
	Daniel Lezcano, Ray Jui, Vinod Koul, linux-pwm, Thierry Reding,
	Krzysztof Kozlowski, linux-arm-kernel, devicetree, Amit Kucheria,
	Thomas Gleixner, Conor Dooley


On Sun, 04 Jun 2023 14:12:18 +0200, Stefan Wahren wrote:
> Convert the DT binding document for pwm-bcm2835 from .txt to YAML.
> 
> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
> ---
>  .../devicetree/bindings/pwm/pwm-bcm2835.txt   | 30 -------------
>  .../devicetree/bindings/pwm/pwm-bcm2835.yaml  | 43 +++++++++++++++++++
>  2 files changed, 43 insertions(+), 30 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/pwm/pwm-bcm2835.txt
>  create mode 100644 Documentation/devicetree/bindings/pwm/pwm-bcm2835.yaml
> 

Reviewed-by: Rob Herring <robh@kernel.org>


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

* Re: [PATCH 07/10] dt-bindings: mailbox: convert bcm2835-mbox bindings to YAML
  2023-06-04 12:12 ` [PATCH 07/10] dt-bindings: mailbox: convert bcm2835-mbox bindings to YAML Stefan Wahren
@ 2023-06-09 21:56   ` Rob Herring
  0 siblings, 0 replies; 26+ messages in thread
From: Rob Herring @ 2023-06-09 21:56 UTC (permalink / raw)
  To: Stefan Wahren
  Cc: Daniel Lezcano, Rob Herring, Thierry Reding, Vinod Koul,
	Jassi Brar, dmaengine, Ray Jui, Zhang Rui, Florian Fainelli,
	Scott Branden, Conor Dooley, Uwe Kleine-König,
	Krzysztof Kozlowski, linux-pm, linux-mmc, Thomas Gleixner,
	Rafael J. Wysocki, linux-pwm, bcm-kernel-feedback-list,
	linux-arm-kernel, Amit Kucheria, devicetree


On Sun, 04 Jun 2023 14:12:20 +0200, Stefan Wahren wrote:
> Convert the DT binding document for bcm2835-mbox from .txt to YAML.
> 
> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
> ---
>  .../bindings/mailbox/brcm,bcm2835-mbox.txt    | 26 ------------
>  .../bindings/mailbox/brcm,bcm2835-mbox.yaml   | 40 +++++++++++++++++++
>  2 files changed, 40 insertions(+), 26 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/mailbox/brcm,bcm2835-mbox.txt
>  create mode 100644 Documentation/devicetree/bindings/mailbox/brcm,bcm2835-mbox.yaml
> 

Reviewed-by: Rob Herring <robh@kernel.org>


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

* Re: [PATCH 08/10] dt-bindings: mmc: convert bcm2835-sdhost bindings to YAML
  2023-06-04 12:12 ` [PATCH 08/10] dt-bindings: mmc: convert bcm2835-sdhost " Stefan Wahren
@ 2023-06-09 21:56   ` Rob Herring
  2023-06-12 14:16   ` Ulf Hansson
  1 sibling, 0 replies; 26+ messages in thread
From: Rob Herring @ 2023-06-09 21:56 UTC (permalink / raw)
  To: Stefan Wahren
  Cc: Zhang Rui, linux-arm-kernel, linux-pm, Ray Jui, Scott Branden,
	bcm-kernel-feedback-list, Rob Herring, Vinod Koul,
	Daniel Lezcano, Krzysztof Kozlowski, Thierry Reding, linux-pwm,
	Uwe Kleine-König, Conor Dooley, devicetree, Thomas Gleixner,
	Rafael J. Wysocki, dmaengine, linux-mmc, Florian Fainelli,
	Amit Kucheria, Jassi Brar


On Sun, 04 Jun 2023 14:12:21 +0200, Stefan Wahren wrote:
> Convert the DT binding document for bcm2835-sdhost from .txt to YAML.
> 
> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
> ---
>  .../bindings/mmc/brcm,bcm2835-sdhost.txt      | 23 --------
>  .../bindings/mmc/brcm,bcm2835-sdhost.yaml     | 54 +++++++++++++++++++
>  2 files changed, 54 insertions(+), 23 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/mmc/brcm,bcm2835-sdhost.txt
>  create mode 100644 Documentation/devicetree/bindings/mmc/brcm,bcm2835-sdhost.yaml
> 

Reviewed-by: Rob Herring <robh@kernel.org>


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

* Re: [PATCH 05/10] dt-bindings: pwm: convert pwm-bcm2835 bindings to YAML
  2023-06-07  7:56   ` Uwe Kleine-König
@ 2023-06-09 21:59     ` Rob Herring
  2023-06-13  9:02       ` Stefan Wahren
  0 siblings, 1 reply; 26+ messages in thread
From: Rob Herring @ 2023-06-09 21:59 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Stefan Wahren, Vinod Koul, Krzysztof Kozlowski, Conor Dooley,
	Florian Fainelli, Ray Jui, Scott Branden, Jassi Brar,
	Thierry Reding, Rafael J. Wysocki, Daniel Lezcano, Amit Kucheria,
	Zhang Rui, Thomas Gleixner, linux-arm-kernel, dmaengine,
	devicetree, linux-mmc, linux-pwm, linux-pm,
	bcm-kernel-feedback-list

On Wed, Jun 07, 2023 at 09:56:02AM +0200, Uwe Kleine-König wrote:
> Hello,
> 
> On Sun, Jun 04, 2023 at 02:12:18PM +0200, Stefan Wahren wrote:
> > Convert the DT binding document for pwm-bcm2835 from .txt to YAML.
> 
> Both dt_binding_check and dtbs_check (for ARCH=arm) are happy, apart
> from errors like:
> 
> arch/arm/boot/dts/bcm2711-rpi-4-b.dtb: pwm@7e20c000: #pwm-cells:0:0: 3 was expected
>         From schema: Documentation/devicetree/bindings/pwm/pwm-bcm2835.yaml
> 
> which is fixed in patch #6. So:
> 
> Reviewed-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> 
> Who will pick up this patch? Is it supposed to go in via pwm or
> arm/broadcom? (I suggest the latter.)

The default is the subsystem (pwm). Why not here?

Rob

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

* Re: [PATCH 09/10] dt-bindings: thermal: convert bcm2835-thermal bindings to YAML
  2023-06-04 12:12 ` [PATCH 09/10] dt-bindings: thermal: convert bcm2835-thermal " Stefan Wahren
@ 2023-06-09 21:59   ` Rob Herring
  2023-06-13  8:25   ` Daniel Lezcano
  1 sibling, 0 replies; 26+ messages in thread
From: Rob Herring @ 2023-06-09 21:59 UTC (permalink / raw)
  To: Stefan Wahren
  Cc: Conor Dooley, Krzysztof Kozlowski, linux-pm, dmaengine, Ray Jui,
	Florian Fainelli, linux-pwm, Scott Branden, Jassi Brar,
	Uwe Kleine-König, Thierry Reding, Thomas Gleixner,
	bcm-kernel-feedback-list, linux-mmc, Rob Herring, devicetree,
	Amit Kucheria, linux-arm-kernel, Daniel Lezcano, Vinod Koul,
	Rafael J. Wysocki, Zhang Rui


On Sun, 04 Jun 2023 14:12:22 +0200, Stefan Wahren wrote:
> Convert the DT binding document for bcm2835-thermal from .txt to YAML.
> 
> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
> ---
>  .../bindings/thermal/brcm,bcm2835-thermal.txt | 41 ----------------
>  .../thermal/brcm,bcm2835-thermal.yaml         | 48 +++++++++++++++++++
>  2 files changed, 48 insertions(+), 41 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/thermal/brcm,bcm2835-thermal.txt
>  create mode 100644 Documentation/devicetree/bindings/thermal/brcm,bcm2835-thermal.yaml
> 

Reviewed-by: Rob Herring <robh@kernel.org>


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

* Re: [PATCH 10/10] dt-bindings: timer: convert bcm2835-system-timer bindings to YAML
  2023-06-04 12:12 ` [PATCH 10/10] dt-bindings: timer: convert bcm2835-system-timer " Stefan Wahren
@ 2023-06-09 22:00   ` Rob Herring
  0 siblings, 0 replies; 26+ messages in thread
From: Rob Herring @ 2023-06-09 22:00 UTC (permalink / raw)
  To: Stefan Wahren
  Cc: Vinod Koul, Krzysztof Kozlowski, Conor Dooley, Florian Fainelli,
	Ray Jui, Scott Branden, Jassi Brar, Thierry Reding,
	Uwe Kleine-König, Rafael J. Wysocki, Daniel Lezcano,
	Amit Kucheria, Zhang Rui, Thomas Gleixner, linux-arm-kernel,
	dmaengine, devicetree, linux-mmc, linux-pwm, linux-pm,
	bcm-kernel-feedback-list

On Sun, Jun 04, 2023 at 02:12:23PM +0200, Stefan Wahren wrote:
> Convert the DT binding document for bcm2835-system-timer from .txt
> to YAML.
> 
> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
> ---
>  .../timer/brcm,bcm2835-system-timer.txt       | 22 ----------
>  .../timer/brcm,bcm2835-system-timer.yaml      | 44 +++++++++++++++++++
>  2 files changed, 44 insertions(+), 22 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/timer/brcm,bcm2835-system-timer.txt
>  create mode 100644 Documentation/devicetree/bindings/timer/brcm,bcm2835-system-timer.yaml
> 
> diff --git a/Documentation/devicetree/bindings/timer/brcm,bcm2835-system-timer.txt b/Documentation/devicetree/bindings/timer/brcm,bcm2835-system-timer.txt
> deleted file mode 100644
> index 844bd5fbd04c..000000000000
> --- a/Documentation/devicetree/bindings/timer/brcm,bcm2835-system-timer.txt
> +++ /dev/null
> @@ -1,22 +0,0 @@
> -BCM2835 System Timer
> -
> -The System Timer peripheral provides four 32-bit timer channels and a
> -single 64-bit free running counter. Each channel has an output compare
> -register, which is compared against the 32 least significant bits of the
> -free running counter values, and generates an interrupt.
> -
> -Required properties:
> -
> -- compatible : should be "brcm,bcm2835-system-timer"
> -- reg : Specifies base physical address and size of the registers.
> -- interrupts : A list of 4 interrupt sinks; one per timer channel.
> -- clock-frequency : The frequency of the clock that drives the counter, in Hz.
> -
> -Example:
> -
> -timer {
> -	compatible = "brcm,bcm2835-system-timer";
> -	reg = <0x7e003000 0x1000>;
> -	interrupts = <1 0>, <1 1>, <1 2>, <1 3>;
> -	clock-frequency = <1000000>;
> -};
> diff --git a/Documentation/devicetree/bindings/timer/brcm,bcm2835-system-timer.yaml b/Documentation/devicetree/bindings/timer/brcm,bcm2835-system-timer.yaml
> new file mode 100644
> index 000000000000..555fca4897e7
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/timer/brcm,bcm2835-system-timer.yaml
> @@ -0,0 +1,44 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/timer/brcm,bcm2835-system-timer.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: BCM2835 System Timer
> +
> +maintainers:
> +  - Stefan Wahren <stefan.wahren@i2se.com>
> +
> +description:
> +  The System Timer peripheral provides four 32-bit timer channels and a
> +  single 64-bit free running counter. Each channel has an output compare
> +  register, which is compared against the 32 least significant bits of the
> +  free running counter values, and generates an interrupt.
> +
> +properties:
> +  compatible:
> +    const: brcm,bcm2835-system-timer
> +
> +  reg:
> +    maxItems: 1
> +
> +  interrupts:
> +    maxItems: 4

Should list what each entry is.

> +
> +  clock-frequency: true
> +
> +required:
> +  - compatible
> +  - reg
> +  - interrupts
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    timer@7e003000 {
> +      compatible = "brcm,bcm2835-system-timer";
> +      reg = <0x7e003000 0x1000>;
> +      interrupts = <1 0>, <1 1>, <1 2>, <1 3>;
> +      clock-frequency = <1000000>;
> +    };
> -- 
> 2.34.1
> 

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

* Re: [PATCH 02/10] dmaengine: bcm2835: also support generic dma-channel-mask
  2023-06-04 12:12 ` [PATCH 02/10] dmaengine: bcm2835: also support generic dma-channel-mask Stefan Wahren
@ 2023-06-10 10:52   ` Stefan Wahren
  0 siblings, 0 replies; 26+ messages in thread
From: Stefan Wahren @ 2023-06-10 10:52 UTC (permalink / raw)
  To: Vinod Koul, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Florian Fainelli, Ray Jui, Scott Branden, Jassi Brar,
	Thierry Reding, Uwe Kleine-König, Rafael J. Wysocki,
	Daniel Lezcano, Amit Kucheria, Zhang Rui, Thomas Gleixner
  Cc: linux-arm-kernel, dmaengine, devicetree, linux-mmc, linux-pwm,
	linux-pm, bcm-kernel-feedback-list, John Stultz

Hi,

Am 04.06.23 um 14:12 schrieb Stefan Wahren:
> Since commit e2d896c08ca3 ("Documentation: bindings: dma: Add
> binding for dma-channel-mask") there is a generic property to list
> available DMA channels for the kernel to use. The generic property
> has been implemented by some other platforms.
> So implement support for the generic one and consider the
> vendor specific one as deprecated. This also simplifies the YAML
> conversion of the BCM2835 DMA DT bindings a little bit.
> 
> Cc: John Stultz <john.stultz@linaro.org>
> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>

as Rob Herring pointed out that the matching DTS change (patch 4) breaks 
ABI compatibility, i will drop this patch and rework patch 4 in V2 of 
this series. This should make everything smoother ...

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

* Re: [PATCH 08/10] dt-bindings: mmc: convert bcm2835-sdhost bindings to YAML
  2023-06-04 12:12 ` [PATCH 08/10] dt-bindings: mmc: convert bcm2835-sdhost " Stefan Wahren
  2023-06-09 21:56   ` Rob Herring
@ 2023-06-12 14:16   ` Ulf Hansson
  1 sibling, 0 replies; 26+ messages in thread
From: Ulf Hansson @ 2023-06-12 14:16 UTC (permalink / raw)
  To: Stefan Wahren
  Cc: Vinod Koul, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Florian Fainelli, Ray Jui, Scott Branden, Jassi Brar,
	Thierry Reding, Uwe Kleine-König, Rafael J. Wysocki,
	Daniel Lezcano, Amit Kucheria, Zhang Rui, Thomas Gleixner,
	linux-arm-kernel, dmaengine, devicetree, linux-mmc, linux-pwm,
	linux-pm, bcm-kernel-feedback-list

On Sun, 4 Jun 2023 at 14:13, Stefan Wahren <stefan.wahren@i2se.com> wrote:
>
> Convert the DT binding document for bcm2835-sdhost from .txt to YAML.
>
> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>

Applied for next, thanks!

Kind regards
Uffe


> ---
>  .../bindings/mmc/brcm,bcm2835-sdhost.txt      | 23 --------
>  .../bindings/mmc/brcm,bcm2835-sdhost.yaml     | 54 +++++++++++++++++++
>  2 files changed, 54 insertions(+), 23 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/mmc/brcm,bcm2835-sdhost.txt
>  create mode 100644 Documentation/devicetree/bindings/mmc/brcm,bcm2835-sdhost.yaml
>
> diff --git a/Documentation/devicetree/bindings/mmc/brcm,bcm2835-sdhost.txt b/Documentation/devicetree/bindings/mmc/brcm,bcm2835-sdhost.txt
> deleted file mode 100644
> index d876580ae3b8..000000000000
> --- a/Documentation/devicetree/bindings/mmc/brcm,bcm2835-sdhost.txt
> +++ /dev/null
> @@ -1,23 +0,0 @@
> -Broadcom BCM2835 SDHOST controller
> -
> -This file documents differences between the core properties described
> -by mmc.txt and the properties that represent the BCM2835 controller.
> -
> -Required properties:
> -- compatible: Should be "brcm,bcm2835-sdhost".
> -- clocks: The clock feeding the SDHOST controller.
> -
> -Optional properties:
> -- dmas: DMA channel for read and write.
> -          See Documentation/devicetree/bindings/dma/dma.txt for details
> -
> -Example:
> -
> -sdhost: mmc@7e202000 {
> -       compatible = "brcm,bcm2835-sdhost";
> -       reg = <0x7e202000 0x100>;
> -       interrupts = <2 24>;
> -       clocks = <&clocks BCM2835_CLOCK_VPU>;
> -       dmas = <&dma 13>;
> -       dma-names = "rx-tx";
> -};
> diff --git a/Documentation/devicetree/bindings/mmc/brcm,bcm2835-sdhost.yaml b/Documentation/devicetree/bindings/mmc/brcm,bcm2835-sdhost.yaml
> new file mode 100644
> index 000000000000..3a5a44800675
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/mmc/brcm,bcm2835-sdhost.yaml
> @@ -0,0 +1,54 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/mmc/brcm,bcm2835-sdhost.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Broadcom BCM2835 SDHOST controller
> +
> +maintainers:
> +  - Stefan Wahren <stefan.wahren@i2se.com>
> +
> +allOf:
> +  - $ref: mmc-controller.yaml
> +
> +properties:
> +  compatible:
> +    const: brcm,bcm2835-sdhost
> +
> +  reg:
> +    maxItems: 1
> +
> +  interrupts:
> +    maxItems: 1
> +
> +  clocks:
> +    maxItems: 1
> +
> +  dmas:
> +    maxItems: 1
> +
> +  dma-names:
> +    const: rx-tx
> +
> +required:
> +  - compatible
> +  - reg
> +  - interrupts
> +  - clocks
> +
> +unevaluatedProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/clock/bcm2835.h>
> +
> +    sdhost: mmc@7e202000 {
> +      compatible = "brcm,bcm2835-sdhost";
> +      reg = <0x7e202000 0x100>;
> +      interrupts = <2 24>;
> +      clocks = <&clocks BCM2835_CLOCK_VPU>;
> +      dmas = <&dma 13>;
> +      dma-names = "rx-tx";
> +      bus-width = <4>;
> +    };
> --
> 2.34.1
>

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

* Re: [PATCH 09/10] dt-bindings: thermal: convert bcm2835-thermal bindings to YAML
  2023-06-04 12:12 ` [PATCH 09/10] dt-bindings: thermal: convert bcm2835-thermal " Stefan Wahren
  2023-06-09 21:59   ` Rob Herring
@ 2023-06-13  8:25   ` Daniel Lezcano
  1 sibling, 0 replies; 26+ messages in thread
From: Daniel Lezcano @ 2023-06-13  8:25 UTC (permalink / raw)
  To: Stefan Wahren, Vinod Koul, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Florian Fainelli, Ray Jui, Scott Branden,
	Jassi Brar, Thierry Reding, Uwe Kleine-König,
	Rafael J. Wysocki, Amit Kucheria, Zhang Rui, Thomas Gleixner
  Cc: linux-arm-kernel, dmaengine, devicetree, linux-mmc, linux-pwm,
	linux-pm, bcm-kernel-feedback-list

On 04/06/2023 14:12, Stefan Wahren wrote:
> Convert the DT binding document for bcm2835-thermal from .txt to YAML.
> 
> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
> ---

Applied, thanks

-- 
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog


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

* Re: [PATCH 05/10] dt-bindings: pwm: convert pwm-bcm2835 bindings to YAML
  2023-06-09 21:59     ` Rob Herring
@ 2023-06-13  9:02       ` Stefan Wahren
  2023-06-13  9:30         ` Uwe Kleine-König
  0 siblings, 1 reply; 26+ messages in thread
From: Stefan Wahren @ 2023-06-13  9:02 UTC (permalink / raw)
  To: Rob Herring, Uwe Kleine-König
  Cc: Vinod Koul, Krzysztof Kozlowski, Conor Dooley, Florian Fainelli,
	Ray Jui, Scott Branden, Jassi Brar, Thierry Reding,
	Rafael J. Wysocki, Daniel Lezcano, Amit Kucheria, Zhang Rui,
	Thomas Gleixner, linux-arm-kernel, dmaengine, devicetree,
	linux-mmc, linux-pwm, linux-pm, bcm-kernel-feedback-list

Hi,

Am 09.06.23 um 23:59 schrieb Rob Herring:
> On Wed, Jun 07, 2023 at 09:56:02AM +0200, Uwe Kleine-König wrote:
>> Hello,
>>
>> On Sun, Jun 04, 2023 at 02:12:18PM +0200, Stefan Wahren wrote:
>>> Convert the DT binding document for pwm-bcm2835 from .txt to YAML.
>>
>> Both dt_binding_check and dtbs_check (for ARCH=arm) are happy, apart
>> from errors like:
>>
>> arch/arm/boot/dts/bcm2711-rpi-4-b.dtb: pwm@7e20c000: #pwm-cells:0:0: 3 was expected
>>          From schema: Documentation/devicetree/bindings/pwm/pwm-bcm2835.yaml
>>
>> which is fixed in patch #6. So:
>>
>> Reviewed-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
>>
>> Who will pick up this patch? Is it supposed to go in via pwm or
>> arm/broadcom? (I suggest the latter.)
> 
> The default is the subsystem (pwm). Why not here?

i think Uwe's concern is about the fact, that the series is late in 
cycle. So the chance that the fixing DTS patch 6 miss Linux 6.5 is very 
high.

> 
> Rob
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 05/10] dt-bindings: pwm: convert pwm-bcm2835 bindings to YAML
  2023-06-13  9:02       ` Stefan Wahren
@ 2023-06-13  9:30         ` Uwe Kleine-König
  0 siblings, 0 replies; 26+ messages in thread
From: Uwe Kleine-König @ 2023-06-13  9:30 UTC (permalink / raw)
  To: Stefan Wahren
  Cc: Rob Herring, Vinod Koul, Krzysztof Kozlowski, Conor Dooley,
	Florian Fainelli, Ray Jui, Scott Branden, Jassi Brar,
	Thierry Reding, Rafael J. Wysocki, Daniel Lezcano, Amit Kucheria,
	Zhang Rui, Thomas Gleixner, linux-arm-kernel, dmaengine,
	devicetree, linux-mmc, linux-pwm, linux-pm,
	bcm-kernel-feedback-list

[-- Attachment #1: Type: text/plain, Size: 1622 bytes --]

On Tue, Jun 13, 2023 at 11:02:40AM +0200, Stefan Wahren wrote:
> Hi,
> 
> Am 09.06.23 um 23:59 schrieb Rob Herring:
> > On Wed, Jun 07, 2023 at 09:56:02AM +0200, Uwe Kleine-König wrote:
> > > Hello,
> > > 
> > > On Sun, Jun 04, 2023 at 02:12:18PM +0200, Stefan Wahren wrote:
> > > > Convert the DT binding document for pwm-bcm2835 from .txt to YAML.
> > > 
> > > Both dt_binding_check and dtbs_check (for ARCH=arm) are happy, apart
> > > from errors like:
> > > 
> > > arch/arm/boot/dts/bcm2711-rpi-4-b.dtb: pwm@7e20c000: #pwm-cells:0:0: 3 was expected
> > >          From schema: Documentation/devicetree/bindings/pwm/pwm-bcm2835.yaml
> > > 
> > > which is fixed in patch #6. So:
> > > 
> > > Reviewed-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> > > 
> > > Who will pick up this patch? Is it supposed to go in via pwm or
> > > arm/broadcom? (I suggest the latter.)
> > 
> > The default is the subsystem (pwm). Why not here?
> 
> i think Uwe's concern is about the fact, that the series is late in cycle.
> So the chance that the fixing DTS patch 6 miss Linux 6.5 is very high.

My concern is only that nobody might feel responsible and think the
other party will pick up. Thierry didn't pick up patches yet for the
next merge window (or I missed it), so I guess it's not yet to late for
going in via pwm.

I suggest to let it go in via the arm/broadcom tree, to have the whole
series together.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

end of thread, other threads:[~2023-06-13  9:30 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-04 12:12 [PATCH 00/10] ARM: dts: bcm283x: Improve device-trees and bindings Stefan Wahren
2023-06-04 12:12 ` [PATCH 01/10] ARM: dts: bcm283x: Fix pinctrl groups Stefan Wahren
2023-06-04 12:12 ` [PATCH 02/10] dmaengine: bcm2835: also support generic dma-channel-mask Stefan Wahren
2023-06-10 10:52   ` Stefan Wahren
2023-06-04 12:12 ` [PATCH 03/10] dt-bindings: dma: convert bcm2835-dma bindings to YAML Stefan Wahren
2023-06-09 21:48   ` Rob Herring
2023-06-04 12:12 ` [PATCH 04/10] ARM: dts: bcm2835: adjust DMA nodes Stefan Wahren
2023-06-09 21:54   ` Rob Herring
2023-06-04 12:12 ` [PATCH 05/10] dt-bindings: pwm: convert pwm-bcm2835 bindings to YAML Stefan Wahren
2023-06-07  7:56   ` Uwe Kleine-König
2023-06-09 21:59     ` Rob Herring
2023-06-13  9:02       ` Stefan Wahren
2023-06-13  9:30         ` Uwe Kleine-König
2023-06-09 21:55   ` Rob Herring
2023-06-04 12:12 ` [PATCH 06/10] ARM: dts: bcm283x: Increase pwm-cells Stefan Wahren
2023-06-07  7:56   ` Uwe Kleine-König
2023-06-04 12:12 ` [PATCH 07/10] dt-bindings: mailbox: convert bcm2835-mbox bindings to YAML Stefan Wahren
2023-06-09 21:56   ` Rob Herring
2023-06-04 12:12 ` [PATCH 08/10] dt-bindings: mmc: convert bcm2835-sdhost " Stefan Wahren
2023-06-09 21:56   ` Rob Herring
2023-06-12 14:16   ` Ulf Hansson
2023-06-04 12:12 ` [PATCH 09/10] dt-bindings: thermal: convert bcm2835-thermal " Stefan Wahren
2023-06-09 21:59   ` Rob Herring
2023-06-13  8:25   ` Daniel Lezcano
2023-06-04 12:12 ` [PATCH 10/10] dt-bindings: timer: convert bcm2835-system-timer " Stefan Wahren
2023-06-09 22:00   ` Rob Herring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).