linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH V3 0/4] Fixup fsl-imx-ehci fallback
@ 2022-04-02 19:39 Adam Ford
  2022-04-02 19:39 ` [PATCH V3 1/3] dt-bindings: mmc: imx-esdhc: Update compatible fallbacks Adam Ford
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Adam Ford @ 2022-04-02 19:39 UTC (permalink / raw)
  To: linux-mmc
  Cc: haibo.chen, aford, Adam Ford, Ulf Hansson, Rob Herring,
	Krzysztof Kozlowski, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	devicetree, linux-arm-kernel, linux-kernel

The imx8mm-usdhc is a superset of the imx7d-usdhc which adds
HS400-ES.
The i.MX8MN and i.MX8MP both support the HS400-ES so the fallback
to imx8mm-usdhc is more correct since they share the same IP block
as the imx8mm.  This series updates the YAML file to show the updated
compatible fallbacks while keeping the older imx7d-usdhc to prevent
breakage and keep backwards compatibility. However, a note was added
indicating the imx7d fallback was deprecated for certain devices.
It then updates the imx8mn and imx8mp to fallback to both imx8mm and
imx7d to enable the missing HS400-ES functionality.

Adam Ford (3):
  dt-bindings: mmc: imx-esdhc: Update compatible fallbacks
  arm64: dts: imx8mn: Enable HS400-ES
  arm64: dts: imx8mp: Enable HS400-ES

 .../bindings/mmc/fsl-imx-esdhc.yaml           |   21 +-
 arch/arm64/boot/dts/freescale/imx8mn.dtsi     |    6 +-
 arch/arm64/boot/dts/freescale/imx8mp.dtsi     |    6 +-

-- 
2.34.1


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

* [PATCH V3 1/3] dt-bindings: mmc: imx-esdhc: Update compatible fallbacks
  2022-04-02 19:39 [PATCH V3 0/4] Fixup fsl-imx-ehci fallback Adam Ford
@ 2022-04-02 19:39 ` Adam Ford
  2022-04-02 20:12   ` Krzysztof Kozlowski
  2022-04-02 19:39 ` [PATCH V3 2/3] arm64: dts: imx8mn: Enable HS400-ES Adam Ford
  2022-04-02 19:39 ` [PATCH V3 3/3] arm64: dts: imx8mp: " Adam Ford
  2 siblings, 1 reply; 7+ messages in thread
From: Adam Ford @ 2022-04-02 19:39 UTC (permalink / raw)
  To: linux-mmc
  Cc: haibo.chen, aford, Adam Ford, Ulf Hansson, Rob Herring,
	Krzysztof Kozlowski, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	devicetree, linux-arm-kernel, 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. After discussion with NXP,
it turns out that the imx8qm should fall back to the imx8qxp, because
those have some additional flags not present in the imx8mm.

Suggested-by: haibo.chen@nxp.com
Signed-off-by: Adam Ford <aford173@gmail.com>
---
V3:  Marked the imx7d-usdhc as deprecated when there are better
     fallback options or the fallback isn't needed.
     Leave the deprecated fallback in the YAML to prevent errors
     Remove Reviewed-by from Krzysztof Kozlowski due to the above

V2:  Update the table per recomendation from Haibo.

diff --git a/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.yaml b/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.yaml
index 7dbbcae9485c..11f039320d79 100644
--- a/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.yaml
+++ b/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.yaml
@@ -34,23 +34,34 @@ properties:
           - fsl,imx6ull-usdhc
           - fsl,imx7d-usdhc
           - fsl,imx7ulp-usdhc
+          - fsl,imx8mm-usdhc
+          - fsl,imx8qxp-usdhc
           - fsl,imxrt1050-usdhc
           - nxp,s32g2-usdhc
       - items:
           - enum:
               - fsl,imx8mm-usdhc
+              - fsl,imx8mq-usdhc
+            # fsl,imx7d-usdhc fallback is deprecated for imx8mm-usdhc
+          - const: fsl,imx7d-usdhc
+      - items:
+          - enum:
               - fsl,imx8mn-usdhc
               - fsl,imx8mp-usdhc
-              - fsl,imx8mq-usdhc
-              - fsl,imx8qm-usdhc
-              - fsl,imx8qxp-usdhc
+          - const: fsl,imx8mm-usdhc
+            # fsl,imx7d-usdhc fallback is deprecated
           - const: fsl,imx7d-usdhc
       - items:
           - enum:
-              - fsl,imx93-usdhc
               - fsl,imx8ulp-usdhc
+              - fsl,imx93-usdhc
           - const: fsl,imx8mm-usdhc
-
+      - items:
+          - enum:
+              - fsl,imx8qm-usdhc
+          - const: fsl,imx8qxp-usdhc
+            # fsl,imx7d-usdhc fallback is deprecated
+          - const: fsl,imx7d-usdhc
   reg:
     maxItems: 1
 
-- 
2.34.1


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

* [PATCH V3 2/3] arm64: dts: imx8mn: Enable HS400-ES
  2022-04-02 19:39 [PATCH V3 0/4] Fixup fsl-imx-ehci fallback Adam Ford
  2022-04-02 19:39 ` [PATCH V3 1/3] dt-bindings: mmc: imx-esdhc: Update compatible fallbacks Adam Ford
