From patchwork Wed Nov 8 14:33:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 16381 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:aa0b:0:b0:403:3b70:6f57 with SMTP id k11csp953969vqo; Wed, 8 Nov 2023 06:34:50 -0800 (PST) X-Google-Smtp-Source: AGHT+IE5uAnhHzTtCTUmw8lbpaZbkIGxcrFwgjNaY7T0X/E538L7LmbTqik4v4apH+4MHDAwbocO X-Received: by 2002:a05:6358:528d:b0:168:eeab:390d with SMTP id g13-20020a056358528d00b00168eeab390dmr2374410rwa.22.1699454089723; Wed, 08 Nov 2023 06:34:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699454089; cv=none; d=google.com; s=arc-20160816; b=TI/K+AIm/cD1KaZ7FYITwLDdvTrjVN0F0c4VvjzoPijoYTxd8fBN/OpP/LFTJzk/5H ovtxf6eRQemSTIUp8jJljc5FhG7BumVzpRPe/Qs9dp7F+iUg/xtuMNG7MmoDGNUXwnXP ZS50gkrSv2alSmqvRdbrGW1TVmrQsIFpGp9cinOcNaSG7PlnjRLJhUP71yEEImEdG1dm /CGqbj5JTyM3m5zicb/Sn0jXTPM4gzt01Uqwpkf0rtBZlIK0r+CR3yZb1LO/SURqzrjR GA/XthQjzEUYLB4rj3S7Z3/VoOLKo/X8ZflPr1Lj00T+bCgx2g58Y5HL6lpj11itsIZ8 dtfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:content-transfer-encoding:mime-version :message-id:date:subject:from:dkim-signature; bh=YcULZ9PGcbiz4pOSYdWqK1KBS4j8l5GIDZ+NaSWycPw=; fh=JxrGXcBkvbAHikFcqg1Guip5xChjDhPUlMK79BsD5XY=; b=nP20Zx7exCe87OyD1zPe/x2fcqbH+Foys75mOVvb4hRmnaCIUTO8QTNh+ZDtw2IxyY 7WpC5wl4ij7dgZk9Azx2TxNAGxIHgBPayZjdRjfBGXbIjozEbNdObMpQ7Q+vCAvdGMjX SDbCacLLBtHoEjF4+NQHLO3yoeVLz+usKMWvCn1OSUzGqI8aIY3+6oGx1L96V4rZshD1 4/VTAXOewzsVqqhja0cpuOixRKgVb9AwQpPxZK4k/z9MtSBsNQ0WtTD+FVaYlDIT4clU Vj7xbTu0m8SUfRr+86cT29Jt51MMV58Of9IWCLuzz+JiOiS1DllKD2MhiXjJT3tEUgxA sT9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zvKBXC5m; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id u68-20020a637947000000b005ae22729b09si4265773pgc.683.2023.11.08.06.34.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Nov 2023 06:34:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zvKBXC5m; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id C488B8285F60; Wed, 8 Nov 2023 06:34:31 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233324AbjKHOeF (ORCPT + 32 others); Wed, 8 Nov 2023 09:34:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41508 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344607AbjKHOeB (ORCPT ); Wed, 8 Nov 2023 09:34:01 -0500 Received: from mail-lf1-x135.google.com (mail-lf1-x135.google.com [IPv6:2a00:1450:4864:20::135]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 10B831BC3 for ; Wed, 8 Nov 2023 06:33:59 -0800 (PST) Received: by mail-lf1-x135.google.com with SMTP id 2adb3069b0e04-5079f3f3d7aso9463784e87.1 for ; Wed, 08 Nov 2023 06:33:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1699454037; x=1700058837; darn=vger.kernel.org; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:from:to:cc:subject:date:message-id:reply-to; bh=YcULZ9PGcbiz4pOSYdWqK1KBS4j8l5GIDZ+NaSWycPw=; b=zvKBXC5mGb15nr6GNShso8tgMsgpfhx1kHY/rv2v7yVw3RJwDRmTQiDu6WQ+j4UY5N j1AG0Pd4DRPcJjypqJk9r2zsve8IWmNDYFjoZhawTw2V0ubnmZWtv8eyCbHRjl+WrGz4 lZmy5tYqAF/2nueJ4Qz41Mnpk0rYl/NqWHtYjCE9pkmCMrtTEc8afZes4/J/W1wbpD54 D6sgIzOL/yFlDDWQJiwlaUsuwKvwi8NquNGbkfyWioKEgQ7kE2NVb34MP+J5ExOwiTQX 3aj6BoDaJMos1dj8rO8Udy4BAIkUolOrr4SnZsawG12kSfUeiutzGnSGrUSH9cyluPSC 4fTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699454037; x=1700058837; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=YcULZ9PGcbiz4pOSYdWqK1KBS4j8l5GIDZ+NaSWycPw=; b=KyXjMr+0x5l6+ni9irblMVayVFV71OLVBG0ygCFaBUEgzEI9iu2EeZpBR/2QclPdTQ p7ghdIxa5mYmBS/nWLxI8HMQmVaRCulxiptfh5PMHXiqpFJyJJmmuiTSoPTsZRaeIqyq EmxTx/bxUjcMfT1izblBcGlrD/El7wzE5gx1Pb7UJtLjfwVk/1uIq5iVn30PxLFz0Z5x n1ZZcsiFcbZ/lf/8SovaqfNvhPO+X17+JlW+lXmv3SXvG+DcoESlRewy8VMLHLc8lzhn Xgv2nhFG0IOJVoLWBmhvIW6Cw1SOxUtBz7qyQh2is88vsfjHd9UcgZpgxKTzrpc197eU TmSQ== X-Gm-Message-State: AOJu0YyS76o3x7449WHI3G6+u3MP0vcCvPYcG5tlyuDPsugoqT+3/vAe NZkVhsLOp9acdDY3YEz4WMIObg== X-Received: by 2002:a05:6512:31d0:b0:509:2b81:fc40 with SMTP id j16-20020a05651231d000b005092b81fc40mr1835669lfe.9.1699454037158; Wed, 08 Nov 2023 06:33:57 -0800 (PST) Received: from [127.0.1.1] ([85.235.12.238]) by smtp.gmail.com with ESMTPSA id q10-20020ac24a6a000000b00507a3b8b007sm686773lfp.110.2023.11.08.06.33.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Nov 2023 06:33:56 -0800 (PST) From: Linus Walleij Subject: [PATCH 0/6] Fix polarity and bindings for GPIO-based NAND drivers Date: Wed, 08 Nov 2023 15:33:48 +0100 Message-Id: <20231108-fix-mips-nand-v1-0-5fc5586d04de@linaro.org> MIME-Version: 1.0 X-B4-Tracking: v=1; b=H4sIAEycS2UC/x2MQQqAIBAAvyJ7bkGtoPpKdDBdaw+ZKEQg/j3pO DAzBTIlpgyLKJDo4cx3aKA6AfY04SBk1xi01L1SckTPL14cMwYTHNpZ0e4m6c3goTUxURP+37r V+gEN+7w/XwAAAA== To: Aaro Koskinen , Janusz Krzysztofik , Tony Lindgren , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Thomas Bogendoerfer , Ben Dooks Cc: linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org, devicetree@vger.kernel.org, linux-mips@vger.kernel.org, Linus Walleij , Howard Harte X-Mailer: b4 0.12.4 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Wed, 08 Nov 2023 06:34:31 -0800 (PST) X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,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 groat.vger.email X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1782006771360339195 X-GMAIL-MSGID: 1782006771360339195 The AMD Delta and generic GPIO-based NAND drivers are using GPIO lines extensively to communicate with a raw NAND flash. Some confusion has crept into the naming leading to the two drivers using inversed semantics differently for pins with the same name. Fix the situation by naming the pins consistently without any inversion names (such as nce for a negative active chip enable). Fix up all in-tree users. Next rewrite the device tree bindings in YAML schema, and fix up the single in-tree DTS file (MIPS) to use the new bindings where each signal is specified explicitly instead of an array with some "blanks" for unused lines. Last clean up the GPIO NAND driver to drop use of board file provided data as no boards using this remain, and use device properties removing the explicit reliance on device tree. Signed-off-by: Linus Walleij --- Linus Walleij (6): mtd: rawnand: ams-delta/gpio: Unify polarity dt-bindings: mtd: Rewrite gpio-control-nand in schema MIPS: NI 169445: Fix NAND GPIOs mtd: rawnand: gpio: Use device properties mtd: rawnand: gpio: Support standard nand width mtd: rawnand: gpio: Rename file .../devicetree/bindings/mtd/gpio-control-nand.txt | 47 ------ .../devicetree/bindings/mtd/gpio-control-nand.yaml | 168 +++++++++++++++++++++ Documentation/devicetree/bindings/mtd/mtd.yaml | 2 +- arch/arm/mach-omap1/board-ams-delta.c | 8 +- arch/mips/boot/dts/ni/169445.dts | 13 +- drivers/mtd/nand/raw/Makefile | 2 +- drivers/mtd/nand/raw/ams-delta.c | 60 ++++---- drivers/mtd/nand/raw/{gpio.c => nand-gpio.c} | 120 +++++---------- 8 files changed, 251 insertions(+), 169 deletions(-) --- base-commit: be3ca57cfb777ad820c6659d52e60bbdd36bf5ff change-id: 20231105-fix-mips-nand-c91ebd80fa4f Best regards,