From patchwork Mon Dec 5 15:18:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 29726 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp2315593wrr; Mon, 5 Dec 2022 07:21:30 -0800 (PST) X-Google-Smtp-Source: AA0mqf5QGsoD6sBA6Q15PF35kwLIhhDUdhAiiSYv36vipT+e6s2h04ZljNkyoET6KkGzIX7xRSTI X-Received: by 2002:a17:906:a41a:b0:7c0:e80e:5af0 with SMTP id l26-20020a170906a41a00b007c0e80e5af0mr5995789ejz.235.1670253690438; Mon, 05 Dec 2022 07:21:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670253690; cv=none; d=google.com; s=arc-20160816; b=fZ9PPUWz/7w0eJCFNItvTqH3NOP2vh0BxQSKctbOjNGkwbMPjycv474dP1f16UqwQp mvy1tItdjgArkZCOnuAptF/DITLNjlHPRoOdbNGg86O1DNHhJ/1xjj8PdxoyP+uyjX9f 6kwAW7cOATZBCxgNbd4k0mFEePvYNe1XLZAwDEwYkV8xMUsnNqaQ6wx0vlQnvUfhNiHk dz79SEsW6/l84fKWMy+rgd74uwp++R+MtCEQwcRQShcxZ3mXALY0NUgoOrnjHtqU3INd ppvRyHb8EkXqMzxa1PjHjRa+6B9dSuT91M2rV4MrU2G1DRASLvlVEENDBeCVTVBJpteM 4EkA== 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=OG/8G+X7cn354GHwDZ9it6hy+FM3bIwIsnxzfxxJJs8=; b=vCuKIng0AOvP1fYofFCe1VG/vFQWfnefogJdws6EI5oeMnlDm0obtXPxLH2qrGyB22 pm74vEJuVbwNZhtQlzSfbWkNJNBs+4zEMW3OBkoG5hvdWRHO4g1K6gulFq+aYjEav1vu dXUhKJtVuRqFk+y3bxkp7Od9GSsBa5leYiLaM76ONr1X94lEli67hat1mDJVAIfrBmb+ mSYjnfNYtGv14EK033blXW1lzKQuYaqSOmrPF6HA3aVedAjmyqQNEnE7cAMAY6VSmELH 4iKpi2hRKalkBEZYv/E/eK4L8bUPr/vC9Cm1PsmyJCNI5bLsJSeoybd1LMNIlK2TV0iI hLMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=n5b5W1eg; 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 ss28-20020a170907c01c00b007adc8c49d83si10038293ejc.477.2022.12.05.07.21.04; Mon, 05 Dec 2022 07:21: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; dkim=pass header.i=@linaro.org header.s=google header.b=n5b5W1eg; 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 S232006AbiLEPT4 (ORCPT + 99 others); Mon, 5 Dec 2022 10:19:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51090 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232082AbiLEPTG (ORCPT ); Mon, 5 Dec 2022 10:19:06 -0500 Received: from mail-lj1-x229.google.com (mail-lj1-x229.google.com [IPv6:2a00:1450:4864:20::229]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7AAAD1A3BF for ; Mon, 5 Dec 2022 07:19:00 -0800 (PST) Received: by mail-lj1-x229.google.com with SMTP id l8so13866192ljh.13 for ; Mon, 05 Dec 2022 07:19:00 -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=OG/8G+X7cn354GHwDZ9it6hy+FM3bIwIsnxzfxxJJs8=; b=n5b5W1egO3RHI1db6QG6Zjkmv/BIcd4ndpcGpufGOnQwvKl64GUkpxRo7nbY/k5YDK k56YnJJieRdxDHkEvV3lhLQQe2/AaCfvOJRCfQz4LCYngeM5io5+D8oJUssFIpAVbr1Q OsetqNCnDbp72hHaS+7wTcAv12Z7gAj6FV/C1poEmSUNiwY0mekDfq+BEMV9lCTu0uMR Qw7uF6byg4YVQ20D9mZE1TrfC/kyBflhHc4/s91jmMrgSMLatPzNKiwweL4FuNtlJak6 e0d0ROK25AfK8Rk1tsA84L6C5jpPyLhw0fXQUx11xWlokpaGqtpra7IOz+PrrhtrDiCD +1tw== 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=OG/8G+X7cn354GHwDZ9it6hy+FM3bIwIsnxzfxxJJs8=; b=06i/WJKRv6/DhttktgL5ulwrhEwPKUqIcfovpR1i2HHPgtcpCox/U9EWsM/M1kgpzp f3+37dPsasIigCYm3H6Z1R9wNFRDG27px9YQiQN/EHbUVfR7+7QQbh6CvLIoh6xXr8lh sglv794JGBakW2Y6M/Smjvz84aTGM8YugX+THhtcuTjf++KV7wSQz+KR2wNCCMZAKNHE dBEFZAxvlZX2Y3m8VCqcYuPFJLrOWsfRXVN6I3qGttkGnb4E1dnjKbAMTbMfUtz8pEp2 Ebvwh2zc6g9MT+gFF4MPWz3+67OCeodqn0pjurI95MpPrIGahBgyc+RTRU/iXm9Yrb1O W2HA== X-Gm-Message-State: ANoB5pmqENaAxHJyr0EX4cvpxKmluwc7fmDieH+6P3Ur/kzJxY41rKC/ RGfL7Uwej/kaehG9z5FREZRFiA== X-Received: by 2002:a05:651c:1721:b0:277:2600:9ce1 with SMTP id be33-20020a05651c172100b0027726009ce1mr21479909ljb.233.1670253538773; Mon, 05 Dec 2022 07:18:58 -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 w26-20020a05651204da00b004b55f60c65asm1012470lfq.284.2022.12.05.07.18.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Dec 2022 07:18:58 -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 Subject: [PATCH v2 7/9] media: dt-bindings: cec-gpio: convert to DT schema Date: Mon, 5 Dec 2022 16:18:43 +0100 Message-Id: <20221205151845.21618-8-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221205151845.21618-1-krzysztof.kozlowski@linaro.org> References: <20221205151845.21618-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?1751387933668413050?= X-GMAIL-MSGID: =?utf-8?q?1751387933668413050?= Convert HDMI CEC GPIO bindings to DT schema. Signed-off-by: Krzysztof Kozlowski Acked-by: Hans Verkuil Reviewed-by: Rob Herring --- .../devicetree/bindings/media/cec-gpio.txt | 42 ----------- .../bindings/media/cec/cec-gpio.yaml | 73 +++++++++++++++++++ MAINTAINERS | 2 +- 3 files changed, 74 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..19169d58316a --- /dev/null +++ b/Documentation/devicetree/bindings/media/cec/cec-gpio.yaml @@ -0,0 +1,73 @@ +%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