From patchwork Thu Dec 8 10:31:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 31264 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp117584wrr; Thu, 8 Dec 2022 02:35:48 -0800 (PST) X-Google-Smtp-Source: AA0mqf6J6TynOI7dMryXjR8VJInDwQb+dURDLeDaMjKl5uFOjwCevc1gNn/UyPQ12UVIrmEOal/j X-Received: by 2002:aa7:cc8d:0:b0:461:15f0:a574 with SMTP id p13-20020aa7cc8d000000b0046115f0a574mr27697035edt.187.1670495747913; Thu, 08 Dec 2022 02:35:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670495747; cv=none; d=google.com; s=arc-20160816; b=x3VpeZcxHWbkilzHwQNi2gsdcLCvkSFk+nuPTk9C1Rn+NKc6WxzYGsU5BBxDTudGYS eEJSzfWQtStB9nrUL0CExRTmJ3BlC2MTLVoBEHCgeAEqab3VwC74/FUfcOxwPcKWjPV3 WVmGllx6aXs3Wnl8MKvQcAMR/HU4UfgiLzvhfQKfIHx3f6VbYaLVL9evkO7MD76R/9Hf HjY8gkbJQocnjGxJL3ddUD+3ibZkTRDI1URTIga66USNQfQWKggwZ732tgFfSYgy3xR/ 96cUfd4+K5g+ssDrFjO30SInT51CF/CLzgOWsawufTZxZl04601Uj66ON4P+lZUugF6q RCmA== 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 :dkim-signature; bh=1+xgakROSa2tyyNfQUbDwsLUYdUS/rSfQ5IgxtrQvUM=; b=prKjxyvNFOD64Ap7Tfzjnlbi4eaw2Pa/Ll5xj9t3PmEXlbgUNB/0SwNMv8CjT8o3YU EzikmFNU9ruzi0JAtx9reKH5jAEMHC7Bz+Smt6LMU/yeSbzE4EJXHkOljYmzy/MY4LKZ TnyazCE693rfCWwCDoQWWJRICXLUopxQhEefmE3NwzqKeX2AV9vk4awd+a2NX57XmOii IqFEDFATURyMvDcAclBzLcsuzEtL6eMLVw7tmrNNgZIC4Kr02cU/V5GUHZIdRb2UeI1p sANdmnOku81PK+O/nJihB+DMRwnIXnYRN6ZGNRlu5YiTBWX0bBoFV1MWK+v09Hgsc0zg itmw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=LWYhpiQG; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e12-20020a50ec8c000000b0046db13bf254si503628edr.93.2022.12.08.02.35.21; Thu, 08 Dec 2022 02:35:47 -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; dkim=pass header.i=@linaro.org header.s=google header.b=LWYhpiQG; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230089AbiLHKeS (ORCPT + 99 others); Thu, 8 Dec 2022 05:34:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38138 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230116AbiLHKdW (ORCPT ); Thu, 8 Dec 2022 05:33:22 -0500 Received: from mail-lf1-x131.google.com (mail-lf1-x131.google.com [IPv6:2a00:1450:4864:20::131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3CB5181DB9 for ; Thu, 8 Dec 2022 02:31:43 -0800 (PST) Received: by mail-lf1-x131.google.com with SMTP id p8so1346376lfu.11 for ; Thu, 08 Dec 2022 02:31:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=1+xgakROSa2tyyNfQUbDwsLUYdUS/rSfQ5IgxtrQvUM=; b=LWYhpiQGZcljQmKqXE0nzGnQ+/Xt4SK3zRwV0uDp4Sa5q5GaZMEb3tKeG3bFvYMrFK MrGzfhJ3kGPa856SsR3tflHMiU4nByAp3ECuciU5Q7abOa365oluhz3zmOGT42nTVhye z/9lX8nMtCI58JXJiBmEM0BM9e39Hy1X/6oygVowka6jOiEQH7kJ3hhED5wYhwC5slB4 pkklhnpJ5g+7YI09TdUX7o/sk/X/vEd8XR8mLJpcvm1GyVFwPYBxsBTu4r0K/+HF5hRK GrT4yDKldhHuxLF+Jd3RigIXC+Rqykt9qV3sAnUIIGevqnA+MrCspDIyL5MmB99NDBdw 6bCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=1+xgakROSa2tyyNfQUbDwsLUYdUS/rSfQ5IgxtrQvUM=; b=obINVV1lgQdDXhrUNQWHEiGMtCddF+8GytqS2O/ODqzmLpQ0GjHa5U4qOfODHhTfa3 3GSVStewlPFdsegKno7UBrR1UGy63sV4GEsyZ19YcW048897BPtrM6OTIIrEz0mHC/p/ mz+1voOgOzecjcW4dvRE/lfmyF6Yk0H4P+Ju9o3dfpZjI4c95SK7OsvX3P2II3BB3An6 +Tby8P1cTaxfRXcuUMKBao/h/j93d3vWZmeaW/oFALsO+8Hu8kk4tJzKCVGH1YRDo7hp Xpn6Ju8K433qrB7fFM8RYseZPXy44u0pacJpyBaPjEKrbSrNPUIsQt8kUsX9PsjC+FGe nFAw== X-Gm-Message-State: ANoB5pnevQ2vnOjzaeFP48IaKl8EaVgNMJ87ao0DpnZpojOH76IYdjh2 4OZJ6lTTXLWyn38I7I31Uf4Fow== X-Received: by 2002:ac2:4ac8:0:b0:4b3:ac9d:9354 with SMTP id m8-20020ac24ac8000000b004b3ac9d9354mr30478020lfp.85.1670495500019; Thu, 08 Dec 2022 02:31:40 -0800 (PST) Received: from krzk-bin.NAT.warszawa.vectranet.pl (088156142067.dynamic-2-waw-k-3-2-0.vectranet.pl. [88.156.142.67]) by smtp.gmail.com with ESMTPSA id h18-20020a2eb0f2000000b00279e5247dabsm1699580ljl.18.2022.12.08.02.31.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Dec 2022 02:31:39 -0800 (PST) From: Krzysztof Kozlowski To: Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Hans Verkuil , Thierry Reding , Jonathan Hunter , Marek Szyprowski , Alain Volmat , Maxime Coquelin , Alexandre Torgue , Joe Tessler , Yannick Fertre , Jeff Chase , linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org, linux-tegra@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com Cc: Krzysztof Kozlowski , Rob Herring Subject: [PATCH v4 7/9] media: dt-bindings: cec-gpio: convert to DT schema Date: Thu, 8 Dec 2022 11:31:13 +0100 Message-Id: <20221208103115.25512-8-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221208103115.25512-1-krzysztof.kozlowski@linaro.org> References: <20221208103115.25512-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1751641749030433430?= X-GMAIL-MSGID: =?utf-8?q?1751641749030433430?= Convert HDMI CEC GPIO bindings to DT schema. Signed-off-by: Krzysztof Kozlowski Acked-by: Hans Verkuil Reviewed-by: Rob Herring --- Changes since v3: 1. Add missing SPDX. --- .../devicetree/bindings/media/cec-gpio.txt | 42 ----------- .../bindings/media/cec/cec-gpio.yaml | 74 +++++++++++++++++++ MAINTAINERS | 2 +- 3 files changed, 75 insertions(+), 43 deletions(-) delete mode 100644 Documentation/devicetree/bindings/media/cec-gpio.txt create mode 100644 Documentation/devicetree/bindings/media/cec/cec-gpio.yaml diff --git a/Documentation/devicetree/bindings/media/cec-gpio.txt b/Documentation/devicetree/bindings/media/cec-gpio.txt deleted file mode 100644 index 47e8d73d32a3..000000000000 --- a/Documentation/devicetree/bindings/media/cec-gpio.txt +++ /dev/null @@ -1,42 +0,0 @@ -* HDMI CEC GPIO driver - -The HDMI CEC GPIO module supports CEC implementations where the CEC line -is hooked up to a pull-up GPIO line and - optionally - the HPD line is -hooked up to another GPIO line. - -Please note: the maximum voltage for the CEC line is 3.63V, for the HPD and -5V lines it is 5.3V. So you may need some sort of level conversion circuitry -when connecting them to a GPIO line. - -Required properties: - - compatible: value must be "cec-gpio". - - cec-gpios: gpio that the CEC line is connected to. The line should be - tagged as open drain. - -If the CEC line is associated with an HDMI receiver/transmitter, then the -following property is also required: - - - hdmi-phandle - phandle to the HDMI controller, see also cec.txt. - -If the CEC line is not associated with an HDMI receiver/transmitter, then -the following property is optional and can be used for debugging HPD changes: - - - hpd-gpios: gpio that the HPD line is connected to. - -This property is optional and can be used for debugging changes on the 5V line: - - - v5-gpios: gpio that the 5V line is connected to. - -Example for the Raspberry Pi 3 where the CEC line is connected to -pin 26 aka BCM7 aka CE1 on the GPIO pin header, the HPD line is -connected to pin 11 aka BCM17 and the 5V line is connected to pin -15 aka BCM22 (some level shifter is needed for the HPD and 5V lines!): - -#include - -cec-gpio { - compatible = "cec-gpio"; - cec-gpios = <&gpio 7 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>; - hpd-gpios = <&gpio 17 GPIO_ACTIVE_HIGH>; - v5-gpios = <&gpio 22 GPIO_ACTIVE_HIGH>; -}; diff --git a/Documentation/devicetree/bindings/media/cec/cec-gpio.yaml b/Documentation/devicetree/bindings/media/cec/cec-gpio.yaml new file mode 100644 index 000000000000..64d7ec057672 --- /dev/null +++ b/Documentation/devicetree/bindings/media/cec/cec-gpio.yaml @@ -0,0 +1,74 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/media/cec/cec-gpio.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: HDMI CEC GPIO + +maintainers: + - Hans Verkuil + +description: | + The HDMI CEC GPIO module supports CEC implementations where the CEC line is + hooked up to a pull-up GPIO line and - optionally - the HPD line is hooked up + to another GPIO line. + + Please note:: the maximum voltage for the CEC line is 3.63V, for the HPD and + 5V lines it is 5.3V. So you may need some sort of level conversion + circuitry when connecting them to a GPIO line. + +properties: + compatible: + const: cec-gpio + + cec-gpios: + maxItems: 1 + description: + GPIO that the CEC line is connected to. The line should be tagged as open + drain. + + hpd-gpios: + maxItems: 1 + description: + GPIO that the HPD line is connected to. Used for debugging HPD changes + when the CEC line is not associated with an HDMI receiver/transmitter. + + v5-gpios: + maxItems: 1 + description: + GPIO that the 5V line is connected to. Used for debugging changes on the + 5V line. + +required: + - compatible + - cec-gpios + +allOf: + - $ref: cec-common.yaml# + - if: + required: + - hdmi-phandle + then: + properties: + hpd-gpios: false + + - if: + required: + - hpd-gpios + then: + properties: + hdmi-phandle: false + +unevaluatedProperties: false + +examples: + - | + #include + + cec { + compatible = "cec-gpio"; + cec-gpios = <&gpio 7 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>; + hpd-gpios = <&gpio 17 GPIO_ACTIVE_HIGH>; + v5-gpios = <&gpio 22 GPIO_ACTIVE_HIGH>; + }; diff --git a/MAINTAINERS b/MAINTAINERS index 05acbaecef52..197351d3bb57 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -4848,7 +4848,7 @@ L: linux-media@vger.kernel.org S: Supported W: http://linuxtv.org T: git git://linuxtv.org/media_tree.git -F: Documentation/devicetree/bindings/media/cec-gpio.txt +F: Documentation/devicetree/bindings/media/cec/cec-gpio.yaml F: drivers/media/cec/platform/cec-gpio/ CELL BROADBAND ENGINE ARCHITECTURE