@ 2022-04-02 19:39 ` Adam Ford
  2022-04-02 19:39 ` [PATCH V3 3/3] arm64: dts: imx8mp: " Adam Ford
  2 siblings, 0 replies; 7+ messages in thread
From: Adam Ford @ 2022-04-02 19:39 UTC (permalink / raw)
  To: linux-mmc
  Cc: haibo.chen, aford, Adam Ford, Ulf Hansson, Rob Herring,
	Krzysztof Kozlowski, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	devicetree, linux-arm-kernel, 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, but keep the imx7d-usdhc
to prevent breaking backwards compatibility.

Signed-off-by: Adam Ford <aford173@gmail.com>
---
V3:  Keep the fsl,imx7d-usdhc to keep backwards compatiblity and prevent breaking something.

diff --git a/arch/arm64/boot/dts/freescale/imx8mn.dtsi b/arch/arm64/boot/dts/freescale/imx8mn.dtsi
index 99f0f5026674..13c51363cc06 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", "fsl,imx7d-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", "fsl,imx7d-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", "fsl,imx7d-usdhc";
 				reg = <0x30b60000 0x10000>;
 				interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>;
 				clocks = <&clk IMX8MN_CLK_IPG_ROOT>,
-- 
2.34.1


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

* [PATCH V3 3/3] arm64: dts: imx8mp: Enable HS400-ES
  2022-04-02 19:39 [PATCH V3 0/4] Fixup fsl-imx-ehci fallback Adam Ford
  2022-04-02 19:39 ` [PATCH V3 1/3] dt-bindings: mmc: imx-esdhc: Update compatible fallbacks Adam Ford
  2022-04-02 19:39 ` [PATCH V3 2/3] arm64: dts: imx8mn: Enable HS400-ES Adam Ford
@ 2022-04-02 19:39 ` Adam Ford
  2 siblings, 0 replies; 7+ messages in thread
From: Adam Ford @ 2022-04-02 19:39 UTC (permalink / raw)
  To: linux-mmc
  Cc: haibo.chen, aford, Adam Ford, Ulf Hansson, Rob Herring,
	Krzysztof Kozlowski, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	devicetree, linux-arm-kernel, 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, but keep the imx7d-usdhc
to prevent breaking backwards compatibility.

Signed-off-by: Adam Ford <aford173@gmail.com>
---
V3:  Keep the fsl,imx7d-usdhc to keep backwards compatiblity and prevent breaking something.

diff --git a/arch/arm64/boot/dts/freescale/imx8mp.dtsi b/arch/arm64/boot/dts/freescale/imx8mp.dtsi
index 794d75173cf5..8578ff1062e6 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", "fsl,imx7d-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", "fsl,imx7d-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", "fsl,imx7d-usdhc";
 				reg = <0x30b60000 0x10000>;
 				interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>;
 				clocks = <&clk IMX8MP_CLK_DUMMY>,
-- 
2.34.1


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

* Re: [PATCH V3 1/3] dt-bindings: mmc: imx-esdhc: Update compatible fallbacks
  2022-04-02 19:39 ` [PATCH V3 1/3] dt-bindings: mmc: imx-esdhc: Update compatible fallbacks Adam Ford
@ 2022-04-02 20:12   ` Krzysztof Kozlowski
  2022-04-10 14:36     ` Adam Ford
  0 siblings, 1 reply; 7+ messages in thread
