2023-03-15 21:28:48

by Henrik Grimler

[permalink] [raw]
Subject: [PATCH v2 0/2] arm64: dts: add mmc aliases for Exynos devices

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



2023-03-15 21:28:53

by Henrik Grimler

[permalink] [raw]
Subject: [PATCH v2 2/2] arm64: dts: exynos: add mmc aliases

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

Signed-off-by: Henrik Grimler <[email protected]>
---

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


2023-03-15 21:28:57

by Henrik Grimler

[permalink] [raw]
Subject: [PATCH v2 1/2] arm64: dts: exynos: drop mshc aliases

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 <[email protected]>
---

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


2023-03-16 10:32:49

by Marek Szyprowski

[permalink] [raw]
Subject: Re: [PATCH v2 1/2] arm64: dts: exynos: drop mshc aliases

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 <[email protected]>

Tested-by: Marek Szyprowski <[email protected]>

> ...


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


2023-03-16 10:32:52

by Marek Szyprowski

[permalink] [raw]
Subject: Re: [PATCH v2 2/2] arm64: dts: exynos: add mmc aliases

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 <[email protected]>

Tested-by: Marek Szyprowski <[email protected]>

> ...

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


2023-03-17 12:45:45

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH v2 0/2] arm64: dts: add mmc aliases for Exynos devices

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 <[email protected]>