Skip to contentSkip to conversation

arm64: dts: freescale: Add chargebyte Charge Control Y

PATCH Superseded Stefan Wahren 3 participants 8 messages Sep 3 – Sep 7

Subsystems (4)

v4 of 7 Superseded Latest is v7 →

lore
Share & tools
lore
#0 lore raw

v4 cover arm64: dts: freescale: Add chargebyte Charge Control Y

This series adds support for the chargebyte Charge Control Y, which is an Electrical Vehicle Supply Equipment (EVSE) for MCS (Megawatt Charging System) charging stations.

sashiko reported in the first version of the series [1] that X_nRST_LAN is available via GPIO line names, but there is no reset mechanismn in the device tree. This finding is valid. Since the reset line feature isn't implemented for LAN8651 driver yet, I like to proceed with the current version. The LAN8651 handles reset via SPI commands and in rare cases we still have the possibility to control the reset from userspace. Btw the pin has a pull resistor in hardware, so it's not floating.

[1] - https://lore.kernel.org/linux-devicetree/[email protected]/

Changes in V4:
- prepend constrains fix for ti,tcan104x-can binding (reported by sashiko)

Changes in V3:
- add Acked-by's from Conor
- add missing SD2_VSELECT to default pinctrl of SD interface (reported by sashiko)
- clarify LAN8651 GPIO usage in device tree (suggested by Frank Li)
- move X_nRST_LAN into dedicated pinctrl group to make it more self-explaining

Changes in V2:
- drop phy-can-transceiver changes and make MCP2542 compatible to TI TCAN1042 as suggested by Marc Kleine-Budde & Frank Li
- implemented SD2_nRESET as vmmc supply for SD card interface (reported by sashiko)
- add UHS support for SD card interface
- dropped downstream property ti,leds-polarity (reported by sashiko)
- fix GPIO line name of X_LAN_nCS (reported by sashiko)
- drop unconnected pins (X_TDI, X_TMS_SWDIO, X_TDO) from GPIO line names

Stefan Wahren (4):
dt-bindings: phy: ti,tcan104x-can: Fix property constrains
dt-bindings: arm: fsl: Add chargebyte Charge Control Y
dt-bindings: phy: ti,tcan104x-can: Document Microchip MCP2542
arm64: dts: freescale: Add chargebyte Charge Control Y

 .../devicetree/bindings/arm/fsl.yaml          |   1 +
 .../bindings/phy/ti,tcan104x-can.yaml         |  10 +-
 arch/arm64/boot/dts/freescale/Makefile        |   1 +
 .../dts/freescale/imx93-charge-control-y.dts  | 439 ++++++++++++++++++
 .../boot/dts/freescale/imx93-phycore-som.dtsi |   2 +-
 5 files changed, 448 insertions(+), 5 deletions(-)
 create mode 100644 arch/arm64/boot/dts/freescale/imx93-charge-control-y.dts
Signature · 1 line
2.43.0
#1 lore raw

PATCH v4 1/4 dt-bindings: phy: ti,tcan104x-can: Fix property constrains

Microchip ATA6561 is compatible to TI TCAN1042, so the same property constrains should apply. But they use a strict scalar enum match, which makes Microchip ATA6561 fallthrough. So add a "contains" to cover also all compatibles ones.

Reported-by [email protected]
Fixes 05ace63d0bcf ("dt-bindings: phy: ti,tcan104x-can: Document NXP TJA105X/1048")
---
 .../devicetree/bindings/phy/ti,tcan104x-can.yaml         | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
Documentation/devicetree/bindings/phy/ti,tcan104x-can.yaml +5 -4
index 9f5c37ca6496..0cf5fa21106b 100644
@@ -71,10 +71,11 @@ allOf:
   - if:
       properties:
         compatible:
-          enum:
-            - nxp,tjr1443
-            - ti,tcan1042
-            - ti,tcan1043
+          contains:
+            enum:
+              - nxp,tjr1443
+              - ti,tcan1042
+              - ti,tcan1043
     then:
       properties:
         '#phy-cells':
Signature · 7 lines
2.43.0


-- 
linux-phy mailing list
[email protected]
https://lists.infradead.org/mailman/listinfo/linux-phy
Reviewed-by on v4 1/4
#2 lore raw

Re: [PATCH V4 1/4] dt-bindings: phy: ti,tcan104x-can: Fix property constrains

