Message ID | 20230607145026.2899547-1-AVKrasnov@sberdevices.ru |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp267096vqr; Wed, 7 Jun 2023 08:06:50 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4Rb5ImdU5rpnaKCpZJ0BEHVacLJkAiEuC0XhvkVajO/2bmUBfEVbWH3TlfnPtmKv7t4Y/C X-Received: by 2002:a17:902:e88a:b0:1b0:f8:9b2d with SMTP id w10-20020a170902e88a00b001b000f89b2dmr7663480plg.29.1686150409695; Wed, 07 Jun 2023 08:06:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686150409; cv=none; d=google.com; s=arc-20160816; b=hkvEaNVFU/1hxnwN7973Ihs25iH7VPkOCgSeMvlB6olqu5JB8xdcMfykWunWHK1cj7 H6lRCDIU6h0SYDor0O9nfMlcfI8jhq5Tfq0ZqzzgMy3eVEtBIt459GM9rw2AtnxhCCVk z/rck8LUaRVZjl89TUZtu5ERIT2L2gyf3Et+xvi5dBSzgbNV2Zm/99ErQvVC7Z3M3icH Z/QQWHC43dr02MHv0Oep8bWdGBsEA0yfh/yOBoKbCf5CLYu4yq8GEBZ43vMYtkYPSVzM azX/b7N5kDIhVFI8QqPd47WpFqf2E6AeQ4BMC4A4e/rRpl4CkgafZMv0zjxh6pOecDdC q2bQ== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=UYxiu6ewdp+Z+G0hkR1Ih5TEv7mk3kDcVza211h23bs=; b=kAw5CHspjG/MUGNtmr+ax1rPw/O7Bgid6Nx7gIyyRt1NXSHT+8wS+GLXO9TU1Hm04d DkTIZenOupoCMj0/o1UJ0XuJXmn6SRNNb8ECVhWJaBo00R7QRT7uODO0igIfWLTHhEf5 mLWyhOqDOaz089aA2R0Axh4wPt4c8jaEch7bGsV6XVmCLQ8BNEYRMjoFRKBm1aum3m5B c+oP9x1aG0ECL5L2L4R6DOvwKqwJ0NfQO9IgPivSVfnNTIUUS8p4ET0tfZoBYoZ7zwO7 jb0uM+kqS2YrBp1p4OCa4N//V7VNSiQS/ooRf9+wNuCrVnBQh/jU1ee1mZkk/mS2hDlg DHOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sberdevices.ru header.s=mail header.b=Y4ea4ubP; 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=QUARANTINE dis=NONE) header.from=sberdevices.ru Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z9-20020a170902834900b0019ccffb3fd3si8743453pln.509.2023.06.07.08.06.36; Wed, 07 Jun 2023 08:06:49 -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=@sberdevices.ru header.s=mail header.b=Y4ea4ubP; 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=QUARANTINE dis=NONE) header.from=sberdevices.ru Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241206AbjFGOzu (ORCPT <rfc822;xxoosimple@gmail.com> + 99 others); Wed, 7 Jun 2023 10:55:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43978 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240423AbjFGOzl (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 7 Jun 2023 10:55:41 -0400 Received: from mx.sberdevices.ru (mx.sberdevices.ru [45.89.227.171]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 086AE1734; Wed, 7 Jun 2023 07:55:35 -0700 (PDT) Received: from s-lin-edge02.sberdevices.ru (localhost [127.0.0.1]) by mx.sberdevices.ru (Postfix) with ESMTP id 21CBA5FD6C; Wed, 7 Jun 2023 17:55:34 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sberdevices.ru; s=mail; t=1686149734; bh=UYxiu6ewdp+Z+G0hkR1Ih5TEv7mk3kDcVza211h23bs=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type; b=Y4ea4ubPl2EX/G3JwfBKtSLh9YDYgcegMecXoCSFyohMyMHANghdnQJ2RMue8Vm4x NYArtsX9kHd194A73Jhg5A9eXPGzkk1IGt0D0tGjMjjg5+UhNMIkERg1+mHEl4XuI3 avna8yXBdJ16ZWYiPoJNwE2vhk+orOOYaKNJlQDVIQpLTPs5EAZQIsJd2LSPaJX4PE EuQIdfDZBQ0zjBNDWJTuuIiCzD5CFVYB/ZCDG5NpFoCViAaxNPuy8ALrX7vC7CXfQL /Sssye0DFy8tAqVBgijCPmbX+wmwq3xEVRoMoZ1KQVPJlSrPykNeA7aJTSLp6SayiR 3i80P0EU3uA/Q== Received: from S-MS-EXCH01.sberdevices.ru (S-MS-EXCH01.sberdevices.ru [172.16.1.4]) by mx.sberdevices.ru (Postfix) with ESMTP; Wed, 7 Jun 2023 17:55:31 +0300 (MSK) From: Arseniy Krasnov <AVKrasnov@sberdevices.ru> To: Liang Yang <liang.yang@amlogic.com>, Miquel Raynal <miquel.raynal@bootlin.com>, Richard Weinberger <richard@nod.at>, Vignesh Raghavendra <vigneshr@ti.com>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Neil Armstrong <neil.armstrong@linaro.org>, Kevin Hilman <khilman@baylibre.com>, Jerome Brunet <jbrunet@baylibre.com>, Martin Blumenstingl <martin.blumenstingl@googlemail.com> CC: <oxffffaa@gmail.com>, <kernel@sberdevices.ru>, Arseniy Krasnov <AVKrasnov@sberdevices.ru>, <linux-mtd@lists.infradead.org>, <devicetree@vger.kernel.org>, <linux-arm-kernel@lists.infradead.org>, <linux-amlogic@lists.infradead.org>, <linux-kernel@vger.kernel.org> Subject: [PATCH v1 0/2] Meson NAND: waiting w/o wired ready/busy pin Date: Wed, 7 Jun 2023 17:50:23 +0300 Message-ID: <20230607145026.2899547-1-AVKrasnov@sberdevices.ru> X-Mailer: git-send-email 2.35.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.16.1.6] X-ClientProxiedBy: S-MS-EXCH01.sberdevices.ru (172.16.1.4) To S-MS-EXCH01.sberdevices.ru (172.16.1.4) X-KSMG-Rule-ID: 4 X-KSMG-Message-Action: clean X-KSMG-AntiSpam-Status: not scanned, disabled by settings X-KSMG-AntiSpam-Interceptor-Info: not scanned X-KSMG-AntiPhishing: not scanned, disabled by settings X-KSMG-AntiVirus: Kaspersky Secure Mail Gateway, version 1.1.2.30, bases: 2023/06/07 09:39:00 #21450961 X-KSMG-AntiVirus-Status: Clean, skipped 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_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1768056851919960523?= X-GMAIL-MSGID: =?utf-8?q?1768056851919960523?= |
Series |
Meson NAND: waiting w/o wired ready/busy pin
|
|
Message
Arseniy Krasnov
June 7, 2023, 2:50 p.m. UTC
Main thing that this patchset adds is support for waiting for command completion when there is no wired ready/busy pin. This is implemented by using Meson specific command which operates without wired pin, but supports interrupt driven waiting (default way for waiting without hardware pin is 'nand_soft_waitrdy()' which uses software loop instead of interrupt). To select which mode to use during driver initialization, common NAND controller property is used - 'nand-rb'. It is described in 'nand-controller.yaml'. But for Meson, its description was missed in 'amlogic,meson-nand.yaml', so this patchset also adds support for it. Patch for bindings was tested with dt_binding_check and dtbs_check. Arseniy Krasnov (2): dt-bindings: nand: meson: Fix 'nand-rb' property mtd: rawnand: meson: waiting w/o wired ready/busy pin .../bindings/mtd/amlogic,meson-nand.yaml | 7 ++ drivers/mtd/nand/raw/meson_nand.c | 82 ++++++++++++++++++- 2 files changed, 85 insertions(+), 4 deletions(-)
Comments
On 07.06.2023 17:50, Arseniy Krasnov wrote: > Main thing that this patchset adds is support for waiting for command > completion when there is no wired ready/busy pin. This is implemented > by using Meson specific command which operates without wired pin, but > supports interrupt driven waiting (default way for waiting without > hardware pin is 'nand_soft_waitrdy()' which uses software loop instead > of interrupt). To select which mode to use during driver initialization, > common NAND controller property is used - 'nand-rb'. It is described in > 'nand-controller.yaml'. But for Meson, its description was missed in > 'amlogic,meson-nand.yaml', so this patchset also adds support for it. > > Patch for bindings was tested with dt_binding_check and dtbs_check. > > Arseniy Krasnov (2): > dt-bindings: nand: meson: Fix 'nand-rb' property > mtd: rawnand: meson: waiting w/o wired ready/busy pin > > .../bindings/mtd/amlogic,meson-nand.yaml | 7 ++ > drivers/mtd/nand/raw/meson_nand.c | 82 ++++++++++++++++++- > 2 files changed, 85 insertions(+), 4 deletions(-) > Changelog: * Two separate patches: For bindings: https://lore.kernel.org/linux-mtd/20230606193507.35024-1-AVKrasnov@sberdevices.ru/ For driver: https://lore.kernel.org/linux-mtd/20230607073015.1280085-1-AVKrasnov@sberdevices.ru/ Now fixed/updated and combined to this patchset with v1 version. * In binding patch: * Invalid type of 'nand-rb' is fixed, it was 'bool', now it is 'uint32 array' as required. Also new declaration of 'nand-rb' contains several restrictions like number of elements and min/max value of elements. * Location of 'nand-rb' is moved from the controller object to the chip object as required. * In driver patch: * Update comment which describes when it is needed to send NAND_CMD_READ0 to leave command waiting loop. * Change type of 'no_rb_pin' to 'bool' as in v1. Now it is just a flag which selects mode to wait for command completion. Thanks, Arseniy
On 07/06/2023 17:18, Arseniy Krasnov wrote: > > > On 07.06.2023 17:50, Arseniy Krasnov wrote: >> Main thing that this patchset adds is support for waiting for command >> completion when there is no wired ready/busy pin. This is implemented >> by using Meson specific command which operates without wired pin, but >> supports interrupt driven waiting (default way for waiting without >> hardware pin is 'nand_soft_waitrdy()' which uses software loop instead >> of interrupt). To select which mode to use during driver initialization, >> common NAND controller property is used - 'nand-rb'. It is described in >> 'nand-controller.yaml'. But for Meson, its description was missed in >> 'amlogic,meson-nand.yaml', so this patchset also adds support for it. >> >> Patch for bindings was tested with dt_binding_check and dtbs_check. >> >> Arseniy Krasnov (2): >> dt-bindings: nand: meson: Fix 'nand-rb' property >> mtd: rawnand: meson: waiting w/o wired ready/busy pin >> >> .../bindings/mtd/amlogic,meson-nand.yaml | 7 ++ >> drivers/mtd/nand/raw/meson_nand.c | 82 ++++++++++++++++++- >> 2 files changed, 85 insertions(+), 4 deletions(-) >> > > Changelog: > * Two separate patches: > For bindings: https://lore.kernel.org/linux-mtd/20230606193507.35024-1-AVKrasnov@sberdevices.ru/ > For driver: https://lore.kernel.org/linux-mtd/20230607073015.1280085-1-AVKrasnov@sberdevices.ru/ > Now fixed/updated and combined to this patchset with v1 version. > > * In binding patch: > * Invalid type of 'nand-rb' is fixed, it was 'bool', now it is 'uint32 array' as required. Also > new declaration of 'nand-rb' contains several restrictions like number of elements and min/max > value of elements. > * Location of 'nand-rb' is moved from the controller object to the chip object as required. Version your patchsets. This is v2, not v1. Best regards, Krzysztof
On 07.06.2023 21:48, Krzysztof Kozlowski wrote: > On 07/06/2023 17:18, Arseniy Krasnov wrote: >> >> >> On 07.06.2023 17:50, Arseniy Krasnov wrote: >>> Main thing that this patchset adds is support for waiting for command >>> completion when there is no wired ready/busy pin. This is implemented >>> by using Meson specific command which operates without wired pin, but >>> supports interrupt driven waiting (default way for waiting without >>> hardware pin is 'nand_soft_waitrdy()' which uses software loop instead >>> of interrupt). To select which mode to use during driver initialization, >>> common NAND controller property is used - 'nand-rb'. It is described in >>> 'nand-controller.yaml'. But for Meson, its description was missed in >>> 'amlogic,meson-nand.yaml', so this patchset also adds support for it. >>> >>> Patch for bindings was tested with dt_binding_check and dtbs_check. >>> >>> Arseniy Krasnov (2): >>> dt-bindings: nand: meson: Fix 'nand-rb' property >>> mtd: rawnand: meson: waiting w/o wired ready/busy pin >>> >>> .../bindings/mtd/amlogic,meson-nand.yaml | 7 ++ >>> drivers/mtd/nand/raw/meson_nand.c | 82 ++++++++++++++++++- >>> 2 files changed, 85 insertions(+), 4 deletions(-) >>> >> >> Changelog: >> * Two separate patches: >> For bindings: https://lore.kernel.org/linux-mtd/20230606193507.35024-1-AVKrasnov@sberdevices.ru/ >> For driver: https://lore.kernel.org/linux-mtd/20230607073015.1280085-1-AVKrasnov@sberdevices.ru/ >> Now fixed/updated and combined to this patchset with v1 version. >> >> * In binding patch: >> * Invalid type of 'nand-rb' is fixed, it was 'bool', now it is 'uint32 array' as required. Also >> new declaration of 'nand-rb' contains several restrictions like number of elements and min/max >> value of elements. >> * Location of 'nand-rb' is moved from the controller object to the chip object as required. > > Version your patchsets. This is v2, not v1. Ack, next will be v3 Thanks, Arseniy > > Best regards, > Krzysztof >