public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ARM: dts: sync Moxa SDIO 'compatible' name with moxart-mmc.c
@ 2022-09-05 10:43 Sergei Antonov
  2022-09-05 11:12 ` Arnd Bergmann
  0 siblings, 1 reply; 4+ messages in thread
From: Sergei Antonov @ 2022-09-05 10:43 UTC (permalink / raw)
  To: devicetree; +Cc: robh+dt, krzysztof.kozlowski+dt, Sergei Antonov, Jonas Jensen

Driver moxart-mmc.c has .compatible = "moxa,moxart-mmc".

But moxart.dtsi and the documentation file moxa,moxart-dma.txt
contain another name: compatible = "moxa,moxart-sdhci".

Change name in moxart.dtsi and moxa,moxart-dma.txt to that from the driver.

Signed-off-by: Sergei Antonov <saproj@gmail.com>
Cc: Jonas Jensen <jonas.jensen@gmail.com>
---
 Documentation/devicetree/bindings/dma/moxa,moxart-dma.txt | 2 +-
 arch/arm/boot/dts/moxart.dtsi                             | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/dma/moxa,moxart-dma.txt b/Documentation/devicetree/bindings/dma/moxa,moxart-dma.txt
index 8a9f3559335b..20247827f35a 100644
--- a/Documentation/devicetree/bindings/dma/moxa,moxart-dma.txt
+++ b/Documentation/devicetree/bindings/dma/moxa,moxart-dma.txt
@@ -35,7 +35,7 @@ Use specific request line passing from dma
 For example, MMC request line is 5
 
 	sdhci: sdhci@98e00000 {
-		compatible = "moxa,moxart-sdhci";
+		compatible = "moxa,moxart-mmc";
 		reg = <0x98e00000 0x5C>;
 		interrupts = <5 0>;
 		clocks = <&clk_apb>;
diff --git a/arch/arm/boot/dts/moxart.dtsi b/arch/arm/boot/dts/moxart.dtsi
index f5f070a87482..d69d73930ebe 100644
--- a/arch/arm/boot/dts/moxart.dtsi
+++ b/arch/arm/boot/dts/moxart.dtsi
@@ -94,7 +94,7 @@ watchdog: watchdog@98500000 {
 		};
 
 		sdhci: sdhci@98e00000 {
-			compatible = "moxa,moxart-sdhci";
+			compatible = "moxa,moxart-mmc";
 			reg = <0x98e00000 0x5C>;
 			interrupts = <5 IRQ_TYPE_LEVEL_HIGH>;
 			clocks = <&clk_apb>;
-- 
2.34.1


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

* Re: [PATCH] ARM: dts: sync Moxa SDIO 'compatible' name with moxart-mmc.c
  2022-09-05 10:43 [PATCH] ARM: dts: sync Moxa SDIO 'compatible' name with moxart-mmc.c Sergei Antonov
@ 2022-09-05 11:12 ` Arnd Bergmann
  2022-09-05 11:24   ` Sergei Antonov
  0 siblings, 1 reply; 4+ messages in thread
From: Arnd Bergmann @ 2022-09-05 11:12 UTC (permalink / raw)
  To: Sergei Antonov, devicetree; +Cc: robh+dt, krzysztof.kozlowski+dt, Jonas Jensen

On Mon, Sep 5, 2022, at 12:43 PM, Sergei Antonov wrote:
> Driver moxart-mmc.c has .compatible = "moxa,moxart-mmc".
>
> But moxart.dtsi and the documentation file moxa,moxart-dma.txt
> contain another name: compatible = "moxa,moxart-sdhci".
>
> Change name in moxart.dtsi and moxa,moxart-dma.txt to that from the driver.
>
> Signed-off-by: Sergei Antonov <saproj@gmail.com>
> Cc: Jonas Jensen <jonas.jensen@gmail.com>

Something is clearly wrong here, as the moxart-mmc device is not
an sdhci at all, but are you sure that this is actually the
correct device?

> diff --git a/arch/arm/boot/dts/moxart.dtsi b/arch/arm/boot/dts/moxart.dtsi
> index f5f070a87482..d69d73930ebe 100644
> --- a/arch/arm/boot/dts/moxart.dtsi
> +++ b/arch/arm/boot/dts/moxart.dtsi
> @@ -94,7 +94,7 @@ watchdog: watchdog@98500000 {
>  		};
> 
>  		sdhci: sdhci@98e00000 {
> -			compatible = "moxa,moxart-sdhci";
> +			compatible = "moxa,moxart-mmc";
>  			reg = <0x98e00000 0x5C>;
>  			interrupts = <5 IRQ_TYPE_LEVEL_HIGH>;
>  			clocks = <&clk_apb>;

Both the label and the device name still point to "sdhci",
so it would be possible that the SoC actually has both
an SDHCI compatible device and ftsdc010. In this case the
correct fix would be to add a second node for the
moxa,moxart-mmc with the correct reg and interrupts
properties but to leave this one alone.

      Arnd

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

* Re: [PATCH] ARM: dts: sync Moxa SDIO 'compatible' name with moxart-mmc.c
  2022-09-05 11:12 ` Arnd Bergmann
@ 2022-09-05 11:24   ` Sergei Antonov
  2022-09-05 12:13     ` Arnd Bergmann
  0 siblings, 1 reply; 4+ messages in thread
From: Sergei Antonov @ 2022-09-05 11:24 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: devicetree, robh+dt, krzysztof.kozlowski+dt, Jonas Jensen

