summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--baseboard/kukui/baseboard.h13
-rw-r--r--baseboard/kukui/usb_pd_policy.c14
-rw-r--r--board/damu/board.h2
-rw-r--r--board/jacuzzi/board.h2
-rw-r--r--board/kappa/board.h2
-rw-r--r--board/kodama/board.h2
-rw-r--r--board/kukui/board.h2
7 files changed, 24 insertions, 13 deletions
diff --git a/baseboard/kukui/baseboard.h b/baseboard/kukui/baseboard.h
index af95ebba35..a055e7d548 100644
--- a/baseboard/kukui/baseboard.h
+++ b/baseboard/kukui/baseboard.h
@@ -47,12 +47,18 @@
#define CONFIG_USB_PD_TCPC_LOW_POWER
#define CONFIG_USB_PD_DISCHARGE_TCPC
#define CONFIG_USB_PD_DUAL_ROLE_AUTO_TOGGLE
+/*
+ * The Maximum input voltage is 13.5V, need another 5% tolerance.
+ * 12.85V * 1.05 = 13.5V
+ */
+#define PD_MAX_VOLTAGE_MV 12850
#elif defined(VARIANT_KUKUI_CHARGER_ISL9238)
#define CONFIG_CHARGER_ISL9238
#define CONFIG_CHARGER_SENSE_RESISTOR_AC 20 /* BOARD_RS1 */
#define CONFIG_CHARGER_SENSE_RESISTOR 10 /* BOARD_RS2 */
#define CONFIG_CHARGER_OTG
#define CONFIG_CHARGE_RAMP_HW
+#define PD_MAX_VOLTAGE_MV 20000
#else
#error Must define a VARIANT_KUKUI_CHARGER
#endif /* VARIANT_KUKUI_CHARGER */
@@ -192,16 +198,9 @@
#define CONFIG_BATTERY_PRESENT_CUSTOM
#define CONFIG_BATTERY_REVIVE_DISCONNECT
-#define PD_OPERATING_POWER_MW 15000
#define PD_MAX_POWER_MW ((PD_MAX_VOLTAGE_MV * PD_MAX_CURRENT_MA) / 1000)
#define PD_MAX_CURRENT_MA 3000
-/*
- * The Maximum input voltage is 13.5V, need another 5% tolerance.
- * 12.85V * 1.05 = 13.5V
- */
-#define PD_MAX_VOLTAGE_MV 12850
-
#define PD_POWER_SUPPLY_TURN_ON_DELAY 30000 /* us */
#define PD_POWER_SUPPLY_TURN_OFF_DELAY 50000 /* us */
#define PD_VCONN_SWAP_DELAY 5000 /* us */
diff --git a/baseboard/kukui/usb_pd_policy.c b/baseboard/kukui/usb_pd_policy.c
index 260cff54cc..e87f7f3f69 100644
--- a/baseboard/kukui/usb_pd_policy.c
+++ b/baseboard/kukui/usb_pd_policy.c
@@ -24,14 +24,16 @@ const uint32_t pd_src_pdo[] = {
};
const int pd_src_pdo_cnt = ARRAY_SIZE(pd_src_pdo);
+#ifdef VARIANT_KUKUI_CHARGER_MT6370
+#define MAX_VOLTAGE (int)(PD_MAX_VOLTAGE_MV * 1.05)
+#else
+#define MAX_VOLTAGE PD_MAX_VOLTAGE_MV
+#endif
+
const uint32_t pd_snk_pdo[] = {
PDO_FIXED(5000, 500, PDO_FIXED_FLAGS),
- PDO_BATT(4750,
- (int)(PD_MAX_VOLTAGE_MV * 1.05),
- PD_OPERATING_POWER_MW),
- PDO_VAR(4750,
- (int)(PD_MAX_VOLTAGE_MV * 1.05),
- PD_MAX_CURRENT_MA),
+ PDO_BATT(4750, MAX_VOLTAGE, PD_OPERATING_POWER_MW),
+ PDO_VAR(4750, MAX_VOLTAGE, PD_MAX_CURRENT_MA),
};
const int pd_snk_pdo_cnt = ARRAY_SIZE(pd_snk_pdo);
diff --git a/board/damu/board.h b/board/damu/board.h
index 43fe58486f..98374b9a61 100644
--- a/board/damu/board.h
+++ b/board/damu/board.h
@@ -76,6 +76,8 @@
(EC_HOST_EVENT_MASK(EC_HOST_EVENT_LID_OPEN) |\
EC_HOST_EVENT_MASK(EC_HOST_EVENT_POWER_BUTTON))
+#define PD_OPERATING_POWER_MW 30000
+
#ifndef __ASSEMBLER__
enum adc_channel {
diff --git a/board/jacuzzi/board.h b/board/jacuzzi/board.h
index 1595d8b86d..d590a163e3 100644
--- a/board/jacuzzi/board.h
+++ b/board/jacuzzi/board.h
@@ -83,6 +83,8 @@
#define CONFIG_KEYBOARD_BOARD_CONFIG
#define CONFIG_KEYBOARD_COL2_INVERTED
+#define PD_OPERATING_POWER_MW 30000
+
#ifndef __ASSEMBLER__
enum adc_channel {
diff --git a/board/kappa/board.h b/board/kappa/board.h
index 2d76d56c42..e186f48964 100644
--- a/board/kappa/board.h
+++ b/board/kappa/board.h
@@ -76,6 +76,8 @@
(EC_HOST_EVENT_MASK(EC_HOST_EVENT_LID_OPEN) |\
EC_HOST_EVENT_MASK(EC_HOST_EVENT_POWER_BUTTON))
+#define PD_OPERATING_POWER_MW 30000
+
#ifndef __ASSEMBLER__
enum adc_channel {
diff --git a/board/kodama/board.h b/board/kodama/board.h
index 09a8758bcb..b73ee6e9bc 100644
--- a/board/kodama/board.h
+++ b/board/kodama/board.h
@@ -64,6 +64,8 @@
(EC_HOST_EVENT_MASK(EC_HOST_EVENT_LID_OPEN) |\
EC_HOST_EVENT_MASK(EC_HOST_EVENT_POWER_BUTTON))
+#define PD_OPERATING_POWER_MW 15000
+
#ifndef __ASSEMBLER__
enum adc_channel {
diff --git a/board/kukui/board.h b/board/kukui/board.h
index 4ac375b19b..c8c2f566ad 100644
--- a/board/kukui/board.h
+++ b/board/kukui/board.h
@@ -96,6 +96,8 @@
#define CONFIG_MKBP_EVENT_WAKEUP_MASK \
(BIT(EC_MKBP_EVENT_SENSOR_FIFO) | BIT(EC_MKBP_EVENT_HOST_EVENT))
+#define PD_OPERATING_POWER_MW 15000
+
#ifndef __ASSEMBLER__
enum adc_channel {