aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Reichel <sebastian.reichel@collabora.com>2024-10-15 17:26:46 +0200
committerMarek Vasut <marex@denx.de>2024-10-17 03:12:47 +0200
commit12049db764378c92d9cbec72b48f2a6df4e6ae27 (patch)
tree093ac9ac652a03e95802e77996fe01be4efb8bc5
parent64002d0cb00f81b214f5144aebb80aead92d9818 (diff)
downloadu-boot-12049db764378c92d9cbec72b48f2a6df4e6ae27.tar.gz
rockchip: rk3588-rock-5b: Add USB-C controller to u-boot.dtsi
Add USB-C controller (fusb302), which will be used by U-Boot to initialize USB-PD. This is needed, because USB-PD communication must happen within 5 seconds after the USB-C connector got plugged. On my Rock 5B it often takes 5 seconds to jump to the Linux binary, so it must happen before Linux is initialized. This adds the DT node to the U-Boot specific file, since the Linux kernel DT currently does not describe it to avoid a system reset. The plan is to add it to the Linux DT with status = 'fail' and then let U-Boot mark it as status = 'okay' if it properly dealt with early USB-PD initialization. Until the Kernel DT has the node, let's add it in U-Boot to get things going. Reviewed-by: Kever Yang <kever.yang@rock-chips.com> Tested-by: Soeren Moch <smoch@web.de> Tested-by: Anand Moon <linux.amoon@gmail.com> Reviewed-by: Jonas Karlman <jonas@kwiboo.se> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
-rw-r--r--arch/arm/dts/rk3588-rock-5b-u-boot.dtsi28
1 files changed, 28 insertions, 0 deletions
diff --git a/arch/arm/dts/rk3588-rock-5b-u-boot.dtsi b/arch/arm/dts/rk3588-rock-5b-u-boot.dtsi
index 4dd17ff408c..b0ad1158854 100644
--- a/arch/arm/dts/rk3588-rock-5b-u-boot.dtsi
+++ b/arch/arm/dts/rk3588-rock-5b-u-boot.dtsi
@@ -3,6 +3,7 @@
* Copyright (c) 2023 Collabora Ltd.
*/
+#include <dt-bindings/usb/pd.h>
#include "rk3588-u-boot.dtsi"
&fspim2_pins {
@@ -10,6 +11,33 @@
bootph-some-ram;
};
+&i2c4 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2c4m1_xfer>;
+ status = "okay";
+
+ usbc0: usb-typec@22 {
+ compatible = "fcs,fusb302";
+ reg = <0x22>;
+ interrupt-parent = <&gpio3>;
+ interrupts = <RK_PB4 IRQ_TYPE_LEVEL_LOW>;
+ pinctrl-names = "default";
+ status = "okay";
+
+ usb_con: connector {
+ compatible = "usb-c-connector";
+ label = "USB-C";
+ data-role = "dual";
+ power-role = "sink";
+ try-power-role = "sink";
+ op-sink-microwatt = <1000000>;
+ sink-pdos =
+ <PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)>,
+ <PDO_VAR(5000, 20000, 5000)>;
+ };
+ };
+};
+
&sdhci {
cap-mmc-highspeed;
mmc-hs200-1_8v;