diff options
author | Fabio Baltieri <fabiobaltieri@google.com> | 2022-12-13 16:07:38 +0000 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-12-15 09:26:32 +0000 |
commit | 09cae071a2ed6412f795f9d8061951957b2dda35 (patch) | |
tree | 13dd472f1345f31a342bd3ad35130e1c0cc847d3 | |
parent | 99fd246c45e6c4f6d838373e949d29d58255a4ec (diff) | |
download | chrome-ec-09cae071a2ed6412f795f9d8061951957b2dda35.tar.gz |
zephyr: usbc: add a binding for intel,jhl9040r
Current projects are reusing the jhl8040r (BB) binding for the jhl9040r
(HB) and relying on a Kconfig entry to build the right driver.
Add a dedicated compatible and binding so that the correct option can be
selected automatically.
BRANCH=none
BUG=none
TEST=zmake compare-builds -a
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Change-Id: Icffd607d7cad270a33a8cbf7d6d359cbaec3d253
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4101025
Reviewed-by: Aaron Massey <aaronmassey@google.com>
Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
-rw-r--r-- | zephyr/Kconfig.retimer | 4 | ||||
-rw-r--r-- | zephyr/dts/bindings/usbc/mux/intel,jhl9040r.yaml | 22 | ||||
-rw-r--r-- | zephyr/program/brya/prj.conf | 1 | ||||
-rw-r--r-- | zephyr/program/intelrvp/adlrvp/prj.conf | 1 | ||||
-rw-r--r-- | zephyr/program/intelrvp/mtlrvp/mtlrvpp_mchp/mtlrvp_mchp.dts | 16 | ||||
-rw-r--r-- | zephyr/program/intelrvp/mtlrvp/mtlrvpp_npcx/mtlrvp_npcx.dts | 16 | ||||
-rw-r--r-- | zephyr/program/intelrvp/mtlrvp/prj.conf | 1 | ||||
-rw-r--r-- | zephyr/program/rex/program.conf | 1 | ||||
-rw-r--r-- | zephyr/program/rex/rex.dtsi | 4 | ||||
-rw-r--r-- | zephyr/shim/include/usbc/bb_retimer_usb_mux.h | 4 | ||||
-rw-r--r-- | zephyr/test/drivers/prj.conf | 1 |
11 files changed, 47 insertions, 24 deletions
diff --git a/zephyr/Kconfig.retimer b/zephyr/Kconfig.retimer index 1927a349b8..a5c37d7ecb 100644 --- a/zephyr/Kconfig.retimer +++ b/zephyr/Kconfig.retimer @@ -6,6 +6,7 @@ if PLATFORM_EC_USBC config PLATFORM_EC_USBC_RETIMER_INTEL_BB bool "Support Intel Burnside Bridge retimer" + default y depends on PLATFORM_EC_USB_MUX depends on DT_HAS_INTEL_JHL8040R_ENABLED select PLATFORM_EC_USB_PD_USB4 @@ -31,8 +32,9 @@ config PLATFORM_EC_USBC_RETIMER_INTEL_BB config PLATFORM_EC_USBC_RETIMER_INTEL_HB bool "Support Intel Hayden Bridge retimer" + default y depends on PLATFORM_EC_USB_MUX - depends on DT_HAS_INTEL_JHL8040R_ENABLED + depends on DT_HAS_INTEL_JHL9040R_ENABLED select PLATFORM_EC_USB_PD_USB4 select PLATFORM_EC_USB_PD_TBT_COMPAT_MODE help diff --git a/zephyr/dts/bindings/usbc/mux/intel,jhl9040r.yaml b/zephyr/dts/bindings/usbc/mux/intel,jhl9040r.yaml new file mode 100644 index 0000000000..f341dc0196 --- /dev/null +++ b/zephyr/dts/bindings/usbc/mux/intel,jhl9040r.yaml @@ -0,0 +1,22 @@ +# Copyright 2022 Google LLC +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +description: Intel JHL9040R Thunderbolt 4 Retimer + +compatible: "intel,jhl9040r" + +include: ["i2c-device.yaml", "cros-ec,usbc-mux.yaml"] + +properties: + reset-pin: + type: phandle + required: true + + int-pin: + type: phandle + required: false + + ls-en-pin: + type: phandle + required: false diff --git a/zephyr/program/brya/prj.conf b/zephyr/program/brya/prj.conf index 6a92c29116..7658df1f42 100644 --- a/zephyr/program/brya/prj.conf +++ b/zephyr/program/brya/prj.conf @@ -114,7 +114,6 @@ CONFIG_PLATFORM_EC_CHARGER_SENSE_RESISTOR=10 CONFIG_PLATFORM_EC_CHARGER_SENSE_RESISTOR_AC=10 CONFIG_PLATFORM_EC_CHARGE_RAMP_SW=y CONFIG_PLATFORM_EC_USB_PID=0x504F -CONFIG_PLATFORM_EC_USBC_RETIMER_INTEL_BB=y CONFIG_PLATFORM_EC_USB_DRP_ACC_TRYSRC=y CONFIG_PLATFORM_EC_USB_MUX_RUNTIME_CONFIG=n CONFIG_PLATFORM_EC_USB_MUX_TASK=y diff --git a/zephyr/program/intelrvp/adlrvp/prj.conf b/zephyr/program/intelrvp/adlrvp/prj.conf index 3273146d53..9c372bc9ae 100644 --- a/zephyr/program/intelrvp/adlrvp/prj.conf +++ b/zephyr/program/intelrvp/adlrvp/prj.conf @@ -53,7 +53,6 @@ CONFIG_PLATFORM_EC_USB_PD_TCPM_MUX=y CONFIG_PLATFORM_EC_USB_PD_TCPM_TCPCI=y CONFIG_PLATFORM_EC_USB_PD_VBUS_DETECT_PPC=y CONFIG_PLATFORM_EC_USBC_PPC_SN5S330=y -CONFIG_PLATFORM_EC_USBC_RETIMER_INTEL_BB=y # IOEX CONFIG_PLATFORM_EC_IOEX_PCA9675=y diff --git a/zephyr/program/intelrvp/mtlrvp/mtlrvpp_mchp/mtlrvp_mchp.dts b/zephyr/program/intelrvp/mtlrvp/mtlrvpp_mchp/mtlrvp_mchp.dts index 9cdff36b66..398cf4cc54 100644 --- a/zephyr/program/intelrvp/mtlrvp/mtlrvpp_mchp/mtlrvp_mchp.dts +++ b/zephyr/program/intelrvp/mtlrvp/mtlrvpp_mchp/mtlrvp_mchp.dts @@ -195,15 +195,15 @@ label = "NCT38XX_ALERT_1"; }; /* GPIO143 */ - usb_c0_hb_retimer: jhl8040r-c0@56 { - compatible = "intel,jhl8040r"; + usb_c0_hb_retimer: jhl9040r-c0@56 { + compatible = "intel,jhl9040r"; reg = <0x56>; reset-pin = <&usb_c0_hb_retimer_rst>; ls-en-pin = <&usb_c0_hb_retimer_ls_en>; }; - usb_c1_hb_retimer: jhl8040r-c1@57 { - compatible = "intel,jhl8040r"; + usb_c1_hb_retimer: jhl9040r-c1@57 { + compatible = "intel,jhl9040r"; reg = <0x57>; reset-pin = <&usb_c1_hb_retimer_rst>; ls-en-pin = <&usb_c1_hb_retimer_ls_en>; @@ -229,15 +229,15 @@ reg = <0x1b>; }; - usb_c2_hb_retimer: jhl8040r-c2@58 { - compatible = "intel,jhl8040r"; + usb_c2_hb_retimer: jhl9040r-c2@58 { + compatible = "intel,jhl9040r"; reg = <0x58>; reset-pin = <&usb_c2_hb_retimer_rst>; ls-en-pin = <&usb_c2_hb_retimer_ls_en>; }; - usb_c3_hb_retimer: jhl8040r-c3@59 { - compatible = "intel,jhl8040r"; + usb_c3_hb_retimer: jhl9040r-c3@59 { + compatible = "intel,jhl9040r"; reg = <0x59>; reset-pin = <&usb_c3_hb_retimer_rst>; ls-en-pin = <&usb_c3_hb_retimer_ls_en>; diff --git a/zephyr/program/intelrvp/mtlrvp/mtlrvpp_npcx/mtlrvp_npcx.dts b/zephyr/program/intelrvp/mtlrvp/mtlrvpp_npcx/mtlrvp_npcx.dts index 4a46fed16c..c75566dfde 100644 --- a/zephyr/program/intelrvp/mtlrvp/mtlrvpp_npcx/mtlrvp_npcx.dts +++ b/zephyr/program/intelrvp/mtlrvp/mtlrvpp_npcx/mtlrvp_npcx.dts @@ -211,15 +211,15 @@ label = "NCT38XX_ALERT_1"; }; - usb_c0_hb_retimer: jhl8040r-c0@56 { - compatible = "intel,jhl8040r"; + usb_c0_hb_retimer: jhl9040r-c0@56 { + compatible = "intel,jhl9040r"; reg = <0x56>; reset-pin = <&usb_c0_hb_retimer_rst>; ls-en-pin = <&usb_c0_hb_retimer_ls_en>; }; - usb_c1_hb_retimer: jhl8040r-c1@57 { - compatible = "intel,jhl8040r"; + usb_c1_hb_retimer: jhl9040r-c1@57 { + compatible = "intel,jhl9040r"; reg = <0x57>; reset-pin = <&usb_c1_hb_retimer_rst>; ls-en-pin = <&usb_c1_hb_retimer_ls_en>; @@ -250,15 +250,15 @@ int-pin = <&usbc_tcpc_alrt_p3>; }; - usb_c2_hb_retimer: jhl8040r-c2@58 { - compatible = "intel,jhl8040r"; + usb_c2_hb_retimer: jhl9040r-c2@58 { + compatible = "intel,jhl9040r"; reg = <0x58>; reset-pin = <&usb_c2_hb_retimer_rst>; ls-en-pin = <&usb_c2_hb_retimer_ls_en>; }; - usb_c3_hb_retimer: jhl8040r-c3@59 { - compatible = "intel,jhl8040r"; + usb_c3_hb_retimer: jhl9040r-c3@59 { + compatible = "intel,jhl9040r"; reg = <0x59>; reset-pin = <&usb_c3_hb_retimer_rst>; ls-en-pin = <&usb_c3_hb_retimer_ls_en>; diff --git a/zephyr/program/intelrvp/mtlrvp/prj.conf b/zephyr/program/intelrvp/mtlrvp/prj.conf index 8faed84a56..ccc27e04f7 100644 --- a/zephyr/program/intelrvp/mtlrvp/prj.conf +++ b/zephyr/program/intelrvp/mtlrvp/prj.conf @@ -54,7 +54,6 @@ CONFIG_PLATFORM_EC_USB_PD_TCPM_MUX=y CONFIG_PLATFORM_EC_USB_PD_TRY_SRC=y CONFIG_PLATFORM_EC_USB_PD_TCPM_SBU=y CONFIG_PLATFORM_EC_USB_PD_DUAL_ROLE_AUTO_TOGGLE=y -CONFIG_PLATFORM_EC_USBC_RETIMER_INTEL_HB=y CONFIG_PLATFORM_EC_USBC_VCONN=y CONFIG_PLATFORM_EC_USB_PD_TBT_COMPAT_MODE=y CONFIG_PLATFORM_EC_USB_PD_USB32_DRD=y diff --git a/zephyr/program/rex/program.conf b/zephyr/program/rex/program.conf index 0ba05962c3..a6aec035c8 100644 --- a/zephyr/program/rex/program.conf +++ b/zephyr/program/rex/program.conf @@ -80,7 +80,6 @@ CONFIG_PLATFORM_EC_CHARGER_MIN_INPUT_CURRENT_LIMIT=512 CONFIG_PLATFORM_EC_USBC_PPC=y CONFIG_PLATFORM_EC_USBC_PPC_SYV682C=y CONFIG_PLATFORM_EC_USBC_PPC_SYV682X_SMART_DISCHARGE=y -CONFIG_PLATFORM_EC_USBC_RETIMER_INTEL_HB=y CONFIG_PLATFORM_EC_USBC_VCONN=y CONFIG_PLATFORM_EC_USB_DRP_ACC_TRYSRC=y diff --git a/zephyr/program/rex/rex.dtsi b/zephyr/program/rex/rex.dtsi index 07aa7173c2..3c3df257ea 100644 --- a/zephyr/program/rex/rex.dtsi +++ b/zephyr/program/rex/rex.dtsi @@ -183,8 +183,8 @@ pinctrl-0 = <&i2c3_0_sda_scl_gpd0_d1>; pinctrl-names = "default"; - usb_c0_hb_retimer: jhl8040r-c0@56 { - compatible = "intel,jhl8040r"; + usb_c0_hb_retimer: jhl9040r-c0@56 { + compatible = "intel,jhl9040r"; reg = <0x56>; ls-en-pin = <&gpio_usb_c0_rt_3p3_sx_en>; int-pin = <&gpio_usb_c0_rt_int_odl>; diff --git a/zephyr/shim/include/usbc/bb_retimer_usb_mux.h b/zephyr/shim/include/usbc/bb_retimer_usb_mux.h index 64e1e2693d..57a471fb2e 100644 --- a/zephyr/shim/include/usbc/bb_retimer_usb_mux.h +++ b/zephyr/shim/include/usbc/bb_retimer_usb_mux.h @@ -8,7 +8,11 @@ #include "driver/retimer/bb_retimer_public.h" +#if CONFIG_PLATFORM_EC_USBC_RETIMER_INTEL_BB #define BB_RETIMER_USB_MUX_COMPAT intel_jhl8040r +#elif CONFIG_PLATFORM_EC_USBC_RETIMER_INTEL_HB +#define BB_RETIMER_USB_MUX_COMPAT intel_jhl9040r +#endif #define USB_MUX_CONFIG_BB_RETIMER(mux_id) \ { \ diff --git a/zephyr/test/drivers/prj.conf b/zephyr/test/drivers/prj.conf index 56a87b7a1b..8bd29a6185 100644 --- a/zephyr/test/drivers/prj.conf +++ b/zephyr/test/drivers/prj.conf @@ -93,7 +93,6 @@ CONFIG_PLATFORM_EC_ACCELGYRO_BMI_COMM_I2C=y CONFIG_PLATFORM_EC_ACCEL_FIFO=y CONFIG_PLATFORM_EC_SENSOR_TIGHT_TIMESTAMPS=y CONFIG_PLATFORM_EC_ALS_TCS3400=y -CONFIG_PLATFORM_EC_USBC_RETIMER_INTEL_BB=y CONFIG_PLATFORM_EC_USB_PD_DISCHARGE=n CONFIG_PLATFORM_EC_USB_PD_TCPM_MUX=y CONFIG_PLATFORM_EC_USB_PD_TCPM_PS8805=y |