Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp11691334rwl; Tue, 3 Jan 2023 03:21:44 -0800 (PST) X-Google-Smtp-Source: AMrXdXs/jciW9fnbEejz9hHNDsvnaUcpUhQD+zW+dE3cO9mqzaROo0cyd8XLj0GKwOw6AyzNe2WL X-Received: by 2002:a05:6a20:3b87:b0:af:7762:3c29 with SMTP id b7-20020a056a203b8700b000af77623c29mr54588717pzh.10.1672744904713; Tue, 03 Jan 2023 03:21:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672744904; cv=none; d=google.com; s=arc-20160816; b=RvTVujBAgYlU79xEBQQ0xLJ1Pzn4Vxw9pYwsNQdpHtv9Wd8HXgliNoXGfdTh/cOUn5 WXwmJhH3SGGaDBOFrvItWU/FVn+1LSjZbrysVj9Kff2Myn6bIZJTLUMRlhk6GsH8Lqg3 7A1fAvCRKkl1Kg7M81gvSiIlsjsDt0oRBYytcum0ykWgoxJU4GuTDz0TWThsP/gjIYRF D2eTUlka4n3Y4kB5lvL3No0dwqd3EUQzDv5pJZMzaMsAdbNlHmc/HPmsE+DLUkIS37kw bsmmlzaLb3wpjp6eGR0uBP1y0oNK8bFDjcH9pRxc1fYnKSDudQZcROJ/T+8gVssZGrF7 t/SA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=MYxboYbzJR4OvXvxpcEQ87njqCWGC/PDqKTVrCSJiAs=; b=bwDFIFDlndL99nud8f6LgZ2KFAls2rQ2jIf0igm8wac/TjALhdTXkxm+w3kSG3o8mU PNk5/9cIK1fl4zMc2Y01RFYsPn5gI8eDv8La+RRn56Z8xU4Ceh/oNr/VzV3xVeBKvWPY QuCqBNFCJOkBDpCZjROw8ucG/8/YHoERSswgY52MOVhdzr2WTYULy/ywtZkeoG/LC/Kc vrJu7ScLzye/w2/55TP6RHXQwv5XpobcYQgMZSW8DC3ff4SPsTb1xFNTvmuO2hy0jqPd rvBOpaI3lNNsqTH1+h0aq0NVKCs5Iem4bHWQjIyPeFQtHC59PFop0MpbMUJ1DrFVw1tp 2Swg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=HywghCs+; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c4-20020a63ea04000000b0046ff26f21f0si31118210pgi.503.2023.01.03.03.21.36; Tue, 03 Jan 2023 03:21:44 -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=@ti.com header.s=ti-com-17Q1 header.b=HywghCs+; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232887AbjACLDp (ORCPT + 61 others); Tue, 3 Jan 2023 06:03:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46016 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236816AbjACLDU (ORCPT ); Tue, 3 Jan 2023 06:03:20 -0500 Received: from lelv0142.ext.ti.com (lelv0142.ext.ti.com [198.47.23.249]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 329E9FAFE; Tue, 3 Jan 2023 03:03:19 -0800 (PST) Received: from fllv0034.itg.ti.com ([10.64.40.246]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 303B2hbV053461; Tue, 3 Jan 2023 05:02:43 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1672743763; bh=MYxboYbzJR4OvXvxpcEQ87njqCWGC/PDqKTVrCSJiAs=; h=Date:Subject:To:CC:References:From:In-Reply-To; b=HywghCs+8v2SpbkpRvg0oUkcmi5mXNkXDrmJOorl0xHf39M19DgRxj3KWVV8vwuJD dpQwDVLmUUs6mEbekQpmOHi5FU809nVcNoGCBaF/JGw6g+Cy/EEy30U1SXtB5J6f/U dgzmH5JzqKi+CT2mgjCQlNx3AtfsNwsX9PoU17vw= Received: from DLEE107.ent.ti.com (dlee107.ent.ti.com [157.170.170.37]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 303B2huJ059716 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 3 Jan 2023 05:02:43 -0600 Received: from DLEE113.ent.ti.com (157.170.170.24) by DLEE107.ent.ti.com (157.170.170.37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16; Tue, 3 Jan 2023 05:02:42 -0600 Received: from lelv0327.itg.ti.com (10.180.67.183) by DLEE113.ent.ti.com (157.170.170.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16 via Frontend Transport; Tue, 3 Jan 2023 05:02:42 -0600 Received: from [172.24.217.116] (ileaxei01-snat.itg.ti.com [10.180.69.5]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id 303B2UDr029452; Tue, 3 Jan 2023 05:02:31 -0600 Message-ID: <32d66fb7-6c63-0985-222f-0bd3c36c165d@ti.com> Date: Tue, 3 Jan 2023 16:32:30 +0530 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 Subject: Re: [RFC PATCH 3/4] dt-bindings: panel: Introduce dual-link LVDS panel Content-Language: en-US To: Krzysztof Kozlowski , Rob Herring , Krzysztof Kozlowski , Tomi Valkeinen , Jyri Sarha , David Airlie , Daniel Vetter , Laurent Pinchart , Thierry Reding , Sam Ravnborg , Maxime Ripard , Liam Girdwood , Mark Brown , Lad Prabhakar , Paul Walmsley , Palmer Dabbelt , Albert Ou , Matthias Brugger , Guo Ren CC: DRI Development List , Devicetree List , Linux Kernel List , Linux RISC-V List , Linux ARM Kernel List , Linux Mediatek List , Linux C-SKY Arch List , Nishanth Menon , Vignesh Raghavendra , Rahul T R , Devarsh Thakkar , Jai Luthra , Jayesh Choudhary References: <20230103064615.5311-1-a-bhatia1@ti.com> <20230103064615.5311-4-a-bhatia1@ti.com> <85837957-f6d2-4722-7693-98c6cf932096@linaro.org> From: Aradhya Bhatia In-Reply-To: <85837957-f6d2-4722-7693-98c6cf932096@linaro.org> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_MED,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 Hi Krzysztof, Thank you for reviewing the patches! On 03-Jan-23 14:02, Krzysztof Kozlowski wrote: > On 03/01/2023 07:46, Aradhya Bhatia wrote: >> Dual-link LVDS interfaces have 2 links, with even pixels traveling on >> one link, and odd pixels on the other. These panels are also generic in >> nature, with no documented constraints, much like their single-link >> counterparts, "panel-lvds". >> >> Add a new compatible, "panel-dual-lvds", and a dt-binding document for >> these panels. >> >> Signed-off-by: Aradhya Bhatia >> --- >> .../display/panel/panel-dual-lvds.yaml | 157 ++++++++++++++++++ >> MAINTAINERS | 1 + >> 2 files changed, 158 insertions(+) >> create mode 100644 Documentation/devicetree/bindings/display/panel/panel-dual-lvds.yaml >> >> diff --git a/Documentation/devicetree/bindings/display/panel/panel-dual-lvds.yaml b/Documentation/devicetree/bindings/display/panel/panel-dual-lvds.yaml >> new file mode 100644 >> index 000000000000..88a7aa2410be >> --- /dev/null >> +++ b/Documentation/devicetree/bindings/display/panel/panel-dual-lvds.yaml >> @@ -0,0 +1,157 @@ >> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) >> +%YAML 1.2 >> +--- >> +$id: http://devicetree.org/schemas/display/panel/panel-dual-lvds.yaml# >> +$schema: http://devicetree.org/meta-schemas/core.yaml# >> + >> +title: Generic Dual-Link LVDS Display Panel >> + >> +maintainers: >> + - Aradhya Bhatia >> + - Thierry Reding >> + >> +description: | >> + A dual-LVDS interface is a dual-link connection with the even pixels >> + traveling on one link, and the odd pixels traveling on the other. >> + >> +allOf: >> + - $ref: panel-common.yaml# >> + - $ref: /schemas/display/lvds.yaml/# > > Drop trailing / Okay, will do! > >> + >> +properties: >> + compatible: >> + oneOf: >> + - items: >> + - enum: >> + - lincolntech,lcd185-101ct >> + - microtips,13-101hieb0hf0-s >> + - const: panel-dual-lvds >> + - const: panel-dual-lvds > > You cannot have this compatible alone Okay, will make the change! > >> + >> + ports: >> + $ref: /schemas/graph.yaml#/properties/ports >> + >> + properties: >> + port@0: >> + $ref: /schemas/graph.yaml#/$defs/port-base >> + unevaluatedProperties: false >> + description: The sink for first set of LVDS pixels. >> + >> + properties: >> + dual-lvds-odd-pixels: >> + type: boolean >> + >> + dual-lvds-even-pixels: >> + type: boolean >> + >> + oneOf: >> + - required: [dual-lvds-odd-pixels] >> + - required: [dual-lvds-even-pixels] >> + >> + port@1: >> + $ref: /schemas/graph.yaml#/$defs/port-base >> + unevaluatedProperties: false >> + description: The sink for second set of LVDS pixels. >> + >> + properties: >> + dual-lvds-even-pixels: >> + type: boolean >> + >> + dual-lvds-odd-pixels: >> + type: boolean >> + >> + oneOf: >> + - required: [dual-lvds-even-pixels] >> + - required: [dual-lvds-odd-pixels] >> + >> + allOf: >> + - if: >> + properties: >> + port@0: >> + properties: >> + dual-lvds-odd-pixels: true > > That's not correct clause. It has no effect. The idea behind this is to check the presence of the boolean property. if (dual-lvds-odd-pixels is present) then [..] I tried implementing this: [..] dual-lvds-odd-pixels: - const: true [..] But this is throwing an error. I am confused what else could be done. Can you please suggest what might be a more accurate check here? > >> + required: >> + - dual-lvds-odd-pixels >> + then: >> + properties: >> + port@1: >> + properties: >> + dual-lvds-even-pixels: true >> + dual-lvds-odd-pixels: false > > Why do you need this? Your oneOf before already solves it. I agree with your comment here. It makes sense to only have dual-lvds-even-pixels: true and have the oneOf condition take care of the other. But, I just tested this and it was unable to pick-up this intentionally-added error. I added 'dual-lvds-odd-pixels' property to both the nodes, and dt_binding_check passes successfully (which it should have not.) Instead, if I only keep this, dual-lvds-odd-pixels: false then the dt_binding_check detects the error as it should. Regardless, I am curious why the first method doesn't work. Will try to explore more on that. > >> + >> + - if: >> + properties: >> + port@0: >> + properties: >> + dual-lvds-even-pixels: true >> + required: >> + - dual-lvds-even-pixels >> + then: >> + properties: >> + port@1: >> + properties: >> + dual-lvds-odd-pixels: true >> + dual-lvds-even-pixels: false >> + >> + required: >> + - port@0 >> + - port@1 >> + >> + port: false >> + >> +unevaluatedProperties: false >> + >> +required: >> + - compatible >> + - width-mm >> + - height-mm >> + - data-mapping >> + - panel-timing >> + - ports >> + >> +examples: >> + - |+ > > Drop + Okay! > >> + panel-dual-lvds { > > Just "panel". Node names should be generic. Alright. Will make the change! > >> + compatible = "microtips,13-101hieb0hf0-s", "panel-dual-lvds"; >> + >> + width-mm = <217>; >> + height-mm = <136>; >> + > Regards Aradhya