linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] riscv: dts: starfive: jh7110-common: use macros for MMC0 pins
@ 2025-04-24  6:06 Icenowy Zheng
  2025-05-02 11:24 ` E Shattow
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Icenowy Zheng @ 2025-04-24  6:06 UTC (permalink / raw)
  To: Emil Renner Berthing, Conor Dooley
  Cc: Rob Herring, Krzysztof Kozlowski, linux-riscv, devicetree,
	linux-kernel, Icenowy Zheng

The pin names of MMC0 pinmux is defined in the pinctrl dt binding header
associated with starfive,jh7110-pinctrl .

Include the header file and use these names instead of raw numbers for
defining MMC0 pinmux.

Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
---
This is only a prettying commit. The resulting DTB files have the same
content with or without this patch (verified by doing sha256sum on
arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2-v1.3b.dtb).

 .../boot/dts/starfive/jh7110-common.dtsi      | 21 ++++++++++---------
 1 file changed, 11 insertions(+), 10 deletions(-)

diff --git a/arch/riscv/boot/dts/starfive/jh7110-common.dtsi b/arch/riscv/boot/dts/starfive/jh7110-common.dtsi
index c2f70f5e2918f..a2c72b385a905 100644
--- a/arch/riscv/boot/dts/starfive/jh7110-common.dtsi
+++ b/arch/riscv/boot/dts/starfive/jh7110-common.dtsi
@@ -8,6 +8,7 @@
 #include "jh7110.dtsi"
 #include "jh7110-pinfunc.h"
 #include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/pinctrl/starfive,jh7110-pinctrl.h>
 
 / {
 	aliases {
@@ -428,16 +429,16 @@ GPOEN_ENABLE,
 		};
 
 		mmc-pins {
-			pinmux = <PINMUX(64, 0)>,
-				 <PINMUX(65, 0)>,
-				 <PINMUX(66, 0)>,
-				 <PINMUX(67, 0)>,
-				 <PINMUX(68, 0)>,
-				 <PINMUX(69, 0)>,
-				 <PINMUX(70, 0)>,
-				 <PINMUX(71, 0)>,
-				 <PINMUX(72, 0)>,
-				 <PINMUX(73, 0)>;
+			pinmux = <PINMUX(PAD_SD0_CLK, 0)>,
+				 <PINMUX(PAD_SD0_CMD, 0)>,
+				 <PINMUX(PAD_SD0_DATA0, 0)>,
+				 <PINMUX(PAD_SD0_DATA1, 0)>,
+				 <PINMUX(PAD_SD0_DATA2, 0)>,
+				 <PINMUX(PAD_SD0_DATA3, 0)>,
+				 <PINMUX(PAD_SD0_DATA4, 0)>,
+				 <PINMUX(PAD_SD0_DATA5, 0)>,
+				 <PINMUX(PAD_SD0_DATA6, 0)>,
+				 <PINMUX(PAD_SD0_DATA7, 0)>;
 			bias-pull-up;
 			drive-strength = <12>;
 			input-enable;
-- 
2.49.0


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

* Re: [PATCH] riscv: dts: starfive: jh7110-common: use macros for MMC0 pins
  2025-04-24  6:06 [PATCH] riscv: dts: starfive: jh7110-common: use macros for MMC0 pins Icenowy Zheng
@ 2025-05-02 11:24 ` E Shattow
  2025-05-15 17:42 ` Emil Renner Berthing
  2025-05-15 21:08 ` Conor Dooley
  2 siblings, 0 replies; 4+ messages in thread
From: E Shattow @ 2025-05-02 11:24 UTC (permalink / raw)
  To: Icenowy Zheng, Emil Renner Berthing, Conor Dooley
  Cc: Rob Herring, Krzysztof Kozlowski, linux-riscv, devicetree,
	linux-kernel, E Shattow

