Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp4159806rwb; Mon, 31 Jul 2023 02:21:09 -0700 (PDT) X-Google-Smtp-Source: APBJJlHTrMy0hZBjCvfpT6wZsgUix8QU+Ip4tkAS1fm0tog90JmMOF85OXSRmY/GEcTQL28b3c94 X-Received: by 2002:a05:6808:1709:b0:3a4:1f0f:d108 with SMTP id bc9-20020a056808170900b003a41f0fd108mr10584954oib.46.1690795268951; Mon, 31 Jul 2023 02:21:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690795268; cv=none; d=google.com; s=arc-20160816; b=CnQH0unQ22e2K9ebh4jSl+qxX2uhy7FEExKPib8gPyFNitEJpScy/4pNH007Fs0Q8O VJsg5lkaQROFTqhNLKNPspTq0yLYCin+I9PiQUyUh53R9HR354cLi/hd9jc0Rfdi+bXk fuOvah1p1s75fGxujTCLTGJNkmdzzVarQ4xDD5J0dYIXwpNS8R/BGKzEFiPJaH7Rxdk/ RkiM+MV0G+cDPQd45cqHorXKkU61CGMqZFWEHea9/L13IxvPHYeKEAO9mgsuy5wonLYF 2M1XGJk2mdsCmuFcBkzpkx9szotOXVIf8Ed9mdTs7lCGvS3nJAbadIOSsaWzrq3nN6Sd NYMg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=if7oEZQ9etOB5gTqlm3jZzW11VASvjyWK0/SiSi6dDk=; fh=teZAvrnU1k4B6t2Z9AwXPKAN+RYsEfJmvb3BgB5uIhw=; b=DHdhoN5NWgwgNjXFmIF4n5vc2DKH/aEzYnZ+H8Sl3xMH0XcMjD6upOp8xicFgD8542 caR0F4xyllJ3C8IHt/Rg4J5eNPaEWoSCRuI8R1zxdHy/mdBroaT4kjtdjN31fir4SQCe /JjtkIctDcPlkhwP1S560g1dvdBF1oakt95UO7D3Vy9z2Z5ygXrd4hP6558tepi1tZER fSfApJSGkovRZliXU09g4xS3/HMLChPZHUIWFAoQMJk13+tkwK4F5M2FlseHfj4HImyL OFDwqHuf9oEDOZbbxazg1kZBnhc2nu2SmnXhGZSnuxQ+cn314Wpm3AfDdhzVA9zalYxi sqUQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t11-20020a170902bc4b00b001bbc0ca8650si6959912plz.370.2023.07.31.02.20.56; Mon, 31 Jul 2023 02:21:08 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230451AbjGaJLX (ORCPT + 99 others); Mon, 31 Jul 2023 05:11:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42164 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229479AbjGaJLW (ORCPT ); Mon, 31 Jul 2023 05:11:22 -0400 Received: from mail.loongson.cn (mail.loongson.cn [114.242.206.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 369E4102; Mon, 31 Jul 2023 02:11:20 -0700 (PDT) Received: from loongson.cn (unknown [10.20.42.201]) by gateway (Coremail) with SMTP id _____8Bx5fC1esdkRCINAA--.31526S3; Mon, 31 Jul 2023 17:11:17 +0800 (CST) Received: from localhost.localdomain (unknown [10.20.42.201]) by localhost.localdomain (Coremail) with SMTP id AQAAf8CxriOkesdk1DFCAA--.2097S3; Mon, 31 Jul 2023 17:11:17 +0800 (CST) From: Yinbo Zhu To: Linus Walleij , Bartosz Golaszewski , Rob Herring , Krzysztof Kozlowski , Conor Dooley , linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Jianmin Lv , wanghongliang@loongson.cn, Liu Peibao , loongson-kernel@lists.loongnix.cn, Yinbo Zhu Subject: [PATCH v2 1/2] gpio: dt-bindings: add parsing of loongson gpio offset Date: Mon, 31 Jul 2023 17:10:58 +0800 Message-Id: <20230731091059.17323-2-zhuyinbo@loongson.cn> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230731091059.17323-1-zhuyinbo@loongson.cn> References: <20230731091059.17323-1-zhuyinbo@loongson.cn> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: AQAAf8CxriOkesdk1DFCAA--.2097S3 X-CM-SenderInfo: 52kx5xhqerqz5rrqw2lrqou0/ X-Coremail-Antispam: 1Uk129KBjDUn29KB7ZKAUJUUUUU529EdanIXcx71UUUUU7KY7 ZEXasCq-sGcSsGvfJ3UbIjqfuFe4nvWSU5nxnvy29KBjDU0xBIdaVrnUUvcSsGvfC2Kfnx nUUI43ZEXa7xR_UUUUUUUUU== X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,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 parsing GPIO configure, input, output, interrupt register offset address and GPIO control mode support. Signed-off-by: Yinbo Zhu --- .../bindings/gpio/loongson,ls-gpio.yaml | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/Documentation/devicetree/bindings/gpio/loongson,ls-gpio.yaml b/Documentation/devicetree/bindings/gpio/loongson,ls-gpio.yaml index fb86e8ce6349..cad67f8bfe6e 100644 --- a/Documentation/devicetree/bindings/gpio/loongson,ls-gpio.yaml +++ b/Documentation/devicetree/bindings/gpio/loongson,ls-gpio.yaml @@ -29,6 +29,33 @@ properties: gpio-ranges: true + loongson,gpio-conf-offset: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + This option indicate this GPIO configuration register offset address. + + loongson,gpio-out-offset: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + This option indicate this GPIO output register offset address. + + loongson,gpio-in-offset: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + This option indicate this GPIO input register offset address. + + loongson,gpio-ctrl-mode: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + This option indicate this GPIO control mode, where '0' represents + bit control mode and '1' represents byte control mode. + + loongson,gpio-inten-offset: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + This option indicate this GPIO interrupt enable register offset + address. + interrupts: minItems: 1 maxItems: 64 @@ -39,6 +66,11 @@ required: - ngpios - "#gpio-cells" - gpio-controller + - loongson,gpio-conf-offset + - loongson,gpio-in-offset + - loongson,gpio-out-offset + - loongson,gpio-ctrl-mode + - loongson,gpio-inten-offset - gpio-ranges - interrupts @@ -54,6 +86,11 @@ examples: ngpios = <64>; #gpio-cells = <2>; gpio-controller; + loongson,gpio-conf-offset = <0>; + loongson,gpio-in-offset = <0x20>; + loongson,gpio-out-offset = <0x10>; + loongson,gpio-ctrl-mode = <0>; + loongson,gpio-inten-offset = <0x30>; gpio-ranges = <&pctrl 0 0 15>, <&pctrl 16 16 15>, <&pctrl 32 32 10>, -- 2.20.1