From patchwork Thu Mar 23 00:17:39 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 95870 Delivered-To: patch@linaro.org Received: by 10.140.89.233 with SMTP id v96csp497013qgd; Wed, 22 Mar 2017 17:32:57 -0700 (PDT) X-Received: by 10.99.115.6 with SMTP id o6mr4332065pgc.216.1490229177698; Wed, 22 Mar 2017 17:32:57 -0700 (PDT) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [65.50.211.133]) by mx.google.com with ESMTPS id x125si2516125pfx.131.2017.03.22.17.32.57 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 22 Mar 2017 17:32:57 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-mtd-bounces+patch=linaro.org@lists.infradead.org designates 65.50.211.133 as permitted sender) client-ip=65.50.211.133; Authentication-Results: mx.google.com; dkim=pass header.i=@lists.infradead.org; dkim=neutral (body hash did not verify) header.i=@nifty.com; spf=pass (google.com: best guess record for domain of linux-mtd-bounces+patch=linaro.org@lists.infradead.org designates 65.50.211.133 as permitted sender) smtp.mailfrom=linux-mtd-bounces+patch=linaro.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=dHx6gYezGqDvOpP3nXk+yzsDCreYaKxCkXA3rlU9FHk=; b=Vi47D691Zv//UMX+dET1ydPgAD ZPdsypz3aar1v6aG1faRPRIxW39DLPMvM5QDa8Ivq9mPtuOD+cN/bzs5Hg4tLJQaXpb9DTRCKSf7F BVlCTcKw69ZbnksWe+7K5JvJWMcA6lxK+wYc200+fZKLZyttaF5GARTn8+uD5C7btIDP5B5G9uu82 Pn62N8gqFv1ctIjkByG3x5VhT/jkCE2DcZbkFNr1cU26iyKwvRObZXr+mhr7bAkMI9567KLar4Yge WYSRVOCf2+5RphBAAgIDTRlC1RS8QXcKOrKM7eTDCzz9Vdj2vDWp/yzHEQQwKitDTAiWJGFR/WqPt /GLOAqzg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cqqgO-0004r3-8R; Thu, 23 Mar 2017 00:32:52 +0000 Received: from conuserg-09.nifty.com ([210.131.2.76]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cqqT6-0004Zw-Ae for linux-mtd@lists.infradead.org; Thu, 23 Mar 2017 00:19:14 +0000 Received: from grover.sesame (FL1-111-169-71-157.osk.mesh.ad.jp [111.169.71.157]) (authenticated) by conuserg-09.nifty.com with ESMTP id v2N0I4bg008011; Thu, 23 Mar 2017 09:18:10 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-09.nifty.com v2N0I4bg008011 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1490228291; bh=LXYFkN3i0XhfPOYAera8eD+a9/OVqMwYOV6d57qJYZg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jK2th5kcMNUZdDihJGuj0UekLa8+huVV2EZ1zbn+DjSaXy2zWntZbjp/rup2vHCwN mbqr0iVoofMYegz0nJ/3ikYKViBj/kSWVt1LGnIL+8pOu8kP5zgIaWhZhihzm+fgNh vt3k9V8JZlEK0RHD2XhFg7g+YhxlPEoz/O6xodJPsWm268mcRjwRaQ8WivI9eLDSRe R+0/bPmYO5TDJvba/3pLf16ybEQ8TM3SAEQEbDCKLepj/pkMb2owpaasbm3RweQsnI L4KSvlEVsIlHzF4bBgJkLZt9wpnn6dCypGe3/krSPuIZvAGVPCTajwKMbK+CD0kwLC eQTgPQbtszBdQ== X-Nifty-SrcIP: [111.169.71.157] From: Masahiro Yamada To: linux-mtd@lists.infradead.org Subject: [RESEND PATCH v2 30/53] mtd: nand: denali_dt: add compatible strings for UniPhier SoC variants Date: Thu, 23 Mar 2017 09:17:39 +0900 Message-Id: <1490228282-10805-4-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1490228282-10805-1-git-send-email-yamada.masahiro@socionext.com> References: <1490228282-10805-1-git-send-email-yamada.masahiro@socionext.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170322_171908_824501_0893950B X-CRM114-Status: UNSURE ( 9.56 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -1.2 (-) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-1.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.7 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: laurent.monat@idquantique.com, Boris Brezillon , thorsten.christiansson@idquantique.com, Dinh Nguyen , Enrico Jorns , Artem Bityutskiy , Marek Vasut , Masahiro Yamada , Masami Hiramatsu , Chuanxiao Dong , Jassi Brar , Brian Norris , David Woodhouse , Rob Herring , Graham Moore MIME-Version: 1.0 Sender: "linux-mtd" Errors-To: linux-mtd-bounces+patch=linaro.org@lists.infradead.org Add two compatible strings for UniPhier SoCs. "socionext,uniphier-denali-nand-v5a" is used on UniPhier sLD3, LD4, Pro4, sLD8 SoCs. "socionext,uniphier-denali-nand-v5b" is used on UniPhier Pro5, PXs2, LD6b, LD11, LD20 SoCs. Signed-off-by: Masahiro Yamada --- Changes in v2: - Change the compatible strings - Fix the ecc_strength_capability - Override revision number for the newer one .../devicetree/bindings/mtd/denali-nand.txt | 6 ++++++ drivers/mtd/nand/denali_dt.c | 23 ++++++++++++++++++++++ 2 files changed, 29 insertions(+) -- 2.7.4 ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/ diff --git a/Documentation/devicetree/bindings/mtd/denali-nand.txt b/Documentation/devicetree/bindings/mtd/denali-nand.txt index 647618e..0b08ea5 100644 --- a/Documentation/devicetree/bindings/mtd/denali-nand.txt +++ b/Documentation/devicetree/bindings/mtd/denali-nand.txt @@ -3,6 +3,8 @@ Required properties: - compatible : should be one of the following: "altr,socfpga-denali-nand" - for Altera SOCFPGA + "socionext,uniphier-denali-nand-v5a" - for Socionext UniPhier (v5a) + "socionext,uniphier-denali-nand-v5b" - for Socionext UniPhier (v5b) - reg : should contain registers location and length for data and reg. - reg-names: Should contain the reg names "nand_data" and "denali_reg" - interrupts : The interrupt number. @@ -10,9 +12,13 @@ Required properties: Optional properties: - nand-ecc-step-size: must be 512 or 1024. If not specified, default to: 512 for "altr,socfpga-denali-nand" + 1024 for "socionext,uniphier-denali-nand-v5a" + 1024 for "socionext,uniphier-denali-nand-v5b" see nand.txt for details. - nand-ecc-strength: see nand.txt for details. Available values are: 8, 15 for "altr,socfpga-denali-nand" + 8, 16, 24 for "socionext,uniphier-denali-nand-v5a" + 8, 16 for "socionext,uniphier-denali-nand-v5b" - nand-ecc-maximize: see nand.txt for details Note: diff --git a/drivers/mtd/nand/denali_dt.c b/drivers/mtd/nand/denali_dt.c index c3bc333..1f2f68a 100644 --- a/drivers/mtd/nand/denali_dt.c +++ b/drivers/mtd/nand/denali_dt.c @@ -41,11 +41,34 @@ static const struct denali_dt_data denali_socfpga_data = { DENALI_CAP_ECC_SIZE_512, }; +static const struct denali_dt_data denali_uniphier_v5a_data = { + .ecc_strength_avail = BIT(24) | BIT(16) | BIT(8), + .caps = DENALI_CAP_HW_ECC_FIXUP | + DENALI_CAP_DMA_64BIT | + DENALI_CAP_ECC_SIZE_1024, +}; + +static const struct denali_dt_data denali_uniphier_v5b_data = { + .revision = 0x0501, + .ecc_strength_avail = BIT(16) | BIT(8), + .caps = DENALI_CAP_HW_ECC_FIXUP | + DENALI_CAP_DMA_64BIT | + DENALI_CAP_ECC_SIZE_1024, +}; + static const struct of_device_id denali_nand_dt_ids[] = { { .compatible = "altr,socfpga-denali-nand", .data = &denali_socfpga_data, }, + { + .compatible = "socionext,uniphier-denali-nand-v5a", + .data = &denali_uniphier_v5a_data, + }, + { + .compatible = "socionext,uniphier-denali-nand-v5b", + .data = &denali_uniphier_v5b_data, + }, { /* sentinel */ } }; MODULE_DEVICE_TABLE(of, denali_nand_dt_ids);