Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
718ba91
extcon: Add STM32 SPI IPC driver
Overdr0ne Jun 1, 2026
6fc6a6f
arm64: configs: Enable STM32 SPI IPC extcon driver
Overdr0ne Jun 1, 2026
579eca8
arm64: dts: freescale: Add STM32 SPI IPC and extcon nodes
Overdr0ne Jun 1, 2026
ba8eea0
extcon: Kconfig: select CRC8 and improve stm32-ipc help description
Overdr0ne Jun 3, 2026
2cedf5c
extcon: stm32-ipc: remove unused GPIO header
Overdr0ne Jun 3, 2026
7ee736b
extcon: stm32-ipc: fallback to safe disconnected state error
Overdr0ne Jun 3, 2026
d24f351
extcon: stm32-ipc: Use dev_dbg in threaded IRQ to avoid log flooding
Overdr0ne Jun 3, 2026
97c4e67
extcon: stm32-ipc: create per-device debugfs to avoid collisions
Overdr0ne Jun 3, 2026
2398ab9
extcon: stm32-ipc: implement CRC-8/length validation on SPI packets
Overdr0ne Jun 3, 2026
813a866
extcon: stm32-ipc: replace magic numbers with enum and defines
Overdr0ne Jun 3, 2026
fa00235
extcon: stm32-ipc: add Kconfig dependency on OF
Overdr0ne Jul 8, 2026
a76fffd
extcon: stm32-ipc: fix declarations after statements
Overdr0ne Jul 8, 2026
4033d42
extcon: stm32-ipc: validate port-id DT property
Overdr0ne Jul 8, 2026
a18f363
extcon: stm32-ipc: use dev_warn_ratelimited
Overdr0ne Jul 8, 2026
af22146
extcon: stm32-ipc: initialize CRC-8 table once
Overdr0ne Jul 8, 2026
7db84be
extcon: stm32-ipc: fix debugfs lifetime management
Overdr0ne Jul 8, 2026
57f6c94
extcon: stm32-ipc: cache states to reduce churn
Overdr0ne Jul 9, 2026
9d2588b
extcon: stm32-ipc: rate-limit SPI transfer error logs
Overdr0ne Jul 9, 2026
39b5db7
extcon: stm32-ipc: warn on unmatched connector ports
Overdr0ne Jul 9, 2026
f61e32c
extcon: stm32-ipc: clean up debugfs to avoid UAF
Overdr0ne Jul 9, 2026
9ec6b44
extcon: stm32-ipc: register platform driver first
Overdr0ne Jul 9, 2026
371883f
extcon: stm32-ipc: pass device struct directly
Overdr0ne Jul 9, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 22 additions & 6 deletions arch/arm64/boot/dts/freescale/mt-connect.dts
Original file line number Diff line number Diff line change
Expand Up @@ -495,15 +495,29 @@
};

&ecspi2 {
status = "okay";
#address-cells = <1>;
#size-cells = <0>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_ecspi2>;
pinctrl-0 = <&pinctrl_ecspi2 &pinctrl_stm_ipc>;
cs-gpios = <&gpio5 13 GPIO_ACTIVE_LOW>;
status = "okay";

spidev1: spi@0 {
stm_ipc: stm32-ipc@0 {
compatible = "multitracks,stm32-spi-ipc";
reg = <0>;
compatible = "rohm,dh2228fv";
spi-max-frequency = <500000>;
spi-max-frequency = <10000000>;
interrupt-parent = <&gpio2>;
interrupts = <11 IRQ_TYPE_EDGE_FALLING>;
Comment on lines +505 to +510

usb1_connector: connector-usb1 {
compatible = "multitracks,stm32-usb-connector";
port-id = <0>;
};

usb2_connector: connector-usb2 {
compatible = "multitracks,stm32-usb-connector";
port-id = <1>;
};
};
};

Expand All @@ -520,6 +534,7 @@
};

&usbotg1 {
extcon = <&usb1_connector>;
hnp-disable;
srp-disable;
adp-disable;
Expand All @@ -533,6 +548,7 @@
};

&usbotg2 {
extcon = <&usb2_connector>;
hnp-disable;
srp-disable;
adp-disable;
Expand Down Expand Up @@ -710,7 +726,7 @@
>;
};

pinctrl_typec1: typec1grp {
pinctrl_stm_ipc: stmipcgrp {
fsl,pins = <
MX8MM_IOMUXC_SD1_STROBE_GPIO2_IO11 0x159
>;
Expand Down
1 change: 1 addition & 0 deletions arch/arm64/configs/mt_connect_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -654,6 +654,7 @@ CONFIG_FSL_QIXIS=y
CONFIG_SOC_TI=y
CONFIG_EXTCON_PTN5150=m
CONFIG_EXTCON_USB_GPIO=y
CONFIG_EXTCON_STM32_SPI_IPC=y
CONFIG_IIO=y
CONFIG_FXLS8962AF_I2C=m
CONFIG_IIO_ST_ACCEL_3AXIS=m
Expand Down
9 changes: 9 additions & 0 deletions drivers/extcon/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,15 @@ config EXTCON_USB_GPIO
Say Y here to enable GPIO based USB cable detection extcon support.
Used typically if GPIO is used for USB ID pin detection.

config EXTCON_STM32_SPI_IPC
tristate "STM32 SPI IPC and Virtual Extcon support"
depends on SPI && OF
select CRC8
Comment thread
Overdr0ne marked this conversation as resolved.
help
Say Y here to enable the STM32 SPI IPC and Virtual Extcon driver,
which handles USB connection/cable event notifications reported
by an external STM32 co-processor over SPI.

config EXTCON_USBC_CROS_EC
tristate "ChromeOS Embedded Controller EXTCON support"
depends on CROS_EC
Expand Down
1 change: 1 addition & 0 deletions drivers/extcon/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,6 @@ obj-$(CONFIG_EXTCON_QCOM_SPMI_MISC) += extcon-qcom-spmi-misc.o
obj-$(CONFIG_EXTCON_RT8973A) += extcon-rt8973a.o
obj-$(CONFIG_EXTCON_SM5502) += extcon-sm5502.o
obj-$(CONFIG_EXTCON_USB_GPIO) += extcon-usb-gpio.o
obj-$(CONFIG_EXTCON_STM32_SPI_IPC) += extcon-stm32-ipc.o
obj-$(CONFIG_EXTCON_USBC_CROS_EC) += extcon-usbc-cros-ec.o
obj-$(CONFIG_EXTCON_USBC_TUSB320) += extcon-usbc-tusb320.o
Loading