From: Krzysztof Kozlowski @ 2022-04-02 20:12 UTC (permalink / raw)
  To: Adam Ford, linux-mmc
  Cc: haibo.chen, aford, Ulf Hansson, Rob Herring, Krzysztof Kozlowski,
	Shawn Guo, Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	NXP Linux Team, devicetree, linux-arm-kernel, linux-kernel

On 02/04/2022 21:39, 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. After discussion with NXP,
> it turns out that the imx8qm should fall back to the imx8qxp, because
> those have some additional flags not present in the imx8mm.
> 
> Suggested-by: haibo.chen@nxp.com
> Signed-off-by: Adam Ford <aford173@gmail.com>
> ---
> V3:  Marked the imx7d-usdhc as deprecated when there are better
>      fallback options or the fallback isn't needed.
>      Leave the deprecated fallback in the YAML to prevent errors
>      Remove Reviewed-by from Krzysztof Kozlowski due to the above
> 
> V2:  Update the table per recomendation from Haibo.
> 
> diff --git a/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.yaml b/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.yaml
> index 7dbbcae9485c..11f039320d79 100644
> --- a/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.yaml
> +++ b/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.yaml
> @@ -34,23 +34,34 @@ properties:
>            - fsl,imx6ull-usdhc
>            - fsl,imx7d-usdhc
>            - fsl,imx7ulp-usdhc
> +          - fsl,imx8mm-usdhc
> +          - fsl,imx8qxp-usdhc
>            - fsl,imxrt1050-usdhc
>            - nxp,s32g2-usdhc
>        - items:
>            - enum:
>                - fsl,imx8mm-usdhc
> +              - fsl,imx8mq-usdhc
> +            # fsl,imx7d-usdhc fallback is deprecated for imx8mm-usdhc
> +          - const: fsl,imx7d-usdhc

Instead of comment use (I think on the same level as items):

deprecated: true

> +      - items:
> +          - enum:
>                - fsl,imx8mn-usdhc
>                - fsl,imx8mp-usdhc

So if this is a deprecated list, where is a proper one? The list with
this enum + imx8mm?

IOW, you need to list here:
1. Old combinations with "deprecated: true"
2. New combinations.

> -              - fsl,imx8mq-usdhc
> -              - fsl,imx8qm-usdhc
> -              - fsl,imx8qxp-usdhc
> +          - const: fsl,imx8mm-usdhc
> +            # fsl,imx7d-usdhc fallback is deprecated
>            - const: fsl,imx7d-usdhc
>        - items:
>            - enum:
> -              - fsl,imx93-usdhc
>                - fsl,imx8ulp-usdhc
> +              - fsl,imx93-usdhc
>            - const: fsl,imx8mm-usdhc
> -
> +      - items:
> +          - enum:
> +              - fsl,imx8qm-usdhc
> +          - const: fsl,imx8qxp-usdhc
> +            # fsl,imx7d-usdhc fallback is deprecated
> +          - const: fsl,imx7d-usdhc
>    reg:
>      maxItems: 1
>  


Best regards,
Krzysztof

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

