Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp4649027imm; Mon, 14 May 2018 10:31:36 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrFUqGChsdYfJLFbMW6gD4rMZSWYheBtnOkirSTwZklawyqJN/13b+zJOguqd46+LaNKmEB X-Received: by 2002:a17:902:6041:: with SMTP id a1-v6mr10784127plt.59.1526319096564; Mon, 14 May 2018 10:31:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526319096; cv=none; d=google.com; s=arc-20160816; b=hTviV/6N8hi07fl7ytNMXmClsVSb6zf4GqeeSHyOEsy6SR/ES5sdErZ5ggQziF9VF3 qrf3S1yAPIKZspuCeu4+hpOjstWXfU4ppFoRhXmRXLdPPN3kKA6BTpAkD/F/EXMcUg7C V2dTH7VQ+h74GJxFteJskJOHMoTpFdI8T7qkLqwMAPJu2quxnudL5v8CItxiuDA0L3DQ sAUYx3lFOn2+Ff2ofV9irLpkdu+5/SHtqMHTel4Rh9iCnMjskq4JoER7gZUNKW7Fb75P 5OaZZr/KOd8Y+Vyqt70BK19Q/Xilex3j8I5hUGT38c1IkgZbUPJgxI1NBAWaspj+beQf vHYQ== 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:mime-version :references:in-reply-to:organization:message-id:date:subject:cc:to :from:dkim-signature:arc-authentication-results; bh=hwiTqDhiyYCt+OMV7Hwm/ZB5BDLxSJ8wjIooX0QwhYU=; b=r8cGv4BjrHXXcFidg/ObuCYGSozDMBmNxZhLe/4IyU8EVYHmfAho8a50e1Tg6HlglO O+WTSW4DIoGyMRzn+gWYNEfkQ0ifvzEFiFKMrBCtiXKg+Kae8ZqdN6xJQgAVOx9RRS79 PYIj1dS2x53BkZ5FGj1Jl77i31d865VmLKU2AwnGcbipFZzjC2so2Ax/VtWkzi8MIvaT X+thQyLA1ohYCnW/lTReZM6/Q9zBjwXHx0jgtFlJV8mL70GMfdBdgqCyIavV11mZSmFA xfzv1U0X8tGbHAe5YLCwtvGlxlD6qIZ+K0w3WjbFxglZHYUullQ1x06TIz48nSj72VEQ PiLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=K6aQ/ZVK; 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 y15-v6si7654675pgv.69.2018.05.14.10.31.22; Mon, 14 May 2018 10:31:36 -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 (test mode) header.i=@ideasonboard.com header.s=mail header.b=K6aQ/ZVK; 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 S932525AbeENQvx (ORCPT + 99 others); Mon, 14 May 2018 12:51:53 -0400 Received: from perceval.ideasonboard.com ([213.167.242.64]:41462 "EHLO perceval.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752407AbeENQvw (ORCPT ); Mon, 14 May 2018 12:51:52 -0400 Received: from avalon.localnet (p5013098-ipngn2602marunouchi.tokyo.ocn.ne.jp [153.222.88.98]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 0BB3F614F; Mon, 14 May 2018 18:51:46 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1526316710; bh=r/3CXr9LHW7nKqdlrkr8O08iqrJUHUECnzzh7enVmRM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=K6aQ/ZVKd1oiNM2ChZAXcmspAmK44ZVR4mzkbeM/RnIgaU3eD3sO7QQiJHNP/U+1b Ih7RB+/83Xty6JzgLGsEVUsEbFK/yiPSnT0JJptqcjuiAmzqvpZmZXZSUzoA+dAcbh m8g5ClAIXM0+SidrSNO/EX/fi9lEsqY1WsuSuLpg= From: Laurent Pinchart To: Niklas =?ISO-8859-1?Q?S=F6derlund?= Cc: Jacopo Mondi , horms@verge.net.au, geert@glider.be, magnus.damm@gmail.com, robh+dt@kernel.org, linux-renesas-soc@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 3/3] arm64: dts: renesas: draak: Describe HDMI input Date: Mon, 14 May 2018 19:52:07 +0300 Message-ID: <3200357.ZFfGXgsVol@avalon> Organization: Ideas on Board Oy In-Reply-To: <20180514094900.GF30519@bigcity.dyn.berto.se> References: <1526032802-14376-1-git-send-email-jacopo+renesas@jmondi.org> <26780153.JLo9OE30iv@avalon> <20180514094900.GF30519@bigcity.dyn.berto.se> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="iso-8859-1" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Niklas, On Monday, 14 May 2018 12:49:00 EEST Niklas S=F6derlund wrote: > On 2018-05-14 05:49:41 +0300, Laurent Pinchart wrote: >=20 > [snip] >=20 > >>> +&vin4 { > >>> + pinctrl-0 =3D <&vin4_pins>; > >>> + pinctrl-names =3D "default"; > >>> + > >>> + status =3D "okay"; > >>> + > >>> + ports { > >>> + #address-cells =3D <1>; > >>> + #size-cells =3D <0>; > >>> + > >>> + port@0 { > >>> + reg =3D <0>; > >>> + vin4_in: endpoint { > >>> + hsync-active =3D <0>; > >>> + vsync-active =3D <0>; > >>=20 > >> Comparing this to the Gen2 bindings some properties are missing, > >>=20 > >> bus-width =3D <24>; > >> pclk-sample =3D <1>; > >> data-active =3D <1>; > >>=20 > >> This is not a big deal as the VIN driver don't use these properties so > >> no functional change should come of this but still a difference. > >=20 > > I think the VIN DT bindings should be updated to explicitly list the > > endpoint properties that are mandatory, optional, or not allowed. >=20 > I think it's documented as it reference video-interfaces.txt which lists > all these properties as optional. And in deed they are all optional. I don't think that's good enough. They're all listed as optional in video- interfaces.txt as the generic documentation can't know whether a particular= =20 device will require a particular property or not. It's the responsibility o= f=20 device DT bindings to refine the bindings description. The VIN DT bindings= =20 should explicitly list the properties that apply to the VIN and tell whethe= r=20 they're optional or mandatory for the VIN. For optional properties, the=20 default behaviour when the property is not specified should be documented t= oo. =46or instance, does VIN support selecting which pixel clock edge to sample= data=20 on ? If so the pclk-sample property should listed as either mandatory or=20 optional with a documented default, even if not used by the driver today. > If the VIN driver makes use of all the optional ones is another matter. H= ow > do we know that the remote subdevice is not looking at its remote > endpoint for bus parameters not considered by the rcar-vin driver? No driver should parse properties of remote nodes, as those properties are = to=20 be interpreted in the context of the remote node's DT bindings, which the=20 driver doesn't know about. Parsing OF graph properties (ports and endpoints= )=20 is an exception, as by connecting a remote node to the local node with OF=20 graph properties you imply that the remote node uses OF graph DT bindings, = so=20 those properties (and only those properties) can be parsed. > The thing is that the rcar-vin driver only looks at the remote endpoint > for these properties and ignores the on its local endpoint. Maybe some > v4l2 framework change is needed here to make sure the bus properties are > the same on both endpoints of a link. But I fear such a change would > break a lot of stuff. Properties are specified on both endpoints to account for components such a= s=20 inverter gates between the two devices. They can thus be different on the t= wo=20 sides, that's perfectly valid. The VIN driver should parse its local=20 properties, not the remote properties. =2D-=20 Regards, Laurent Pinchart