linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] BCM2711 sdhci-iproc improvements
@ 2021-04-06 10:47 Nicolas Saenz Julienne
  2021-04-06 10:48 ` [PATCH 1/3] dt-bindings: mmc: iproc-sdhci: Convert to json-schema Nicolas Saenz Julienne
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Nicolas Saenz Julienne @ 2021-04-06 10:47 UTC (permalink / raw)
  To: linux-arm-kernel, linux-mmc, devicetree,
	bcm-kernel-feedback-list, linux-rpi-kernel, Ray Jui,
	Scott Branden, Saenz Julienne, Ulf Hansson, Stefan Wahren,
	Matthias Brugger
  Cc: f.fainelli, phil, tim.gover, adrian.hunter, sbranden, alcooperx,
	nsaenzjulienne, linux-kernel, robh, stefan.wahren

This is a follow-up series to "BCM2711's sdhci-iproc CMD timeouts"[1],
but since much most of the patches changed I decided to start counting
patch revisions from scratch.

This series tries to address rather odd behavior from BCM2711's
integration of sdhci-iproc (Raspberry Pi 4's SoC). The controller will
timeout on SDHCI CMDs under the following conditions:

 - No SD card plugged in (the card polling thread is running, CD irq disabled).
 - BCM2711's VPU clock configured at 500MHz or more, lower clocks are OK.

There is no specific command that will time out, it seems random.

As an extra to this I also include a small fix, and convert the
controller's bindings to yaml.

Regards,
Nicolas

[1] https://lore.kernel.org/linux-mmc/20210322185816.27582-1-nsaenz@kernel.org/

---

Nicolas Saenz Julienne (3):
  dt-bindings: mmc: iproc-sdhci: Convert to json-schema
  mmc: sdhci-iproc: Cap min clock frequency on BCM2711
  mmc: sdhci-iproc: Set SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN on BCM2711

 .../bindings/mmc/brcm,iproc-sdhci.yaml        | 63 +++++++++++++++++++
 .../bindings/mmc/brcm,sdhci-iproc.txt         | 37 -----------
 drivers/mmc/host/sdhci-iproc.c                | 21 ++++++-
 3 files changed, 83 insertions(+), 38 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/mmc/brcm,iproc-sdhci.yaml
 delete mode 100644 Documentation/devicetree/bindings/mmc/brcm,sdhci-iproc.txt

-- 
2.30.2


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

* [PATCH 1/3] dt-bindings: mmc: iproc-sdhci: Convert to json-schema
  2021-04-06 10:47 [PATCH 0/3] BCM2711 sdhci-iproc improvements Nicolas Saenz Julienne
@ 2021-04-06 10:48 ` Nicolas Saenz Julienne
  2021-04-09 16:18   ` Rob Herring
  2021-04-12  7:52   ` Ulf Hansson
  2021-04-06 10:48 ` [PATCH 2/3] mmc: sdhci-iproc: Cap min clock frequency on BCM2711 Nicolas Saenz Julienne
  2021-04-06 10:48 ` [PATCH 3/3] mmc: sdhci-iproc: Set SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN " Nicolas Saenz Julienne
  2 siblings, 2 replies; 9+ messages in thread
From: Nicolas Saenz Julienne @ 2021-04-06 10:48 UTC (permalink / raw)
  To: linux-arm-kernel, linux-mmc, devicetree,
	bcm-kernel-feedback-list, linux-rpi-kernel, Ray Jui,
	Scott Branden, Saenz Julienne, Ulf Hansson, Stefan Wahren,
	Matthias Brugger, Ray Jui, Scott Branden
  Cc: f.fainelli, phil, tim.gover, adrian.hunter, alcooperx,
	nsaenzjulienne, linux-kernel, robh, stefan.wahren, Rob Herring

Convert the brcm,iproc-sdhci binding to DT schema format using json-schema

Signed-off-by: Nicolas Saenz Julienne <nsaenz@kernel.org>

---

 .../bindings/mmc/brcm,iproc-sdhci.yaml        | 63 +++++++++++++++++++
 .../bindings/mmc/brcm,sdhci-iproc.txt         | 37 -----------
 2 files changed, 63 insertions(+), 37 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/mmc/brcm,iproc-sdhci.yaml
 delete mode 100644 Documentation/devicetree/bindings/mmc/brcm,sdhci-iproc.txt

