Add SDHCI support for APM X-Gene SoC using ARASAN SDHCI controller.
Subsystems (3)
v2 cover Add SDHCI support for APM X-Gene SoC using ARASAN SDHCI controller.
This patch adds the SDHCI support for APM X-Gene SoC using ARASAN SDHCI controller.
v1 change:
* Use the CONFIG_ARM64_DMA_HAS_IOMMU for dma-mapping.
v2 change:
* Drop the IOMMU support and switching to PIO mode for arasan controller integrated inside APM X-Gene SoC.
Suman Tripathi (2):
arm64: dts: Add the arasan sdhc nodes in apm-storm.dtsi.
mmc: host: Add some quirks to be read from fdt in sdhci-pltm.c
arch/arm64/boot/dts/apm-storm.dtsi | 44 ++++++++++++++++++++++++++++++++++++++ drivers/mmc/host/sdhci-pltfm.c | 15 +++++++++++++ 2 files changed, 59 insertions(+)
Signature · 1 line
1.8.2.1
PATCH v2 1/2 arm64: dts: Add the arasan sdhc nodes in apm-storm.dtsi.
This patch adds the arasan sdhc nodes to reuse the of-arasan driver for APM X-Gene SoC.
--- arch/arm64/boot/dts/apm-storm.dtsi | 44 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+)
arch/arm64/boot/dts/apm-storm.dtsi +44 -0
@@ -144,6 +144,40 @@ clock-output-names = "socplldiv2"; }; + ahbclk: ahbclk@1f2ac000 { + compatible = "apm,xgene-device-clock"; + #clock-cells = <1>; + clocks = <&socplldiv2 0>; + reg = <0x0 0x1f2ac000 0x0 0x1000 + 0x0 0x17000000 0x0 0x2000>; + reg-names = "csr-reg", "div-reg"; + csr-offset = <0x0>; + csr-mask = <0x1>; + enable-offset = <0x8>; + enable-mask = <0x1>; + divider-offset = <0x164>; + divider-width = <0x5>; + divider-shift = <0x0>; + clock-output-names = "ahbclk"; + }; + + sdioclk: sdioclk@1f2ac000 { + compatible = "apm,xgene-device-clock"; + #clock-cells = <1>; + clocks = <&socplldiv2 0>; + reg = <0x0 0x1f2ac000 0x0 0x1000 + 0x0 0x17000000 0x0 0x2000>; + reg-names = "csr-reg", "div-reg"; + csr-offset = <0x0>; + csr-mask = <0x2>; + enable-offset = <0x8>; + enable-mask = <0x2>; + divider-offset = <0x178>; + divider-width = <0x8>; + divider-shift = <0x0>; + clock-output-names = "sdioclk"; + }; + qmlclk: qmlclk { compatible = "apm,xgene-device-clock"; #clock-cells = <1>;
@@ -282,6 +316,16 @@ interrupts = <0x0 0x4c 0x4>; }; + sdhc0: sdhc@1c000000 { + device_type = "sdhc"; + compatible = "arasan,sdhci-8.9a"; + reg = <0x0 0x1c000000 0x0 0x100>; + interrupts = <0x0 0x49 0x4>; + dma-coherent; + clock-names = "clk_xin", "clk_ahb"; + clocks = <&sdioclk 0>, <&ahbclk 0>; + }; + phy1: phy@1f21a000 { compatible = "apm,xgene-phy"; reg = <0x0 0x1f21a000 0x0 0x100>;
Signature · 1 line
1.8.2.1
PATCH v2 2/2 mmc: host: Add some quirks to be read from fdt in sdhci-pltm.c
In reply to Suman TripathiThis patch adds some quirks support to be read from fdt.
--- drivers/mmc/host/sdhci-pltfm.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+)
drivers/mmc/host/sdhci-pltfm.c +15 -0
@@ -85,6 +85,21 @@ void sdhci_get_of_property(struct platform_device *pdev)if (of_get_property (np,"broken-cd" ,NULL )) host->quirks |=SDHCI_QUIRK_BROKEN_CARD_DETECTION ; + +if (of_get_property (np,"delay-after-power" ,NULL )) + host->quirks |=SDHCI_QUIRK_DELAY_AFTER_POWER ; + +if (of_get_property (np,"no-hispd" ,NULL )) + host->quirks |=SDHCI_QUIRK_NO_HISPD_BIT ; + +if (of_get_property (np,"broken-adma" ,NULL )) + host->quirks |=SDHCI_QUIRK_BROKEN_ADMA ; + +if (of_get_property (np,"broken-dma" ,NULL )) + host->quirks |=SDHCI_QUIRK_BROKEN_DMA ; + +if (of_get_property (np,"no-cmd23" ,NULL )) + host->quirks2 |=SDHCI_QUIRK2_HOST_NO_CMD23 ;if (of_get_property (np,"no-1-8-v" ,NULL )) host->quirks2 |=SDHCI_QUIRK2_NO_1_8_V ;
Signature · 1 line
1.8.2.1
PATCH v2 2/2 mmc: host: Add some quirks to be read from fdt in sdhci-pltm.c
Quoted 20 lines · Suman Tripathi
This patch adds some quirks support to be read from fdt.
Signed-off-by Suman Tripathi <[email protected]>--- drivers/mmc/host/sdhci-pltfm.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+)drivers/mmc/host/sdhci-pltfm.c +5
-0@@ -85,6 +85,21 @@ void sdhci_get_of_property(struct platform_device *pdev)if (of_get_property (np,"broken-cd" ,NULL )) host->quirks |=SDHCI_QUIRK_BROKEN_CARD_DETECTION ; + +if (of_get_property (np,"delay-after-power" ,NULL )) + host->quirks |=SDHCI_QUIRK_DELAY_AFTER_POWER ; + +if (of_get_property (np,"no-hispd" ,NULL ))
drivers/mmc/host/sdhci-pltfm.c void sdhci_get_of_property(struct platform_device *pdev) · line 102
Quoted 10 lines
drivers/mmc/host/sdhci-pltfm.c +10
-0+ host->quirks |=SDHCI_QUIRK_NO_HISPD_BIT ; + +if (of_get_property (np,"broken-adma" ,NULL )) + host->quirks |=SDHCI_QUIRK_BROKEN_ADMA ; + +if (of_get_property (np,"broken-dma" ,NULL )) + host->quirks |=SDHCI_QUIRK_BROKEN_DMA ; + +if (of_get_property (np,"no-cmd23" ,NULL )) + host->quirks2 |=SDHCI_QUIRK2_HOST_NO_CMD23 ;
Can't at least some of these be distinguished from what sdhci variant that is being used? Instead of having them in DT...
Kind regards
Uffe
Quoted 10 lines
drivers/mmc/host/sdhci-pltfm.c +0
-1if (of_get_property (np,"no-1-8-v" ,NULL )) host->quirks2 |=SDHCI_QUIRK2_NO_1_8_V ; --1.8.2.1
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v2 2/2] mmc: host: Add some quirks to be read from fdt in sdhci-pltm.c
Review
Quoted 8 lines · Suman Tripathi
This patch adds some quirks support to be read from fdt.
Signed-off-by Suman Tripathi <[email protected]>--- drivers/mmc/host/sdhci-pltfm.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+)(quoted diff) +0
-0
b/drivers/mmc/host/sdhci-pltfm.c
drivers/mmc/host/sdhci-pltfm.c void sdhci_get_of_property(struct platform_device
Quoted 4 lines
index bef250e..9f6a4b9 100644
drivers/mmc/host/sdhci-pltfm.c +0
-0@@ -85,6 +85,21 @@ void sdhci_get_of_property(struct platform_device
*pdev)
Quoted 8 lines
drivers/mmc/host/sdhci-pltfm.c +5
-0if (of_get_property (np,"broken-cd" ,NULL )) host->quirks |=SDHCI_QUIRK_BROKEN_CARD_DETECTION ; + +if (of_get_property (np,"delay-after-power" ,NULL )) + host->quirks |=SDHCI_QUIRK_DELAY_AFTER_POWER ; + +if (of_get_property (np,"no-hispd" ,NULL ))
drivers/mmc/host/sdhci-pltfm.c void sdhci_get_of_property(struct platform_device *pdev) · line 102
Quoted 10 lines
drivers/mmc/host/sdhci-pltfm.c +10
-0+ host->quirks |=SDHCI_QUIRK_NO_HISPD_BIT ; + +if (of_get_property (np,"broken-adma" ,NULL )) + host->quirks |=SDHCI_QUIRK_BROKEN_ADMA ; + +if (of_get_property (np,"broken-dma" ,NULL )) + host->quirks |=SDHCI_QUIRK_BROKEN_DMA ; + +if (of_get_property (np,"no-cmd23" ,NULL )) + host->quirks2 |=SDHCI_QUIRK2_HOST_NO_CMD23 ;
Can't at least some of these be distinguished from what sdhci variant that is being used? Instead of having them in DT...
We are using arasan controller in our SOC. So reusing a the existing sdhci-of-arasan driver. Due to H/W issues we require this quirks. So for us only option left to pass the info is DTS or ACPI table.
Kind regards
Uffe
Quoted 52 lines · Ulf Hansson
Review
Quoted 8 lines · Suman Tripathi
This patch adds some quirks support to be read from fdt.
Signed-off-by Suman Tripathi <[email protected]>--- drivers/mmc/host/sdhci-pltfm.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+)(quoted diff) +0
-0
b/drivers/mmc/host/sdhci-pltfm.cdrivers/mmc/host/sdhci-pltfm.c void sdhci_get_of_property(struct platform_device
Quoted 4 lines
index bef250e..9f6a4b9 100644
drivers/mmc/host/sdhci-pltfm.c +0
-0@@ -85,6 +85,21 @@ void sdhci_get_of_property(struct platform_device*pdev)
drivers/mmc/host/sdhci-pltfm.c void sdhci_get_of_property(struct platform_device · line 86
Quoted 3 lines
drivers/mmc/host/sdhci-pltfm.c +0
-0if (of_get_property (np,"broken-cd" ,NULL )) host->quirks |=
SDHCI_QUIRK_BROKEN_CARD_DETECTION;Quoted 5 lines
drivers/mmc/host/sdhci-pltfm.c +5
-0+ +if (of_get_property (np,"delay-after-power" ,NULL )) + host->quirks |=SDHCI_QUIRK_DELAY_AFTER_POWER ; + +if (of_get_property (np,"no-hispd" ,NULL ))drivers/mmc/host/sdhci-pltfm.c void sdhci_get_of_property(struct platform_device *pdev) · line 102
Quoted 10 lines
drivers/mmc/host/sdhci-pltfm.c +10
-0+ host->quirks |=SDHCI_QUIRK_NO_HISPD_BIT ; + +if (of_get_property (np,"broken-adma" ,NULL )) + host->quirks |=SDHCI_QUIRK_BROKEN_ADMA ; + +if (of_get_property (np,"broken-dma" ,NULL )) + host->quirks |=SDHCI_QUIRK_BROKEN_DMA ; + +if (of_get_property (np,"no-cmd23" ,NULL )) + host->quirks2 |=SDHCI_QUIRK2_HOST_NO_CMD23 ;Can't at least some of these be distinguished from what sdhci variant that is being used? Instead of having them in DT...
Kind regards
UffeQuoted 10 lines
drivers/mmc/host/sdhci-pltfm.c +0
-1if (of_get_property (np,"no-1-8-v" ,NULL )) host->quirks2 |=SDHCI_QUIRK2_NO_1_8_V ; --1.8.2.1
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Signature · 3 lines
Thanks, with regards, Suman Tripathi
_______________________________________________
Linuxppc-dev mailing list
[email protected]
https://lists.ozlabs.org/listinfo/linuxppc-dev
PATCH v2 2/2 mmc: host: Add some quirks to be read from fdt in sdhci-pltm.c
Quoted 20 lines · Suman Tripathi
This patch adds some quirks support to be read from fdt.
Signed-off-by Suman Tripathi <[email protected]>--- drivers/mmc/host/sdhci-pltfm.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+)drivers/mmc/host/sdhci-pltfm.c +5
-0@@ -85,6 +85,21 @@ void sdhci_get_of_property(struct platform_device *pdev)if (of_get_property (np,"broken-cd" ,NULL )) host->quirks |=SDHCI_QUIRK_BROKEN_CARD_DETECTION ; + +if (of_get_property (np,"delay-after-power" ,NULL )) + host->quirks |=SDHCI_QUIRK_DELAY_AFTER_POWER ; + +if (of_get_property (np,"no-hispd" ,NULL ))
drivers/mmc/host/sdhci-pltfm.c void sdhci_get_of_property(struct platform_device *pdev) · line 102
Quoted 10 lines
drivers/mmc/host/sdhci-pltfm.c +10
-0+ host->quirks |=SDHCI_QUIRK_NO_HISPD_BIT ; + +if (of_get_property (np,"broken-adma" ,NULL )) + host->quirks |=SDHCI_QUIRK_BROKEN_ADMA ; + +if (of_get_property (np,"broken-dma" ,NULL )) + host->quirks |=SDHCI_QUIRK_BROKEN_DMA ; + +if (of_get_property (np,"no-cmd23" ,NULL )) + host->quirks2 |=SDHCI_QUIRK2_HOST_NO_CMD23 ;
Can't at least some of these be distinguished from what sdhci variant that is being used? Instead of having them in DT...
We are using arasan controller in our SOC. So reusing a the existing sdhci-of-arasan driver. Due to H/W issues we require this quirks. So for us only option left to pass the info is DTS or ACPI table.
Kind regards
Uffe
Quoted 105 lines · Suman Tripathi
Quoted 22 lines · Suman Tripathi
This patch adds some quirks support to be read from fdt.
Signed-off-by Suman Tripathi <[email protected]>--- drivers/mmc/host/sdhci-pltfm.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+)drivers/mmc/host/sdhci-pltfm.c +5
-0@@ -85,6 +85,21 @@ void sdhci_get_of_property(struct platform_device *pdev)if (of_get_property (np,"broken-cd" ,NULL )) host->quirks |=SDHCI_QUIRK_BROKEN_CARD_DETECTION ; + +if (of_get_property (np,"delay-after-power" ,NULL )) + host->quirks |=SDHCI_QUIRK_DELAY_AFTER_POWER ; + +if (of_get_property (np,"no-hispd" ,NULL ))drivers/mmc/host/sdhci-pltfm.c void sdhci_get_of_property(struct platform_device · line 103
Quoted 10 lines
drivers/mmc/host/sdhci-pltfm.c +10
-0+ host->quirks |=SDHCI_QUIRK_NO_HISPD_BIT ; + +if (of_get_property (np,"broken-adma" ,NULL )) + host->quirks |=SDHCI_QUIRK_BROKEN_ADMA ; + +if (of_get_property (np,"broken-dma" ,NULL )) + host->quirks |=SDHCI_QUIRK_BROKEN_DMA ; + +if (of_get_property (np,"no-cmd23" ,NULL )) + host->quirks2 |=SDHCI_QUIRK2_HOST_NO_CMD23 ;Can't at least some of these be distinguished from what sdhci variant that is being used? Instead of having them in DT...
We are using arasan controller in our SOC. So reusing a the existing sdhci-of-arasan driver. Due to H/W issues we require this quirks. So for us only option left to pass the info is DTS or ACPI table.
Kind regards
UffeQuoted 39 lines · Ulf Hansson
Quoted 23 lines · Suman Tripathi
This patch adds some quirks support to be read from fdt.
Signed-off-by Suman Tripathi <[email protected]>--- drivers/mmc/host/sdhci-pltfm.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+)drivers/mmc/host/sdhci-pltfm.c +5
-0@@ -85,6 +85,21 @@ void sdhci_get_of_property(struct platform_device *pdev)if (of_get_property (np,"broken-cd" ,NULL )) host->quirks |=SDHCI_QUIRK_BROKEN_CARD_DETECTION ; + +if (of_get_property (np,"delay-after-power" ,NULL )) + host->quirks |=SDHCI_QUIRK_DELAY_AFTER_POWER ; + +if (of_get_property (np,"no-hispd" ,NULL ))drivers/mmc/host/sdhci-pltfm.c void sdhci_get_of_property(struct platform_device · line 104
Quoted 10 lines
drivers/mmc/host/sdhci-pltfm.c +10
-0+ host->quirks |=SDHCI_QUIRK_NO_HISPD_BIT ; + +if (of_get_property (np,"broken-adma" ,NULL )) + host->quirks |=SDHCI_QUIRK_BROKEN_ADMA ; + +if (of_get_property (np,"broken-dma" ,NULL )) + host->quirks |=SDHCI_QUIRK_BROKEN_DMA ; + +if (of_get_property (np,"no-cmd23" ,NULL )) + host->quirks2 |=SDHCI_QUIRK2_HOST_NO_CMD23 ;Can't at least some of these be distinguished from what sdhci variant that is being used? Instead of having them in DT...
Quoted 13 lines
Kind regards
UffeQuoted 10 lines
drivers/mmc/host/sdhci-pltfm.c +0
-0if (of_get_property (np,"no-1-8-v" ,NULL ))host->quirks2 |= SDHCI_QUIRK2_NO_1_8_V;--
1.8.2.1--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html--
Thanks,
with regards,
Suman Tripathi
Signature · 3 lines
Thanks, with regards, Suman Tripathi