Skip to content

Conversation

@rettichschnidi
Copy link
Contributor

@rettichschnidi rettichschnidi commented Sep 15, 2024

This silences the following warning:

unit address and first address in 'reg' (0x1a0000000000000000) don't
match for /soc/peripheral@50000000/i3c@36000/wm8904@1a

I am not sure however, whether this is just painting over a DT bug: It seems like the existing code with reg = <0x1a 0 0>; and wm8904@1a is already correct. Where does the huge number (0x1a0000000000000000) come from?

And ideas?

This fixes the following warning:

> unit address and first address in 'reg' (0x1a0000000000000000) don't
> match for /soc/peripheral@50000000/i3c@36000/wm8904@1a

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
This fixes the following warning:

> unit address and first address in 'reg' (0x1a0000000000000000) don't
> match for /soc/peripheral@50000000/i3c@36000/wm8904@1a

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
@danieldegrasse
Copy link
Contributor

This silences the following warning:

unit address and first address in 'reg' (0x1a0000000000000000) don't
match for /soc/peripheral@50000000/i3c@36000/wm8904@1a

I am not sure however, whether this is just painting over a DT bug: It seems like the existing code with reg = <0x1a 0 0>; and wm8904@1a is already correct. Where does the huge number (0x1a0000000000000000) come from?

And ideas?

This silences the following warning:

unit address and first address in 'reg' (0x1a0000000000000000) don't
match for /soc/peripheral@50000000/i3c@36000/wm8904@1a

I am not sure however, whether this is just painting over a DT bug: It seems like the existing code with reg = <0x1a 0 0>; and wm8904@1a is already correct. Where does the huge number (0x1a0000000000000000) come from?

And ideas?

It looks like the large register address is coming from the code here to calculate register addresses on each node:

for raw_reg in _slice(node, "reg", 4*(address_cells + size_cells),
. Currently this code will not split a reg property with 3 addresses into three separate reg values (at least as far as I can tell in the debugger). @decsny any thoughts or ideas as to why this would be the case? This does seem like an issue with the DT tooling, not with the devicetree definition.

@decsny
Copy link
Member

decsny commented Sep 17, 2024

This silences the following warning:

unit address and first address in 'reg' (0x1a0000000000000000) don't
match for /soc/peripheral@50000000/i3c@36000/wm8904@1a

I am not sure however, whether this is just painting over a DT bug: It seems like the existing code with reg = <0x1a 0 0>; and wm8904@1a is already correct. Where does the huge number (0x1a0000000000000000) come from?
And ideas?

This silences the following warning:

unit address and first address in 'reg' (0x1a0000000000000000) don't
match for /soc/peripheral@50000000/i3c@36000/wm8904@1a

I am not sure however, whether this is just painting over a DT bug: It seems like the existing code with reg = <0x1a 0 0>; and wm8904@1a is already correct. Where does the huge number (0x1a0000000000000000) come from?
And ideas?

It looks like the large register address is coming from the code here to calculate register addresses on each node:

for raw_reg in _slice(node, "reg", 4*(address_cells + size_cells),

. Currently this code will not split a reg property with 3 addresses into three separate reg values (at least as far as I can tell in the debugger). @decsny any thoughts or ideas as to why this would be the case? This does seem like an issue with the DT tooling, not with the devicetree definition.

No, it's correct. Your mistake here is thinking this node has three addresses. This node only has ONE address, which takes 96 bits to encode. Note that #address-cells is <3> which means 3 32-bit cells are required to encode the address, and also read the binding for i3c-device.yaml which makes it clear as well what this specific address encoding means.

@rettichschnidi rettichschnidi changed the title [RFC] boards: npx: Fix address mismatches boards: npx: Fix address mismatches Sep 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants