Received: by 2002:a05:6358:f14:b0:e5:3b68:ec04 with SMTP id b20csp3720951rwj; Tue, 20 Dec 2022 00:35:46 -0800 (PST) X-Google-Smtp-Source: AA0mqf5DEU1japGCXdg9xbhgk3Rcl2DM0+znxN9/bfV87Qh2nbXNGr8EclYMIOvR0BjmSvvsOV8v X-Received: by 2002:a05:6a20:8b88:b0:ac:44ab:33fa with SMTP id m8-20020a056a208b8800b000ac44ab33famr51443770pzh.37.1671525346183; Tue, 20 Dec 2022 00:35:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671525346; cv=none; d=google.com; s=arc-20160816; b=m0Z4ahhOiWiZsiXIccO+cqEweumGGKPL3dFbd70vaR/Vz4LJqdDZ5AOV6OTtOgZpHl 7ReYeR22cjNwX59wsS91g9M25hpZl/Mf9lLRTXwPLvxd/nQhAh+7QXA82+Q02/S4ZLAr DgFXZdxoCxK3TY/mbDb7EZqt/OS0/U8w3VNZE6aj2EdUPERiTQUMYDBwt99WuiRLMWI7 KSka29WtxmqI5A3N0hA40R3zJrlql12Nv1KnPwJQFeUmv79FcdJdd6u/pw3gaOmFoX7W 7LLUcQ9d7gBx0OXMDdAPEWm3g0op/+90hNzFbQP8jvL8/syTvhI2KLMUQn1UB3kO5bUU W0VA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from :dkim-signature; bh=Wy1qx/0Za3zU/0a34WdVh8eP80ZwdH8mGSZrNJRldY8=; b=AlWMMss60g5AGtOapLILFa3Hb2wTYLFdGjn94COq7zzdO+miYIz5R3LAkYZCDBVcR5 FtCIDsPFrZTniehvCQlXN8kxdwsTJ7mbSbf2MB0gF474pXurmLmkLV5MdzavANkyxSOV dJlJqPywc+aLUh0y2+6e2U8/gLKzJZubw7FIs9HsH/AC/5wkvgriw8061U2JSpoViJn/ nIGZp+KHQVlZXsiyFyQSsXwQwUJCR9xbGPoxV1j6kGeg0lmEXX/idVn45T+dEo5P9BYt b620Wnl5QFUu5f3W0+GbipoWPYKLATuovFU6FOIINrIu/irTOjeLX8x9grbAkiMvXvde X36Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="HLRPvp/3"; 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=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y62-20020a638a41000000b004790f4d9ad2si13374639pgd.636.2022.12.20.00.35.36; Tue, 20 Dec 2022 00:35:46 -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=@gmail.com header.s=20210112 header.b="HLRPvp/3"; 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=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233479AbiLTICN (ORCPT + 70 others); Tue, 20 Dec 2022 03:02:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35978 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233217AbiLTIBt (ORCPT ); Tue, 20 Dec 2022 03:01:49 -0500 Received: from mail-pl1-x635.google.com (mail-pl1-x635.google.com [IPv6:2607:f8b0:4864:20::635]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 267F7F5A6; Tue, 20 Dec 2022 00:01:47 -0800 (PST) Received: by mail-pl1-x635.google.com with SMTP id u7so3302543plq.11; Tue, 20 Dec 2022 00:01:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Wy1qx/0Za3zU/0a34WdVh8eP80ZwdH8mGSZrNJRldY8=; b=HLRPvp/3RgzawnVYgVjubCWKwiwtfAHW7vZG5AQP9ZS64ljLVhYqZwE9ni9kwJkAUw ZfY5GFIb14k77B9q9rFGAa9emtAbGtc3PWkXIKxPLt4IdnG/Wyk+WmMzcYH4XUYCjoEf T7LFzbS9G2BTsTnA+tlxytOmjD3E1+/S+NJDO7U1+AFGvhjnUjsnnTVEzGXOUwAEzbxU ePgwJMSvkCpUQ47LHDO7nO2HMRcXbGlqpanpBChmhKp2VJtkjR0DXfb1XcWm9aGsZYVu o3MkOX3Ko5ctMThawLz+HtnCXEBsO7HRIYrMcs8d2RfxJTIfmm7NR9LZOLG35w9otKww 3lfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Wy1qx/0Za3zU/0a34WdVh8eP80ZwdH8mGSZrNJRldY8=; b=1XacmI+W9Mqa/LTB52ALf0P6WIOBhlBW0odpJIk9Kq6QYPBeasj1Arnuhxw+P93r4I x+wLfQXbPdRTiX0mjgOy+fFDchTWd7DtlKTve/xGGSFXQpIxV1bbaai5WAeA1vR0QRbp yab5iqmA0OrjSAkrKDlzL6RLRvAkV5yhwX7PUQeWifyJ9jwj7zplBQJMXT9gX++ngpmy gIPHpVc0iTAU0zaXFgPuLDBgUgtu6PKSUgxyWV9Xxdke2ClRZXGI6c3eho53oq+g5sYa 6bgX79RH1nAe20yt1n78P0PODMcjhhGDvzbjucGkvC7ZQ/4LLSQF3wKlgpU/AgDCE9he BV6g== X-Gm-Message-State: ANoB5plA5VbkvuZSTorC4O4U1CS5z4oNynx757pm3uNrwm67RkoZOa2J hzO1VRGr53N0s0wUKlQXxes= X-Received: by 2002:a05:6a20:6f08:b0:a2:df6d:e56b with SMTP id gt8-20020a056a206f0800b000a2df6de56bmr35561907pzb.14.1671523306671; Tue, 20 Dec 2022 00:01:46 -0800 (PST) Received: from localhost.localdomain ([180.217.146.214]) by smtp.gmail.com with ESMTPSA id u15-20020a65670f000000b00476d1385265sm7559179pgf.25.2022.12.20.00.01.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Dec 2022 00:01:46 -0800 (PST) From: Jim Liu X-Google-Original-From: Jim Liu To: JJLIU0@nuvoton.com, KWLIU@nuvoton.com, jim.t90615@gmail.com, linus.walleij@linaro.org, brgl@bgdev.pl, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org Cc: linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, openbmc@lists.ozlabs.org Subject: [PATCH v3 0/3] Add Nuvoton NPCM7xx SGPIO feature Date: Tue, 20 Dec 2022 16:01:36 +0800 Message-Id: <20221220080139.1803-1-JJLIU0@nuvoton.com> X-Mailer: git-send-email 2.17.1 X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham 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 SGPIO controller is for NUVOTON NPCM7xx and NPCM8xx SoC. Nuvoton NPCM7xx SGPIO module is combine serial to parallel IC (HC595) and parallel to serial IC (HC165), and use APB3 clock to control it. This interface has 4 pins (D_out , D_in, S_CLK, LDSH). NPCM7xx/NPCM8xx have two sgpio module each module can support up to 64 output pins,and up to 64 input pin, the pin is only for gpi or gpo. GPIO pins have sequential, First half is gpo and second half is gpi. Jim Liu (3): gpio: nuvoton: Add Nuvoton NPCM7xx sgpio driver arm: dts: nuvoton: npcm7xx: Add sgpio feature dt-bindings: gpio: add npcm7xx sgpio driver bindings .../bindings/gpio/nuvoton,sgpio.yaml | 83 +++ arch/arm/boot/dts/nuvoton-common-npcm7xx.dtsi | 30 + drivers/gpio/Kconfig | 8 + drivers/gpio/Makefile | 1 + drivers/gpio/gpio-npcm-sgpio.c | 639 ++++++++++++++++++ 5 files changed, 761 insertions(+) create mode 100644 Documentation/devicetree/bindings/gpio/nuvoton,sgpio.yaml create mode 100644 drivers/gpio/gpio-npcm-sgpio.c -- 2.17.1