Skip to content

Commit

Permalink
armsom-sige5: add pd negotiation support to uboot
Browse files Browse the repository at this point in the history
  • Loading branch information
amazingfate committed Feb 2, 2025
1 parent a57225f commit c4e8ed5
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: amazingfate <[email protected]>
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

Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit c4e8ed5

Please sign in to comment.