Skip to content

Device tree overlays cleanup#2624

Merged
nunojsa merged 58 commits intoanalogdevicesinc:rpi-6.1.yfrom
ukleinek:dtso-cleanup
Oct 24, 2024
Merged

Device tree overlays cleanup#2624
nunojsa merged 58 commits intoanalogdevicesinc:rpi-6.1.yfrom
ukleinek:dtso-cleanup

Conversation

@ukleinek
Copy link
Contributor

Following up on #2617 here comes a similar cleanup of most of the remaining overlay device tree sources. It converts all overlays that don't exist in the base branch (i.e. https://github.com/raspberrypi/linux/tree/rpi-6.1.y) and that don't contain __dormant__ nodes (as these are an extension to the device tree overlay mechanics not supported by dtc).

All changes have no effect on the semantic of the corresponding compiled overlays.

This fixes:

	arch/arm/boot/dts/overlays/rpi-ad5677r-overlay.dts:28.14-32.6: Warning (unit_address_format): /fragment@1/__overlay__/ad5677r@0f: unit name should not have leading 0s
	arch/arm/boot/dts/overlays/rpi-adxl375-overlay.dts:15.16-20.6: Warning (unit_address_format): /fragment@0/__overlay__/adxl375@053: unit name should not have leading 0s

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
…ing existing ones

There is a bug in the raspberry pi's bootloader that makes applying
overlays that overwrite phandles buggy.

In the adau7118-simple overlay that bug doesn't trigger, but it's still
prudent to just prevent adding phandles to overlays if it's already
known that the base dtb has a phandle.

In this case "sound_overlay" is just a new label for a node that in the
line above is already known to be labeled "sound".

Using "sound" instead of "sound_overlay" results in some changes in the
resulting dtbo. But when applying this dtbo to a base dtb, the only
change is that the new overlayed dtb has no sound_overlay symbol.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
…sting ones

There is a bug in the raspberry pi's bootloader that makes applying
overlays that overwrite phandles buggy.

In the adau1761 overlay that bug doesn't trigger, but it's still prudent
to just prevent adding phandles to overlays if it's already known that
the base dtb has a phandle.

In this case "sound_overlay" is just a new label for a node that in the
line above is already known to be labeled "sound".

Using "sound" instead of "sound_overlay" results in some changes in the
resulting dtbo. But when applying this dtbo to a base dtb, the only
change is that the new overlayed dtb has no sound_overlay symbol.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
…ting ones

There is a bug in the raspberry pi's bootloader that makes applying
overlays that overwrite phandles buggy.

In the ad5679r overlay that bug doesn't trigger, but it's still prudent
to just prevent adding phandles to overlays if it's already known that
the base dtb has a phandle.

In this case "frag1" is just a new label for a node that in the line
above is already known to be labeled "pwm".

Using "pwm" instead of "frag1" results in some changes in the resulting
dtbo. But when applying this dtbo to a base dtb, the only change is that
the new overlayed dtb has no frag1 symbol and a few phandle
renumberings.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
…ing ones

There is a bug in the raspberry pi's bootloader that makes applying
overlays that overwrite phandles buggy.

In the cn0508 overlay that bug doesn't trigger, but it's still prudent
to just prevent adding phandles to overlays if it's already known that
the base dtb has a phandle.

In this case "frag0" and "frag1" are just new labels for nodes that in
the line above is already known to be labeled "spi0_cs_pins" and "spi0"
respectively.

Using "spi0_cs_pins" and "spi0" instead of "frag0" and "frag1" results
in some changes in the resulting dtbo. But when applying this dtbo to a
base dtb, the only change is that the new overlayed dtb has no frag0 and
frag1 symbols and a few phandle renumberings.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
The two labels "frag0" and "frag1" are unused. Just drop them.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
The label "frag0" is unused. Just drop it.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
This results in no changes in the generated dtbo.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
This results in no changes in the generated dtbo.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
This results in no changes in the generated dtbo.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
This results in no changes in the generated dtbo.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
This results in no changes in the generated dtbo.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
This results in no changes in the generated dtbo.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
This results in no changes in the generated dtbo.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
This results in no changes in the generated dtbo.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
This results in no changes in the generated dtbo.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
This results in no changes in the generated dtbo.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
This results in a minor change in the generated dtbo that has no
influcence on the result when it's applied to a base dtbo.
(Different order in the __fixups__ lists.)

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
This results in no changes in the generated dtbo.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
This results in no changes in the generated dtbo.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
This results in no changes in the generated dtbo.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
This results in no changes in the generated dtbo.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
This results in no changes in the generated dtbo.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
This results in no changes in the generated dtbo.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
This results in no changes in the generated dtbo.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
This results in a minor change in the generated dtbo that has no
influcence on the result when it's applied to a base dtbo.
(The only fragment is renamed from "fragment@1" to "fragment@0" with
some follow up changes in __symbols__ and __fixups__.)

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
This results in no changes in the generated dtbo.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
This results in a minor change in the generated dtbo that has no
influcence on the result when it's applied to a base dtbo.
(Different phandle allocation.)

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
This results in no changes in the generated dtbo.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
This results in no changes in the generated dtbo.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
This results in no changes in the generated dtbo.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
This results in a minor change in the generated dtbo that has no
influcence on the result when it's applied to a base dtbo.
(Different phandle allocation.)

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
This results in no changes in the generated dtbo.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
This results in no changes in the generated dtbo.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
This results in a minor change in the generated dtbo that has no
influcence on the result when it's applied to a base dtbo.
(The only fragment is renamed from "fragment@1" to "fragment@0" with
some follow up changes in __symbols__ and __fixups__.)

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
This results in no changes in the generated dtbo.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
This results in a minor change in the generated dtbo that has no
influcence on the result when it's applied to a base dtbo.
(Different order in the __fixups__ lists.)

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
This results in no changes in the generated dtbo.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
This results in no changes in the generated dtbo.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
This results in no changes in the generated dtbo.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
This results in no changes in the generated dtbo.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
This results in no changes in the generated dtbo.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
This results in a minor change in the generated dtbo that has no
influcence on the result when it's applied to a base dtbo.
(The node named "fragment@3" is renamed to "fragment@2" with
some follow up changes in __local_fixups__ and __fixups__.)

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
The device tree compiler adds phandles automatically on demand. So there
is no use in an explicit phandle and it can better be dropped.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
@ukleinek
Copy link
Contributor Author

The failed job is a timeout. If this is an indication that there is a problem with my PR, I don't understand it.

@ukleinek
Copy link
Contributor Author

To simplify looking at the differences introduced here I recommend dgibson/dtc#151.

Copy link
Collaborator

@nunojsa nunojsa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM,

I did looked at the first commits which are not converting the DTs and looks good to me. For the conversion, I looked at some and will have to trust the others :). Well, they are compiling so we should be fine (famous last words).

@nunojsa nunojsa merged commit 285b824 into analogdevicesinc:rpi-6.1.y Oct 24, 2024
@ukleinek ukleinek deleted the dtso-cleanup branch October 24, 2024 09:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants