From patchwork Thu Mar 30 06:46:02 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 745135 X-Patchwork-Delegate: boris.brezillon@free-electrons.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3vtxyt3XnTz9s0m for ; Thu, 30 Mar 2017 19:05:58 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="J+4JG1//"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=infradead.org header.i=@infradead.org header.b="NloHko+W"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=nifty.com header.i=@nifty.com header.b="AGfd8HQX"; dkim-atps=neutral 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=nVqkQbE+ihnfoUYAkY6KuGqlSG4Zcc4X17lrXNQoqSU=; b=J+4JG1//UPIwk6v+r33q5msdjk ktkd7h/LyO04yZAewd0nb4umgPXWAC3Z9E4eTmNp6sSfxzOn/eA/PTGvfSuu+toDSZAdOhLW7zWO7 vqfelZNMMs3VI7qM6oRxPtCqxPCgrfUDafC4Zg8FMqM+hmtSzfPDTM3rTrbAxbTYrJrwUfOno/clM eImjjO4Bh9h+K4bFSt47d+fPT9bB7iZg5ObVZOESZePLENBoM59yeGe535kw+6XwA2aLSIV8pVGQp kqZCAnOf7uQFoouXpDsLq5IMiXigkA2WBqAF+lRldC4xh9VHv2ZXYVX/+SafR/tpkVD7feSho0VFt Eu3azprw==; 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 1ctV5g-00070n-MT; Thu, 30 Mar 2017 08:05:56 +0000 Received: from merlin.infradead.org ([2001:4978:20e::2]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1ctUby-0006Pr-GM for linux-mtd@bombadil.infradead.org; Thu, 30 Mar 2017 07:35:14 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=Kj+y1uySyRo+8B6I7Y642NVgoXKgjiH8NH0SH0vpqRE=; b=NloHko+Wh3pUL2wL9vJ1J2kP2 LX+EsIL7m6uhziZ65QJE2zXwgKViffRabxEdhAQXHiwmwpV6RqBzf9GOcn6jN/onD2HipV2ogDEec 3DwwteRbL1CNZNlSkBtxycg59x5PfXrV1/ns8mw93zX8jKZm5fV8Y1wT2D75sL03u9D9NWQyb9x3n rMtUi9/EgM84RaJ17Y/CMwRoLqAs62wlef0Iiaw3oG3T2ZnhZWARJM4jxOQG8C9WNUyCCXupfAFrr u9ONdarLTXMviP65NJXZ9j+L8chaVX5f7PhyOpPx7TsxNvPw+0sXJRk5tBhLtDK0K0opV8u2VvITt Sn7Dtm9aA==; Received: from conuserg-07.nifty.com ([210.131.2.74]) by merlin.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1ctTsM-0002JH-3q for linux-mtd@lists.infradead.org; Thu, 30 Mar 2017 06:48:07 +0000 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-07.nifty.com with ESMTP id v2U6kUce015463; Thu, 30 Mar 2017 15:46:52 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-07.nifty.com v2U6kUce015463 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1490856413; bh=Kj+y1uySyRo+8B6I7Y642NVgoXKgjiH8NH0SH0vpqRE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AGfd8HQXc+Pc/gTAyB9mx7V3HRYhoqCWpxdzC7DFsRcigqenKTGPolH0feme3Al2t ZsptcpUzC6YSBxIn+VES+FULW/s6St3Pi26oy41AWVUsydaxNLInSMRLFh2ZCh8Fjq 8mYoBdK6V6yhYH+2Mfm3CEoRwhW4CurOcTRfPE4mBZAogv4LN/y1feQzMfYqKiGTdx AeFMz3+1ETj9tY3nDYCXy6sbaVu/JGi4f7uMZXhvF7J1pPD3xuSg8dY6l+sOqK/tpc X37w09jPsL2Heilj/JgZWejkCQlssml9A8hY8L18Q6QlnlW53RDNVSO+uIF59bFyXs IVPl2yQnIgstA== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-mtd@lists.infradead.org Subject: [PATCH v3 16/37] mtd: nand: denali_dt: add compatible strings for UniPhier SoC variants Date: Thu, 30 Mar 2017 15:46:02 +0900 Message-Id: <1490856383-31560-17-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1490856383-31560-1-git-send-email-yamada.masahiro@socionext.com> References: <1490856383-31560-1-git-send-email-yamada.masahiro@socionext.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170330_024806_676651_8BBA6692 X-CRM114-Status: GOOD ( 14.59 ) X-Spam-Score: -1.2 (-) X-Spam-Report: SpamAssassin version 3.4.1 on merlin.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_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid 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: Mark Rutland , Boris Brezillon , Richard Weinberger , Dinh Nguyen , Masahiro Yamada , Artem Bityutskiy , Cyrille Pitchen , linux-kernel@vger.kernel.org, Marek Vasut , devicetree@vger.kernel.org, Rob Herring , Masami Hiramatsu , Chuanxiao Dong , Jassi Brar , Brian Norris , Enrico Jorns , David Woodhouse , Graham Moore MIME-Version: 1.0 Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.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 Acked-by: Rob Herring --- Changes in v3: None 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(+) 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);