Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp3834958ybh; Tue, 17 Mar 2020 07:27:59 -0700 (PDT) X-Google-Smtp-Source: ADFU+vth5Su8xt3e75/fOqu49y+/oH3UDND0VMwP+1nMaVUHU4yTVP0v1dvgWrKq6LvvpG9gGQwq X-Received: by 2002:a9d:369:: with SMTP id 96mr3653622otv.174.1584455279048; Tue, 17 Mar 2020 07:27:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584455279; cv=none; d=google.com; s=arc-20160816; b=u3PvlkOcMCXSwNlcQDNhFofd4GkO+lsDtci1FgVGfU101+MZj2mAJ575jg6n1Q+R21 sED7/LiNR/4NYp4sLuMQtB1tPEdDo8Wkh4rWaGB1OpCiXUNZLH+fh0DCj623fRHhof7/ pyeGUgvimz4AQ8U23OhwAFe7w6ca6BHVTeUTelydcBVYgXb2c0TKWZZj52/2f3EKYOsq hr6y4YRs4Cl/Pwftq/WFnnqr6hYgBHE+wATwu2EVOwKzqc50CeNyXsTyMpyq2ck32lfz sEIHbrF51fjk/yqG3X3lzjr8yeONveHfHWhz9hnQXF3y5fgFF97UMBut9/n1D313kfMq QUGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=s22Yxti3OiZd9ZbY/w6nHE+bND0pIGqGd5TzWTzkh74=; b=xkSdlify5ldzvdrxXIKj1uJL7hSvOU7rK947sgQQCDM1lW/Tqc+RtBbAHogb15tBMr TDV2pqgjWo7lNJXcYFGD/+s7nD12M2wMUiARitnjC7bHEUzg43VHAWmiFcN5PjCarrF1 FPs/QIsZBecC5+ixenwr98D69ml+gSLKri413SzcsaHRcMkfBqsqWbj19rRqfmZHsLil veIdsb3qLrFVNuftP75louKHGkPTLyzH7AbOtLQqm7nTJcMtgqAaPUZ7Prd2Gosz+fLZ 1yPSxcH+SXa8mDWGiqEzCwGlXlFczIItSzuFlFobRQFZNShfVEXuypFGGErKcTaVrTEy ridA== ARC-Authentication-Results: i=1; mx.google.com; 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 n2si1882469otf.117.2020.03.17.07.27.44; Tue, 17 Mar 2020 07:27:59 -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; 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 S1726597AbgCQO1K (ORCPT + 99 others); Tue, 17 Mar 2020 10:27:10 -0400 Received: from asavdk3.altibox.net ([109.247.116.14]:44840 "EHLO asavdk3.altibox.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726345AbgCQO1J (ORCPT ); Tue, 17 Mar 2020 10:27:09 -0400 Received: from ravnborg.org (unknown [158.248.194.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by asavdk3.altibox.net (Postfix) with ESMTPS id 2158F20031; Tue, 17 Mar 2020 15:27:04 +0100 (CET) Date: Tue, 17 Mar 2020 15:27:02 +0100 From: Sam Ravnborg To: Vinay Simha B N Cc: Andrzej Hajda , Laurent Pinchart , David Airlie , Daniel Vetter , "open list:DRM DRIVERS" , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , open list , Rob Herring Subject: Re: [PATCH 1/2] dt-binding: Add DSI/LVDS tc358775 bridge bindings Message-ID: <20200317142702.GA16338@ravnborg.org> References: <1583920112-2680-1-git-send-email-simhavcs@gmail.com> <20200312151752.GA7490@bogus> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-CMAE-Score: 0 X-CMAE-Analysis: v=2.3 cv=eMA9ckh1 c=1 sm=1 tr=0 a=UWs3HLbX/2nnQ3s7vZ42gw==:117 a=UWs3HLbX/2nnQ3s7vZ42gw==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=kj9zAlcOel0A:10 a=gEfo2CItAAAA:8 a=pGLkceISAAAA:8 a=KY18R1YYeKRrVLQ61OwA:9 a=5V_uxFQuYriqKHR4:21 a=H5yeRiyAWD2ozbk7:21 a=CjuIK1q_8ugA:10 a=sptkURWiP4Gy88Gu7hUp:22 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Vinay. On Tue, Mar 17, 2020 at 12:25:42PM +0530, Vinay Simha B N wrote: > sam, > > i need some inputs on the below error. I had created this file > Documentation/devicetree/bindings/display/bridge/toshiba-tc358775.yaml > by using vim editor. Do we have any tool to create yaml file? I use vim myself, but is careful to follow the right syntax. > > i do not get the error when running 'make dt_binding_check' in my > build environment > Documentation/devicetree/bindings/display/bridge/toshiba-tc358775.yaml > > is there any tool available similar to scripts/checkpatch.pl -f > , for yaml files? Please read Documentation/devicetree/writing-schema. Here you can find general info + instruction how to install the tools required for "make dt_binding_check". I could reproduce the error reported by Rob. I gave your binding file a shot - there were a lot of smaller issues: - do not use tabs in yaml files - be consistent in indent - vendor prefixed properties needed some extra care - example was full of bugs - "..." - no need for status = "okay"; - properties spelled wrong For the example I adjusted it to use indent of 4 spaces, which IMO is more readable than the two spaces used in the other parts of the file. I have attached the updated binding file - please review and fix. This is just a quick shot, I did not do a proper review. Please rename the file, other files in same dir are named "toshiba,xxx", so replace '-' with ','. And try to introduce bugs in the example - and check that the tooling catches the bug. hint: make DT=.../foo.yaml dt_binding_check is a qucik way to check only your binding. And for new bindings the preferred license is: (GPL-2.0-only OR BSD-2-Clause) Sam # SPDX-License-Identifier: GPL-2.0 %YAML 1.2 --- $id: http://devicetree.org/schemas/display/bridge/toshiba-tc358775.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# title: Toshiba TC358775 DSI to LVDS bridge bindings maintainers: - Vinay Simha BN description: | This binding supports DSI to LVDS bridge TC358775 properties: compatible: const: toshiba,tc358775 reg: maxItems: 1 description: i2c address of the bridge, 0x0f toshiba,dsi-lanes: allOf: - $ref: /schemas/types.yaml#/definitions/uint32 - minimum: 1 maximum: 4 default: 1 description: bla bla toshiba,dual-link: $ref: /schemas/types.yaml#definitions/flag description: bla bla vdd-supply: maxItems: 1 description: 1.2V LVDS Power Supply vddio-supply: maxItems: 1 description: 1.8V IO Power Supply stby-gpios: maxItems: 1 description: Standby pin, Low active reset-gpios: maxItems: 1 description: Hardware reset, Low active ports: type: object properties: port@0: type: object description: | DSI Input. The remote endpoint phandle should be a reference to a valid mipi_dsi_host device node. port@1: type: object description: | Video port for LVDS output (panel or connector). required: - port@0 - port@1 required: - compatible - reg - tc,dsi-lanes - vdd-supply - vddio-supply - stby-gpios - reset-gpios - ports examples: - |+ #include i2c@78b8000 { #address-cells = <1>; #size-cells = <0>; /* On High speed expansion */ label = "HS-I2C2"; status = "okay"; tc_bridge: bridge@f { compatible = "toshiba,tc358775"; reg = <0x0f>; tc,dsi-lanes = <4>; tc,dual-link = <0>; vdd-supply = <&pm8916_l2>; vddio-supply = <&pm8916_l6>; stby-gpios = <&msmgpio 99 GPIO_ACTIVE_LOW>; reset-gpios = <&msmgpio 72 GPIO_ACTIVE_LOW>; ports { #address-cells = <1>; #size-cells = <0>; port@0 { reg = <0>; d2l_in: endpoint { remote-endpoint = <&dsi0_out>; }; }; port@1 { reg = <1>; d2l_out: endpoint { remote-endpoint = <&panel_in>; }; }; }; }; }; panel: auo,b101xtn01 { status = "okay"; compatible = "auo,b101xtn01", "panel-lvds"; power-supply = <&pm8916_l14>; width-mm = <223>; height-mm = <125>; data-mapping = "jeida-24"; panel-timing { /* 1366x768 @60Hz */ clock-frequency = <72000000>; hactive = <1366>; vactive = <768>; hsync-len = <70>; hfront-porch = <20>; hback-porch = <0>; vsync-len = <42>; vfront-porch = <14>; vback-porch = <0>; }; port { panel_in: endpoint { remote-endpoint = <&d2l_out>; }; }; }; mdss { dsi@1a98000 { ports { port@1 { dsi0_out: endpoint { remote-endpoint = <&d2l_in>; data-lanes = <0 1 2 3>; }; }; }; }; }; ...