From nobody Thu Nov 28 09:36:07 2024 Received: from mail-lf1-f48.google.com (mail-lf1-f48.google.com [209.85.167.48]) (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 3A64119754A; Wed, 2 Oct 2024 09:02:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.48 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727859725; cv=none; b=UlmMGIQc+Rz9Msoj+mqc/UjIP5eS5cPT5nk38WIWJ463AtYsYtqp33tcsmTTqOErc0M2Aw/Aoh9ARCRo3TiCnDeBtsWYXobzKGUPa1NxUGaOeHosFeaTHcOcNnsR8jnhjQxEvIRlRyfqeQvJTk/+cTVRxIs+zB+y2ag6QfVonmw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727859725; c=relaxed/simple; bh=PDm1f5NEBuhwxeXGvwzqxiOMHTZXe7TWbR431qOgkS4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=VIkjKNe0XMDUtXpEmYuBQyk/SkfBDYNGchNMbBO8eBsYhos3R4c5HyRtExICv/IkKhG1avcvk6ilxYTbF/TCuB51V0bLnlTAbSCanQ0GbB2nMyHJNM9BjshxebjqJdYjKd3bmwRcc/WsDBOy+Gn+65ER/+Oa/ORHcaRQoS4fZaE= 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=Ri+l49SN; arc=none smtp.client-ip=209.85.167.48 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="Ri+l49SN" Received: by mail-lf1-f48.google.com with SMTP id 2adb3069b0e04-537a399e06dso7381148e87.1; Wed, 02 Oct 2024 02:02:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1727859722; x=1728464522; 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=Ri+l49SNDpYBnL4kDixwU7ERfLPvrpuZx3a3RbvJ8ysnkmH0D9GgzLNh+HvavDGZGv 2rjfYNibMqN9lJAffw9r/2uf7qXdjA+JIz9DbDF/193J0ppQ0IShoFezjuBxcrbOzZy1 K6KK4v8YSgHDOors6qzD6QP93c9foXvSa7rHbE32K/gWgVM+1/VnsSgbuTMraV1wRIKx bPnUZ0CDR8wBH2adQPh818vGq+BNcokVSOezZN9/RyZuciWGfshU9D4dNNNgb9cx9lB/ QOLuykcI1NgMoUbdqvcfRI3RY15JIhbUduRWh/a9hpUgM578sgT50Lgooqx+z9nMYITS j3xg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727859722; x=1728464522; 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=YBCZxl/WPhi/tYD2PZ2OAzUOjoAGmxLW59iNkrRPcNEqqLrB1UzVQSugwmw31bFNzt spVsq9oVGsmjGf5Ij2dObyQEzObZSsaS7Ev+lznbmsAruuU+o1hVJJBIWIv6CQZ7Gl7k L1oRyPshZorFsi9WnkYrNVHbYmmsEmD0fTAGVns9RFxngon0flQ+uZn6bkGaFtow1UAw WBF2QfQbmHMxAuAp7j+zeLvhTj7IqS1OZJnhn8nm8p0SHKQMXkDqyWrznttqJhHHufQ6 dPtQwCcH5Q3P1jCpekueD6UgievQ+A5YaOJ/ZpGxg9cl8BcdiAakvsp6eptYHNtADnDX dFqw== X-Forwarded-Encrypted: i=1; AJvYcCUU6KqkyCXwxkjNmCYYZV+i6OPMYMePZDm/t+BmdwBfni07LkauUqogjv4Gx8RhpnT1PX48BMZ7HwLftq/1@vger.kernel.org, AJvYcCV+ZpSLBqn0hwE8+LEqJKWcDHE+F9/ZL+fiwlQI+q76dd6qkIf15LwxL6NnOddhPpMS8idg38rBX1SX@vger.kernel.org X-Gm-Message-State: AOJu0YzsKGK7MVgByh5RwoTd25zX0YeqRlYSFErrsq80uLhbKikhQX/Y K/HXagZpNFE8mu2gRGyjRyhiG3gJFxjRZrypXMPLA79DFzVZmDyEyBkiLvgH X-Google-Smtp-Source: AGHT+IHjviN380Pp6qWXhdhusVCqvi5yTuTTpLcAiPqKXlHfeD3P5nLoR0Ak/54fJeBl2C3coR7BiA== X-Received: by 2002:a05:6512:e9a:b0:539:958f:1b8b with SMTP id 2adb3069b0e04-539a07a8926mr1231265e87.50.1727859721623; Wed, 02 Oct 2024 02:02:01 -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 2adb3069b0e04-5389fd5e35asm1846796e87.85.2024.10.02.02.02.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Oct 2024 02:02:00 -0700 (PDT) From: Marcus Folkesson Date: Wed, 02 Oct 2024 11:01:30 +0200 Subject: [PATCH v2 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: <20241002-ondie-v2-1-318156d8c7b4@gmail.com> References: <20241002-ondie-v2-0-318156d8c7b4@gmail.com> In-Reply-To: <20241002-ondie-v2-0-318156d8c7b4@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/ZANAwAIAYiATm9ZXVIyAcsmYgBm/Qv43YX/2P3sukVbRasUZMx6dKxjhGPrFgfVf KUfT2lsozqJAjMEAAEIAB0WIQQFUaLotmy1TWTBLGWIgE5vWV1SMgUCZv0L+AAKCRCIgE5vWV1S MlLuEADUsGNiGCfepQjcAvRqERhoDTlGdHv+qa/i8b9LGFfJK/PsS7K4f8VBPWVSNtunoU5wYag zTz5i9C02Zfpsf9X0b+OLlTJrxfAQrksQYpLSYVwJQZi8R/ME5uQHYV6yxnEl6tG3iEd0mIb/S1 yW5ddFkCioIHPGhuAdVOPmzfSg513NTA5prI4RsVE3yk5z41T6AoHqV1J5/p4XrVmfrxiDXYD+0 xLoPlhssJudHqbv0aVd4kJsQG7zRkjhFL2qlQ0qcVEnRxXpnrlrhvClUO3TC7yeA2D7HUS60CnP +EmeIxOuKLQ6Z4MuYATPnq1a2S88sEb0U+bN/XyIhusLJK/ev1vBHa2AVVmmBliIhcQ8WBHv7W8 eHQ/ogFs3Qm0S8gTAYwdva4hbCrHAxM+Sews9jZuJMr3iSUmELp3RCJq26zdqphyhXah/z5bDDU YzG3LW6LuKvlb1D4T72mkAI/yP25RZpDhfebZWqZcaL3THkDSjNcYWqqXFxBaAGU3mWM0qTdkSP vxa4fyNPSXVGjxn6qx0PZJ47lknAh9IDDaLJ9ncUmrzo9i02UT3RGhftt26D5C+K+evK7VyRplj Zl2M7Wi+JxDulRSNqwFjmbFJ2Gyaiuz7h8DpstMMpK2Y+ovs4EcUfReaXHD+ehhsofHyZ9SGXNW KfAygC7/840d1bw== 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 09:36:07 2024 Received: from mail-lf1-f53.google.com (mail-lf1-f53.google.com [209.85.167.53]) (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 A1DD6198E81; Wed, 2 Oct 2024 09:02:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.53 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727859729; cv=none; b=Zxxx07CGsg4R3e50/upXABNO+TBvi04d6yWs7lPNQZcAQ2eHpFU7GP/elu0V3E+q+0w2JFo3Whx3bfnybS0VYkIPfQUnM6KSyYDNezzzgHAH6q9ONSae4wJJccUPc6jljJD277TWDtXg/dO78B/omRkbUyDShJdcuZqNNoKW0L4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727859729; c=relaxed/simple; bh=NjBT3edl4GBWG4GA46iRK5fKaNXJFEz7AQjfmoGasas=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=lNTWfoKqHYnWHCVHZPLoN3JB/UcPeni78oSZyH2COytjwASmzv9lUJkHXubNTu2XyAKxUTxpJFq2Sk/lNkQjOdTydqAXlSWUSlr4RQX7GLo5FrLOq+BaZ2KDEbNgqeIKeyPj6Bg61sBPlvFrhPxoWaFx1Prh8NySbZ4tPhcbux4= 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=Og5QQfy9; arc=none smtp.client-ip=209.85.167.53 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="Og5QQfy9" Received: by mail-lf1-f53.google.com with SMTP id 2adb3069b0e04-5398b589032so6383030e87.1; Wed, 02 Oct 2024 02:02:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1727859725; x=1728464525; 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=0W9IWK1hFhE7595MueUJkl9Ltu1+7FGQoJdkHWcX+as=; b=Og5QQfy9alMFWf8kvuomoep/nEbpXUZpHhpEzva7L/uze1njUZOE0vHxio1HGUsGQI 8oc0MGxzkqXFxCksc5UVRMpJSynzDkaQc5NumvDkbHGi5+vmaNgjSKR2765DFgayQd9Q 9gKQsKKJsWxY/CYEnCElp7rblURVb2U2R0D1JW+FdR0mqxvB8+Fsh+/R/Ax5K7lk3QF3 S6cCIq0zrGhzLb7oRt3dLqK503Eg5FnDMRUCQyYCx6vF/sYrPPDoR8Bc/H88Luzv0Z2y /xYLiN5uWQzrRosCBrV+uy5n/CFo5TkYnpu6vMlNznxCRnM0VSsFkvBHkszYDdjFdEvx +2+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727859725; x=1728464525; 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=0W9IWK1hFhE7595MueUJkl9Ltu1+7FGQoJdkHWcX+as=; b=wkkBChvRhKi8s1tsTvvQ9IVQo/ORoTodv7ropVgsp02dPJ47QhgDXdMCisezN4gNA9 k7M8yvVrIHEkdGKj034DcMGFDh4O8AMKieRyjS5c6IP/yropxuxht+woXI4cmBNRQi4s RLT23F+iuiGifOucnA63unNGZPA7yuJQHu5aj1y1AwrRZL55dRat2+dWt/LeZBwfZuvo VVYRsZiBwpIlXwFJfzcJ1TDvUaxg5w9HokUz90Qp5jEEzFUZJsIRl3XN6ibay5/hQV86 RhldD9/edggkwwumaZuzKAnCXg9HPAx2LOaROTvg3LNif0dfFD8oP09+nPofOzlngTBO R9zA== X-Forwarded-Encrypted: i=1; AJvYcCUEQOM01Ns31OE7xQDLoJVndeeXB8lDSriuKOSdC7VQ7usqO3g+s+ED45oa7wOdZHPMONT4FUDuXDq8@vger.kernel.org, AJvYcCV3riTrSXZxl/gUJQiIXFzyAJ7ygucHkwEMPwnyYeufkdIGpYJ7JxOJfs287aGLE0Knehg+UWVTxAEvuuX+@vger.kernel.org X-Gm-Message-State: AOJu0YwbtOEuD34KTaR75GhL3lm+rPhgKyeoNkeenjjkTBrbUg52tTRM YjZ5kj38+QhR/JmuIwut6tHdCySPKOnYovPLcrnkwt4oKI5jvIbl4v9ZMp89 X-Google-Smtp-Source: AGHT+IGcV5KpeOcgN8/kjZlE0lhZfvPGF++8Hbi8pKNboO677OXndylEDWuwiEb3joxc2+m0sD8t8w== X-Received: by 2002:a05:6512:3083:b0:539:9510:2b8a with SMTP id 2adb3069b0e04-539a07a6332mr2051881e87.53.1727859724785; Wed, 02 Oct 2024 02:02:04 -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 2adb3069b0e04-5389fd5e35asm1846796e87.85.2024.10.02.02.02.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Oct 2024 02:02:03 -0700 (PDT) From: Marcus Folkesson Date: Wed, 02 Oct 2024 11:01:31 +0200 Subject: [PATCH v2 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: <20241002-ondie-v2-2-318156d8c7b4@gmail.com> References: <20241002-ondie-v2-0-318156d8c7b4@gmail.com> In-Reply-To: <20241002-ondie-v2-0-318156d8c7b4@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=6866; i=marcus.folkesson@gmail.com; h=from:subject:message-id; bh=NjBT3edl4GBWG4GA46iRK5fKaNXJFEz7AQjfmoGasas=; b=owEBbQKS/ZANAwAIAYiATm9ZXVIyAcsmYgBm/QwAT6dxieHqBVtrqQhuPyU87iE0BXG/LT1H0 hyUvpQPUCCJAjMEAAEIAB0WIQQFUaLotmy1TWTBLGWIgE5vWV1SMgUCZv0MAAAKCRCIgE5vWV1S Mp/3D/4702rj3KkpzB+Lilz5BgJxfdjflOp5tJGf6ag+e1w4AjVUE6FGHzlcTXBSJcimVTXDTEu m97xKkV0MY+xICEl0XQ4fdCjwYjL2kU9l9tDAZITrWKgxCvzB7RBgq6fQmR8qxGwwHkl7qm0Jtd k6fUDudrtx8dSjvwb0PxXmm16krc/oKlfqliqm9GgNhkYoAjuDT1d3ixwoek/9OCfUWGAUrBzLy yDvdONUYu4KONlhBs9aWRoCrcz6w9eM6t38GuseFuTSzt5LEOFuURXW6GedmllJTbGEZKWqIqux pSzTNx4o1kw+D4ZOi7DyIqPhZiqb1/VJNusVnDOU8jF4zlmx64A9YSvueBDqfgIgO7RhUDlkTda LSnG+k7fj4NjMY8aY6Ncjm1Q1l583w2UQlOXclylxRQsJmlhDFN31vGOr0Zuuscjv7M0iDjLAW0 WS2ndWa+jiRBDOWJHr/003mcISz/Vo7fogJUJ4yTkwOMCnFw8anSSJksVNyc2PkmQ41TGTCfBKS uBkM87XzFf+ZaDqyxa7kQLeYTfGEgaSIn7BKuAR65LHFu2ry9Zib9x8DhcfjwBAXP9NAL9efG1m gF8uhcEhQOvmb8eKjNuU/V50mTqlWb1b7UEGry/FB6Kn2eljxmU7Xh+QaOsJ6DqQ+8j+CFQKm87 C2e3Gs9t6hMvCMQ== 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 | 105 +++++++++++++++++= ++++ 2 files changed, 105 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..c0e09cccea8e65a6fcb98291c0c= ee0db56a97def --- /dev/null +++ b/Documentation/devicetree/bindings/mtd/ti,davinci-nand.yaml @@ -0,0 +1,105 @@ +# 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 + device 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_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>; + }; + }; --=20 2.46.0