Device Trees: Difference between labels and aliases?
Clash Royale CLAN TAG#URR8PPP
up vote
1
down vote
favorite
In the file imx6qdl.dtsi is the following definition of gpio nodes (somewhat shortened):
gpio1: gpio@0209c000
[...]
;
gpio2: gpio@020a0000
[...]
;
[...]
gpio7: gpio@020b4000
[...]
;
But also in this file, the aliases node has the following properties (again shortened):
aliases
[...]
gpio0 = &gpio1;
gpio1 = &gpio2;
gpio2 = &gpio3;
gpio3 = &gpio4;
gpio4 = &gpio5;
gpio5 = &gpio6;
gpio6 = &gpio7;
[...]
;
What exactly is the reason for doing so?
Do the labels get overwritten?
linux device-tree
migrated from stackoverflow.com Dec 8 '15 at 18:00
This question came from our site for professional and enthusiast programmers.
add a comment |Â
up vote
1
down vote
favorite
In the file imx6qdl.dtsi is the following definition of gpio nodes (somewhat shortened):
gpio1: gpio@0209c000
[...]
;
gpio2: gpio@020a0000
[...]
;
[...]
gpio7: gpio@020b4000
[...]
;
But also in this file, the aliases node has the following properties (again shortened):
aliases
[...]
gpio0 = &gpio1;
gpio1 = &gpio2;
gpio2 = &gpio3;
gpio3 = &gpio4;
gpio4 = &gpio5;
gpio5 = &gpio6;
gpio6 = &gpio7;
[...]
;
What exactly is the reason for doing so?
Do the labels get overwritten?
linux device-tree
migrated from stackoverflow.com Dec 8 '15 at 18:00
This question came from our site for professional and enthusiast programmers.
add a comment |Â
up vote
1
down vote
favorite
up vote
1
down vote
favorite
In the file imx6qdl.dtsi is the following definition of gpio nodes (somewhat shortened):
gpio1: gpio@0209c000
[...]
;
gpio2: gpio@020a0000
[...]
;
[...]
gpio7: gpio@020b4000
[...]
;
But also in this file, the aliases node has the following properties (again shortened):
aliases
[...]
gpio0 = &gpio1;
gpio1 = &gpio2;
gpio2 = &gpio3;
gpio3 = &gpio4;
gpio4 = &gpio5;
gpio5 = &gpio6;
gpio6 = &gpio7;
[...]
;
What exactly is the reason for doing so?
Do the labels get overwritten?
linux device-tree
In the file imx6qdl.dtsi is the following definition of gpio nodes (somewhat shortened):
gpio1: gpio@0209c000
[...]
;
gpio2: gpio@020a0000
[...]
;
[...]
gpio7: gpio@020b4000
[...]
;
But also in this file, the aliases node has the following properties (again shortened):
aliases
[...]
gpio0 = &gpio1;
gpio1 = &gpio2;
gpio2 = &gpio3;
gpio3 = &gpio4;
gpio4 = &gpio5;
gpio5 = &gpio6;
gpio6 = &gpio7;
[...]
;
What exactly is the reason for doing so?
Do the labels get overwritten?
linux device-tree
linux device-tree
asked Dec 3 '15 at 15:00
happyMOOyear
1062
1062
migrated from stackoverflow.com Dec 8 '15 at 18:00
This question came from our site for professional and enthusiast programmers.
migrated from stackoverflow.com Dec 8 '15 at 18:00
This question came from our site for professional and enthusiast programmers.
add a comment |Â
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
0
down vote
@happyMOOyear, not sure if you found an answer but I'll provide how I understand this. I'm working with the same i.MX chip.
The second section uses the already defined node with the label gpio1@0209c000
and creates a new ALIAS for that node. The alias is another way to refer to the same pin. In this case the alias is created with a zero based scheme for easier reference. Thus referring to gpio1@0209c000
is equivalent to gpio0
, which is shorter as well.
reference: http://devicetree.org/Device_Tree_Usage#aliases_Node
I still have not found a good answer to my question so thanks for your input. In case of the label gpio0 I think it is clear that I refer to gpio1@0209c000. But which gpio am I refereing to when I use the label gpio1? gpio1@0209c000 or gpio2@020a0000?
â happyMOOyear
Jan 11 '16 at 7:45
if you use gpio1, that is the alias. if you wish to access gpio1@0209c000 you must either use the gpio0 alias, or the full gpio1@0209c000 label.
â Daniel
Jan 11 '16 at 20:32
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
@happyMOOyear, not sure if you found an answer but I'll provide how I understand this. I'm working with the same i.MX chip.
The second section uses the already defined node with the label gpio1@0209c000
and creates a new ALIAS for that node. The alias is another way to refer to the same pin. In this case the alias is created with a zero based scheme for easier reference. Thus referring to gpio1@0209c000
is equivalent to gpio0
, which is shorter as well.
reference: http://devicetree.org/Device_Tree_Usage#aliases_Node
I still have not found a good answer to my question so thanks for your input. In case of the label gpio0 I think it is clear that I refer to gpio1@0209c000. But which gpio am I refereing to when I use the label gpio1? gpio1@0209c000 or gpio2@020a0000?
â happyMOOyear
Jan 11 '16 at 7:45
if you use gpio1, that is the alias. if you wish to access gpio1@0209c000 you must either use the gpio0 alias, or the full gpio1@0209c000 label.
â Daniel
Jan 11 '16 at 20:32
add a comment |Â
up vote
0
down vote
@happyMOOyear, not sure if you found an answer but I'll provide how I understand this. I'm working with the same i.MX chip.
The second section uses the already defined node with the label gpio1@0209c000
and creates a new ALIAS for that node. The alias is another way to refer to the same pin. In this case the alias is created with a zero based scheme for easier reference. Thus referring to gpio1@0209c000
is equivalent to gpio0
, which is shorter as well.
reference: http://devicetree.org/Device_Tree_Usage#aliases_Node
I still have not found a good answer to my question so thanks for your input. In case of the label gpio0 I think it is clear that I refer to gpio1@0209c000. But which gpio am I refereing to when I use the label gpio1? gpio1@0209c000 or gpio2@020a0000?
â happyMOOyear
Jan 11 '16 at 7:45
if you use gpio1, that is the alias. if you wish to access gpio1@0209c000 you must either use the gpio0 alias, or the full gpio1@0209c000 label.
â Daniel
Jan 11 '16 at 20:32
add a comment |Â
up vote
0
down vote
up vote
0
down vote
@happyMOOyear, not sure if you found an answer but I'll provide how I understand this. I'm working with the same i.MX chip.
The second section uses the already defined node with the label gpio1@0209c000
and creates a new ALIAS for that node. The alias is another way to refer to the same pin. In this case the alias is created with a zero based scheme for easier reference. Thus referring to gpio1@0209c000
is equivalent to gpio0
, which is shorter as well.
reference: http://devicetree.org/Device_Tree_Usage#aliases_Node
@happyMOOyear, not sure if you found an answer but I'll provide how I understand this. I'm working with the same i.MX chip.
The second section uses the already defined node with the label gpio1@0209c000
and creates a new ALIAS for that node. The alias is another way to refer to the same pin. In this case the alias is created with a zero based scheme for easier reference. Thus referring to gpio1@0209c000
is equivalent to gpio0
, which is shorter as well.
reference: http://devicetree.org/Device_Tree_Usage#aliases_Node
answered Jan 7 '16 at 18:27
Daniel
1239
1239
I still have not found a good answer to my question so thanks for your input. In case of the label gpio0 I think it is clear that I refer to gpio1@0209c000. But which gpio am I refereing to when I use the label gpio1? gpio1@0209c000 or gpio2@020a0000?
â happyMOOyear
Jan 11 '16 at 7:45
if you use gpio1, that is the alias. if you wish to access gpio1@0209c000 you must either use the gpio0 alias, or the full gpio1@0209c000 label.
â Daniel
Jan 11 '16 at 20:32
add a comment |Â
I still have not found a good answer to my question so thanks for your input. In case of the label gpio0 I think it is clear that I refer to gpio1@0209c000. But which gpio am I refereing to when I use the label gpio1? gpio1@0209c000 or gpio2@020a0000?
â happyMOOyear
Jan 11 '16 at 7:45
if you use gpio1, that is the alias. if you wish to access gpio1@0209c000 you must either use the gpio0 alias, or the full gpio1@0209c000 label.
â Daniel
Jan 11 '16 at 20:32
I still have not found a good answer to my question so thanks for your input. In case of the label gpio0 I think it is clear that I refer to gpio1@0209c000. But which gpio am I refereing to when I use the label gpio1? gpio1@0209c000 or gpio2@020a0000?
â happyMOOyear
Jan 11 '16 at 7:45
I still have not found a good answer to my question so thanks for your input. In case of the label gpio0 I think it is clear that I refer to gpio1@0209c000. But which gpio am I refereing to when I use the label gpio1? gpio1@0209c000 or gpio2@020a0000?
â happyMOOyear
Jan 11 '16 at 7:45
if you use gpio1, that is the alias. if you wish to access gpio1@0209c000 you must either use the gpio0 alias, or the full gpio1@0209c000 label.
â Daniel
Jan 11 '16 at 20:32
if you use gpio1, that is the alias. if you wish to access gpio1@0209c000 you must either use the gpio0 alias, or the full gpio1@0209c000 label.
â Daniel
Jan 11 '16 at 20:32
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f248149%2fdevice-trees-difference-between-labels-and-aliases%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password