From: Rob Herring <robh@kernel.org>
To: Kieran Bingham <kieran.bingham@ideasonboard.com>
Cc: Geert Uytterhoeven <geert+renesas@glider.be>,
Mark Rutland <mark.rutland@arm.com>,
Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Simon Horman <horms@verge.net.au>,
Magnus Damm <magnus.damm@gmail.com>,
Shawn Guo <shawnguo@kernel.org>,
Sascha Hauer <s.hauer@pengutronix.de>,
devicetree@vger.kernel.org, linux-media@vger.kernel.org,
linux-renesas-soc@vger.kernel.org
Subject: Re: [PATCH/RFC 0/2] media: adv748x: Fix decimal unit addresses
Date: Tue, 26 Jun 2018 14:13:01 -0600 [thread overview]
Message-ID: <20180626201301.GC30143@rob-hp-laptop> (raw)
In-Reply-To: <39b13aa8-ed02-5aaa-2422-728ace157ae3@ideasonboard.com>
On Thu, Jun 14, 2018 at 04:50:49PM +0100, Kieran Bingham wrote:
> Hi Geert,
>
> On 14/06/18 14:48, Geert Uytterhoeven wrote:
> > Hi Rob et al.
> >
> > Recent dtc assumes unit addresses are always hexadecimal (without
> > prefix), while the bases of reg property values depend on their
> > prefixes, and thus can be either decimal or hexadecimal.
> >
> > This leads to (with W=1):
> >
> > Warning (graph_port): video-receiver@70/port@10: graph node unit address error, expected "a"
> > Warning (graph_port): video-receiver@70/port@11: graph node unit address error, expected "b"
> >
> > In this particular case, the unit addresses are (assumed hexadecimal) 10
> > resp. 11, while the reg properties are decimal 10 resp. 11, and thus
> > don't match.
> >
> > This RFC patch series corrects the unit addresses to match the reg
> > address values for the DT bindings for adi,adv748x and its users.
> > There's at least one other violator (port@10 in
> > arch/arm/boot/dts/vf610-zii-dev-rev-c.dts), which I didn't fix.
> >
> > However, ePAPR v1.1 states:
> >
> > The unit-address component of the name is specific to the bus type
> > on which the node sits. It consists of one or more ASCII characters
> > from the set of characters in Table 2-1. The unit-address must match
> > the first address specified in the reg property of the node. If the
> > node has no reg property, the @ and unit-address must be omitted and
> > the node-name alone differentiates the node from other nodes at the
> > same level in the tree. The binding for a particular bus may specify
> > additional, more specific requirements for the format of reg and the
> > unit-address.
> >
> > i.e. nothing about an hexadecimal address requirement?
No, because unit-addresses are bus specific, so in theory a bus could
use decimal. However, it's pretty well established practice to use hex.
> > Should this series be applied, or should the warnings be ignored, until
> > dtc is fixed?
>
> IMO - the ports are human readable indexes, and not hexadecimal. I'd be
> loathed to see these become hex. .. especially if not prefixed by a 0x...
I read hex. :)
> Otherwise, is '10', Ten, or Sixteen? IMO - no 0x = decimal only.
It's hex because *everywhere* else is hex. Having a mixture would just
invite more confusion and errors (especially because dtc only checks
cases it knows the bus type).
For OF graph, I'm not that worried about it because 99% of the users
have 10 or less ports/endpoints.
> That said - I look up and see "video-receiver@70", which is of course the
> hexadecimal I2C address :(
It is bad enough that I2C addresses get expressed in both 7 and 8-bits
(shifted up 1), using decimal there would be really fun.
Rob
prev parent reply other threads:[~2018-06-26 20:13 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-14 13:48 [PATCH/RFC 0/2] media: adv748x: Fix decimal unit addresses Geert Uytterhoeven
2018-06-14 13:48 ` [PATCH/RFC 1/2] media: dt-bindings: " Geert Uytterhoeven
2018-06-26 19:56 ` Rob Herring
2018-08-16 8:40 ` Kieran Bingham
2018-06-14 13:48 ` [PATCH/RFC 2/2] arm64: dts: renesas: salvator-common: Fix adv7482 " Geert Uytterhoeven
2018-06-14 15:53 ` Kieran Bingham
2018-06-26 19:57 ` Rob Herring
2018-06-27 15:10 ` Simon Horman
2018-06-27 16:40 ` Geert Uytterhoeven
2018-06-27 16:45 ` Kieran Bingham
2018-06-28 8:47 ` Simon Horman
2018-06-28 8:52 ` Geert Uytterhoeven
2018-06-28 12:25 ` Simon Horman
2018-06-14 15:50 ` [PATCH/RFC 0/2] media: adv748x: Fix " Kieran Bingham
2018-06-26 20:13 ` Rob Herring [this message]
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=20180626201301.GC30143@rob-hp-laptop \
--to=robh@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=geert+renesas@glider.be \
--cc=horms@verge.net.au \
--cc=kieran.bingham+renesas@ideasonboard.com \
--cc=kieran.bingham@ideasonboard.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-media@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=magnus.damm@gmail.com \
--cc=mark.rutland@arm.com \
--cc=mchehab@kernel.org \
--cc=s.hauer@pengutronix.de \
--cc=shawnguo@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: link
Be 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