On Mon, 5 Sept 2022 at 14:13, Arnd Bergmann <arnd@arndb.de> wrote:
>
> On Mon, Sep 5, 2022, at 12:43 PM, Sergei Antonov wrote:
> > Driver moxart-mmc.c has .compatible = "moxa,moxart-mmc".
> >
> > But moxart.dtsi and the documentation file moxa,moxart-dma.txt
> > contain another name: compatible = "moxa,moxart-sdhci".
> >
> > Change name in moxart.dtsi and moxa,moxart-dma.txt to that from the driver.
> >
> > Signed-off-by: Sergei Antonov <saproj@gmail.com>
> > Cc: Jonas Jensen <jonas.jensen@gmail.com>
>
> Something is clearly wrong here, as the moxart-mmc device is not
> an sdhci at all, but are you sure that this is actually the
> correct device?

I am sure. Witnessing right now that it works with SDHC cards with
capacity 16 GB and 8 GB.
Datasheet quote:
"supports both MMC and SD interface protocol."
See https://bitbucket.org/Kasreyn/mkrom-uc7112lx/src/master/documents/FIC8120_DS_v1.2.pdf
, page 367.

> > diff --git a/arch/arm/boot/dts/moxart.dtsi b/arch/arm/boot/dts/moxart.dtsi
> > index f5f070a87482..d69d73930ebe 100644
> > --- a/arch/arm/boot/dts/moxart.dtsi
> > +++ b/arch/arm/boot/dts/moxart.dtsi
> > @@ -94,7 +94,7 @@ watchdog: watchdog@98500000 {
> >               };
> >
> >               sdhci: sdhci@98e00000 {
> > -                     compatible = "moxa,moxart-sdhci";
> > +                     compatible = "moxa,moxart-mmc";
> >                       reg = <0x98e00000 0x5C>;
> >                       interrupts = <5 IRQ_TYPE_LEVEL_HIGH>;
> >                       clocks = <&clk_apb>;
>
> Both the label and the device name still point to "sdhci",
> so it would be possible that the SoC actually has both
> an SDHCI compatible device and ftsdc010. In this case the
> correct fix would be to add a second node for the
> moxa,moxart-mmc with the correct reg and interrupts
> properties but to leave this one alone.

SoC contains ftsdc010 which supports SDHC cards. Should be compatible
with MMC cards too. I will test it to be sure.

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

* Re: [PATCH] ARM: dts: sync Moxa SDIO 'compatible' name with moxart-mmc.c
  2022-09-05 11:24   ` Sergei Antonov
@ 2022-09-05 12:13     ` Arnd Bergmann
  0 siblings, 0 replies; 4+ messages in thread
From: Arnd Bergmann @ 2022-09-05 12:13 UTC (permalink / raw)
  To: Sergei Antonov; +Cc: devicetree, robh+dt, krzysztof.kozlowski+dt, Jonas Jensen

On Mon, Sep 5, 2022, at 1:24 PM, Sergei Antonov wrote:
> On Mon, 5 Sept 2022 at 14:13, Arnd Bergmann <arnd@arndb.de> wrote:
>> On Mon, Sep 5, 2022, at 12:43 PM, Sergei Antonov wrote:
> I am sure. Witnessing right now that it works with SDHC cards with
> capacity 16 GB and 8 GB.
> Datasheet quote:
> "supports both MMC and SD interface protocol."
> See 
> https://bitbucket.org/Kasreyn/mkrom-uc7112lx/src/master/documents/FIC8120_DS_v1.2.pdf
> , page 367.

Ok, that does make it pretty clear that there is only one
controller.

>> > diff --git a/arch/arm/boot/dts/moxart.dtsi b/arch/arm/boot/dts/moxart.dtsi
>> > index f5f070a87482..d69d73930ebe 100644
>> > --- a/arch/arm/boot/dts/moxart.dtsi
>> > +++ b/arch/arm/boot/dts/moxart.dtsi
>> > @@ -94,7 +94,7 @@ watchdog: watchdog@98500000 {
>> >               };
>> >
>> >               sdhci: sdhci@98e00000 {
>> > -                     compatible = "moxa,moxart-sdhci";
>> > +                     compatible = "moxa,moxart-mmc";
>> >                       reg = <0x98e00000 0x5C>;
>> >                       interrupts = <5 IRQ_TYPE_LEVEL_HIGH>;
>> >                       clocks = <&clk_apb>;
>>
>> Both the label and the device name still point to "sdhci",
>> so it would be possible that the SoC actually has both
>> an SDHCI compatible device and ftsdc010. In this case the
>> correct fix would be to add a second node for the
>> moxa,moxart-mmc with the correct reg and interrupts
>> properties but to leave this one alone.
>
> SoC contains ftsdc010 which supports SDHC cards. Should be compatible
> with MMC cards too. I will test it to be sure.

Don't worry about MMC cards, that is not the point. Both sdhci
and ftsdc010 can support SD, SDHC, MMC and eMMC devices, probably
other related standards as well.

The only question was whether the ftsdc010 was incorrectly labeled
as an sdhci type controller rather than ftsdc010, or whether the
chip has both sdhci and ftsdc010 controllers that can be used
simultaneously as is common on some other chips.

Please respin the patch though and change the node name to mmc@,
and the change the label to something other than sdhci (e.g.
"mmc", or "ftsdc010", doesn't matter) to make this less
confusing.

      Arnd

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

end of thread, other threads:[~2022-09-05 12:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-05 10:43 [PATCH] ARM: dts: sync Moxa SDIO 'compatible' name with moxart-mmc.c Sergei Antonov
2022-09-05 11:12 ` Arnd Bergmann
2022-09-05 11:24   ` Sergei Antonov
2022-09-05 12:13     ` Arnd Bergmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox