From b80daf65c8e2243ae2aec2a6f6d235cdacf61232 Mon Sep 17 00:00:00 2001 From: Josuah Demangeon Date: Tue, 27 Jan 2026 20:05:59 +0000 Subject: [PATCH] dts: bindings: dwc2: add extra hardware registers and devicetree entries Add 'gsnpsid' and 'ghwcfg3' to DWC2 USB peripheral in order to check that they are as expected at runtimne, which the host driver can use. Signed-off-by: Josuah Demangeon --- dts/arm/syna/sr100.dtsi | 2 ++ dts/bindings/usb/snps,dwc2.yaml | 11 +++++++++++ dts/vendor/nordic/nrf54h20.dtsi | 2 ++ dts/vendor/nordic/nrf54lm20_a_b.dtsi | 2 ++ dts/xtensa/espressif/esp32s3/esp32s3_common.dtsi | 2 ++ 5 files changed, 19 insertions(+) diff --git a/dts/arm/syna/sr100.dtsi b/dts/arm/syna/sr100.dtsi index 8c504ebc2b0ef..49ebc9751d636 100644 --- a/dts/arm/syna/sr100.dtsi +++ b/dts/arm/syna/sr100.dtsi @@ -189,8 +189,10 @@ num-out-eps = <8>; num-in-eps = <8>; clocks = <&gcr SYNA_USB_CLK>; + gsnpsid = <0x5532430a>; ghwcfg1 = <0x00000000>; ghwcfg2 = <0x02882054>; // 8 endpoints, dynamic sizing + ghwcfg3 = <0x0c78c468>; ghwcfg4 = <0xe2003e20>; // 9 in endpoints, desc-DMA status = "disabled"; }; diff --git a/dts/bindings/usb/snps,dwc2.yaml b/dts/bindings/usb/snps,dwc2.yaml index d5b0167f26b32..dc9daa3961f26 100644 --- a/dts/bindings/usb/snps,dwc2.yaml +++ b/dts/bindings/usb/snps,dwc2.yaml @@ -31,6 +31,11 @@ properties: description: | Number of configured IN endpoints including control endpoint. + gsnpsid: + type: int + description: | + Value of the GSNPSID register, used to declare the version of the core. + ghwcfg1: type: int required: true @@ -45,6 +50,12 @@ properties: Value of the GHWCFG2 register. It is used to determine available endpoint types during driver pre-initialization. + ghwcfg3: + type: int + description: | + Value of the GHWCFG3 register. It is used to determine available endpoint + types during driver pre-initialization. + ghwcfg4: type: int required: true diff --git a/dts/vendor/nordic/nrf54h20.dtsi b/dts/vendor/nordic/nrf54h20.dtsi index aecd7d8966782..9b686ca918047 100644 --- a/dts/vendor/nordic/nrf54h20.dtsi +++ b/dts/vendor/nordic/nrf54h20.dtsi @@ -670,8 +670,10 @@ interrupts = <134 NRF_DEFAULT_IRQ_PRIORITY>; num-in-eps = <8>; num-out-eps = <10>; + gsnpsid = <0x4f54430a>; ghwcfg1 = <0xaa555000>; ghwcfg2 = <0x22abfc72>; + ghwcfg3 = <0x0beac0e8>; ghwcfg4 = <0x1e10aa60>; status = "disabled"; }; diff --git a/dts/vendor/nordic/nrf54lm20_a_b.dtsi b/dts/vendor/nordic/nrf54lm20_a_b.dtsi index 39c94ffdea061..46fd019179225 100644 --- a/dts/vendor/nordic/nrf54lm20_a_b.dtsi +++ b/dts/vendor/nordic/nrf54lm20_a_b.dtsi @@ -249,8 +249,10 @@ interrupts = <90 NRF_DEFAULT_IRQ_PRIORITY>; num-in-eps = <16>; num-out-eps = <16>; + gsnpsid = <0x4f54500b>; ghwcfg1 = <0x0>; ghwcfg2 = <0x22affc52>; + ghwcfg3 = <0x0be0c0e8>; ghwcfg4 = <0x3e10aa60>; status = "disabled"; }; diff --git a/dts/xtensa/espressif/esp32s3/esp32s3_common.dtsi b/dts/xtensa/espressif/esp32s3/esp32s3_common.dtsi index 570f828e4734e..7b3d61740ee6b 100644 --- a/dts/xtensa/espressif/esp32s3/esp32s3_common.dtsi +++ b/dts/xtensa/espressif/esp32s3/esp32s3_common.dtsi @@ -436,8 +436,10 @@ clocks = <&clock ESP32_USB_MODULE>; num-out-eps = <6>; num-in-eps = <6>; + gsnpsid = <0x4f54400a>; ghwcfg1 = <0x00000000>; ghwcfg2 = <0x224dd930>; + ghwcfg3 = <0x00c804b5>; ghwcfg4 = <0xd3f0a030>; };