Skip to contentSkip to conversation

arm64: dts: freescale: Add chargebyte Charge Control Y

PATCH Superseded Stefan Wahren 2 participants 5 messages Sep 2

Subsystems (4)

v3 of 7 Superseded Latest is v7 →

lore
Share & tools
lore
#0 lore raw

v3 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 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 (3):
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         |   1 +
 arch/arm64/boot/dts/freescale/Makefile        |   1 +
 .../dts/freescale/imx93-charge-control-y.dts  | 441 ++++++++++++++++++
 .../boot/dts/freescale/imx93-phycore-som.dtsi |   2 +-
 5 files changed, 445 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm64/boot/dts/freescale/imx93-charge-control-y.dts
Signature · 1 line
2.43.0
#1 lore raw

PATCH v3 1/3 dt-bindings: arm: fsl: Add chargebyte Charge Control Y

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
#2 lore raw

PATCH v3 2/3 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 9f5c37ca6496..3ed4ce219120 100644
@@ -18,6 +18,7 @@ properties:
       - items:
           - enum:
               - microchip,ata6561
+              - microchip,mcp2542
               - ti,tcan1051
           - const: ti,tcan1042
       - items:
Signature · 1 line
2.43.0
#3 lore raw

Re: [PATCH V3 2/3] dt-bindings: phy: ti,tcan104x-can: Document Microchip MCP2542

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Medium] The newly added `microchip,mcp2542` compatible string bypasses schema validation hardware…

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] The newly added microchip,mcp2542 compatible string bypasses schema validation hardware constraints because its fallback conditional block uses a strict enum match rather than contains. --

commit c5426cb50d1b23a21e92a69a5197ccb523f72e8b
Author: Stefan Wahren <[email protected]>

dt-bindings: phy: ti,tcan104x-can: Document Microchip MCP2542

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 properties: · line 21

Quoted 9 lines
Documentation/devicetree/bindings/phy/ti,tcan104x-can.yaml +1 -0
index 9f5c37ca6496a..3ed4ce2191201 100644
@@ -18,6 +18,7 @@ properties:
       - items:
           - enum:
               - microchip,ata6561
+              - microchip,mcp2542

[Severity: Medium]
Will this newly added compatible string bypass the hardware constraints enforced later in the schema?

When a device tree defines compatible = "microchip,mcp2542", "ti,tcan1042", the schema parses it as a string array. However, the allOf conditional block further down in the file checks for ti,tcan1042 using a strict scalar enum match:

allOf:
- if:
properties:
compatible:
enum:
- nxp,tjr1443
- ti,tcan1042
- ti,tcan1043
then:

Since the array fails the strict enum match, the then constraints are skipped, which allows a microchip,mcp2542 device node with an invalid configuration to silently pass dt_binding_check.

Should the allOf block be updated to use contains instead of enum, or should microchip,mcp2542 be explicitly added to the enum list, to ensure these devices are properly validated?

Quoted 3 lines
Documentation/devicetree/bindings/phy/ti,tcan104x-can.yaml +0 -0
               - ti,tcan1051
           - const: ti,tcan1042
       - items:
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=2
#4 lore raw

PATCH v3 3/3 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