mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] few small change for flexspi setting in dts file
@ 2025-09-16  8:57 Haibo Chen
  2025-09-16  8:57 ` [PATCH 1/2] arm64: dts: correct the flexspi compatible string to match with yaml Haibo Chen
  2025-09-16  8:57 ` [PATCH 2/2] arm64: dts: imx8mm/mn/mp: limit the max frequency of spi nor chip Haibo Chen
  0 siblings, 2 replies; 6+ messages in thread
From: Haibo Chen @ 2025-09-16  8:57 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam
  Cc: devicetree, imx, linux-arm-kernel, linux-kernel, Haibo Chen

PATCH1 adjust the compatible string to align with yaml
PATCH2 limit the nor max frequency accroding to data sheet

Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
---
Haibo Chen (2):
      arm64: dts: correct the flexspi compatible string to match with yaml
      arm64: dts: imx8mm/mn/mp: limit the max frequency of spi nor chip

 arch/arm64/boot/dts/freescale/imx8mm-evk.dts       | 2 +-
 arch/arm64/boot/dts/freescale/imx8mn-evk.dtsi      | 2 +-
 arch/arm64/boot/dts/freescale/imx8mp-evk.dts       | 2 +-
 arch/arm64/boot/dts/freescale/imx91_93_common.dtsi | 2 +-
 arch/arm64/boot/dts/freescale/imx95.dtsi           | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)
---
base-commit: c3067c2c38316c3ef013636c93daa285ee6aaa2e
change-id: 20250916-flexspi-dts-24af8b6bf468

Best regards,
-- 
Haibo Chen <haibo.chen@nxp.com>


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

* [PATCH 1/2] arm64: dts: correct the flexspi compatible string to match with yaml
  2025-09-16  8:57 [PATCH 0/2] few small change for flexspi setting in dts file Haibo Chen
@ 2025-09-16  8:57 ` Haibo Chen
  2025-09-16  9:42   ` Fabio Estevam
  2025-09-16  8:57 ` [PATCH 2/2] arm64: dts: imx8mm/mn/mp: limit the max frequency of spi nor chip Haibo Chen
  1 sibling, 1 reply; 6+ messages in thread
From: Haibo Chen @ 2025-09-16  8:57 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam
  Cc: devicetree, imx, linux-arm-kernel, linux-kernel, Haibo Chen

According to Documentation/devicetree/bindings/spi/spi-nxp-fspi.yaml,
imx93/imx95 should use it's own compatible string and back compatible
with imx8mm.

Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
---
 arch/arm64/boot/dts/freescale/imx91_93_common.dtsi | 2 +-
 arch/arm64/boot/dts/freescale/imx95.dtsi           | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/freescale/imx91_93_common.dtsi b/arch/arm64/boot/dts/freescale/imx91_93_common.dtsi
index 52da571f26c4e8a2703e4476b5541fa7aca52f10..7958cef353766a430df5e626ff2403dc05a974b1 100644
--- a/arch/arm64/boot/dts/freescale/imx91_93_common.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx91_93_common.dtsi
@@ -706,7 +706,7 @@ flexcan2: can@425b0000 {
 			};
 
 			flexspi1: spi@425e0000 {
-				compatible = "nxp,imx8mm-fspi";
+				compatible = "nxp,imx93-fspi", "nxp,imx8mm-fspi";
 				reg = <0x425e0000 0x10000>, <0x28000000 0x10000000>;
 				reg-names = "fspi_base", "fspi_mmap";
 				#address-cells = <1>;
diff --git a/arch/arm64/boot/dts/freescale/imx95.dtsi b/arch/arm64/boot/dts/freescale/imx95.dtsi
index 1292677cbe4eb8c5f3ec2874a17ad6efd0111192..a0ff7002be9fa0529ba5712df4c056c56f0e3242 100644
--- a/arch/arm64/boot/dts/freescale/imx95.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx95.dtsi
@@ -945,7 +945,7 @@ flexcan3: can@42600000 {
 			};
 
 			flexspi1: spi@425e0000 {
-				compatible = "nxp,imx8mm-fspi";
+				compatible = "nxp,imx95-fspi", "nxp,imx8mm-fspi";
 				reg = <0x425e0000 0x10000>, <0x28000000 0x8000000>;
 				reg-names = "fspi_base", "fspi_mmap";
 				#address-cells = <1>;

-- 
2.34.1


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

* [PATCH 2/2] arm64: dts: imx8mm/mn/mp: limit the max frequency of spi nor chip
  2025-09-16  8:57 [PATCH 0/2] few small change for flexspi setting in dts file Haibo Chen
  2025-09-16  8:57 ` [PATCH 1/2] arm64: dts: correct the flexspi compatible string to match with yaml Haibo Chen
