Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1874558imu; Fri, 14 Dec 2018 02:01:27 -0800 (PST) X-Google-Smtp-Source: AFSGD/UXVMUsPVYMe7D1lQSZ1pOuZopWPcosKTwIl8OyXYFW5UpDOARA2ehxhWJ0L/8h7FZmG/7G X-Received: by 2002:a63:fc49:: with SMTP id r9mr2050838pgk.209.1544781687066; Fri, 14 Dec 2018 02:01:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544781687; cv=none; d=google.com; s=arc-20160816; b=kwtcwWepqwzM9+e/o/ENa2+mwe3DK0SHMFre9tZTIsYxIQa2liw7Gi0vywVfXTc9kJ tmtnTLuvpXaG85pw+JQgNo0HshrO1YF1R1e6P4B1TijSQ6vsukysT6Df4HZ3PikbYV0y hPdrm8nVSQSBqKisOr1hJvlMdGSk/T0RNbpUolkDR6lI4/Rru5WddgBWctordgF1RRik HRDLHdMFTvB9+z4RalfFqR6MBrATV13mupNZT9OvJ601yCa1OwJLkGt+Jv4Zc/AY7x3o vMHj0VN2tY2sturk7mVQCxmHg+//K6RUECmkp8LS9n3SYmQfz2M7xBS9fuSZRvmG4GLZ bFwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=Jwa8MN8jm9Mv6lZyb8HAleANXoBXeSa4fObYjdhWJhA=; b=A3nkfGF4EKPzwAElLYYlUrp4vmr763WAQojdL4BvOoAbIYg2Rc1FU+P9IEKdApO4DU 2we4+MbhSc4kV/kRwLTJwmDE0exlGDXjXLvPP5sv5UkuI0KfvF59kIzkJracLTrCyRmI HC2uQv1yxm8ax0a1GcAGXeyKnkRjkG3NPtlTd2u899KRJL1WjHx44Lq5Kh4QyWiL6Ztw UkZvIPvmCZ3ZUNJkAMd/7kdwGSykbie/l1yLq0hvz9cukZI5HOANBVuF4hZQYBHhLOYC AfYKGuJp3gkeR1dsy2vwfdC7rE/5TYaRHj0TjAlFB+bJHK6I84OvNA0aDo8R4p2JTlTA 0uTw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k11si3688144pgh.132.2018.12.14.02.01.11; Fri, 14 Dec 2018 02:01:27 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728958AbeLNJ7I (ORCPT + 99 others); Fri, 14 Dec 2018 04:59:08 -0500 Received: from mx08-00178001.pphosted.com ([91.207.212.93]:42894 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728184AbeLNJ7I (ORCPT ); Fri, 14 Dec 2018 04:59:08 -0500 Received: from pps.filterd (m0046661.ppops.net [127.0.0.1]) by mx08-00178001.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id wBE9uw0T012174; Fri, 14 Dec 2018 10:58:19 +0100 Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx08-00178001.pphosted.com with ESMTP id 2p85qkjk7r-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 14 Dec 2018 10:58:19 +0100 Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 9C4033A; Fri, 14 Dec 2018 09:58:17 +0000 (GMT) Received: from Webmail-eu.st.com (sfhdag6node2.st.com [10.75.127.17]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 5DC602B44; Fri, 14 Dec 2018 09:58:17 +0000 (GMT) Received: from localhost (10.75.127.46) by SFHDAG6NODE2.st.com (10.75.127.17) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Fri, 14 Dec 2018 10:58:16 +0100 From: Christophe Kerello To: , , , , , , , CC: , , , , Christophe Kerello Subject: [PATCH v4 0/3] mtd: rawnand: add STM32 FMC2 NAND flash controller driver Date: Fri, 14 Dec 2018 10:58:05 +0100 Message-ID: <1544781488-18723-1-git-send-email-christophe.kerello@st.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.75.127.46] X-ClientProxiedBy: SFHDAG7NODE3.st.com (10.75.127.21) To SFHDAG6NODE2.st.com (10.75.127.17) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-12-14_04:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patchset adds the support for the STMicroelectronics FMC2 NAND flash controller found on STM32MP SOCs. This patchset supports: - the command sequencer feature, a hardware accelerator for read/write within a page - the manual mode feature, useful for debug purpose - a maximum 8k page size - following ECC strength and step size - nand-ecc-strength = <8>, nand-ecc-step-size = <512> (BCH8) - nand-ecc-strength = <4>, nand-ecc-step-size = <512> (BCH4) - nand-ecc-strength = <1>, nand-ecc-step-size = <512> (Extended ecc based on HAMMING) This patchset has been tested on Micron MT29F8G08ABACAH4 (8-bit SLC NAND) and MT29F8G16ABACAH4 (16-bit SLC NAND) Changes v4: - rebase on nand/next - replace "manual mode" by "polling mode" Changes v3: - modify clocks property description - add NAND reg property description - stm32_fmc2_nfc inherits from nand_controller structure - rewrite stm32_fmc2_read_data/stm32_fmc2_write_data functions to handle aligned and not aligned buffers - replace uint8_t by u8 - use of NAND_ROW_ADDR_3 option Changes v2: - separate the controller structure and the NAND chip structure - remove timings description from the device tree - fix typo issues - fix kbuildrobot issues Christophe Kerello (3): dt-bindings: mtd: stm32_fmc2: add STM32 FMC2 NAND controller documentation mtd: rawnand: stm32_fmc2: add STM32 FMC2 NAND flash controller driver mtd: rawnand: stm32_fmc2: add polling mode .../devicetree/bindings/mtd/stm32-fmc2-nand.txt | 61 + drivers/mtd/nand/raw/Kconfig | 9 + drivers/mtd/nand/raw/Makefile | 1 + drivers/mtd/nand/raw/stm32_fmc2_nand.c | 2073 ++++++++++++++++++++ 4 files changed, 2144 insertions(+) create mode 100644 Documentation/devicetree/bindings/mtd/stm32-fmc2-nand.txt create mode 100644 drivers/mtd/nand/raw/stm32_fmc2_nand.c -- 1.9.1