Received: by 2002:a05:7412:798b:b0:fc:a2b0:25d7 with SMTP id fb11csp738088rdb; Thu, 22 Feb 2024 19:48:30 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWkXdXk0iFVOQVMwT743cbwKmYCq4Lxp3XwcZXwfQAEKQJKuqeogaYHfBQ/ZlE+X0WD8BKJgfGnp2fA/4W93D86vqX21B0zPmu8tBAoPw== X-Google-Smtp-Source: AGHT+IGZj+LI8MC8tZQvktzfKOMT3XjQAJ6k10OAbK9ybo7diQgo9qfeX6GYpxNYn5EgLSLzFVjp X-Received: by 2002:a25:2f85:0:b0:dc7:2401:df4e with SMTP id v127-20020a252f85000000b00dc72401df4emr978851ybv.39.1708660110620; Thu, 22 Feb 2024 19:48:30 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708660110; cv=pass; d=google.com; s=arc-20160816; b=JLAsJp3QGmXdHWNYoY7IIRmlA3uIYsD+mqZMmQlUVuz2kc8OiAitBDkhysgK1wHt7y IQa3ov16MVaN1CRWzueEUIIBIQIUaz40pVYyr1vjqHG4bH+GnYm4kvPOTD7dW0uVekuS KB528eIau0xhXY/cgGVinlG6xnMH/NAUQyaevfIn1heJuEtnjDIxkFQ/utCMK7teryxY JjKafcDFvpKSRvFridfldk8AwK7fi8ypesHVaCCeN2nDKew8/8/y0UbM7G2ufK7+2nWx 5+EMdJOTT/+NcvIYOPdabEqXWHFgYf2cLW6rOcDQrpjo7E4cSYEBPVkVs+egfIMBb+kA IIwg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature:dkim-filter; bh=wpT+E1kaPPTjMF/+sWxqRkZIeSTmKPJuMqE+a5ckQ2o=; fh=IBpPszxd1qYpWWUpH7FrY6ZK6HQlEsaIyNU30EpbG/8=; b=NjdHUTrKQW0cCJFTcdeJw6O8VLfnyunX4PKgY8CDMeK5jFbJXWwoYj7X5v6SRgYG79 LtuH6+7U7gBdaxGK3c+/Nz8OIYdYicqKiOah1uFLZoBXet+iI8KeWl2p8W4oNZC0whyM nuCIzFRRNzee8mk8TK+ocEtJw3FcjdJTZVFfW4/GJWtlzLaOzSJabg0fsIRmc+EPCTLg yGdtAri+JS9gUdis067uF8XeanF/nTr2kHmGgw7TutkXx0QUO/HNNd+8EmsdV2YNzDeg vIFiBp/hjN4K7FnsDXc0Avtfypny/MzrLzxlmO5mYBXXqNPZOVWRFRO9pciwMIkyExti KjWg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@broadcom.com header.s=dkimrelay header.b=lROlEqp2; arc=pass (i=1 dkim=pass dkdomain=broadcom.com dmarc=pass fromdomain=broadcom.com); spf=pass (google.com: domain of linux-kernel+bounces-77727-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-77727-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id j1-20020ac86641000000b0042dd6dea889si13574016qtp.155.2024.02.22.19.48.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Feb 2024 19:48:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-77727-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@broadcom.com header.s=dkimrelay header.b=lROlEqp2; arc=pass (i=1 dkim=pass dkdomain=broadcom.com dmarc=pass fromdomain=broadcom.com); spf=pass (google.com: domain of linux-kernel+bounces-77727-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-77727-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 528651C22160 for ; Fri, 23 Feb 2024 03:48:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2A274FC1B; Fri, 23 Feb 2024 03:48:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b="lROlEqp2" Received: from relay.smtp-ext.broadcom.com (relay.smtp-ext.broadcom.com [192.19.144.205]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4609D53A1; Fri, 23 Feb 2024 03:48:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.19.144.205 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708660103; cv=none; b=E759OxO+W32wZD/P6Bp7Vh7y2cM8Hx3tRcOXeYcA1EgaSb1GlDgHij8hoQEYBvO+Xqnx+LEchIAk/dSARfI5hZ9qPJK3c1yCcijmwlp3qLJG0Ot3tdPptjd7FBj0/IaBUL1CcqFvrk7kmY5olOOaXf6HhqBPEG2NGkE37xvjzQQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708660103; c=relaxed/simple; bh=ooziB8P9zJffFtDpTAHnbnxh1CvjB0PlrPh67/eGxOI=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=nUguH2wpcdv71JROucruauIj3qJCGmlPfZrg0uk8OJiymVLPuVMD8S/Z9byY07ELvD1h1Sf5D8Drj86lmAO9eAOvJKZIDHo81RClplhhsrm5B6lYXmiiE8oVsuMR+uLc1OfZZ75zkubluTWyO2bQe9P0vqJPERiELzaqoaFucow= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=broadcom.com; spf=fail smtp.mailfrom=broadcom.com; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b=lROlEqp2; arc=none smtp.client-ip=192.19.144.205 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=broadcom.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=broadcom.com Received: from mail-lvn-it-01.lvn.broadcom.net (mail-lvn-it-01.lvn.broadcom.net [10.36.132.253]) by relay.smtp-ext.broadcom.com (Postfix) with ESMTP id 8F2CFC0000F9; Thu, 22 Feb 2024 19:48:13 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 relay.smtp-ext.broadcom.com 8F2CFC0000F9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1708660093; bh=ooziB8P9zJffFtDpTAHnbnxh1CvjB0PlrPh67/eGxOI=; h=From:To:Cc:Subject:Date:From; b=lROlEqp2tRShOPLi2z1Lzdbxdo7RGGFvvBWHKsbXsggJabg6dZ59ceumlJnlNmu0u kikVcOk10mddRt56shzKVLe2BHZNXCdOeq0QrhJ8U9NtbcQSL5euGlZ4QORAbl8ljf nhLojOnHouriL5bS8IwTAFfBuWQui+ZfHGOyusDQ= Received: from bcacpedev-irv-3.lvn.broadcom.net (bcacpedev-irv-3.lvn.broadcom.net [10.173.232.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail-lvn-it-01.lvn.broadcom.net (Postfix) with ESMTPSA id D5FBF18041CAC4; Thu, 22 Feb 2024 19:48:11 -0800 (PST) From: William Zhang To: Linux MTD List , Linux ARM List , Broadcom Kernel List Cc: f.fainelli@gmail.com, kursad.oney@broadcom.com, joel.peshkin@broadcom.com, anand.gore@broadcom.com, dregan@mail.com, kamal.dasu@broadcom.com, tomer.yacoby@broadcom.com, dan.beygelman@broadcom.com, William Zhang , Andre Przywara , Rob Herring , Kamal Dasu , Conor Dooley , Krzysztof Kozlowski , Miquel Raynal , =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= , David Regan , devicetree@vger.kernel.org, Alexandre TORGUE , Vignesh Raghavendra , Brian Norris , Florian Fainelli , Shawn Guo , linux-kernel@vger.kernel.org, Richard Weinberger Subject: [PATCH v6 00/13] mtd: rawnand: brcmnand: driver and doc updates Date: Thu, 22 Feb 2024 19:47:45 -0800 Message-Id: <20240223034758.13753-1-william.zhang@broadcom.com> X-Mailer: git-send-email 2.37.3 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit This patch series is an update from the previous version [1] after exex_op support and fixes (patch 1 to 4 from the previous version.) It updates all the BCMBCA SoC to support the nand controller and add functions to handle BCMBCA specific needs on ECC and Write Protection usage. The device tree document is also updated accordingly with the new properties needed by the driver. In addition there is a bug fix for exec_op helper functions, log level adjustment on uncorrectable ECC error and some coding style fixes. [1] https://lore.kernel.org/lkml/20230606231252.94838-1-william.zhang@broadcom.com/ Changes in v6: - Moved style fixes to a separate patch - Fix style issue - Add reviewed-by tags - Add other nand ecc properties to the exclude check list - Update the brcm,nand-ecc-use-strap property description - Combine the ecc step size and ecc strength into one get function - Treat it as error condition if both brcm,nand-ecc-use-strap and nand ecc dts properties are set - Add intermediate steps to get the sector size bitfield Changes in v5: - Update the commit message - Add reviewed-by tag - Update the description of this new property - Update the description for this ecc strap property - Add check to make sure brcm,nand-ecc-use-strap and nand-ecc-strength/brcm,nand-oob-sector-size can not be used at the same time Changes in v4: - Fix the commit id in the fixes tag - Revert the log level change for correctable ecc error - Split the yaml changes into three patches. This is the first one - Move the WP pin property to this separate patch and change it to boolean type. - Move ecc strap property to this separate patch and remove some non-binding related text from the description - Move the board related dts setting from SoC dtsi to board dts - Move the board related dts setting from SoC dtsi to board dts - Update the comments for ecc setting selection - Use the new brcm,wp-not-connected property based on the dts binding change Changes in v3: - Update brcm,nand-use-wp description - Revert the description change to BCM63168 SoC-specific NAND controller - Updated bcmbca_read_data_bus comment Changes in v2: - Added to patch series - Added to patch series - Revert the new compatible string nand-bcmbca - Drop the BCM63168 compatible fix to avoid any potential ABI incompatibility issue - Simplify the explanation for brcm,nand-use-wp - Keep the interrupt name requirement when interrupt number is specified - Add nand controller node label for 4908 so it is consistent with other SoCs and can be referenced by board dts file - Drop the is_param argument to the read data bus function now that we have the exec_op API to read the parameter page and ONFI data - Remove be32_to_cpu from brcmnand_read_data_bus - Minor cosmetic fixes David Regan (2): mtd: rawnand: brcmnand: exec_op helper functions return type fixes mtd: rawnand: brcmnand: update log level messages William Zhang (11): mtd: rawnand: brcmnand: fix style issues dt-bindings: mtd: brcmnand: Updates for bcmbca SoCs dt-bindings: mtd: brcmnand: Add WP pin connection property dt-bindings: mtd: brcmnand: Add ecc strap property ARM: dts: broadcom: bcmbca: Add NAND controller node arm64: dts: broadcom: bcmbca: Add NAND controller node arm64: dts: broadcom: bcmbca: Update router boards mtd: rawnand: brcmnand: Rename bcm63138 nand driver mtd: rawnand: brcmnand: Add BCMBCA read data bus interface mtd: rawnand: brcmnand: Add support for getting ecc setting from strap mtd: rawnand: brcmnand: Support write protection setting from dts .../bindings/mtd/brcm,brcmnand.yaml | 44 +++++- arch/arm/boot/dts/broadcom/bcm47622.dtsi | 14 ++ arch/arm/boot/dts/broadcom/bcm63138.dtsi | 7 +- arch/arm/boot/dts/broadcom/bcm63148.dtsi | 14 ++ arch/arm/boot/dts/broadcom/bcm63178.dtsi | 14 ++ arch/arm/boot/dts/broadcom/bcm6756.dtsi | 14 ++ arch/arm/boot/dts/broadcom/bcm6846.dtsi | 14 ++ arch/arm/boot/dts/broadcom/bcm6855.dtsi | 14 ++ arch/arm/boot/dts/broadcom/bcm6878.dtsi | 14 ++ arch/arm/boot/dts/broadcom/bcm947622.dts | 10 ++ arch/arm/boot/dts/broadcom/bcm963138.dts | 10 ++ arch/arm/boot/dts/broadcom/bcm963138dvt.dts | 14 +- arch/arm/boot/dts/broadcom/bcm963148.dts | 10 ++ arch/arm/boot/dts/broadcom/bcm963178.dts | 10 ++ arch/arm/boot/dts/broadcom/bcm96756.dts | 10 ++ arch/arm/boot/dts/broadcom/bcm96846.dts | 10 ++ arch/arm/boot/dts/broadcom/bcm96855.dts | 10 ++ arch/arm/boot/dts/broadcom/bcm96878.dts | 10 ++ .../bcmbca/bcm4906-netgear-r8000p.dts | 5 + .../bcmbca/bcm4906-tplink-archer-c2300-v1.dts | 5 + .../bcmbca/bcm4908-asus-gt-ac5300.dts | 6 +- .../boot/dts/broadcom/bcmbca/bcm4908.dtsi | 4 +- .../boot/dts/broadcom/bcmbca/bcm4912.dtsi | 14 ++ .../boot/dts/broadcom/bcmbca/bcm63146.dtsi | 14 ++ .../boot/dts/broadcom/bcmbca/bcm63158.dtsi | 14 ++ .../boot/dts/broadcom/bcmbca/bcm6813.dtsi | 14 ++ .../boot/dts/broadcom/bcmbca/bcm6856.dtsi | 14 ++ .../boot/dts/broadcom/bcmbca/bcm6858.dtsi | 14 ++ .../boot/dts/broadcom/bcmbca/bcm94908.dts | 10 ++ .../boot/dts/broadcom/bcmbca/bcm94912.dts | 10 ++ .../boot/dts/broadcom/bcmbca/bcm963146.dts | 10 ++ .../boot/dts/broadcom/bcmbca/bcm963158.dts | 10 ++ .../boot/dts/broadcom/bcmbca/bcm96813.dts | 10 ++ .../boot/dts/broadcom/bcmbca/bcm96856.dts | 10 ++ .../boot/dts/broadcom/bcmbca/bcm96858.dts | 10 ++ drivers/mtd/nand/raw/brcmnand/Makefile | 2 +- drivers/mtd/nand/raw/brcmnand/bcm63138_nand.c | 99 ------------ drivers/mtd/nand/raw/brcmnand/bcmbca_nand.c | 126 +++++++++++++++ drivers/mtd/nand/raw/brcmnand/brcmnand.c | 148 ++++++++++++++---- drivers/mtd/nand/raw/brcmnand/brcmnand.h | 2 + 40 files changed, 650 insertions(+), 144 deletions(-) delete mode 100644 drivers/mtd/nand/raw/brcmnand/bcm63138_nand.c create mode 100644 drivers/mtd/nand/raw/brcmnand/bcmbca_nand.c -- 2.37.3