iting for GINTSTS_CURMODE_HOST timeout"
>
> Fixes: c5d685b8993c ("usb: dwc2: Unify flush and reset logic with v4.20a
> support")
> Signed-off-by: Patrick Delaunay
Thanks for the fix.
Reviewed-by: Junhui Liu
--
Best regards,
Junhui Liu
00:29, Junhui Liu wrote:
> Refactor DWC2 USB gadget driver to replace manual read-modify-write
> operations with `clrsetbits_le32`, `setbits_le32`, and `clrbits_le32`
> macros, which simplify the code and improve readability.
>
> Signed-off-by: Junhui Liu
> ---
> This patc
Update UART compatible in k1 dts to "intel,xscale-uart", introduced in
commit 2d84e1519c5b ("serial: ns16550: Add Intel XScale support")
recently, aligning dts with the upstream kernel.
Tested-by: Huan Zhou
Signed-off-by: Junhui Liu
---
arch/riscv/dts/k1.dtsi | 22 +
Refactor DWC2 USB gadget driver to replace manual read-modify-write
operations with `clrsetbits_le32`, `setbits_le32`, and `clrbits_le32`
macros, which simplify the code and improve readability.
Signed-off-by: Junhui Liu
---
This patch is a supplement of patch series [1].
[1]
https
ommon/k230_board_common.h#L52
Signed-off-by: Junhui Liu
---
doc/board/canaan/index.rst | 8
doc/board/canaan/k230_canmv.rst | 88 +
doc/board/index.rst | 1 +
3 files changed, 97 insertions(+)
diff --git a/doc/board/canaan/index.rst
Add support for K230 CanMV board with serial console and usb otg
support. It can boot via vendor's u-boot-spl and boot into Linux
via tftp through the onboard RTL8152.
Signed-off-by: Junhui Liu
---
board/canaan/k230_canmv/Kconfig | 19 +++
board/canaan/k230_canmv/MAINTA
Add Canaan K230 SoC with sysreset support, running without cache
enabled.
Signed-off-by: Junhui Liu
---
arch/riscv/Kconfig | 5 +
arch/riscv/cpu/k230/Kconfig | 14 ++
arch/riscv/cpu/k230/Makefile | 6 ++
arch/riscv/cpu/k230/cpu.c| 9 +
arch/riscv
blob/v1.8/src/little/uboot/board/canaan/common/k230_img.c#L125
Signed-off-by: Junhui Liu
---
arch/riscv/dts/Makefile | 1 +
arch/riscv/dts/k230-canmv.dts | 31 +++
arch/riscv/dts/k230-u-boot.dtsi | 25 ++
arch/riscv/dts/k230.dtsi| 175 +
Canaan Kendryte K230 SoC instantiates a dwc2 v4.30a core. This patch
adds the compatible for it.
Signed-off-by: Junhui Liu
---
The USB function on K230 currently relies on patch [1], which updates
the core reset flow of dwc2 in version 4.20a and newer. However, the USB
PHY drivers is not
https://developer.canaan-creative.com/k230/en/dev/CanMV_K230_Tutorial.html
[2] https://developer.canaan-creative.com/proDetail/230
[3] https://gist.github.com/Judehahh/c0ed94de3a0aeada2e2f1bc3a397fa2d
---
Junhui Liu (5):
usb: dwc2: Add support for Canaan K230
riscv: dts: canaan: Add basic device
: Junhui Liu
---
drivers/usb/gadget/dwc2_udc_otg.c | 4 +-
drivers/usb/host/dwc2.c | 100 +++---
2 files changed, 52 insertions(+), 52 deletions(-)
diff --git a/drivers/usb/gadget/dwc2_udc_otg.c
b/drivers/usb/gadget/dwc2_udc_otg.c
index
:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=65dc2e725286106f99c6f6b78e3d9c52c15f3a9c
Signed-off-by: Kongyang Liu
Tested-by: Peter Robinson
Signed-off-by: Junhui Liu
---
This commit does not add the handling of ret returned from the
dwc2_core_reset
-by: Junhui Liu
---
drivers/usb/common/dwc2_core.h | 430 +
drivers/usb/gadget/dwc2_udc_otg_regs.h | 154 +---
drivers/usb/host/dwc2.h| 291 --
3 files changed, 431 insertions(+), 444 deletions(-)
diff --git a
Korpershoek
Signed-off-by: Junhui Liu
---
drivers/usb/gadget/dwc2_udc_otg.c | 62 +--
drivers/usb/gadget/dwc2_udc_otg_regs.h | 243 ++-
drivers/usb/gadget/dwc2_udc_otg_xfer_dma.c | 130 +++---
drivers/usb/host/dwc2.c| 260 ++--
drivers/usb/host/dwc2
-by: Peter Robinson
Signed-off-by: Junhui Liu
---
drivers/usb/gadget/dwc2_udc_otg.c | 5 +-
drivers/usb/gadget/dwc2_udc_otg_regs.h | 250
drivers/usb/gadget/dwc2_udc_otg_xfer_dma.c | 21 +-
drivers/usb/host/dwc2.c| 101 ++-
drivers/usb/host/dwc2.h
://rockchip.fr/RK312X%20TRM/chapter-26-usb-otg-2-0.pdf#page=24
Signed-off-by: Kongyang Liu
Reviewed-by: Marek Vasut
Tested-by: Peter Robinson
Reviewed-by: Mattijs Korpershoek
Signed-off-by: Junhui Liu
---
Additionally, the boards I have only use internal DMA mode, and it’s
unclear which chips
ut
Tested-by: Peter Robinson
Reviewed-by: Mattijs Korpershoek
Signed-off-by: Junhui Liu
---
drivers/usb/host/dwc2.c | 24 +---
1 file changed, 13 insertions(+), 11 deletions(-)
diff --git a/drivers/usb/host/dwc2.c b/drivers/usb/host/dw
Liu
Reviewed-by: Marek Vasut
Tested-by: Peter Robinson
Reviewed-by: Mattijs Korpershoek
Signed-off-by: Junhui Liu
---
drivers/usb/common/dwc2_core.h | 126 ++
drivers/usb/gadget/dwc2_udc_otg.c | 94 +++---
drivers/usb/gadget/dwc2_udc_otg_regs.h
alculating HBstLen for external DMA mode.
- Extend the changes that replace uint32 with u32 to also include u8 and
u16.
- Link to v1:
https://lore.kernel.org/r/20240522142311.17351-1-seashell11234...@gmail.com
---
Junhui Liu (1):
usb: dwc2: Fix incorrect ULPI_UTMI_SEL bit setting
Kongyang Li
Hi Mattijs,
Thank you for your review.
On 07/01/2025 10:55, Mattijs Korpershoek wrote:
> Hi Junhui,
>
> Thank you for the patch.
>
> On sam., janv. 04, 2025 at 11:37, Junhui Liu wrote:
>
>> From: Kongyang Liu
>>
>> Some macros are shared between host
Hi Mattijs,
On 07/01/2025 10:47, Mattijs Korpershoek wrote:
> Hi Junhui,
>
> On sam., janv. 04, 2025 at 11:37, Junhui Liu wrote:
>
>> This series improves the USB DWC2 driver by extracting register
>> definitions into a common file for better readability and updatin
On 06/01/2025 16:37, Marek Vasut wrote:
> On 1/6/25 10:14 AM, Junhui Liu wrote:
>> Hi Marek,
>>
>> On 05/01/2025 20:19, Marek Vasut wrote:
>>> On 1/4/25 4:37 AM, Junhui Liu wrote:
>>>> From: Kongyang Liu
>>>>
>>>> This patch me
Hi Marek,
On 05/01/2025 20:19, Marek Vasut wrote:
> On 1/4/25 4:37 AM, Junhui Liu wrote:
>> From: Kongyang Liu
>>
>> This patch merges flush and reset logic for both host and gadget code
>> into a common set of functions, reducing duplication. It also adds support
>
: Junhui Liu
---
drivers/usb/gadget/dwc2_udc_otg.c | 4 +-
drivers/usb/host/dwc2.c | 100 +++---
2 files changed, 52 insertions(+), 52 deletions(-)
diff --git a/drivers/usb/gadget/dwc2_udc_otg.c
b/drivers/usb/gadget/dwc2_udc_otg.c
index
:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=65dc2e725286106f99c6f6b78e3d9c52c15f3a9c
Signed-off-by: Kongyang Liu
Signed-off-by: Junhui Liu
---
This commit does not add the handling of ret returned from the
dwc2_core_reset, dwc2_flush_tx_fifo and
-by: Junhui Liu
---
drivers/usb/common/dwc2_core.h | 430 +
drivers/usb/gadget/dwc2_udc_otg_regs.h | 160 +---
drivers/usb/host/dwc2.h| 291 --
3 files changed, 431 insertions(+), 450 deletions(-)
diff --git a
From: Kongyang Liu
Update the DWC2 macros to match those used in the Linux kernel, making
it easier to synchronize updates with kernel. Also removed some unused
macros to cleanup the code.
Signed-off-by: Kongyang Liu
Reviewed-by: Marek Vasut
Tested-by: Peter Robinson
Signed-off-by: Junhui
From: Kongyang Liu
Use FIELD_PREP, FIELD_GET, BIT, and GENMASK macros to standardize bit
manipulation across the DWC2 code, improving readability and
maintainability without altering functionality.
Signed-off-by: Kongyang Liu
Signed-off-by: Junhui Liu
---
drivers/usb/gadget/dwc2_udc_otg.c
://rockchip.fr/RK312X%20TRM/chapter-26-usb-otg-2-0.pdf#page=24
Signed-off-by: Kongyang Liu
Reviewed-by: Marek Vasut
Tested-by: Peter Robinson
Signed-off-by: Junhui Liu
---
Additionally, the boards I have only use internal DMA mode, and it’s
unclear which chips employ external DMA. The testing was
ut
Tested-by: Peter Robinson
Signed-off-by: Junhui Liu
---
drivers/usb/host/dwc2.c | 24 +---
1 file changed, 13 insertions(+), 11 deletions(-)
diff --git a/drivers/usb/host/dwc2.c b/drivers/usb/host/dwc2.c
index
b6c8b3d5a6bdf375f1adeb106d4832
ith u32 to also include u8 and
u16.
- Link to v1:
https://lore.kernel.org/r/20240522142311.17351-1-seashell11234...@gmail.com
---
Junhui Liu (1):
usb: dwc2: Fix incorrect ULPI_UTMI_SEL bit setting
Kongyang Liu (7):
usb: dwc2: Extract register definitions to common header file
Liu
Reviewed-by: Marek Vasut
Tested-by: Peter Robinson
Signed-off-by: Junhui Liu
---
drivers/usb/common/dwc2_core.h | 126 ++
drivers/usb/gadget/dwc2_udc_otg.c | 94 +++---
drivers/usb/gadget/dwc2_udc_otg_regs.h | 68 +-
drivers/usb
From: Kongyang Liu
Some macros are shared between host and gadget code, causing duplicated
definitions. Move DWC2 macro definitions from host and gadget code into a
common header to reduce duplication.
Signed-off-by: Kongyang Liu
Signed-off-by: Junhui Liu
---
drivers/usb/common/dwc2_core.h
From: Kongyang Liu
Updates all instances of uint8_t, uint16_t, and uint32_t to u8, u16, and
u32 respectively, ensuring consistent use of kernel-preferred types and
resolving checkpatch.pl warnings.
Signed-off-by: Kongyang Liu
Signed-off-by: Junhui Liu
---
drivers/usb/gadget/dwc2_udc_otg.c
From: Kongyang Liu
Update the DWC2 macros to match those used in the Linux kernel, making
it easier to synchronize updates with kernel. Also removed some unused
macros to cleanup the code.
Signed-off-by: Kongyang Liu
Signed-off-by: Junhui Liu
---
drivers/usb/gadget/dwc2_udc_otg.c
Liu
Signed-off-by: Junhui Liu
---
drivers/usb/common/dwc2_core.h | 126 ++
drivers/usb/gadget/dwc2_udc_otg.c | 94 +++---
drivers/usb/gadget/dwc2_udc_otg_regs.h | 68 +-
drivers/usb/gadget/dwc2_udc_otg_xfer_dma.c | 201
From: Kongyang Liu
Use FIELD_PREP, FIELD_GET, BIT, and GENMASK macros to standardize bit
manipulation across the DWC2 code, improving readability and
maintainability without altering functionality.
Signed-off-by: Kongyang Liu
Signed-off-by: Junhui Liu
---
drivers/usb/gadget/dwc2_udc_otg.c
://rockchip.fr/RK312X%20TRM/chapter-26-usb-otg-2-0.pdf#page=24
Signed-off-by: Kongyang Liu
Signed-off-by: Junhui Liu
---
Additionally, the boards I have only use internal DMA mode, and it’s
unclear which chips employ external DMA. The testing was performed by
comparing against the datasheet, and
From: Junhui Liu
The ULPI_UTMI_SEL bit in the DWC2 driver was set incorrectly. According
to the datasheet [1], this bit should be set to 0 for UTMI interface and 1
for ULPI interface. The existing code had this logic reversed,
causing the interface selection to be incorrect.
This commit
:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=65dc2e725286106f99c6f6b78e3d9c52c15f3a9c
Signed-off-by: Kongyang Liu
Signed-off-by: Junhui Liu
---
drivers/usb/common/Makefile| 2 +
drivers/usb/common/dwc2_core.c | 103
uint32 with u32 to also include u8 and
u16.
- Link to v1:
https://lore.kernel.org/r/20240522142311.17351-1-seashell11234...@gmail.com
---
Junhui Liu (8):
usb: dwc2: Extract register definitions to common header file
usb: dwc2: Fix incorrect ULPI_UTMI_SEL bit setting
USB: dwc2
41 matches
Mail list logo