@ 2025-09-16  8:57 ` Haibo Chen
  2025-09-16  9:42   ` Fabio Estevam
  1 sibling, 1 reply; 6+ messages in thread
From: Haibo Chen @ 2025-09-16  8:57 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam
  Cc: devicetree, imx, linux-arm-kernel, linux-kernel, Haibo Chen

The spi nor on imx8mm/mn/mp evk board works under SDR mode, and
driver use FlexSPIn_MCR0[RXCLKSRC] = 0x0 for SDR mode.
According to the datasheet, there is IO limitation on these chips,
the max frequency of such case is 66MHz, so add the limatation here
to align with datasheet.

Refer to 3.9.9 FlexSPI timing parameters on page 65.
https://www.nxp.com/docs/en/data-sheet/IMX8MNCEC.pdf

Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
---
 arch/arm64/boot/dts/freescale/imx8mm-evk.dts  | 2 +-
 arch/arm64/boot/dts/freescale/imx8mn-evk.dtsi | 2 +-
 arch/arm64/boot/dts/freescale/imx8mp-evk.dts  | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm64/boot/dts/freescale/imx8mm-evk.dts b/arch/arm64/boot/dts/freescale/imx8mm-evk.dts
index b68954bcc383cfc799877ff64c5d9a59dd863907..bb57c1db7c64adb20c996bbc2e3996e1fde5b98a 100644
--- a/arch/arm64/boot/dts/freescale/imx8mm-evk.dts
+++ b/arch/arm64/boot/dts/freescale/imx8mm-evk.dts
@@ -47,7 +47,7 @@ flash@0 {
 		#address-cells = <1>;
 		#size-cells = <1>;
 		compatible = "jedec,spi-nor";
-		spi-max-frequency = <80000000>;
+		spi-max-frequency = <66000000>;
 		spi-tx-bus-width = <1>;
 		spi-rx-bus-width = <4>;
 	};
diff --git a/arch/arm64/boot/dts/freescale/imx8mn-evk.dtsi b/arch/arm64/boot/dts/freescale/imx8mn-evk.dtsi
index 145355ff91b454795478b504eb403b0590848d46..fa43238e7b917a5b5f0bd9af96bd900f6dbacb8d 100644
--- a/arch/arm64/boot/dts/freescale/imx8mn-evk.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mn-evk.dtsi
@@ -199,7 +199,7 @@ flash0: flash@0 {
 		reg = <0>;
 		#address-cells = <1>;
 		#size-cells = <1>;
-		spi-max-frequency = <166000000>;
+		spi-max-frequency = <66000000>;
 		spi-tx-bus-width = <4>;
 		spi-rx-bus-width = <4>;
 	};
diff --git a/arch/arm64/boot/dts/freescale/imx8mp-evk.dts b/arch/arm64/boot/dts/freescale/imx8mp-evk.dts
index 3730792daf5010213cbb9f6869a8110ea28eb48a..0b47d72cae9900ad53eed04c810a9ea8af795446 100644
--- a/arch/arm64/boot/dts/freescale/imx8mp-evk.dts
+++ b/arch/arm64/boot/dts/freescale/imx8mp-evk.dts
@@ -272,7 +272,7 @@ &flexspi {
 	flash@0 {
 		compatible = "jedec,spi-nor";
 		reg = <0>;
-		spi-max-frequency = <80000000>;
+		spi-max-frequency = <66000000>;
 		spi-tx-bus-width = <1>;
 		spi-rx-bus-width = <4>;
 	};

-- 
2.34.1


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

* Re: [PATCH 2/2] arm64: dts: imx8mm/mn/mp: limit the max frequency of spi nor chip
  2025-09-16  8:57 ` [PATCH 2/2] arm64: dts: imx8mm/mn/mp: limit the max frequency of spi nor chip Haibo Chen
@ 2025-09-16  9:42   ` Fabio Estevam
  2025-09-16 10:03     ` Bough Chen
  0 siblings, 1 reply; 6+ messages in thread
From: Fabio Estevam @ 2025-09-16  9:42 UTC (permalink / raw)
  To: Haibo Chen
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, devicetree, imx,
	linux-arm-kernel, linux-kernel

Hi Haibo,

On Tue, Sep 16, 2025 at 5:57 AM Haibo Chen <haibo.chen@nxp.com> wrote:
>
> The spi nor on imx8mm/mn/mp evk board works under SDR mode, and
> driver use FlexSPIn_MCR0[RXCLKSRC] = 0x0 for SDR mode.
> According to the datasheet, there is IO limitation on these chips,
> the max frequency of such case is 66MHz, so add the limatation here

Typo: limitation.

> to align with datasheet.
>
> Refer to 3.9.9 FlexSPI timing parameters on page 65.
> https://www.nxp.com/docs/en/data-sheet/IMX8MNCEC.pdf

Fixes tag?

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

* Re: [PATCH 1/2] arm64: dts: correct the flexspi compatible string to match with yaml
  2025-09-16  8:57 ` [PATCH 1/2] arm64: dts: correct the flexspi compatible string to match with yaml Haibo Chen
@ 2025-09-16  9:42   ` Fabio Estevam
  0 siblings, 0 replies; 6+ messages in thread
From: Fabio Estevam @ 2025-09-16  9:42 UTC (permalink / raw)
  To: Haibo Chen
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, devicetree, imx,
	linux-arm-kernel, linux-kernel

On Tue, Sep 16, 2025 at 5:57 AM Haibo Chen <haibo.chen@nxp.com> wrote:
>
> According to Documentation/devicetree/bindings/spi/spi-nxp-fspi.yaml,
> imx93/imx95 should use it's own compatible string and back compatible
> with imx8mm.

Nitpick: "fallback compatible"

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

* RE: [PATCH 2/2] arm64: dts: imx8mm/mn/mp: limit the max frequency of spi nor chip
  2025-09-16  9:42   ` Fabio Estevam
@ 2025-09-16 10:03     ` Bough Chen
  0 siblings, 0 replies; 6+ messages in thread
From: Bough Chen @ 2025-09-16 10:03 UTC (permalink / raw)
  To: Fabio Estevam
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, devicetree, imx,
	linux-arm-kernel, linux-kernel


> -----Original Message-----
> From: Fabio Estevam <festevam@gmail.com>
> Sent: 2025年9月16日 17:42
> To: Bough Chen <haibo.chen@nxp.com>
> Cc: Rob Herring <robh@kernel.org>; Krzysztof Kozlowski <krzk+dt@kernel.org>;
> Conor Dooley <conor+dt@kernel.org>; Shawn Guo <shawnguo@kernel.org>;
> Sascha Hauer <s.hauer@pengutronix.de>; Pengutronix Kernel Team
> <kernel@pengutronix.de>; devicetree@vger.kernel.org; imx@lists.linux.dev;
> linux-arm-kernel@lists.infradead.org; linux-kernel@vger.kernel.org
> Subject: Re: [PATCH 2/2] arm64: dts: imx8mm/mn/mp: limit the max frequency
> of spi nor chip
> 
> Hi Haibo,
> 
> On Tue, Sep 16, 2025 at 5:57 AM Haibo Chen <haibo.chen@nxp.com> wrote:
> >
> > The spi nor on imx8mm/mn/mp evk board works under SDR mode, and driver
> > use FlexSPIn_MCR0[RXCLKSRC] = 0x0 for SDR mode.
> > According to the datasheet, there is IO limitation on these chips, the
> > max frequency of such case is 66MHz, so add the limatation here
> 
> Typo: limitation.
> 
> > to align with datasheet.
> >
> > Refer to 3.9.9 FlexSPI timing parameters on page 65.
> > https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.
> >
> nxp.com%2Fdocs%2Fen%2Fdata-sheet%2FIMX8MNCEC.pdf&data=05%7C02%7
> Chaibo.
> >
> chen%40nxp.com%7Ce6a75800d66b428dc03b08ddf50552ef%7C686ea1d3bc2b
> 4c6fa9
> >
> 2cd99c5c301635%7C0%7C1%7C638936125394709166%7CUnknown%7CTWFpb
> GZsb3d8ey
> >
> JFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTW
> Fp
> >
> bCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=%2Fn5dKo9EZdOY7I%2BaGk0
> oX4N%2B
> > dPZktHrpzYyDljCW5zc%3D&reserved=0
> 
> Fixes tag?

Though the original clock setting still can work, yes, it's better to add fix tag here.

Thanks
Haibo Chen

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

end of thread, other threads:[~2025-09-16 10:03 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-09-16  8:57 [PATCH 0/2] few small change for flexspi setting in dts file Haibo Chen
2025-09-16  8:57 ` [PATCH 1/2] arm64: dts: correct the flexspi compatible string to match with yaml Haibo Chen
2025-09-16  9:42   ` Fabio Estevam
2025-09-16  8:57 ` [PATCH 2/2] arm64: dts: imx8mm/mn/mp: limit the max frequency of spi nor chip Haibo Chen
2025-09-16  9:42   ` Fabio Estevam
2025-09-16 10:03     ` Bough Chen

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

all inboxes | Powered by JetHome®