Fix ethernet on BigTreeTech CB1#10155
Conversation
📝 WalkthroughWalkthroughThe changes configure the BigTreeTech CB1 H616 EMAC1 for an AC300 Ethernet PHY, adding PWM clocking, SID calibration data, an internal MDIO mux, and updated PHY bindings. The patch is included in both sunxi 6.18 and 7.0 kernel series. ChangesCB1 AC300 Ethernet PHY
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant EMAC1
participant MDIO_Mux
participant AC300_EPHY
participant SID
participant AC300_PWM_Clock
EMAC1->>MDIO_Mux: access internal MDIO bus
MDIO_Mux->>AC300_EPHY: expose AC300 PHY
AC300_EPHY->>SID: read ephy_calibration
AC300_EPHY->>AC300_PWM_Clock: consume 2 MHz clock
Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@patch/kernel/archive/sunxi-6.18/patches.armbian/arm64-dts-sun50i-h616-bigtreetech-cb1-emac1-ac300.patch`:
- Around line 64-68: Update the compatible string in the mdio-mux node to the
comma-separated form "allwinner,sun8i-h3-mdio-mux" so the mux driver binds and
the internal MDIO bus with ac300_ephy can probe.
In
`@patch/kernel/archive/sunxi-7.0/patches.armbian/arm64-dts-sun50i-h616-bigtreetech-cb1-emac1-ac300.patch`:
- Around line 64-68: Update the `mdio-mux` node’s `compatible` property to
`allwinner,sun8i-h3-mdio-mux`, replacing the incorrect hyphenated value so the
MDIO mux driver can bind and expose `ac300_ephy`.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: b57a6464-c838-4658-b97d-2e96cd0a43a2
📒 Files selected for processing (4)
patch/kernel/archive/sunxi-6.18/patches.armbian/arm64-dts-sun50i-h616-bigtreetech-cb1-emac1-ac300.patchpatch/kernel/archive/sunxi-6.18/series.confpatch/kernel/archive/sunxi-7.0/patches.armbian/arm64-dts-sun50i-h616-bigtreetech-cb1-emac1-ac300.patchpatch/kernel/archive/sunxi-7.0/series.conf
|
Off topic: are you adding this as a new platform? If so, I had to do a bit of tuning to get the MELLOW Fly C5 stable. I added a smart plug to the machine so it could be hard power cycled, connected the serial port (actually hung an OPi off it), increased the kernel verbosity, and gave them to Antigravity with instructions to write a script to reboot the target 100 times, and record and anaylse the kernel logs on the serial port each time the machine failed to reboot cleanly. It identified a few RCU stalls (already committed), mistuned voltages, capped the clock speeds as the PMIC was incapable of providing the voltages for higher speeds. There is a seperate commit where I asked it to bisect the EMMC frequencies to find the fastest stable speed. |
|
BTT CB1 support was added a while ago |
|
✅ This PR has been reviewed and approved — all set for merge! |
Description
Issue is described in #10084 and reached a solution thanks to help from @deece
How Has This Been Tested?
current(6.18) andedge(7.0)Checklist:
Summary by CodeRabbit