Received: by 2002:a19:f614:0:0:0:0:0 with SMTP id x20csp45279lfe; Fri, 15 Apr 2022 18:40:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwNHRb8UlXCtwPJXqhSWlPZyjiBpBYPeUA1hUDt0VOGJShPdskMQEcf/Wpgi7pVAUMY3Us3 X-Received: by 2002:a17:902:8496:b0:158:a8e0:516b with SMTP id c22-20020a170902849600b00158a8e0516bmr1705206plo.4.1650073219710; Fri, 15 Apr 2022 18:40:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650073219; cv=none; d=google.com; s=arc-20160816; b=Ouf7NA8bpH/r+bL2N7dD04t0TWsR9ond7TrtirK3WHflIgUDpa4QWF4Cvnxg7xL4M3 GgPbI4aUV5LlAGsT+/AyW5q6TLPvfM6gE9zMjUWPJosHw04Mo/mg9xTpn9659jXvHvjY zGAtALyxagn2pdCOg4hK6meo7xW/05lwHSkjVUECZ/OhbI9fJ/9o8C1nmWikOT+a9AnT C5saoXMdKWyXKAMzHsbdDcC+dwnUuxv+oA5/WOPaO6Rx2hchpLk88FBBtcg9sFYtq4tG eZ7aHQDe/3O1fOQm3PNqOI9byXoNQ607kUOMtmNd+CUkyMWiD6UnX/JBLNCBgAK+aGZf WXtQ== 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=JR7TGUzg2jTgqyV7dtws4W0P36w8/I4C5KP+KUJ6XkY=; b=IEir8g/3EZa1eshZOOOHiNmH/1voEzJS9OyGd0hdOKzL7nIeHAhSLsR6ud25iTX2zq qXhiG2RZ+1jN0EO82iYNhQywEjFsMffRgBm0ldjwiSx98mQEXtbHp+koir9cjaMZv0Vv 8JdYC7hXOvLdJC9rYRlExhjAUOC1IERyoC9yzcOqQnX1LzkmetgAqyeboa68oZj+eb/J cY8E9C6qv2rUkIIezbpGUicvcpqjxZ2vloWOc88fGtDP+5GG+jQQXEixLLSHm+RHyuBX Yrn46sIURi80clK2xpgGbYW0fzZaV8E4yIFBexmlaNXDJLLssqUYNt+kl28CvmvEPzJm lymg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="e/V0toUX"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id o17-20020a170902779100b00158cb2a835bsi2671228pll.438.2022.04.15.18.40.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Apr 2022 18:40:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="e/V0toUX"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 8A5DF162195; Fri, 15 Apr 2022 18:05:33 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1358347AbiDNPlf (ORCPT + 99 others); Thu, 14 Apr 2022 11:41:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38486 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1354279AbiDNOly (ORCPT ); Thu, 14 Apr 2022 10:41:54 -0400 Received: from mail-pf1-x430.google.com (mail-pf1-x430.google.com [IPv6:2607:f8b0:4864:20::430]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 416C8D1CF3 for ; Thu, 14 Apr 2022 07:34:36 -0700 (PDT) Received: by mail-pf1-x430.google.com with SMTP id f3so5033517pfe.2 for ; Thu, 14 Apr 2022 07:34:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=JR7TGUzg2jTgqyV7dtws4W0P36w8/I4C5KP+KUJ6XkY=; b=e/V0toUXFKIfbzcWd3+aVJ6Rmm/EpLtj5P9sXxAoSV5ff6JEJlaZJEtSh3kvQI50QE wazu2qVsYBARhMzzJnyULXLSLNXJRTvqXWlZl0WJmUyxzhrXzHSqrJgXHWkmZLbFJE+i SiRJweI/ucaEcCKzvQW3k0KmmBBt1B2AOQnxdeYZG39hurUIUfGETH/4XttlHlRXFe4e 8e/KtAADwZk2MplvC14VF5f/7ml0h+b3bJmtS1dQmL3B5L1dP0ERLUQgXMNdBMm2NJNK tiSVKTE0pjhwDhrlEx4+EBeIbeHrGEAomsW2G1g1F9P7xqZRqhbo5uxa9aJQSU5ewMnJ i5Jg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=JR7TGUzg2jTgqyV7dtws4W0P36w8/I4C5KP+KUJ6XkY=; b=ZY7LC9k6qIdl7xkCsUHe6BvoVA8Vqs6E9TnG1b6KsDNHtbpw5rNKycTVUj/pdiu14d TpKWN8B839Xc//mlYjXj9JT8FvGRU3shQ32XTg13G/qSJDQBfzZCcP8PJ7kdV2BcBa5e e3QX35LuJXWTwSTdH6dzuSQGlRpTZlSeSlSZwAXG9CribEUsXzSoKDbDCKknlKyeu/VC yh1ZYlZxuSlaYK9bSvG3nUDIs89lXnneIiLp6o0D3RZI5QvPR4bE11KjPs2mvDxAa/QO wqGHEipY4k/WuMC0KZu2QKCNzH1UMxDwooRGO+9+heS6avd8+W1Doi87ayRDia27tcCh 1vNw== X-Gm-Message-State: AOAM532EW2p5i+cnnv7FihCiEejmIM8iSMgMuRxs6qPmq7H0w/VShPwl P8Da0MoXyQnvNd5mpExNcZs= X-Received: by 2002:a05:6a00:b8e:b0:505:8d7e:cb02 with SMTP id g14-20020a056a000b8e00b005058d7ecb02mr4202119pfj.68.1649946876042; Thu, 14 Apr 2022 07:34:36 -0700 (PDT) Received: from guoguo-omen.lan ([2401:c080:1400:4da2:b701:47d5:9291:4cf9]) by smtp.gmail.com with ESMTPSA id k5-20020a17090ac50500b001cd5ffcca96sm4411017pjt.27.2022.04.14.07.34.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Apr 2022 07:34:35 -0700 (PDT) From: Chuanhong Guo To: linux-mtd@lists.infradead.org Cc: Chuanhong Guo , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Patrice Chotard , Boris Brezillon , Christophe Kerello , Mark Brown , Daniel Palmer , linux-kernel@vger.kernel.org (open list) Subject: [PATCH 0/2] mtd: spinand: add support for detection with param page Date: Thu, 14 Apr 2022 22:34:24 +0800 Message-Id: <20220414143426.723168-1-gch981213@gmail.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 This patchset adds support for spi-nand detection using parameter page. This helps dealing with future JEDEC ID conflicts introduced by crazy vendors. Also, the added ability to auto-detect chip capacity can help reducing number of entries in our spi-nand id table. Chuanhong Guo (2): mtd: spinand: add support for detection with param page mtd: spinand: probe Winbond W25N01GV/W using param page drivers/mtd/nand/spi/Makefile | 2 +- drivers/mtd/nand/spi/core.c | 23 +-- drivers/mtd/nand/spi/onfi.c | 298 +++++++++++++++++++++++++++++++++ drivers/mtd/nand/spi/winbond.c | 25 ++- include/linux/mtd/spinand.h | 53 ++++++ 5 files changed, 380 insertions(+), 21 deletions(-) create mode 100644 drivers/mtd/nand/spi/onfi.c -- 2.35.1