Linux-RISC-V Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] riscv: dts: spacemit: Some minor improvements to K3
@ 2026-11-25  7:46 Yixun Lan
  2026-11-25  7:46 ` [PATCH 1/4] riscv: dts: spacemit: k3: Rename PMIC node Yixun Lan
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Yixun Lan @ 2026-11-25  7:46 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Alexandre Ghiti, Troy Mitchell
  Cc: devicetree, linux-riscv, spacemit, linux-kernel, Yixun Lan

Some misc changes combined in this series, the first three
patches are quite minor and obvious, the CD pin patch fix
an issue in U-Boot side which request explicit bias settings.

Signed-off-by: Yixun Lan <dlan@kernel.org>
---
Yixun Lan (4):
      riscv: dts: spacemit: k3: Rename PMIC node
      riscv: dts: spacemit: k3: Use Pin Macro
      riscv: dts: spacemit: k3: Add alias for MicroSD Card
      riscv: dts: spacemit: k3: Set CD pin bias

 arch/riscv/boot/dts/spacemit/k3-com260-ifx.dts | 1 +
 arch/riscv/boot/dts/spacemit/k3-com260.dtsi    | 4 ++--
 arch/riscv/boot/dts/spacemit/k3-pico-itx.dts   | 8 ++++----
 3 files changed, 7 insertions(+), 6 deletions(-)
---
base-commit: da3f64e708a342ab2804754fa26fb4a132dc1809
change-id: 20261124-09-k3-dt-minor-misc-fde2610f267e

Best regards,
--  
Yixun Lan <dlan@kernel.org>


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

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

* [PATCH 1/4] riscv: dts: spacemit: k3: Rename PMIC node
  2026-11-25  7:46 [PATCH 0/4] riscv: dts: spacemit: Some minor improvements to K3 Yixun Lan
@ 2026-11-25  7:46 ` Yixun Lan
  2026-11-27  6:03   ` Troy Mitchell
  2026-11-25  7:46 ` [PATCH 2/4] riscv: dts: spacemit: k3: Use Pin Macro Yixun Lan
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 9+ messages in thread
From: Yixun Lan @ 2026-11-25  7:46 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Alexandre Ghiti, Troy Mitchell
  Cc: devicetree, linux-riscv, spacemit, linux-kernel, Yixun Lan

Replace to a more descriptive name which follow Device Tree docs.

Signed-off-by: Yixun Lan <dlan@kernel.org>
---
 arch/riscv/boot/dts/spacemit/k3-pico-itx.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/riscv/boot/dts/spacemit/k3-pico-itx.dts b/arch/riscv/boot/dts/spacemit/k3-pico-itx.dts
