Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
352 changes: 124 additions & 228 deletions drivers/usb/udc/udc_dwc2.c

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions drivers/usb/udc/udc_dwc2.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ struct udc_dwc2_config {
struct udc_ep_config *ep_cfg_in;
struct udc_ep_config *ep_cfg_out;
struct usb_dwc2_reg *const base;
const uint16_t *const fifo_sizes;
/* Pointer to pin control configuration or NULL */
struct pinctrl_dev_config *const pcfg;
/* Pointer to vendor quirks or NULL */
Expand Down
10 changes: 10 additions & 0 deletions dts/arm/intel_socfpga_std/socfpga.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,11 @@
ghwcfg1 = <0x00000000>;
ghwcfg2 = <0x208ffc90>;
ghwcfg4 = <0xfe0f0020>;
/* 8064 locations with full flexibility */
g-rx-fifo-size = <608>;
g-np-tx-fifo-size = <32>;
g-tx-fifo-size = <512 512 512 512 512 512 512 512
512 512 512 512 512 512 256>;
status = "disabled";
};

Expand All @@ -251,6 +256,11 @@
ghwcfg1 = <0x00000000>;
ghwcfg2 = <0x208ffc90>;
ghwcfg4 = <0xfe0f0020>;
/* 8064 locations with full flexibility */
g-rx-fifo-size = <608>;
g-np-tx-fifo-size = <32>;
g-tx-fifo-size = <512 512 512 512 512 512 512 512
512 512 512 512 512 512 256>;
status = "okay";
};

Expand Down
19 changes: 19 additions & 0 deletions dts/bindings/usb/snps,dwc2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,22 @@ properties:
description: |
Value of the GHWCFG4 register. It is used to determine available endpoint
types during driver pre-initialization.

g-rx-fifo-size:
type: int
required: true
description: |
Rx Data FIFO Depth. Must not exceed GRXFSIZ.RxFDep power-on value.

g-np-tx-fifo-size:
type: int
required: true
description: |
IN Endpoint 0 FIFO Depth. Must not exceed GNPTXFSIZ.NPTXFDep power-on value.

g-tx-fifo-size:
type: array
required: true
description: |
IN Endpoint Transmit fifo depths. Values must not exceed their respective
DIEPTXFn.INEPnTxFDep power-on values.
10 changes: 10 additions & 0 deletions dts/vendor/nordic/nrf54h20.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -638,6 +638,16 @@
ghwcfg1 = <0xaa555000>;
ghwcfg2 = <0x22abfc72>;
ghwcfg4 = <0x1e10aa60>;
/* 3050 locations available, GRXFSIZ is 548,
* GNPTXFSIZ and DIEPTXFn are 512. The default
* values (upper bounds) sum up above the limit.
* Allow High-Bandwidth only on TxFIFO 1 and 2.
* Use maximum possible for RxFIFO and allocate
* everything remaining for TxFIFO 0.
*/
g-rx-fifo-size = <548>;
g-np-tx-fifo-size = <198>;
g-tx-fifo-size = <512 512 256 256 256 256 256>;
status = "disabled";
};

Expand Down
5 changes: 5 additions & 0 deletions dts/vendor/nordic/nrf54lm20a.dtsi
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
/*
* Copyright (c) 2024 Nordic Semiconductor ASA
*
Expand Down Expand Up @@ -98,7 +98,7 @@

#ifdef USE_NON_SECURE_ADDRESS_MAP
/* intentionally empty because UICR is hardware fixed to Secure */
#else

Check failure on line 101 in dts/vendor/nordic/nrf54lm20a.dtsi

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

dts/vendor/nordic/nrf54lm20a.dtsi:101 Insert new lines. Expecting 2.
uicr: uicr@ffd000 {
compatible = "nordic,nrf-uicr";
reg = <0xffd000 0x1000>;
Expand Down Expand Up @@ -127,7 +127,7 @@
#address-cells = <1>;
#size-cells = <1>;
ranges = <0x0 0x40000000 0x10000000>;
#else

Check failure on line 130 in dts/vendor/nordic/nrf54lm20a.dtsi

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

dts/vendor/nordic/nrf54lm20a.dtsi:130 Insert new lines. Expecting 2.
global_peripherals: peripheral@50000000 {
reg = <0x50000000 0x10000000>;
ranges = <0x0 0x50000000 0x10000000>;
Expand Down Expand Up @@ -232,6 +232,11 @@
ghwcfg1 = <0x0>;
ghwcfg2 = <0x22affc52>;
ghwcfg4 = <0x3e10aa60>;
/* 3040 locations with full flexibility */
g-rx-fifo-size = <592>;
g-np-tx-fifo-size = <32>;
g-tx-fifo-size = <512 256 256 256 256 256 256 256
16 16 16 16 16 16 16>;
status = "disabled";
};

Expand Down Expand Up @@ -762,7 +767,7 @@

#ifdef USE_NON_SECURE_ADDRESS_MAP
/* intentionally empty because WDT30 is hardware fixed to Secure */
#else

Check failure on line 770 in dts/vendor/nordic/nrf54lm20a.dtsi

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

dts/vendor/nordic/nrf54lm20a.dtsi:770 Insert new lines. Expecting 2.
wdt30: watchdog@108000 {
compatible = "nordic,nrf-wdt";
reg = <0x108000 0x620>;
Expand Down
10 changes: 10 additions & 0 deletions dts/vendor/nordic/nrf9280.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,16 @@
ghwcfg1 = <0xaa555000>;
ghwcfg2 = <0x22abfc72>;
ghwcfg4 = <0x1e10aa60>;
/* 3050 locations available, GRXFSIZ is 548,
* GNPTXFSIZ and DIEPTXFn are 512. The default
* values (upper bounds) sum up above the limit.
* Allow High-Bandwidth only on TxFIFO 1 and 2.
* Use maximum possible for RxFIFO and allocate
* everything remaining for TxFIFO 0.
*/
g-rx-fifo-size = <548>;
g-np-tx-fifo-size = <198>;
g-tx-fifo-size = <512 512 256 256 256 256 256>;
status = "disabled";
};

Expand Down
3 changes: 3 additions & 0 deletions dts/xtensa/espressif/esp32s3/esp32s3_common.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,9 @@
ghwcfg1 = <0x00000000>;
ghwcfg2 = <0x224dd930>;
ghwcfg4 = <0xd3f0a030>;
g-rx-fifo-size = <64>;
g-np-tx-fifo-size = <16>;
g-tx-fifo-size = <32 32 32 24>;
};

timer0: counter@6001f000 {
Expand Down
Loading