[PATCH 2/2] rockchip: handle peripheral as well as otg dr_mode
Kever Yang
kever.yang at rock-chips.com
Thu Apr 13 04:17:13 CEST 2023
On 2023/4/12 19:52, John Keeping wrote:
> The OTG port is identified by inspecting the "dr_mode" property which is
> expected to be "otg" for this port. But it will work just as well as a
> device controller when dr_mode is set to "peripheral", which may be
> required if the mode detection pin is not set up correctly and the
> device controller needs to be programmed to override this.
>
> Signed-off-by: John Keeping <john at metanate.com>
Reviewed-by: Kever Yang <kever.yang at rock-chips.com>
Thanks,
- Kever
> ---
> arch/arm/mach-rockchip/board.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/arch/arm/mach-rockchip/board.c b/arch/arm/mach-rockchip/board.c
> index 6d33d65780..45d9eae870 100644
> --- a/arch/arm/mach-rockchip/board.c
> +++ b/arch/arm/mach-rockchip/board.c
> @@ -231,6 +231,7 @@ int board_usb_init(int index, enum usb_init_type init)
> while (ofnode_valid(node)) {
> switch (usb_get_dr_mode(node)) {
> case USB_DR_MODE_OTG:
> + case USB_DR_MODE_PERIPHERAL:
> matched = true;
> break;
>
More information about the U-Boot
mailing list