Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp4457225rdb; Mon, 11 Dec 2023 22:52:32 -0800 (PST) X-Google-Smtp-Source: AGHT+IEZOe8CxO3oJSEJK/B5o5PGOB69K+Qcr6VizAIePM8pIEph6cZm0YpnF0Lq2wuwF5vKrSlx X-Received: by 2002:a05:6871:28a8:b0:1ff:a94:eb51 with SMTP id bq40-20020a05687128a800b001ff0a94eb51mr6767881oac.52.1702363952324; Mon, 11 Dec 2023 22:52:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702363952; cv=none; d=google.com; s=arc-20160816; b=vr4jxsI+IIuU+VqMRltcgJH841wJ6f/ft2gog4IG/pUTGz7cdEI4+8JBr2BUsQCHb4 mDyinPffXSamBdGgu8h8FrbhmlTHGK4z+SQYJFLuJIxH5BI2twYv9HXxbG6qpkzid9ha ORut1Wahp5EBuV0iGMi+u2qxiQ0jMgjypj16V8cZMXrcCS1gZmtlqug6NuHjKfW1uaWp 8aZsWZyo0GL6becNRn9kYL3Z6JVxBOcLWhr5rL7rgXuNwXzrSGBuDrZIQ2GJax1iwwWA 4HuA3f60SedfAt5agBHSjjoxMI0FJwZzlOZ5sQQnM+ZLGBD6ulDeKKy2JLqlXWsSblxr 3tUQ== 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=kTf2cuqewiPrk1RQQoqt4/IkxJXXPXtDeMWQFMEZ4Hw=; fh=c7uYJg4ItXuxUI2L7kaN94XHCDKWJ37ZMZtdSzuEeW0=; b=vYGNeuv1U/vyQzdYrV2h6dq1tk/ZrCx2aELgfJoX2kNQftEGYi5sdZAOU9qeByORMR xre4Ql9Px+Gleq2kjx2kJmuwWVzwvostonC0BUoMBgAKbWPt8keKPsHc/wr3Z5pm3ptJ l3jZj8vddtxDmyb67Z18NcjnxrzWqr8eukFTrzwGmGeREA6Apeu9ZlBr774r2SoGE+d5 0BBTAKDLR+r0E7x4ItBZ/kJxNbFCVO8/HuVFXK70SYiXgIji+1irQaxXf27EZb1P8S9O tSciJPsPPHNYJ/4oZ0EKeT3O2ST1nSwe+M5P5PezDnpb5G3zCk3HgdFlwJspM76kKpX2 iZcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=BciUfiVA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 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 howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id m7-20020a635807000000b005bdf5961826si7173778pgb.136.2023.12.11.22.52.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Dec 2023 22:52:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=BciUfiVA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 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 howler.vger.email (Postfix) with ESMTP id 9BFE98043D7D; Mon, 11 Dec 2023 22:52:29 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230259AbjLLGwM (ORCPT + 99 others); Tue, 12 Dec 2023 01:52:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33998 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229449AbjLLGwL (ORCPT ); Tue, 12 Dec 2023 01:52:11 -0500 Received: from mail-pf1-x436.google.com (mail-pf1-x436.google.com [IPv6:2607:f8b0:4864:20::436]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6D2BECF; Mon, 11 Dec 2023 22:52:13 -0800 (PST) Received: by mail-pf1-x436.google.com with SMTP id d2e1a72fcca58-6ce76f0748fso3297250b3a.2; Mon, 11 Dec 2023 22:52:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1702363933; x=1702968733; 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=kTf2cuqewiPrk1RQQoqt4/IkxJXXPXtDeMWQFMEZ4Hw=; b=BciUfiVAH1RYlbWfBBlo9EoUX6YqvMl3OI0Eu+YkOkg56k2tWlk2JKQF4qT2JGIA8J SZGLPnkhgBDKh9yJw4vlVUSoH/j4vtBHNxl6EcrTBz9nFEApHEbx3an3XvAgI27VapRx ePymwYN6OQSrHkBfciFT2nFDk9hikTid/824bsEReTHOMkrqXCdRVh6+b6ZG8BL0eHJa AxWDRtRf3hzsAY9eEk3v7c4jdO1wlDSLXwplMaemUs3b136/WjpVsijoqZQ+6PkR//x4 7XmXW3peD4DX2IZ3InvmJYrv/pIYbBLg6N9kuXM/i2cjlrLQdgdRkduPJX0R8Xed0jRx hfvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702363933; x=1702968733; 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=kTf2cuqewiPrk1RQQoqt4/IkxJXXPXtDeMWQFMEZ4Hw=; b=kR8LZaiIiM/3oi5RwoHsd7qxyvzKe2/LZr5X6NX+5I6F60c5i00l/o5X1c4jkLqCHT QdrIFqHUleIe/+q7ExPkY6wK6zXXeCx0frBbiTYTysfZ1+c9GvrNvRkG0W0W9hYDj25Z pSz5oNMXAgJBCnufWi7ra66U8qU/FJDz9FigZ1JZt7TADfuRDoXNx/wv0pT1uFugMQfk lRiGdgVqOAD1oZ3FgYnEiU8wgvN0o+M8saeKVhJaUYzoFQ6IRl3YR40mHKOvBi9ClIKJ OnAK6jZEno8tRS8oZhZDH3gKcVXWTlLlpXBbpRmIZwqz8th5yyF0ukmo886I9ktSF874 fvzg== X-Gm-Message-State: AOJu0Yz9sdcbzOoNV86hs0eoc1/0gQulFkfCt6cH8ZiwiH2rPV+K8Oiv KWWpCLis4W59CdiIlVRmIIk= X-Received: by 2002:a05:6a21:999d:b0:18f:fb0d:e961 with SMTP id ve29-20020a056a21999d00b0018ffb0de961mr3104973pzb.60.1702363932793; Mon, 11 Dec 2023 22:52:12 -0800 (PST) Received: from localhost.localdomain ([1.200.151.130]) by smtp.gmail.com with ESMTPSA id z3-20020a170903018300b001d0c4869725sm7855221plg.97.2023.12.11.22.52.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Dec 2023 22:52:12 -0800 (PST) From: Jim Liu To: jim.t90615@gmail.com, JJLIU0@nuvoton.com, KWLIU@nuvoton.com, linus.walleij@linaro.org, brgl@bgdev.pl, andy@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org Cc: linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, openbmc@lists.ozlabs.org Subject: [PATCH v9 0/3] Add Nuvoton NPCM SGPIO feature Date: Tue, 12 Dec 2023 14:51:44 +0800 Message-Id: <20231212065147.3475413-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=2.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_SBL_CSS, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: ** X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.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 (howler.vger.email [0.0.0.0]); Mon, 11 Dec 2023 22:52:29 -0800 (PST) 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 | 7 + drivers/gpio/Makefile | 1 + drivers/gpio/gpio-npcm-sgpio.c | 635 ++++++++++++++++++ 5 files changed, 753 insertions(+) create mode 100644 Documentation/devicetree/bindings/gpio/nuvoton,sgpio.yaml create mode 100644 drivers/gpio/gpio-npcm-sgpio.c -- 2.25.1