mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/3] Enable USB and SD for Deepcomputing FML13V05 board
@ 2026-09-22 11:02 Sandie Cao
  2026-09-22 11:04 ` [PATCH 1/3] riscv: dts: spacemit: k3-deepcomputing-fml13v05: add P1 PMIC regulator tree Sandie Cao
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Sandie Cao @ 2026-09-22 11:02 UTC (permalink / raw)
  To: Yixun Lan, Troy Mitchell, Conor Dooley, Rob Herring,
	Krzysztof Kozlowski, Paul Walmsley, Palmer Dabbelt, Albert Ou
  Cc: Alexandre Ghiti, devicetree, linux-riscv, spacemit, linux-kernel,
	Sandie Cao

This series updates Deepcomputing FML13V05 Device Tree: Add P1 PMIC regulator
tree, add USB controller and USB phy, Enable SD card.

This series is based on next-20260918.

Sandie Cao (3):
  riscv: dts: spacemit: k3-deepcomputing-fml13v05: add P1 PMIC regulator
    tree
  riscv: dts: spacemit: k3-deepcomputing-fml13v05: add USB controller
    and USB phy support
  riscv: dts: spacemit: k3-deepcomputing-fml13v05: Enable SD card
    support

 .../spacemit/k3-deepcomputing-fml13v05.dts    | 218 ++++++++++++++++++
 arch/riscv/boot/dts/spacemit/k3.dtsi          |  66 ++++++
 2 files changed, 284 insertions(+)


base-commit: 3f2425f5b5bbbdd991ca9cdfd5502e68d8895998
-- 
2.43.0

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH 1/3] riscv: dts: spacemit: k3-deepcomputing-fml13v05: add P1 PMIC regulator tree
  2026-09-22 11:02 [PATCH 0/3] Enable USB and SD for Deepcomputing FML13V05 board Sandie Cao
@ 2026-09-22 11:04 ` Sandie Cao
  2026-09-22 11:04 ` [PATCH 2/3] riscv: dts: spacemit: k3-deepcomputing-fml13v05: add USB controller and USB phy support Sandie Cao
  2026-09-22 11:04 ` [PATCH 3/3] riscv: dts: spacemit: k3-deepcomputing-fml13v05: Enable SD card support Sandie Cao
  2 siblings, 0 replies; 13+ messages in thread
From: Sandie Cao @ 2026-09-22 11:04 UTC (permalink / raw)
  To: Yixun Lan, Troy Mitchell, Conor Dooley, Rob Herring,
	Krzysztof Kozlowski, Paul Walmsley, Palmer Dabbelt, Albert Ou
  Cc: Alexandre Ghiti, devicetree, linux-riscv, spacemit, linux-kernel,
	Sandie Cao

Add the P1 PMIC's regulator topology tree for DeepComputing FML13V05 board

Signed-off-by: Sandie Cao <sandie.cao@deepcomputing.io>
---
 .../spacemit/k3-deepcomputing-fml13v05.dts    | 155 ++++++++++++++++++
 1 file changed, 155 insertions(+)

diff --git a/arch/riscv/boot/dts/spacemit/k3-deepcomputing-fml13v05.dts b/arch/riscv/boot/dts/spacemit/k3-deepcomputing-fml13v05.dts
index b5d5112de358..804abc85602a 100644
--- a/arch/riscv/boot/dts/spacemit/k3-deepcomputing-fml13v05.dts
+++ b/arch/riscv/boot/dts/spacemit/k3-deepcomputing-fml13v05.dts
@@ -22,6 +22,161 @@ memory@100000000 {
 		device_type = "memory";
 		reg = <0x1 0x00000000 0x4 0x00000000>;
 	};
