From 3fccef41d6157985d84dc75cae6cc1c538451439 Mon Sep 17 00:00:00 2001 From: amazingfate Date: Sun, 2 Feb 2025 15:21:40 +0800 Subject: [PATCH] armsom-sige5: add pd negotiation support to uboot --- .../add-u-boot-pd-negotiation-support.patch | 41 +++++++++++++++++++ .../defconfig/armsom-sige5-rk3576_defconfig | 3 ++ 2 files changed, 44 insertions(+) create mode 100644 patch/u-boot/legacy/u-boot-radxa-rk35xx/board_armsom-sige5/add-u-boot-pd-negotiation-support.patch diff --git a/patch/u-boot/legacy/u-boot-radxa-rk35xx/board_armsom-sige5/add-u-boot-pd-negotiation-support.patch b/patch/u-boot/legacy/u-boot-radxa-rk35xx/board_armsom-sige5/add-u-boot-pd-negotiation-support.patch new file mode 100644 index 000000000000..f4092b29ee57 --- /dev/null +++ b/patch/u-boot/legacy/u-boot-radxa-rk35xx/board_armsom-sige5/add-u-boot-pd-negotiation-support.patch @@ -0,0 +1,41 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: amazingfate +Date: Thu, 2 May 2024 01:45:23 +0800 +Subject: add u-boot pd negotiation support + +--- + drivers/power/power_delivery/tcpm.c | 4 ++-- + include/configs/rk3576_common.h | 2 +- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/drivers/power/power_delivery/tcpm.c b/drivers/power/power_delivery/tcpm.c +index 22334c6230c4..1b94a401836a 100644 +--- a/drivers/power/power_delivery/tcpm.c ++++ b/drivers/power/power_delivery/tcpm.c +@@ -1390,8 +1390,8 @@ static void tcpm_pd_rx_handler(struct tcpm_port *port, + */ + if (!!(le16_to_cpu(msg->header) & PD_HEADER_DATA_ROLE) == + (port->data_role == TYPEC_HOST)) { +- printf("Data role mismatch, initiating error recovery\n"); +- tcpm_set_state(port, ERROR_RECOVERY, 0); ++ printf("Data role mismatch, hard resetting...\n"); ++ tcpm_set_state(port, HARD_RESET_SEND, 0); + } else { + if (cnt) + tcpm_pd_data_request(port, msg); +diff --git a/include/configs/rk3576_common.h b/include/configs/rk3576_common.h +index 549a2583c3ad..448ae2ec6ef0 100644 +--- a/include/configs/rk3576_common.h ++++ b/include/configs/rk3576_common.h +@@ -96,7 +96,7 @@ + #define CONFIG_USB_OHCI_NEW + #define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 1 + +-#define CONFIG_PREBOOT ++#define CONFIG_PREBOOT "charge_pd" + #define CONFIG_LIB_HW_RAND + + #endif +-- +Armbian + diff --git a/patch/u-boot/legacy/u-boot-radxa-rk35xx/defconfig/armsom-sige5-rk3576_defconfig b/patch/u-boot/legacy/u-boot-radxa-rk35xx/defconfig/armsom-sige5-rk3576_defconfig index e6ab7fffa007..96d9b13f00b1 100644 --- a/patch/u-boot/legacy/u-boot-radxa-rk35xx/defconfig/armsom-sige5-rk3576_defconfig +++ b/patch/u-boot/legacy/u-boot-radxa-rk35xx/defconfig/armsom-sige5-rk3576_defconfig @@ -219,3 +219,6 @@ CONFIG_AVB_LIBAVB_USER=y CONFIG_RK_AVB_LIBAVB_USER=y CONFIG_ROCKCHIP_EARLY_DISTRO_DTB=y CONFIG_ROCKCHIP_EARLY_DISTRO_DTB_PATH="/boot/dtb/rockchip/rk3576-armsom-sige5.dtb" +CONFIG_CMD_CHARGE_DISPLAY=y +CONFIG_CMD_PMIC=y +CONFIG_CMD_REGULATOR=y