Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp3767276ybh; Tue, 6 Aug 2019 00:59:01 -0700 (PDT) X-Google-Smtp-Source: APXvYqy1J0e8ASndfasNlg6dspF5A1C2CN8Frr4RTeclynPnUuPafSpwRqQebYq1w399NJT5GQKy X-Received: by 2002:aa7:989a:: with SMTP id r26mr2254376pfl.232.1565078341255; Tue, 06 Aug 2019 00:59:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565078341; cv=none; d=google.com; s=arc-20160816; b=e3VjRyPxWCBoAOGa6apwpLfxw+Ccn+5x94Uv13gCDrAvuvMXy8dWBWQoPGCuR0tQPk KLOpBhmFoDt5tpMUZw6BG/ml9PmWoVxzhD94cLMeS+3bD3XwEIq3rAUYrsGcb9AlnFWz FS/gMDGTj/31gdW/lKMX5ZIYmBDQa9K1JGDjKqzLlqmX2a12SAc2dmLdOxCwt93qWTtq XReTjru6zwbCY3CLmGhoMDFDZj1YZSgD1oZkJWwbWJxryyTERwtV08VSXap2r3dTI3Lk rakKFETZfkH3uzS/ieAFjwlg1ZCtwVoy9Jtsbj9PuzxjgsKd08nVnG0Wc/V7GzhFAcnH ebgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:organization:autocrypt:openpgp:from:references:cc:to :subject:dkim-signature; bh=cb5T434YrMu3wWKr83C7n8/vlyK6CAvAcusdkd913hM=; b=SIHebK4njOkI6Zz7UqXKoB0ngQ0jaWDLlLxD6ilZe24k64LToo7ZlWOQGO+iIDPPs8 Ge2KvKjtoVYuwBhheqhk3ppug0wksbz6S2TaJ2oFcJCd3n87OAo6xUZKW4nUCTrdupdx cw7Frnm8wA59/RBKR/ZdcLl6NnvM7ODqgQhd99RhlduqPB2udsVvd9znKv2JkYVt+mNZ wvopfFC7/c5Kg22+GceIhrBpfhwNuejp+cAvx2Li2SBF3gGDHGcPGSsCMowilZAJx1W+ LEXIVFq5MMEbHUKX+qb7/gvEY/FL6uaQr3Wx2ZN0IM2NFEltX2h5hHNiXuF7DT8QBmMS jQGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=cR9g5qWD; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b6si47526221pfa.76.2019.08.06.00.58.45; Tue, 06 Aug 2019 00:59:01 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=cR9g5qWD; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732187AbfHFH5c (ORCPT + 99 others); Tue, 6 Aug 2019 03:57:32 -0400 Received: from mail-wm1-f65.google.com ([209.85.128.65]:40463 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731735AbfHFH5c (ORCPT ); Tue, 6 Aug 2019 03:57:32 -0400 Received: by mail-wm1-f65.google.com with SMTP id v19so75447676wmj.5 for ; Tue, 06 Aug 2019 00:57:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:openpgp:autocrypt:organization :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=cb5T434YrMu3wWKr83C7n8/vlyK6CAvAcusdkd913hM=; b=cR9g5qWDv71hiI+sMw1ecV5Lcl4lv4BbEOhqpBDsW4ykTbEXubNv+ylRco6Thd8YJe jF69ZOdGCUaoE+brV8Fhagwn2ZSnP+l8SfLa0I1fuiVftdbJyqDnAWtMr1+CWRmB1MBP W2gaHwusQ+8OBQXJ6QCsqO95QjoW91U9QJAmOVNUoQJStZyvgbuSMdv+ZCjMlA0U7rae Tl5NtA+ZkuFGlTVDKABZucrh6AAc+NK0gWafWSdSXWU5XkdgxtRMqLnA1w8G69/bySzz Zc+8j8QACXTaReH3tVUgeKCO25ahNoB5FWgRDMvt6lK0QppQ5D+ehYuKQmcckLZuoY+9 N0JA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:openpgp:autocrypt :organization:message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=cb5T434YrMu3wWKr83C7n8/vlyK6CAvAcusdkd913hM=; b=stkE7ek3uRLWkKK+0cGELv1aw/FEjla/9l70R2PGe0+ths7wNG2Mf0tIoVOcOo0pXi NSRhV869YfjaxZ6rphl4QVtIF3dLlW3ezpA1L7Br6BIgoxGCf72HspUDHlk5K/FOj/G8 6Va0L6O8X1jw+MuJAFCnQqn/KRCqsCjqNRB0HBX5Jktv2pQevK68hl0d/UlDTK8K2jG6 4NUG/qZYLIa8/1h13Mv088395y9ub/4ShJziuut/9IgJrSbOhw7Bu3miCFndnBp3/wCS ai6hJEO0rYzqv40tKyk/UlHFtI/eDGWyxt98I176N2oHvaAotHbiButFKdsKGnE2qndi iqrg== X-Gm-Message-State: APjAAAWmVtIFj2i3owaFrY48rBwYBFWL3m3Al0mkrWgNQGSYzzsiu2dz mxmIwkgNc3JbOpuqLqCB1cyZbDF6h0uqGg== X-Received: by 2002:a1c:6a11:: with SMTP id f17mr2900149wmc.110.1565078248039; Tue, 06 Aug 2019 00:57:28 -0700 (PDT) Received: from [10.1.2.12] (lmontsouris-657-1-212-31.w90-63.abo.wanadoo.fr. [90.63.244.31]) by smtp.gmail.com with ESMTPSA id 4sm200794808wro.78.2019.08.06.00.57.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 06 Aug 2019 00:57:27 -0700 (PDT) Subject: Re: [PATCH 1/3] dt-bindings: display: amlogic,meson-dw-hdmi: convert to yaml To: Rob Herring Cc: devicetree@vger.kernel.org, dri-devel , linux-amlogic@lists.infradead.org, "linux-kernel@vger.kernel.org" References: <20190805134319.737-1-narmstrong@baylibre.com> <20190805134319.737-2-narmstrong@baylibre.com> From: Neil Armstrong Openpgp: preference=signencrypt Autocrypt: addr=narmstrong@baylibre.com; prefer-encrypt=mutual; keydata= mQENBE1ZBs8BCAD78xVLsXPwV/2qQx2FaO/7mhWL0Qodw8UcQJnkrWmgTFRobtTWxuRx8WWP GTjuhvbleoQ5Cxjr+v+1ARGCH46MxFP5DwauzPekwJUD5QKZlaw/bURTLmS2id5wWi3lqVH4 BVF2WzvGyyeV1o4RTCYDnZ9VLLylJ9bneEaIs/7cjCEbipGGFlfIML3sfqnIvMAxIMZrvcl9 qPV2k+KQ7q+aXavU5W+yLNn7QtXUB530Zlk/d2ETgzQ5FLYYnUDAaRl+8JUTjc0CNOTpCeik 80TZcE6f8M76Xa6yU8VcNko94Ck7iB4vj70q76P/J7kt98hklrr85/3NU3oti3nrIHmHABEB AAG0KE5laWwgQXJtc3Ryb25nIDxuYXJtc3Ryb25nQGJheWxpYnJlLmNvbT6JATsEEwEKACUC GyMGCwkIBwMCBhUIAgkKCwQWAgMBAh4BAheABQJXDO2CAhkBAAoJEBaat7Gkz/iubGIH/iyk RqvgB62oKOFlgOTYCMkYpm2aAOZZLf6VKHKc7DoVwuUkjHfIRXdslbrxi4pk5VKU6ZP9AKsN NtMZntB8WrBTtkAZfZbTF7850uwd3eU5cN/7N1Q6g0JQihE7w4GlIkEpQ8vwSg5W7hkx3yQ6 2YzrUZh/b7QThXbNZ7xOeSEms014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COku8SYansq34QzYM0x3UFRwff+45zNBEVzctSnremg1mVgrzOfXU8rt+4N1b2MxorPF8 619aCwVP7U16qNSBaqiAJr4e5SNEnoAq18+1Gp8QsFG0ARY8xp+qaKBByWES7lRi3QbqAKZf yOHS6gmYo9gBmuAhc65/VtHMJtxwjpUeN4Bcs9HUpDMDVHdfeRa73wM+wY5potfQ5zkSp0Jp bxnv/cRBH6+c43stTffprd//4Hgz+nJcCgZKtCYIAPkUxABC85ID2CidzbraErVACmRoizhT KR2OiqSLW2x4xdmSiFNcIWkWJB6Qdri0Fzs2dHe8etD1HYaht1ZhZ810s7QOL7JwypO8dscN KTEkyoTGn6cWj0CX+PeP4xp8AR8ot4d0BhtUY34UPzjE1/xyrQFAdnLd0PP4wXxdIUuRs0+n WLY9Aou/vC1LAdlaGsoTVzJ2gX4fkKQIWhX0WVk41BSFeDKQ3RQ2pnuzwedLO94Bf6X0G48O VsbXrP9BZ6snXyHfebPnno/te5XRqZTL9aJOytB/1iUna+1MAwBxGFPvqeEUUyT+gx1l3Acl ZaTUOEkgIor5losDrePdPgE= Organization: Baylibre Message-ID: <334aa018-9f90-7218-f59c-5937d483ef79@baylibre.com> Date: Tue, 6 Aug 2019 09:57:27 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 06/08/2019 00:15, Rob Herring wrote: > On Mon, Aug 5, 2019 at 7:43 AM Neil Armstrong wrote: >> >> Now that we have the DT validation in place, let's convert the device tree >> bindings for the Amlogic Synopsys DW-HDMI specifics over to YAML schemas. >> >> The original example and usage of clock-names uses a reversed "isfr" >> and "iahb" clock-names, the rewritten YAML bindings uses the reversed >> instead of fixing the device trees order. >> >> Signed-off-by: Neil Armstrong >> --- >> .../display/amlogic,meson-dw-hdmi.txt | 119 ------------- >> .../display/amlogic,meson-dw-hdmi.yaml | 160 ++++++++++++++++++ >> 2 files changed, 160 insertions(+), 119 deletions(-) >> delete mode 100644 Documentation/devicetree/bindings/display/amlogic,meson-dw-hdmi.txt >> create mode 100644 Documentation/devicetree/bindings/display/amlogic,meson-dw-hdmi.yaml > >> diff --git a/Documentation/devicetree/bindings/display/amlogic,meson-dw-hdmi.yaml b/Documentation/devicetree/bindings/display/amlogic,meson-dw-hdmi.yaml >> new file mode 100644 >> index 000000000000..1212aa7a624f >> --- /dev/null >> +++ b/Documentation/devicetree/bindings/display/amlogic,meson-dw-hdmi.yaml >> @@ -0,0 +1,160 @@ >> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) >> +# Copyright 2019 BayLibre, SAS >> +%YAML 1.2 >> +--- >> +$id: "http://devicetree.org/schemas/display/amlogic,meson-dw-hdmi.yaml#" >> +$schema: "http://devicetree.org/meta-schemas/core.yaml#" >> + >> +title: Amlogic specific extensions to the Synopsys Designware HDMI Controller >> + >> +maintainers: >> + - Neil Armstrong >> + >> +description: | >> + The Amlogic Meson Synopsys Designware Integration is composed of >> + - A Synopsys DesignWare HDMI Controller IP >> + - A TOP control block controlling the Clocks and PHY >> + - A custom HDMI PHY in order to convert video to TMDS signal >> + ___________________________________ >> + | HDMI TOP |<= HPD >> + |___________________________________| >> + | | | >> + | Synopsys HDMI | HDMI PHY |=> TMDS >> + | Controller |________________| >> + |___________________________________|<=> DDC >> + >> + The HDMI TOP block only supports HPD sensing. >> + The Synopsys HDMI Controller interrupt is routed through the >> + TOP Block interrupt. >> + Communication to the TOP Block and the Synopsys HDMI Controller is done >> + via a pair of dedicated addr+read/write registers. >> + The HDMI PHY is configured by registers in the HHI register block. >> + >> + Pixel data arrives in "4:4:4" format from the VENC block and the VPU HDMI mux >> + selects either the ENCI encoder for the 576i or 480i formats or the ENCP >> + encoder for all the other formats including interlaced HD formats. >> + >> + The VENC uses a DVI encoder on top of the ENCI or ENCP encoders to generate >> + DVI timings for the HDMI controller. >> + >> + Amlogic Meson GXBB, GXL and GXM SoCs families embeds the Synopsys DesignWare >> + HDMI TX IP version 2.01a with HDCP and I2C & S/PDIF >> + audio source interfaces. >> + >> + The following table lists for each supported model the port number >> + corresponding to each HDMI output and input. >> + >> + Port 0 Port 1 >> + ----------------------------------------- >> + S905 (GXBB) VENC Input TMDS Output >> + S905X (GXL) VENC Input TMDS Output >> + S905D (GXL) VENC Input TMDS Output >> + S912 (GXM) VENC Input TMDS Output >> + S905X2 (G12A) VENC Input TMDS Output >> + S905Y2 (G12A) VENC Input TMDS Output >> + S905D2 (G12A) VENC Input TMDS Output > > Does this ever change? Not for this one, I could remove the table and add the description in port@0 and port@1. > >> + >> +properties: >> + compatible: >> + oneOf: >> + - items: >> + - enum: >> + - amlogic,meson-gxbb-dw-hdmi # GXBB (S905) >> + - amlogic,meson-gxl-dw-hdmi # GXL (S905X, S905D) >> + - amlogic,meson-gxm-dw-hdmi # GXM (S912) >> + - const: amlogic,meson-gx-dw-hdmi >> + - enum: >> + - amlogic,meson-g12a-dw-hdmi # G12A (S905X2, S905Y2, S905D2) >> + >> + reg: >> + maxItems: 1 >> + >> + interrupts: >> + maxItems: 1 >> + >> + clocks: >> + minItems: 3 >> + >> + clock-names: >> + items: >> + - const: isfr >> + - const: iahb >> + - const: venci >> + >> + resets: >> + minItems: 3 >> + >> + reset-names: >> + items: >> + - const: hdmitx_apb >> + - const: hdmitx >> + - const: hdmitx_phy >> + >> + hdmi-supply: >> + description: phandle to an external 5V regulator to power the HDMI logic >> + allOf: >> + - $ref: /schemas/types.yaml#/definitions/phandle >> + >> + port@0: >> + type: object >> + description: >> + A port node modeled using the OF graph >> + bindings specified in Documentation/devicetree/bindings/graph.txt. > > Would be better to say this is the VENC (or ...? input and drop the > reference (as I expect graph.txt will be replaced with graph.yaml). Yes > >> + >> + port@1: >> + type: object >> + description: >> + A port node modeled using the OF graph >> + bindings specified in Documentation/devicetree/bindings/graph.txt. >> + >> + "#address-cells": >> + const: 1 >> + >> + "#size-cells": >> + const: 0 >> + >> +required: >> + - compatible >> + - reg >> + - interrupts >> + - clocks >> + - clock-names >> + - resets >> + - reset-names >> + - port@0 >> + - port@1 >> + - "#address-cells" >> + - "#size-cells" > > Should be able to add an 'additionalProperties: false' here. Ok > >> + >> +examples: >> + - | >> + hdmi_tx: hdmi-tx@c883a000 { >> + compatible = "amlogic,meson-gxbb-dw-hdmi", "amlogic,meson-gx-dw-hdmi"; >> + reg = <0xc883a000 0x1c>; >> + interrupts = <57>; >> + resets = <&reset_apb>, <&reset_hdmitx>, <&reset_hdmitx_phy>; >> + reset-names = "hdmitx_apb", "hdmitx", "hdmitx_phy"; >> + clocks = <&clk_isfr>, <&clk_iahb>, <&clk_venci>; >> + clock-names = "isfr", "iahb", "venci"; >> + #address-cells = <1>; >> + #size-cells = <0>; >> + >> + /* VPU VENC Input */ >> + hdmi_tx_venc_port: port@0 { >> + reg = <0>; >> + >> + hdmi_tx_in: endpoint { >> + remote-endpoint = <&hdmi_tx_out>; >> + }; >> + }; >> + >> + /* TMDS Output */ >> + hdmi_tx_tmds_port: port@1 { >> + reg = <1>; >> + >> + hdmi_tx_tmds_out: endpoint { >> + remote-endpoint = <&hdmi_connector_in>; >> + }; >> + }; >> + }; >> + >> -- >> 2.22.0 >>