zkkkk12 opened a new pull request, #21626:
URL: https://github.com/apache/nuttx/pull/21626
## Summary
This PR does two things for the PHYLIB subsystem:
1. **Add a `sim:phylib` build-test configuration.** It enables
`CONFIG_NET_PHYLIB`, `CONFIG_MDIO_CLAUSE_45` and both Realtek PHY
drivers (`RTL8221B` / `RTL9000B`), so the sim build group compiles the
whole `drivers/net/phy/` tree. Previously no in-tree defconfig enabled
PHYLIB, so CI did not build any of these sources.
2. **Fix comments and docs that did not match the code.**
- `mdio_reset()` does not do per-bus idempotency; it always forwards to
the lower half, which owns any idempotency (a single MDIO bus may host
several PHY addresses). Updated the stale comment in `phy_device.c`
and `phylib.rst`.
- The vendor registration helper is `rtl8221b_register()` /
`rtl9000b_register()` (not the non-existent `phy_realtek_register()`),
and it is not idempotent (each call consumes a driver-table slot).
Updated `phylib.rst`.
## Impact
- **Users**: None. The new `sim:phylib` config is an opt-in build-test
target; no existing configuration or driver behavior changes.
- **Build / CI**: The sim build group now builds `drivers/net/phy/` via the
new config, giving continuous compile coverage of PHYLIB and the Realtek
drivers (Make.defs wiring, format strings, Kconfig dependencies).
- **Documentation**: `phylib.rst` and the in-code comments now match the
code.
- **Hardware / Compatibility**: No impact.
## Testing
Built the new configuration on the sim target and confirmed the PHYLIB and
Realtek driver sources compile and link cleanly.
**Host machine:** <!-- fill in, e.g. Ubuntu 22.04 x86_64 -->
**Target:** `sim:phylib`
**How tested:**
tools/configure.sh -a ../nuttx-apps sim:phylib make
```
Build completes; `drivers/net/phy/{phy_core,phy_access,phy_device,phy_gen,
phy_genc45}.o`, `drivers/net/phy/realtek/{rtl8221b,rtl8221b_fw,rtl9000b,
rtl9000b_fw}.o` and `drivers/net/mdio.o` are all produced, no warnings or
errors.
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]