[PATCH 5/5] ARM: mxs: add EVAchargeSE board support

Stefan Wahren wahrenst at gmx.net
Thu Nov 12 04:27:08 PST 2026


Am 08.11.26 um 13:11 schrieb netdev-bot+sashiko at kernel.org:
> Thank you for your contribution! Sashiko AI review found 2 potential
> issue(s) to consider.
>
> Critical: 0 · High: 0 · Medium: 1 · Low: 1
>
> If you believe none of the issues are legitimate, please reply to each
> issue of Medium severity or higher and explain why the AI is wrong.
> If any of them are legitimate and you plan to respin, please let patchwork
> know by including "pw-bot: cr" as a separate line at the end of your reply
> (one such reply per series is enough).
>
> - [Medium] The ethernet-phy at 0 node in
>    arch/arm/boot/dts/nxp/mxs/imx28-evachargese.dts (an SMSC LAN87xx-class…
> - [Low] The patch only adds
>    arch/arm/boot/dts/nxp/mxs/imx28-evachargese.dts and a dtb entry in…
>
> --
>
> ARM: mxs: add EVAchargeSE board support
>
> This adds a devicetree for the chargebyte EVAcharge SE. It is an i.MX28
> based ISO 15118 controller for EV charging stations. The DTS enables eMMC,
> the debug UART, Ethernet, USB host, QCA7000 powerline over SPI, CAN and the
> board LEDs.
>
> Link: https://chargebyte.com/products/controllers-modules/evse-controllers/evacharge-se
>
>> ARM: mxs: add EVAchargeSE board support
> [Severity: Low]
> This isn't a bug, but the patch only touches arch/arm/boot/dts/nxp/mxs/.
> Should the subject use the dts prefix, for example "ARM: dts: mxs: Add
> chargebyte EVAcharge SE board"? The previous patch in this series, "ARM:
> dts: imx28: add alternative pinmux for CAN1", already uses that form.
>
> The product name is also spelled three different ways:
>
>    subject:    "EVAchargeSE"
>    body:       "EVACharge SE is a ISO 15118 compliant controller ..."
>    DTS model:  model = "chargebyte EVAcharge SE";
>
> The dt-bindings patch "dt-bindings: arm: fsl: support chargebyte EVAcharge
> SE" uses "EVAcharge SE". Could the spelling be the same everywhere?
>
>> diff --git a/arch/arm/boot/dts/nxp/mxs/imx28-evachargese.dts b/arch/arm/boot/dts/nxp/mxs/imx28-evachargese.dts
>> new file mode 100644
>> index 0000000000000..75ddde2264936
>> --- /dev/null
>> +++ b/arch/arm/boot/dts/nxp/mxs/imx28-evachargese.dts
>> @@ -0,0 +1,294 @@
> [ ... ]
>
>> +&mac0 {
>> +	phy-handle = <&ethphy>;
>> +	phy-mode = "rmii";
>> +	phy-supply = <&reg_3p3v>;
>> +	pinctrl-0 = <&mac0_pins_a &mac0_phy_reset_pin>;
>> +	pinctrl-names = "default";
>> +
>> +	status = "okay";
>> +
>> +	mdio {
>> +		#address-cells = <1>;
>> +		#size-cells = <0>;
>> +
>> +		ethphy: ethernet-phy at 0 {
>> +			compatible = "ethernet-phy-ieee802.3-c22";
>> +			reg = <0>;
>> +			clocks = <&clks 64>; /* enet_out */
>> +			interrupt-parent = <&gpio4>;
>> +			interrupts = <5 IRQ_TYPE_EDGE_FALLING>;
>> +			max-speed = <100>;
>> +			pinctrl-0 = <&mac0_phy_int_pin>;
>> +			pinctrl-names = "default";
>> +			reset-assert-us = <500>;
>> +			reset-deassert-us = <500>;
>> +			reset-gpios = <&gpio4 13 GPIO_ACTIVE_LOW>;
>> +			smsc,disable-energy-detect;
> [Severity: Medium]
> Can the PHY ID be read here while the PHY is still held in reset?
>
> This node only has the generic c22 compatible, with no
> ethernet-phy-idXXXX.XXXX entry. So fwnode_mdiobus_register_phy() reads the
> ID over MDIO before phylib has requested the reset GPIO:
>
> drivers/net/mdio/fwnode_mdio.c:fwnode_mdiobus_register_phy() {
>      ...
> 	if (is_c45 || fwnode_get_phy_id(child, &phy_id))
> 		phy = get_phy_device(bus, addr, is_c45);
> 	else
> 		phy = phy_device_create(bus, addr, phy_id, 0, NULL);
>      ...
> }
>
> The reset-gpios line is requested only after that, through this path:
>
> phy_device_register()
>    mdiobus_register_device()
>      mdio_device_register_reset()
>
> The reset is deasserted later still, in phy_probe().
>
> If nRST is low during the scan, the ID reads as all ones and
> get_phy_device() returns -ENODEV. __of_mdiobus_parse_phys() then just
> prints "MDIO device at address 0 is missing". The phy-handle in mac0 points
> at a PHY that was never registered, so Ethernet doesn't come up.
>
> One way to hit this is to unbind and rebind the FEC driver, or to reload a
> modular fec. On removal, phy_remove() and phy_device_remove() assert the
> reset before the GPIO is released:
>
> drivers/net/phy/phy_device.c:phy_device_remove() {
>      ...
> 	/* Assert the reset signal */
> 	phy_device_reset(phydev, 1);
>
> 	mdiobus_unregister_device(&phydev->mdio);
>      ...
> }
>
> mdio_device_unregister_reset() then calls gpiod_put(), but the pin keeps
> driving low. The next scan finds the PHY still in reset.
>
> The same failure could happen at first boot if the bootloader leaves
> GPIO4_13 low. This DTS muxes that pad as GPIO with MXS_PULL_DISABLE.
>
> Documentation/devicetree/bindings/net/ethernet-phy.yaml covers this case.
> It says that if a PHY needs a particular reset sequence before its ID
> registers can be read, the compatible list "must contain an entry with the
> correct PHY ID".
>
> imx28-btt3.dtsi also has a LAN8720 with reset-gpios, and it does this:
>
> 	/* LAN8720Ai - PHY ID */
> 	compatible = "ethernet-phy-id0007.c0f0","ethernet-phy-ieee802.3-c22";
>
> Could this node get an explicit ethernet-phy-id compatible too? The
> smsc,disable-energy-detect property suggests an SMSC PHY, and the ID would
> need to match the part fitted on this board.

That's a good advice, I will adapt my series.

Best regards

pw-bot: cr




More information about the linux-phy mailing list