From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id AF447C4332F for ; Tue, 8 Nov 2022 15:28:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234286AbiKHP21 (ORCPT ); Tue, 8 Nov 2022 10:28:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51542 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233525AbiKHP2Y (ORCPT ); Tue, 8 Nov 2022 10:28:24 -0500 Received: from mail-lj1-x233.google.com (mail-lj1-x233.google.com [IPv6:2a00:1450:4864:20::233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 18E182C8 for ; Tue, 8 Nov 2022 07:28:22 -0800 (PST) Received: by mail-lj1-x233.google.com with SMTP id a15so21628463ljb.7 for ; Tue, 08 Nov 2022 07:28:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=rYyQ/3KwA5SEi7xobmtMHnwgbg0DrEr9YUI+FxITXks=; b=oudhA7iWo073iyyJQt8Okd+b8G1K6VItNkGt4/f1tP4fNyw46cvITxgr/evZp9ORvq rkKqlTFcDHk+3t7el5VIFhrrAQngAPgr6QOO+cfQayIr194tPIilrMUubBSC9iSNv2N4 gaptbtSKej2YQ0XMaua2sSnq2tBBTPd+6XX9IJoVzAU8xWAzvjeKyZccNt9GKW6RNjmF BfKHbhmOe5/2s67vZQyjBLFMoJ/A8AWZnLZ53XhvDY+3kWHsxDxQ8aoRlTd1TincoTZP c36QC8Cuzfa3bxTExcAgxbvK3Wu6BxjKMvIwuVPxDs5fcl8yslN13jt8lb0JUOP7udjN 8Fgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=rYyQ/3KwA5SEi7xobmtMHnwgbg0DrEr9YUI+FxITXks=; b=JbivZ7a+Ws/MypGupDYjKM8/AkgvX7fum0hakMS7cDAfPjCbkK2IPEENuou2I3fn1i fp3vMMun8Mmzl+q6T+31ibF+KOV92niSByiCnoLXe7HvJpXbHlQLG11mGwGJWS74XWnn ZcexK5+e6BU/w7OAp7vqbBBOAqF5Dl7/erVMfWAxKQb8sr4nzbESLX4ntbuzYqD6X9N5 mQn4eJcdi78YyjIlRb5xd/H3QI23KRKtC4K5rtRTgaMFdCKxf9fPaT2CXJblXWCI+IwN GPO2NtjP4iMSallI2YswpHJnjTOzIlvdcBaPLKDN9G/NDrAGzaxItIK3aecQ5YYrAf5Z zqAQ== X-Gm-Message-State: ACrzQf27tf22VpGouMmzzg14lA8kYZpxaRMKLKKhqaMNFzzvJj/OfuXr 6roMi9JLEZX2K/7gZOPaI6PvFQ== X-Google-Smtp-Source: AMsMyM7azffc3j7n0RlXzVVXhr4h6KU9GBtHDPvSR1EQLGZAnoaDtp1H2k8dV1j18dnuFx2eTd4lcw== X-Received: by 2002:a05:651c:88a:b0:26c:81e1:57dc with SMTP id d10-20020a05651c088a00b0026c81e157dcmr21276405ljq.236.1667921300408; Tue, 08 Nov 2022 07:28:20 -0800 (PST) Received: from [192.168.0.20] (088156142199.dynamic-2-waw-k-3-2-0.vectranet.pl. [88.156.142.199]) by smtp.gmail.com with ESMTPSA id s2-20020a05651c048200b0026fc79fd67dsm1777329ljc.74.2022.11.08.07.28.19 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 08 Nov 2022 07:28:19 -0800 (PST) Message-ID: Date: Tue, 8 Nov 2022 16:28:18 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: [PATCH v1 2/2] dt-bindings: gpio: add loongson series gpio Content-Language: en-US To: Yinbo Zhu , Linus Walleij , Bartosz Golaszewski , Rob Herring , Krzysztof Kozlowski , WANG Xuerui , Jiaxun Yang , Thomas Bogendoerfer , Juxin Gao , Bibo Mao , Yanteng Si , linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, loongarch@lists.linux.dev, linux-mips@vger.kernel.org, richard.liu@st.com, Arnaud Patard , Hongbing Hu , Huacai Chen References: <20221108092107.28996-1-zhuyinbo@loongson.cn> <20221108092107.28996-2-zhuyinbo@loongson.cn> From: Krzysztof Kozlowski In-Reply-To: <20221108092107.28996-2-zhuyinbo@loongson.cn> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org On 08/11/2022 10:21, Yinbo Zhu wrote: > Add the Loongson series gpio binding with DT schema format using > json-schema. > > Signed-off-by: Yinbo Zhu > --- > .../bindings/gpio/loongson,ls-gpio.yaml | 154 ++++++++++++++++++ > MAINTAINERS | 11 ++ > 2 files changed, 165 insertions(+) > create mode 100644 Documentation/devicetree/bindings/gpio/loongson,ls-gpio.yaml > > diff --git a/Documentation/devicetree/bindings/gpio/loongson,ls-gpio.yaml b/Documentation/devicetree/bindings/gpio/loongson,ls-gpio.yaml > new file mode 100644 > index 000000000000..9d335262ddcc > --- /dev/null > +++ b/Documentation/devicetree/bindings/gpio/loongson,ls-gpio.yaml > @@ -0,0 +1,154 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/gpio/loongson,ls-gpio.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Loongson series GPIO controller. > + > +maintainers: > + - Yinbo Zhu > + > +properties: > + compatible: > + enum: > + - loongson,ls2k-gpio > + - loongson,ls7a-gpio > + > + reg: > + maxItems: 1 > + > + ngpios: true minimum? maximum? > + > + "#gpio-cells": > + const: 2 > + > + gpio-controller: true > + > + gpio-ranges: true > + > + loongson,conf_offset: No underscores in node names. Plus comments from Linus seem to apply here as well. Drop it entirely or explain why this is not part of compatible, why this is needed and why encoding programming model address in DT matches the DT... > + $ref: /schemas/types.yaml#/definitions/uint32 > + description: > + This option indicate this GPIO configuration offset address. > + > + loongson,out_offset: > + $ref: /schemas/types.yaml#/definitions/uint32 > + description: > + This option indicate this GPIO output value offset address. Drop > + > + loongson,in_offset: > + $ref: /schemas/types.yaml#/definitions/uint32 > + description: > + This option indicate this GPIO input value offset address. Drop > + > + loongson,gpio_base: > + $ref: /schemas/types.yaml#/definitions/uint32 > + description: > + This option indicate the first GPIO number in this node. Drop > + > + loongson,support_irq: > + $ref: /schemas/types.yaml#/definitions/flag > + description: > + This option indicate this GPIO whether support interrupt. Drop > + > + interrupts: > + minItems: 1 > + maxItems: 64 > + > +required: > + - compatible > + - reg > + - ngpios > + - "#gpio-cells" > + - gpio-controller > + - gpio-ranges > + - interrupts > + > +additionalProperties: false > + > +examples: > + - | > + #include > + > + gpio0: gpio@1fe00500 { > + compatible = "loongson,ls2k-gpio"; > + reg = <0x1fe00500 0x38>; > + ngpios = <64>; > + #gpio-cells = <2>; > + gpio-controller; > + gpio-ranges = <&pctrl 0 0 15>, > + <&pctrl 16 16 15>, > + <&pctrl 32 32 10>, > + <&pctrl 44 44 20>; > + loongson,conf_offset = <0>; > + loongson,out_offset = <0x10>; > + loongson,in_offset = <0x20>; > + loongson,gpio_base = <0>; > + loongson,support_irq; > + interrupt-parent = <&liointc1>; > + interrupts = <28 IRQ_TYPE_LEVEL_LOW>, > + <29 IRQ_TYPE_LEVEL_LOW>, > + <30 IRQ_TYPE_LEVEL_LOW>, > + <30 IRQ_TYPE_LEVEL_LOW>, > + <26 IRQ_TYPE_LEVEL_LOW>, > + <26 IRQ_TYPE_LEVEL_LOW>, > + <26 IRQ_TYPE_LEVEL_LOW>, > + <26 IRQ_TYPE_LEVEL_LOW>, > + <26 IRQ_TYPE_LEVEL_LOW>, > + <26 IRQ_TYPE_LEVEL_LOW>, > + <26 IRQ_TYPE_LEVEL_LOW>, > + <26 IRQ_TYPE_LEVEL_LOW>, > + <26 IRQ_TYPE_LEVEL_LOW>, > + <26 IRQ_TYPE_LEVEL_LOW>, > + <26 IRQ_TYPE_LEVEL_LOW>, > + <>, > + <26 IRQ_TYPE_LEVEL_LOW>, > + <26 IRQ_TYPE_LEVEL_LOW>, > + <26 IRQ_TYPE_LEVEL_LOW>, > + <26 IRQ_TYPE_LEVEL_LOW>, > + <26 IRQ_TYPE_LEVEL_LOW>, > + <26 IRQ_TYPE_LEVEL_LOW>, > + <26 IRQ_TYPE_LEVEL_LOW>, > + <26 IRQ_TYPE_LEVEL_LOW>, > + <26 IRQ_TYPE_LEVEL_LOW>, > + <26 IRQ_TYPE_LEVEL_LOW>, > + <26 IRQ_TYPE_LEVEL_LOW>, > + <26 IRQ_TYPE_LEVEL_LOW>, > + <26 IRQ_TYPE_LEVEL_LOW>, > + <26 IRQ_TYPE_LEVEL_LOW>, > + <26 IRQ_TYPE_LEVEL_LOW>, > + <26 IRQ_TYPE_LEVEL_LOW>, > + <27 IRQ_TYPE_LEVEL_LOW>, > + <27 IRQ_TYPE_LEVEL_LOW>, > + <27 IRQ_TYPE_LEVEL_LOW>, > + <27 IRQ_TYPE_LEVEL_LOW>, > + <27 IRQ_TYPE_LEVEL_LOW>, > + <>, What's this? > + <27 IRQ_TYPE_LEVEL_LOW>, > + <27 IRQ_TYPE_LEVEL_LOW>, > + <27 IRQ_TYPE_LEVEL_LOW>, > + <27 IRQ_TYPE_LEVEL_LOW>, > + <>, > + <>, What's this? > + <27 IRQ_TYPE_LEVEL_LOW>, > + <27 IRQ_TYPE_LEVEL_LOW>, > + <27 IRQ_TYPE_LEVEL_LOW>, > + <27 IRQ_TYPE_LEVEL_LOW>, > + <27 IRQ_TYPE_LEVEL_LOW>, > + <27 IRQ_TYPE_LEVEL_LOW>, > + <27 IRQ_TYPE_LEVEL_LOW>, > + <27 IRQ_TYPE_LEVEL_LOW>, > + <27 IRQ_TYPE_LEVEL_LOW>, > + <27 IRQ_TYPE_LEVEL_LOW>, > + <27 IRQ_TYPE_LEVEL_LOW>, > + <27 IRQ_TYPE_LEVEL_LOW>, > + <27 IRQ_TYPE_LEVEL_LOW>, > + <27 IRQ_TYPE_LEVEL_LOW>, > + <27 IRQ_TYPE_LEVEL_LOW>, > + <27 IRQ_TYPE_LEVEL_LOW>, > + <27 IRQ_TYPE_LEVEL_LOW>, > + <27 IRQ_TYPE_LEVEL_LOW>, > + <27 IRQ_TYPE_LEVEL_LOW>, > + <27 IRQ_TYPE_LEVEL_LOW>; > + }; > diff --git a/MAINTAINERS b/MAINTAINERS > index 916b2d9cffc0..878b8320ac3b 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -12048,6 +12048,17 @@ S: Maintained > F: Documentation/devicetree/bindings/hwinfo/loongson,ls2k-chipid.yaml > F: drivers/soc/loongson/loongson2_guts.c > > +LOONGSON SERIES GPIO DRIVER > +M: Richard Liu, STMicroelectronics > +M: Arnaud Patard > +M: Hongbing Hu > +M: Huacai Chen > +M: Yinbo Zhu Are they all maintainers of this driver? > +L: linux-gpio@vger.kernel.org > +S: Maintained > +F: Documentation/devicetree/bindings/gpio/loongson,ls-gpio.yaml > +F: drivers/gpio/gpio-loongson.c > + > LSILOGIC MPT FUSION DRIVERS (FC/SAS/SPI) > M: Sathya Prakash > M: Sreekanth Reddy Best regards, Krzysztof