From 64002d0cb00f81b214f5144aebb80aead92d9818 Mon Sep 17 00:00:00 2001 From: Sebastian Reichel Date: Tue, 15 Oct 2024 17:26:45 +0200 Subject: [PATCH] board: rock5b-rk3588: enable USB-C in operating system 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. Reviewed-by: Kever Yang Tested-by: Soeren Moch Tested-by: Anand Moon Reviewed-by: Jonas Karlman Signed-off-by: Sebastian Reichel --- board/radxa/rock5b-rk3588/Makefile | 6 ++++++ board/radxa/rock5b-rk3588/rock5b-rk3588.c | 16 ++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 board/radxa/rock5b-rk3588/Makefile create mode 100644 board/radxa/rock5b-rk3588/rock5b-rk3588.c diff --git a/board/radxa/rock5b-rk3588/Makefile b/board/radxa/rock5b-rk3588/Makefile new file mode 100644 index 0000000000..95d813596d --- /dev/null +++ b/board/radxa/rock5b-rk3588/Makefile @@ -0,0 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0+ +# +# Copyright (c) 2022 Collabora Ltd. +# + +obj-y += rock5b-rk3588.o diff --git a/board/radxa/rock5b-rk3588/rock5b-rk3588.c b/board/radxa/rock5b-rk3588/rock5b-rk3588.c new file mode 100644 index 0000000000..fc2f69db22 --- /dev/null +++ b/board/radxa/rock5b-rk3588/rock5b-rk3588.c @@ -0,0 +1,16 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright (c) 2023-2024 Collabora Ltd. + */ + +#include +#include + +#ifdef CONFIG_OF_BOARD_SETUP +int ft_board_setup(void *blob, struct bd_info *bd) +{ + if (IS_ENABLED(CONFIG_TYPEC_FUSB302)) + fdt_status_okay_by_compatible(blob, "fcs,fusb302"); + return 0; +} +#endif -- 2.39.5