linux-samsung-soc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] arm64: dts: add mmc aliases for Exynos devices
@ 2023-03-15 21:28 Henrik Grimler
  2023-03-15 21:28 ` [PATCH v2 1/2] arm64: dts: exynos: drop mshc aliases Henrik Grimler
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Henrik Grimler @ 2023-03-15 21:28 UTC (permalink / raw)
  To: robh+dt, krzysztof.kozlowski+dt, alim.akhtar, m.szyprowski,
	virag.david003, devicetree, linux-arm-kernel, linux-samsung-soc,
	linux-kernel, phone-devel, ~postmarketos/upstreaming
  Cc: Henrik Grimler

It is convenient to have fixed mmcblk numbering of the eMMC and sdcard
so that assigned numbers will not change from boot-to-boot or
depending on if storage devices are actually attached or not.

Also drop mshc aliases while we are at it and instead add mmc
capabilities to the individual device trees (right now they are added
depending on alias index).

---

Changes since v1:
* Set mmc-ddr-1_8v in device trees so that MMC_CAP_1_8V_DDR is set
  also after removal of mshc0 alias.  Issue was pointed out by
  Krzysztof and David.


Henrik Grimler (2):
  arm64: dts: exynos: drop mshc aliases
  arm64: dts: exynos: add mmc aliases

 arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi | 5 +++--
 arch/arm64/boot/dts/exynos/exynos7-espresso.dts       | 5 +++--
 arch/arm64/boot/dts/exynos/exynos7885-jackpotlte.dts  | 1 +
 3 files changed, 7 insertions(+), 4 deletions(-)


base-commit: 35ade1eb465438cfd16fdc3a4905dd82f658fdce
-- 
2.30.2


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

* [PATCH v2 1/2] arm64: dts: exynos: drop mshc aliases
  2023-03-15 21:28 [PATCH v2 0/2] arm64: dts: add mmc aliases for Exynos devices Henrik Grimler
@ 2023-03-15 21:28 ` Henrik Grimler
  2023-03-16 10:32   ` Marek Szyprowski
  2023-03-15 21:28 ` [PATCH v2 2/2] arm64: dts: exynos: add mmc aliases Henrik Grimler
  2023-03-17 12:45 ` [PATCH v2 0/2] arm64: dts: add mmc aliases for Exynos devices Krzysztof Kozlowski
  2 siblings, 1 reply; 6+ messages in thread
From: Henrik Grimler @ 2023-03-15 21:28 UTC (permalink / raw)
  To: robh+dt, krzysztof.kozlowski+dt, alim.akhtar, m.szyprowski,
	virag.david003, devicetree, linux-arm-kernel, linux-samsung-soc,
	linux-kernel, phone-devel, ~postmarketos/upstreaming
  Cc: Henrik Grimler

Previously, the mshc0 alias has been necessary so that
MMC_CAP_1_8V_DDR | MMC_CAP_8_BIT_DATA are set for mshc_0/mmc_0.
However, these capabilities should be described in the device tree so
that we do not have to rely on the alias.

The property mmc-ddr-1_8v replaces MMC_CAP_1_8V_DDR, while bus_width =
<8>, which is already set for all the mshc0/mmc0 nodes, replaces
MMC_CAP_8_BIT_DATA.

Also drop other mshc aliases as they are not needed.

Signed-off-by: Henrik Grimler <henrik@grimler.se>
---

Changes since v1:
* Add mmc-ddr-1_8v property so that capabilities stays the same
  when mshc0 alias is removed

 arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi | 3 +--
 arch/arm64/boot/dts/exynos/exynos7-espresso.dts       | 3 +--
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi b/arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi
index f54f30633417..868f7b98a637 100644
--- a/arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi
+++ b/arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi
@@ -40,8 +40,6 @@ aliases {
 		spi2 = &spi_2;
 		spi3 = &spi_3;
 		spi4 = &spi_4;
-		mshc0 = &mshc_0;
-		mshc2 = &mshc_2;
 	};
 
 	chosen {
@@ -952,6 +950,7 @@ &i2s1 {
 
 &mshc_0 {
 	status = "okay";
+	mmc-ddr-1_8v;
 	mmc-hs200-1_8v;
 	mmc-hs400-1_8v;
 	cap-mmc-highspeed;
diff --git a/arch/arm64/boot/dts/exynos/exynos7-espresso.dts b/arch/arm64/boot/dts/exynos/exynos7-espresso.dts
index f3f4a6ab4b49..35d949099166 100644
--- a/arch/arm64/boot/dts/exynos/exynos7-espresso.dts
+++ b/arch/arm64/boot/dts/exynos/exynos7-espresso.dts
@@ -18,8 +18,6 @@ / {
 
 	aliases {
 		serial0 = &serial_2;
-		mshc0 = &mmc_0;
-		mshc2 = &mmc_2;
 	};
 
 	chosen {
@@ -362,6 +360,7 @@ pmic_irq: pmic-irq-pins {
 &mmc_0 {
 	status = "okay";
 	cap-mmc-highspeed;
+	mmc-ddr-1_8v;
 	mmc-hs200-1_8v;
 	non-removable;
 	card-detect-delay = <200>;
-- 
2.30.2


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

* [PATCH v2 2/2] arm64: dts: exynos: add mmc aliases
  2023-03-15 21:28 [PATCH v2 0/2] arm64: dts: add mmc aliases for Exynos devices Henrik Grimler
  2023-03-15 21:28 ` [PATCH v2 1/2] arm64: dts: exynos: drop mshc aliases Henrik Grimler
