From: Fabio Estevam via U-Boot <u-boot@lists.u-boot-project.org>
To: u-boot@0leil.net
Cc: djw@t-chip.com.cn, sjg@chromium.org, kever.yang@rock-chips.com,
u-boot@lists.u-boot-project.org, trini@konsulko.com,
Fabio Estevam <festevam@nabladev.com>
Subject: [PATCH v2 4/5] rockchip: rk3399: Enable UMS on ROC-PC-PLUS
Date: Tue, 21 Jul 2026 22:36:41 -0300 [thread overview]
Message-ID: <20260722013642.1011666-4-festevam@gmail.com> (raw)
In-Reply-To: <20260722013642.1011666-1-festevam@gmail.com>
From: Fabio Estevam <festevam@nabladev.com>
Describe the USB3 OTG controller as a USB role switch and make
peripheral mode the default when no external role provider has selected
host mode. This retains OTG operation and both PHYs inherited from the
SoC devicetree.
Enable the ums command so the onboard eMMC can be exposed as USB mass
storage to a host.
Signed-off-by: Fabio Estevam <festevam@nabladev.com>
---
Changes since v1:
- Add the same OTG description as submitted upstream:
https://lore.kernel.org/linux-arm-kernel/20260721030043.84691-1-festevam@gmail.com/
arch/arm/dts/rk3399-roc-pc-plus-u-boot.dtsi | 6 ++++++
configs/roc-pc-rk3399_defconfig | 1 +
2 files changed, 7 insertions(+)
diff --git a/arch/arm/dts/rk3399-roc-pc-plus-u-boot.dtsi b/arch/arm/dts/rk3399-roc-pc-plus-u-boot.dtsi
index c80529a62b97..73027335446e 100644
--- a/arch/arm/dts/rk3399-roc-pc-plus-u-boot.dtsi
+++ b/arch/arm/dts/rk3399-roc-pc-plus-u-boot.dtsi
@@ -1,3 +1,9 @@
// SPDX-License-Identifier: GPL-2.0+
#include "rk3399-roc-pc-u-boot.dtsi"
+
+&usbdrd_dwc3_0 {
+ dr_mode = "otg";
+ role-switch-default-mode = "peripheral";
+ usb-role-switch;
+};
diff --git a/configs/roc-pc-rk3399_defconfig b/configs/roc-pc-rk3399_defconfig
index 6ef447e0e715..127b71e97917 100644
--- a/configs/roc-pc-rk3399_defconfig
+++ b/configs/roc-pc-rk3399_defconfig
@@ -36,6 +36,7 @@ CONFIG_CMD_BOOTZ=y
CONFIG_CMD_GPT=y
CONFIG_CMD_MMC=y
CONFIG_CMD_USB=y
+CONFIG_CMD_USB_MASS_STORAGE=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_CMD_TIME=y
CONFIG_SPL_OF_CONTROL=y
--
2.43.0
next prev parent reply other threads:[~2026-07-22 1:37 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-22 1:36 [PATCH v2 1/5] mtd: spi-nor-ids: Add XMC XM25QH128C Fabio Estevam via U-Boot
2026-07-22 1:36 ` [PATCH v2 2/5] rockchip: rk3399: Remove ROC-PC regulator overrides Fabio Estevam via U-Boot
2026-07-22 13:53 ` Quentin Schulz via U-Boot
2026-07-22 1:36 ` [PATCH v2 3/5] rockchip: rk3399: Add ROC-PC-PLUS board detection Fabio Estevam via U-Boot
2026-07-22 14:07 ` Quentin Schulz via U-Boot
2026-07-22 1:36 ` Fabio Estevam via U-Boot [this message]
2026-07-22 15:01 ` [PATCH v2 4/5] rockchip: rk3399: Enable UMS on ROC-PC-PLUS Quentin Schulz via U-Boot
2026-07-22 1:36 ` [PATCH v2 5/5] rockchip: roc-pc-rk3399: Enable redundant environment Fabio Estevam via U-Boot
2026-07-22 14:12 ` Quentin Schulz via U-Boot
2026-07-22 10:52 ` [PATCH v2 1/5] mtd: spi-nor-ids: Add XMC XM25QH128C Quentin Schulz via U-Boot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260722013642.1011666-4-festevam@gmail.com \
--to=u-boot@lists.u-boot-project.org \
--cc=djw@t-chip.com.cn \
--cc=festevam@gmail.com \
--cc=festevam@nabladev.com \
--cc=kever.yang@rock-chips.com \
--cc=sjg@chromium.org \
--cc=trini@konsulko.com \
--cc=u-boot@0leil.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox