* [PATCH] ARM: arch: dts: qspi: Add QSPI support to the NXP IMX8MN-EVK board
@ 2022-02-28 17:03 Joacim Zetterling
2022-02-28 17:11 ` Ahmad Fatoum
0 siblings, 1 reply; 2+ messages in thread
From: Joacim Zetterling @ 2022-02-28 17:03 UTC (permalink / raw)
To: barebox; +Cc: a.fatoum
Add QSPI support in the default config and DTS files for the
NXP IMX8MN-EVK board. To be able to use it You also need the
QSPI driver enabled.
Tested on the NXP IMX8MN-EVK board as well as on an IMX8MN
custom bord supporting a QSPI flash. Tested with the memory
dump command i.e. 'md -s /dev/m25p0'.
Signed-off-by: Joacim Zetterling <joacim.zetterling@westermo.com>
---
arch/arm/configs/imx_v8_defconfig | 1 +
arch/arm/dts/imx8mn-evk.dts | 32 +++++++++++++++++++++++++++++++
2 files changed, 33 insertions(+)
diff --git a/arch/arm/configs/imx_v8_defconfig b/arch/arm/configs/imx_v8_defconfig
index b28c868a99bf..fe6398cc873d 100644
--- a/arch/arm/configs/imx_v8_defconfig
+++ b/arch/arm/configs/imx_v8_defconfig
@@ -99,6 +99,7 @@ CONFIG_NET_USB=y
CONFIG_NET_USB_ASIX=y
CONFIG_NET_USB_SMSC95XX=y
CONFIG_DRIVER_SPI_IMX=y
+CONFIG_SPI_NXP_FLEXSPI=y
CONFIG_I2C=y
CONFIG_I2C_IMX=y
CONFIG_MTD=y
diff --git a/arch/arm/dts/imx8mn-evk.dts b/arch/arm/dts/imx8mn-evk.dts
index 9fe24b3184f1..3d418f894283 100644
--- a/arch/arm/dts/imx8mn-evk.dts
+++ b/arch/arm/dts/imx8mn-evk.dts
@@ -60,3 +60,35 @@
&ocotp {
barebox,provide-mac-address = <&fec1 0x640>;
};
+
+&iomuxc {
+ pinctrl-names = "default";
+
+ pinctrl_flexspi0: flexspi0grp {
+ fsl,pins = <
+ MX8MN_IOMUXC_NAND_ALE_QSPI_A_SCLK 0x1c4
+ MX8MN_IOMUXC_NAND_CE0_B_QSPI_A_SS0_B 0x84
+ MX8MN_IOMUXC_NAND_DATA00_QSPI_A_DATA0 0x84
+ MX8MN_IOMUXC_NAND_DATA01_QSPI_A_DATA1 0x84
+ MX8MN_IOMUXC_NAND_DATA02_QSPI_A_DATA2 0x84
+ MX8MN_IOMUXC_NAND_DATA03_QSPI_A_DATA3 0x84
+ >;
+ };
+};
+
+&flexspi {
+ status = "okay";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_flexspi0>;
+
+ system_flash: mt25ql01g@0 {
+ reg = <0>;
+ compatible = "jedec,spi-nor";
+ spi-max-frequency = <80000000>;
+ spi-tx-bus-width = <4>;
+ spi-rx-bus-width = <4>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ };
+};
+
--
2.25.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] ARM: arch: dts: qspi: Add QSPI support to the NXP IMX8MN-EVK board
2022-02-28 17:03 [PATCH] ARM: arch: dts: qspi: Add QSPI support to the NXP IMX8MN-EVK board Joacim Zetterling
@ 2022-02-28 17:11 ` Ahmad Fatoum
0 siblings, 0 replies; 2+ messages in thread
From: Ahmad Fatoum @ 2022-02-28 17:11 UTC (permalink / raw)
To: Joacim Zetterling, barebox
On 28.02.22 18:03, Joacim Zetterling wrote:
> Add QSPI support in the default config and DTS files for the
> NXP IMX8MN-EVK board. To be able to use it You also need the
> QSPI driver enabled.
>
> Tested on the NXP IMX8MN-EVK board as well as on an IMX8MN
> custom bord supporting a QSPI flash. Tested with the memory
> dump command i.e. 'md -s /dev/m25p0'.
>
> Signed-off-by: Joacim Zetterling <joacim.zetterling@westermo.com>
With below feedback addressed, Reviewed-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
For reference, an equivalent patch has been submitted upstream as well:
https://lore.kernel.org/linux-arm-kernel/20220228132523.2679099-1-michael@walle.cc/
> ---
> arch/arm/configs/imx_v8_defconfig | 1 +
> arch/arm/dts/imx8mn-evk.dts | 32 +++++++++++++++++++++++++++++++
> 2 files changed, 33 insertions(+)
>
> diff --git a/arch/arm/configs/imx_v8_defconfig b/arch/arm/configs/imx_v8_defconfig
> index b28c868a99bf..fe6398cc873d 100644
> --- a/arch/arm/configs/imx_v8_defconfig
> +++ b/arch/arm/configs/imx_v8_defconfig
> @@ -99,6 +99,7 @@ CONFIG_NET_USB=y
> CONFIG_NET_USB_ASIX=y
> CONFIG_NET_USB_SMSC95XX=y
> CONFIG_DRIVER_SPI_IMX=y
> +CONFIG_SPI_NXP_FLEXSPI=y
> CONFIG_I2C=y
> CONFIG_I2C_IMX=y
> CONFIG_MTD=y
> diff --git a/arch/arm/dts/imx8mn-evk.dts b/arch/arm/dts/imx8mn-evk.dts
> index 9fe24b3184f1..3d418f894283 100644
> --- a/arch/arm/dts/imx8mn-evk.dts
> +++ b/arch/arm/dts/imx8mn-evk.dts
> @@ -60,3 +60,35 @@
> &ocotp {
> barebox,provide-mac-address = <&fec1 0x640>;
> };
> +
> +&iomuxc {
> + pinctrl-names = "default";
This line should be dropped.
> +
> + pinctrl_flexspi0: flexspi0grp {
> + fsl,pins = <
> + MX8MN_IOMUXC_NAND_ALE_QSPI_A_SCLK 0x1c4
> + MX8MN_IOMUXC_NAND_CE0_B_QSPI_A_SS0_B 0x84
> + MX8MN_IOMUXC_NAND_DATA00_QSPI_A_DATA0 0x84
> + MX8MN_IOMUXC_NAND_DATA01_QSPI_A_DATA1 0x84
> + MX8MN_IOMUXC_NAND_DATA02_QSPI_A_DATA2 0x84
> + MX8MN_IOMUXC_NAND_DATA03_QSPI_A_DATA3 0x84
> + >;
> + };
> +};
> +
> +&flexspi {
> + status = "okay";
> + pinctrl-names = "default";
> + pinctrl-0 = <&pinctrl_flexspi0>;
> +
> + system_flash: mt25ql01g@0 {
Can you rename to flash@0? That way we avoid breakage when upstream
merges the patch.
> + reg = <0>;
> + compatible = "jedec,spi-nor";
> + spi-max-frequency = <80000000>;
Can you test with 166000000? That way we can just drop this change
again with a future DT update without change in functionality.
> + spi-tx-bus-width = <4>;
> + spi-rx-bus-width = <4>;
> + #address-cells = <1>;
> + #size-cells = <1>;
> + };
> +};
> +
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-02-28 17:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-28 17:03 [PATCH] ARM: arch: dts: qspi: Add QSPI support to the NXP IMX8MN-EVK board Joacim Zetterling
2022-02-28 17:11 ` Ahmad Fatoum
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox