View unanswered posts | View active topics It is currently Sat Mar 23, 2019 2:20 pm



Reply to topic  [ 32 posts ]  Go to page Previous  1, 2, 3, 4
 Utilite Value won't boot; just black screen 
Author Message

Joined: Sun Jul 13, 2014 6:16 pm
Posts: 23
Location: Queens, New York City
Post Re: Utilite Value won't boot; just black screen
Again, thanks for the reply. It was very helpful in understanding what's going on. I'm still getting hung up on the syntax of what I'm reading and what it means for the device tree it's describing.

Can you help me figure out what's going on here? This is from imx6q-utilite-pro.dts:328.

Code:
&pcie {
   pcie@0,0 {
      reg = <0x000000 0 0 0 0>;
      #address-cells = <3>;
      #size-cells = <2>;

      /* non-removable i211 ethernet card */
      eth1: intel,i211@pcie0,0 {
         reg = <0x010000 0 0 0 0>;
      };
   };
};


So the &pcie basically says, "somewhere in this DTS or an included DTSI, there's a node labelled "pcie", and we want to add the following properties and child nodes." (&pcie during compilation will be replaced by the actual node name.) Is it a least a coincidence and at most a convention that the child node being added has the same name as the label?

For reference, the label seems to be referring to /soc/pcie@1ffc000 at imx6qdl.dtsi:200. Is that right?

Code:
        soc {
               /* ... */
               pcie: pcie@1ffc000 {
                        compatible = "fsl,imx6q-pcie", "snps,dw-pcie";
                        reg = <0x01ffc000 0x04000>,
                              <0x01f00000 0x80000>;
                        reg-names = "dbi", "config";
                        #address-cells = <3>;
                        #size-cells = <2>;
                        /* ... more stuff ... */
                        status = "disabled";
               };
               /* ... */
        }


One of the nodes to be added to &pcie a new node "really" named (and not just labelled) "pcie". What does "@0,0" mean in this context? I am confused specifically by the comma and second number. Would this node have cells 0x000000 and 0 making up the address and cells 0, 0, and 0 making up the size? Is the 3+2 number of cells in the reg property determined by the parent node (pcie@1ffc000 in imx6qdl.dtsi:200) or the node being added (pcie@0,0)?

The node to be added should have a further child node, labelled eth1. Can you help me parse the node name and address there? Again, I'm confused by the commas, two identifiers, and two numbers.

From pcie@1ffc000 at imx6qdl.dtsi:200, are there two registers? Also, since in /soc, #address-cells = <1> and #size-cells = <1>, should the cell list for reg properties of /soc/* (include /soc/pcie@1ffc000) be 1+1 cells in length?


Fri Jan 05, 2018 5:26 pm
Profile

Joined: Sat May 14, 2016 1:24 pm
Posts: 56
Post Re: Utilite Value won't boot; just black screen
Hi,

I'm very sorry for the late answer; somehow I missed the forum's notification...

Don01001100 wrote:
So the &pcie basically says, "somewhere in this DTS or an included DTSI, there's a node labelled "pcie", and we want to add the following properties and child nodes." (&pcie during compilation will be replaced by the actual node name.)

Yes!

Don01001100 wrote:
Is it a least a coincidence and at most a convention that the child node being added has the same name as the label?

I'll answer that below.

Quote:
For reference, the label seems to be referring to /soc/pcie@1ffc000 at imx6qdl.dtsi:200. Is that right?

Yes! Note that there are also some additions to that node in imx6q-cm-fx6.dts.
Don01001100 wrote:
One of the nodes to be added to &pcie a new node "really" named (and not just labelled) "pcie". What does "@0,0" mean in this context? I am confused specifically by the comma and second number. Would this node have cells 0x000000 and 0 making up the address and cells 0, 0, and 0 making up the size? Is the 3+2 number of cells in the reg property determined by the parent node (pcie@1ffc000 in imx6qdl.dtsi:200) or the node being added (pcie@0,0)?

The subnode to be added is named pcie@0,0 and not pcie. The name is a convention.
The "pcie" part of the name is badly chosen, it should describe the device type; "host-bridge" would have been a better choice, because that's what the node describes: The pcie host bridge of the SoC.

The part following the @ symbol should reflect the reg property value of the node the first 0 is the "address" and the second the "size". That's useful for us humans because, otherwise, debug/info code had to parse the #address-cells, #size-cells, and reg property to print the addresses.

However, that's only a name. The "real" values are given by the #address-cells, #size-cells, and reg property. The relevant #*-cells settings for the reg property of the pcie@0,0 node are the ones of its parent node (or, the other way around, setting #*-cells properties specifies the reg-property format for all subnodes).

For pci(e) devices the three address cells specify the bus, function, and subfunction of the device (you can compare that to lspci's output: the format is <bus>:<function>.<subfunction> ). The size part is used for the io-mapping but here my knowledge is limited. If you want to know more about pci devices in devicetrees, you may take a look in the "official" specification [1].

In general, both, the format and the specific semantics of the reg property, depend on the parent device (i.e. for an i2c controller it's the i2c address, for SoC embedded devices the register offset + size, etc.).

Don01001100 wrote:
The node to be added should have a further child node, labelled eth1. Can you help me parse the node name and address there? Again, I'm confused by the commas, two identifiers, and two numbers.


Well, the node's name is "intel,i211@pcie0,0". And that's it. It's a name. Maybe I chose a bad name here, too; today I'd it differently... but at least I added a comment ;-). If you like you can read that name as "i211 pcie device of the vendor intel connected to the pcie host bridge pcie0,0".
As the label indicates it is the second ethernet card of the Utilite Pro which is connected to the pcie bus. So that's a node that is not relevant (and should be left out) for the Utilite Value.

Don01001100 wrote:
From pcie@1ffc000 at imx6qdl.dtsi:200, are there two registers? Also, since in /soc, #address-cells = <1> and #size-cells = <1>, should the cell list for reg properties of /soc/* (include /soc/pcie@1ffc000) be 1+1 cells in length?

Yes, the pcie controller has two memory regions, each described by an address/offset and its size. The second statement is also right, to each device on the SoC one or more memory regions are assigned (the pcie controller is an example for two). Each memory region has an addres/offset (1 cell) and a size (1cell), so in total two cells.

Cheers,
Christopher

[1] http://www.devicetree.org/open-firmware ... pci2_1.pdf


Thu Jan 11, 2018 11:20 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 32 posts ]  Go to page Previous  1, 2, 3, 4

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.