summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaymond Chung <raymondchung@ami.corp-partner.google.com>2022-11-14 11:33:10 +0800
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-11-15 08:09:39 +0000
commit56d3176ac2fdf244ab38f4488c6b51443683def3 (patch)
treedd255b73dc280e6496293e4e26e7a1b0252871ce
parent63ec16038cd533f3d7cb8d889a50bd47a682bf55 (diff)
downloadchrome-ec-56d3176ac2fdf244ab38f4488c6b51443683def3.tar.gz
gaelin: Initial scaler configuration
This change adds gpio and I2C settings for scaler. BUG=b:249000573, b:254063356 BRANCH=None TEST=make -j BOARD=gaelin Change-Id: If95e0b5529a46fae445343d53206ec65655f292c Signed-off-by: Raymond Chung <raymondchung@ami.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4025482 Reviewed-by: Derek Huang <derekhuang@google.com> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
-rw-r--r--board/gaelin/board.h4
-rw-r--r--board/gaelin/gpio.inc22
-rw-r--r--board/gaelin/i2c.c8
3 files changed, 28 insertions, 6 deletions
diff --git a/board/gaelin/board.h b/board/gaelin/board.h
index 2ce5008bd7..166f0f1432 100644
--- a/board/gaelin/board.h
+++ b/board/gaelin/board.h
@@ -82,6 +82,8 @@
#define GPIO_RECOVERY_L_2 GPIO_GSC_EC_RECOVERY_BTN_OD
/* I2C Bus Configuration */
+#define I2C_PORT_SCALER NPCX_I2C_PORT5_0
+
#define I2C_PORT_USB_C0_TCPC NPCX_I2C_PORT1_0
#define I2C_PORT_USB_C1_TCPC NPCX_I2C_PORT4_1
@@ -98,6 +100,8 @@
#define I2C_ADDR_MP2964_FLAGS 0x20
+#define I2C_ADDR_SCALER_FLAGS 0x58
+
/* Thermal features */
#define CONFIG_THERMISTOR
#define CONFIG_TEMP_SENSOR
diff --git a/board/gaelin/gpio.inc b/board/gaelin/gpio.inc
index c39d048e8d..fcd39ad8bc 100644
--- a/board/gaelin/gpio.inc
+++ b/board/gaelin/gpio.inc
@@ -45,8 +45,19 @@ GPIO(EN_PP5000_FAN, PIN(6, 1), GPIO_OUT_HIGH)
GPIO(ANALOG_PPVAR_PWR_IN_IMON_EC, PIN(4, 2), GPIO_INPUT)
/* Display */
-GPIO(DP_CONN_OC_ODL, PIN(2, 5), GPIO_INPUT)
-
+GPIO(EC_OVERRIDE_SCLR_EN, PIN(D, 4), GPIO_OUT_HIGH)
+GPIO(EC_12VSC_EN, PIN(D, 2), GPIO_OUT_LOW)
+GPIO(OSD_STS, PIN(4, 1), GPIO_INPUT)
+GPIO(DISP_MODE, PIN(A, 0), GPIO_INPUT)
+GPIO(PANEL_PWR_STS, PIN(9, 5), GPIO_INPUT)
+GPIO(EN_SCLR_RAILS, PIN(0, 4), GPIO_INPUT)
+GPIO(HDMI_5V_IN, PIN(9, 3), GPIO_INPUT)
+GPIO(HDMI0_CABLE_DET, PIN(9, 6), GPIO_INPUT)
+GPIO(WP_EC, PIN(C, 3), GPIO_INPUT)
+GPIO(OSD_INT, PIN(0, 5), GPIO_INPUT)
+
+/* Audio */
+GPIO(EC_AMP_SD, PIN(5, 6), GPIO_OUT_LOW)
/* BarrelJack */
GPIO(EN_PPVAR_BJ_ADP_L, PIN(0, 7), GPIO_OUT_LOW)
@@ -77,6 +88,8 @@ GPIO(HDMI_CEC_OUT, PIN(D, 3), GPIO_OUT_HIGH | GPIO_OPEN_DRAIN)
GPIO(HDMI_CEC_PULL_UP, PIN(C, 2), GPIO_OUT_HIGH)
/* I2C SCL/SDA */
+GPIO(SMSCALER_CLK, PIN(3, 3), GPIO_INPUT)
+GPIO(SMSCALER_DATA, PIN(3, 6), GPIO_INPUT)
GPIO(EC_I2C_MISC_SCL_R, PIN(B, 3), GPIO_INPUT)
GPIO(EC_I2C_MISC_SDA_R, PIN(B, 2), GPIO_INPUT)
GPIO(EC_I2C_USB_C0_PPC_BC_SCL, PIN(9, 2), GPIO_INPUT)
@@ -102,7 +115,6 @@ GPIO(USB_A_OC_SOC_L, PIN(8, 0), GPIO_OUT_HIGH)
/* LED */
/* TODO(b/197471359): LED implementation */
-GPIO(LED_GREEN_L, PIN(C, 3), GPIO_OUT_LOW)
GPIO(LED_RED_L, PIN(C, 4), GPIO_OUT_LOW)
/* USBC */
@@ -143,14 +155,12 @@ UNUSED(PIN(3, 2)) /* GPO32/TRIS_L */
UNUSED(PIN(3, 5)) /* GPO35/CR_SOUT4/TEST_L */
UNUSED(PIN(6, 6)) /* GPIO66 */
UNUSED(PIN(8, 1)) /* GPIO81/PECI_DATA */
-UNUSED(PIN(5, 6)) /* GPIO56/CLKRUN# */
UNUSED(PIN(8, 6)) /* GPIO86/TXD/CR_SOUT2 */
UNUSED(PIN(1, 3)) /* KSO06/GPO13/GP_SEL# */
UNUSED(PIN(1, 2)) /* KSO07/GPO12/JEN# */
UNUSED(PIN(0, 6)) /* KSO11/GPIO06/P80_CLK */
-UNUSED(PIN(0, 4)) /* KSO13/GPIO04 */
UNUSED(PIN(B, 4)) /* GPIOB4/I2C0_SDA0 */
-UNUSED(PIN(0, 5)) /* KSO12/GPIO05 */
+UNUSED(PIN(2, 5)) /* KSI4/GPIO25/TRACECLK/GP_SCLK */
UNUSED(PIN(B, 5)) /* GPIOB5/I2C0_SCL0 */
UNUSED(PIN(8, 3)) /* KSO15/GPIO83 */
UNUSED(PIN(B, 1)) /* KSO17/GPIOB1/CR_SIN4 */
diff --git a/board/gaelin/i2c.c b/board/gaelin/i2c.c
index b3bd2023c5..f9bfa11657 100644
--- a/board/gaelin/i2c.c
+++ b/board/gaelin/i2c.c
@@ -43,6 +43,14 @@ const struct i2c_port_t i2c_ports[] = {
.sda = GPIO_EC_I2C_USB_C1_TCPC_SDA,
},
{
+ /* I2C5 */
+ .name = "scaler",
+ .port = I2C_PORT_SCALER,
+ .kbps = 400,
+ .scl = GPIO_SMSCALER_CLK,
+ .sda = GPIO_SMSCALER_DATA,
+ },
+ {
/* I2C7 */
.name = "eeprom",
.port = I2C_PORT_EEPROM,