Skip to contentSkip to conversation

riscv: defconfig: enable dwc3 and the SpacemiT K1 thermal sensor

PATCH In review Bruno Banelli 4 participants 5 messages Aug 25 – Nov 9

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

PATCH 1/1 riscv: defconfig: enable dwc3 and the SpacemiT K1 thermal sensor

Two blocks on SpacemiT K1 boards are unreachable from a stock defconfig build:

- USB_DWC3 is not enabled, so the dwc3 controller that drives all of the USB 3.0 ports on boards like the Milk-V Jupiter never probes.

- SPACEMIT_K1_TSENSOR has no default in its Kconfig and is not listed here, so a K1 board comes up with no temperature readings at all, even though k1.dtsi describes five thermal zones.

Enable both.

---
 arch/riscv/configs/defconfig | 3 +++
 1 file changed, 3 insertions(+)
arch/riscv/configs/defconfig +3 -0
index 04ae305d5..03d9ac2f7 100644
@@ -209,6 +209,8 @@ CONFIG_USB=y
 CONFIG_USB_OTG=y
 CONFIG_USB_XHCI_HCD=y
 CONFIG_USB_XHCI_PLATFORM=y
+CONFIG_USB_DWC3=y
+CONFIG_USB_DWC3_GENERIC_PLAT=y
 CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_EHCI_HCD_PLATFORM=y
 CONFIG_USB_OHCI_HCD=y
@@ -260,6 +262,7 @@ CONFIG_CLK_SOPHGO_SG2042_PLL=y
 CONFIG_CLK_SOPHGO_SG2042_CLKGEN=y
 CONFIG_CLK_SOPHGO_SG2042_RPGATE=y
 CONFIG_SPACEMIT_K1_CCU=y
+CONFIG_SPACEMIT_K1_TSENSOR=y
 CONFIG_SPACEMIT_K3_CCU=y
 CONFIG_SUN8I_DE2_CCU=m
 CONFIG_SUN50I_IOMMU=y

base-commit: 66498c75b4f8017f62d720d9b59675bdf3abce91

Signature · 1 line
2.43.0
maintainer
#1 lore raw

Hi Bruno,

Quoted 12 lines · Bruno Banelli

Two blocks on SpacemiT K1 boards are unreachable from a stock defconfig build:

- USB_DWC3 is not enabled, so the dwc3 controller that drives all of the USB 3.0 ports on boards like the Milk-V Jupiter never probes.

- SPACEMIT_K1_TSENSOR has no default in its Kconfig and is not listed here, so a K1 board comes up with no temperature readings at all, even though k1.dtsi describes five thermal zones.

Enable both.

The patch itself looks good to me, but since it deal with two diferent drivers So, can you split it into two patches? which easy to review and manage

Quoted 31 lines
---
 arch/riscv/configs/defconfig | 3 +++
 1 file changed, 3 insertions(+)
arch/riscv/configs/defconfig +3 -0
index 04ae305d5..03d9ac2f7 100644
@@ -209,6 +209,8 @@ CONFIG_USB=y
 CONFIG_USB_OTG=y
 CONFIG_USB_XHCI_HCD=y
 CONFIG_USB_XHCI_PLATFORM=y
+CONFIG_USB_DWC3=y
+CONFIG_USB_DWC3_GENERIC_PLAT=y
 CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_EHCI_HCD_PLATFORM=y
 CONFIG_USB_OHCI_HCD=y
@@ -260,6 +262,7 @@ CONFIG_CLK_SOPHGO_SG2042_PLL=y
 CONFIG_CLK_SOPHGO_SG2042_CLKGEN=y
 CONFIG_CLK_SOPHGO_SG2042_RPGATE=y
 CONFIG_SPACEMIT_K1_CCU=y
+CONFIG_SPACEMIT_K1_TSENSOR=y
 CONFIG_SPACEMIT_K3_CCU=y
 CONFIG_SUN8I_DE2_CCU=m
 CONFIG_SUN50I_IOMMU=y

base-commit: 66498c75b4f8017f62d720d9b59675bdf3abce91

Signature · 1 line
2.43.0
Signature · 1 line
Yixun Lan (dlan)
#2 lore raw
Quoted 9 lines · Yixun Lan

Hi Bruno,

Quoted 6 lines · Bruno Banelli

Two blocks on SpacemiT K1 boards are unreachable from a stock defconfig build:

- USB_DWC3 is not enabled, so the dwc3 controller that drives all of the USB 3.0 ports on boards like the Milk-V Jupiter never probes.

Quoted 8 lines
Quoted 6 lines

- SPACEMIT_K1_TSENSOR has no default in its Kconfig and is not listed here, so a K1 board comes up with no temperature readings at all, even though k1.dtsi describes five thermal zones.

Enable both.

The patch itself looks good to me, but since it deal with two diferent drivers So, can you split it into two patches? which easy to review and manage

IMO it's fine being one patch, but this temp sensor should probably be a module?

Quoted 35 lines
Quoted 32 lines
---
 arch/riscv/configs/defconfig | 3 +++
 1 file changed, 3 insertions(+)
arch/riscv/configs/defconfig +3 -0
index 04ae305d5..03d9ac2f7 100644
@@ -209,6 +209,8 @@ CONFIG_USB=y
 CONFIG_USB_OTG=y
 CONFIG_USB_XHCI_HCD=y
 CONFIG_USB_XHCI_PLATFORM=y
+CONFIG_USB_DWC3=y
+CONFIG_USB_DWC3_GENERIC_PLAT=y
 CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_EHCI_HCD_PLATFORM=y
 CONFIG_USB_OHCI_HCD=y
@@ -260,6 +262,7 @@ CONFIG_CLK_SOPHGO_SG2042_PLL=y
 CONFIG_CLK_SOPHGO_SG2042_CLKGEN=y
 CONFIG_CLK_SOPHGO_SG2042_RPGATE=y
 CONFIG_SPACEMIT_K1_CCU=y
+CONFIG_SPACEMIT_K1_TSENSOR=y
 CONFIG_SPACEMIT_K3_CCU=y
 CONFIG_SUN8I_DE2_CCU=m
 CONFIG_SUN50I_IOMMU=y

base-commit: 66498c75b4f8017f62d720d9b59675bdf3abce91

Signature · 1 line
2.43.0
Signature · 1 line
Yixun Lan (dlan)
#3 lore raw
Quoted 6 lines · Conor Dooley
Quoted 2 lines · Yixun Lan

The patch itself looks good to me, but since it deal with two diferent drivers So, can you split it into two patches? which easy to review and manage

IMO it's fine being one patch, but this temp sensor should probably be a module?

Tested the same options on a Banana Pi BPI-F3 with v7.4-rc1 (dwc3 and dwc3-generic-plat as modules, SPACEMIT_K1_TSENSOR=y): both USB root hubs (2.0 and 3.0) come up, and the five thermal zones read sane values. Testing done with the help of Claude (AI assistant).

Bruno, do you plan a v2 split as Yixun asked? I can test it.