diff --git a/Documentation/devicetree/bindings/mmc/brcm,iproc-sdhci.yaml b/Documentation/devicetree/bindings/mmc/brcm,iproc-sdhci.yaml
new file mode 100644
index 000000000000..6f569fbfa134
--- /dev/null
+++ b/Documentation/devicetree/bindings/mmc/brcm,iproc-sdhci.yaml
@@ -0,0 +1,63 @@
+# SPDX-License-Identifier: GPL-2.0
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/mmc/brcm,iproc-sdhci.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Broadcom IPROC SDHCI controller
+
+maintainers:
+  - Ray Jui <ray.jui@broadcom.com>
+  - Scott Branden <scott.branden@broadcom.com>
+  - Nicolas Saenz Julienne <nsaenz@kernel.org>
+
+allOf:
+  - $ref: mmc-controller.yaml#
+
+properties:
+  compatible:
+    enum:
+      - brcm,bcm2835-sdhci
+      - brcm,bcm2711-emmc2
+      - brcm,sdhci-iproc-cygnus
+      - brcm,sdhci-iproc
+
+  reg:
+    minItems: 1
+
+  interrupts:
+    maxItems: 1
+
+  clocks:
+    maxItems: 1
+    description:
+      Handle to core clock for the sdhci controller.
+
+  sdhci,auto-cmd12:
+    type: boolean
+    description: Specifies that controller should use auto CMD12
+
+required:
+  - compatible
+  - reg
+  - interrupts
+  - clocks
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/irq.h>
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
+    #include <dt-bindings/clock/bcm-cygnus.h>
+
+    mmc@18041000 {
+      compatible = "brcm,sdhci-iproc-cygnus";
+      reg = <0x18041000 0x100>;
+      interrupts = <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>;
+      clocks = <&lcpll0_clks BCM_CYGNUS_LCPLL0_SDIO_CLK>;
+      bus-width = <4>;
+      sdhci,auto-cmd12;
+      no-1-8-v;
+    };
+...
diff --git a/Documentation/devicetree/bindings/mmc/brcm,sdhci-iproc.txt b/Documentation/devicetree/bindings/mmc/brcm,sdhci-iproc.txt
deleted file mode 100644
index 09d87cc1182a..000000000000
--- a/Documentation/devicetree/bindings/mmc/brcm,sdhci-iproc.txt
+++ /dev/null
@@ -1,37 +0,0 @@
-Broadcom IPROC SDHCI controller
-
-This file documents differences between the core properties described
-by mmc.txt and the properties that represent the IPROC SDHCI controller.
-
-Required properties:
-- compatible : Should be one of the following
-	       "brcm,bcm2835-sdhci"
-	       "brcm,bcm2711-emmc2"
-	       "brcm,sdhci-iproc-cygnus"
-	       "brcm,sdhci-iproc"
-
-Use brcm2835-sdhci for the eMMC controller on the BCM2835 (Raspberry Pi) and
-bcm2711-emmc2 for the additional eMMC2 controller on BCM2711.
-
-Use sdhci-iproc-cygnus for Broadcom SDHCI Controllers
-restricted to 32bit host accesses to SDHCI registers.
-
-Use sdhci-iproc for Broadcom SDHCI Controllers that allow standard
-8, 16, 32-bit host access to SDHCI register.
-
-- clocks : The clock feeding the SDHCI controller.
-
-Optional properties:
-  - sdhci,auto-cmd12: specifies that controller should use auto CMD12.
-
-Example:
-
-sdhci0: sdhci@18041000 {
-	compatible = "brcm,sdhci-iproc-cygnus";
-	reg = <0x18041000 0x100>;
-	interrupts = <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>;
-	clocks = <&lcpll0_clks BCM_CYGNUS_LCPLL0_SDIO_CLK>;
-	bus-width = <4>;
-	sdhci,auto-cmd12;
-	no-1-8-v;
-};
-- 
2.30.2


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