* Re: [PATCH V3 1/3] dt-bindings: mmc: imx-esdhc: Update compatible fallbacks
  2022-04-02 20:12   ` Krzysztof Kozlowski
@ 2022-04-10 14:36     ` Adam Ford
  2022-04-10 15:22       ` Krzysztof Kozlowski
  0 siblings, 1 reply; 7+ messages in thread
From: Adam Ford @ 2022-04-10 14:36 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: linux-mmc, Haibo Chen, Adam Ford-BE, Ulf Hansson, Rob Herring,
	Krzysztof Kozlowski, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	devicetree, arm-soc, Linux Kernel Mailing List

On Sat, Apr 2, 2022 at 3:12 PM Krzysztof Kozlowski
<krzysztof.kozlowski@linaro.org> wrote:
>
> On 02/04/2022 21:39, 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. After discussion with NXP,
> > it turns out that the imx8qm should fall back to the imx8qxp, because
> > those have some additional flags not present in the imx8mm.
> >
> > Suggested-by: haibo.chen@nxp.com
> > Signed-off-by: Adam Ford <aford173@gmail.com>
> > ---
> > V3:  Marked the imx7d-usdhc as deprecated when there are better
> >      fallback options or the fallback isn't needed.
> >      Leave the deprecated fallback in the YAML to prevent errors
> >      Remove Reviewed-by from Krzysztof Kozlowski due to the above
> >
> > V2:  Update the table per recomendation from Haibo.
> >
> > diff --git a/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.yaml b/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.yaml
> > index 7dbbcae9485c..11f039320d79 100644
> > --- a/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.yaml
> > +++ b/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.yaml
> > @@ -34,23 +34,34 @@ properties:
> >            - fsl,imx6ull-usdhc
> >            - fsl,imx7d-usdhc
> >            - fsl,imx7ulp-usdhc
> > +          - fsl,imx8mm-usdhc
> > +          - fsl,imx8qxp-usdhc
> >            - fsl,imxrt1050-usdhc
> >            - nxp,s32g2-usdhc
> >        - items:
> >            - enum:
> >                - fsl,imx8mm-usdhc
> > +              - fsl,imx8mq-usdhc
> > +            # fsl,imx7d-usdhc fallback is deprecated for imx8mm-usdhc
> > +          - const: fsl,imx7d-usdhc
>
> Instead of comment use (I think on the same level as items):
>
> deprecated: true

I have tried various combinations of where to place "deprecated" and
whether or not to use a hyphen, but I always get syntax errors.  Do
you have an example of this I can see?

adam
>
> > +      - items:
> > +          - enum:
> >                - fsl,imx8mn-usdhc
> >                - fsl,imx8mp-usdhc
>
> So if this is a deprecated list, where is a proper one? The list with
> this enum + imx8mm?
>
> IOW, you need to list here:
> 1. Old combinations with "deprecated: true"
> 2. New combinations.
>
> > -              - fsl,imx8mq-usdhc
> > -              - fsl,imx8qm-usdhc
> > -              - fsl,imx8qxp-usdhc
> > +          - const: fsl,imx8mm-usdhc
> > +            # fsl,imx7d-usdhc fallback is deprecated
> >            - const: fsl,imx7d-usdhc
> >        - items:
> >            - enum:
> > -              - fsl,imx93-usdhc
> >                - fsl,imx8ulp-usdhc
> > +              - fsl,imx93-usdhc
> >            - const: fsl,imx8mm-usdhc
> > -
> > +      - items:
> > +          - enum:
> > +              - fsl,imx8qm-usdhc
> > +          - const: fsl,imx8qxp-usdhc
> > +            # fsl,imx7d-usdhc fallback is deprecated
> > +          - const: fsl,imx7d-usdhc
> >    reg:
> >      maxItems: 1
> >
>
>
> Best regards,
> Krzysztof

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

* Re: [PATCH V3 1/3] dt-bindings: mmc: imx-esdhc: Update compatible fallbacks
  2022-04-10 14:36     ` Adam Ford
@ 2022-04-10 15:22       ` Krzysztof Kozlowski
  0 siblings, 0 replies; 7+ messages in thread
From: Krzysztof Kozlowski @ 2022-04-10 15:22 UTC (permalink / raw)
  To: Adam Ford
  Cc: Krzysztof Kozlowski, linux-mmc, Haibo Chen, Adam Ford-BE,
	Ulf Hansson, Rob Herring, Krzysztof Kozlowski, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	NXP Linux Team, devicetree, arm-soc, Linux Kernel Mailing List

On Sun, 10 Apr 2022 at 16:36, Adam Ford <aford173@gmail.com> wrote:
> > Instead of comment use (I think on the same level as items):
> >
> > deprecated: true
>
> I have tried various combinations of where to place "deprecated" and
> whether or not to use a hyphen, but I always get syntax errors.  Do
> you have an example of this I can see?

Some simple example:
Documentation/devicetree/bindings/arm/arm,cci-400.yaml

More complex:
Documentation/devicetree/bindings/arm/gemini.yaml

Best regards,
Krzysztof

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

end of thread, other threads:[~2022-04-10 15:23 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-02 19:39 [PATCH V3 0/4] Fixup fsl-imx-ehci fallback Adam Ford
2022-04-02 19:39 ` [PATCH V3 1/3] dt-bindings: mmc: imx-esdhc: Update compatible fallbacks Adam Ford
2022-04-02 20:12   ` Krzysztof Kozlowski
2022-04-10 14:36     ` Adam Ford
2022-04-10 15:22       ` Krzysztof Kozlowski
2022-04-02 19:39 ` [PATCH V3 2/3] arm64: dts: imx8mn: Enable HS400-ES Adam Ford
2022-04-02 19:39 ` [PATCH V3 3/3] arm64: dts: imx8mp: " Adam Ford

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