Quoted 5 lines · Stefan Wahren

Microchip ATA6561 is compatible to TI TCAN1042, so the same property constrains should apply. But they use a strict scalar enum match, which makes Microchip ATA6561 fallthrough. So add a "contains" to cover also all compatibles ones.

Quoted 7 lines
Reported-by [email protected]
Fixes 05ace63d0bcf ("dt-bindings: phy: ti,tcan104x-can: Document NXP TJA105X/1048")
---
 .../devicetree/bindings/phy/ti,tcan104x-can.yaml         | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

Best regards,
Krzysztof

#3 lore raw

PATCH v4 2/4 dt-bindings: arm: fsl: Add chargebyte Charge Control Y

In reply to Stefan Wahren

Add device-tree bindings for chargebyte Charge Control Y board based on the PHYTEC phyCORE-i.MX93 SoM (System-on-Module).

---
 Documentation/devicetree/bindings/arm/fsl.yaml | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/arm/fsl.yaml +1 -0
index 656f2596e1d5..6d20703c25b4 100644
@@ -1665,6 +1665,7 @@ properties:
       - description: PHYTEC phyCORE-i.MX93 SoM based boards
         items:
           - enum:
+              - chargebyte,imx93-charge-control-y # chargebyte Charge Control Y
               - phytec,imx93-phyboard-nash  # phyBOARD-Nash-i.MX93
               - phytec,imx93-phyboard-segin # phyBOARD-Segin with i.MX93
           - const: phytec,imx93-phycore-som # phyCORE-i.MX93 SoM
Signature · 1 line
2.43.0
#4 lore raw

PATCH v4 3/4 dt-bindings: phy: ti,tcan104x-can: Document Microchip MCP2542

In reply to Stefan Wahren

The Microchip MCP2542 High-speed CAN transceiver with Sleep mode is a pin-compatible alternative for the TI TCAN1042.

---
 Documentation/devicetree/bindings/phy/ti,tcan104x-can.yaml | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/phy/ti,tcan104x-can.yaml +1 -0
index 0cf5fa21106b..1a0dc9bbe6c9 100644
@@ -18,6 +18,7 @@ properties:
       - items:
           - enum:
               - microchip,ata6561
+              - microchip,mcp2542
               - ti,tcan1051
           - const: ti,tcan1042
       - items:
Signature · 1 line
2.43.0
#5 lore raw

PATCH v4 4/4 arm64: dts: freescale: Add chargebyte Charge Control Y

In reply to Stefan Wahren

This adds the support for chargebyte Charge Control Y, which is an Electrical Vehicle Supply Equipment (EVSE) for MCS (Megawatt Charging System) charging stations (according to IEC 61851-23-1).

chargebyte Charge Control Y uses phyCORE-i.MX 93 ARM
- NXP i.MX93 1.7 GHz
- 1 GB DDR4 RAM
- up to 8 GB eMMC
- 2x 100 MBit/s Ethernet interfaces
- 10BASE-T1S Ethernet for MCS communication
- CAN interface
- separate safety chip
- TPM chip
- power buffered RTC

---
 arch/arm64/boot/dts/freescale/Makefile        |   1 +
 .../dts/freescale/imx93-charge-control-y.dts  | 439 ++++++++++++++++++
 .../boot/dts/freescale/imx93-phycore-som.dtsi |   2 +-
 3 files changed, 441 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm64/boot/dts/freescale/imx93-charge-control-y.dts
arch/arm64/boot/dts/freescale/Makefile +1 -0
index 95ae85ab4adf..8817992218a5 100644
@@ -652,6 +652,7 @@ imx93-11x11-frdm-pixpaper-dtbs += imx93-11x11-frdm.dtb imx93-11x11-frdm-pixpaper
 dtb-$(CONFIG_ARCH_MXC) += imx93-11x11-frdm-pixpaper.dtb
 
 dtb-$(CONFIG_ARCH_MXC) += imx93-14x14-evk.dtb
+dtb-$(CONFIG_ARCH_MXC) += imx93-charge-control-y.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx93-kontron-bl-osm-s.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx93-phyboard-nash.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx93-phyboard-segin.dtb
arch/arm64/boot/dts/freescale/imx93-charge-control-y.dts new file +439 -0

439 lines not on this page · raw message

