[PATCH v3 4/7] board: rock5b-rk3588: enable USB-C in operating system
Jonas Karlman
jonas at kwiboo.se
Fri Aug 2 23:04:05 CEST 2024
Hi Sebastian,
On 2024-08-02 19:59, Sebastian Reichel wrote:
> Since older U-Boot releases do not negotiate USB PD, the kernel
> DT may not enable the USB-C controller by default to avoid a
> regression. The plan is to upstream it with 'status = "fail";'
> instead. U-Boot should then mark it as 'status = "okay";' if
> it negotiated USB PD. Currently existing upstream kernel DTs do
> not yet have the USB-C controller at all, so we ignore any
> failures.
I do not really understand why you need to upstream it this way, there
are plenty of other rk3588 boards with fcs,fusb302 already having status
"okay" that possible are affected by same USB PD issue that ROCK 5B
have.
I guess you want to try and protect users that upgrade kernel DT and
ignore upgrading to a newer U-Boot, use vendor U-Boot or any other
bootloader from having possible issues with those USB PD power supplies
that have issues?
>
> Signed-off-by: Sebastian Reichel <sebastian.reichel at collabora.com>
> ---
> board/radxa/rock5b-rk3588/rock5b-rk3588.c | 11 +++++++++++
> 1 file changed, 11 insertions(+)
>
> diff --git a/board/radxa/rock5b-rk3588/rock5b-rk3588.c b/board/radxa/rock5b-rk3588/rock5b-rk3588.c
> index 1c17ae93c76c..4e926ebf2cb0 100644
> --- a/board/radxa/rock5b-rk3588/rock5b-rk3588.c
> +++ b/board/radxa/rock5b-rk3588/rock5b-rk3588.c
> @@ -3,6 +3,8 @@
> * Copyright (c) 2023-2024 Collabora Ltd.
> */
>
> +#include <fdtdec.h>
> +#include <fdt_support.h>
> #include <usb/tcpm.h>
>
> #ifdef CONFIG_MISC_INIT_R
> @@ -33,3 +35,12 @@ int misc_init_r(void)
> return 0;
> }
> #endif
> +
> +#ifdef CONFIG_OF_BOARD_SETUP
> +int ft_board_setup(void *blob, struct bd_info *bd)
> +{
> + if (IS_ENABLED(CONFIG_MISC_INIT_R))
It make very little sense to check for this, it is implied for almost
all Rockchip boards since it is used in rockchip board common code
to setup serial and Ethernet mac addresses env vars.
Regards,
Jonas
> + fdt_status_okay_by_compatible(blob, "fcs,fusb302");
> + return 0;
> +}
> +#endif
More information about the U-Boot
mailing list