* [PATCH 0/2] arm64: dts: add mmc aliases for Exynos devicse
@ 2023-02-03 20:39 Henrik Grimler
2023-02-03 20:39 ` [PATCH 1/2] arm64: dts: exynos: drop mshc aliases Henrik Grimler
2023-02-03 20:40 ` [PATCH 2/2] arm64: dts: exynos: add mmc aliases Henrik Grimler
0 siblings, 2 replies; 6+ messages in thread
From: Henrik Grimler @ 2023-02-03 20:39 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 remove mshc aliases, as they should not be needed after [1].
This is the same patchset for exynos arm devices was sent recently
[2].
[1] https://lkml.kernel.org/lkml/20211124184603.3897245-1-john@metanate.com
[2] https://lore.kernel.org/all/20230128133151.29471-1-henrik@grimler.se
Henrik Grimler (2):
arm64: dts: exynos: drop mshc aliases
arm64: dts: exynos: add mmc aliases
arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi | 4 ++--
arch/arm64/boot/dts/exynos/exynos7-espresso.dts | 4 ++--
arch/arm64/boot/dts/exynos/exynos7885-jackpotlte.dts | 1 +
3 files changed, 5 insertions(+), 4 deletions(-)
base-commit: 28dd277e54ebb499bc59c166078596767bbbbdd7
--
2.39.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/2] arm64: dts: exynos: drop mshc aliases
2023-02-03 20:39 [PATCH 0/2] arm64: dts: add mmc aliases for Exynos devicse Henrik Grimler
@ 2023-02-03 20:39 ` Henrik Grimler
2023-02-04 11:43 ` David Virag
2023-02-03 20:40 ` [PATCH 2/2] arm64: dts: exynos: add mmc aliases Henrik Grimler
1 sibling, 1 reply; 6+ messages in thread
From: Henrik Grimler @ 2023-02-03 20:39 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
They are no longer needed after commit a13e8ef6008d ("mmc: dw_mmc:
exynos: use common_caps").
Signed-off-by: Henrik Grimler <henrik@grimler.se>
---
arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi | 2 --
arch/arm64/boot/dts/exynos/exynos7-espresso.dts | 2 --
2 files changed, 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..c895b70b3cec 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 {
diff --git a/arch/arm64/boot/dts/exynos/exynos7-espresso.dts b/arch/arm64/boot/dts/exynos/exynos7-espresso.dts
index f3f4a6ab4b49..686f0923a4a7 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 {
--
2.39.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/2] arm64: dts: exynos: add mmc aliases
2023-02-03 20:39 [PATCH 0/2] arm64: dts: add mmc aliases for Exynos devicse Henrik Grimler
2023-02-03 20:39 ` [PATCH 1/2] arm64: dts: exynos: drop mshc aliases Henrik Grimler
@ 2023-02-03 20:40 ` Henrik Grimler
1 sibling, 0 replies; 6+ messages in thread
From: Henrik Grimler @ 2023-02-03 20:40 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, SD card and WiFi where applicable, so that
assigned mmcblk numbers are always the same.
Signed-off-by: Henrik Grimler <henrik@grimler.se>
---
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 c895b70b3cec..b7113ad4b3a9 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 686f0923a4a7..d433131cc902 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.39.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] arm64: dts: exynos: drop mshc aliases
2023-02-03 20:39 ` [PATCH 1/2] arm64: dts: exynos: drop mshc aliases Henrik Grimler
@ 2023-02-04 11:43 ` David Virag
2023-02-04 12:45 ` David Virag
0 siblings, 1 reply; 6+ messages in thread
From: David Virag @ 2023-02-04 11:43 UTC (permalink / raw)
To: Henrik Grimler, robh+dt, krzysztof.kozlowski+dt, alim.akhtar,
m.szyprowski, devicetree, linux-arm-kernel, linux-samsung-soc,
linux-kernel, phone-devel, ~postmarketos/upstreaming
On Fri, 2023-02-03 at 21:39 +0100, Henrik Grimler wrote:
> They are no longer needed after commit a13e8ef6008d ("mmc: dw_mmc:
> exynos: use common_caps").
>
> Signed-off-by: Henrik Grimler <henrik@grimler.se>
> ---
> arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi | 2 --
> arch/arm64/boot/dts/exynos/exynos7-espresso.dts | 2 --
> 2 files changed, 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..c895b70b3cec 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 {
> diff --git a/arch/arm64/boot/dts/exynos/exynos7-espresso.dts
> b/arch/arm64/boot/dts/exynos/exynos7-espresso.dts
> index f3f4a6ab4b49..686f0923a4a7 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 {
In dw_mmc-exynos.c, there's a caps array specified like this:
/* Common capabilities of Exynos4/Exynos5 SoC */
static unsigned long exynos_dwmmc_caps[4] = {
MMC_CAP_1_8V_DDR | MMC_CAP_8_BIT_DATA,
0,
0,
0,
};
As I understand these capabilities are added to the mmc controllers
based on mshc alias id. Shouldn't these capabilities be moved to
device-tree before removing these aliases? This also applies to the
32bit arm patch. If I understand correctly, removing these aliases
without adding the capabilities to dt removes the capability
"MMC_CAP_1_8V_DDR" and "MMC_CAP_8_BIT_DATA" from mshc_0/mmc_0.
Best regards,
David
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] arm64: dts: exynos: drop mshc aliases
2023-02-04 11:43 ` David Virag
@ 2023-02-04 12:45 ` David Virag
2023-02-04 16:27 ` Henrik Grimler
0 siblings, 1 reply; 6+ messages in thread
From: David Virag @ 2023-02-04 12:45 UTC (permalink / raw)
To: Henrik Grimler, robh+dt, krzysztof.kozlowski+dt, alim.akhtar,
m.szyprowski, devicetree, linux-arm-kernel, linux-samsung-soc,
linux-kernel, phone-devel, ~postmarketos/upstreaming
On Sat, 2023-02-04 at 12:43 +0100, David Virag wrote:
> On Fri, 2023-02-03 at 21:39 +0100, Henrik Grimler wrote:
> > They are no longer needed after commit a13e8ef6008d ("mmc: dw_mmc:
> > exynos: use common_caps").
> >
> > Signed-off-by: Henrik Grimler <henrik@grimler.se>
> > ---
> > arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi | 2 --
> > arch/arm64/boot/dts/exynos/exynos7-espresso.dts | 2 --
> > 2 files changed, 4 deletions(-)
[...]
> In dw_mmc-exynos.c, there's a caps array specified like this:
>
> /* Common capabilities of Exynos4/Exynos5 SoC */
> static unsigned long exynos_dwmmc_caps[4] = {
> MMC_CAP_1_8V_DDR | MMC_CAP_8_BIT_DATA,
> 0,
> 0,
> 0,
> };
>
> As I understand these capabilities are added to the mmc controllers
> based on mshc alias id. Shouldn't these capabilities be moved to
> device-tree before removing these aliases? This also applies to the
> 32bit arm patch. If I understand correctly, removing these aliases
> without adding the capabilities to dt removes the capability
> "MMC_CAP_1_8V_DDR" and "MMC_CAP_8_BIT_DATA" from mshc_0/mmc_0.
Actually, it defaults to 0, so these capabilities will be added to all
mmc nodes, not just those with mshc0 alias. That may cause problems.
Best regards,
David
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] arm64: dts: exynos: drop mshc aliases
2023-02-04 12:45 ` David Virag
@ 2023-02-04 16:27 ` Henrik Grimler
0 siblings, 0 replies; 6+ messages in thread
From: Henrik Grimler @ 2023-02-04 16:27 UTC (permalink / raw)
To: David Virag
Cc: robh+dt, krzysztof.kozlowski+dt, alim.akhtar, m.szyprowski,
devicetree, linux-arm-kernel, linux-samsung-soc, linux-kernel,
phone-devel, ~postmarketos/upstreaming
Hi David,
On Sat, Feb 04, 2023 at 01:45:15PM +0100, David Virag wrote:
> On Sat, 2023-02-04 at 12:43 +0100, David Virag wrote:
> > On Fri, 2023-02-03 at 21:39 +0100, Henrik Grimler wrote:
> > > They are no longer needed after commit a13e8ef6008d ("mmc: dw_mmc:
> > > exynos: use common_caps").
> > >
> > > Signed-off-by: Henrik Grimler <henrik@grimler.se>
> > > ---
> > > arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi | 2 --
> > > arch/arm64/boot/dts/exynos/exynos7-espresso.dts | 2 --
> > > 2 files changed, 4 deletions(-)
> [...]
> > In dw_mmc-exynos.c, there's a caps array specified like this:
> >
> > /* Common capabilities of Exynos4/Exynos5 SoC */
> > static unsigned long exynos_dwmmc_caps[4] = {
> > MMC_CAP_1_8V_DDR | MMC_CAP_8_BIT_DATA,
> > 0,
> > 0,
> > 0,
> > };
> >
> > As I understand these capabilities are added to the mmc controllers
> > based on mshc alias id. Shouldn't these capabilities be moved to
> > device-tree before removing these aliases? This also applies to the
> > 32bit arm patch. If I understand correctly, removing these aliases
> > without adding the capabilities to dt removes the capability
> > "MMC_CAP_1_8V_DDR" and "MMC_CAP_8_BIT_DATA" from mshc_0/mmc_0.
Thanks for pointing this out (I should have seen it already), will
send a new version to update device trees and remove the need for
those mshc alias based capabilities.
> Actually, it defaults to 0, so these capabilities will be added to all
> mmc nodes, not just those with mshc0 alias. That may cause problems.
I think I see what you mean: ctrl_id will be set to 0 if mshc alias is
missing, and then caps is set as
mmc->caps |= drv_data->caps[ctrl_id];
where
drv_data->caps[0] = MMC_CAP_1_8V_DDR | MMC_CAP_8_BIT_DATA
Should be fixed in next version of patchset then in any case, maybe it
deserves a "Fixes:" tag as well, will have a look in git history if
there is a particular commit that introduced this situation.
> Best regards,
> David
Best regards,
Henrik Grimler
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-02-04 16:27 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-03 20:39 [PATCH 0/2] arm64: dts: add mmc aliases for Exynos devicse Henrik Grimler
2023-02-03 20:39 ` [PATCH 1/2] arm64: dts: exynos: drop mshc aliases Henrik Grimler
2023-02-04 11:43 ` David Virag
2023-02-04 12:45 ` David Virag
2023-02-04 16:27 ` Henrik Grimler
2023-02-03 20:40 ` [PATCH 2/2] arm64: dts: exynos: add mmc aliases Henrik Grimler
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).