arch/arm64/boot/dts/freescale/imx93-phycore-som.dtsi +1 -1
index 325e465d0056..489ed3f7fb61 100644
@@ -201,7 +201,7 @@ ldo5: LDO5 {
 	};
 
 	/* EEPROM */
-	eeprom@50 {
+	eeprom0: eeprom@50 {
 		compatible = "atmel,24c32";
 		reg = <0x50>;
 		pagesize = <32>;
Signature · 1 line
2.43.0
#6 lore raw
Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider: - [Medium] Mismatched drive strengths on USDHC2 data lines within the same interface speed mode. - [Medium]…

Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider:
- [Medium] Mismatched drive strengths on USDHC2 data lines within the same interface speed mode.
- [Medium] The reset GPIO polarity for the Ethernet PHY (DP83825) is configured as active-high, but the PHY natively requires an active-low reset.
- [Low] Incorrect node name used in /delete-node/ for heartbeat LED pinctrl.
--

commit 228da9fe4e969182ceef8105169e14b5de5949a5
Author: Stefan Wahren <[email protected]>

arm64: dts: freescale: Add chargebyte Charge Control Y

This adds device tree support for the chargebyte Charge Control Y, an Electrical Vehicle Supply Equipment (EVSE) based on the phyCORE-i.MX 93 SOM.

Quoted 5 lines
arch/arm64/boot/dts/freescale/imx93-charge-control-y.dts new file +0 -0
new file mode 100644
index 0000000000000..ba240f528f9b9

[ ... ]

arch/arm64/boot/dts/freescale/imx93-charge-control-y.dts line 254

Quoted 7 lines
arch/arm64/boot/dts/freescale/imx93-charge-control-y.dts new file +7 -0
+/* Ethernet 2 PHY */
+&mdio {
+	ethphy2: ethernet-phy@2 {
+		reg = <2>;
+		compatible = "ethernet-phy-id2000.a140";
+		clocks = <&clk IMX93_CLK_ENET_REF_PHY>;
+		reset-gpios = <&gpio4 13 GPIO_ACTIVE_HIGH>;

[Severity: Medium]
Will this hold the Ethernet PHY in reset? The DP83825 PHY natively expects an active-low reset signal. By specifying GPIO_ACTIVE_HIGH here, the kernel will assert reset by driving the GPIO high, and normal operation will drive it low. This could potentially keep the PHY in reset permanently, preventing Ethernet link establishment, unless there is a physical hardware inverter between the GPIO and the PHY.

Quoted 4 lines
arch/arm64/boot/dts/freescale/imx93-charge-control-y.dts new file +4 -0
+		reset-assert-us = <30>;
+		reset-deassert-us = <50000>;
+	};
+};

[ ... ]

arch/arm64/boot/dts/freescale/imx93-charge-control-y.dts line 278

Quoted 4 lines

+&iomuxc {

arch/arm64/boot/dts/freescale/imx93-charge-control-y.dts new file +3 -0
+
+	// Heartbeat LED of phyCore is not populated
+	/delete-node/ pinctrl_leds;

[Severity: Low]
Will the device tree compiler process this delete-node directive correctly? In imx93-phycore-som.dtsi, the node is defined with the name ledsgrp and the label pinctrl_leds.

The delete-node syntax expects the exact node name, like:

	/delete-node/ ledsgrp;

Or alternatively, using the phandle label at the root level:
/delete-node/ &pinctrl_leds;

Using just the label name inside &iomuxc might result in a "Node not found" compiler error or a silent failure that leaves unused pinmux data in the binary.

Quoted 2 lines
arch/arm64/boot/dts/freescale/imx93-charge-control-y.dts new file +2 -0
+
+	pinctrl_eqos: eqosgrp {

[ ... ]

arch/arm64/boot/dts/freescale/imx93-charge-control-y.dts line 402

Quoted 9 lines
arch/arm64/boot/dts/freescale/imx93-charge-control-y.dts new file +9 -0
+	/* need to config the SION for data and cmd pad, refer to ERR052021 */
+	pinctrl_usdhc2_default: usdhc2grp {
+		fsl,pins = <
+			MX93_PAD_SD2_CLK__USDHC2_CLK		0x119e
+			MX93_PAD_SD2_CMD__USDHC2_CMD		0x4000139e
+			MX93_PAD_SD2_DATA0__USDHC2_DATA0	0x4000138e
+			MX93_PAD_SD2_DATA1__USDHC2_DATA1	0x4000138e
+			MX93_PAD_SD2_DATA2__USDHC2_DATA2	0x4000138e
+			MX93_PAD_SD2_DATA3__USDHC2_DATA3	0x4000139e

[Severity: Medium]
Are these drive strength settings intended to be different across the data lines?

In this default mode configuration, DATA0-2 use 0x4000138e (DSE bit 4 = 0), while DATA3 uses 0x4000139e (DSE bit 4 = 1). Mismatched drive strengths on the same SDIO bus can introduce signal skew and degrade signal integrity.

arch/arm64/boot/dts/freescale/imx93-charge-control-y.dts line 415

Quoted 13 lines
arch/arm64/boot/dts/freescale/imx93-charge-control-y.dts new file +13 -0
+			MX93_PAD_SD2_VSELECT__USDHC2_VSELECT	0x51e
+		>;
+	};
+
+	/* need to config the SION for data and cmd pad, refer to ERR052021 */
+	pinctrl_usdhc2_100mhz: usdhc2-100mhzgrp {
+		fsl,pins = <
+			MX93_PAD_SD2_CLK__USDHC2_CLK		0x119e
+			MX93_PAD_SD2_CMD__USDHC2_CMD		0x4000139e
+			MX93_PAD_SD2_DATA0__USDHC2_DATA0	0x4000138e
+			MX93_PAD_SD2_DATA1__USDHC2_DATA1	0x4000138e
+			MX93_PAD_SD2_DATA2__USDHC2_DATA2	0x4000139e
+			MX93_PAD_SD2_DATA3__USDHC2_DATA3	0x4000139e

[Severity: Medium]
Similarly, in the 100mhz configuration, DATA0-1 are set to 0x4000138e and DATA2-3 are set to 0x4000139e. Could this mismatch cause high-frequency enumeration or data corruption issues on the SD bus?

Quoted 3 lines
arch/arm64/boot/dts/freescale/imx93-charge-control-y.dts new file +3 -0
+			MX93_PAD_SD2_VSELECT__USDHC2_VSELECT	0x51e
+		>;
+	};
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=4
#7 lore raw

Hi,

Am 03.09.26 um 10:21 schrieb [email protected]:

Quoted 21 lines

Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider:
- [Medium] Mismatched drive strengths on USDHC2 data lines within the same interface speed mode.
- [Medium] The reset GPIO polarity for the Ethernet PHY (DP83825) is configured as active-high, but the PHY natively requires an active-low reset.
- [Low] Incorrect node name used in /delete-node/ for heartbeat LED pinctrl.
--

commit 228da9fe4e969182ceef8105169e14b5de5949a5
Author: Stefan Wahren <[email protected]>

arm64: dts: freescale: Add chargebyte Charge Control Y

This adds device tree support for the chargebyte Charge Control Y, an Electrical Vehicle Supply Equipment (EVSE) based on the phyCORE-i.MX 93 SOM.

Quoted 5 lines
arch/arm64/boot/dts/freescale/imx93-charge-control-y.dts new file +0 -0
new file mode 100644
index 0000000000000..ba240f528f9b9

[ ... ]

Quoted 14 lines

arch/arm64/boot/dts/freescale/imx93-charge-control-y.dts line 254

Quoted 7 lines
arch/arm64/boot/dts/freescale/imx93-charge-control-y.dts new file +7 -0
+/* Ethernet 2 PHY */
+&mdio {
+	ethphy2: ethernet-phy@2 {
+		reg = <2>;
+		compatible = "ethernet-phy-id2000.a140";
+		clocks = <&clk IMX93_CLK_ENET_REF_PHY>;
+		reset-gpios = <&gpio4 13 GPIO_ACTIVE_HIGH>;

[Severity: Medium]
Will this hold the Ethernet PHY in reset? The DP83825 PHY natively expects an active-low reset signal. By specifying GPIO_ACTIVE_HIGH here, the kernel will assert reset by driving the GPIO high, and normal operation will drive it low. This could potentially keep the PHY in reset permanently, preventing Ethernet link establishment, unless there is a physical hardware inverter between the GPIO and the PHY.

Ethernet-PHY and reset signal are not wired directly. There is a transistor, which negative the signal.

Quoted 16 lines
Quoted 5 lines
arch/arm64/boot/dts/freescale/imx93-charge-control-y.dts new file +4 -0
+		reset-assert-us = <30>;
+		reset-deassert-us = <50000>;
+	};
+};

[ ... ]

arch/arm64/boot/dts/freescale/imx93-charge-control-y.dts line 278

Quoted 4 lines

+&iomuxc {

arch/arm64/boot/dts/freescale/imx93-charge-control-y.dts new file +3 -0
+
+	// Heartbeat LED of phyCore is not populated
+	/delete-node/ pinctrl_leds;

[Severity: Low]
Will the device tree compiler process this delete-node directive correctly? In imx93-phycore-som.dtsi, the node is defined with the name ledsgrp and the label pinctrl_leds.

The delete-node syntax expects the exact node name, like:

Quoted 8 lines
	/delete-node/ ledsgrp;

Or alternatively, using the phandle label at the root level:
/delete-node/ &pinctrl_leds;

Using just the label name inside &iomuxc might result in a "Node not found" compiler error or a silent failure that leaves unused pinmux data in the binary.

Nice catch. I'm surprised why make dtbs_check doesn't find it. I will fix it.

Quoted 4 lines
Quoted 3 lines
arch/arm64/boot/dts/freescale/imx93-charge-control-y.dts new file +2 -0
+
+	pinctrl_eqos: eqosgrp {

[ ... ]

Quoted 12 lines

arch/arm64/boot/dts/freescale/imx93-charge-control-y.dts line 402

Quoted 9 lines
arch/arm64/boot/dts/freescale/imx93-charge-control-y.dts new file +9 -0
+	/* need to config the SION for data and cmd pad, refer to ERR052021 */
+	pinctrl_usdhc2_default: usdhc2grp {
+		fsl,pins = <
+			MX93_PAD_SD2_CLK__USDHC2_CLK		0x119e
+			MX93_PAD_SD2_CMD__USDHC2_CMD		0x4000139e
+			MX93_PAD_SD2_DATA0__USDHC2_DATA0	0x4000138e
+			MX93_PAD_SD2_DATA1__USDHC2_DATA1	0x4000138e
+			MX93_PAD_SD2_DATA2__USDHC2_DATA2	0x4000138e
+			MX93_PAD_SD2_DATA3__USDHC2_DATA3	0x4000139e

[Severity: Medium]
Are these drive strength settings intended to be different across the data lines?

Yes, DSE can be optimized for electromagnetic compatibility

Best regards

Quoted 26 lines

In this default mode configuration, DATA0-2 use 0x4000138e (DSE bit 4 = 0), while DATA3 uses 0x4000139e (DSE bit 4 = 1). Mismatched drive strengths on the same SDIO bus can introduce signal skew and degrade signal integrity.

arch/arm64/boot/dts/freescale/imx93-charge-control-y.dts line 415

Quoted 13 lines
arch/arm64/boot/dts/freescale/imx93-charge-control-y.dts new file +13 -0
+			MX93_PAD_SD2_VSELECT__USDHC2_VSELECT	0x51e
+		>;
+	};
+
+	/* need to config the SION for data and cmd pad, refer to ERR052021 */
+	pinctrl_usdhc2_100mhz: usdhc2-100mhzgrp {
+		fsl,pins = <
+			MX93_PAD_SD2_CLK__USDHC2_CLK		0x119e
+			MX93_PAD_SD2_CMD__USDHC2_CMD		0x4000139e
+			MX93_PAD_SD2_DATA0__USDHC2_DATA0	0x4000138e
+			MX93_PAD_SD2_DATA1__USDHC2_DATA1	0x4000138e
+			MX93_PAD_SD2_DATA2__USDHC2_DATA2	0x4000139e
+			MX93_PAD_SD2_DATA3__USDHC2_DATA3	0x4000139e

[Severity: Medium]
Similarly, in the 100mhz configuration, DATA0-1 are set to 0x4000138e and DATA2-3 are set to 0x4000139e. Could this mismatch cause high-frequency enumeration or data corruption issues on the SD bus?

Quoted 3 lines
arch/arm64/boot/dts/freescale/imx93-charge-control-y.dts new file +3 -0
+			MX93_PAD_SD2_VSELECT__USDHC2_VSELECT	0x51e
+		>;
+	};