@ 2023-03-15 21:28 ` Henrik Grimler
  2023-03-16 10:32   ` Marek Szyprowski
  2023-03-17 12:45 ` [PATCH v2 0/2] arm64: dts: add mmc aliases for Exynos devices Krzysztof Kozlowski
  2 siblings, 1 reply; 6+ messages in thread
From: Henrik Grimler @ 2023-03-15 21:28 UTC (permalink / raw)
  To: robh+dt, krzysztof.kozlowski+dt, alim.akhtar, m.szyprowski,
	virag.david003, devicetree, linux-arm-kernel, linux-samsung-soc,
	linux-kernel, phone-devel, ~postmarketos/upstreaming
  Cc: Henrik Grimler

Add aliases for eMMC and SD card where applicable, so that
assigned mmc indeces are always the same.

Signed-off-by: Henrik Grimler <henrik@grimler.se>
---

Changes since v1:
* None

 arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi | 2 ++
 arch/arm64/boot/dts/exynos/exynos7-espresso.dts       | 2 ++
 arch/arm64/boot/dts/exynos/exynos7885-jackpotlte.dts  | 1 +
 3 files changed, 5 insertions(+)

diff --git a/arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi b/arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi
index 868f7b98a637..e4ed788413fe 100644
--- a/arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi
+++ b/arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi
@@ -21,6 +21,8 @@ aliases {
 		gsc0 = &gsc_0;
 		gsc1 = &gsc_1;
 		gsc2 = &gsc_2;
+		mmc0 = &mshc_0;
+		mmc2 = &mshc_2;
 		pinctrl0 = &pinctrl_alive;
 		pinctrl1 = &pinctrl_aud;
 		pinctrl2 = &pinctrl_cpif;
diff --git a/arch/arm64/boot/dts/exynos/exynos7-espresso.dts b/arch/arm64/boot/dts/exynos/exynos7-espresso.dts
index 35d949099166..1f2eddcebdd9 100644
--- a/arch/arm64/boot/dts/exynos/exynos7-espresso.dts
+++ b/arch/arm64/boot/dts/exynos/exynos7-espresso.dts
@@ -17,6 +17,8 @@ / {
 	compatible = "samsung,exynos7-espresso", "samsung,exynos7";
 
 	aliases {
+		mmc0 = &mmc_0;
+		mmc2 = &mmc_2;
 		serial0 = &serial_2;
 	};
 
diff --git a/arch/arm64/boot/dts/exynos/exynos7885-jackpotlte.dts b/arch/arm64/boot/dts/exynos/exynos7885-jackpotlte.dts
index 5db9a81ac7bb..47a389d9ff7d 100644
--- a/arch/arm64/boot/dts/exynos/exynos7885-jackpotlte.dts
+++ b/arch/arm64/boot/dts/exynos/exynos7885-jackpotlte.dts
@@ -18,6 +18,7 @@ / {
 	chassis-type = "handset";
 
 	aliases {
+		mmc0 = &mmc_0;
 		serial0 = &serial_0;
 		serial1 = &serial_1;
 		serial2 = &serial_2;
-- 
2.30.2


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

* Re: [PATCH v2 1/2] arm64: dts: exynos: drop mshc aliases
  2023-03-15 21:28 ` [PATCH v2 1/2] arm64: dts: exynos: drop mshc aliases Henrik Grimler
