From patchwork Thu Feb 15 09:32:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Stein X-Patchwork-Id: 13557768 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D0B25C48BEB for ; Thu, 15 Feb 2024 09:32:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=hyQwwuue8k9ICWXs7lfHS125lsG5ogkRl5B14tgL/Bw=; b=s39f5YXYxCoF3xGkqOW8HruEa3 KkysOfiQPDvgBg01ySi0OYj24dgGMPG+PmRb5XcbbKj8zozxohsDq+rGzh+8bHsTqvwgkqRmDm8pf 7QhQqi6NPS2yfS+gc9WAfRZ9Qy09AoUm0jYBP9xPIctI/PtRdSPMICzgSTcgr0i9o8Jp6tvm/n/Yc ZTyCTcLKbxB+Pa5/GRJJYyA+gVb+lTCnhRQbo8TTH/KfHiSPC0JVf5ljUga3VwzKKFT6+NMU+lKm2 utLqqQc7uNBzGzuGBPsj0C96seTkeBUNmeD4pbO9usIELiLjvlZksKBaVTzK7wRMIwm9e7pdaOnvv yYC4Jigg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1raY6h-0000000Faum-3xNW; Thu, 15 Feb 2024 09:32:39 +0000 Received: from mx1.tq-group.com ([93.104.207.81]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1raY6Q-0000000FaiN-4AuW; Thu, 15 Feb 2024 09:32:25 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tq-group.com; i=@tq-group.com; q=dns/txt; s=key1; t=1707989543; x=1739525543; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=hyQwwuue8k9ICWXs7lfHS125lsG5ogkRl5B14tgL/Bw=; b=LcJ+yCnoqGMXqe5trZ4aOWk82qUlu/EYcQqSZRKjax0GPsHBGK78t/9L 09Sq8FyuYDUoZPxxJ7Erc/Z0V5J6zOagY7zE1BSuZ1CiEJWoG6ZpeMI7v I+CqV2p9zPg3wFrPOHYCnyhQO3BJtnRF0vRgwaU/xfgsx8nQ/UVvNEMAJ YATu2iVpGtuwB1tKm4UmNU7ehUrP7EoncCnDJa9YHkfqvMUMSainaZmlL bQGlnkOPiUnWMjmWywz4x1txEFaRKAU3SVjwD+ux2ujHv0+bfR1y5D9US 2jOH5V54b38MzpAlgO++Z/Q912//Tz/aN6Guw0Hoix7eCgAOzZrJpx5ui Q==; X-IronPort-AV: E=Sophos;i="6.06,161,1705359600"; d="scan'208";a="35420059" Received: from vtuxmail01.tq-net.de ([10.115.0.20]) by mx1.tq-group.com with ESMTP; 15 Feb 2024 10:32:16 +0100 Received: from steina-w.tq-net.de (steina-w.tq-net.de [10.123.53.25]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by vtuxmail01.tq-net.de (Postfix) with ESMTPSA id 2BBAA280084; Thu, 15 Feb 2024 10:32:16 +0100 (CET) From: Alexander Stein To: MyungJoo Ham , Chanwoo Choi , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Matthias Brugger , AngeloGioacchino Del Regno Cc: Alexander Stein , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Subject: [PATCH v5 1/2] dt-bindings: extcon-usb-gpio: convert to DT schema format Date: Thu, 15 Feb 2024 10:32:13 +0100 Message-Id: <20240215093214.796821-2-alexander.stein@ew.tq-group.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240215093214.796821-1-alexander.stein@ew.tq-group.com> References: <20240215093214.796821-1-alexander.stein@ew.tq-group.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240215_013223_486556_4D24D9B2 X-CRM114-Status: GOOD ( 16.59 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org Convert the binding to DT schema format. Change the GPIO properties to new naming convention using -gpios as well. Signed-off-by: Alexander Stein Reviewed-by: Rob Herring --- .../bindings/extcon/extcon-usb-gpio.txt | 21 -------- .../bindings/extcon/extcon-usb-gpio.yaml | 51 +++++++++++++++++++ 2 files changed, 51 insertions(+), 21 deletions(-) delete mode 100644 Documentation/devicetree/bindings/extcon/extcon-usb-gpio.txt create mode 100644 Documentation/devicetree/bindings/extcon/extcon-usb-gpio.yaml diff --git a/Documentation/devicetree/bindings/extcon/extcon-usb-gpio.txt b/Documentation/devicetree/bindings/extcon/extcon-usb-gpio.txt deleted file mode 100644 index dfc14f71e81fb..0000000000000 --- a/Documentation/devicetree/bindings/extcon/extcon-usb-gpio.txt +++ /dev/null @@ -1,21 +0,0 @@ -USB GPIO Extcon device - -This is a virtual device used to generate USB cable states from the USB ID pin -connected to a GPIO pin. - -Required properties: -- compatible: Should be "linux,extcon-usb-gpio" - -Either one of id-gpio or vbus-gpio must be present. Both can be present as well. -- id-gpio: gpio for USB ID pin. See gpio binding. -- vbus-gpio: gpio for USB VBUS pin. - -Example: Examples of extcon-usb-gpio node in dra7-evm.dts as listed below: - extcon_usb1 { - compatible = "linux,extcon-usb-gpio"; - id-gpio = <&gpio6 1 GPIO_ACTIVE_HIGH>; - } - - &omap_dwc3_1 { - extcon = <&extcon_usb1>; - }; diff --git a/Documentation/devicetree/bindings/extcon/extcon-usb-gpio.yaml b/Documentation/devicetree/bindings/extcon/extcon-usb-gpio.yaml new file mode 100644 index 0000000000000..136f865b87816 --- /dev/null +++ b/Documentation/devicetree/bindings/extcon/extcon-usb-gpio.yaml @@ -0,0 +1,51 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/extcon/extcon-usb-gpio.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: USB GPIO Extcon device + +maintainers: + - Alexander Stein + +description: + This is a virtual device used to generate USB cable states from the + USB ID pin connected to a GPIO pin. + Deprecated, use USB connector node instead. + +deprecated: true + +properties: + compatible: + const: linux,extcon-usb-gpio + + id-gpios: + description: An input gpio for USB ID pin. + maxItems: 1 + + vbus-gpios: + description: An input gpio for USB VBus pin, used to detect presence of + VBUS 5V. + maxItems: 1 + +required: + - compatible + +anyOf: + - required: + - id-gpios + - required: + - vbus-gpios + +additionalProperties: false + +examples: + - | + #include + + extcon-usb1 { + compatible = "linux,extcon-usb-gpio"; + id-gpios = <&gpio6 1 GPIO_ACTIVE_HIGH>; + vbus-gpios = <&gpio6 2 GPIO_ACTIVE_HIGH>; + }; From patchwork Thu Feb 15 09:32:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Stein X-Patchwork-Id: 13557769 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 49879C48BEB for ; Thu, 15 Feb 2024 09:32:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=ys7+gAx0aNBkte/FWD7H4VU0J/Z7WfW29i7yuLuFcpM=; b=lKBhu/4/yOUADNNX3iXc9z5i+r 3VVdKRaWMctgBWe4Q8m9U3FqP8LBXrQrmm2yiX0nU/RAy0asvn5j0zIo0WorrAVyxg1bYIcNsbkEf mmr3VBB5nBROUHLecyWIg1FFtgE8f+DxmKC3DpiO9wRIR7zuGYuWe75viLz4tbmEdkMT8i5SU0XwR OajxUsZvZXJmne3w6WquX93tFPs4ZOvp9RZJpXp7zJFVAllPp7ftbMdgHV53GYhDr/9ZeC9LEJ3Zp A6pzhbwdZgN9uoRuS+uMfz4rXDN5uB5hmGXFFpC7z7JOc0KX0L/haKxFz9U0FSWH7W9Db3tB7Gxtv 2Xd2cPZQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1raY6s-0000000Fb0W-3gOA; Thu, 15 Feb 2024 09:32:50 +0000 Received: from mx1.tq-group.com ([93.104.207.81]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1raY6S-0000000FalW-04RC; Thu, 15 Feb 2024 09:32:28 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tq-group.com; i=@tq-group.com; q=dns/txt; s=key1; t=1707989544; x=1739525544; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ys7+gAx0aNBkte/FWD7H4VU0J/Z7WfW29i7yuLuFcpM=; b=DUtk2RS1rYv7FVT8CR9IMZbxGm3Tvc4MPkzeJo/SgXGVT8LzUmJM8Xjj GvXdEmXuxuNWHPHuIZEWicgVhjz3weFlOVWsTxPQ3bOQO6X4ptfQ77G1o TqQZmWXZ/fry7NVzGFIGjf3SPEgGxuleoNLk3r1S1+bqdfrg+cellZFCM /W+hwHFX6/w9rIc9InM+Gs28X7ljo74CSUduw2Iy2cfkU67lNOIdXhulf sHl3Ick6RNZXL4kn8x21eKhY41ybyl29ZSZ2+nSwfZ55CO7D/3sXkCPAl IS1iwV182BaliF48YjtB6Y1lIY2K5/P5KYRadSMKysXCyddFcw4f2t8u3 g==; X-IronPort-AV: E=Sophos;i="6.06,161,1705359600"; d="scan'208";a="35420060" Received: from vtuxmail01.tq-net.de ([10.115.0.20]) by mx1.tq-group.com with ESMTP; 15 Feb 2024 10:32:16 +0100 Received: from steina-w.tq-net.de (steina-w.tq-net.de [10.123.53.25]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by vtuxmail01.tq-net.de (Postfix) with ESMTPSA id 60DA6280085; Thu, 15 Feb 2024 10:32:16 +0100 (CET) From: Alexander Stein To: MyungJoo Ham , Chanwoo Choi , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Matthias Brugger , AngeloGioacchino Del Regno Cc: Alexander Stein , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, Shawn Guo , Krzysztof Kozlowski Subject: [PATCH v5 2/2] arm64: dts: mediatek: Replace deprecated extcon-usb-gpio id-gpio/vbus-gpio properties Date: Thu, 15 Feb 2024 10:32:14 +0100 Message-Id: <20240215093214.796821-3-alexander.stein@ew.tq-group.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240215093214.796821-1-alexander.stein@ew.tq-group.com> References: <20240215093214.796821-1-alexander.stein@ew.tq-group.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240215_013224_489599_103DDB46 X-CRM114-Status: GOOD ( 10.92 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org Use id-gpios and vbus-gpios instead. Signed-off-by: Alexander Stein Reviewed-by: Matthias Brugger Reviewed-by: AngeloGioacchino Del Regno Acked-by: Shawn Guo Acked-by: Krzysztof Kozlowski --- arch/arm64/boot/dts/mediatek/mt2712-evb.dts | 4 ++-- arch/arm64/boot/dts/mediatek/mt8173-evb.dts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/arm64/boot/dts/mediatek/mt2712-evb.dts b/arch/arm64/boot/dts/mediatek/mt2712-evb.dts index fffdb7bbf889e..0c38f7b517637 100644 --- a/arch/arm64/boot/dts/mediatek/mt2712-evb.dts +++ b/arch/arm64/boot/dts/mediatek/mt2712-evb.dts @@ -43,12 +43,12 @@ cpus_fixed_vproc1: regulator-vproc-buck1 { extcon_usb: extcon_iddig { compatible = "linux,extcon-usb-gpio"; - id-gpio = <&pio 12 GPIO_ACTIVE_HIGH>; + id-gpios = <&pio 12 GPIO_ACTIVE_HIGH>; }; extcon_usb1: extcon_iddig1 { compatible = "linux,extcon-usb-gpio"; - id-gpio = <&pio 14 GPIO_ACTIVE_HIGH>; + id-gpios = <&pio 14 GPIO_ACTIVE_HIGH>; }; usb_p0_vbus: regulator-usb-p0-vbus { diff --git a/arch/arm64/boot/dts/mediatek/mt8173-evb.dts b/arch/arm64/boot/dts/mediatek/mt8173-evb.dts index 0e5c628d1ec3e..3fab21f59d183 100644 --- a/arch/arm64/boot/dts/mediatek/mt8173-evb.dts +++ b/arch/arm64/boot/dts/mediatek/mt8173-evb.dts @@ -41,7 +41,7 @@ hdmi_connector_in: endpoint { extcon_usb: extcon_iddig { compatible = "linux,extcon-usb-gpio"; - id-gpio = <&pio 16 GPIO_ACTIVE_HIGH>; + id-gpios = <&pio 16 GPIO_ACTIVE_HIGH>; }; usb_p1_vbus: regulator-usb-p1 {