+
+	reg_aux_vcc3v3: regulator-aux-vcc3v3 {
+		compatible = "regulator-fixed";
+		regulator-name = "AUX_VCC3V3";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+		regulator-always-on;
+	};
+
+	reg_aux_vcc5v: regulator-aux-vcc5v {
+		compatible = "regulator-fixed";
+		regulator-name = "AUX_VCC5V";
+		regulator-min-microvolt = <5000000>;
+		regulator-max-microvolt = <5000000>;
+		regulator-always-on;
+	};
+};
+
+&i2c8 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2c8_cfg>;
+	status = "okay";
+
+	p1@41 {
+		compatible = "spacemit,p1";
+		reg = <0x41>;
+		interrupts = <64 IRQ_TYPE_LEVEL_HIGH>;
+		vin1-supply = <&reg_aux_vcc5v>;
+		vin2-supply = <&reg_aux_vcc5v>;
+		vin3-supply = <&reg_aux_vcc5v>;
+		vin4-supply = <&reg_aux_vcc5v>;
+		vin5-supply = <&reg_aux_vcc5v>;
+		vin6-supply = <&reg_aux_vcc5v>;
+		aldoin-supply = <&reg_aux_vcc5v>;
+		dldoin1-supply = <&buck4>;
+		dldoin2-supply = <&buck4>;
+
+		regulators {
+			buck1: buck1 {
+				regulator-min-microvolt = <1050000>;
+				regulator-max-microvolt = <1050000>;
+				regulator-ramp-delay = <5000>;
+				regulator-always-on;
+			};
+
+			buck2: buck2 {
+				regulator-min-microvolt = <1050000>;
+				regulator-max-microvolt = <1050000>;
+				regulator-ramp-delay = <5000>;
+				regulator-always-on;
+			};
+
+			buck3: buck3 {
+				regulator-min-microvolt = <800000>;
+				regulator-max-microvolt = <800000>;
+				regulator-ramp-delay = <5000>;
+				regulator-always-on;
+			};
+
+			buck4: buck4 {
+				regulator-min-microvolt = <2100000>;
+				regulator-max-microvolt = <2100000>;
+				regulator-ramp-delay = <5000>;
+				regulator-always-on;
+			};
+
+			buck5: buck5 {
+				regulator-min-microvolt = <1800000>;
+				regulator-max-microvolt = <1800000>;
+				regulator-ramp-delay = <5000>;
+				regulator-always-on;
+			};
+
+			buck6: buck6 {
+				regulator-min-microvolt = <500000>;
+				regulator-max-microvolt = <500000>;
+				regulator-ramp-delay = <5000>;
+				regulator-always-on;
+			};
+
+			aldo1: aldo1 {
+				regulator-min-microvolt = <1800000>;
+				regulator-max-microvolt = <3300000>;
+				regulator-always-on;
+				regulator-boot-on;
+			};
+
+			aldo2: aldo2 {
+				regulator-min-microvolt = <1800000>;
+				regulator-max-microvolt = <1800000>;
+				regulator-always-on;
+				regulator-boot-on;
+			};
+
+			aldo3: aldo3 {
+				regulator-min-microvolt = <500000>;
+				regulator-max-microvolt = <3400000>;
+			};
+
+			aldo4: aldo4 {
+				regulator-min-microvolt = <3300000>;
+				regulator-max-microvolt = <3300000>;
+				regulator-always-on;
+				regulator-boot-on;
+			};
+
+			dldo1: dldo1 {
+				regulator-min-microvolt = <1200000>;
+				regulator-max-microvolt = <1200000>;
+				regulator-always-on;
+				regulator-boot-on;
+			};
+
+			dldo2: dldo2 {
+				regulator-min-microvolt = <900000>;
+				regulator-max-microvolt = <900000>;
+				regulator-always-on;
+				regulator-boot-on;
+			};
+
+			dldo3: dldo3 {
+				regulator-min-microvolt = <800000>;
+				regulator-max-microvolt = <800000>;
+				regulator-always-on;
+				regulator-boot-on;
+			};
+
+			dldo4: dldo4 {
+				regulator-min-microvolt = <1800000>;
+				regulator-max-microvolt = <1800000>;
+				regulator-boot-on;
+			};
+
+			dldo5: dldo5 {
+				regulator-min-microvolt = <1800000>;
+				regulator-max-microvolt = <1800000>;
+				regulator-always-on;
+				regulator-boot-on;
+			};
+
+			dldo6: dldo6 {
+				regulator-min-microvolt = <1800000>;
+				regulator-max-microvolt = <1800000>;
+				regulator-always-on;
+				regulator-boot-on;
+			};
+
+			dldo7: dldo7 {
+				regulator-min-microvolt = <1800000>;
+				regulator-max-microvolt = <1800000>;
+				regulator-always-on;
+				regulator-boot-on;
+			};
+		};
+	};
 };
 
 &uart0 {
-- 
2.43.0

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH 2/3] riscv: dts: spacemit: k3-deepcomputing-fml13v05: add USB controller and USB phy support
  2026-09-22 11:02 [PATCH 0/3] Enable USB and SD for Deepcomputing FML13V05 board Sandie Cao
  2026-09-22 11:04 ` [PATCH 1/3] riscv: dts: spacemit: k3-deepcomputing-fml13v05: add P1 PMIC regulator tree Sandie Cao
@ 2026-09-22 11:04 ` Sandie Cao
  2026-09-23  2:18   ` Troy Mitchell
  2026-09-22 11:04 ` [PATCH 3/3] riscv: dts: spacemit: k3-deepcomputing-fml13v05: Enable SD card support Sandie Cao
  2 siblings, 1 reply; 13+ messages in thread
From: Sandie Cao @ 2026-09-22 11:04 UTC (permalink / raw)
  To: Yixun Lan, Troy Mitchell, Conor Dooley, Rob Herring,
	Krzysztof Kozlowski, Paul Walmsley, Palmer Dabbelt, Albert Ou
  Cc: Alexandre Ghiti, devicetree, linux-riscv, spacemit, linux-kernel,
	Sandie Cao

Add USB device node (b, c, d) to DeepComputing FML13V05 board.
USB A works on otg mode, it isn't configured currently.
- 4 USB-C Ports
     - Port 1: PD 3.0 (65W Max), USB 3.2 Gen 1
     - Port 2: PD 3.0 (65W Max), USB 3.2 Gen 1, DP 1.4 (4K@60Hz)
     - Port 3 & 4: USB 3.2 Gen 1

