From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B1EF7C433EF for ; Thu, 10 Feb 2022 11:49:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=1XjvLiFpd+U+ElL+XUW1u3GGUD7RqZw1/grGC5rkv/Q=; b=px4AgOVqORP/jo vvhm4Ti67Qf4g9JiLE9HDB7LEohzfwQk7E1A832KInUAUJ+zyPP0Ss+uqXCifUO/6t2ONaLT8M/Gr d1vxJAGFMnJLEHovy6utQgPJFpWSugiPaLKOqfS089MbgPEXsP5pyVP6rPCJuhrzpPhjZvjolv+n8 qhGIa8ScpT/uZo4xxeeI6cFenhc8DqNZ0qayQwtNJjvh+LD1iyJP6B06i7+s8EIV9Nr2f8NfXHb2B stKhYe+CplkpqLX9LymNdh98f/gNrFzS8t5WcDUGI3/deydq/Y1Yp/m/EHFLgq2MGi1WCbZ+xocnI GjAnXLgjKmBgyVDG4e2g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nI7vZ-003eWF-UQ; Thu, 10 Feb 2022 11:47:58 +0000 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nI7vV-003eUc-N0 for linux-arm-kernel@lists.infradead.org; Thu, 10 Feb 2022 11:47:55 +0000 Received: from ptx.hi.pengutronix.de ([2001:67c:670:100:1d::c0]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nI7vR-00068e-Gs; Thu, 10 Feb 2022 12:47:49 +0100 Received: from sha by ptx.hi.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1nI7vO-0003JB-MC; Thu, 10 Feb 2022 12:47:46 +0100 Date: Thu, 10 Feb 2022 12:47:46 +0100 From: Sascha Hauer To: Johan Jonker Cc: dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, devicetree@vger.kernel.org, kernel@pengutronix.de, Andy Yan , Benjamin Gaignard , Michael Riesch , Sandy Huang , Heiko =?iso-8859-15?Q?St=FCbner?= , Peter Geis Subject: Re: [PATCH v5 19/23] arm64: dts: rockchip: rk3568-evb: Enable VOP2 and hdmi Message-ID: <20220210114746.GX18637@pengutronix.de> References: <20220209095350.2104049-1-s.hauer@pengutronix.de> <20220209095350.2104049-20-s.hauer@pengutronix.de> <3492afbf-b9fc-d5f5-6f7a-2157442d8209@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <3492afbf-b9fc-d5f5-6f7a-2157442d8209@gmail.com> X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-IRC: #ptxdist @freenode X-Accept-Language: de,en X-Accept-Content-Type: text/plain X-Uptime: 12:15:38 up 61 days, 20:01, 81 users, load average: 0.29, 0.17, 0.17 User-Agent: Mutt/1.10.1 (2018-07-13) X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c0 X-SA-Exim-Mail-From: sha@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-arm-kernel@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220210_034753_771319_EA297F8A X-CRM114-Status: GOOD ( 26.44 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Feb 10, 2022 at 01:10:32AM +0100, Johan Jonker wrote: > Hi Sascha, > > Something with port and endpoint gives notifications. > Somehow with the conversion of rockchip,dw-hdmi.txt to YAML not all SoC > options were checked/covered (see rk3328 and rk3568). > > Allow multiple vop: > port or > port@0 > 1x vop -> endpoint > > 2x vop -> endpoint@0 > -> endpoint@1 > > Also allow for connector: > (not all existing DT have this yet) > port@1 > -> endpoint > > See also at graph.yaml Ok, let me see if I get this right. The HDMI can either have one or two ports. It has one when the HDMI connector is not described in the device tree and two when it is. Also the first (or only) port can have one or two endpoints. It has one endpoint when the SoC has a single VOP and two endpoints when the SoC has two VOPs. It's been a painful morning because my YAML knowledge is fairly limited, but here's what I came up with: ports: $ref: /schemas/graph.yaml#/properties/ports unevaluatedProperties: false patternProperties: "^port(@0)?$": $ref: /schemas/graph.yaml#/properties/port description: Input of the DWC HDMI TX properties: endpoint: description: Connection to the VOP endpoint@0: description: Connection to the VOPB endpoint@1: description: Connection to the VOPL properties: port@1: $ref: /schemas/graph.yaml#/properties/port description: Output of the DWC HDMI TX Does this look sane to you? With this a make dtbs_check on this binding doesn't generate warnings anymore, and even better it does generate warnings when I add some wrong nodes/properties to the dts files. > === > > dtc -I dtb -O dts rk3568-evb1-v10.dtb > : Warning (avoid_unnecessary_addr_size): > /hdmi@fe0a0000/ports/port@1: unnecessary #address-cells/#size-cells > without "ranges" or child "reg" property > : Warning (graph_child_address): /hdmi@fe0a0000/ports/port@0: > graph node has single child node 'endpoint@0', > #address-cells/#size-cells are not necessary > : Warning (graph_child_address): /hdmi@fe0a0000/ports/port@1: > graph node has single child node 'endpoint', #address-cells/#size-cells > are not necessary That's easy. I dropped the @0 suffix and reg property from the node. Sascha -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel