Skip to contentSkip to conversation

arm64: dts: qcom: apq8016-sbc: Add overlay for usb host mode

PATCH Applied Vignesh Raman 4 participants 5 messages Sep 11, 2023 – Sep 22, 2023

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm64: dts: qcom: apq8016-sbc: Add overlay for usb host mode

Due to the presence of the fastboot micro cable in the CI farm, it causes the hardware to remain in gadget mode instead of host mode. So it doesn't find the network, which results in failure to mount root fs via NFS.

Add an overlay dtso file that sets the dr_mode to host, allowing the USB controllers to work in host mode. With commit 15d16d6dadf6 ("kbuild: Add generic rule to apply fdtoverlay"), overlay target can be used to simplify the build of DTB overlays. It uses fdtoverlay to merge base device tree with the overlay dtso. apq8016-sbc-usb-host.dtb file can be used by drm-ci, mesa-ci.

---
 arch/arm64/boot/dts/qcom/Makefile                  | 4 ++++
 arch/arm64/boot/dts/qcom/apq8016-sbc-usb-host.dtso | 8 ++++++++
 2 files changed, 12 insertions(+)
 create mode 100644 arch/arm64/boot/dts/qcom/apq8016-sbc-usb-host.dtso
arch/arm64/boot/dts/qcom/Makefile +4 -0
index 2cca20563a1d..99190a6ba6ff 100644
@@ -1,5 +1,9 @@
 # SPDX-License-Identifier: GPL-2.0
 dtb-$(CONFIG_ARCH_QCOM)	+= apq8016-sbc.dtb
+
+apq8016-sbc-usb-host-dtbs	:= apq8016-sbc.dtb apq8016-sbc-usb-host.dtbo
+
+dtb-$(CONFIG_ARCH_QCOM)	+= apq8016-sbc-usb-host.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= apq8016-sbc-d3-camera-mezzanine.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= apq8039-t2.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= apq8094-sony-xperia-kitakami-karin_windy.dtb
arch/arm64/boot/dts/qcom/apq8016-sbc-usb-host.dtso new file +8 -0
new file mode 100644
index 000000000000..a82c26b7eae8
@@ -0,0 +1,8 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+
+/dts-v1/;
+/plugin/;
+
+&usb {
+         dr_mode = "host";
+};
Signature · 1 line
2.40.1
Acked-by on v1 1/1
#1 lore raw
Quoted 4 lines · Vignesh Raman

Due to the presence of the fastboot micro cable in the CI farm, it causes the hardware to remain in gadget mode instead of host mode. So it doesn't find the network, which results in failure to mount root fs via NFS.

Just a context for others, this was part of this patch series https://lore.kernel.org/r/[email protected]

Quoted 8 lines

Add an overlay dtso file that sets the dr_mode to host, allowing the USB controllers to work in host mode. With commit 15d16d6dadf6 ("kbuild: Add generic rule to apply fdtoverlay"), overlay target can be used to simplify the build of DTB overlays. It uses fdtoverlay to merge base device tree with the overlay dtso. apq8016-sbc-usb-host.dtb file can be used by drm-ci, mesa-ci.

Quoted 5 lines
Quoted 34 lines
---
  arch/arm64/boot/dts/qcom/Makefile                  | 4 ++++
  arch/arm64/boot/dts/qcom/apq8016-sbc-usb-host.dtso | 8 ++++++++
  2 files changed, 12 insertions(+)

create mode 100644 arch/arm64/boot/dts/qcom/apq8016-sbc-usb-host.dtso

arch/arm64/boot/dts/qcom/Makefile +4 -0
index 2cca20563a1d..99190a6ba6ff 100644
@@ -1,5 +1,9 @@
  # SPDX-License-Identifier: GPL-2.0
  dtb-$(CONFIG_ARCH_QCOM)	+= apq8016-sbc.dtb
+
+apq8016-sbc-usb-host-dtbs	:= apq8016-sbc.dtb apq8016-sbc-usb-host.dtbo
+
+dtb-$(CONFIG_ARCH_QCOM)	+= apq8016-sbc-usb-host.dtb
  dtb-$(CONFIG_ARCH_QCOM)	+= apq8016-sbc-d3-camera-mezzanine.dtb
  dtb-$(CONFIG_ARCH_QCOM)	+= apq8039-t2.dtb
  dtb-$(CONFIG_ARCH_QCOM)	+= apq8094-sony-xperia-kitakami-karin_windy.dtb
arch/arm64/boot/dts/qcom/apq8016-sbc-usb-host.dtso new file +8 -0
new file mode 100644
index 000000000000..a82c26b7eae8
@@ -0,0 +1,8 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+
+/dts-v1/;
+/plugin/;
+
+&usb {
+         dr_mode = "host";
+};
#2 lore raw

Hi maintainers,

Quoted 54 lines · Helen Koike
Quoted 4 lines · Vignesh Raman

Due to the presence of the fastboot micro cable in the CI farm, it causes the hardware to remain in gadget mode instead of host mode. So it doesn't find the network, which results in failure to mount root fs via NFS.

Just a context for others, this was part of this patch series https://lore.kernel.org/r/[email protected]

Quoted 8 lines

Add an overlay dtso file that sets the dr_mode to host, allowing the USB controllers to work in host mode. With commit 15d16d6dadf6 ("kbuild: Add generic rule to apply fdtoverlay"), overlay target can be used to simplify the build of DTB overlays. It uses fdtoverlay to merge base device tree with the overlay dtso. apq8016-sbc-usb-host.dtb file can be used by drm-ci, mesa-ci.

Quoted 5 lines
Quoted 27 lines

---
  arch/arm64/boot/dts/qcom/Makefile                  | 4 ++++ arch/arm64/boot/dts/qcom/apq8016-sbc-usb-host.dtso | 8 ++++++++

  2 files changed, 12 insertions(+)

  create mode 100644 arch/arm64/boot/dts/qcom/apq8016-sbc-usb-host.dtso

arch/arm64/boot/dts/qcom/Makefile +0 -0
index 2cca20563a1d..99190a6ba6ff 100644
@@ -1,5 +1,9 @@
   # SPDX-License-Identifier: GPL-2.0

  dtb-$(CONFIG_ARCH_QCOM)    += apq8016-sbc.dtb

arch/arm64/boot/dts/qcom/Makefile +2 -0
+
+apq8016-sbc-usb-host-dtbs    := apq8016-sbc.dtb 

apq8016-sbc-usb-host.dtbo

arch/arm64/boot/dts/qcom/Makefile +2 -0
+
+dtb-$(CONFIG_ARCH_QCOM)    += apq8016-sbc-usb-host.dtb

  dtb-$(CONFIG_ARCH_QCOM)    += apq8016-sbc-d3-camera-mezzanine.dtb dtb-$(CONFIG_ARCH_QCOM)    += apq8039-t2.dtb dtb-$(CONFIG_ARCH_QCOM)    += apq8094-sony-xperia-kitakami-karin_windy.dtb

arch/arm64/boot/dts/qcom/apq8016-sbc-usb-host.dtso new file +0 -0
new file mode 100644
index 000000000000..a82c26b7eae8
@@ -0,0 +1,8 @@
Quoted 8 lines

arch/arm64/boot/dts/qcom/apq8016-sbc-usb-host.dtso line 8

Quoted 8 lines
arch/arm64/boot/dts/qcom/apq8016-sbc-usb-host.dtso new file +8 -0
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+
+/dts-v1/;
+/plugin/;
+
+&usb {
+         dr_mode = "host";
+};

Please could you review this patch. Thanks.

Regards,
Vignesh

Reviewed-by
#3 lore raw
Quoted 30 lines · Vignesh Raman

Hi maintainers,

Quoted 26 lines · Helen Koike
Quoted 4 lines · Vignesh Raman

Due to the presence of the fastboot micro cable in the CI farm, it causes the hardware to remain in gadget mode instead of host mode. So it doesn't find the network, which results in failure to mount root fs via NFS.

Just a context for others, this was part of this patch series
https://lore.kernel.org/r/[email protected]

Quoted 8 lines

Add an overlay dtso file that sets the dr_mode to host, allowing the USB controllers to work in host mode. With commit 15d16d6dadf6 ("kbuild: Add generic rule to apply fdtoverlay"), overlay target can be used to simplify the build of DTB overlays. It uses fdtoverlay to merge base device tree with the overlay dtso. apq8016-sbc-usb-host.dtb file can be used by drm-ci, mesa-ci.

Quoted 5 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines

---
  arch/arm64/boot/dts/qcom/Makefile                  | 4 ++++
  arch/arm64/boot/dts/qcom/apq8016-sbc-usb-host.dtso | 8 ++++++++
  2 files changed, 12 insertions(+)

create mode 100644 arch/arm64/boot/dts/qcom/apq8016-sbc-usb-host.dtso

Signature · 2 lines
With best wishes
Dmitry
maintainer Applied
#4 lore raw
In reply to Vignesh Raman
Quoted 5 lines · Vignesh Raman

Due to the presence of the fastboot micro cable in the CI farm, it causes the hardware to remain in gadget mode instead of host mode. So it doesn't find the network, which results in failure to mount root fs via NFS.

Quoted 8 lines

Add an overlay dtso file that sets the dr_mode to host, allowing the USB controllers to work in host mode. With commit 15d16d6dadf6 ("kbuild: Add generic rule to apply fdtoverlay"), overlay target can be used to simplify the build of DTB overlays. It uses fdtoverlay to merge base device tree with the overlay dtso. apq8016-sbc-usb-host.dtb file can be used by drm-ci, mesa-ci.

[...]

Applied, thanks!

[1/1] arm64: dts: qcom: apq8016-sbc: Add overlay for usb host mode

      commit: bdc4d17e1627e3b44f25b8f87509023dc2b438a2

Best regards,

Signature · 1 line
Bjorn Andersson <[email protected]>