linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] dt-bindings: mmc: imx-esdhc: Change imx8mn and imx8mp compatible fallback
@ 2022-03-23 13:40 Adam Ford
  2022-03-23 13:40 ` [PATCH 2/3] arm64: dts: imx8mn: Enable HS400-ES Adam Ford
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Adam Ford @ 2022-03-23 13:40 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: aford, Adam Ford, Ulf Hansson, Rob Herring, Krzysztof Kozlowski,
	Shawn Guo, Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	NXP Linux Team, linux-mmc, devicetree, linux-kernel

The SDHC controller in the imx8mn and imx8mp have the same controller
as the imx8mm which is slightly different than that of the imx7d.
Using the fallback of the imx8mm enables the controllers to support
HS400-ES which is not available on the imx7d.

Signed-off-by: Adam Ford <aford173@gmail.com>

diff --git a/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.yaml b/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.yaml
index 7dbbcae9485c..d6ea73d76bdd 100644
--- a/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.yaml
+++ b/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.yaml
@@ -39,14 +39,14 @@ properties:
       - items:
           - enum:
               - fsl,imx8mm-usdhc
-              - fsl,imx8mn-usdhc
-              - fsl,imx8mp-usdhc
               - fsl,imx8mq-usdhc
               - fsl,imx8qm-usdhc
               - fsl,imx8qxp-usdhc
           - const: fsl,imx7d-usdhc
       - items:
           - enum:
+              - fsl,imx8mn-usdhc
+              - fsl,imx8mp-usdhc
               - fsl,imx93-usdhc
               - fsl,imx8ulp-usdhc
           - const: fsl,imx8mm-usdhc
-- 
2.34.1


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

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

* [PATCH 2/3] arm64: dts: imx8mn: Enable HS400-ES
  2022-03-23 13:40 [PATCH 1/3] dt-bindings: mmc: imx-esdhc: Change imx8mn and imx8mp compatible fallback Adam Ford
@ 2022-03-23 13:40 ` Adam Ford
  2022-03-23 13:40 ` [PATCH 3/3] arm64: dts: imx8mp: " Adam Ford
  2022-03-23 13:56 ` [PATCH 1/3] dt-bindings: mmc: imx-esdhc: Change imx8mn and imx8mp compatible fallback Krzysztof Kozlowski
  2 siblings, 0 replies; 8+ messages in thread
From: Adam Ford @ 2022-03-23 13:40 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: aford, Adam Ford, Ulf Hansson, Rob Herring, Krzysztof Kozlowski,
	Shawn Guo, Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	NXP Linux Team, linux-mmc, devicetree, linux-kernel

The SDHC controller in the imx8mn has the same controller
as the imx8mm which supports HS400-ES. Change the compatible
fallback to imx8mm to enable it.

Signed-off-by: Adam Ford <aford173@gmail.com>

