From nobody Thu Nov 28 02:59:35 2024 Received: from mail-lj1-f181.google.com (mail-lj1-f181.google.com [209.85.208.181]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E8E9113D276; Sat, 5 Oct 2024 08:26:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.181 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728116808; cv=none; b=Iz/aDxdn1C2wVb1iGLCI/HOZaqJXWFIQmF0Sc/Fiu88NUGghvV41l6UuwteigZEAR4ByGO8amCAs3mN5Rj6M2n0VL/8zng/e54vnh02xOvMU9wNOhkGtRxyPVO+Xy0YzLmAGzMcRWanSMao3pGkugQ/ZLzbQd1xI1j2s7h0QBsM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728116808; c=relaxed/simple; bh=PDm1f5NEBuhwxeXGvwzqxiOMHTZXe7TWbR431qOgkS4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=qr6nDCI5kO1otj2vdwNXXmJMzAGNR4QRSuXnBvJzjdOJ8x/aY8o+tuipUU3P1Bqr/ynWkdqikDeBC0zNJpciWZp/igbyS0BjkyF4hPJ17NfcLpEZOa+nyjmhU+AZqx8Vo8NiW+KT+ns+azKCoZMr3adwswH4tCOkfQz5/C1IMUU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=eiYuTyQR; arc=none smtp.client-ip=209.85.208.181 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="eiYuTyQR" Received: by mail-lj1-f181.google.com with SMTP id 38308e7fff4ca-2fabe5c8c26so26575081fa.2; Sat, 05 Oct 2024 01:26:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1728116805; x=1728721605; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=dqCsg44tBpEIKTMwf8yZOmaXX9/g3lsiJW70OB7Ta3s=; b=eiYuTyQRpo5Nj09zG5l0QID8Z53AzJHafS3ErGV4lYAQw3cr9QjER1n9YS/6Ucky7e h6/u3eSQniDliXiXPYsDIo57q+dyJYIhM8fQkSIW8/3VQNm7zzRFlY0+YgzYxrsF69pN BRI7YKxnxh+wTZPb8447SqkDMHDL5ZhV+2cTPFix8Ns/55h3tHwCwGeAPy/Mq3jqFs6r cNwBUg0zkVbHlaNdkLjwnV1t1K6LFa5J/m67wxR+I1dt1on8ZpYYIk/NddvBrI/yLfuF auSyV7NY4LKv6UTj6t2BStul93vsr8YG+d64f4iamKmmKrALqX5w8ApuCxiFnmU81Yib caew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728116805; x=1728721605; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=dqCsg44tBpEIKTMwf8yZOmaXX9/g3lsiJW70OB7Ta3s=; b=XX3K3RKDELkr9V3bxUdXDc2SyX6ktfDRlo5eLmg5k5NEunSuQT4LZ1WBfuIo3aYdVr pm7uQ7wNOyXUOTnfV5yRaZ5NmR14SYJYbqT7AHgz9LlT1mrS77w4tWJphhhFNFMA8FKG 3LLpfw4dDyZrst+EfV26w3mZZ3HcOylWSy+a/CDpi99kT9FEd+SPvGPijQoRhk11FfWs vd7Q4ZIIB1hfnyZEvUPDjL8ezQ//xwdLPYRmb/C5SXW6yecFNmAjtz3FlEMBO4tGTu1k aoI8p143h78mhIHuZWf/yWLfk+EyLIqMNnzkV6ucD3cJm2LkAYswQVNaoBAS020vcK0W OTJg== X-Forwarded-Encrypted: i=1; AJvYcCWyq47wuTQJHMRqXGu6WtBm1kfkMf3q9Ax5ZOpd1J7xnPZ5OAfl5Z2m2dBYYnwqd13KOgLn3DPR79cx@vger.kernel.org, AJvYcCXlw5yGtDdc17fPbRWPmMoa0vXCCJtmSRUVLQ8QCrV25t35awawGYxFM+wAb/B5yA45c8Nl5teuiime29tM@vger.kernel.org X-Gm-Message-State: AOJu0YyDeDsWiKr4sonB/QRvbuRL6RX+qXnuGLBIvsKNP9avRS/iubCm ToOQ+ME1KySu8iHazz4WtzFhbIxRUKmKfHbTv/SezqeQ75NEdV1z X-Google-Smtp-Source: AGHT+IFVwvOqVPGo03VnhqxHzm3JDs5eAGUx4DD90f/N4FGPaFbMyYpEsXFOvf6ViHdbr9hk3Y461A== X-Received: by 2002:a2e:5119:0:b0:2fa:c59d:1af3 with SMTP id 38308e7fff4ca-2faf3c41693mr19330691fa.20.1728116804793; Sat, 05 Oct 2024 01:26:44 -0700 (PDT) Received: from [192.168.1.11] (83-233-6-197.cust.bredband2.com. [83.233.6.197]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-2faf9b3a88esm1857711fa.125.2024.10.05.01.26.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 05 Oct 2024 01:26:43 -0700 (PDT) From: Marcus Folkesson Date: Sat, 05 Oct 2024 10:26:11 +0200 Subject: [PATCH v3 1/2] mtd: nand: davinci: add support for on-die ECC engine type Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20241005-ondie-v3-1-459d9c32225c@gmail.com> References: <20241005-ondie-v3-0-459d9c32225c@gmail.com> In-Reply-To: <20241005-ondie-v3-0-459d9c32225c@gmail.com> To: Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Marcus Folkesson X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=1761; i=marcus.folkesson@gmail.com; h=from:subject:message-id; bh=PDm1f5NEBuhwxeXGvwzqxiOMHTZXe7TWbR431qOgkS4=; b=owEBbQKS/ZANAwAIAYiATm9ZXVIyAcsmYgBnAPgxCpGkVQjrQwxeY7yelCHPP4Knt13Zym1Ok Mdnp/0SIeqJAjMEAAEIAB0WIQQFUaLotmy1TWTBLGWIgE5vWV1SMgUCZwD4MQAKCRCIgE5vWV1S MkiDEACc732NOWaYcnSMRquMSA/lGhB49H478+wBt9qie+3WcgpwB5JT+mC2G4iPmmYRQK3nGVG dHotjDqMC6Iw4S59OS3uHUIPItzhaBP+Yv+yE7ds30pRyVrW3ELjACNIbM1/l+krxjgt3HMp97P uRYBx/zN/ClslaVSKoExd9DG+o2u8n+OSb0mjKskVnn3qGnOm/Rx17dMSLVSs1Y7uonitNUhPWm JNz9epjEfNBtV9Neh9KjmctakSNua8O0Mt7Vfq/uHbVePn1Nof/kbRElO/fFZiTifpOrZJ6Fxk+ 8W8m8Z1Ag0Uz+v7jTo0lIbZdpM9E+GL7sORwtlzVVTtf9ZCDKEci+2drsq4oZWJ+akDkqE8/akz rG8LbEGztQunNugJhLaepROxbusYOJoK8KY9Q6IYlh9CBINFRXbB9OItX8LTwtpezUrudj3Sw3V 7zi0r9JC6/slryo6exmc1GnokhP/ww3MUFflwqRO/EqXm3vzmfcXd+9CqGaohFfaFhU7S0Dg5/j 6E3a+BMYisHWJK+tV5yyWRqWBAsZYhfGxbD+CNh3Kt/yIXiZRJq9jA4vLp1pXvGloAMSWWiLFQR uicjj8xkP3jOVrPfpXz+3RlZBnSGptba9lUVVyisN3kYSDc8AWhMXiyymGcf4RUN8erfFSzI3Fg 9qPUeZD7pDCOnXA== X-Developer-Key: i=marcus.folkesson@gmail.com; a=openpgp; fpr=AB91D46C7E0F6E6FB2AB640EC0FE25D598F6C127 Some chips, e.g. Micron MT29F1G08ABBFAH4, has a mandatory on-die ECC. Add "on-die" as ECC engine type in order to be compatible with those. Signed-off-by: Marcus Folkesson --- drivers/mtd/nand/raw/davinci_nand.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/mtd/nand/raw/davinci_nand.c b/drivers/mtd/nand/raw/dav= inci_nand.c index 392678143a36b20b42c1827eee8203dc2e41889a..79e768d337ae12f6e8d7f21f1ac= d4e259f4f3020 100644 --- a/drivers/mtd/nand/raw/davinci_nand.c +++ b/drivers/mtd/nand/raw/davinci_nand.c @@ -66,6 +66,7 @@ struct davinci_nand_pdata { =20 /* none =3D=3D NAND_ECC_ENGINE_TYPE_NONE (strongly *not* advised!!) * soft =3D=3D NAND_ECC_ENGINE_TYPE_SOFT + * on-die =3D=3D NAND_ECC_ENGINE_TYPE_ON_DIE * else =3D=3D NAND_ECC_ENGINE_TYPE_ON_HOST, according to ecc_bits * * All DaVinci-family chips support 1-bit hardware ECC. @@ -524,6 +525,8 @@ static struct davinci_nand_pdata pdata->engine_type =3D NAND_ECC_ENGINE_TYPE_SOFT; if (!strncmp("hw", mode, 2)) pdata->engine_type =3D NAND_ECC_ENGINE_TYPE_ON_HOST; + if (!strncmp("on-die", mode, 6)) + pdata->engine_type =3D NAND_ECC_ENGINE_TYPE_ON_DIE; } if (!of_property_read_u32(pdev->dev.of_node, "ti,davinci-ecc-bits", &prop)) @@ -580,6 +583,7 @@ static int davinci_nand_attach_chip(struct nand_chip *c= hip) =20 switch (chip->ecc.engine_type) { case NAND_ECC_ENGINE_TYPE_NONE: + case NAND_ECC_ENGINE_TYPE_ON_DIE: pdata->ecc_bits =3D 0; break; case NAND_ECC_ENGINE_TYPE_SOFT: @@ -914,4 +918,3 @@ module_platform_driver(nand_davinci_driver); MODULE_LICENSE("GPL"); MODULE_AUTHOR("Texas Instruments"); MODULE_DESCRIPTION("Davinci NAND flash driver"); - --=20 2.46.0 From nobody Thu Nov 28 02:59:35 2024 Received: from mail-lj1-f178.google.com (mail-lj1-f178.google.com [209.85.208.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4A08D145A09; Sat, 5 Oct 2024 08:26:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.178 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728116812; cv=none; b=PajwlKq6YCimWOqgknEvBlNWGHpBESs5hvCqLbbhb7FqsIBpviM95x6G5Hb7nDK+OmfZKAisWQHRjJPrvabGkcPvc+LRFjlV4N6q+gM07+qVAly7/sj5lOOl/+GjlKS0GValwPodigHdlxwQDhELXKuJ1gD/GzhATgG5qU+rQGE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728116812; c=relaxed/simple; bh=QDxkMI0n2UGhpclkMfDOTjcMs9n+2sf9z1tZUtp8xDU=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=VuiauPWfmBRd8Nhfn6kXGi+ZygBqKi1v7KkTbXBKEB8WW2KwNvl7ZWRyM875WFEDhi71Kn2mEJhxHXs1/9nsbOZkiRWy8MrbmkELBzYG2lFoSTJPrPxbVS/Dgf7TDcBurwuU8WugHheTPchYQkjBh1TS6VbOdNcF4q2mk5etPPQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=iEv88oAg; arc=none smtp.client-ip=209.85.208.178 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="iEv88oAg" Received: by mail-lj1-f178.google.com with SMTP id 38308e7fff4ca-2fac275471dso28212021fa.0; Sat, 05 Oct 2024 01:26:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1728116808; x=1728721608; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=lxKlPZuY6JQi3nqnX9Ezpc5OAxh4iVW3dp5hMM6fzFE=; b=iEv88oAglDcGgpkA/jeskA55q9rrUROnSfb1g6CKwgF2r+yWArtLEHxxby87TsRP9i qItTWry203vvJTQjqz4Llnm794Z4HtrKHc44pH4jDB9RGhQynQAyP51h9Ov7PkihT53o BIH6PxNFO6BxGF6UuyVDPDWdtGmSeKwIdYCIJmo9rLfWAdXsTzCHpWioflJUN/eTnDtL TUkaMv8loPSh1dEL2p/cg9o6iw97aQbv/8UMXSO3YsWcPJqYG0eaOyRSm6Oj8E4aLjCF 2imtx4Hb2ZiiCeyvdNl6ntWRxACBnGDwCUBvqFPhankfp+yb+1xzUPrwi2qE+u2EBJVu hj6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728116808; x=1728721608; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=lxKlPZuY6JQi3nqnX9Ezpc5OAxh4iVW3dp5hMM6fzFE=; b=GxtnXLfkBEWuCYapH/m0GYsCRXXqCNsw9pSmocRbzMciHUR3em+ul74N6sXmqGLomj GxwE4xy9jay9uHUkz+a7TEFj4luGtAVWAPOpKbwDWnNpa2CoZSgZ1TJu2JoxAFgmytzT wGPMdq+TnzbSa8hmZVoo6m7BHAAHLzqSE6/zdrx2Yly3WnSbFBVzQAmC70PsYspG58ZK 3VcSv67xriVfhpcaoO2Zej34caOB3R4l2JhROJkMAHbRkGqy1DJZkMNL2oC06+JVonGq eiluQHOBCu0okDRACqTtcQShpeSIM+pLOqzTKZKf6bNUOYTjCMsBQZKFXRXi0g3WQ/gy j6HQ== X-Forwarded-Encrypted: i=1; AJvYcCWhr3DEe7c4muOAnf8BwRwaD5EAAiEOS6dDo5xWhiTPZQV2UOSgXy445vKoaNY/jBpVXFARatGkAOGlEBMh@vger.kernel.org, AJvYcCXGRvNL+20Tfew1agHOb41ul9o7Z1Fr4um1fjlIbIcbrGhgC1/ZPapFdKGbToWHCXbwFCIRueDrJPvc@vger.kernel.org X-Gm-Message-State: AOJu0YxbZUAp5OSvvkPssegt5APUVlOiTDjj69pqHYo2MHVp8z0AJ2Zv jx6t8ubKQALXoKzMeKnHeTjEZiDEenFirt4pbx2B0D/tx74kpSx7 X-Google-Smtp-Source: AGHT+IGpMj9A07n5jg68XCvAUJI1w2FEp8Tc7QlT4nWQDv+P3rK1eQW3fXDcxnr/8A1gz4WZmTSOdQ== X-Received: by 2002:a2e:a550:0:b0:2fa:d49d:45ac with SMTP id 38308e7fff4ca-2faf3914661mr17379231fa.1.1728116807873; Sat, 05 Oct 2024 01:26:47 -0700 (PDT) Received: from [192.168.1.11] (83-233-6-197.cust.bredband2.com. [83.233.6.197]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-2faf9b3a88esm1857711fa.125.2024.10.05.01.26.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 05 Oct 2024 01:26:46 -0700 (PDT) From: Marcus Folkesson Date: Sat, 05 Oct 2024 10:26:12 +0200 Subject: [PATCH v3 2/2] dt-bindings: mtd: davinci: convert to yaml Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20241005-ondie-v3-2-459d9c32225c@gmail.com> References: <20241005-ondie-v3-0-459d9c32225c@gmail.com> In-Reply-To: <20241005-ondie-v3-0-459d9c32225c@gmail.com> To: Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Marcus Folkesson X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=6849; i=marcus.folkesson@gmail.com; h=from:subject:message-id; bh=QDxkMI0n2UGhpclkMfDOTjcMs9n+2sf9z1tZUtp8xDU=; b=owEBbQKS/ZANAwAIAYiATm9ZXVIyAcsmYgBnAPg2fyAhT/8xon7/Smhwfy3iMB/u0syy2651/ Bp5WtJnv+CJAjMEAAEIAB0WIQQFUaLotmy1TWTBLGWIgE5vWV1SMgUCZwD4NgAKCRCIgE5vWV1S MuOkD/4xgSjmWAujY3vPLFaEfkdxgkttvwfVH6qoXkhs8QcregP61gjbfmRvDJGBBCHkH6LQoo3 0UzEyZcAeLCcr8f3hRQ4Vl+cG7UZUNPbW8HBoa23P10gQAh+2s765Nc8kxAFOZORqLuTa5sqxN7 Vpp5bxw3YLywa3//yVe2dWj3tvajCUGrHb9si/uFNB+z5x2wDYqHjxc6SPGWMgCQoMkAY2q/Snq TNO+ch9ak88eC8AjWmikzxuKj6Nt9sWDZWZE6OPmv2iaDg+eAPybydfLN7HlnFaKlYuHizZEf+i f6hNzMiC4wc4n600yqKl2mmTfFaAl1iJlll3t1t7hErfUi0CR0ttJAMD9Dme4kitA5PA54GsRoU Cg/PGmp4lZpT5MIao+/QD3vdPWO3kfvvhliwXnIPpSd3Gwn/DTo9LAsatrRmHGX+kRttHeTeVn7 E46XEbqmG6SfEp/bKCHNKXqCLaaycsRzlAumUF5OlM2yxIuqtQiqZGjrc7cBzKUeWpVb4szKZKu bkLCQyGnMIVd6t1dFI+R4W8t4+dOAeJrxyZabCpG2usJhr4kqkZ2BM5BtEJS6Tvi4zzVd+vbfvY 0uCBjVmr1epIskohPsswn+lDnXJnvWZxuE5Q41JHGTMB6grxiOeHGqsJ15EZviLT0u7KpArj7Da LcOv5V8Q5gQgl4w== X-Developer-Key: i=marcus.folkesson@gmail.com; a=openpgp; fpr=AB91D46C7E0F6E6FB2AB640EC0FE25D598F6C127 Convert the bindings to yaml format. Signed-off-by: Marcus Folkesson --- .../devicetree/bindings/mtd/davinci-nand.txt | 94 -----------------= -- .../devicetree/bindings/mtd/ti,davinci-nand.yaml | 102 +++++++++++++++++= ++++ 2 files changed, 102 insertions(+), 94 deletions(-) diff --git a/Documentation/devicetree/bindings/mtd/davinci-nand.txt b/Docum= entation/devicetree/bindings/mtd/davinci-nand.txt deleted file mode 100644 index eb8e2ff4dbd2901b3c396f2e66c1f590a32dcf67..000000000000000000000000000= 0000000000000 --- a/Documentation/devicetree/bindings/mtd/davinci-nand.txt +++ /dev/null @@ -1,94 +0,0 @@ -Device tree bindings for Texas instruments Davinci/Keystone NAND controller - -This file provides information, what the device node for the davinci/keyst= one -NAND interface contains. - -Documentation: -Davinci DM646x - https://www.ti.com/lit/ug/sprueq7c/sprueq7c.pdf -Kestone - https://www.ti.com/lit/ug/sprugz3a/sprugz3a.pdf - -Required properties: - -- compatible: "ti,davinci-nand" - "ti,keystone-nand" - -- reg: Contains 2 offset/length values: - - offset and length for the access window. - - offset and length for accessing the AEMIF - control registers. - -- ti,davinci-chipselect: number of chipselect. Indicates on the - davinci_nand driver which chipselect is used - for accessing the nand. - Can be in the range [0-3]. - -Recommended properties : - -- ti,davinci-mask-ale: mask for ALE. Needed for executing address - phase. These offset will be added to the base - address for the chip select space the NAND Flash - device is connected to. - If not set equal to 0x08. - -- ti,davinci-mask-cle: mask for CLE. Needed for executing command - phase. These offset will be added to the base - address for the chip select space the NAND Flash - device is connected to. - If not set equal to 0x10. - -- ti,davinci-mask-chipsel: mask for chipselect address. Needed to mask - addresses for given chipselect. - -- nand-ecc-mode: operation mode of the NAND ecc mode. ECC mode - valid values for davinci driver: - - "none" - - "soft" - - "hw" - -- ti,davinci-ecc-bits: used ECC bits, currently supported 1 or 4. - -- nand-bus-width: buswidth 8 or 16. If not present 8. - -- nand-on-flash-bbt: use flash based bad block table support. OOB - identifier is saved in OOB area. If not present - false. - -Deprecated properties: - -- ti,davinci-ecc-mode: operation mode of the NAND ecc mode. ECC mode - valid values for davinci driver: - - "none" - - "soft" - - "hw" - -- ti,davinci-nand-buswidth: buswidth 8 or 16. If not present 8. - -- ti,davinci-nand-use-bbt: use flash based bad block table support. OOB - identifier is saved in OOB area. If not present - false. - -Nand device bindings may contain additional sub-nodes describing partition= s of -the address space. See mtd.yaml for more detail. The NAND Flash timing -values must be programmed in the chip select=E2=80=99s node of AEMIF -memory-controller (see Documentation/devicetree/bindings/memory-controller= s/ -davinci-aemif.txt). - -Example(da850 EVM ): - -nand_cs3@62000000 { - compatible =3D "ti,davinci-nand"; - reg =3D <0x62000000 0x807ff - 0x68000000 0x8000>; - ti,davinci-chipselect =3D <1>; - ti,davinci-mask-ale =3D <0>; - ti,davinci-mask-cle =3D <0>; - ti,davinci-mask-chipsel =3D <0>; - nand-ecc-mode =3D "hw"; - ti,davinci-ecc-bits =3D <4>; - nand-on-flash-bbt; - - partition@180000 { - label =3D "ubifs"; - reg =3D <0x180000 0x7e80000>; - }; -}; diff --git a/Documentation/devicetree/bindings/mtd/ti,davinci-nand.yaml b/D= ocumentation/devicetree/bindings/mtd/ti,davinci-nand.yaml new file mode 100644 index 0000000000000000000000000000000000000000..0acbe55f6d05f358fb19f70fdb3= e5d2f0c468f88 --- /dev/null +++ b/Documentation/devicetree/bindings/mtd/ti,davinci-nand.yaml @@ -0,0 +1,102 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mtd/ti,davinci-nand.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: TI DaVinci NAND controller + +maintainers: + - Marcus Folkesson + +allOf: + - $ref: nand-controller.yaml# + +properties: + compatible: + enum: + - ti,davinci-nand + - ti,keystone-nand + + reg: + maxItems: 1 + + ti,davinci-chipselect: + description: + Number of chipselect. Indicate on the davinci_nand driver which + chipselect is used for accessing the nand. + $ref: /schemas/types.yaml#/definitions/uint32 + enum: [0, 1, 2, 3] + + ti,davinci-mask-ale: + description: + Mask for ALE. Needed for executing address phase. These offset will = be + added to the base address for the chip select space the NAND Flash + device is connected to. + $ref: /schemas/types.yaml#/definitions/uint32 + default: 0x08 + + ti,davinci-mask-cle: + description: + Mask for CLE. Needed for executing command phase. These offset will = be + added to the base address for the chip select space the NAND Flash d= evice + is connected to. + $ref: /schemas/types.yaml#/definitions/uint32 + default: 0x10 + + ti,davinci-mask-chipsel: + description: + Mask for chipselect address. Needed to mask addresses for given + chipselect. + $ref: /schemas/types.yaml#/definitions/uint32 + default: 0 + + ti,davinci-ecc-bits: + description: Used ECC bits. + $ref: /schemas/types.yaml#/definitions/uint32 + enum: [1, 4] + + ti,davinci-ecc-mode: + description: Operation mode of the NAND ECC mode. + $ref: /schemas/types.yaml#/definitions/string + enum: [none, soft, hw, on-die] + deprecated: true + + ti,davinci-nand-buswidth: + description: Bus width to the NAND chip + $ref: /schemas/types.yaml#/definitions/uint32 + enum: [8, 16] + default: 8 + deprecated: true + + ti,davinci-nand-use-bbt: + type: boolean + description: + Use flash based bad block table support. OOB identifier is saved in = OOB + area. + deprecated: true + +required: + - compatible + - reg + - ti,davinci-chipselect + +examples: + - | + nand-controller@62000000 { + compatible =3D "ti,davinci-nand"; + reg =3D <0x62000000 0x807ff + 0x68000000 0x8000>; + ti,davinci-chipselect =3D <1>; + ti,davinci-mask-ale =3D <0>; + ti,davinci-mask-cle =3D <0>; + ti,davinci-mask-chipsel =3D <0>; + nand-ecc-mode =3D "hw"; + ti,davinci-ecc-bits =3D <4>; + nand-on-flash-bbt; + + partition@180000 { + label =3D "ubifs"; + reg =3D <0x180000 0x7e80000>; + }; + }; --=20 2.46.0