LKML Archive on lore.kernel.org help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com> To: "Niklas Söderlund" <niklas.soderlund@ragnatech.se> Cc: Jacopo Mondi <jacopo+renesas@jmondi.org>, 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 [thread overview] Message-ID: <3200357.ZFfGXgsVol@avalon> (raw) In-Reply-To: <20180514094900.GF30519@bigcity.dyn.berto.se> Hi Niklas, On Monday, 14 May 2018 12:49:00 EEST Niklas Söderlund wrote: > On 2018-05-14 05:49:41 +0300, Laurent Pinchart wrote: > > [snip] > > >>> +&vin4 { > >>> + pinctrl-0 = <&vin4_pins>; > >>> + pinctrl-names = "default"; > >>> + > >>> + status = "okay"; > >>> + > >>> + ports { > >>> + #address-cells = <1>; > >>> + #size-cells = <0>; > >>> + > >>> + port@0 { > >>> + reg = <0>; > >>> + vin4_in: endpoint { > >>> + hsync-active = <0>; > >>> + vsync-active = <0>; > >> > >> Comparing this to the Gen2 bindings some properties are missing, > >> > >> bus-width = <24>; > >> pclk-sample = <1>; > >> data-active = <1>; > >> > >> 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. > > > > I think the VIN DT bindings should be updated to explicitly list the > > endpoint properties that are mandatory, optional, or not allowed. > > 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 device will require a particular property or not. It's the responsibility of device DT bindings to refine the bindings description. The VIN DT bindings should explicitly list the properties that apply to the VIN and tell whether they're optional or mandatory for the VIN. For optional properties, the default behaviour when the property is not specified should be documented too. For instance, does VIN support selecting which pixel clock edge to sample data on ? If so the pclk-sample property should listed as either mandatory or 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. How > 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 be interpreted in the context of the remote node's DT bindings, which the driver doesn't know about. Parsing OF graph properties (ports and endpoints) is an exception, as by connecting a remote node to the local node with OF graph properties you imply that the remote node uses OF graph DT bindings, so 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 as inverter gates between the two devices. They can thus be different on the two sides, that's perfectly valid. The VIN driver should parse its local properties, not the remote properties. -- Regards, Laurent Pinchart
next prev parent reply other threads:[~2018-05-14 16:51 UTC|newest] Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-05-11 9:59 [PATCH 0/3] arm64: dts: Draak: Enable HDMI input and VIN4 Jacopo Mondi 2018-05-11 10:00 ` [PATCH 1/3] dt-bindings: media: rcar-vin: Add R8A77995 support Jacopo Mondi 2018-05-11 11:22 ` Niklas Söderlund 2018-05-11 13:35 ` Simon Horman 2018-05-15 8:36 ` jacopo mondi 2018-05-16 7:49 ` Simon Horman 2018-05-14 2:31 ` Laurent Pinchart 2018-05-11 10:00 ` [PATCH 2/3] arm64: dts: renesas: r8a77995: Add VIN4 Jacopo Mondi 2018-05-11 11:25 ` Niklas Söderlund 2018-05-11 13:45 ` Simon Horman 2018-05-13 18:30 ` jacopo mondi 2018-05-14 2:36 ` Laurent Pinchart 2018-05-15 7:06 ` Simon Horman 2018-05-11 10:00 ` [PATCH 3/3] arm64: dts: renesas: draak: Describe HDMI input Jacopo Mondi 2018-05-13 8:17 ` Simon Horman 2018-05-13 11:56 ` Niklas Söderlund 2018-05-13 12:57 ` Niklas Söderlund 2018-05-14 2:49 ` Laurent Pinchart 2018-05-14 9:49 ` Niklas Söderlund 2018-05-14 10:11 ` Niklas Söderlund 2018-05-14 16:52 ` Laurent Pinchart [this message] 2018-05-14 7:39 ` jacopo mondi 2018-05-14 10:23 ` Niklas Söderlund 2018-05-14 17:03 ` Laurent Pinchart 2018-05-14 20:33 ` [PATCH 0/3] arm64: dts: Draak: Enable HDMI input and VIN4 Geert Uytterhoeven 2018-05-15 7:09 ` Simon Horman
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=3200357.ZFfGXgsVol@avalon \ --to=laurent.pinchart@ideasonboard.com \ --cc=devicetree@vger.kernel.org \ --cc=geert@glider.be \ --cc=horms@verge.net.au \ --cc=jacopo+renesas@jmondi.org \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-renesas-soc@vger.kernel.org \ --cc=magnus.damm@gmail.com \ --cc=niklas.soderlund@ragnatech.se \ --cc=robh+dt@kernel.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).