* [PATCH 2/3] mmc: sdhci-iproc: Cap min clock frequency on BCM2711
  2021-04-06 10:47 [PATCH 0/3] BCM2711 sdhci-iproc improvements Nicolas Saenz Julienne
  2021-04-06 10:48 ` [PATCH 1/3] dt-bindings: mmc: iproc-sdhci: Convert to json-schema Nicolas Saenz Julienne
@ 2021-04-06 10:48 ` Nicolas Saenz Julienne
  2021-04-06 17:59   ` Stefan Wahren
  2021-04-06 10:48 ` [PATCH 3/3] mmc: sdhci-iproc: Set SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN " Nicolas Saenz Julienne
  2 siblings, 1 reply; 9+ messages in thread
From: Nicolas Saenz Julienne @ 2021-04-06 10:48 UTC (permalink / raw)
  To: linux-arm-kernel, linux-mmc, devicetree,
	bcm-kernel-feedback-list, linux-rpi-kernel, Ray Jui,
	Scott Branden, Saenz Julienne, Ulf Hansson, Stefan Wahren,
	Matthias Brugger, Adrian Hunter, Ray Jui, Scott Branden
  Cc: f.fainelli, phil, tim.gover, alcooperx, nsaenzjulienne,
	linux-kernel, robh, stefan.wahren

There is a known bug on BCM2711's SDHCI core integration where the
controller will hang when the difference between the core clock and the
bus clock is too great. Specifically this can be reproduced under the
following conditions:

- No SD card plugged in, polling thread is running, probing cards at
  100KHz.
- BCM2711's core clock configured at 500MHz or more.

So set 200MHz as the minimum clock frequency available for that board.

For more information on the issue see this:
https://lore.kernel.org/linux-mmc/20210322185816.27582-1-nsaenz@kernel.org/T/#m11f2783a09b581da6b8a15f302625b43a6ecdeca

Fixes: f84e411c85be ("mmc: sdhci-iproc: Add support for emmc2 of the BCM2711")
Signed-off-by: Nicolas Saenz Julienne <nsaenz@kernel.org>
---
 drivers/mmc/host/sdhci-iproc.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/drivers/mmc/host/sdhci-iproc.c b/drivers/mmc/host/sdhci-iproc.c
index ddeaf8e1f72f..1ef888e91f73 100644
--- a/drivers/mmc/host/sdhci-iproc.c
+++ b/drivers/mmc/host/sdhci-iproc.c
@@ -173,6 +173,23 @@ static unsigned int sdhci_iproc_get_max_clock(struct sdhci_host *host)
 		return pltfm_host->clock;
 }
 
