Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp1754909rda; Tue, 24 Oct 2023 02:07:23 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGKtZwhOkjycEoCzDAXB/lbV8SGJO7PKkd7iDY8vbTwjXSagrM/DN1NRRQC3PQqWrj0nNFv X-Received: by 2002:a92:c0c3:0:b0:350:f352:4853 with SMTP id t3-20020a92c0c3000000b00350f3524853mr12824732ilf.25.1698138443433; Tue, 24 Oct 2023 02:07:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698138443; cv=none; d=google.com; s=arc-20160816; b=ahqslnMLH7nC/H2uGSI8Ls2czbVudL/yCYVGvmb4Y0mbaGVyVQ8gNVQPSqPJkNO8pF kHgXDOldJ2c40vkE58IIOQlTcehW9e3V/nG3bzhOGaH48CQ3cpUeXYRHlV4LflZmCQRR eZYzqqRknslZ74AByfSA9mBb6rkRyYyTVKv5j6qLzfXP5I8sUgu8eK9wXAcvqy82H470 lsKCkVSkPoSEXEHbU8rwoWFaS2NeDp0+YlLqeyg8ku7HJKhsMWkLyqs4GVh0VEJ2OAml psqVhfsCdETER0/ReTTyszURVCCalWtXtfaSm/Wn96H59eei7wKMBbIdGqMHlBjFvlrx 7epg== 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:dkim-signature; bh=yDL40uP+kAC3ujsM0EdFsGaQpPzT9QQURdIX1zfn8SM=; fh=YaJPbY3Y4qpnHx/VRMQCtXxBz3zkeaFseW7qz4MXAHE=; b=zEffczXpP88fo8ngWi2NDz8RlPq9bSZzuVB8yLUTMX7QXlThFtzzDDMkFhCGxqeuDl CyYbiFt1odOUV/A/7HYRvq1Xvgit1RRhkXlHfns9o9RlvdttFRNpQMcR7sY8dOSFk8lT 95z6UnVhySQasmoTc2ABlNXRpiGKvJVhOuOo/0U1uR8Udguee2RFgckSjmqoPNH7Kp9n fYKe+KKtJQFPBn6nn0djUCwsUpGsHZN+WokKznbxBnH2AqJxe0cliSR6pYsS9xm1sPjD Fj3Qqu4WbC8XwgsyamqmzDFymJLKlOVp+2Md26ofqu69EJgiUmS0PEjas62fVxS2TUhy cZIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Wu7DaDCn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 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 lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id b69-20020a633448000000b00573fc6de956si621320pga.223.2023.10.24.02.07.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Oct 2023 02:07:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Wu7DaDCn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id EBA9F80CC10D; Tue, 24 Oct 2023 02:07:19 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233925AbjJXJHC (ORCPT + 99 others); Tue, 24 Oct 2023 05:07:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49840 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229595AbjJXJHA (ORCPT ); Tue, 24 Oct 2023 05:07:00 -0400 Received: from mail-pg1-x52b.google.com (mail-pg1-x52b.google.com [IPv6:2607:f8b0:4864:20::52b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C9FC5E8; Tue, 24 Oct 2023 02:06:58 -0700 (PDT) Received: by mail-pg1-x52b.google.com with SMTP id 41be03b00d2f7-5859d13f73dso2599477a12.1; Tue, 24 Oct 2023 02:06:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1698138418; x=1698743218; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=yDL40uP+kAC3ujsM0EdFsGaQpPzT9QQURdIX1zfn8SM=; b=Wu7DaDCnLS8i3gqtPJ3OCJzSxZCuHg49i81i7Ceo3kYIrHDyMtg1gO8a95W7jPMqL1 wHz1v/qH1VZ0zqQHh+zvbrcyEL6cxOQ4rkmLdFfm0f8Y6rXecAgaE1G1078KV6n+ZKTW L3bXsGzbjKLxvD4kzbEHpodG+KEhuDxSjZh3/LbMCnKm8kOu5gGwFtxQZJBYnuUK3cRC hZaFZeAuxcIz95ZBfAC2GX2a9O37SP0LiuMOIWP/sDjmawk7aQwTo4v/YKZQbVJ0/h8G vALYiRNQMsmhUa/Xq+BuljmYApmNQScdCvDpRBIpAbmWelM6kTR4Slcq47xqGbwX0FV2 mtlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698138418; x=1698743218; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=yDL40uP+kAC3ujsM0EdFsGaQpPzT9QQURdIX1zfn8SM=; b=Lnj4CEGRoxFyyndLDAUKZQSNAEpgklGCBBVbtcF7xPANMpFQydngebuqSPEDlCbD1z olunthskcz1e0EWwnhXjqpCZwHycUnWq/ro2nA3li1xeST5H7PRZ5N8R0lpjTjP67EE8 SciCULal3InbRZ/1OciOpXm6QzhpZG1eJbw6EJA3TI3cswQVHzg/R5HgrFLEJmYCnH79 SXx0qJ/p++65AaXG/4/rwvDWGdLBWK+T5oTVUlKMDzQAaB6a5Y+8sGE9MuF/f5fEPBgH Ug+rH7QilgdERKPGAELWc9xaH318gVe4Y8odlNWh4agLdSe5lOwBN/DPO9VAdDZOOFYN 5x1A== X-Gm-Message-State: AOJu0Yyjihgq/jPKONEOoC9AK1hAHQWUZGIwnPv1LEfE7kKMO8dY46/F o9GOMslgaMqiGOTzGXMTZ3o= X-Received: by 2002:a05:6a21:1448:b0:17a:d173:42f1 with SMTP id oc8-20020a056a21144800b0017ad17342f1mr1464806pzb.44.1698138418256; Tue, 24 Oct 2023 02:06:58 -0700 (PDT) Received: from cs20-buildserver.lan ([1.200.144.223]) by smtp.gmail.com with ESMTPSA id c24-20020a170902d91800b001c9ab91d3d7sm7055324plz.37.2023.10.24.02.06.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Oct 2023 02:06:57 -0700 (PDT) From: Jim Liu To: jim.t90615@gmail.com, JJLIU0@nuvoton.com, linus.walleij@linaro.org, krzysztof.kozlowski+dt@linaro.org, brgl@bgdev.pl Cc: linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, openbmc@lists.ozlabs.org Subject: [PATCH v6 0/3] Add Nuvoton NPCM SGPIO feature Date: Tue, 24 Oct 2023 17:06:28 +0800 Message-Id: <20231024090631.3359592-1-jim.t90615@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Tue, 24 Oct 2023 02:07:20 -0700 (PDT) This SGPIO controller is for NUVOTON NPCM7xx and NPCM8xx SoC. Nuvoton NPCM 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): dt-bindings: gpio: add NPCM sgpio driver bindings arm: dts: nuvoton: npcm: Add sgpio feature gpio: nuvoton: Add Nuvoton NPCM sgpio driver .../bindings/gpio/nuvoton,sgpio.yaml | 86 +++ .../dts/nuvoton/nuvoton-common-npcm7xx.dtsi | 24 + drivers/gpio/Kconfig | 8 + drivers/gpio/Makefile | 1 + drivers/gpio/gpio-npcm-sgpio.c | 650 ++++++++++++++++++ 5 files changed, 769 insertions(+) create mode 100644 Documentation/devicetree/bindings/gpio/nuvoton,sgpio.yaml create mode 100644 drivers/gpio/gpio-npcm-sgpio.c -- 2.25.1