Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp5135685rwb; Wed, 21 Sep 2022 03:47:10 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4le6V6gtJD2kgqvEed2jXtbR+i8Iaz/9tqDy2+puZAdEJfVywnHaoOTzigXx7KWh8BCsML X-Received: by 2002:a17:906:da86:b0:740:7120:c6e6 with SMTP id xh6-20020a170906da8600b007407120c6e6mr20434231ejb.44.1663757230662; Wed, 21 Sep 2022 03:47:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663757230; cv=none; d=google.com; s=arc-20160816; b=vgnsiY5e92A5+zIcdS9Lni0jyETvjSH+m8ChDt1R7aMFWx3kDXB/JRX4555VB2F7KP ZxRYmx2pVZoKnLQSbKJIGJdsOcE8b436jRIQ0qdctvyF3fXS8fjea+/q48WsUIXjUvI3 ooDpJwsw9E+zYuY0alSMjet+zA3b6lK4sKm0j0B8qhdxrZhlvHO1u2JnmdAtbrx/oWOa ZRSlxc6PKLp4tjf/OXlwa4qsVYQSIajtPDAMhi/CTFvvSMqoD6YYCHLxwj5fVk0pZ79X NzZYDR/qvXd0Dwn9vHgy3D7KggM1lUOL9GK1fwqg0Dw8Io+aVuR0T5C7nUM0a46BQqWt xhJw== 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; bh=81RgeLhFgxxz0vVoR+VIuzJeWm8QlxTLLVMm8V/5Crs=; b=uZlw4AOf35yIoUMfvUZ8lrdRDCGII3HvGNF3gRUyIBf1sTAKVXo7o3nKTtJGkqORWR Ek4x1aeOEs/4sPEgjkSIhPJ1wOZeeeq/l9RMTTmUS2RRKny0u4wvWyPWu7xJNOHF1EHy 2ouM8qe2br9thLlKnLfXSiN4vwwf1s+U/AVbAkzpApuZg0mqZ0IrtdXlLpy9kYa8Ogik ZmTNmcfB6MicTpe98PDFkby5gv+FNw2kqX7Cplc2h5IUZaFCdhGn6syUBR13kdMQArVQ fK6QFbeX8+/Aee5+1E8jhseDrFAiKEON+rzzRyhlTG+s4uNT7VRCU7cqY09cl86gKp7T A8Pg== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o1-20020a509b01000000b004525187513esi2007236edi.574.2022.09.21.03.46.44; Wed, 21 Sep 2022 03:47:10 -0700 (PDT) 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; 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=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231477AbiIUKSo (ORCPT + 99 others); Wed, 21 Sep 2022 06:18:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47246 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231433AbiIUKS1 (ORCPT ); Wed, 21 Sep 2022 06:18:27 -0400 X-Greylist: delayed 899 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Wed, 21 Sep 2022 03:18:23 PDT Received: from maillog.nuvoton.com (maillog.nuvoton.com [202.39.227.15]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 31B5295AF9; Wed, 21 Sep 2022 03:18:23 -0700 (PDT) Received: from NTHCCAS01.nuvoton.com (NTHCCAS01.nuvoton.com [10.1.8.28]) by maillog.nuvoton.com (Postfix) with ESMTP id E4ACF1C811BA; Wed, 21 Sep 2022 17:50:55 +0800 (CST) Received: from NTHCCAS03.nuvoton.com (10.1.20.28) by NTHCCAS01.nuvoton.com (10.1.8.28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.7; Wed, 21 Sep 2022 17:50:55 +0800 Received: from NTHCCAS04.nuvoton.com (10.1.8.29) by NTHCCAS03.nuvoton.com (10.1.20.28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1847.3; Wed, 21 Sep 2022 17:50:55 +0800 Received: from taln60.nuvoton.co.il (10.191.1.180) by NTHCCAS04.nuvoton.com (10.1.12.25) with Microsoft SMTP Server id 15.1.2176.2 via Frontend Transport; Wed, 21 Sep 2022 17:50:55 +0800 Received: by taln60.nuvoton.co.il (Postfix, from userid 10070) id 8241A62EFD; Wed, 21 Sep 2022 12:50:54 +0300 (IDT) From: Tomer Maimon To: , , , , , , , , , , CC: , , , , Tomer Maimon Subject: [PATCH v3 0/2] pinctrl: nuvoton: add pinmux and GPIO driver for NPCM8XX Date: Wed, 21 Sep 2022 12:50:51 +0300 Message-ID: <20220921095053.88658-1-tmaimon77@gmail.com> X-Mailer: git-send-email 2.33.0 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=0.5 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, FORGED_GMAIL_RCVD,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,NML_ADSP_CUSTOM_MED,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 This patch set adds pinmux and GPIO controller for the Arbel NPCM8XX Baseboard Management Controller (BMC). Arbel BMC NPCM8XX pinctrl driver based on Poleg NPCM7XX, except the pin mux mapping difference the NPCM8XX GPIO supports adjust debounce period time. Arbel BMC NPCM8XX Pinmux functions accessible only for pin groups and pin configuration parameters available only for individual pins. Arbel BMC NPCM8XX has eight identical GPIO modules, each module has 32 GPIO ports. Most of the GPIO ports are multiplexed with other system functions. The NPCM8XX pinctrl and GPIO driver were tested on NPCM845 evaluation board. Addressed comments from: - Andy Shevchenko: https://lkml.org/lkml/2022/7/14/1218 - Rob Herring: https://lkml.org/lkml/2022/7/18/1165 - Krzysztof Kozlowski: https://lkml.org/lkml/2022/9/19/68 https://lkml.org/lkml/2022/7/14/757 Changes since version 2: - Pin controller driver ? ? ? ? - Modify kernel configuration. ? ? ? ? - Adding and removing include files. ? ? ? ? - Using the same register format size. ? ? ? ? - Reducing lines by command combination. ? ? ? ? - Remove unnecessary parentheses use. ? ? ? ? - Use GENMASK and BIT macros. ? ? ? ? - Using traditional patterns. ?- Pin controller dt-binding ? ? ? ? - Modify GPIO description. ? ? ? ? - pintcrtl node name, Sorry, I know we have a long discussion about it. ? ? ? ? Still, I think the best header pinctrl node name is pinctrl@f0800000. ? ? ? ? because the pin mux is handled through the GCR. BTW, same pinctrl header name is used in the NPCM7XX pinctrl version. https://elixir.bootlin.com/linux/v6.0-rc6/source/arch/arm/boot/dts/nuvoton-common-npcm7xx.dtsi#L560 Changes since version 1: - Pin controller driver - Remove unnecessary debug prints and comments. - Use fwnode functions. - Remove Redundant 'else'. - Use switch case instead of else if. - Use GENMASK and BIT macros. - Use dev_err_probe in probe error. - Use callback GPIO range. - Add GCR phandle property. - Parameter order in reversed xmas - Pin controller dt-binding - Modify name from pin to mux. - Add phandle property. Tomer Maimon (2): dt-binding: pinctrl: Add NPCM8XX pinctrl and GPIO documentation pinctrl: nuvoton: add NPCM8XX pinctrl and GPIO driver .../pinctrl/nuvoton,npcm845-pinctrl.yaml | 213 ++ drivers/pinctrl/nuvoton/Kconfig | 14 + drivers/pinctrl/nuvoton/Makefile | 1 + drivers/pinctrl/nuvoton/pinctrl-npcm8xx.c | 2485 +++++++++++++++++ 4 files changed, 2713 insertions(+) create mode 100644 Documentation/devicetree/bindings/pinctrl/nuvoton,npcm845-pinctrl.yaml create mode 100644 drivers/pinctrl/nuvoton/pinctrl-npcm8xx.c -- 2.33.0