Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp7088472rwl; Mon, 9 Jan 2023 17:54:30 -0800 (PST) X-Google-Smtp-Source: AMrXdXtD+WQJH5HSJwhTf8CjRRC2Q/Scwo/ekA1qm5+tom/WyFfnRV5qCBrXkylo5stq9RTrZrr+ X-Received: by 2002:a17:907:d48a:b0:7c1:766e:e09 with SMTP id vj10-20020a170907d48a00b007c1766e0e09mr60567755ejc.29.1673315670782; Mon, 09 Jan 2023 17:54:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673315670; cv=none; d=google.com; s=arc-20160816; b=NpjPrRHVW5ECDz7fiH5oVFimyMow8zqC/yBy9PbyU315IX7k9jd7j7LNo3n2IY3bBy mZx2RIIkNGNLlQrCoE7mcnZJm4UhF2e6bLdEUQLjm2MoHbLiwq9TNLuG/wNsVUWloXJU b5bKZVAQebtUdtNkxZ2TxopAm8/eXOss1lVDkB+ZC90FVewmoh4vZlvsJlNVv8lMRsqX 6yb9CNWJjRo/CX3BIp3mZ5n4ohvABkbOZLFt8MOaxO1Mafd2ljIskGJjymQIH6DxZoRm uTc+o9WqziwCEAfxOL+YRLNG8wAxpwPJKIu+yxgDKnScnSyOZ+lqkjCsDN8D23makbwS fgGg== 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=G2O9krcB68D92Cr6oC2xTbIJsM2Axv2bwtcqnU8oIA8=; b=TmauUIGPYasebnGTfokbsOag9ehHo4fGjr1DWEnK7G8U7tYlcgzxFIvbm+MTnYQfHw jSH901wlL9kMqEJHB3O+z+PMDnD3ki5dOQy7pQGDwp0MFtGkpXGWG7snNlsHrUpsisb5 k6I7SqGkdRKLB+hwO71OOWRoNy1X7HBpuGjCAsf0zY19xC2IVMcxiTN+2fTB3iXRgDCs C75fH3h6qkQ4NpD76Y8JpN62BjWBifXhk6Cu443zAQbh2sNdPhhvZ4dPa//PFVqXln75 wWpUzUkoMOO7v6dqe1qEmcWJod8oWHe1MVEwFhChbQlcbFQSC7G2fppKDjnjmbrWff9j p/QA== 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 r6-20020a50d686000000b0046b3ecfe295si11138316edi.530.2023.01.09.17.54.18; Mon, 09 Jan 2023 17:54:30 -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; 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 S235000AbjAJBuk (ORCPT + 53 others); Mon, 9 Jan 2023 20:50:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34854 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235148AbjAJBue (ORCPT ); Mon, 9 Jan 2023 20:50:34 -0500 Received: from SHSQR01.spreadtrum.com (mx1.unisoc.com [222.66.158.135]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 43E5810042; Mon, 9 Jan 2023 17:50:31 -0800 (PST) Received: from SHSend.spreadtrum.com (bjmbx02.spreadtrum.com [10.0.64.8]) by SHSQR01.spreadtrum.com with ESMTP id 30A1noT9015334; Tue, 10 Jan 2023 09:49:50 +0800 (+08) (envelope-from Chunyan.Zhang@unisoc.com) Received: from ubt.spreadtrum.com (10.0.74.87) by BJMBX02.spreadtrum.com (10.0.64.8) with Microsoft SMTP Server (TLS) id 15.0.1497.23; Tue, 10 Jan 2023 09:49:49 +0800 From: Chunyan Zhang To: Linus Walleij , Bartosz Golaszewski , Rob Herring , Krzysztof Kozlowski CC: , , Baolin Wang , Orson Zhai , "Chunyan Zhang" , Chunyan Zhang , LKML Subject: [PATCH V4 1/3] dt-bindings: gpio: Convert Unisoc GPIO controller binding to yaml Date: Tue, 10 Jan 2023 09:49:41 +0800 Message-ID: <20230110014943.2196046-2-chunyan.zhang@unisoc.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230110014943.2196046-1-chunyan.zhang@unisoc.com> References: <20230110014943.2196046-1-chunyan.zhang@unisoc.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.0.74.87] X-ClientProxiedBy: SHCAS03.spreadtrum.com (10.0.1.207) To BJMBX02.spreadtrum.com (10.0.64.8) X-MAIL: SHSQR01.spreadtrum.com 30A1noT9015334 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,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 lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Convert the Unisoc gpio controller binding to DT schema format. Signed-off-by: Chunyan Zhang Reviewed-by: Krzysztof Kozlowski --- .../devicetree/bindings/gpio/gpio-sprd.txt | 28 -------- .../devicetree/bindings/gpio/sprd,gpio.yaml | 70 +++++++++++++++++++ 2 files changed, 70 insertions(+), 28 deletions(-) delete mode 100644 Documentation/devicetree/bindings/gpio/gpio-sprd.txt create mode 100644 Documentation/devicetree/bindings/gpio/sprd,gpio.yaml diff --git a/Documentation/devicetree/bindings/gpio/gpio-sprd.txt b/Documentation/devicetree/bindings/gpio/gpio-sprd.txt deleted file mode 100644 index eca97d45388f..000000000000 --- a/Documentation/devicetree/bindings/gpio/gpio-sprd.txt +++ /dev/null @@ -1,28 +0,0 @@ -Spreadtrum GPIO controller bindings - -The controller's registers are organized as sets of sixteen 16-bit -registers with each set controlling a bank of up to 16 pins. A single -interrupt is shared for all of the banks handled by the controller. - -Required properties: -- compatible: Should be "sprd,sc9860-gpio". -- reg: Define the base and range of the I/O address space containing -the GPIO controller registers. -- gpio-controller: Marks the device node as a GPIO controller. -- #gpio-cells: Should be <2>. The first cell is the gpio number and -the second cell is used to specify optional parameters. -- interrupt-controller: Marks the device node as an interrupt controller. -- #interrupt-cells: Should be <2>. Specifies the number of cells needed -to encode interrupt source. -- interrupts: Should be the port interrupt shared by all the gpios. - -Example: - ap_gpio: gpio@40280000 { - compatible = "sprd,sc9860-gpio"; - reg = <0 0x40280000 0 0x1000>; - gpio-controller; - #gpio-cells = <2>; - interrupt-controller; - #interrupt-cells = <2>; - interrupts = ; - }; diff --git a/Documentation/devicetree/bindings/gpio/sprd,gpio.yaml b/Documentation/devicetree/bindings/gpio/sprd,gpio.yaml new file mode 100644 index 000000000000..40924123d184 --- /dev/null +++ b/Documentation/devicetree/bindings/gpio/sprd,gpio.yaml @@ -0,0 +1,70 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +# Copyright 2022 Unisoc Inc. +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/gpio/sprd,gpio.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Unisoc GPIO controller + +maintainers: + - Orson Zhai + - Baolin Wang + - Chunyan Zhang + +description: | + The controller's registers are organized as sets of sixteen 16-bit + registers with each set controlling a bank of up to 16 pins. A single + interrupt is shared for all of the banks handled by the controller. + +properties: + compatible: + const: sprd,sc9860-gpio + + reg: + maxItems: 1 + + gpio-controller: true + + "#gpio-cells": + const: 2 + + interrupt-controller: true + + "#interrupt-cells": + const: 2 + + interrupts: + maxItems: 1 + description: The interrupt shared by all GPIO lines for this controller. + +required: + - compatible + - reg + - gpio-controller + - "#gpio-cells" + - interrupt-controller + - "#interrupt-cells" + - interrupts + +additionalProperties: false + +examples: + - | + #include + + soc { + #address-cells = <2>; + #size-cells = <2>; + + ap_gpio: gpio@40280000 { + compatible = "sprd,sc9860-gpio"; + reg = <0 0x40280000 0 0x1000>; + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + interrupts = ; + }; + }; +... -- 2.25.1