diff options
Diffstat (limited to 'zephyr/projects')
-rw-r--r-- | zephyr/projects/herobrine/herobrine_npcx9/i2c.dts | 4 | ||||
-rw-r--r-- | zephyr/projects/herobrine/herobrine_npcx9/src/usbc_config.c | 15 | ||||
-rw-r--r-- | zephyr/projects/herobrine/herobrine_npcx9/usbc.dts | 12 |
3 files changed, 14 insertions, 17 deletions
diff --git a/zephyr/projects/herobrine/herobrine_npcx9/i2c.dts b/zephyr/projects/herobrine/herobrine_npcx9/i2c.dts index fd3afb4de4..44bc9c6707 100644 --- a/zephyr/projects/herobrine/herobrine_npcx9/i2c.dts +++ b/zephyr/projects/herobrine/herobrine_npcx9/i2c.dts @@ -38,12 +38,12 @@ enum-name = "I2C_PORT_CHARGER"; label = "CHARGER"; }; - tcpc0 { + i2c_tcpc0: tcpc0 { i2c-port = <&i2c1_0>; enum-name = "I2C_PORT_TCPC0"; label = "TCPC0"; }; - tcpc1 { + i2c_tcpc1: tcpc1 { i2c-port = <&i2c2_0>; enum-name = "I2C_PORT_TCPC1"; label = "TCPC1"; diff --git a/zephyr/projects/herobrine/herobrine_npcx9/src/usbc_config.c b/zephyr/projects/herobrine/herobrine_npcx9/src/usbc_config.c index 5feaf1e8e3..ab309b2804 100644 --- a/zephyr/projects/herobrine/herobrine_npcx9/src/usbc_config.c +++ b/zephyr/projects/herobrine/herobrine_npcx9/src/usbc_config.c @@ -143,21 +143,6 @@ enum ec_status charger_profile_override_set_param(uint32_t param, return EC_RES_INVALID_PARAM; } -/* Power Path Controller */ -struct ppc_config_t ppc_chips[] = { - { - .i2c_port = I2C_PORT_TCPC0, - .i2c_addr_flags = SN5S330_ADDR0_FLAGS, - .drv = &sn5s330_drv - }, - { - .i2c_port = I2C_PORT_TCPC1, - .i2c_addr_flags = SN5S330_ADDR0_FLAGS, - .drv = &sn5s330_drv - }, -}; -unsigned int ppc_cnt = ARRAY_SIZE(ppc_chips); - static const struct ppc_config_t ppc_syv682x_port0 = { .i2c_port = I2C_PORT_TCPC0, .i2c_addr_flags = SYV682X_ADDR0_FLAGS, diff --git a/zephyr/projects/herobrine/herobrine_npcx9/usbc.dts b/zephyr/projects/herobrine/herobrine_npcx9/usbc.dts index 60bbad94a5..c742bcf386 100644 --- a/zephyr/projects/herobrine/herobrine_npcx9/usbc.dts +++ b/zephyr/projects/herobrine/herobrine_npcx9/usbc.dts @@ -13,6 +13,12 @@ port = <&i2c_power>; i2c-addr-flags = "PI3USB9201_I2C_ADDR_3_FLAGS"; }; + ppc { + compatible = "ti,sn5s330"; + status = "okay"; + port = <&i2c_tcpc0>; + i2c-addr-flags = "SN5S330_ADDR0_FLAGS"; + }; }; port1: usbc-port1 { @@ -23,6 +29,12 @@ port = <&i2c_eeprom>; i2c-addr-flags = "PI3USB9201_I2C_ADDR_3_FLAGS"; }; + ppc { + compatible = "ti,sn5s330"; + status = "okay"; + port = <&i2c_tcpc1>; + i2c-addr-flags = "SN5S330_ADDR0_FLAGS"; + }; }; }; }; |