Tegra114 Add Minimal SDHCI support
Subsystems (4)
cover Tegra114 Add Minimal SDHCI support
This patchset adds the minimal support for Tegra114 SDHCI support and enables it for tegra114-dalmore.
This patchset is dependent on:
- Tegra114 Clock framework (v7) from Peter De Schrijver ( http://patchwork.ozlabs.org/patch/220727/ ...)
- Tegra114 Pinctrl patches (v2) I sent 2/11
( http://patchwork.ozlabs.org/patch/219686/
http://patchwork.ozlabs.org/patch/219687/ )
- mmc: tegra: assume CONFIG_OF, remove platform data ( https://patchwork.kernel.org/patch/2150351/)
I tested merging this with and without the mmc patches from Joseph Lo and it merged cleanly in either case, so there shouldn't be a nasty dependency between them.
( http://patchwork.ozlabs.org/patch/221969/
http://patchwork.ozlabs.org/patch/221970/ )
Pritesh Raithatha (1):
ARM tegra: add SDHCI nodes with common properties
Rhyland Klein (3):
ARM: tegra: add SDHCI support for Dalmore
mmc: host: sdhci-tegra: cleanup ifdefs
mmc: host: sdhci-tegra: add basic support for Tegra114
arch/arm/boot/dts/tegra114-dalmore.dts | 11 +++++++++++ arch/arm/boot/dts/tegra114.dtsi | 32 ++++++++++++++++++++++++++++++++ drivers/mmc/host/sdhci-tegra.c | 22 ++++++++++++++-------- 3 files changed, 57 insertions(+), 8 deletions(-)
Signature · 1 line
1.7.9.5
PATCH 2/4 ARM: tegra: add SDHCI support for Dalmore
Based on changes by: Pritesh Raithatha <[email protected]>
--- arch/arm/boot/dts/tegra114-dalmore.dts | 11 +++++++++++ 1 file changed, 11 insertions(+)
arch/arm/boot/dts/tegra114-dalmore.dts +11 -0
@@ -15,6 +15,17 @@ clock-frequency = <408000000>; }; + sdhci@78000400 { + cd-gpios = <&gpio 170 1>; /* gpio PV2 */ + bus-width = <4>; + status = "okay"; + }; + + sdhci@78000600 { + bus-width = <8>; + status = "okay"; + }; + pmc { nvidia,invert-interrupt; };
Signature · 1 line
1.7.9.5
Re: [PATCH 2/4] ARM: tegra: add SDHCI support for Dalmore
Quoted 2 lines · Rhyland Klein
Based on changes by: Pritesh Raithatha <[email protected]>
Signed-off-by Rhyland Klein <[email protected]>
A patch description would be useful here. Something simple like:
Dalmore has a built-in eMMC device and a user-accessible SD card slot. Add device tree nodes to enable these.
The same rebasing comment will apply here too.
Re: [PATCH 2/4] ARM: tegra: add SDHCI support for Dalmore
Quoted 5 lines · Stephen Warren
Quoted 2 lines · Rhyland Klein
Based on changes by: Pritesh Raithatha <[email protected]>
Signed-off-by Rhyland Klein <[email protected]>A patch description would be useful here. Something simple like:
Quoted 8 lines
Dalmore has a built-in eMMC device and a user-accessible SD card slot. Add device tree nodes to enable these.
The same rebasing comment will apply here too.
--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Will update patch description for next series.
I can rebase on the cpp usage, but for some stuff like the #define replacements, it sounded like things were still being hashed out (like .h location, include paths, etc) so I figured its safer not to base on those initially. If they are settled by the time i send this out again, i can use them as a base.
-rhyland
Signature · 1 line
nvpublic
Re: [PATCH 2/4] ARM: tegra: add SDHCI support for Dalmore
Quoted 14 lines · Rhyland Klein
Quoted 13 lines · Stephen Warren
Quoted 2 lines · Rhyland Klein
Based on changes by: Pritesh Raithatha <[email protected]>
Signed-off-by Rhyland Klein <[email protected]>A patch description would be useful here. Something simple like:
Dalmore has a built-in eMMC device and a user-accessible SD card slot. Add device tree nodes to enable these.
The same rebasing comment will apply here too.
Signature · 3 lines
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 7 lines
Will update patch description for next series.
I can rebase on the cpp usage, but for some stuff like the #define replacements, it sounded like things were still being hashed out (like .h location, include paths, etc) so I figured its safer not to base on those initially. If they are settled by the time i send this out again, i can use them as a base.
Yes, it's not all 100% settled yet; I pointed it out more as a heads-up that I might ask you to rebase later. There's no need to actively rebase just yet.
Re: [PATCH 2/4] ARM: tegra: add SDHCI support for Dalmore
In reply to Stephen WarrenQuoted 10 lines · Stephen Warren
Quoted 2 lines · Rhyland Klein
Based on changes by: Pritesh Raithatha <[email protected]>
Signed-off-by Rhyland Klein <[email protected]>A patch description would be useful here. Something simple like:
Dalmore has a built-in eMMC device and a user-accessible SD card slot. Add device tree nodes to enable these.
The same rebasing comment will apply here too.
I went ahead and applied patches 1/2 and 2/2 to Tegra's for-3.10/dt branch. I added the commit description I mentioned above.
I think what I'll do for the dtc+cpp usage is to apply patches that come in before all the dependencies for dtc+cpp are in place, then rebase and repost my series that converts to use dtc+cpp. That'll save blocking any other patches on dtc+cpp availability, and save everyone rebasing.
A message that is not in the archive (sent off-list or not yet received): 1361385317-6020-1-git-send-email-rklein-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org
PATCH 1/4 ARM tegra: add SDHCI nodes with common properties
From: Pritesh Raithatha <[email protected]>
This patch adds in the SDHCI nodes for the busses supported on Tegra114 boards.
--- arch/arm/boot/dts/tegra114.dtsi | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+)
arch/arm/boot/dts/tegra114.dtsi +32 -0
@@ -92,6 +92,38 @@ status = "disabled"; }; + sdhci@78000000 { + compatible = "nvidia,tegra114-sdhci", "nvidia,tegra30-sdhci"; + reg = <0x78000000 0x200>; + interrupts = <0 14 0x04>; + clocks = <&tegra_car 14>; + status = "disable"; + }; + + sdhci@78000200 { + compatible = "nvidia,tegra114-sdhci", "nvidia,tegra30-sdhci"; + reg = <0x78000200 0x200>; + interrupts = <0 15 0x04>; + clocks = <&tegra_car 9>; + status = "disable"; + }; + + sdhci@78000400 { + compatible = "nvidia,tegra114-sdhci", "nvidia,tegra30-sdhci"; + reg = <0x78000400 0x200>; + interrupts = <0 19 0x04>; + clocks = <&tegra_car 69>; + status = "disable"; + }; + + sdhci@78000600 { + compatible = "nvidia,tegra114-sdhci", "nvidia,tegra30-sdhci"; + reg = <0x78000600 0x200>; + interrupts = <0 31 0x04>; + clocks = <&tegra_car 15>; + status = "disable"; + }; + rtc { compatible = "nvidia,tegra114-rtc", "nvidia,tegra20-rtc"; reg = <0x7000e000 0x100>;
Signature · 1 line
1.7.9.5
Re: [PATCH 1/4] ARM tegra: add SDHCI nodes with common properties
Quoted 4 lines · Rhyland Klein
From: Pritesh Raithatha <[email protected]>
This patch adds in the SDHCI nodes for the busses supported on Tegra114 boards.
This patch looks fine, although it'd need some modifications to rebase it on top of the cpp usage in *.dts, which I believe I'll check in early for 3.10.
PATCH 3/4 mmc: host: sdhci-tegra: cleanup ifdefs
In reply to a message not in the archiveThe structs wrapped with the SOC ifdefs are small enough where having them always there shouldn't be a big overhead. Removing the ifdefs also makes the code a little cleaner.
--- drivers/mmc/host/sdhci-tegra.c | 8 -------- 1 file changed, 8 deletions(-)
drivers/mmc/host/sdhci-tegra.c +0 -8
@@ -173,7 +173,6 @@ static struct sdhci_ops tegra_sdhci_ops = { .platform_reset_exit = tegra_sdhci_reset_exit, }; -#ifdef CONFIG_ARCH_TEGRA_2x_SOCstatic struct sdhci_pltfm_data sdhci_tegra20_pdata = { .quirks =SDHCI_QUIRK_BROKEN_TIMEOUT_VAL | SDHCI_QUIRK_SINGLE_POWER_WRITE |
@@ -187,9 +186,7 @@ static struct sdhci_tegra_soc_data soc_data_tegra20 = { .nvquirks = NVQUIRK_FORCE_SDHCI_SPEC_200 | NVQUIRK_ENABLE_BLOCK_GAP_DET, }; -#endif -#ifdef CONFIG_ARCH_TEGRA_3x_SOCstatic struct sdhci_pltfm_data sdhci_tegra30_pdata = { .quirks =SDHCI_QUIRK_BROKEN_TIMEOUT_VAL | SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK |
@@ -203,15 +200,10 @@ static struct sdhci_tegra_soc_data soc_data_tegra30 = { .pdata = &sdhci_tegra30_pdata, .nvquirks = NVQUIRK_ENABLE_SDHCI_SPEC_300, }; -#endif static const struct of_device_id sdhci_tegra_dt_match[] = { -#ifdef CONFIG_ARCH_TEGRA_3x_SOC { .compatible ="nvidia,tegra30-sdhci" , .data = &soc_data_tegra30 }, -#endif -#ifdef CONFIG_ARCH_TEGRA_2x_SOC { .compatible ="nvidia,tegra20-sdhci" , .data = &soc_data_tegra20 }, -#endif {} };MODULE_DEVICE_TABLE (of, sdhci_dt_ids);
Signature · 1 line
1.7.9.5
Re: [PATCH 3/4] mmc: host: sdhci-tegra: cleanup ifdefs
Quoted 3 lines · Rhyland Klein
The structs wrapped with the SOC ifdefs are small enough where having them always there shouldn't be a big overhead. Removing the ifdefs also makes the code a little cleaner.
Patch 3 and 4 to the MMC driver look fine. But I'd ask Chris to hold off on applying them for 3.10 until I've sorted out the dependencies of Joseph Lo's MMC patches; if I can get the device tree fix for the CD GPIO polarity into 3.9/stable as a bug-fix, there will be no dependency issue I think. Otherwise, I'll probably want to take all the Tegra SDHCI changes through the Tegra tree for 3.10 to resolve the dependencies.
A message that is not in the archive (sent off-list or not yet received): 1361385317-6020-4-git-send-email-rklein-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org
Re: [PATCH 3/4] mmc: host: sdhci-tegra: cleanup ifdefs
Quoted 3 lines · Rhyland Klein
The structs wrapped with the SOC ifdefs are small enough where having them always there shouldn't be a big overhead. Removing the ifdefs also makes the code a little cleaner.
Chris,
I think patches 3 and 4 of this series can go through either the MMC tree (I checked there are no conflicts with the MMC patch I have to take through the Tegra tree), or the Tegra tree (since I'm taking another Tegra MMC patch though there), both without any dependency issues.
It's your call. Let me know if you want me to take them through the Tegra tree with an ack. Or, if you want to take them through the MMC tree that's fine too. If you need them reposted to see the content, let me know, or they're at:
http://patchwork.ozlabs.org/patch/222136/
http://patchwork.ozlabs.org/patch/222138/
Thanks.
A message that is not in the archive (sent off-list or not yet received): [email protected]
Re: [PATCH 3/4] mmc: host: sdhci-tegra: cleanup ifdefs
Hi,
Quoted 10 lines · Stephen Warren
Quoted 3 lines · Rhyland Klein
The structs wrapped with the SOC ifdefs are small enough where having them always there shouldn't be a big overhead. Removing the ifdefs also makes the code a little cleaner.
I think patches 3 and 4 of this series can go through either the MMC tree (I checked there are no conflicts with the MMC patch I have to take through the Tegra tree), or the Tegra tree (since I'm taking another Tegra MMC patch though there), both without any dependency issues.
Quoted 4 lines
It's your call. Let me know if you want me to take them through the Tegra tree with an ack. Or, if you want to take them through the MMC tree that's fine too. If you need them reposted to see the content, let me know, or they're at:
Via the MMC tree with an ack sounds good, just for the mundane reason that I like my "highlights for 3.10" pull request to Linus to mention when support for new MMC hardware is added, and it won't do that if the tegra110 patch is coming through your tree.
Thanks,
- Chris.
Signature · 2 lines
Chris Ball <[email protected]> <http://printf.net/> One Laptop Per Child
A message that is not in the archive (sent off-list or not yet received): [email protected]
Stephen Warren
Acked-byRe: [PATCH 3/4] mmc: host: sdhci-tegra: cleanup ifdefs
Quoted 13 lines · Chris Ball
Hi,
Quoted 10 lines · Stephen Warren
Quoted 3 lines · Rhyland Klein
The structs wrapped with the SOC ifdefs are small enough where having them always there shouldn't be a big overhead. Removing the ifdefs also makes the code a little cleaner.
I think patches 3 and 4 of this series can go through either the MMC tree (I checked there are no conflicts with the MMC patch I have to take through the Tegra tree), or the Tegra tree (since I'm taking another Tegra MMC patch though there), both without any dependency issues.
Quoted 6 lines
Quoted 4 lines
It's your call. Let me know if you want me to take them through the Tegra tree with an ack. Or, if you want to take them through the MMC tree that's fine too. If you need them reposted to see the content, let me know, or they're at:
Via the MMC tree with an ack sounds good
OK, thanks. Patches 3/4 and 4/4,
A message that is not in the archive (sent off-list or not yet received): [email protected]
Re: [PATCH 3/4] mmc: host: sdhci-tegra: cleanup ifdefs
Hi,
Quoted 4 lines · Stephen Warren
Quoted 1 line
Via the MMC tree with an ack sounds good
OK, thanks. Patches 3/4 and 4/4,
Acked-by Stephen Warren <[email protected]>
Thanks, both pushed out to mmc-next for 3.10 now.
- Chris.
Signature · 2 lines
Chris Ball <[email protected]> <http://printf.net/> One Laptop Per Child
PATCH 4/4 mmc: host: sdhci-tegra: add basic support for Tegra114
In reply to a message not in the archiveThe mmc controller on Tegra114 platforms is basically compatible with the settings used for Tegra30. However there is a difference where we don't need the extra ENABLE_SDHCI_SPEC_300 quirk as Tegra114 hardware advertises v3.0 support already.
--- drivers/mmc/host/sdhci-tegra.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
drivers/mmc/host/sdhci-tegra.c +14 -0
@@ -201,7 +201,21 @@ static struct sdhci_tegra_soc_data soc_data_tegra30 = { .nvquirks = NVQUIRK_ENABLE_SDHCI_SPEC_300, }; +static struct sdhci_pltfm_data sdhci_tegra114_pdata = { + .quirks =SDHCI_QUIRK_BROKEN_TIMEOUT_VAL | +SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK | +SDHCI_QUIRK_SINGLE_POWER_WRITE | +SDHCI_QUIRK_NO_HISPD_BIT | +SDHCI_QUIRK_BROKEN_ADMA_ZEROLEN_DESC , + .ops = &tegra_sdhci_ops, +}; + +static struct sdhci_tegra_soc_data soc_data_tegra114 = { + .pdata = &sdhci_tegra114_pdata, +}; +static const struct of_device_id sdhci_tegra_dt_match[] = { + { .compatible ="nvidia,tegra114-sdhci" , .data = &soc_data_tegra114 }, { .compatible ="nvidia,tegra30-sdhci" , .data = &soc_data_tegra30 }, { .compatible ="nvidia,tegra20-sdhci" , .data = &soc_data_tegra20 }, {}
Signature · 1 line
1.7.9.5