diff --git a/arch/arm64/boot/dts/freescale/imx8mn.dtsi b/arch/arm64/boot/dts/freescale/imx8mn.dtsi
index 99f0f5026674..959285c3fee0 100644
--- a/arch/arm64/boot/dts/freescale/imx8mn.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mn.dtsi
@@ -933,7 +933,7 @@ mu: mailbox@30aa0000 {
 			};
 
 			usdhc1: mmc@30b40000 {
-				compatible = "fsl,imx8mn-usdhc", "fsl,imx7d-usdhc";
+				compatible = "fsl,imx8mn-usdhc", "fsl,imx8mm-usdhc";
 				reg = <0x30b40000 0x10000>;
 				interrupts = <GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>;
 				clocks = <&clk IMX8MN_CLK_IPG_ROOT>,
@@ -947,7 +947,7 @@ usdhc1: mmc@30b40000 {
 			};
 
 			usdhc2: mmc@30b50000 {
-				compatible = "fsl,imx8mn-usdhc", "fsl,imx7d-usdhc";
+				compatible = "fsl,imx8mn-usdhc", "fsl,imx8mm-usdhc";
 				reg = <0x30b50000 0x10000>;
 				interrupts = <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>;
 				clocks = <&clk IMX8MN_CLK_IPG_ROOT>,
@@ -961,7 +961,7 @@ usdhc2: mmc@30b50000 {
 			};
 
 			usdhc3: mmc@30b60000 {
-				compatible = "fsl,imx8mn-usdhc", "fsl,imx7d-usdhc";
+				compatible = "fsl,imx8mn-usdhc", "fsl,imx8mm-usdhc";
 				reg = <0x30b60000 0x10000>;
 				interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>;
 				clocks = <&clk IMX8MN_CLK_IPG_ROOT>,
-- 
2.34.1


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

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

* [PATCH 3/3] arm64: dts: imx8mp: Enable HS400-ES
  2022-03-23 13:40 [PATCH 1/3] dt-bindings: mmc: imx-esdhc: Change imx8mn and imx8mp compatible fallback Adam Ford
  2022-03-23 13:40 ` [PATCH 2/3] arm64: dts: imx8mn: Enable HS400-ES Adam Ford
@ 2022-03-23 13:40 ` Adam Ford
  2022-03-23 13:56 ` [PATCH 1/3] dt-bindings: mmc: imx-esdhc: Change imx8mn and imx8mp compatible fallback Krzysztof Kozlowski
  2 siblings, 0 replies; 8+ messages in thread
From: Adam Ford @ 2022-03-23 13:40 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: aford, Adam Ford, Ulf Hansson, Rob Herring, Krzysztof Kozlowski,
	Shawn Guo, Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	NXP Linux Team, linux-mmc, devicetree, linux-kernel

The SDHC controller in the imx8mp has the same controller
as the imx8mm which supports HS400-ES. Change the compatible
fallback to imx8mm to enable it.

Signed-off-by: Adam Ford <aford173@gmail.com>

diff --git a/arch/arm64/boot/dts/freescale/imx8mp.dtsi b/arch/arm64/boot/dts/freescale/imx8mp.dtsi
index 794d75173cf5..d5ee1520f1fe 100644
--- a/arch/arm64/boot/dts/freescale/imx8mp.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mp.dtsi
@@ -769,7 +769,7 @@ i2c6: i2c@30ae0000 {
 			};
 
 			usdhc1: mmc@30b40000 {
-				compatible = "fsl,imx8mp-usdhc", "fsl,imx7d-usdhc";
+				compatible = "fsl,imx8mp-usdhc", "fsl,imx8mm-usdhc";
 				reg = <0x30b40000 0x10000>;
 				interrupts = <GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>;
 				clocks = <&clk IMX8MP_CLK_DUMMY>,
@@ -783,7 +783,7 @@ usdhc1: mmc@30b40000 {
 			};
 
 			usdhc2: mmc@30b50000 {
-				compatible = "fsl,imx8mp-usdhc", "fsl,imx7d-usdhc";
+				compatible = "fsl,imx8mp-usdhc", "fsl,imx8mm-usdhc";
 				reg = <0x30b50000 0x10000>;
 				interrupts = <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>;
 				clocks = <&clk IMX8MP_CLK_DUMMY>,
@@ -797,7 +797,7 @@ usdhc2: mmc@30b50000 {
 			};
 
 			usdhc3: mmc@30b60000 {
-				compatible = "fsl,imx8mp-usdhc", "fsl,imx7d-usdhc";
+				compatible = "fsl,imx8mp-usdhc", "fsl,imx8mm-usdhc";
 				reg = <0x30b60000 0x10000>;
 				interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>;
 				clocks = <&clk IMX8MP_CLK_DUMMY>,
-- 
2.34.1


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

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

* Re: [PATCH 1/3] dt-bindings: mmc: imx-esdhc: Change imx8mn and imx8mp compatible fallback
  2022-03-23 13:40 [PATCH 1/3] dt-bindings: mmc: imx-esdhc: Change imx8mn and imx8mp compatible fallback Adam Ford
  2022-03-23 13:40 ` [PATCH 2/3] arm64: dts: imx8mn: Enable HS400-ES Adam Ford
  2022-03-23 13:40 ` [PATCH 3/3] arm64: dts: imx8mp: " Adam Ford
@ 2022-03-23 13:56 ` Krzysztof Kozlowski
  2022-03-23 14:00   ` Adam Ford
  2 siblings, 1 reply; 8+ messages in thread
From: Krzysztof Kozlowski @ 2022-03-23 13:56 UTC (permalink / raw)
  To: Adam Ford, linux-arm-kernel
  Cc: aford, Ulf Hansson, Rob Herring, Krzysztof Kozlowski, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	NXP Linux Team, linux-mmc, devicetree, linux-kernel

On 23/03/2022 14:40, Adam Ford wrote:
> The SDHC controller in the imx8mn and imx8mp have the same controller
> as the imx8mm which is slightly different than that of the imx7d.
> Using the fallback of the imx8mm enables the controllers to support
> HS400-ES which is not available on the imx7d.
> 
> Signed-off-by: Adam Ford <aford173@gmail.com>
> 
> diff --git a/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.yaml b/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.yaml
> index 7dbbcae9485c..d6ea73d76bdd 100644
> --- a/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.yaml
> +++ b/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.yaml
> @@ -39,14 +39,14 @@ properties:
>        - items:
>            - enum:
>                - fsl,imx8mm-usdhc

Your change looks reasonable, but why imx8mm is compatible with imx7d?

> -              - fsl,imx8mn-usdhc
> -              - fsl,imx8mp-usdhc
>                - fsl,imx8mq-usdhc
>                - fsl,imx8qm-usdhc
>                - fsl,imx8qxp-usdhc
>            - const: fsl,imx7d-usdhc
>        - items:
>            - enum:
> +              - fsl,imx8mn-usdhc
> +              - fsl,imx8mp-usdhc
>                - fsl,imx93-usdhc
>                - fsl,imx8ulp-usdhc
>            - const: fsl,imx8mm-usdhc


Best regards,
Krzysztof

_______________________________________________
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] 8+ messages in thread

* Re: [PATCH 1/3] dt-bindings: mmc: imx-esdhc: Change imx8mn and imx8mp compatible fallback
  2022-03-23 13:56 ` [PATCH 1/3] dt-bindings: mmc: imx-esdhc: Change imx8mn and imx8mp compatible fallback Krzysztof Kozlowski
@ 2022-03-23 14:00   ` Adam Ford
  2022-03-23 14:11     ` Krzysztof Kozlowski
  0 siblings, 1 reply; 8+ messages in thread
From: Adam Ford @ 2022-03-23 14:00 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: arm-soc, Adam Ford-BE, Ulf Hansson, Rob Herring,
	Krzysztof Kozlowski, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	linux-mmc, devicetree, Linux Kernel Mailing List

On Wed, Mar 23, 2022 at 8:56 AM Krzysztof Kozlowski <krzk@kernel.org> wrote:
>
> On 23/03/2022 14:40, Adam Ford wrote:
> > The SDHC controller in the imx8mn and imx8mp have the same controller
> > as the imx8mm which is slightly different than that of the imx7d.
> > Using the fallback of the imx8mm enables the controllers to support
> > HS400-ES which is not available on the imx7d.
> >
> > Signed-off-by: Adam Ford <aford173@gmail.com>
> >
> > diff --git a/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.yaml b/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.yaml
> > index 7dbbcae9485c..d6ea73d76bdd 100644
> > --- a/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.yaml
> > +++ b/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.yaml
> > @@ -39,14 +39,14 @@ properties:
> >        - items:
> >            - enum:
> >                - fsl,imx8mm-usdhc
>
> Your change looks reasonable, but why imx8mm is compatible with imx7d?

I saw that, and I wasn't sure the best way to go about  fixing it.  If
I move the 8mm out of the imx7d category, do I need to add it to the
enum list associated with the imx8mm, or can I just delete it from the
enum leaving the const for imx8mm good enough?

I am not very good with YAML files yet, so please forgive my ignorance.

adam
>
> > -              - fsl,imx8mn-usdhc
> > -              - fsl,imx8mp-usdhc
> >                - fsl,imx8mq-usdhc
> >                - fsl,imx8qm-usdhc
> >                - fsl,imx8qxp-usdhc
> >            - const: fsl,imx7d-usdhc
> >        - items:
> >            - enum:
> > +              - fsl,imx8mn-usdhc
> > +              - fsl,imx8mp-usdhc
> >                - fsl,imx93-usdhc
> >                - fsl,imx8ulp-usdhc
> >            - const: fsl,imx8mm-usdhc
>
>
> Best regards,
> Krzysztof

_______________________________________________
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] 8+ messages in thread

* Re: [PATCH 1/3] dt-bindings: mmc: imx-esdhc: Change imx8mn and imx8mp compatible fallback
  2022-03-23 14:00   ` Adam Ford
@ 2022-03-23 14:11     ` Krzysztof Kozlowski
  2022-03-23 17:23       ` Adam Ford
  0 siblings, 1 reply; 8+ messages in thread
From: Krzysztof Kozlowski @ 2022-03-23 14:11 UTC (permalink / raw)
  To: Adam Ford
  Cc: arm-soc, Adam Ford-BE, Ulf Hansson, Rob Herring,
	Krzysztof Kozlowski, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	linux-mmc, devicetree, Linux Kernel Mailing List

On 23/03/2022 15:00, Adam Ford wrote:
> On Wed, Mar 23, 2022 at 8:56 AM Krzysztof Kozlowski <krzk@kernel.org> wrote:
>>
>> On 23/03/2022 14:40, Adam Ford wrote:
>>> The SDHC controller in the imx8mn and imx8mp have the same controller
>>> as the imx8mm which is slightly different than that of the imx7d.
>>> Using the fallback of the imx8mm enables the controllers to support
>>> HS400-ES which is not available on the imx7d.
>>>
>>> Signed-off-by: Adam Ford <aford173@gmail.com>
>>>
>>> diff --git a/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.yaml b/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.yaml
>>> index 7dbbcae9485c..d6ea73d76bdd 100644
>>> --- a/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.yaml
>>> +++ b/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.yaml
>>> @@ -39,14 +39,14 @@ properties:
>>>        - items:
>>>            - enum:
>>>                - fsl,imx8mm-usdhc
>>
>> Your change looks reasonable, but why imx8mm is compatible with imx7d?
> 
> I saw that, and I wasn't sure the best way to go about  fixing it.  If
> I move the 8mm out of the imx7d category, do I need to add it to the
> enum list associated with the imx8mm, or can I just delete it from the
> enum leaving the const for imx8mm good enough?
> 

The DTS is using:
  compatible = "fsl,imx8mm-usdhc", "fsl,imx7d-usdhc"
which looks incorrect, based on what you wrote in commit description.
Since fsl,imx8mm-usdhc has its own compatibility-group and defines the
properties for entire family (imx8mm + imx8mn + imx8mp), then I would
assume that either fsl,imx8mm-usdhc is not be compatible with imx7d or
everything is compatible with imx7d. IOW, DTS and bindings should be
changed to one of following:
1. Everything compatible with imx7d:
  compatible = "fsl,imx8mm-usdhc", "fsl,imx7d-usdhc";
  compatible = "fsl,imx8mq-usdhc", "fsl,imx8mm-usdhc", "fsl,imx7d-usdhc";

2. A new group:
  compatible = "fsl,imx8mm-usdhc";
  compatible = "fsl,imx8mq-usdhc", "fsl,imx8mm-usdhc";

Which one, I am not sure. My commit 80fd350b95 organized it in (1)
approach, because also that time there was no new group for 8mm (added
in commit 431fae8). I assume NXP engineer knows better, so the better
solution would be (2). In such case, imx8mm has to be moved to the first
enum and all DTS have to be adjusted.


Best regards,
Krzysztof

_______________________________________________
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] 8+ messages in thread

* Re: [PATCH 1/3] dt-bindings: mmc: imx-esdhc: Change imx8mn and imx8mp compatible fallback
  2022-03-23 14:11     ` Krzysztof Kozlowski
@ 2022-03-23 17:23       ` Adam Ford
  2022-03-24  2:54         ` Bough Chen
  0 siblings, 1 reply; 8+ messages in thread
From: Adam Ford @ 2022-03-23 17:23 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: arm-soc, Adam Ford-BE, Ulf Hansson, Rob Herring,
	Krzysztof Kozlowski, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	linux-mmc, devicetree, Linux Kernel Mailing List

On Wed, Mar 23, 2022 at 9:11 AM Krzysztof Kozlowski <krzk@kernel.org> wrote:
>
> On 23/03/2022 15:00, Adam Ford wrote:
> > On Wed, Mar 23, 2022 at 8:56 AM Krzysztof Kozlowski <krzk@kernel.org> wrote:
> >>
> >> On 23/03/2022 14:40, Adam Ford wrote:
> >>> The SDHC controller in the imx8mn and imx8mp have the same controller
> >>> as the imx8mm which is slightly different than that of the imx7d.
> >>> Using the fallback of the imx8mm enables the controllers to support
> >>> HS400-ES which is not available on the imx7d.
> >>>
> >>> Signed-off-by: Adam Ford <aford173@gmail.com>
> >>>
> >>> diff --git a/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.yaml b/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.yaml
> >>> index 7dbbcae9485c..d6ea73d76bdd 100644
> >>> --- a/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.yaml
> >>> +++ b/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.yaml
> >>> @@ -39,14 +39,14 @@ properties:
> >>>        - items:
> >>>            - enum:
> >>>                - fsl,imx8mm-usdhc
> >>
> >> Your change looks reasonable, but why imx8mm is compatible with imx7d?
> >
> > I saw that, and I wasn't sure the best way to go about  fixing it.  If
> > I move the 8mm out of the imx7d category, do I need to add it to the
> > enum list associated with the imx8mm, or can I just delete it from the
> > enum leaving the const for imx8mm good enough?
> >
>
> The DTS is using:
>   compatible = "fsl,imx8mm-usdhc", "fsl,imx7d-usdhc"
> which looks incorrect, based on what you wrote in commit description.
> Since fsl,imx8mm-usdhc has its own compatibility-group and defines the
> properties for entire family (imx8mm + imx8mn + imx8mp), then I would
> assume that either fsl,imx8mm-usdhc is not be compatible with imx7d or
> everything is compatible with imx7d. IOW, DTS and bindings should be
> changed to one of following:
> 1. Everything compatible with imx7d:
>   compatible = "fsl,imx8mm-usdhc", "fsl,imx7d-usdhc";
>   compatible = "fsl,imx8mq-usdhc", "fsl,imx8mm-usdhc", "fsl,imx7d-usdhc";
>
> 2. A new group:
>   compatible = "fsl,imx8mm-usdhc";
>   compatible = "fsl,imx8mq-usdhc", "fsl,imx8mm-usdhc";
>
> Which one, I am not sure. My commit 80fd350b95 organized it in (1)
> approach, because also that time there was no new group for 8mm (added
> in commit 431fae8). I assume NXP engineer knows better, so the better
> solution would be (2). In such case, imx8mm has to be moved to the first
> enum and all DTS have to be adjusted.

I pulled NXP's downtream kernel based on 5.15.y, and grepped the code
for imx8mm-usdhc.  It looks like the imx8mm, imx8mn, imx8mp, and
imx8ulp use the imx8mm compatible flag.
The imx8mq uses the older imx7d.  I'll do a second revision later
today or tomorrow.  Looking inside the driver, it appears there are
some other quirks that different between the imx7d and imx8mm beyond
just support for HS400-ES, so I think your option 2 is appropriate.
Hopefully someone from NXP can comment.

adam
>
>
> Best regards,
> Krzysztof

_______________________________________________
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] 8+ messages in thread

* RE: [PATCH 1/3] dt-bindings: mmc: imx-esdhc: Change imx8mn and imx8mp compatible fallback
  2022-03-23 17:23       ` Adam Ford
@ 2022-03-24  2:54         ` Bough Chen
  0 siblings, 0 replies; 8+ messages in thread
From: Bough Chen @ 2022-03-24  2:54 UTC (permalink / raw)
  To: Adam Ford, Krzysztof Kozlowski
  Cc: arm-soc, Adam Ford-BE, Ulf Hansson, Rob Herring,
	Krzysztof Kozlowski, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, dl-linux-imx, linux-mmc,
	devicetree, Linux Kernel Mailing List


[-- Attachment #1.1: Type: text/plain, Size: 5074 bytes --]

> -----Original Message-----
> From: Adam Ford [mailto:aford173@gmail.com]
> Sent: 2022年3月24日 1:23
> To: Krzysztof Kozlowski <krzk@kernel.org>
> Cc: arm-soc <linux-arm-kernel@lists.infradead.org>; Adam Ford-BE
> <aford@beaconembedded.com>; Ulf Hansson <ulf.hansson@linaro.org>; Rob
> Herring <robh+dt@kernel.org>; Krzysztof Kozlowski <krzk+dt@kernel.org>;
> Shawn Guo <shawnguo@kernel.org>; Sascha Hauer
> <s.hauer@pengutronix.de>; Pengutronix Kernel Team
> <kernel@pengutronix.de>; Fabio Estevam <festevam@gmail.com>;
> dl-linux-imx <linux-imx@nxp.com>; linux-mmc <linux-mmc@vger.kernel.org>;
> devicetree <devicetree@vger.kernel.org>; Linux Kernel Mailing List
> <linux-kernel@vger.kernel.org>
> Subject: Re: [PATCH 1/3] dt-bindings: mmc: imx-esdhc: Change imx8mn and
> imx8mp compatible fallback
> 
> On Wed, Mar 23, 2022 at 9:11 AM Krzysztof Kozlowski <krzk@kernel.org>
> wrote:
> >
> > On 23/03/2022 15:00, Adam Ford wrote:
> > > On Wed, Mar 23, 2022 at 8:56 AM Krzysztof Kozlowski <krzk@kernel.org>
> wrote:
> > >>
> > >> On 23/03/2022 14:40, Adam Ford wrote:
> > >>> The SDHC controller in the imx8mn and imx8mp have the same
> > >>> controller as the imx8mm which is slightly different than that of the
> imx7d.
> > >>> Using the fallback of the imx8mm enables the controllers to
> > >>> support HS400-ES which is not available on the imx7d.
> > >>>
> > >>> Signed-off-by: Adam Ford <aford173@gmail.com>
> > >>>
> > >>> diff --git
> > >>> a/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.yaml
> > >>> b/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.yaml
> > >>> index 7dbbcae9485c..d6ea73d76bdd 100644
> > >>> --- a/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.yaml
> > >>> +++ b/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.yaml
> > >>> @@ -39,14 +39,14 @@ properties:
> > >>>        - items:
> > >>>            - enum:
> > >>>                - fsl,imx8mm-usdhc
> > >>
> > >> Your change looks reasonable, but why imx8mm is compatible with imx7d?
> > >
> > > I saw that, and I wasn't sure the best way to go about  fixing it.
> > > If I move the 8mm out of the imx7d category, do I need to add it to
> > > the enum list associated with the imx8mm, or can I just delete it
> > > from the enum leaving the const for imx8mm good enough?
> > >
> >
> > The DTS is using:
> >   compatible = "fsl,imx8mm-usdhc", "fsl,imx7d-usdhc"
> > which looks incorrect, based on what you wrote in commit description.
> > Since fsl,imx8mm-usdhc has its own compatibility-group and defines the
> > properties for entire family (imx8mm + imx8mn + imx8mp), then I would
> > assume that either fsl,imx8mm-usdhc is not be compatible with imx7d or
> > everything is compatible with imx7d. IOW, DTS and bindings should be
> > changed to one of following:
> > 1. Everything compatible with imx7d:
> >   compatible = "fsl,imx8mm-usdhc", "fsl,imx7d-usdhc";
> >   compatible = "fsl,imx8mq-usdhc", "fsl,imx8mm-usdhc",
> > "fsl,imx7d-usdhc";
> >
> > 2. A new group:
> >   compatible = "fsl,imx8mm-usdhc";
> >   compatible = "fsl,imx8mq-usdhc", "fsl,imx8mm-usdhc";
> >
> > Which one, I am not sure. My commit 80fd350b95 organized it in (1)
> > approach, because also that time there was no new group for 8mm (added
> > in commit 431fae8). I assume NXP engineer knows better, so the better
> > solution would be (2). In such case, imx8mm has to be moved to the
> > first enum and all DTS have to be adjusted.
> 
> I pulled NXP's downtream kernel based on 5.15.y, and grepped the code for
> imx8mm-usdhc.  It looks like the imx8mm, imx8mn, imx8mp, and imx8ulp use
> the imx8mm compatible flag.
> The imx8mq uses the older imx7d.  I'll do a second revision later today or
> tomorrow.  Looking inside the driver, it appears there are some other quirks
> that different between the imx7d and imx8mm beyond just support for
> HS400-ES, so I think your option 2 is appropriate.
> Hopefully someone from NXP can comment.
> 

I think better to change like this, and dts need change accordingly.

  compatible:
    oneOf:
      - enum:
          - fsl,imx25-esdhc
          - fsl,imx35-esdhc
          - fsl,imx51-esdhc
          - fsl,imx53-esdhc
          - fsl,imx6q-usdhc
          - fsl,imx6sl-usdhc
          - fsl,imx6sll-usdhc
          - fsl,imx6sx-usdhc
          - fsl,imx6ull-usdhc
          - fsl,imx7d-usdhc
          - fsl,imx7ulp-usdhc
          - fsl,imxrt1050-usdhc
          - fsl,imx8mm-usdhc
          - fsl,imx8qxp-usdhc
          - nxp,s32g2-usdhc
      - items:
          - enum:
              - fsl,imx8mq-usdhc
          - const: fsl,imx7d-usdhc
      - items:
          - enum:
              - fsl,imx93-usdhc
              - fsl,imx8ulp-usdhc
              - fsl,imx8mn-usdhc
              - fsl,imx8mp-usdhc
          - const: fsl,imx8mm-usdhc
      - items:
          - enum:
              - fsl,imx8qm-usdhc
          - const: fsl,imx8qxp-usdhc


Best Regards
Haibo Chen

> adam
> >
> >
> > Best regards,
> > Krzysztof

[-- Attachment #1.2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 9551 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
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] 8+ messages in thread

end of thread, other threads:[~2022-03-24  2:55 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-23 13:40 [PATCH 1/3] dt-bindings: mmc: imx-esdhc: Change imx8mn and imx8mp compatible fallback Adam Ford
2022-03-23 13:40 ` [PATCH 2/3] arm64: dts: imx8mn: Enable HS400-ES Adam Ford
2022-03-23 13:40 ` [PATCH 3/3] arm64: dts: imx8mp: " Adam Ford
2022-03-23 13:56 ` [PATCH 1/3] dt-bindings: mmc: imx-esdhc: Change imx8mn and imx8mp compatible fallback Krzysztof Kozlowski
2022-03-23 14:00   ` Adam Ford
2022-03-23 14:11     ` Krzysztof Kozlowski
2022-03-23 17:23       ` Adam Ford
2022-03-24  2:54         ` Bough Chen

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