Signed-off-by: Sandie Cao <sandie.cao@deepcomputing.io>
---
 .../spacemit/k3-deepcomputing-fml13v05.dts    | 44 +++++++++++++
 arch/riscv/boot/dts/spacemit/k3.dtsi          | 66 +++++++++++++++++++
 2 files changed, 110 insertions(+)

diff --git a/arch/riscv/boot/dts/spacemit/k3-deepcomputing-fml13v05.dts b/arch/riscv/boot/dts/spacemit/k3-deepcomputing-fml13v05.dts
index 804abc85602a..55b0f63dcb2e 100644
--- a/arch/riscv/boot/dts/spacemit/k3-deepcomputing-fml13v05.dts
+++ b/arch/riscv/boot/dts/spacemit/k3-deepcomputing-fml13v05.dts
@@ -179,8 +179,52 @@ dldo7: dldo7 {
 	};
 };
 
+&combophy {
+	spacemit,apmu = <&syscon_apmu 0x17>;
+	status = "okay";
+};
+
 &uart0 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&uart0_0_cfg>;
 	status = "okay";
 };
+
+&usb2_host {
+	#address-cells = <1>;
+	#size-cells = <0>;
+	status = "okay";
+
+	hub@1 {
+		compatible = "usb5e3,608";
+		reg = <1>;
+	};
+};
+
+&usb2_phy {
+	status = "okay";
+};
+
+&usb3b_u2phy {
+	status = "okay";
+};
+
+&usb3b {
+	status = "okay";
+};
+
+&usb3c_u2phy {
+	status = "okay";
+};
+
+&usb3c {
+	status = "okay";
+};
+
+&usb3d_u2phy {
+	status = "okay";
+};
+
+&usb3d {
+	status = "okay";
+};
diff --git a/arch/riscv/boot/dts/spacemit/k3.dtsi b/arch/riscv/boot/dts/spacemit/k3.dtsi
index b9977e78e096..ae3f8bb1e5ed 100644
--- a/arch/riscv/boot/dts/spacemit/k3.dtsi
+++ b/arch/riscv/boot/dts/spacemit/k3.dtsi
@@ -441,6 +441,72 @@ soc: soc {
 		dma-noncoherent;
 		ranges;
 
+		usb3b: usb@81400000 {
+			compatible = "spacemit,k3-dwc3";
+			reg = <0x0 0x81400000 0x0 0x10000>;
+			interrupts = <125 IRQ_TYPE_LEVEL_HIGH>;
+			interrupt-parent = <&saplic>;
+			clocks = <&syscon_apmu CLK_APMU_USB3_PORTB_BUS>;
+			clock-names = "usbdrd30";
+			resets = <&syscon_apmu RESET_APMU_USB3_B_AHB>,
+				<&syscon_apmu RESET_APMU_USB3_B_VCC>,
+				<&syscon_apmu RESET_APMU_USB3_B_PHY>;
+			reset-names = "ahb", "vcc", "phy";
+			phys = <&usb3b_u2phy>,
+				<&combophy 2 PHY_TYPE_USB3>;
+			phy-names = "usb2-phy", "usb3-phy";
+			phy_type = "utmi";
+			snps,dis_enblslpm_quirk;
+			snps,dis_u2_susphy_quirk;
+			snps,dis_u3_susphy_quirk;
+			snps,dis-del-phy-power-chg-quirk;
+			snps,dis-tx-ipgap-linecheck-quirk;
+			snps,parkmode-disable-ss-quirk;
+			dr_mode = "host";
+			status = "disabled";
+		};
+
+		usb3b_u2phy: phy@81500000 {
+			compatible = "spacemit,k3-usb2-phy";
+			reg = <0x0 0x81500000 0x0 0x200>;
+			clocks = <&syscon_apmu CLK_APMU_USB2_BUS>;
+			#phy-cells = <0>;
+			status = "disabled";
+		};
+
+               usb3c: usb@81700000 {
+			compatible = "spacemit,k3-dwc3";
+			reg = <0x0 0x81700000 0x0 0x10000>;
+			interrupts = <148 IRQ_TYPE_LEVEL_HIGH>;
+			interrupt-parent = <&saplic>;
+			clocks = <&syscon_apmu CLK_APMU_USB3_PORTC_BUS>;
+			clock-names = "usbdrd30";
+			resets = <&syscon_apmu RESET_APMU_USB3_C_AHB>,
+				<&syscon_apmu RESET_APMU_USB3_C_VCC>,
+				<&syscon_apmu RESET_APMU_USB3_C_PHY>;
+			reset-names = "ahb", "vcc", "phy";
+			phys = <&usb3c_u2phy>,
+				<&combophy 3 PHY_TYPE_USB3>;
+			phy-names = "usb2-phy", "usb3-phy";
+			phy_type = "utmi";
+			snps,dis_enblslpm_quirk;
+			snps,dis_u2_susphy_quirk;
+			snps,dis_u3_susphy_quirk;
+			snps,dis-del-phy-power-chg-quirk;
+			snps,dis-tx-ipgap-linecheck-quirk;
+			snps,parkmode-disable-ss-quirk;
+			dr_mode = "host";
+			status = "disabled";
+		};
+
+		usb3c_u2phy: phy@81800000 {
+			compatible = "spacemit,k3-usb2-phy";
+			reg = <0x0 0x81800000 0x0 0x200>;
+			clocks = <&syscon_apmu CLK_APMU_USB2_BUS>;
+			#phy-cells = <0>;
+			status = "disabled";
+		};
+
 		usb3d: usb@81a00000 {
 			compatible = "spacemit,k3-dwc3";
 			reg = <0x0 0x81a00000 0x0 0x10000>;
-- 
2.43.0

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH 3/3] riscv: dts: spacemit: k3-deepcomputing-fml13v05: Enable SD card support
  2026-09-22 11:02 [PATCH 0/3] Enable USB and SD for Deepcomputing FML13V05 board Sandie Cao
  2026-09-22 11:04 ` [PATCH 1/3] riscv: dts: spacemit: k3-deepcomputing-fml13v05: add P1 PMIC regulator tree Sandie Cao
  2026-09-22 11:04 ` [PATCH 2/3] riscv: dts: spacemit: k3-deepcomputing-fml13v05: add USB controller and USB phy support Sandie Cao
@ 2026-09-22 11:04 ` Sandie Cao
  2026-09-23  2:23   ` Troy Mitchell
  2 siblings, 1 reply; 13+ messages in thread
From: Sandie Cao @ 2026-09-22 11:04 UTC (permalink / raw)
  To: Yixun Lan, Troy Mitchell, Conor Dooley, Rob Herring,
	Krzysztof Kozlowski, Paul Walmsley, Palmer Dabbelt, Albert Ou
  Cc: Alexandre Ghiti, devicetree, linux-riscv, spacemit, linux-kernel,
	Sandie Cao

Add the device tree node SDHCI-0 controller for Micro SD card slot.

Signed-off-by: Sandie Cao <sandie.cao@deepcomputing.io>
---
 .../spacemit/k3-deepcomputing-fml13v05.dts    | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/arch/riscv/boot/dts/spacemit/k3-deepcomputing-fml13v05.dts b/arch/riscv/boot/dts/spacemit/k3-deepcomputing-fml13v05.dts
index 55b0f63dcb2e..5d3f07483d34 100644
--- a/arch/riscv/boot/dts/spacemit/k3-deepcomputing-fml13v05.dts
+++ b/arch/riscv/boot/dts/spacemit/k3-deepcomputing-fml13v05.dts
@@ -2,6 +2,7 @@
 /*
  * Copyright (C) 2026 DeepComputing (HK) Limited
  */
+#include <dt-bindings/gpio/gpio.h>
 
 #include "k3.dtsi"
 #include "k3-pinctrl.dtsi"
@@ -184,6 +185,24 @@ &combophy {
 	status = "okay";
 };
 
+&sdhci0 {
+	pinctrl-names = "default","uhs";
+	pinctrl-0 = <&mmc1_cfg>;
+	pinctrl-1 = <&mmc1_uhs_cfg>;
+	bus-width = <4>;
+	cd-gpios = <&gpio K3_GPIO(88) GPIO_ACTIVE_LOW>;
+	no-mmc;
+	no-sdio;
+	disable-wp;
+	cap-sd-highspeed;
+	vmmc-supply = <&aldo4>;
+	vqmmc-supply = <&aldo1>;
+	sd-uhs-sdr25;
+	sd-uhs-sdr50;
+	sd-uhs-sdr104;
+	status = "okay";
+};
+
 &uart0 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&uart0_0_cfg>;
-- 
2.43.0

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 2/3] riscv: dts: spacemit: k3-deepcomputing-fml13v05: add USB controller and USB phy support
  2026-09-22 11:04 ` [PATCH 2/3] riscv: dts: spacemit: k3-deepcomputing-fml13v05: add USB controller and USB phy support Sandie Cao
@ 2026-09-23  2:18   ` Troy Mitchell
  2026-09-23  4:07     ` Sandie Cao
  0 siblings, 1 reply; 13+ messages in thread
From: Troy Mitchell @ 2026-09-23  2:18 UTC (permalink / raw)
  To: Sandie Cao, Yixun Lan, Troy Mitchell, Conor Dooley, Rob Herring,
	Krzysztof Kozlowski, Paul Walmsley, Palmer Dabbelt, Albert Ou
  Cc: Alexandre Ghiti, devicetree, linux-riscv, spacemit, linux-kernel,
	Sandie Cao

[-- Attachment #1: Type: text/plain, Size: 785 bytes --]

On Tue, Sep 22, 2026 at 07:04:34PM +0800, Sandie Cao wrote:
> diff --git a/arch/riscv/boot/dts/spacemit/k3.dtsi b/arch/riscv/boot/dts/spacemit/k3.dtsi
> [...]
> @@ -441,6 +441,72 @@ soc: soc {
> [...]
> +		usb3b_u2phy: phy@81500000 {
> +			compatible = "spacemit,k3-usb2-phy";
> +			reg = <0x0 0x81500000 0x0 0x200>;
> +			clocks = <&syscon_apmu CLK_APMU_USB2_BUS>;
> +			#phy-cells = <0>;
> +			status = "disabled";
> +		};
> [...]
> +		usb3c_u2phy: phy@81800000 {
> +			compatible = "spacemit,k3-usb2-phy";
> +			reg = <0x0 0x81800000 0x0 0x200>;
> +			clocks = <&syscon_apmu CLK_APMU_USB2_BUS>;
> +			#phy-cells = <0>;
> +			status = "disabled";
> +		};
Should these use CLK_APMU_USB3_PORTB_BUS and CLK_APMU_USB3_PORTC_BUS,
respectively?

-- 
Troy Mitchell

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 248 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 3/3] riscv: dts: spacemit: k3-deepcomputing-fml13v05: Enable SD card support
  2026-09-22 11:04 ` [PATCH 3/3] riscv: dts: spacemit: k3-deepcomputing-fml13v05: Enable SD card support Sandie Cao