On 4/23/25 23:06, Icenowy Zheng wrote:
> The pin names of MMC0 pinmux is defined in the pinctrl dt binding header
> associated with starfive,jh7110-pinctrl .
> 
> Include the header file and use these names instead of raw numbers for
> defining MMC0 pinmux.
> 
> Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
> ---
> This is only a prettying commit. The resulting DTB files have the same
> content with or without this patch (verified by doing sha256sum on
> arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2-v1.3b.dtb).
> 
>  .../boot/dts/starfive/jh7110-common.dtsi      | 21 ++++++++++---------
>  1 file changed, 11 insertions(+), 10 deletions(-)
> 
> diff --git a/arch/riscv/boot/dts/starfive/jh7110-common.dtsi b/arch/riscv/boot/dts/starfive/jh7110-common.dtsi
> index c2f70f5e2918f..a2c72b385a905 100644
> --- a/arch/riscv/boot/dts/starfive/jh7110-common.dtsi
> +++ b/arch/riscv/boot/dts/starfive/jh7110-common.dtsi
> @@ -8,6 +8,7 @@
>  #include "jh7110.dtsi"
>  #include "jh7110-pinfunc.h"
>  #include <dt-bindings/gpio/gpio.h>
> +#include <dt-bindings/pinctrl/starfive,jh7110-pinctrl.h>
>  
>  / {
>  	aliases {
> @@ -428,16 +429,16 @@ GPOEN_ENABLE,
>  		};
>  
>  		mmc-pins {
> -			pinmux = <PINMUX(64, 0)>,
> -				 <PINMUX(65, 0)>,
> -				 <PINMUX(66, 0)>,
> -				 <PINMUX(67, 0)>,
> -				 <PINMUX(68, 0)>,
> -				 <PINMUX(69, 0)>,
> -				 <PINMUX(70, 0)>,
> -				 <PINMUX(71, 0)>,
> -				 <PINMUX(72, 0)>,
> -				 <PINMUX(73, 0)>;
> +			pinmux = <PINMUX(PAD_SD0_CLK, 0)>,
> +				 <PINMUX(PAD_SD0_CMD, 0)>,
> +				 <PINMUX(PAD_SD0_DATA0, 0)>,
> +				 <PINMUX(PAD_SD0_DATA1, 0)>,
> +				 <PINMUX(PAD_SD0_DATA2, 0)>,
> +				 <PINMUX(PAD_SD0_DATA3, 0)>,
> +				 <PINMUX(PAD_SD0_DATA4, 0)>,
> +				 <PINMUX(PAD_SD0_DATA5, 0)>,
> +				 <PINMUX(PAD_SD0_DATA6, 0)>,
> +				 <PINMUX(PAD_SD0_DATA7, 0)>;
>  			bias-pull-up;
>  			drive-strength = <12>;
>  			input-enable;

Ref:
https://lore.kernel.org/lkml/ZQ2PR01MB1307BD49C0A49DAD3AA76049E600A@ZQ2PR01MB1307.CHNPR01.prod.partner.outlook.cn/
"[PATCH] riscv: dts: starfive: jh7110-common: Use named definition for
mmc1 card detect"

Thanks for taking this. Read previous comments from Hal there is yet
some description in dts/upstream/src/riscv/starfive/jh7110-pinfunc.h
that needs to change / be improved on.



-E

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

* Re: [PATCH] riscv: dts: starfive: jh7110-common: use macros for MMC0 pins
  2025-04-24  6:06 [PATCH] riscv: dts: starfive: jh7110-common: use macros for MMC0 pins Icenowy Zheng
  2025-05-02 11:24 ` E Shattow
@ 2025-05-15 17:42 ` Emil Renner Berthing
  2025-05-15 21:08 ` Conor Dooley
  2 siblings, 0 replies; 4+ messages in thread
From: Emil Renner Berthing @ 2025-05-15 17:42 UTC (permalink / raw)
  To: Icenowy Zheng, Emil Renner Berthing, Conor Dooley
  Cc: Rob Herring, Krzysztof Kozlowski, linux-riscv, devicetree,
	linux-kernel

Icenowy Zheng wrote:
> The pin names of MMC0 pinmux is defined in the pinctrl dt binding header
> associated with starfive,jh7110-pinctrl .
>
> Include the header file and use these names instead of raw numbers for
> defining MMC0 pinmux.
>
> Signed-off-by: Icenowy Zheng <uwu@icenowy.me>

This looks good to me:
Reviewed-by: Emil Renner Berthing <emil.renner.berthing@canonical.com>

Looking at this doesn't the contents of
arch/riscv/boot/dts/starfive/jh7110-pinfunc.h also belong in
include/dt-bindings/pinctrl/starfive,jh7110-pinctrl.h
or am I missing something?

/Emil
> ---
> This is only a prettying commit. The resulting DTB files have the same
> content with or without this patch (verified by doing sha256sum on
> arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2-v1.3b.dtb).
>
>  .../boot/dts/starfive/jh7110-common.dtsi      | 21 ++++++++++---------
>  1 file changed, 11 insertions(+), 10 deletions(-)
>
> diff --git a/arch/riscv/boot/dts/starfive/jh7110-common.dtsi b/arch/riscv/boot/dts/starfive/jh7110-common.dtsi
> index c2f70f5e2918f..a2c72b385a905 100644
> --- a/arch/riscv/boot/dts/starfive/jh7110-common.dtsi
> +++ b/arch/riscv/boot/dts/starfive/jh7110-common.dtsi
> @@ -8,6 +8,7 @@
>  #include "jh7110.dtsi"
>  #include "jh7110-pinfunc.h"
>  #include <dt-bindings/gpio/gpio.h>
> +#include <dt-bindings/pinctrl/starfive,jh7110-pinctrl.h>
>
>  / {
>  	aliases {
> @@ -428,16 +429,16 @@ GPOEN_ENABLE,
>  		};
>
>  		mmc-pins {
> -			pinmux = <PINMUX(64, 0)>,
> -				 <PINMUX(65, 0)>,
> -				 <PINMUX(66, 0)>,
> -				 <PINMUX(67, 0)>,
> -				 <PINMUX(68, 0)>,
> -				 <PINMUX(69, 0)>,
> -				 <PINMUX(70, 0)>,
> -				 <PINMUX(71, 0)>,
> -				 <PINMUX(72, 0)>,
> -				 <PINMUX(73, 0)>;
> +			pinmux = <PINMUX(PAD_SD0_CLK, 0)>,
> +				 <PINMUX(PAD_SD0_CMD, 0)>,
> +				 <PINMUX(PAD_SD0_DATA0, 0)>,
> +				 <PINMUX(PAD_SD0_DATA1, 0)>,
> +				 <PINMUX(PAD_SD0_DATA2, 0)>,
> +				 <PINMUX(PAD_SD0_DATA3, 0)>,
> +				 <PINMUX(PAD_SD0_DATA4, 0)>,
> +				 <PINMUX(PAD_SD0_DATA5, 0)>,
> +				 <PINMUX(PAD_SD0_DATA6, 0)>,
> +				 <PINMUX(PAD_SD0_DATA7, 0)>;
>  			bias-pull-up;
>  			drive-strength = <12>;
>  			input-enable;
> --
> 2.49.0
>

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

* Re: [PATCH] riscv: dts: starfive: jh7110-common: use macros for MMC0 pins
  2025-04-24  6:06 [PATCH] riscv: dts: starfive: jh7110-common: use macros for MMC0 pins Icenowy Zheng
  2025-05-02 11:24 ` E Shattow
  2025-05-15 17:42 ` Emil Renner Berthing
@ 2025-05-15 21:08 ` Conor Dooley
  2 siblings, 0 replies; 4+ messages in thread
From: Conor Dooley @ 2025-05-15 21:08 UTC (permalink / raw)
  To: Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti,
	E Shattow, Emil Renner Berthing, Conor Dooley, Icenowy Zheng
  Cc: Conor Dooley, linux-kernel, devicetree, linux-riscv, Rob Herring,
	Krzysztof Kozlowski

From: Conor Dooley <conor.dooley@microchip.com>

On Thu, 24 Apr 2025 14:06:05 +0800, Icenowy Zheng wrote:
> The pin names of MMC0 pinmux is defined in the pinctrl dt binding header
> associated with starfive,jh7110-pinctrl .
> 
> Include the header file and use these names instead of raw numbers for
> defining MMC0 pinmux.
> 
> 
> [...]

Applied to riscv-dt-for-next, thanks!

[1/1] riscv: dts: starfive: jh7110-common: use macros for MMC0 pins
      https://git.kernel.org/conor/c/71385a893cea

Thanks,
Conor.

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

end of thread, other threads:[~2025-05-15 21:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-24  6:06 [PATCH] riscv: dts: starfive: jh7110-common: use macros for MMC0 pins Icenowy Zheng
2025-05-02 11:24 ` E Shattow
2025-05-15 17:42 ` Emil Renner Berthing
2025-05-15 21:08 ` Conor Dooley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).