summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiguel Delatorre <delatmiguel@google.com>2022-08-12 21:32:17 +0000
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-09-14 22:07:40 +0000
commit4a85adc3286d01db590055d7cb189798fab628c9 (patch)
treee3ecf68bacf12d1e9f5f271f804115d52908eeb6
parent0edfb40368b0fba0238f21bc6151a15aa3152bac (diff)
downloadchrome-ec-4a85adc3286d01db590055d7cb189798fab628c9.tar.gz
Move Brya PPCs into the devicetree
BUG=b:236131108 TEST=zmake testall; zephyr/zmake/run_tests.sh; BRANCH=main Change-Id: Ic1b403ddacacd6f3dabb5f83141d70c2416f7e92 Signed-off-by: Miguel Delatorre <delatmiguel@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3829953 Commit-Queue: Keith Short <keithshort@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com> Reviewed-by: Adam Mills <adamjmills@google.com>
-rw-r--r--board/brya/usbc_config.c2
-rw-r--r--zephyr/projects/brya/gpio.dts4
-rw-r--r--zephyr/projects/brya/i2c.dts20
-rw-r--r--zephyr/projects/brya/usbc.dts3
4 files changed, 26 insertions, 3 deletions
diff --git a/board/brya/usbc_config.c b/board/brya/usbc_config.c
index 2693fb347d..0c9afc6943 100644
--- a/board/brya/usbc_config.c
+++ b/board/brya/usbc_config.c
@@ -94,6 +94,7 @@ BUILD_ASSERT(ARRAY_SIZE(usb_port_enable) == USB_PORT_COUNT);
/******************************************************************************/
+#ifndef CONFIG_ZEPHYR
/* USBC PPC configuration */
struct ppc_config_t ppc_chips[] = {
[USBC_PORT_C0] = {
@@ -119,7 +120,6 @@ BUILD_ASSERT(ARRAY_SIZE(ppc_chips) == USBC_PORT_COUNT);
unsigned int ppc_cnt = ARRAY_SIZE(ppc_chips);
-#ifndef CONFIG_ZEPHYR
/* USBC mux configuration - Alder Lake includes internal mux */
static const struct usb_mux_chain usbc0_tcss_usb_mux = {
.mux =
diff --git a/zephyr/projects/brya/gpio.dts b/zephyr/projects/brya/gpio.dts
index 5568a23849..6c6a2ac054 100644
--- a/zephyr/projects/brya/gpio.dts
+++ b/zephyr/projects/brya/gpio.dts
@@ -276,7 +276,7 @@
gpios = <&ioex_port1 4 GPIO_ODR_HIGH>;
no-auto-init;
};
- usb_c0_frs_en {
+ usb_c0_frs_en: usb_c0_frs_en {
gpios = <&ioex_port1 6 GPIO_OUTPUT_LOW>;
enum-name = "IOEX_USB_C0_FRS_EN";
no-auto-init;
@@ -297,7 +297,7 @@
gpios = <&ioex_port2 4 GPIO_ODR_HIGH>;
no-auto-init;
};
- usb_c2_frs_en {
+ usb_c2_frs_en: usb_c2_frs_en {
gpios = <&ioex_port2 6 GPIO_OUTPUT_LOW>;
enum-name = "IOEX_USB_C2_FRS_EN";
no-auto-init;
diff --git a/zephyr/projects/brya/i2c.dts b/zephyr/projects/brya/i2c.dts
index de533ad2f1..7284d80870 100644
--- a/zephyr/projects/brya/i2c.dts
+++ b/zephyr/projects/brya/i2c.dts
@@ -138,6 +138,13 @@
pinctrl-0 = <&i2c2_0_sda_scl_gp91_92>;
pinctrl-names = "default";
+ ppc_port0: syv682x@40 {
+ compatible = "silergy,syv682x";
+ status = "okay";
+ reg = <0x40>;
+ frs_en_gpio = <&usb_c0_frs_en>;
+ };
+
bc12_port0: pi3usb9201@5f {
compatible = "pericom,pi3usb9201";
status = "okay";
@@ -145,6 +152,13 @@
irq = <&int_usb_c0_bc12>;
};
+ ppc_port2: syv682x@42 {
+ compatible = "silergy,syv682x";
+ status = "okay";
+ reg = <0x42>;
+ frs_en_gpio = <&usb_c2_frs_en>;
+ };
+
bc12_port2: pi3usb9201@5d {
compatible = "pericom,pi3usb9201";
status = "okay";
@@ -220,6 +234,12 @@
pinctrl-0 = <&i2c6_1_sda_scl_gpe3_e4>;
pinctrl-names = "default";
+ ppc_port1: nx20p348x@72 {
+ compatible = "nxp,nx20p348x";
+ status = "okay";
+ reg = <0x72>;
+ };
+
bc12_port1: pi3usb9201@5f {
compatible = "pericom,pi3usb9201";
status = "okay";
diff --git a/zephyr/projects/brya/usbc.dts b/zephyr/projects/brya/usbc.dts
index 84c1560542..1be9ac94ac 100644
--- a/zephyr/projects/brya/usbc.dts
+++ b/zephyr/projects/brya/usbc.dts
@@ -19,6 +19,7 @@
usb-muxes = <&usb_c0_bb_retimer
&virtual_mux_c0>;
};
+ ppc = <&ppc_port0>;
};
port0-muxes {
virtual_mux_c0: virtual-mux-c0 {
@@ -35,6 +36,7 @@
compatible = "cros-ec,usb-mux-chain";
usb-muxes = <&virtual_mux_c1 &tcpci_mux_c1>;
};
+ ppc = <&ppc_port1>;
};
port1-muxes {
tcpci_mux_c1: tcpci-mux-c1 {
@@ -56,6 +58,7 @@
usb-muxes = <&usb_c2_bb_retimer
&virtual_mux_c2>;
};
+ ppc = <&ppc_port2>;
};
port2-muxes {
virtual_mux_c2: virtual-mux-c2 {