index 8d1cd468cf8c..a4afe24130ae 100644
--- a/arch/riscv/boot/dts/spacemit/k3-pico-itx.dts
+++ b/arch/riscv/boot/dts/spacemit/k3-pico-itx.dts
@@ -100,7 +100,7 @@ &i2c8 {
 	pinctrl-0 = <&i2c8_cfg>;
 	status = "okay";
 
-	p1@41 {
+	pmic@41 {
 		compatible = "spacemit,p1";
 		reg = <0x41>;
 		interrupts = <64 IRQ_TYPE_LEVEL_HIGH>;

-- 
2.56.0


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

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

* [PATCH 2/4] riscv: dts: spacemit: k3: Use Pin Macro
  2026-11-25  7:46 [PATCH 0/4] riscv: dts: spacemit: Some minor improvements to K3 Yixun Lan
  2026-11-25  7:46 ` [PATCH 1/4] riscv: dts: spacemit: k3: Rename PMIC node Yixun Lan
@ 2026-11-25  7:46 ` Yixun Lan
  2026-11-27  6:03   ` Troy Mitchell
  2026-11-25  7:46 ` [PATCH 3/4] riscv: dts: spacemit: k3: Add alias for MicroSD Card Yixun Lan
  2026-11-25  7:46 ` [PATCH 4/4] riscv: dts: spacemit: k3: Set CD pin bias Yixun Lan
  3 siblings, 1 reply; 9+ messages in thread
From: Yixun Lan @ 2026-11-25  7:46 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Alexandre Ghiti, Troy Mitchell
  Cc: devicetree, linux-riscv, spacemit, linux-kernel, Yixun Lan

Use Macro for the GPIO Pin definition, which match enumeration from
pinctrl driver and make people easy to grep for debugging purpose.

Signed-off-by: Yixun Lan <dlan@kernel.org>
---
 arch/riscv/boot/dts/spacemit/k3-com260.dtsi  | 2 +-
 arch/riscv/boot/dts/spacemit/k3-pico-itx.dts | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/riscv/boot/dts/spacemit/k3-com260.dtsi b/arch/riscv/boot/dts/spacemit/k3-com260.dtsi
index d8e94d538bf1..65c6f49f8591 100644
--- a/arch/riscv/boot/dts/spacemit/k3-com260.dtsi
+++ b/arch/riscv/boot/dts/spacemit/k3-com260.dtsi
@@ -228,7 +228,7 @@ mdio {
 		phy1: ethernet-phy@1 {
 			compatible = "ethernet-phy-id001c.c916";
 			reg = <1>;
-			reset-gpios = <&gpio 1 5 GPIO_ACTIVE_LOW>;
+			reset-gpios = <&gpio K3_GPIO(37) GPIO_ACTIVE_LOW>;
 			reset-assert-us = <10000>;
 			reset-deassert-us = <50000>;
 		};
diff --git a/arch/riscv/boot/dts/spacemit/k3-pico-itx.dts b/arch/riscv/boot/dts/spacemit/k3-pico-itx.dts
index a4afe24130ae..a74e76ee75e4 100644
--- a/arch/riscv/boot/dts/spacemit/k3-pico-itx.dts
+++ b/arch/riscv/boot/dts/spacemit/k3-pico-itx.dts
@@ -48,14 +48,14 @@ rfkill-pcie-wlan {
 		compatible = "rfkill-gpio";
 		label = "rfkill-pcie-wlan";
 		radio-type = "wlan";
-		shutdown-gpios = <&gpio 1 3 GPIO_ACTIVE_HIGH>;
+		shutdown-gpios = <&gpio K3_GPIO(35) GPIO_ACTIVE_HIGH>;
 	};
 
 	rfkill-usb-bt {
 		compatible = "rfkill-gpio";
 		label = "rfkill-usb-bt";
 		radio-type = "bluetooth";
-		shutdown-gpios = <&gpio 0 30 GPIO_ACTIVE_HIGH>;
+		shutdown-gpios = <&gpio K3_GPIO(30) GPIO_ACTIVE_HIGH>;
 	};
 };
 
@@ -250,7 +250,7 @@ mdio {
 		phy0: ethernet-phy@1 {
 			compatible = "ethernet-phy-id001c.c916";
 			reg = <1>;
-			reset-gpios = <&gpio 0 15 GPIO_ACTIVE_LOW>;
+			reset-gpios = <&gpio K3_GPIO(15) GPIO_ACTIVE_LOW>;
 			reset-assert-us = <10000>;
 			reset-deassert-us = <50000>;
 			realtek,aldps-enable;

-- 
2.56.0


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

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

* [PATCH 3/4] riscv: dts: spacemit: k3: Add alias for MicroSD Card
  2026-11-25  7:46 [PATCH 0/4] riscv: dts: spacemit: Some minor improvements to K3 Yixun Lan
  2026-11-25  7:46 ` [PATCH 1/4] riscv: dts: spacemit: k3: Rename PMIC node Yixun Lan
  2026-11-25  7:46 ` [PATCH 2/4] riscv: dts: spacemit: k3: Use Pin Macro Yixun Lan
@ 2026-11-25  7:46 ` Yixun Lan
  2026-11-27  6:04   ` Troy Mitchell
  2026-11-25  7:46 ` [PATCH 4/4] riscv: dts: spacemit: k3: Set CD pin bias Yixun Lan
  3 siblings, 1 reply; 9+ messages in thread
From: Yixun Lan @ 2026-11-25  7:46 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Alexandre Ghiti, Troy Mitchell
  Cc: devicetree, linux-riscv, spacemit, linux-kernel, Yixun Lan

Add an alias to the MicroSD Card for CoM260-IFX board.

Signed-off-by: Yixun Lan <dlan@kernel.org>
---
 arch/riscv/boot/dts/spacemit/k3-com260-ifx.dts | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/riscv/boot/dts/spacemit/k3-com260-ifx.dts b/arch/riscv/boot/dts/spacemit/k3-com260-ifx.dts
index 38809d01df82..c5c5e6d44918 100644
--- a/arch/riscv/boot/dts/spacemit/k3-com260-ifx.dts
+++ b/arch/riscv/boot/dts/spacemit/k3-com260-ifx.dts
@@ -14,6 +14,7 @@ / {
 	aliases {
 		serial0 = &uart0;
 		ethernet0 = &eth1;
+		mmc0 = &sdhci0;
 	};
 
 	chosen {

-- 
2.56.0


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

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

* [PATCH 4/4] riscv: dts: spacemit: k3: Set CD pin bias
  2026-11-25  7:46 [PATCH 0/4] riscv: dts: spacemit: Some minor improvements to K3 Yixun Lan
                   ` (2 preceding siblings ...)
  2026-11-25  7:46 ` [PATCH 3/4] riscv: dts: spacemit: k3: Add alias for MicroSD Card Yixun Lan
@ 2026-11-25  7:46 ` Yixun Lan
  2026-11-27  6:10   ` Troy Mitchell
  3 siblings, 1 reply; 9+ messages in thread
From: Yixun Lan @ 2026-11-25  7:46 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Alexandre Ghiti, Troy Mitchell
  Cc: devicetree, linux-riscv, spacemit, linux-kernel, Yixun Lan

Explicitly configure the bias settings of the CD (Card Detect) pin
for MicroSD card in CoM260-IFX board.

During the GPIO pin request phase, the pinctrl driver disables bias
settings in function spacemit_request_gpio(), this happens to work
in kernel side, but doesn't for U-Boot. Adding a flag to fix this.

Signed-off-by: Yixun Lan <dlan@kernel.org>

---
K3 Use same SD card slot as K1's MusePi-PRO, which needs PULL_UP.
---
 arch/riscv/boot/dts/spacemit/k3-com260.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/riscv/boot/dts/spacemit/k3-com260.dtsi b/arch/riscv/boot/dts/spacemit/k3-com260.dtsi
index 65c6f49f8591..598a53461afc 100644
--- a/arch/riscv/boot/dts/spacemit/k3-com260.dtsi
+++ b/arch/riscv/boot/dts/spacemit/k3-com260.dtsi
@@ -240,7 +240,7 @@ &sdhci0 {
 	pinctrl-0 = <&mmc1_cfg>;
 	pinctrl-1 = <&mmc1_uhs_cfg>;
 	bus-width = <4>;
-	cd-gpios = <&gpio K3_GPIO(4) GPIO_ACTIVE_HIGH>;
+	cd-gpios = <&gpio K3_GPIO(4) (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
 	no-mmc;
 	no-sdio;
 	disable-wp;

-- 
2.56.0


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

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

* Re: [PATCH 1/4] riscv: dts: spacemit: k3: Rename PMIC node
  2026-11-25  7:46 ` [PATCH 1/4] riscv: dts: spacemit: k3: Rename PMIC node Yixun Lan
@ 2026-11-27  6:03   ` Troy Mitchell
  0 siblings, 0 replies; 9+ messages in thread
From: Troy Mitchell @ 2026-11-27  6:03 UTC (permalink / raw)
  To: Yixun Lan, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti,
	Troy Mitchell
  Cc: devicetree, linux-riscv, spacemit, linux-kernel


[-- Attachment #1.1: Type: text/plain, Size: 851 bytes --]

On Wed Nov 25, 2026 at 7:46 AM GMT, Yixun Lan wrote:
> Replace to a more descriptive name which follow Device Tree docs.
>
> Signed-off-by: Yixun Lan <dlan@kernel.org>
> ---
>  arch/riscv/boot/dts/spacemit/k3-pico-itx.dts | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/riscv/boot/dts/spacemit/k3-pico-itx.dts b/arch/riscv/boot/dts/spacemit/k3-pico-itx.dts
> index 8d1cd468cf8c..a4afe24130ae 100644
> --- a/arch/riscv/boot/dts/spacemit/k3-pico-itx.dts
> +++ b/arch/riscv/boot/dts/spacemit/k3-pico-itx.dts
> @@ -100,7 +100,7 @@ &i2c8 {
>  	pinctrl-0 = <&i2c8_cfg>;
>  	status = "okay";
>  
> -	p1@41 {
> +	pmic@41 {
>  		compatible = "spacemit,p1";
>  		reg = <0x41>;
>  		interrupts = <64 IRQ_TYPE_LEVEL_HIGH>;
Reviewed-by: Troy Mitchell <troy.mitchell@linux.spacemit.com>


-- 
Troy Mitchell


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

[-- Attachment #2: Type: text/plain, Size: 161 bytes --]

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

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

* Re: [PATCH 2/4] riscv: dts: spacemit: k3: Use Pin Macro
  2026-11-25  7:46 ` [PATCH 2/4] riscv: dts: spacemit: k3: Use Pin Macro Yixun Lan
@ 2026-11-27  6:03   ` Troy Mitchell
  0 siblings, 0 replies; 9+ messages in thread
From: Troy Mitchell @ 2026-11-27  6:03 UTC (permalink / raw)
  To: Yixun Lan, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti,
	Troy Mitchell
  Cc: devicetree, linux-riscv, spacemit, linux-kernel


[-- Attachment #1.1: Type: text/plain, Size: 333 bytes --]

On Wed Nov 25, 2026 at 7:46 AM GMT, Yixun Lan wrote:
> Use Macro for the GPIO Pin definition, which match enumeration from
> pinctrl driver and make people easy to grep for debugging purpose.
>
> Signed-off-by: Yixun Lan <dlan@kernel.org>
Reviewed-by: Troy Mitchell <troy.mitchell@linux.spacemit.com>


-- 
Troy Mitchell


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

[-- Attachment #2: Type: text/plain, Size: 161 bytes --]

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

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

* Re: [PATCH 3/4] riscv: dts: spacemit: k3: Add alias for MicroSD Card
  2026-11-25  7:46 ` [PATCH 3/4] riscv: dts: spacemit: k3: Add alias for MicroSD Card Yixun Lan
@ 2026-11-27  6:04   ` Troy Mitchell
  0 siblings, 0 replies; 9+ messages in thread
From: Troy Mitchell @ 2026-11-27  6:04 UTC (permalink / raw)
  To: Yixun Lan, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti,
	Troy Mitchell
  Cc: devicetree, linux-riscv, spacemit, linux-kernel


[-- Attachment #1.1: Type: text/plain, Size: 250 bytes --]

On Wed Nov 25, 2026 at 7:46 AM GMT, Yixun Lan wrote:
> Add an alias to the MicroSD Card for CoM260-IFX board.
>
> Signed-off-by: Yixun Lan <dlan@kernel.org>
Reviewed-by: Troy Mitchell <troy.mitchell@linux.spacemit.com>


-- 
Troy Mitchell


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

[-- Attachment #2: Type: text/plain, Size: 161 bytes --]

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

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

* Re: [PATCH 4/4] riscv: dts: spacemit: k3: Set CD pin bias
  2026-11-25  7:46 ` [PATCH 4/4] riscv: dts: spacemit: k3: Set CD pin bias Yixun Lan
@ 2026-11-27  6:10   ` Troy Mitchell
  0 siblings, 0 replies; 9+ messages in thread
From: Troy Mitchell @ 2026-11-27  6:10 UTC (permalink / raw)
  To: Yixun Lan, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti,
	Troy Mitchell
  Cc: devicetree, linux-riscv, spacemit, linux-kernel


[-- Attachment #1.1: Type: text/plain, Size: 1208 bytes --]

On Wed Nov 25, 2026 at 7:46 AM GMT, Yixun Lan wrote:
> Explicitly configure the bias settings of the CD (Card Detect) pin
> for MicroSD card in CoM260-IFX board.
>
> During the GPIO pin request phase, the pinctrl driver disables bias
> settings in function spacemit_request_gpio(), this happens to work
> in kernel side, but doesn't for U-Boot. Adding a flag to fix this.
>
> Signed-off-by: Yixun Lan <dlan@kernel.org>
>
> ---
> K3 Use same SD card slot as K1's MusePi-PRO, which needs PULL_UP.
> ---
>  arch/riscv/boot/dts/spacemit/k3-com260.dtsi | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/riscv/boot/dts/spacemit/k3-com260.dtsi b/arch/riscv/boot/dts/spacemit/k3-com260.dtsi
> index 65c6f49f8591..598a53461afc 100644
> --- a/arch/riscv/boot/dts/spacemit/k3-com260.dtsi
> +++ b/arch/riscv/boot/dts/spacemit/k3-com260.dtsi
> @@ -240,7 +240,7 @@ &sdhci0 {
>  	pinctrl-0 = <&mmc1_cfg>;
>  	pinctrl-1 = <&mmc1_uhs_cfg>;
>  	bus-width = <4>;
> -	cd-gpios = <&gpio K3_GPIO(4) GPIO_ACTIVE_HIGH>;
> +	cd-gpios = <&gpio K3_GPIO(4) (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
Reviewed-by: Troy Mitchell <troy.mitchell@linux.spacemit.com>


-- 
Troy Mitchell


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

[-- Attachment #2: Type: text/plain, Size: 161 bytes --]

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

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

end of thread, other threads:[~2026-11-27  6:11 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-25  7:46 [PATCH 0/4] riscv: dts: spacemit: Some minor improvements to K3 Yixun Lan
2026-11-25  7:46 ` [PATCH 1/4] riscv: dts: spacemit: k3: Rename PMIC node Yixun Lan
2026-11-27  6:03   ` Troy Mitchell
2026-11-25  7:46 ` [PATCH 2/4] riscv: dts: spacemit: k3: Use Pin Macro Yixun Lan
2026-11-27  6:03   ` Troy Mitchell
2026-11-25  7:46 ` [PATCH 3/4] riscv: dts: spacemit: k3: Add alias for MicroSD Card Yixun Lan
2026-11-27  6:04   ` Troy Mitchell
2026-11-25  7:46 ` [PATCH 4/4] riscv: dts: spacemit: k3: Set CD pin bias Yixun Lan
2026-11-27  6:10   ` Troy Mitchell

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