Issue created by Armaan Chowfin: 
https://gitlab.rtems.org/rtems/rtos/rtems/-/work_items/5718



## Summary

Every TMS570LC4357 board builds with `arm/tms570lc4357_hdk_xx`, and 
`TMS570_VARIANT` is the only selector available, so the LAUNCHXL2-570LC43 and 
the LC4357 HDK are indistinguishable at build time even though they route MII 
to different terminals and wire the PHY differently. rtems-lwip currently 
guesses with `#if TMS570_VARIANT == 4357`, which is wrong for both HDKs.

## Steps to reproduce

Observe the source code in rtems mainline.

a. No board selector:

* `spec/build/bsps/arm/tms570/optvariant.yml` defines `TMS570_VARIANT` as 3137 
or 4357, default 4357 for `arm/tms570lc4357_hdk`, `_hdk_intram` and 
`_hdk_sdram`. All are HDKs, no field for board wiring.

b. LC4357 default EMAC terminals are not in the pin list: 

* Every MII input reaches two terminals, listed in SPNS195C Table 4-29 as a 
_default terminal_ and an _alternate terminal_. `tms570lc4357-pins.h` names 
only the alternate terminals `TMS570_BALL_G3_MDIO, TMS570_BALL_P1_MII_RXD_0` 
etc - input alternative1).
* Default terminals at alternatiev0 have no defines besides 
`TMS570_BALL_T4_MII_RXCLK` and `TMS570_BALL_U7_MII_TX_CLK`

c. `TMS570LC4357_PINMMR_DEFAULT_INIT_LIST` selects both input alternatives

* `TMS570_PINMMR_REG_VAL()` ORs entries, so both alternatives end up enabled 
and two terminals drive one MAC input.

d. `TMS570_MMR_SELECT_MII_MODE` is inverted on the LS3137

* See SPNU563A section 6.5.3

-- 
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/work_items/5718
You're receiving this email because of your account on gitlab.rtems.org. 
Unsubscribe from this thread: 
https://gitlab.rtems.org/-/sent_notifications/5-06t3l8k97g9jiaglpfkjec3b8-1d/unsubscribe
 | Manage all notifications: https://gitlab.rtems.org/-/profile/notifications | 
Help: https://gitlab.rtems.org/help


_______________________________________________
bugs mailing list
[email protected]
http://lists.rtems.org/mailman/listinfo/bugs

Reply via email to