[U-Boot] [PATCH v1 1/5] mtd: nand: mxs_nand: add device tree support for i.MX 6

Stefan Agner stefan at agner.ch
Wed May 30 17:01:44 UTC 2018


From: Stefan Agner <stefan.agner at toradex.com>

Support i.MX 6 NAND GPMI driver data from device tree.

Signed-off-by: Stefan Agner <stefan.agner at toradex.com>
---

 drivers/mtd/nand/mxs_nand_dt.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/mtd/nand/mxs_nand_dt.c b/drivers/mtd/nand/mxs_nand_dt.c
index c7355371ac..f2663d1023 100644
--- a/drivers/mtd/nand/mxs_nand_dt.c
+++ b/drivers/mtd/nand/mxs_nand_dt.c
@@ -21,11 +21,19 @@ struct mxs_nand_dt_data {
 	unsigned int max_ecc_strength_supported;
 };
 
+static const struct mxs_nand_dt_data mxs_nand_imx6q_data = {
+	.max_ecc_strength_supported = 40,
+};
+
 static const struct mxs_nand_dt_data mxs_nand_imx7d_data = {
 	.max_ecc_strength_supported = 62,
 };
 
 static const struct udevice_id mxs_nand_dt_ids[] = {
+	{
+		.compatible = "fsl,imx6q-gpmi-nand",
+		.data = (unsigned long)&mxs_nand_imx6q_data,
+	},
 	{
 		.compatible = "fsl,imx7d-gpmi-nand",
 		.data = (unsigned long)&mxs_nand_imx7d_data,
-- 
2.17.0



More information about the U-Boot mailing list