From patchwork Thu Nov 24 19:13:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Jonathan_Neusch=C3=A4fer?= X-Patchwork-Id: 2200 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp3569983wrr; Thu, 24 Nov 2022 11:14:42 -0800 (PST) X-Google-Smtp-Source: AA0mqf5dp30ieFW3Czne6CngBEBBVlocNcBzbdyzOUtdzxX4Ta38AjnaNLh+9cboRGIP+C3pxMTM X-Received: by 2002:a63:4755:0:b0:477:1bf6:8b1c with SMTP id w21-20020a634755000000b004771bf68b1cmr12674060pgk.25.1669317281820; Thu, 24 Nov 2022 11:14:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669317281; cv=none; d=google.com; s=arc-20160816; b=AioIVW52UlqMmpgCYAzZNb4QnUvnCd1cT8dVzdWj2YbQDt4AQJ1DFLGK22IVjg8EC8 q1Ipiu2+UTMrnNBZvafBoT0t78EcYU3gIlOlGJVNTnwLG2rY39WyQeHoel1GaaHJ4Dqg SVAB2aY2yYhhfdhu0EF09+5ou4U/mwNDFYh2u/TJKiITO41z9mk+k3DuwTPXFQKeOILi kzOGOkYwKsZ3Ifj7pZ6uOs2jJJ6WisBvEks3i3z9asYIa2eIX9QkI0SSpSfb+ycL+mVl qFZVQ8beye9SX7H1YJeL++Wc+wqhkZwVGvfXc6GZo3FJCkt4DFv1m1R6LQGEvH1tiuP9 GM6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:ui-outboundreport:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=nDTZeoqGqa5Ghq8X2pZ5P4UZ9KmxQtslaINddKrpYs8=; b=QkQnZ0PpVxPsE4AeRa0Z8cixgKuOgeG4yEX9RMX1JbRJCKmxO93QFL1L9XigSR1LZJ LyRidW8yl98VnR+y9Hk12IFT1kzA/Su5xdYObTp3izqsuDBoC93JCLdA1Rf/ET6xk8h1 Ob+5k0LkcrukXJ8hDVB9qQDT/ktaEPQgulYxGQ+nY6Inmzfwqt1UUunQBKqxmvFv+UDn +VQwqRUiBiFDplEsT9KTYRpfHFwhCxvTY2eynN9rmfy4LzoBQPkuQAeT83/J5iWhY+qi IGbTDrSoUfe+ZeWQOFvbghs//RW7wd1cICK/t3SjAYGDVgH7thkQDqjoHNeXNOns42uu hSpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmx.net header.s=s31663417 header.b=qRDGKxIB; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmx.net Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ng15-20020a17090b1a8f00b0020c8e9efc7bsi5500003pjb.47.2022.11.24.11.14.29; Thu, 24 Nov 2022 11:14:41 -0800 (PST) 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=@gmx.net header.s=s31663417 header.b=qRDGKxIB; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmx.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229572AbiKXTOS (ORCPT + 99 others); Thu, 24 Nov 2022 14:14:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56290 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229452AbiKXTOO (ORCPT ); Thu, 24 Nov 2022 14:14:14 -0500 Received: from mout.gmx.net (mout.gmx.net [212.227.17.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A747581581; Thu, 24 Nov 2022 11:14:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=s31663417; t=1669317246; bh=NFWnNIWqkptw3ml6zf4DoZN14+tM1IwZ1YOxSQItJOg=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date; b=qRDGKxIB3KUwiyL5cPwS3qckpNr+fdytN1/q52WReVT+FHiy8go0kdxmp+Pwezs1l oYVW2FTw62eb7Dr149j4l0e2ERhEgAHAcumG0ld1tUsd1wai9z0Fh28z+kaqb4cCbC kLiZFEzjwUbnyprILH0tRR1rmzr39WmmgSN29WHwJ57+c3TqmjcPZwuli/VMAfYRBC wmWuWpu63LDxrE/LOJO4OvhpnCdXWqRATbwys3sANIpMN9d4B/Z6OOyHEyNDzZmILa GgUnCBYsWaRfaU2+FfMGK+oQ4aAP1rncZvtaFiI2+zmIe1g+teLBJowzI8mjQkPb3s VJ2ifp8f8qEPg== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from probook ([95.223.44.31]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MXXyJ-1oPM5y40J5-00Z1jI; Thu, 24 Nov 2022 20:14:06 +0100 From: =?utf-8?q?Jonathan_Neusch=C3=A4fer?= To: linux-spi@vger.kernel.org, openbmc@lists.ozlabs.org Cc: Rob Herring , Krzysztof Kozlowski , =?utf-8?q?Jonathan?= =?utf-8?q?_Neusch=C3=A4fer?= , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 0/3] Nuvoton WPCM450 FIU SPI flash controller Date: Thu, 24 Nov 2022 20:13:57 +0100 Message-Id: <20221124191400.287918-1-j.neuschaefer@gmx.net> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 X-Provags-ID: V03:K1:pxBod3xIczrwLY9Tifn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jxPv/8GtaAK4WKJwtsztTcBXbqTbqK6yk0qRYtydOBLr5nvSeiiGBnfraNht+0XC0gDVZ23F uWhoxO2ymApUbZcQkPsV11qo794JYcfi1o6MAC9yoJCWGQUizrQhzTi0dr2HC+JRMqh6iGe6y viIb3qA3hUNcaUR3IIfb3W2sPcs= X-Spam-Status: No, score=0.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2,RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1750406038313649513?= X-GMAIL-MSGID: =?utf-8?q?1750406038313649513?= This patchset adds DT bindings and a driver for the Flash Interface Unit (FIU), the SPI flash controller in the Nuvoton WPCM450 BMC SoC. It supports four chip selects, and direct (memory-mapped) access to 16 MiB per chip. Larger flash chips can be accessed by software-defined SPI transfers. The existing NPCM7xx FIU driver is sufficitently incompatible with the WPCM450 FIU that I decided to write a new driver. Changelog for v2: - Dropped the patches which have been applied in the meantime, leaving only three out of eight - Changed the binding to require both items in the reg property, because there is no need to keep the second item optional, suggested by Krzysztof Kozlowski - Various other cleanups suggested by Krzysztof Kozlowski and the kernel test robot Jonathan Jonathan Neuschäfer (3): dt-bindings: spi: Add Nuvoton WPCM450 Flash Interface Unit (FIU) spi: wpcm-fiu: Add driver for Nuvoton WPCM450 Flash Interface Unit (FIU) spi: wpcm-fiu: Add direct map support .../bindings/spi/nuvoton,wpcm450-fiu.yaml | 66 +++ drivers/spi/Kconfig | 11 + drivers/spi/Makefile | 1 + drivers/spi/spi-wpcm-fiu.c | 508 ++++++++++++++++++ 4 files changed, 586 insertions(+) create mode 100644 Documentation/devicetree/bindings/spi/nuvoton,wpcm450-fiu.yaml create mode 100644 drivers/spi/spi-wpcm-fiu.c --- 2.35.1