# Re: \[PATCH\] USB: serial: cp210x: Fix alternate function for CP2102N QFN20

- From: Johan Hovold \<johan@kernel.org\>
- Date: 2021-06-10 07:53:55 
- List: linux-usb
- Page: https://ratatoskr.run/linux-usb/2021/06/1409594
- Thread: https://ratatoskr.run/linux-usb/2021/05/1395494/t.md

```text
On Fri, May 28, 2021 at 10:39:31PM +0200, Stefan Agner wrote:
> The QFN20 part has a different GPIO/port function assignment. The
> configuration struct bit field ordered as TX/RX/RS485/WAKEUP/CLK
> which exactly matches GPIO0-3 for QFN24/28. However, QFN20 has a
> different GPIO to primary function assignment.
> 
> Special case QFN20 to follow to properly detect which GPIOs are
> available.
> 
> Signed-off-by: Stefan Agner <stefan@agner.ch>
> ---
> Tested on a custom PCB with a CP2102N QFP20 device. I noticed the bug after
> configuring GPIO.2/3 to be TX/RX LED.

Thanks for fixing this, Stefan.

Nice and clean and patch, and your findings match the datasheet ("Table
4.2. GPIO Pin Alternate Functions").

Now applied for 5.13 with a stable tag.

Johan
```
