0199-BCM270X_DT-Add-1-bit-SDIO-using-minimal-pins.patch 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. From 337a299edf74d3866636363b675f1b48e01cf842 Mon Sep 17 00:00:00 2001
  2. From: campag <dave-lowe@ntlworld.com>
  3. Date: Wed, 24 Feb 2016 16:45:42 +0000
  4. Subject: [PATCH 199/381] BCM270X_DT: Add 1-bit SDIO using minimal pins...
  5. ... for that mode: GPIOs 22-25.
  6. ---
  7. arch/arm/boot/dts/overlays/README | 21 ++++++++++++++
  8. arch/arm/boot/dts/overlays/sdio-1bit-overlay.dts | 36 ++++++++++++++++++++++++
  9. 2 files changed, 57 insertions(+)
  10. create mode 100644 arch/arm/boot/dts/overlays/sdio-1bit-overlay.dts
  11. --- a/arch/arm/boot/dts/overlays/README
  12. +++ b/arch/arm/boot/dts/overlays/README
  13. @@ -709,6 +709,27 @@ Params: overclock_50 SD Clock
  14. bus_width Set the SDIO host bus width (default 4 bits)
  15. +Name: sdio-1bit
  16. +Info: Selects the bcm2835-sdhost SD/MMC driver, optionally with overclock,
  17. + and enables 1-bit SDIO via GPIOs 22-25.
  18. +Load: dtoverlay=sdio-1bit,<param>=<val>
  19. +Params: overclock_50 SD Clock (in MHz) to use when the MMC framework
  20. + requests 50MHz
  21. +
  22. + sdio_overclock SDIO Clock (in MHz) to use when the MMC
  23. + framework requests 50MHz
  24. +
  25. + force_pio Disable DMA support (default off)
  26. +
  27. + pio_limit Number of blocks above which to use DMA
  28. + (default 1)
  29. +
  30. + debug Enable debug output (default off)
  31. +
  32. + poll_once Disable SDIO-device polling every second
  33. + (default on: polling once at boot-time)
  34. +
  35. +
  36. Name: sdtweak
  37. Info: Tunes the bcm2835-sdhost SD/MMC driver
  38. Load: dtoverlay=sdtweak,<param>=<val>
  39. --- /dev/null
  40. +++ b/arch/arm/boot/dts/overlays/sdio-1bit-overlay.dts
  41. @@ -0,0 +1,36 @@
  42. +/* Enable 1-bit SDIO from MMC interface via GPIOs 22-25. Includes sdhost overlay. */
  43. +
  44. +/include/ "sdhost-overlay.dts"
  45. +
  46. +/{
  47. + compatible = "brcm,bcm2708";
  48. +
  49. + fragment@3 {
  50. + target = <&mmc>;
  51. + sdio_mmc: __overlay__ {
  52. + compatible = "brcm,bcm2835-mmc";
  53. + pinctrl-names = "default";
  54. + pinctrl-0 = <&sdio_pins>;
  55. + non-removable;
  56. + bus-width = <1>;
  57. + brcm,overclock-50 = <0>;
  58. + status = "okay";
  59. + };
  60. + };
  61. +
  62. + fragment@4 {
  63. + target = <&gpio>;
  64. + __overlay__ {
  65. + sdio_pins: sdio_pins {
  66. + brcm,pins = <22 23 24 25>;
  67. + brcm,function = <7 7 7 7>; /* ALT3 = SD1 */
  68. + brcm,pull = <0 2 2 2>;
  69. + };
  70. + };
  71. + };
  72. +
  73. + __overrides__ {
  74. + poll_once = <&sdio_mmc>,"non-removable?";
  75. + sdio_overclock = <&sdio_mmc>,"brcm,overclock-50:0";
  76. + };
  77. +};