devicetree-compiler.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Chan Kim" <ckim-mINagvnPBMnWF1p7bDn8Kw@public.gmane.org>
To: devicetree-compiler-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: A question about generated phandle during dtb=>dts conversion
Date: Tue, 2 Nov 2021 18:03:27 +0900	[thread overview]
Message-ID: <005e01d7cfc8$8034c5f0$809e51d0$@etri.re.kr> (raw)

Hello, all
I extracted a dtb file from qemu execution (arm virt machine) and converted
the dtb file to dts file using dtc.
But for some node that is referenced by other nodes, the phandle is
generated like “phandle = <0x8000>” as shown below.

apb-pclk {
        phandle = <0x8000>;
        clock-output-names = "clk24mhz";
        clock-frequency = <0x16e3600>;
        #clock-cells = <0x00>;
        compatible = "fixed-clock";
    };

And another node is using this phandle like this. (the clocks is the phandle
for the apb-pclk above.)

pl061@9030000 {
        phandle = <0x8003>;
        clock-names = "apb_pclk";
        clocks = <0x8000>;
        interrupts = <0x00 0x07 0x04>;
        gpio-controller;
        #gpio-cells = <0x02>;
        compatible = "arm,pl061\0arm,primecell";
        reg = <0x00 0x9030000 0x00 0x1000>;
    };

When I convert the dts back to the dtb, dtc doesn’t understand the phandle
and complains that it is not a phandle referenece.

dts.dts:276.3-21: Warning (clocks_property): /pl061@9030000:clocks: cell 0
is not a phandle reference

I’ve checked event with this warning, the phandle reference is being
preserved through out the procedure.
So, if I want to extract a dtb and convert it to dts, edit some and convert
it back to dtb, how can I prevent this kind of phandle warning? 
And why doesn't dtc add labels to the referenced nodes and let other nodes
use that label as phandle?

Thank you!
Regards,

Chan Kim




             reply	other threads:[~2021-11-02  9:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-02  9:03 Chan Kim [this message]
2021-11-03  2:34 ` A question about generated phandle during dtb=>dts conversion David Gibson
2021-11-03  9:06   ` Chan Kim
2021-11-05  3:57     ` 'David Gibson'

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='005e01d7cfc8$8034c5f0$809e51d0$@etri.re.kr' \
    --to=ckim-minagvnpbmnwf1p7bdn8kw@public.gmane.org \
    --cc=devicetree-compiler-u79uwXL29TY76Z2rM5mHXA@public.gmane.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).