Skip to content

i2c0 dtoverlay fixes #4342

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 12, 2021
Merged

Conversation

6by9
Copy link
Contributor

@6by9 6by9 commented May 12, 2021

Hopefully the commits are self-explanatory.

6by9 added 2 commits May 12, 2021 16:48
Using dtoverlay=i2c0 failed to set up the pinctrl nodes as
pinctrl-name = "default"; was missing from the i2c0if node.

https://www.raspberrypi.org/forums/viewtopic.php?f=107&t=311686&p=1864112

Signed-off-by: Dave Stevenson <[email protected]>
Update the symbol as well as the alias so that other overlays will
then be applied against the right node.

Signed-off-by: Dave Stevenson <[email protected]>
@pelwell
Copy link
Contributor

pelwell commented May 12, 2021

I believe that fragment 8 could be replaced with:

        __exports__ {
                i2c0;
        };

Although the exports section was intended to add new symbols to the base DTB, I don't think there's anything to stop it replacing an exsting symbol.

Having said that, your version has a symmetry with the aliases patch, and it's clear that something magic is occuring - an export is perhaps less obvious in that respect.

@6by9
Copy link
Contributor Author

6by9 commented May 12, 2021

You're more knowledgeable on DT than me.

Will __exports__ work when i2c0 already exists as a node from the base DT (pointing at soc/i2c0mux/i2c@0)?

@pelwell
Copy link
Contributor

pelwell commented May 12, 2021

I don't think there's anything to stop it replacing an existing symbol.

@6by9
Copy link
Contributor Author

6by9 commented May 12, 2021

Minor annoyance that it seems that sudo dtoverlay i2c0 registers the node as /dev/i2c-11 (or whatever the next unaliased node is), it doesn't get routed to /dev/i2c-0.
Loading from config.txt sends it to /dev/i2c-0.

@6by9
Copy link
Contributor Author

6by9 commented May 12, 2021

I don't think there's anything to stop it replacing an existing symbol.

Apologies - missed that line first time around.

@pelwell pelwell merged commit 108ac8c into raspberrypi:rpi-5.10.y May 12, 2021
popcornmix added a commit to raspberrypi/firmware that referenced this pull request May 13, 2021
kernel: i2c0 dtoverlay fixes
See: raspberrypi/linux#4342

kernel: Ov5647 fixes
See: raspberrypi/linux#4335

kernel: configs: Add NF_LOG_ARP=m and NF_LOG_NETDEV=m
See: raspberrypi/linux#3615

kernel: Remove spi override from merus-amp overlay
See: raspberrypi/linux#4242
popcornmix added a commit to Hexxeh/rpi-firmware that referenced this pull request May 13, 2021
kernel: i2c0 dtoverlay fixes
See: raspberrypi/linux#4342

kernel: Ov5647 fixes
See: raspberrypi/linux#4335

kernel: configs: Add NF_LOG_ARP=m and NF_LOG_NETDEV=m
See: raspberrypi/linux#3615

kernel: Remove spi override from merus-amp overlay
See: raspberrypi/linux#4242
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