Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp468592pxp; Fri, 11 Mar 2022 07:53:49 -0800 (PST) X-Google-Smtp-Source: ABdhPJxyd4q6X9qPA6hoer0CmPRGGEheq5fdP86wUmBVhAsli8hgKJ1KBrfVMaFk01nNiqegKNxH X-Received: by 2002:a17:903:3112:b0:151:a940:1574 with SMTP id w18-20020a170903311200b00151a9401574mr11328768plc.63.1647014028990; Fri, 11 Mar 2022 07:53:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1647014028; cv=none; d=google.com; s=arc-20160816; b=GkpTIgqboAAJgNw9h0MhAkyt6xqgAxz0+7jYNnkSektQAyB0aeDR8beK1RzNcfQZd/ JixJNdjjbsFGL0Sjhp1tmJK9287J3QJzdl/FNC6xl3Cemz3sPUBWPUoyVKzKmwGHv3Ui toxofP37ZXtn/EElLbfTAeRd3Z1CTRL4kdqpVFlsvrdss1vylXMqfYQfEWTDpkm/pJI5 XAkTonxe1VCCw04txLGXLgA6F+PTK4KbVQB+OpeUNWB7ci/PqPSW1efZ7wtHV6P93Oml ChC6BNnuupJ4IrffZhw/1C+HQSsi8rGBivgjs6HuUiRl76v1Oc8nxRN9CKT2vm1/HyUv Ek2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from:dkim-signature; bh=FLJvetiEVjSl2Z/q1Pm7lZvV+L+ilwexJGJt6xRhYkQ=; b=N2gO5bR1OzBHX8r9j6DFk8VGNF1o18bEG8Eu2pV9VxjcUNTQ/lhJvAGa2oPu5MO1zO m1VFJOyuQKR5/Ele3Ch4P9DT3ZKkRSEw9PFNnA5HJxadjyqZVGcVNGFa3L7HoWxV8uGE 2lJ7FukYmx4hhBgdaxRPcLwCJi455LnMkSLyaPzFAzw0T1JmpRXYJ2jkpcyRPbkDVOfX VcRugsHN1ax6Slp0KlBTV+a/V73hYqZTcRTN3OCkwvdWkRrQjCSWoYunOAroBbBLjDga 17nUqj/8vJlE3ftNBb1cFsYYHfTolZN0c9xkKI+A0GB2vcqmblzLfH8PHA0exaFyrTur QdrA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=EijL8UVG; 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 ds6-20020a17090b08c600b001bed55f601dsi8449314pjb.65.2022.03.11.07.53.35; Fri, 11 Mar 2022 07:53:48 -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=EijL8UVG; 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 S241243AbiCKGSy (ORCPT + 99 others); Fri, 11 Mar 2022 01:18:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38352 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344169AbiCKGSw (ORCPT ); Fri, 11 Mar 2022 01:18:52 -0500 Received: from mail-pf1-x42d.google.com (mail-pf1-x42d.google.com [IPv6:2607:f8b0:4864:20::42d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 038A27307B; Thu, 10 Mar 2022 22:17:45 -0800 (PST) Received: by mail-pf1-x42d.google.com with SMTP id s8so7061966pfk.12; Thu, 10 Mar 2022 22:17:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=FLJvetiEVjSl2Z/q1Pm7lZvV+L+ilwexJGJt6xRhYkQ=; b=EijL8UVG0fQcWZrkhXqYaB9eHeaIkfHdSv02uOrRAK4nPXz7TwZUYqF+VlFbIxgmem 1vdVBw681p2Fpk2oFgcY5hpXanNIm8CzsdkVnTCQa4wueMS32/ROX/5uZpG/vc7HA4dj B1rmMLYxFUp2jWYwC24WtSD9duxa+6AAw8C+Nj5F4SL9mCsX7vL7vE8VzV3J2UtluQw8 L4vjt5G+isKb6PEoqdgIlyx1xUBLTW0lSVjXoJOzdygnVxFgSLvxuYYHTAzFXlhsLyAu 7xkPzlp/Y3XfX4acIzi4mGWWMN02UJ/xqF1WGRFUtCfd+ai92SpdkJD7xH7N+8hEx54K HSNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=FLJvetiEVjSl2Z/q1Pm7lZvV+L+ilwexJGJt6xRhYkQ=; b=lyNM+i7NLC0L/v2Bmxvf2/c8SkYcV8dCPUsc2h/FVQzzMhBLLIBjQi+3bQ4FLy1alZ 4P6fmmDMAZ9iudt9HbqT/9L4GqfEufYG6bsjGhXz7LwmigFyOYboRKXhecFA2mqMOvOg Z6nlgHoljXxcPusftlubwfKvnhaqm/rPldajWa1EiLCl56THxQEQBzhL7hiYQrbPlV2p JmNRwUw4DNPrVS1CJD41uULus+crUP/yaDdtbtm78s7crmw1BraJrrYRm5cVfDH0I3XT +P0kHsJmoPvqam6Bqdlk5OJWsmhSmF/5hnIQZoN6+odsUXaU5G4ZJJQQd6YQKDr7p7mD owfg== X-Gm-Message-State: AOAM530ALoUs+oNNYZZ3PyL5iG8NkHROq4LLhQMyXud27e86cdBasde/ SNcCxsrB0PKKdt3mFczxZo4= X-Received: by 2002:a05:6a00:a2a:b0:4f7:68db:5e60 with SMTP id p42-20020a056a000a2a00b004f768db5e60mr8752812pfh.58.1646979465091; Thu, 10 Mar 2022 22:17:45 -0800 (PST) Received: from localhost.localdomain ([116.89.135.255]) by smtp.gmail.com with ESMTPSA id d20-20020a056a0010d400b004f7093700c4sm9101764pfu.76.2022.03.10.22.17.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Mar 2022 22:17:44 -0800 (PST) From: jimliu2 X-Google-Original-From: jimliu2 To: JJLIU0@nuvoton.com, KWLIU@nuvoton.com, linus.walleij@linaro.org, brgl@bgdev.pl, robh+dt@kernel.org, avifishman70@gmail.com, tmaimon77@gmail.com, tali.perry1@gmail.com, venture@google.com, yuenn@google.com, benjaminfair@google.com, jim.t90615@gmail.com, CTCCHIEN@nuvoton.com Cc: linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, openbmc@lists.ozlabs.org Subject: [PATCH v1 2/3] dt-bindings: support Nuvoton sgpio Date: Fri, 11 Mar 2022 14:09:35 +0800 Message-Id: <20220311060936.10663-3-JJLIU0@nuvoton.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220311060936.10663-1-JJLIU0@nuvoton.com> References: <20220311060936.10663-1-JJLIU0@nuvoton.com> X-Spam-Status: No, score=-1.9 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, T_SCC_BODY_TEXT_LINE 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 Add nuvoton sgpio yaml in dt-bindings Signed-off-by: jimliu2 --- .../bindings/gpio/nuvoton,sgpio.yaml | 78 +++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 Documentation/devicetree/bindings/gpio/nuvoton,sgpio.yaml diff --git a/Documentation/devicetree/bindings/gpio/nuvoton,sgpio.yaml b/Documentation/devicetree/bindings/gpio/nuvoton,sgpio.yaml new file mode 100644 index 000000000000..8766e1fa4528 --- /dev/null +++ b/Documentation/devicetree/bindings/gpio/nuvoton,sgpio.yaml @@ -0,0 +1,78 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/gpio/nuvoton,sgpio.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Nuvoton SGPIO controller + +maintainers: + - Jim LIU + +description: + This SGPIO controller is for NUVOTON NPCM7xx and NPCM8xx SoC, + NPCM7xx/NPCM8xx have two sgpio module each module can support up + to 64 output pins,and up to 64 input pin. + GPIO pins can be programmed to support the following options + - Support interrupt option for each input port and various interrupt + sensitivity option (level-high, level-low, edge-high, edge-low) + - Directly connected to APB bus and its shift clock is from APB bus clock + divided by a programmable value. + - ngpios is number of nin_gpios GPIO lines and nout_gpios GPIO lines. + +properties: + compatible: + enum: + - nuvoton,npcm750-sgpio + - nuvoton,npcm845-sgpio + + reg: + maxItems: 1 + + gpio-controller: true + + '#gpio-cells': + const: 2 + + interrupts: + maxItems: 1 + + clocks: + maxItems: 1 + + nin_gpios: true + + nout_gpios: true + + bus-frequency: true + +required: + - compatible + - reg + - gpio-controller + - '#gpio-cells' + - interrupts + - nin_gpios + - nout_gpios + - clocks + - bus-frequency + +additionalProperties: false + +examples: + - | + #include + #include + sgpio1: sgpio@101000 { + compatible = "nuvoton,npcm750-sgpio"; + gpio-controller; + #gpio-cells = <2>; + interrupts = ; + reg = <0x101000 0x200>; + clocks = <&clk NPCM7XX_CLK_APB3>; + pinctrl-names = "default"; + pinctrl-0 = <&iox1_pins>; + nin_gpios = <64>; + nout_gpios = <64>; + bus-frequency = <16000000>; + }; -- 2.17.1