@ 2023-03-16 10:32   ` Marek Szyprowski
  0 siblings, 0 replies; 6+ messages in thread
From: Marek Szyprowski @ 2023-03-16 10:32 UTC (permalink / raw)
  To: Henrik Grimler, robh+dt, krzysztof.kozlowski+dt, alim.akhtar,
	virag.david003, devicetree, linux-arm-kernel, linux-samsung-soc,
	linux-kernel, phone-devel, ~postmarketos/upstreaming

On 15.03.2023 22:28, Henrik Grimler wrote:
> Previously, the mshc0 alias has been necessary so that
> MMC_CAP_1_8V_DDR | MMC_CAP_8_BIT_DATA are set for mshc_0/mmc_0.
> However, these capabilities should be described in the device tree so
> that we do not have to rely on the alias.
>
> The property mmc-ddr-1_8v replaces MMC_CAP_1_8V_DDR, while bus_width =
> <8>, which is already set for all the mshc0/mmc0 nodes, replaces
> MMC_CAP_8_BIT_DATA.
>
> Also drop other mshc aliases as they are not needed.
>
> Signed-off-by: Henrik Grimler <henrik@grimler.se>

Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>

 > ...


Best regards
-- 
Marek Szyprowski, PhD
Samsung R&D Institute Poland


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

* Re: [PATCH v2 2/2] arm64: dts: exynos: add mmc aliases
  2023-03-15 21:28 ` [PATCH v2 2/2] arm64: dts: exynos: add mmc aliases Henrik Grimler
@ 2023-03-16 10:32   ` Marek Szyprowski
  0 siblings, 0 replies; 6+ messages in thread
From: Marek Szyprowski @ 2023-03-16 10:32 UTC (permalink / raw)
  To: Henrik Grimler, robh+dt, krzysztof.kozlowski+dt, alim.akhtar,
	virag.david003, devicetree, linux-arm-kernel, linux-samsung-soc,
	linux-kernel, phone-devel, ~postmarketos/upstreaming

On 15.03.2023 22:28, Henrik Grimler wrote:
> Add aliases for eMMC and SD card where applicable, so that
> assigned mmc indeces are always the same.
>
> Signed-off-by: Henrik Grimler <henrik@grimler.se>

Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>

 > ...

Best regards
-- 
Marek Szyprowski, PhD
Samsung R&D Institute Poland


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

* Re: [PATCH v2 0/2] arm64: dts: add mmc aliases for Exynos devices
  2023-03-15 21:28 [PATCH v2 0/2] arm64: dts: add mmc aliases for Exynos devices Henrik Grimler
  2023-03-15 21:28 ` [PATCH v2 1/2] arm64: dts: exynos: drop mshc aliases Henrik Grimler
  2023-03-15 21:28 ` [PATCH v2 2/2] arm64: dts: exynos: add mmc aliases Henrik Grimler
@ 2023-03-17 12:45 ` Krzysztof Kozlowski
  2 siblings, 0 replies; 6+ messages in thread
From: Krzysztof Kozlowski @ 2023-03-17 12:45 UTC (permalink / raw)
  To: virag.david003, devicetree, linux-kernel, linux-samsung-soc,
	phone-devel, robh+dt, ~postmarketos/upstreaming, m.szyprowski,
	Henrik Grimler, alim.akhtar, krzysztof.kozlowski+dt,
	linux-arm-kernel
  Cc: Krzysztof Kozlowski

On Wed, 15 Mar 2023 22:28:12 +0100, Henrik Grimler wrote:
> It is convenient to have fixed mmcblk numbering of the eMMC and sdcard
> so that assigned numbers will not change from boot-to-boot or
> depending on if storage devices are actually attached or not.
> 
> Also drop mshc aliases while we are at it and instead add mmc
> capabilities to the individual device trees (right now they are added
> depending on alias index).
> 
> [...]

Applied, thanks!

[1/2] arm64: dts: exynos: drop mshc aliases
      https://git.kernel.org/krzk/linux/c/c04d7b263d3ff036ca124494c57011c1c274dbe6
[2/2] arm64: dts: exynos: add mmc aliases
      https://git.kernel.org/krzk/linux/c/5f67124757464d632f0e5288e0ba48e3ff5531a9

Best regards,
-- 
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

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

end of thread, other threads:[~2023-03-17 12:45 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-15 21:28 [PATCH v2 0/2] arm64: dts: add mmc aliases for Exynos devices Henrik Grimler
2023-03-15 21:28 ` [PATCH v2 1/2] arm64: dts: exynos: drop mshc aliases Henrik Grimler
2023-03-16 10:32   ` Marek Szyprowski
2023-03-15 21:28 ` [PATCH v2 2/2] arm64: dts: exynos: add mmc aliases Henrik Grimler
2023-03-16 10:32   ` Marek Szyprowski
2023-03-17 12:45 ` [PATCH v2 0/2] arm64: dts: add mmc aliases for Exynos devices Krzysztof Kozlowski

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).