+/*
+ * There is a known bug on BCM2711's SDHCI core integration where the
+ * controller will hang when the difference between the core clock and the bus
+ * clock is too great. Specifically this can be reproduced under the following
+ * conditions:
+ *
+ *  - No SD card plugged in, polling thread is running, probing cards at
+ *    100KHz.
+ *  - BCM2711's core clock configured at 500MHz or more
+ *
+ * So we set 200MHz as the minimum clock frequency available for that SoC.
+ */
+static unsigned int sdhci_iproc_bcm2711_get_min_clock(struct sdhci_host *host)
+{
+	return 200000;
+}
+
 static const struct sdhci_ops sdhci_iproc_ops = {
 	.set_clock = sdhci_set_clock,
 	.get_max_clock = sdhci_iproc_get_max_clock,
@@ -271,6 +288,7 @@ static const struct sdhci_ops sdhci_iproc_bcm2711_ops = {
 	.set_clock = sdhci_set_clock,
 	.set_power = sdhci_set_power_and_bus_voltage,
 	.get_max_clock = sdhci_iproc_get_max_clock,
+	.get_min_clock = sdhci_iproc_bcm2711_get_min_clock,
 	.set_bus_width = sdhci_set_bus_width,
 	.reset = sdhci_reset,
 	.set_uhs_signaling = sdhci_set_uhs_signaling,
-- 
2.30.2


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

* [PATCH 3/3] mmc: sdhci-iproc: Set SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN on BCM2711
  2021-04-06 10:47 [PATCH 0/3] BCM2711 sdhci-iproc improvements Nicolas Saenz Julienne
  2021-04-06 10:48 ` [PATCH 1/3] dt-bindings: mmc: iproc-sdhci: Convert to json-schema Nicolas Saenz Julienne
  2021-04-06 10:48 ` [PATCH 2/3] mmc: sdhci-iproc: Cap min clock frequency on BCM2711 Nicolas Saenz Julienne
@ 2021-04-06 10:48 ` Nicolas Saenz Julienne
  2 siblings, 0 replies; 9+ messages in thread
From: Nicolas Saenz Julienne @ 2021-04-06 10:48 UTC (permalink / raw)
  To: linux-arm-kernel, linux-mmc, devicetree,
	bcm-kernel-feedback-list, linux-rpi-kernel, Ray Jui,
	Scott Branden, Saenz Julienne, Ulf Hansson, Stefan Wahren,
	Matthias Brugger, Adrian Hunter, Ray Jui, Scott Branden
  Cc: f.fainelli, phil, tim.gover, alcooperx, nsaenzjulienne,
	linux-kernel, robh, stefan.wahren

The controller doesn't seem to pick-up on clock changes, so set the
SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN flag to query the clock frequency
directly from the clock.

Fixes: f84e411c85be ("mmc: sdhci-iproc: Add support for emmc2 of the BCM2711")
Signed-off-by: Nicolas Saenz Julienne <nsaenz@kernel.org>
---
 drivers/mmc/host/sdhci-iproc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/mmc/host/sdhci-iproc.c b/drivers/mmc/host/sdhci-iproc.c
index 1ef888e91f73..31f61ea474f0 100644
--- a/drivers/mmc/host/sdhci-iproc.c
+++ b/drivers/mmc/host/sdhci-iproc.c
@@ -295,7 +295,8 @@ static const struct sdhci_ops sdhci_iproc_bcm2711_ops = {
 };
 
 static const struct sdhci_pltfm_data sdhci_bcm2711_pltfm_data = {
-	.quirks = SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12,
+	.quirks = SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12 |
+		  SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN,
 	.ops = &sdhci_iproc_bcm2711_ops,
 };
 
-- 
2.30.2


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

* Re: [PATCH 2/3] mmc: sdhci-iproc: Cap min clock frequency on BCM2711
  2021-04-06 10:48 ` [PATCH 2/3] mmc: sdhci-iproc: Cap min clock frequency on BCM2711 Nicolas Saenz Julienne
@ 2021-04-06 17:59   ` Stefan Wahren
  2021-04-07  8:44     ` Nicolas Saenz Julienne
  0 siblings, 1 reply; 9+ messages in thread
From: Stefan Wahren @ 2021-04-06 17:59 UTC (permalink / raw)
  To: Nicolas Saenz Julienne, linux-arm-kernel, linux-mmc, devicetree,
	bcm-kernel-feedback-list, linux-rpi-kernel, Ray Jui,
	Scott Branden, Ulf Hansson, Stefan Wahren, Matthias Brugger,
	Adrian Hunter, Ray Jui, Scott Branden
  Cc: f.fainelli, phil, tim.gover, alcooperx, nsaenzjulienne,
	linux-kernel, robh

Hi Nicolas,

Am 06.04.21 um 12:48 schrieb Nicolas Saenz Julienne:
> There is a known bug on BCM2711's SDHCI core integration where the
> controller will hang when the difference between the core clock and the
> bus clock is too great. Specifically this can be reproduced under the
> following conditions:
>
> - No SD card plugged in, polling thread is running, probing cards at
>   100KHz.
> - BCM2711's core clock configured at 500MHz or more.
>
> So set 200MHz as the minimum clock frequency available for that board.
i think it should be 200 kHz?
>
> For more information on the issue see this:
> https://lore.kernel.org/linux-mmc/20210322185816.27582-1-nsaenz@kernel.org/T/#m11f2783a09b581da6b8a15f302625b43a6ecdeca
>
> Fixes: f84e411c85be ("mmc: sdhci-iproc: Add support for emmc2 of the BCM2711")
> Signed-off-by: Nicolas Saenz Julienne <nsaenz@kernel.org>
> ---
>  drivers/mmc/host/sdhci-iproc.c | 18 ++++++++++++++++++
>  1 file changed, 18 insertions(+)
>
> diff --git a/drivers/mmc/host/sdhci-iproc.c b/drivers/mmc/host/sdhci-iproc.c
> index ddeaf8e1f72f..1ef888e91f73 100644
> --- a/drivers/mmc/host/sdhci-iproc.c
> +++ b/drivers/mmc/host/sdhci-iproc.c
> @@ -173,6 +173,23 @@ static unsigned int sdhci_iproc_get_max_clock(struct sdhci_host *host)
>  		return pltfm_host->clock;
>  }
>  
> +/*
> + * There is a known bug on BCM2711's SDHCI core integration where the
> + * controller will hang when the difference between the core clock and the bus
> + * clock is too great. Specifically this can be reproduced under the following
> + * conditions:
> + *
> + *  - No SD card plugged in, polling thread is running, probing cards at
> + *    100KHz.
> + *  - BCM2711's core clock configured at 500MHz or more
> + *
> + * So we set 200MHz as the minimum clock frequency available for that SoC.
> + */
> +static unsigned int sdhci_iproc_bcm2711_get_min_clock(struct sdhci_host *host)
> +{
> +	return 200000;
> +}
> +
>  static const struct sdhci_ops sdhci_iproc_ops = {
>  	.set_clock = sdhci_set_clock,
>  	.get_max_clock = sdhci_iproc_get_max_clock,
> @@ -271,6 +288,7 @@ static const struct sdhci_ops sdhci_iproc_bcm2711_ops = {
>  	.set_clock = sdhci_set_clock,
>  	.set_power = sdhci_set_power_and_bus_voltage,
>  	.get_max_clock = sdhci_iproc_get_max_clock,
> +	.get_min_clock = sdhci_iproc_bcm2711_get_min_clock,
>  	.set_bus_width = sdhci_set_bus_width,
>  	.reset = sdhci_reset,
>  	.set_uhs_signaling = sdhci_set_uhs_signaling,

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

* Re: [PATCH 2/3] mmc: sdhci-iproc: Cap min clock frequency on BCM2711
  2021-04-06 17:59   ` Stefan Wahren
@ 2021-04-07  8:44     ` Nicolas Saenz Julienne
  0 siblings, 0 replies; 9+ messages in thread
From: Nicolas Saenz Julienne @ 2021-04-07  8:44 UTC (permalink / raw)
  To: Stefan Wahren, Nicolas Saenz Julienne, linux-arm-kernel,
	linux-mmc, devicetree, bcm-kernel-feedback-list,
	linux-rpi-kernel, Ray Jui, Scott Branden, Ulf Hansson,
	Stefan Wahren, Matthias Brugger, Adrian Hunter, Ray Jui,
	Scott Branden
  Cc: f.fainelli, phil, tim.gover, alcooperx, linux-kernel, robh

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

On Tue, 2021-04-06 at 19:59 +0200, Stefan Wahren wrote:
> Hi Nicolas,
> 
> Am 06.04.21 um 12:48 schrieb Nicolas Saenz Julienne:
> > There is a known bug on BCM2711's SDHCI core integration where the
> > controller will hang when the difference between the core clock and the
> > bus clock is too great. Specifically this can be reproduced under the
> > following conditions:
> > 
> > - No SD card plugged in, polling thread is running, probing cards at
> >   100KHz.
> > - BCM2711's core clock configured at 500MHz or more.
> > 
> > So set 200MHz as the minimum clock frequency available for that board.
> i think it should be 200 kHz?

Of course... Sorry for that.

Regards,
Nicolas

> > 
> > For more information on the issue see this:
> > https://lore.kernel.org/linux-mmc/20210322185816.27582-1-nsaenz@kernel.org/T/#m11f2783a09b581da6b8a15f302625b43a6ecdeca
> > 
> > Fixes: f84e411c85be ("mmc: sdhci-iproc: Add support for emmc2 of the BCM2711")
> > Signed-off-by: Nicolas Saenz Julienne <nsaenz@kernel.org>
> > ---
> >  drivers/mmc/host/sdhci-iproc.c | 18 ++++++++++++++++++
> >  1 file changed, 18 insertions(+)
> > 
> > diff --git a/drivers/mmc/host/sdhci-iproc.c b/drivers/mmc/host/sdhci-iproc.c
> > index ddeaf8e1f72f..1ef888e91f73 100644
> > --- a/drivers/mmc/host/sdhci-iproc.c
> > +++ b/drivers/mmc/host/sdhci-iproc.c
> > @@ -173,6 +173,23 @@ static unsigned int sdhci_iproc_get_max_clock(struct sdhci_host *host)
> >  		return pltfm_host->clock;
> >  }
> >  
> > 
> > +/*
> > + * There is a known bug on BCM2711's SDHCI core integration where the
> > + * controller will hang when the difference between the core clock and the bus
> > + * clock is too great. Specifically this can be reproduced under the following
> > + * conditions:
> > + *
> > + *  - No SD card plugged in, polling thread is running, probing cards at
> > + *    100KHz.
> > + *  - BCM2711's core clock configured at 500MHz or more
> > + *
> > + * So we set 200MHz as the minimum clock frequency available for that SoC.
> > + */
> > +static unsigned int sdhci_iproc_bcm2711_get_min_clock(struct sdhci_host *host)
> > +{
> > +	return 200000;
> > +}
> > +
> >  static const struct sdhci_ops sdhci_iproc_ops = {
> >  	.set_clock = sdhci_set_clock,
> >  	.get_max_clock = sdhci_iproc_get_max_clock,
> > @@ -271,6 +288,7 @@ static const struct sdhci_ops sdhci_iproc_bcm2711_ops = {
> >  	.set_clock = sdhci_set_clock,
> >  	.set_power = sdhci_set_power_and_bus_voltage,
> >  	.get_max_clock = sdhci_iproc_get_max_clock,
> > +	.get_min_clock = sdhci_iproc_bcm2711_get_min_clock,
> >  	.set_bus_width = sdhci_set_bus_width,
> >  	.reset = sdhci_reset,
> >  	.set_uhs_signaling = sdhci_set_uhs_signaling,



[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: [PATCH 1/3] dt-bindings: mmc: iproc-sdhci: Convert to json-schema
  2021-04-06 10:48 ` [PATCH 1/3] dt-bindings: mmc: iproc-sdhci: Convert to json-schema Nicolas Saenz Julienne
@ 2021-04-09 16:18   ` Rob Herring
  2021-04-12  7:52   ` Ulf Hansson
  1 sibling, 0 replies; 9+ messages in thread
From: Rob Herring @ 2021-04-09 16:18 UTC (permalink / raw)
  To: Nicolas Saenz Julienne
  Cc: Scott Branden, stefan.wahren, Matthias Brugger, devicetree,
	linux-mmc, Scott Branden, Ray Jui, phil, adrian.hunter,
	linux-rpi-kernel, Stefan Wahren, nsaenzjulienne, tim.gover,
	f.fainelli, bcm-kernel-feedback-list, Ulf Hansson,
	linux-arm-kernel, alcooperx, Ray Jui, linux-kernel, Rob Herring

On Tue, 06 Apr 2021 12:48:01 +0200, Nicolas Saenz Julienne wrote:
> Convert the brcm,iproc-sdhci binding to DT schema format using json-schema
> 
> Signed-off-by: Nicolas Saenz Julienne <nsaenz@kernel.org>
> 
> ---
> 
>  .../bindings/mmc/brcm,iproc-sdhci.yaml        | 63 +++++++++++++++++++
>  .../bindings/mmc/brcm,sdhci-iproc.txt         | 37 -----------
>  2 files changed, 63 insertions(+), 37 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/mmc/brcm,iproc-sdhci.yaml
>  delete mode 100644 Documentation/devicetree/bindings/mmc/brcm,sdhci-iproc.txt
> 

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

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

* Re: [PATCH 1/3] dt-bindings: mmc: iproc-sdhci: Convert to json-schema
  2021-04-06 10:48 ` [PATCH 1/3] dt-bindings: mmc: iproc-sdhci: Convert to json-schema Nicolas Saenz Julienne
  2021-04-09 16:18   ` Rob Herring
@ 2021-04-12  7:52   ` Ulf Hansson
  2021-04-12  8:13     ` nicolas saenz julienne
  1 sibling, 1 reply; 9+ messages in thread
From: Ulf Hansson @ 2021-04-12  7:52 UTC (permalink / raw)
  To: Nicolas Saenz Julienne
  Cc: Linux ARM, linux-mmc, DTML, BCM Kernel Feedback,
	moderated list:BROADCOM BCM2835...,
	Ray Jui, Scott Branden, Stefan Wahren, Matthias Brugger, Ray Jui,
	Scott Branden, Florian Fainelli, phil, tim.gover, Adrian Hunter,
	Al Cooper, Nicolas Saenz Julienne, Linux Kernel Mailing List,
	Rob Herring, Stefan Wahren, Rob Herring

On Tue, 6 Apr 2021 at 12:48, Nicolas Saenz Julienne <nsaenz@kernel.org> wrote:
>
> Convert the brcm,iproc-sdhci binding to DT schema format using json-schema
>
> Signed-off-by: Nicolas Saenz Julienne <nsaenz@kernel.org>

Applied for next, thanks! (I guess patch2 and patch3 needs a re-spin?)

Kind regards
Uffe


>
> ---
>
>  .../bindings/mmc/brcm,iproc-sdhci.yaml        | 63 +++++++++++++++++++
>  .../bindings/mmc/brcm,sdhci-iproc.txt         | 37 -----------
>  2 files changed, 63 insertions(+), 37 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/mmc/brcm,iproc-sdhci.yaml
>  delete mode 100644 Documentation/devicetree/bindings/mmc/brcm,sdhci-iproc.txt
>
> diff --git a/Documentation/devicetree/bindings/mmc/brcm,iproc-sdhci.yaml b/Documentation/devicetree/bindings/mmc/brcm,iproc-sdhci.yaml
> new file mode 100644
> index 000000000000..6f569fbfa134
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/mmc/brcm,iproc-sdhci.yaml
> @@ -0,0 +1,63 @@
> +# SPDX-License-Identifier: GPL-2.0
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/mmc/brcm,iproc-sdhci.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Broadcom IPROC SDHCI controller
> +
> +maintainers:
> +  - Ray Jui <ray.jui@broadcom.com>
> +  - Scott Branden <scott.branden@broadcom.com>
> +  - Nicolas Saenz Julienne <nsaenz@kernel.org>
> +
> +allOf:
> +  - $ref: mmc-controller.yaml#
> +
> +properties:
> +  compatible:
> +    enum:
> +      - brcm,bcm2835-sdhci
> +      - brcm,bcm2711-emmc2
> +      - brcm,sdhci-iproc-cygnus
> +      - brcm,sdhci-iproc
> +
> +  reg:
> +    minItems: 1
> +
> +  interrupts:
> +    maxItems: 1
> +
> +  clocks:
> +    maxItems: 1
> +    description:
> +      Handle to core clock for the sdhci controller.
> +
> +  sdhci,auto-cmd12:
> +    type: boolean
> +    description: Specifies that controller should use auto CMD12
> +
> +required:
> +  - compatible
> +  - reg
> +  - interrupts
> +  - clocks
> +
> +unevaluatedProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/interrupt-controller/irq.h>
> +    #include <dt-bindings/interrupt-controller/arm-gic.h>
> +    #include <dt-bindings/clock/bcm-cygnus.h>
> +
> +    mmc@18041000 {
> +      compatible = "brcm,sdhci-iproc-cygnus";
> +      reg = <0x18041000 0x100>;
> +      interrupts = <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>;
> +      clocks = <&lcpll0_clks BCM_CYGNUS_LCPLL0_SDIO_CLK>;
> +      bus-width = <4>;
> +      sdhci,auto-cmd12;
> +      no-1-8-v;
> +    };
> +...
> diff --git a/Documentation/devicetree/bindings/mmc/brcm,sdhci-iproc.txt b/Documentation/devicetree/bindings/mmc/brcm,sdhci-iproc.txt
> deleted file mode 100644
> index 09d87cc1182a..000000000000
> --- a/Documentation/devicetree/bindings/mmc/brcm,sdhci-iproc.txt
> +++ /dev/null
> @@ -1,37 +0,0 @@
> -Broadcom IPROC SDHCI controller
> -
> -This file documents differences between the core properties described
> -by mmc.txt and the properties that represent the IPROC SDHCI controller.
> -
> -Required properties:
> -- compatible : Should be one of the following
> -              "brcm,bcm2835-sdhci"
> -              "brcm,bcm2711-emmc2"
> -              "brcm,sdhci-iproc-cygnus"
> -              "brcm,sdhci-iproc"
> -
> -Use brcm2835-sdhci for the eMMC controller on the BCM2835 (Raspberry Pi) and
> -bcm2711-emmc2 for the additional eMMC2 controller on BCM2711.
> -
> -Use sdhci-iproc-cygnus for Broadcom SDHCI Controllers
> -restricted to 32bit host accesses to SDHCI registers.
> -
> -Use sdhci-iproc for Broadcom SDHCI Controllers that allow standard
> -8, 16, 32-bit host access to SDHCI register.
> -
> -- clocks : The clock feeding the SDHCI controller.
> -
> -Optional properties:
> -  - sdhci,auto-cmd12: specifies that controller should use auto CMD12.
> -
> -Example:
> -
> -sdhci0: sdhci@18041000 {
> -       compatible = "brcm,sdhci-iproc-cygnus";
> -       reg = <0x18041000 0x100>;
> -       interrupts = <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>;
> -       clocks = <&lcpll0_clks BCM_CYGNUS_LCPLL0_SDIO_CLK>;
> -       bus-width = <4>;
> -       sdhci,auto-cmd12;
> -       no-1-8-v;
> -};
> --
> 2.30.2
>

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

* Re: [PATCH 1/3] dt-bindings: mmc: iproc-sdhci: Convert to json-schema
  2021-04-12  7:52   ` Ulf Hansson
@ 2021-04-12  8:13     ` nicolas saenz julienne
  0 siblings, 0 replies; 9+ messages in thread
From: nicolas saenz julienne @ 2021-04-12  8:13 UTC (permalink / raw)
  To: Ulf Hansson
  Cc: Linux ARM, linux-mmc, DTML, BCM Kernel Feedback,
	moderated list:BROADCOM BCM2835...,
	Ray Jui, Scott Branden, Stefan Wahren, Matthias Brugger, Ray Jui,
	Scott Branden, Florian Fainelli, phil, tim.gover, Adrian Hunter,
	Al Cooper, Nicolas Saenz Julienne, Linux Kernel Mailing List,
	Rob Herring, Stefan Wahren, Rob Herring

On Mon, 2021-04-12 at 09:52 +0200, Ulf Hansson wrote:
> On Tue, 6 Apr 2021 at 12:48, Nicolas Saenz Julienne <nsaenz@kernel.org> wrote:
> > 
> > Convert the brcm,iproc-sdhci binding to DT schema format using json-schema
> > 
> > Signed-off-by: Nicolas Saenz Julienne <nsaenz@kernel.org>
> 
> Applied for next, thanks! (I guess patch2 and patch3 needs a re-spin?)

Yes, that's right. Thanks!

Regards,
Nicolas


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

end of thread, other threads:[~2021-04-12  8:14 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-06 10:47 [PATCH 0/3] BCM2711 sdhci-iproc improvements Nicolas Saenz Julienne
2021-04-06 10:48 ` [PATCH 1/3] dt-bindings: mmc: iproc-sdhci: Convert to json-schema Nicolas Saenz Julienne
2021-04-09 16:18   ` Rob Herring
2021-04-12  7:52   ` Ulf Hansson
2021-04-12  8:13     ` nicolas saenz julienne
2021-04-06 10:48 ` [PATCH 2/3] mmc: sdhci-iproc: Cap min clock frequency on BCM2711 Nicolas Saenz Julienne
2021-04-06 17:59   ` Stefan Wahren
2021-04-07  8:44     ` Nicolas Saenz Julienne
2021-04-06 10:48 ` [PATCH 3/3] mmc: sdhci-iproc: Set SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN " Nicolas Saenz Julienne

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).