From patchwork Mon Jun 26 03:12:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Packham X-Patchwork-Id: 112720 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp7226195vqr; Sun, 25 Jun 2023 20:52:01 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4AaBpiPq9yKOzxL9fz66eBXxQxRAcaKBs6g2/VOa0UKF8OBVGqwEJ2F611LJv5myL7RV63 X-Received: by 2002:aa7:cf19:0:b0:518:922a:bc38 with SMTP id a25-20020aa7cf19000000b00518922abc38mr20686778edy.2.1687751521701; Sun, 25 Jun 2023 20:52:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687751521; cv=none; d=google.com; s=arc-20160816; b=CfguIMtOH9iG17gyvKNoQ9Y7xsCCpIeJGHPaP7Kvcjet/oxWTPcIw90b3RIbCGguCW 1gJNETZMzlh0vlmMc4FOeEkQwLygHWsR2WOpbglGQ2lKSfqiI+PszkK0k8Xj41/b4sDW VOtrBdEmX67byXYkQLD+iVF0Zbm0KrasH9+qnug32hWYwRTE75Ep5vm6gNiiQFW6jVro 9FKCy5n3kg64tEyCcc+NbleIGyH/ZvnAtjr/lZg1mwWKIrNolUJPml9pUl62p20TN9aA Eqkrh+r2LfxN7lP7tqmiLBS32s85Fs+ejny27/nttITJC++52OL6nIo+oxXKYFzRXRnF R0Lw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=eMOEgUa0E7z5p8qfBp+CWlp5a+uQqNd4H4SB3Ukp/sI=; fh=u1T6lzBhedTY+P8JX/fXlYyShslneoAz5x8mqfe6RIo=; b=oUTt9+zkz0AF7yolAT93YTg+53h5DTXt7Rn0fME6MSXt0Yeed8vawll2heZbjIvIMT BJCa5+gjQD5K5GarESuX9GXZeRFsssX/fDwaBJ9wde8e7NgkinSRkpuHQzZdktIlAyxd 8UU3mke9hfGf2izjSwIWWPNBmqpZQeC8oOxbfjxCzzPST7ESIZPZs329RMUL28ns2ADg GE6vPouwGZ50A3I5Ho802nhAtSt8UhoUlSTBT9J/ynmKIPNv00kaDv94CYVpwjq0gjL4 54lYnF0IU/aFboYZjCBYDRP9vracvfHkdWLUotw7vaktlB62UmdNZTcezLLLoDnF2ZSN hrSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alliedtelesis.co.nz header.s=mail181024 header.b=vIUNGZmG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=REJECT dis=NONE) header.from=alliedtelesis.co.nz Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y17-20020a056402135100b00514a577436asi2293883edw.239.2023.06.25.20.51.35; Sun, 25 Jun 2023 20:52:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@alliedtelesis.co.nz header.s=mail181024 header.b=vIUNGZmG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=REJECT dis=NONE) header.from=alliedtelesis.co.nz Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231192AbjFZDMt (ORCPT + 99 others); Sun, 25 Jun 2023 23:12:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52318 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231138AbjFZDM1 (ORCPT ); Sun, 25 Jun 2023 23:12:27 -0400 Received: from gate2.alliedtelesis.co.nz (gate2.alliedtelesis.co.nz [202.36.163.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3459B1AA for ; Sun, 25 Jun 2023 20:12:24 -0700 (PDT) Received: from svr-chch-seg1.atlnz.lc (mmarshal3.atlnz.lc [10.32.18.43]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by gate2.alliedtelesis.co.nz (Postfix) with ESMTPS id C24362C0124; Mon, 26 Jun 2023 15:12:20 +1200 (NZST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alliedtelesis.co.nz; s=mail181024; t=1687749140; bh=eMOEgUa0E7z5p8qfBp+CWlp5a+uQqNd4H4SB3Ukp/sI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vIUNGZmGgGMYtCfI7k9W+Tkqud2W9P9ld6G9+cL2sKP5ipW3oVSGHltSOg51f24gc xm0j9dZueRrYl7qzbompeuTj/ugt+EU3kTjR1XOliLsejmwF8lSrqEb2xI6p1xxUHi EtRGCXXCnxyrBHHFCzlG/E3iw6Rj76SO29KuNJqtzpujmHPxbmId970OhZJalSt4GW 4EFAmZjTbD9TFXS1bWfjUJWD6+31xPJ/dRqpKwMIDc/GFXuAGoOBw1FkXY8HvQOXfv 6tQvCdgG5Gt05a3yqghMzDXkYdUjJ51g+k5flW5S2kLyFqLEHocUnp2e2zB6yvr57C tVADcqSF0AH1Q== Received: from pat.atlnz.lc (Not Verified[10.32.16.33]) by svr-chch-seg1.atlnz.lc with Trustwave SEG (v8,2,6,11305) id ; Mon, 26 Jun 2023 15:12:20 +1200 Received: from chrisp-dl.ws.atlnz.lc (chrisp-dl.ws.atlnz.lc [10.33.22.30]) by pat.atlnz.lc (Postfix) with ESMTP id A0D8B13EE52; Mon, 26 Jun 2023 15:12:20 +1200 (NZST) Received: by chrisp-dl.ws.atlnz.lc (Postfix, from userid 1030) id 9F556281AA0; Mon, 26 Jun 2023 15:12:20 +1200 (NZST) From: Chris Packham To: miquel.raynal@bootlin.com, richard@nod.at, vigneshr@ti.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, gregory.clement@bootlin.com, pierre.gondois@arm.com, arnd@arndb.de, f.fainelli@gmail.com Cc: linux-mtd@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Chris Packham Subject: [PATCH v2 1/3] dt-bindings: mtd: Add AC5 specific binding Date: Mon, 26 Jun 2023 15:12:15 +1200 Message-ID: <20230626031217.870938-2-chris.packham@alliedtelesis.co.nz> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230626031217.870938-1-chris.packham@alliedtelesis.co.nz> References: <20230626031217.870938-1-chris.packham@alliedtelesis.co.nz> MIME-Version: 1.0 X-Patchwork-Bot: notify X-SEG-SpamProfiler-Analysis: v=2.3 cv=NPqrBHyg c=1 sm=1 tr=0 a=KLBiSEs5mFS1a/PbTCJxuA==:117 a=of4jigFt-DYA:10 a=uX4zeqIseCYJFCGchTMA:9 X-SEG-SpamProfiler-Score: 0 x-atlnz-ls: pat X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1769735739275226507?= X-GMAIL-MSGID: =?utf-8?q?1769735739275226507?= Add binding for AC5 SoC. This SoC only supports NAND SDR timings up to mode 3 so a specific compatible value is needed. Signed-off-by: Chris Packham Acked-by: Conor Dooley --- Notes: Changes in v2: - Keep compatibles in alphabetical order - Explain AC5 limitations in commit message .../devicetree/bindings/mtd/marvell,nand-controller.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/mtd/marvell,nand-controller.yaml b/Documentation/devicetree/bindings/mtd/marvell,nand-controller.yaml index a10729bb1840..1ecea848e8b9 100644 --- a/Documentation/devicetree/bindings/mtd/marvell,nand-controller.yaml +++ b/Documentation/devicetree/bindings/mtd/marvell,nand-controller.yaml @@ -16,6 +16,7 @@ properties: - const: marvell,armada-8k-nand-controller - const: marvell,armada370-nand-controller - enum: + - marvell,ac5-nand-controller - marvell,armada370-nand-controller - marvell,pxa3xx-nand-controller - description: legacy bindings From patchwork Mon Jun 26 03:12:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Packham X-Patchwork-Id: 112721 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp7226940vqr; Sun, 25 Jun 2023 20:54:35 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5Tf63bTJJefBRUGmQVs+z6kNNFPN7AW+npTrxGPQeaZYG1m0zUvaLDxpEi6zrh/Ji1/qSi X-Received: by 2002:a2e:3e13:0:b0:2b5:813c:b74f with SMTP id l19-20020a2e3e13000000b002b5813cb74fmr8832365lja.5.1687751675641; Sun, 25 Jun 2023 20:54:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687751675; cv=none; d=google.com; s=arc-20160816; b=iD/c3KyO1SMPG/+RowFZEqytMjANZomwLv8FRLrCherA/Pden3M/UWddKn2V2ljEr8 GPZIbIfiFx5QZliW3SNjVhGYt+tlxr+r4na1NSYjuaPFNmYjy8l8xGMAK6AgSi5UDamG 56L8Mr6OFEPDF4DZxDXAP68L6WsMgEVj5DztAEAH1RlVKp9DGFHUpPkf5QpQfwSs35vR thG4iPt8Q51Q5e09P6/d2EzoEtS0pnUa5ytjlnk0yRp4rWThOf8ub7+g7fdnqpwvuePz F+ifrcQZk2CUGQKWXtThrxAgRto+YwuyqcFEFEf5cOUriSJG+Mon+3Rr7mYMiqpEmRYy I+RQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=qyuUI+GTbigVnLlHtbXT9nNOWssZWdbxI7Bqwiieak8=; fh=u1T6lzBhedTY+P8JX/fXlYyShslneoAz5x8mqfe6RIo=; b=HVbrxUUbFf5NKTrC/LgaTskmpQ9HKnxwUW2BEs0iRDTopW39O/+tReCNtR8eP+Ad1U 1DsAfPC2y/oysxwL5M0FWDkirrJ17pHFtH2wLyHXjjAzQ3tqCk6bQsDxjzhmzfD12uNp qQCss1z42uWg7K5aBRksaevio+zG34m94fa7Ojhb2y/hshXgfE88SyRos+TkS06Lnee9 YqEm0fbsVqYjYV5wN2xUDW48QgG+IrOJXMWFyWCGJqiyTNITVAW1yxtPJuxyK8VZ6iER vnHlGMjBElUbI+6F/i6E65iWE3FXB0wHTJJv3piSMJJqVsB8PPvkAPA0gHiPhlYMXO/B Br1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alliedtelesis.co.nz header.s=mail181024 header.b=TY67yQ5B; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=REJECT dis=NONE) header.from=alliedtelesis.co.nz Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g15-20020a056402114f00b0051878e08975si2095622edw.441.2023.06.25.20.54.11; Sun, 25 Jun 2023 20:54:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@alliedtelesis.co.nz header.s=mail181024 header.b=TY67yQ5B; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=REJECT dis=NONE) header.from=alliedtelesis.co.nz Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230468AbjFZDMn (ORCPT + 99 others); Sun, 25 Jun 2023 23:12:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52326 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230506AbjFZDM1 (ORCPT ); Sun, 25 Jun 2023 23:12:27 -0400 Received: from gate2.alliedtelesis.co.nz (gate2.alliedtelesis.co.nz [202.36.163.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 34A7CE56 for ; Sun, 25 Jun 2023 20:12:24 -0700 (PDT) Received: from svr-chch-seg1.atlnz.lc (mmarshal3.atlnz.lc [10.32.18.43]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by gate2.alliedtelesis.co.nz (Postfix) with ESMTPS id 039782C055E; Mon, 26 Jun 2023 15:12:21 +1200 (NZST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alliedtelesis.co.nz; s=mail181024; t=1687749141; bh=qyuUI+GTbigVnLlHtbXT9nNOWssZWdbxI7Bqwiieak8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TY67yQ5BxL4sg46haJEXGpozSvX91Y9otoDTdYdGTAgQK9k7JKEi0shHHL1nD0QBL lRpxpsXG4qUu/NhcZi2ZZUWUX+wIDDwc7duAFdNAqpxYokrq8Erf0u2VP4FFkIk5GT pnjMPpOv+Fwsqv+1XOA3QYQwDh1DM9GmUBWA82ejx04A0+7MDrx6qZmNppfaUJj0YC 0B5A+1nBwo/NFTK4U9lAuG1zac9mvZ8uWa8etqpX5a/CnimYlEERbuFq5IM/g6ygtr EffuJplMzPQZu48Q/K38rVjS7ecvNpGfKCKONNCzu+AqCQhx3laxdXtnWAjBvxJKHs bB3VYsojSPXRw== Received: from pat.atlnz.lc (Not Verified[10.32.16.33]) by svr-chch-seg1.atlnz.lc with Trustwave SEG (v8,2,6,11305) id ; Mon, 26 Jun 2023 15:12:20 +1200 Received: from chrisp-dl.ws.atlnz.lc (chrisp-dl.ws.atlnz.lc [10.33.22.30]) by pat.atlnz.lc (Postfix) with ESMTP id A24D013EE63; Mon, 26 Jun 2023 15:12:20 +1200 (NZST) Received: by chrisp-dl.ws.atlnz.lc (Postfix, from userid 1030) id A2BC6283B3E; Mon, 26 Jun 2023 15:12:20 +1200 (NZST) From: Chris Packham To: miquel.raynal@bootlin.com, richard@nod.at, vigneshr@ti.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, gregory.clement@bootlin.com, pierre.gondois@arm.com, arnd@arndb.de, f.fainelli@gmail.com Cc: linux-mtd@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Chris Packham Subject: [PATCH v2 2/3] arm64: dts: marvell: Add NAND flash controller to AC5 Date: Mon, 26 Jun 2023 15:12:16 +1200 Message-ID: <20230626031217.870938-3-chris.packham@alliedtelesis.co.nz> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230626031217.870938-1-chris.packham@alliedtelesis.co.nz> References: <20230626031217.870938-1-chris.packham@alliedtelesis.co.nz> MIME-Version: 1.0 X-Patchwork-Bot: notify X-SEG-SpamProfiler-Analysis: v=2.3 cv=NPqrBHyg c=1 sm=1 tr=0 a=KLBiSEs5mFS1a/PbTCJxuA==:117 a=of4jigFt-DYA:10 a=AWclJRrDGzD0f9BZm7oA:9 X-SEG-SpamProfiler-Score: 0 x-atlnz-ls: pat X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1769735901306883588?= X-GMAIL-MSGID: =?utf-8?q?1769735901306883588?= The AC5/AC5X SoC has a NAND flash controller (NFC). Add this to the base SoC dtsi file as a disabled node. The NFC integration on the AC5/AC5X only supports SDR timing modes up to 3 so requires a dedicated compatible property so this limitation can be enforced. Signed-off-by: Chris Packham --- Notes: Changes in v2: - New. arch/arm64/boot/dts/marvell/ac5-98dx25xx.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/arch/arm64/boot/dts/marvell/ac5-98dx25xx.dtsi b/arch/arm64/boot/dts/marvell/ac5-98dx25xx.dtsi index 8bce64069138..74d644e0c29e 100644 --- a/arch/arm64/boot/dts/marvell/ac5-98dx25xx.dtsi +++ b/arch/arm64/boot/dts/marvell/ac5-98dx25xx.dtsi @@ -296,6 +296,16 @@ spi1: spi@805a8000 { status = "disabled"; }; + nand: nand-controller@805b0000 { + compatible = "marvell,ac5-nand-controller"; + reg = <0x0 0x805b0000 0x0 0x00000054>; + #address-cells = <0x1>; + #size-cells = <0x0>; + interrupts = ; + clocks = <&cnm_clock>; + status = "disabled"; + }; + gic: interrupt-controller@80600000 { compatible = "arm,gic-v3"; #interrupt-cells = <3>; From patchwork Mon Jun 26 03:12:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Packham X-Patchwork-Id: 112722 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp7227068vqr; Sun, 25 Jun 2023 20:54:55 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5GSWCP1FHFsr0D+30oYVEaTAYTL3wRkjaiklFDYf1iuMKFMazLAxt1U1iSbVTZXDl9je+E X-Received: by 2002:aa7:d902:0:b0:51a:4a3e:c9e with SMTP id a2-20020aa7d902000000b0051a4a3e0c9emr17112437edr.11.1687751695589; Sun, 25 Jun 2023 20:54:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687751695; cv=none; d=google.com; s=arc-20160816; b=cAc/wb422DBMC8XgepWXySDax3fPjJliOQMuSJDHhnOzXuZACZDMwyU9ERpmxhsVHv /AscL8G375F+UXjpfs1S5fUYeEFtA/roVPmdbG0UJVM73d3noQW8CkklpEPnNvINXI7Y VZhqB1SC5SuzIuPfSKygpX+qkDRieSsr/YwvJG9bdZOoHM1PFqVhT9hd8Oy55kJYTe4o eTmWA0hglMR5uTMGStDgln/n2UPV7TNXIgSIk4z7ItKdIB0VefvD9CHvor114k97ccOu Awo6nsdrTWl32ytsmSrh1vg2iFYEQp0TfndXwQET/LrDNm+Q1FiNSqTfUoqPCMIixK0H vK8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=T/cMMndfNf0ocqhn0QoQw6bUJBMlWygzKPKZTmLFFsw=; fh=u1T6lzBhedTY+P8JX/fXlYyShslneoAz5x8mqfe6RIo=; b=MNHF1hTipaak9/FYLw9GQaV2qh9Uh+JF3S3DIYspioHp0CkhUI/OXFbfszD7lY6n0M Hqxr0mfwa77D+3HgJkRk2ewiMPTdzva+BGydqjjgf+kIkhKL9uGR3E0nyFd1/bm+NwbE exZzaFPfOQb5RNqpln6kFWVZ3/ezSfsiluOicz0nmA3fwcEIoj7sWHd3h/E4YWf+hjhl jyS1pnb2etwe4eZFm5M3ou5m8RSJUZy612OgH/zX8WLuRYg3kW+tJH3yT+auABUmNMyu pkt6/VNSMLeaRiB2sLe0gC+aXagSNQgcGGo+ZG+SG1BM74Pmyd4glk1u3X9MWLYb0CzQ CPOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alliedtelesis.co.nz header.s=mail181024 header.b=CTVr0opj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=REJECT dis=NONE) header.from=alliedtelesis.co.nz Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z8-20020a50eb48000000b0051bdf8b726bsi2128379edp.623.2023.06.25.20.54.31; Sun, 25 Jun 2023 20:54:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@alliedtelesis.co.nz header.s=mail181024 header.b=CTVr0opj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=REJECT dis=NONE) header.from=alliedtelesis.co.nz Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230498AbjFZDMh (ORCPT + 99 others); Sun, 25 Jun 2023 23:12:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52250 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230514AbjFZDM1 (ORCPT ); Sun, 25 Jun 2023 23:12:27 -0400 Received: from gate2.alliedtelesis.co.nz (gate2.alliedtelesis.co.nz [IPv6:2001:df5:b000:5::4]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 34A12E55 for ; Sun, 25 Jun 2023 20:12:24 -0700 (PDT) Received: from svr-chch-seg1.atlnz.lc (mmarshal3.atlnz.lc [10.32.18.43]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by gate2.alliedtelesis.co.nz (Postfix) with ESMTPS id 077602C0591; Mon, 26 Jun 2023 15:12:21 +1200 (NZST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alliedtelesis.co.nz; s=mail181024; t=1687749141; bh=T/cMMndfNf0ocqhn0QoQw6bUJBMlWygzKPKZTmLFFsw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CTVr0opj8KePIWa9Q2JSSU2d7A6S+qQDuxZb2ekXGAgLNaskLMeJOioDIzHpCEiCM liIVfFrr5ANCddL1Fpfxb9w6Ht3Vrm5IhcKmG6h93HeG9os+bOQIHl6BqkuCt/p34x jdnIWqi1jlAFQgs81qUQIxrBx/hRZW3ptWeUPVrRjO4zE3l7HO3Gz1jpbM3xDsCtUd TEtMMoOFYNMCtycXtYUczNBwkEneqTEJlf8nvFK//qtWa6b4r+e3NqrAjtuq2A06IS 0QxG/owF7Xp4pWDNO6ci8qmyfbrW/GL8ZcMU0LilHVxht2o6WecRHChya06A9Liatw UgTEDkJHJgyfg== Received: from pat.atlnz.lc (Not Verified[10.32.16.33]) by svr-chch-seg1.atlnz.lc with Trustwave SEG (v8,2,6,11305) id ; Mon, 26 Jun 2023 15:12:20 +1200 Received: from chrisp-dl.ws.atlnz.lc (chrisp-dl.ws.atlnz.lc [10.33.22.30]) by pat.atlnz.lc (Postfix) with ESMTP id A497313EE7B; Mon, 26 Jun 2023 15:12:20 +1200 (NZST) Received: by chrisp-dl.ws.atlnz.lc (Postfix, from userid 1030) id A590D283B1A; Mon, 26 Jun 2023 15:12:20 +1200 (NZST) From: Chris Packham To: miquel.raynal@bootlin.com, richard@nod.at, vigneshr@ti.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, gregory.clement@bootlin.com, pierre.gondois@arm.com, arnd@arndb.de, f.fainelli@gmail.com Cc: linux-mtd@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Chris Packham Subject: [PATCH v2 3/3] mtd: rawnand: marvell: add support for AC5 SoC Date: Mon, 26 Jun 2023 15:12:17 +1200 Message-ID: <20230626031217.870938-4-chris.packham@alliedtelesis.co.nz> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230626031217.870938-1-chris.packham@alliedtelesis.co.nz> References: <20230626031217.870938-1-chris.packham@alliedtelesis.co.nz> MIME-Version: 1.0 X-Patchwork-Bot: notify X-SEG-SpamProfiler-Analysis: v=2.3 cv=NPqrBHyg c=1 sm=1 tr=0 a=KLBiSEs5mFS1a/PbTCJxuA==:117 a=of4jigFt-DYA:10 a=FN2KoAgMzK-72ix3NDkA:9 X-SEG-SpamProfiler-Score: 0 x-atlnz-ls: pat X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1769735763224419198?= X-GMAIL-MSGID: =?utf-8?q?1769735922081133053?= Add support for the AC5/AC5X SoC from Marvell. The NFC on this SoC only supports SDR modes up to 3. Marvell's SDK includes some predefined values for the ndtr registers. These haven't been incorporated as the existing code seems to get good values based on measurements taken with an oscilloscope. Signed-off-by: Chris Packham --- Notes: Changes in v2: - None drivers/mtd/nand/raw/Kconfig | 2 +- drivers/mtd/nand/raw/marvell_nand.c | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/drivers/mtd/nand/raw/Kconfig b/drivers/mtd/nand/raw/Kconfig index b523354dfb00..0f4cbb497010 100644 --- a/drivers/mtd/nand/raw/Kconfig +++ b/drivers/mtd/nand/raw/Kconfig @@ -160,7 +160,7 @@ config MTD_NAND_MARVELL including: - PXA3xx processors (NFCv1) - 32-bit Armada platforms (XP, 37x, 38x, 39x) (NFCv2) - - 64-bit Aramda platforms (7k, 8k) (NFCv2) + - 64-bit Aramda platforms (7k, 8k, ac5) (NFCv2) config MTD_NAND_SLC_LPC32XX tristate "NXP LPC32xx SLC NAND controller" diff --git a/drivers/mtd/nand/raw/marvell_nand.c b/drivers/mtd/nand/raw/marvell_nand.c index 30c15e4e1cc0..b9a8dd324211 100644 --- a/drivers/mtd/nand/raw/marvell_nand.c +++ b/drivers/mtd/nand/raw/marvell_nand.c @@ -375,6 +375,7 @@ static inline struct marvell_nand_chip_sel *to_nand_sel(struct marvell_nand_chip * BCH error detection and correction algorithm, * NDCB3 register has been added * @use_dma: Use dma for data transfers + * @max_mode_number: Maximum timing mode supported by the controller */ struct marvell_nfc_caps { unsigned int max_cs_nb; @@ -383,6 +384,7 @@ struct marvell_nfc_caps { bool legacy_of_bindings; bool is_nfcv2; bool use_dma; + unsigned int max_mode_number; }; /** @@ -2376,6 +2378,9 @@ static int marvell_nfc_setup_interface(struct nand_chip *chip, int chipnr, if (IS_ERR(sdr)) return PTR_ERR(sdr); + if (nfc->caps->max_mode_number && nfc->caps->max_mode_number < conf->timings.mode) + return -EOPNOTSUPP; + /* * SDR timings are given in pico-seconds while NFC timings must be * expressed in NAND controller clock cycles, which is half of the @@ -3073,6 +3078,13 @@ static const struct marvell_nfc_caps marvell_armada_8k_nfc_caps = { .is_nfcv2 = true, }; +static const struct marvell_nfc_caps marvell_ac5_caps = { + .max_cs_nb = 2, + .max_rb_nb = 1, + .is_nfcv2 = true, + .max_mode_number = 3, +}; + static const struct marvell_nfc_caps marvell_armada370_nfc_caps = { .max_cs_nb = 4, .max_rb_nb = 2, @@ -3121,6 +3133,10 @@ static const struct of_device_id marvell_nfc_of_ids[] = { .compatible = "marvell,armada-8k-nand-controller", .data = &marvell_armada_8k_nfc_caps, }, + { + .compatible = "marvell,ac5-nand-controller", + .data = &marvell_ac5_caps, + }, { .compatible = "marvell,armada370-nand-controller", .data = &marvell_armada370_nfc_caps,