mbox series

[00/12] mmc: sdhci-omap: Add UHS/HS200 mode support

Message ID 20171214130941.26666-1-kishon@ti.com
Headers show
Series mmc: sdhci-omap: Add UHS/HS200 mode support | expand

Message

Kishon Vijay Abraham I Dec. 14, 2017, 1:09 p.m. UTC
Add UHS/HS200 mode support in sdhci-omap. The programming sequence
for voltage switching, tuning is followed from AM572x TRM
http://www.ti.com/lit/ug/spruhz6i/spruhz6i.pdf
(Similar to all AM57x/DRA7x SoCs). The patch series also implements
workaround for errata published in
http://www.ti.com/lit/er/sprz429k/sprz429k.pdf.

While most of this series is specific to sdhci-omap, it also
patches sdhci to use software timer when the requested timeout
is greater than hardware capablility. This re-uses the SW data timer
already implemented in sdhci while disabling the HW timeout (so that
spurious timeout is not observed). The patch for sdhci.c is based on
an earlier patch that was done specific to omap_hsmmc.c
(https://patchwork.kernel.org/patch/9791449/)

It also includes a pdata-quirk patch since both pdata-quirks and
sdhci-omap uses struct sdhci_omap_platform_data.

The dt patches enabling UHS/HS200 will be follow this patch series.

This series is created on
git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc.git next

Kishon Vijay Abraham I (12):
  mmc: sdhci-omap: Update 'power_mode' outside sdhci_omap_init_74_clocks
  mmc: sdhci-omap: Add card_busy host ops
  mmc: sdhci-omap: Add custom set_uhs_signaling sdhci_host ops
  mmc: sdhci-omap: Add tuning support
  mmc: sdhci-omap: Workaround for Errata i802
  mmc: sdhci_omap: Add support to set IODELAY values
  mmc: sdhci_omap: Fix sdhci-omap quirks
  mmc: sdhci-omap: Add support to override f_max and iodelay from pdata
  mmc: sdhci: Use software timer when timeout greater than hardware
    capablility
  dt-bindings: sdhci-omap: Add K2G specific binding
  mmc: sdhci-omap: Add support for MMC/SD controller in k2g SoC
  ARM: OMAP2+: Use sdhci-omap specific pdata-quirks for MMC/SD on DRA74x
    EVM

 .../devicetree/bindings/mmc/sdhci-omap.txt         |   2 +
 arch/arm/mach-omap2/pdata-quirks.c                 |  34 +-
 drivers/mmc/host/sdhci-omap.c                      | 446 ++++++++++++++++++++-
 drivers/mmc/host/sdhci.c                           |  41 +-
 drivers/mmc/host/sdhci.h                           |  11 +
 include/linux/platform_data/sdhci-omap.h           |  35 ++
 6 files changed, 544 insertions(+), 25 deletions(-)
 create mode 100644 include/linux/platform_data/sdhci-omap.h

-- 
2.11.0

Comments

Philippe Ombredanne Dec. 14, 2017, 2:04 p.m. UTC | #1
Kishon,

On Thu, Dec 14, 2017 at 2:09 PM, Kishon Vijay Abraham I <kishon@ti.com> wrote:
> DRA74x EVM Rev H EVM comes with revision 2.0 silicon. However, earlier

> versions of EVM can come with either revision 1.1 or revision 1.0 of

> silicon.

>

> The device-tree file is written to support rev 2.0 of silicon.

> pdata-quirks are used to then override the settings needed for

> PG 1.1 silicon.

>

> PG 1.1 silicon has limitations w.r.t frequencies at which MMC1/2/3

> can operate as well as different IOdelay numbers.

>

> Add support in sdhci-omap driver to get platform data if available

> (added using pdata quirks) and override the data (max-frequency and

> iodelay data) obtained from device tree.

>

> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>


<snip>

> --- /dev/null

> +++ b/include/linux/platform_data/sdhci-omap.h

> @@ -0,0 +1,35 @@

> +/**

> + * SDHCI Controller Platform Data for TI's OMAP SoCs

> + *

> + * Copyright (C) 2017 Texas Instruments

> + * Author: Kishon Vijay Abraham I <kishon@ti.com>

> + *

> + * This program is free software: you can redistribute it and/or modify

> + * it under the terms of the GNU General Public License version 2 of

> + * the License as published by the Free Software Foundation.

> + *

> + * This program is distributed in the hope that it will be useful,

> + * but WITHOUT ANY WARRANTY; without even the implied warranty of

> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the

> + * GNU General Public License for more details.

> + *

> + * You should have received a copy of the GNU General Public License

> + * along with this program.  If not, see <http://www.gnu.org/licenses/>.

> + */


Could you use the new SPDX tags instead of this fine and long boilerplate? See
Thomas doc for details [1]

[1] https://lkml.org/lkml/2017/12/4/934

Thanks!
PS: if you could spread the word out in your team too, this would be
much welcomed!

-- 
Cordially
Philippe Ombredanne