@ 2026-09-23  2:23   ` Troy Mitchell
  2026-09-23  6:35     ` Sandie Cao
  0 siblings, 1 reply; 13+ messages in thread
From: Troy Mitchell @ 2026-09-23  2:23 UTC (permalink / raw)
  To: Sandie Cao, Yixun Lan, Troy Mitchell, Conor Dooley, Rob Herring,
	Krzysztof Kozlowski, Paul Walmsley, Palmer Dabbelt, Albert Ou
  Cc: Alexandre Ghiti, devicetree, linux-riscv, spacemit, linux-kernel,
	Sandie Cao

[-- Attachment #1: Type: text/plain, Size: 1026 bytes --]

On Tue, Sep 22, 2026 at 07:04:50PM +0800, Sandie Cao wrote:
> @@ -184,6 +185,24 @@ &combophy {
> [...]
> +&sdhci0 {
> +	pinctrl-names = "default","uhs";
> +	pinctrl-0 = <&mmc1_cfg>;
> +	pinctrl-1 = <&mmc1_uhs_cfg>;
> +	bus-width = <4>;
> +	cd-gpios = <&gpio K3_GPIO(88) GPIO_ACTIVE_LOW>;

Does GPIO88 have an external pull-up? The SDK DTS [1] also includes
mmc1_cd_cfg in both pinctrl states, with a pull-up and 3.3 V configuration.
Neither mmc1_cfg nor mmc1_uhs_cfg covers this pin. Is that configuration
unnecessary on this board?

> +	no-mmc;
> +	no-sdio;
> +	disable-wp;
> +	cap-sd-highspeed;
> +	vmmc-supply = <&aldo4>;
> +	vqmmc-supply = <&aldo1>;

Could you confirm which rail supplies the card's VDD? The SDK DTS [1]
uses p3v3 for vmmc rather than aldo4. Does that RPMI regulator map to
ALDO4, or is the card powered by a different rail?

Link: https://github.com/spacemit-com/linux-6.18/blob/k3-br-v1.0.y/arch/riscv/boot/dts/spacemit/k3-deepcomputing-fml13v05.dts [1]

-- 
Troy Mitchell

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 248 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 2/3] riscv: dts: spacemit: k3-deepcomputing-fml13v05: add USB controller and USB phy support
  2026-09-23  2:18   ` Troy Mitchell
@ 2026-09-23  4:07     ` Sandie Cao
  2026-09-23  6:36       ` Troy Mitchell
  0 siblings, 1 reply; 13+ messages in thread
From: Sandie Cao @ 2026-09-23  4:07 UTC (permalink / raw)
  To: Troy Mitchell
  Cc: Yixun Lan, Troy Mitchell, Conor Dooley, Rob Herring,
	Krzysztof Kozlowski, Paul Walmsley, Palmer Dabbelt, Albert Ou,
	Alexandre Ghiti, devicetree, linux-riscv, spacemit, linux-kernel

Hi, Troy:

> From: "Troy Mitchell"<troy.mitchell@linux.spacemit.com>
> Date:  Wed, Sep 23, 2026, 10:18
> On Tue, Sep 22, 2026 at 07:04:34PM +0800, Sandie Cao wrote:
> > diff --git a/arch/riscv/boot/dts/spacemit/k3.dtsi b/arch/riscv/boot/dts/spacemit/k3.dtsi
> > [...]
> > @@ -441,6 +441,72 @@ soc: soc {
> > [...]
> > +                usb3b_u2phy: phy@81500000 {
> > +                        compatible = "spacemit,k3-usb2-phy";
> > +                        reg = <0x0 0x81500000 0x0 0x200>;
> > +                        clocks = <&syscon_apmu CLK_APMU_USB2_BUS>;
> > +                        #phy-cells = <0>;
> > +                        status = "disabled";
> > +                };
> > [...]
> > +                usb3c_u2phy: phy@81800000 {
> > +                        compatible = "spacemit,k3-usb2-phy";
> > +                        reg = <0x0 0x81800000 0x0 0x200>;
> > +                        clocks = <&syscon_apmu CLK_APMU_USB2_BUS>;
> > +                        #phy-cells = <0>;
> > +                        status = "disabled";
> > +                };
> Should these use CLK_APMU_USB3_PORTB_BUS and CLK_APMU_USB3_PORTC_BUS,
> respectively?

Here is clock for usb2phy.  CLK_APMU_USB3_PORTB_BUS is clock for USB3 PORTB. CLK_APMU_USB3_PORTC_BUS is clock for USB3 PORTC.

Please note: usb3d_u2phy also use CLK_APMU_USB2_BUS.

                usb3d_u2phy: phy@81b00000 {
                        compatible = "spacemit,k3-usb2-phy";
                        reg = <0x0 0x81b00000 0x0 0x200>;
                        clocks = <&syscon_apmu CLK_APMU_USB2_BUS>;
                        #phy-cells = <0>;
                        status = "disabled";
                };

Best regards
Sandie

> 
> -- 
> Troy Mitchell
> 

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 3/3] riscv: dts: spacemit: k3-deepcomputing-fml13v05: Enable SD card support
  2026-09-23  2:23   ` Troy Mitchell
@ 2026-09-23  6:35     ` Sandie Cao
  2026-09-23  7:02       ` Troy Mitchell
  0 siblings, 1 reply; 13+ messages in thread
From: Sandie Cao @ 2026-09-23  6:35 UTC (permalink / raw)
  To: Troy Mitchell
  Cc: Yixun Lan, Troy Mitchell, Conor Dooley, Rob Herring,
	Krzysztof Kozlowski, Paul Walmsley, Palmer Dabbelt, Albert Ou,
	Alexandre Ghiti, devicetree, linux-riscv, spacemit, linux-kernel

Hi, Troy:

> From: "Troy Mitchell"<troy.mitchell@linux.spacemit.com>
> Date:  Wed, Sep 23, 2026, 10:23
> On Tue, Sep 22, 2026 at 07:04:50PM +0800, Sandie Cao wrote:
> > @@ -184,6 +185,24 @@ &combophy {
> > [...]
> > +&sdhci0 {
> > +        pinctrl-names = "default","uhs";
> > +        pinctrl-0 = <&mmc1_cfg>;
> > +        pinctrl-1 = <&mmc1_uhs_cfg>;
> > +        bus-width = <4>;
> > +        cd-gpios = <&gpio K3_GPIO(88) GPIO_ACTIVE_LOW>;
> 
> Does GPIO88 have an external pull-up? The SDK DTS [1] also includes
> mmc1_cd_cfg in both pinctrl states, with a pull-up and 3.3 V configuration.
> Neither mmc1_cfg nor mmc1_uhs_cfg covers this pin. Is that configuration
> unnecessary on this board?
> 

FML13V05 SD card slot is inside the board, it doesn't need cd-gpio, FML13V05 Keeps GPIO88 to low, Then SD card is always on for SD Card driver.

We check the vmmc-supply is p3v3. We have the same SDK DTS config with k3_com260[1] , so, this patch follows the SD card patch of k3_com260 dts[2].
 
If this is not correct, we will change it.

Link: https://github.com/spacemit-com/linux-6.18/blob/k3-br-v1.0.y/arch/riscv/boot/dts/spacemit/k3_com260.dtsi [1]
https://lore.kernel.org/all/20260610-07-k3-enable-sd-v1-1-196ae29bd091@kernel.org/ [2]

Best regards
Sandie

> > +        no-mmc;
> > +        no-sdio;
> > +        disable-wp;
> > +        cap-sd-highspeed;
> > +        vmmc-supply = <&aldo4>;
> > +        vqmmc-supply = <&aldo1>;
> 
> Could you confirm which rail supplies the card's VDD? The SDK DTS [1]
> uses p3v3 for vmmc rather than aldo4. Does that RPMI regulator map to
> ALDO4, or is the card powered by a different rail?
> 
> Link: https://github.com/spacemit-com/linux-6.18/blob/k3-br-v1.0.y/arch/riscv/boot/dts/spacemit/k3-deepcomputing-fml13v05.dts [1]
> 
> -- 
> Troy Mitchell
> 

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 2/3] riscv: dts: spacemit: k3-deepcomputing-fml13v05: add USB controller and USB phy support
  2026-09-23  4:07     ` Sandie Cao
@ 2026-09-23  6:36       ` Troy Mitchell
  2026-09-23  6:44         ` Sandie Cao
  0 siblings, 1 reply; 13+ messages in thread
From: Troy Mitchell @ 2026-09-23  6:36 UTC (permalink / raw)
  To: Sandie Cao, Troy Mitchell
  Cc: Yixun Lan, Troy Mitchell, Conor Dooley, Rob Herring,
	Krzysztof Kozlowski, Paul Walmsley, Palmer Dabbelt, Albert Ou,
	Alexandre Ghiti, devicetree, linux-riscv, spacemit, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 607 bytes --]

On Wed, Sep 23, 2026 at 12:07:20PM +0800, Sandie Cao wrote:
> Please note: usb3d_u2phy also use CLK_APMU_USB2_BUS.

Could you share which tree and commit this snippet comes from? I checked
k3.dtsi at the base-commit listed in your cover letter,
3f2425f5b5bbbdd991ca9cdfd5502e68d8895998 [1], and usb3d_u2phy has:

        clocks = <&syscon_apmu CLK_APMU_USB3_PORTD_BUS>;

Are we looking at different versions?

Link: https://kernel.googlesource.com/pub/scm/linux/kernel/git/next/linux-next/+/3f2425f5b5bbbdd991ca9cdfd5502e68d8895998/arch/riscv/boot/dts/spacemit/k3.dtsi [1]

-- 
Troy Mitchell

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 248 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 2/3] riscv: dts: spacemit: k3-deepcomputing-fml13v05: add USB controller and USB phy support
  2026-09-23  6:36       ` Troy Mitchell
@ 2026-09-23  6:44         ` Sandie Cao
  0 siblings, 0 replies; 13+ messages in thread
From: Sandie Cao @ 2026-09-23  6:44 UTC (permalink / raw)
  To: Troy Mitchell
  Cc: Troy Mitchell, Yixun Lan, Conor Dooley, Rob Herring,
	Krzysztof Kozlowski, Paul Walmsley, Palmer Dabbelt, Albert Ou,
	Alexandre Ghiti, devicetree, linux-riscv, spacemit, linux-kernel

Hi, Troy:

> From: "Troy Mitchell"<troy.mitchell@linux.spacemit.com>
> Date:  Wed, Sep 23, 2026, 14:36
> On Wed, Sep 23, 2026 at 12:07:20PM +0800, Sandie Cao wrote:
> > Please note: usb3d_u2phy also use CLK_APMU_USB2_BUS.
> 
> Could you share which tree and commit this snippet comes from? I checked
> k3.dtsi at the base-commit listed in your cover letter,
> 3f2425f5b5bbbdd991ca9cdfd5502e68d8895998 [1], and usb3d_u2phy has:
> 
>         clocks = <&syscon_apmu CLK_APMU_USB3_PORTD_BUS>;
> 
> Are we looking at different versions?

I'm sorry, I check the wrong version of v7.2.  I will correct it in next patch.

Best regards
Sandie

> 
> Link: https://kernel.googlesource.com/pub/scm/linux/kernel/git/next/linux-next/+/3f2425f5b5bbbdd991ca9cdfd5502e68d8895998/arch/riscv/boot/dts/spacemit/k3.dtsi [1]
> 
> -- 
> Troy Mitchell
> 

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 3/3] riscv: dts: spacemit: k3-deepcomputing-fml13v05: Enable SD card support
  2026-09-23  6:35     ` Sandie Cao
@ 2026-09-23  7:02       ` Troy Mitchell
  2026-09-23  8:01         ` Sandie Cao
  0 siblings, 1 reply; 13+ messages in thread
From: Troy Mitchell @ 2026-09-23  7:02 UTC (permalink / raw)
  To: Sandie Cao, Troy Mitchell
  Cc: Yixun Lan, Troy Mitchell, Conor Dooley, Rob Herring,
	Krzysztof Kozlowski, Paul Walmsley, Palmer Dabbelt, Albert Ou,
	Alexandre Ghiti, devicetree, linux-riscv, spacemit, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1076 bytes --]

On Wed, Sep 23, 2026 at 02:35:20PM +0800, Sandie Cao wrote:
> FML13V05 SD card slot is inside the board, it doesn't need cd-gpio,
> FML13V05 Keeps GPIO88 to low, Then SD card is always on for SD Card
> driver.

An internal slot does not necessarily mean the card is non-removable.
I don't think its location alone justifies keeping card detect asserted:
GPIO88 would report a card present even when the slot is empty.

> We check the vmmc-supply is p3v3. We have the same SDK DTS config with
> k3_com260[1] , so, this patch follows the SD card patch of k3_com260
> dts[2].
>
> If this is not correct, we will change it.

Could you confirm from the schematics that the SD power wiring matches
CoM260 and that the card's VDD is actually connected to ALDO4? If so,
this supply reference is fine. The same SDK configuration alone does
not establish the wiring.

If the card instead uses a fixed, always-on supply with no software power
control, vmmc-supply is optional for the MMC core; it should not point to
an unrelated ALDO4 rail.

-- 
Troy Mitchell

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 248 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 3/3] riscv: dts: spacemit: k3-deepcomputing-fml13v05: Enable SD card support
  2026-09-23  7:02       ` Troy Mitchell
@ 2026-09-23  8:01         ` Sandie Cao
  2026-09-23  9:13           ` Troy Mitchell
  0 siblings, 1 reply; 13+ messages in thread
From: Sandie Cao @ 2026-09-23  8:01 UTC (permalink / raw)
  To: Troy Mitchell
  Cc: Troy Mitchell, Yixun Lan, Conor Dooley, Rob Herring,
	Krzysztof Kozlowski, Paul Walmsley, Palmer Dabbelt, Albert Ou,
	Alexandre Ghiti, devicetree, linux-riscv, spacemit, linux-kernel

Hi, Troy:

> From: "Troy Mitchell"<troy.mitchell@linux.spacemit.com>
> Date:  Wed, Sep 23, 2026, 15:02
> On Wed, Sep 23, 2026 at 02:35:20PM +0800, Sandie Cao wrote:
> > FML13V05 SD card slot is inside the board, it doesn't need cd-gpio,
> > FML13V05 Keeps GPIO88 to low, Then SD card is always on for SD Card
> > driver.
> 
> An internal slot does not necessarily mean the card is non-removable.
> I don't think its location alone justifies keeping card detect asserted:
> GPIO88 would report a card present even when the slot is empty.

Yes. The FML13V05 hardware is designed for this. We can't change it. 

> 
> > We check the vmmc-supply is p3v3. We have the same SDK DTS config with
> > k3_com260[1] , so, this patch follows the SD card patch of k3_com260
> > dts[2].
> >
> > If this is not correct, we will change it.
> 
> Could you confirm from the schematics that the SD power wiring matches
> CoM260 and that the card's VDD is actually connected to ALDO4? If so,
> this supply reference is fine. The same SDK configuration alone does
> not establish the wiring.
> 
> If the card instead uses a fixed, always-on supply with no software power
> control, vmmc-supply is optional for the MMC core; it should not point to
> an unrelated ALDO4 rail.

We check the schematics both of COM260 and FML13V05, both use p3v3 (a fixed, always-on supply with no software power control), not ALDO4. ALD04 is only for USB.
We will correct it in next patch.

Best regards
Sandie

> 
> -- 
> Troy Mitchell
> 

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 3/3] riscv: dts: spacemit: k3-deepcomputing-fml13v05: Enable SD card support
  2026-09-23  8:01         ` Sandie Cao
@ 2026-09-23  9:13           ` Troy Mitchell
  0 siblings, 0 replies; 13+ messages in thread
From: Troy Mitchell @ 2026-09-23  9:13 UTC (permalink / raw)
  To: Sandie Cao, Troy Mitchell
  Cc: Yixun Lan, Conor Dooley, Rob Herring, Krzysztof Kozlowski,
	Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti,
	devicetree, linux-riscv, spacemit, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 2052 bytes --]

On Wed Sep 23, 2026 at 4:01 PM +08, Sandie Cao wrote:
> Hi, Troy:
>
>> From: "Troy Mitchell"<troy.mitchell@linux.spacemit.com>
>> Date:  Wed, Sep 23, 2026, 15:02
>> On Wed, Sep 23, 2026 at 02:35:20PM +0800, Sandie Cao wrote:
>> > FML13V05 SD card slot is inside the board, it doesn't need cd-gpio,
>> > FML13V05 Keeps GPIO88 to low, Then SD card is always on for SD Card
>> > driver.
>> 
>> An internal slot does not necessarily mean the card is non-removable.
>> I don't think its location alone justifies keeping card detect asserted:
>> GPIO88 would report a card present even when the slot is empty.
>
> Yes. The FML13V05 hardware is designed for this. We can't change it. 

I may not have been clear: an internal card slot does not necessarily
mean the card is non-removable. If GPIO88 is connected to the
card-detect switch, it still needs a pull-up. Is GPIO88 tied low on
the board, or does it reflect the state of that switch?

>
>> 
>> > We check the vmmc-supply is p3v3. We have the same SDK DTS config with
>> > k3_com260[1] , so, this patch follows the SD card patch of k3_com260
>> > dts[2].
>> >
>> > If this is not correct, we will change it.
>> 
>> Could you confirm from the schematics that the SD power wiring matches
>> CoM260 and that the card's VDD is actually connected to ALDO4? If so,
>> this supply reference is fine. The same SDK configuration alone does
>> not establish the wiring.
>> 
>> If the card instead uses a fixed, always-on supply with no software power
>> control, vmmc-supply is optional for the MMC core; it should not point to
>> an unrelated ALDO4 rail.
>
> We check the schematics both of COM260 and FML13V05, both use p3v3 (a fixed, always-on supply with no software power control), not ALDO4. ALD04 is only for USB.
> We will correct it in next patch.
I'll send a separate patch to fix the CoM260 vmmc-supply reference.
You can focus on FML13V05 in this series.

>
> Best regards
> Sandie
>
>> 
>> -- 
>> Troy Mitchell
>> 


-- 
Troy Mitchell

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 248 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2026-09-23  9:14 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-22 11:02 [PATCH 0/3] Enable USB and SD for Deepcomputing FML13V05 board Sandie Cao
2026-09-22 11:04 ` [PATCH 1/3] riscv: dts: spacemit: k3-deepcomputing-fml13v05: add P1 PMIC regulator tree Sandie Cao
2026-09-22 11:04 ` [PATCH 2/3] riscv: dts: spacemit: k3-deepcomputing-fml13v05: add USB controller and USB phy support Sandie Cao
2026-09-23  2:18   ` Troy Mitchell
2026-09-23  4:07     ` Sandie Cao
2026-09-23  6:36       ` Troy Mitchell
2026-09-23  6:44         ` Sandie Cao
2026-09-22 11:04 ` [PATCH 3/3] riscv: dts: spacemit: k3-deepcomputing-fml13v05: Enable SD card support Sandie Cao
2026-09-23  2:23   ` Troy Mitchell
2026-09-23  6:35     ` Sandie Cao
2026-09-23  7:02       ` Troy Mitchell
2026-09-23  8:01         ` Sandie Cao
2026-09-23  9:13           ` Troy Mitchell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®