Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp5812869rwl; Sun, 8 Jan 2023 23:24:28 -0800 (PST) X-Google-Smtp-Source: AMrXdXstRP12QteMwfFvpmx7IooCYIgEJxyEOK0Ln8iCj75dI+bqZUITpnH0jGev0sE+MpIpgj7P X-Received: by 2002:a17:907:cbc8:b0:7c0:f2c9:4404 with SMTP id vk8-20020a170907cbc800b007c0f2c94404mr63275420ejc.21.1673249068313; Sun, 08 Jan 2023 23:24:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673249068; cv=none; d=google.com; s=arc-20160816; b=cJonJBQflnj4CnitTlKtr0BhREHBOg+SJXnBQDhci5A7moWQcw0/G3U+lQpWli0Pmt savDbNn2Gt6XNa+s5gHGiWOz5neDCfmACCGA18D6piYmYsI4/TdWMncTnodPfw6w/Lkt jkFdGeTEgyDQTgvqZfOQyRn9NyiKz4BHAS+87jjvv/s7EwvfKKcmOTua8s+dwnP+i5ls rCytHVHyJElj6Zzl0hB7Q0INYBfFLGtBAEHFSIjpU9V7kCKkyyVepbFyKlHcUFPgcgDC FvV9F/U0pvKA9cGySYMJrTtQu44AY+9gHMr2pXGgEVPzoCZ4ga7AIeqqID3jz1xaqy+w G96g== 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=j4l2+3I/viONJreoswyi8w2wpkfAhLkCDnJbZO2VkM7B2mhWp0EJP6yWYG29H2gtsU oyauKKZg15lVNgMT0g9wk9C61ULh5LdSJOJ35aGi7tjwIcpxhw7a1fiEkJeV7oNGvln5 uE3ioo10ILoKzLNHjh99uaWho6o1UeAMOeaWweJLZaEVn9hXXAFuYsiLBzF4jcxhacqX 8X4Ov0Ym/XpXWBkbKzxnAJg+8kBsDbt6/GUcQIABtxPdTbEoJDvagTTLekB+Coc4eHpy PZmJfna9lfMJ4sbIwePPNEtD78kMT6SZRlMS1BhteHCcxl2IQhUZa2rvssqrPyuVuKrX N6Og== 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 he6-20020a1709073d8600b007e494438499si9395732ejc.166.2023.01.08.23.24.15; Sun, 08 Jan 2023 23:24:28 -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 S236199AbjAIHWA (ORCPT + 54 others); Mon, 9 Jan 2023 02:22:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37186 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230504AbjAIHVz (ORCPT ); Mon, 9 Jan 2023 02:21:55 -0500 Received: from SHSQR01.spreadtrum.com (unknown [222.66.158.135]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0DFFF655A; Sun, 8 Jan 2023 23:21:50 -0800 (PST) Received: from SHSend.spreadtrum.com (bjmbx02.spreadtrum.com [10.0.64.8]) by SHSQR01.spreadtrum.com with ESMTP id 3097LDTN092591; Mon, 9 Jan 2023 15:21:14 +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; Mon, 9 Jan 2023 15:21:13 +0800 From: Chunyan Zhang To: Linus Walleij , Bartosz Golaszewski , Rob Herring CC: , , Chunyan Zhang , Chunyan Zhang , LKML Subject: [RESEND PATCH V3 1/3] dt-bindings: gpio: Convert Unisoc GPIO controller binding to yaml Date: Mon, 9 Jan 2023 15:21:04 +0800 Message-ID: <20230109072106.2176048-2-chunyan.zhang@unisoc.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230109072106.2176048-1-chunyan.zhang@unisoc.com> References: <20230109072106.2176048-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 3097LDTN092591 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS 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 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