Invalid i2c DT node names
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- c, linux
- Domain
- operating-systems
Research direction
Start with arch/arm/boot/dts/bcm2711-rpi-4-b.dts and the bcm2711.dtsi, bcm283x-rpi-wifi-bt.dtsi, bcm270x.dtsi, and bcm2711-rpi.dtsi includes shown in the report; compare preprocessing with and without a9865ec3e1a0. Trace why the i2c0 macro changes hyphenated node names, then verify generated names remain valid and match the expected grep output.
Written by the indexing model from the issue text.
Description
Describe the bug
Since commit a9865ec3e1a0 some i2c DT node names look funny. This is because of the #defines added by downstream commit 'BCM270X_DT: Use bcm283x.dtsi, bcm2835.dtsi and bcm2836.dtsi' (I think) and the pre-processor somehow tripping over the new dashes in the node names.
I.e.
$ head arch/arm/boot/dts/bcm2711-rpi-4-b.dts
// SPDX-License-Identifier: GPL-2.0
/dts-v1/;
#define BCM2711
#define i2c0 i2c0if
#include "bcm2711.dtsi"
#include "bcm283x-rpi-wifi-bt.dtsi"
#undef i2c0
#include "bcm270x.dtsi"
#define i2c0 i2c0mux
#include "bcm2711-rpi.dtsi"
That #define i2c0 i2c0if results in:
$ grep i2c0if bcm2711-rpi-4-b.dts
i2c0if-gpio0 {
i2c0if-gpio28 {
i2c0if-gpio44 {
i2c0if-gpio46 {
i2c0_gpio0 = "/soc/gpio@7e200000/i2c0if-gpio0";
i2c0_gpio28 = "/soc/gpio@7e200000/i2c0if-gpio28";
i2c0_gpio44 = "/soc/gpio@7e200000/i2c0if-gpio44";
i2c0_gpio46 = "/soc/gpio@7e200000/i2c0if-gpio46";
i2c0if = "/soc/i2c@7e205000";
After reverting a9865ec3e1a0:
$ grep i2c0if bcm2711-rpi-4-b.dts
i2c0if = "/soc/i2c@7e205000";
Steps to reproduce the behaviour
See description.
Device (s)
Other
System
N/A
Logs
No response
Additional context
No response
- Dominant language
- C
- Stars
- 13.2k
- Forks
- 5.5k
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 21
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from raspberrypi/linux
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
raspberrypi/linux#7415 · 2 comments · 1 reaction ·
-
rp1-cfe doesn't forward V4L2_EVENT_SOURCE_CHANGE event from csi-2 sensor driver to userspace app Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
raspberrypi/linux#7399 · 1 comment ·
-
Difficulty 1/5 Under an hour Newbie friendliness 82/100
raspberrypi/linux#7357 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
raspberrypi/linux#7054 · 2 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
raspberrypi/linux#7634 · 8 comments · 1 reaction ·
All issues in raspberrypi/linux
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
zephyrproject-rtos/zephyr#119726 ·
-
[Bounty proposal] fix(web): memory insights count an evening memory on the next day ($25 proposed) Open
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
BasedHardware/omi#15320 ·
-
[adam] AdamNet network read doesn't cap to MAX_ADAM_PACKET_LEN, overflows client receive buffers Open
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
FujiNetWIFI/fujinet-firmware#1649 · 2 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
HarbourMasters/Shipwright#7229 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
riscv-software-src/riscv-isa-sim#2435 · 1 comment ·