0123-BCM270X_DT-Add-the-sdtweak-overlay-for-tuning-sdhost.patch 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. From e1d87aa570e5a036160f35d7b95f6a2c10f96bed Mon Sep 17 00:00:00 2001
  2. From: Phil Elwell <phil@raspberrypi.org>
  3. Date: Mon, 4 Jan 2016 14:42:17 +0000
  4. Subject: [PATCH 123/381] BCM270X_DT: Add the sdtweak overlay, for tuning
  5. sdhost
  6. The sdhost overlay declares the sdhost interface and allows parameters
  7. to be set. This is overkill for situations where the user just wants to
  8. tweak the parameters of a pre-declared sdhost interface, so create an
  9. sdtweak overlay that does just that.
  10. ---
  11. arch/arm/boot/dts/overlays/Makefile | 1 +
  12. arch/arm/boot/dts/overlays/README | 14 ++++++++++++++
  13. arch/arm/boot/dts/overlays/sdtweak-overlay.dts | 21 +++++++++++++++++++++
  14. 3 files changed, 36 insertions(+)
  15. create mode 100644 arch/arm/boot/dts/overlays/sdtweak-overlay.dts
  16. --- a/arch/arm/boot/dts/overlays/Makefile
  17. +++ b/arch/arm/boot/dts/overlays/Makefile
  18. @@ -53,6 +53,7 @@ dtb-$(RPI_DT_OVERLAYS) += rpi-proto-over
  19. dtb-$(RPI_DT_OVERLAYS) += rpi-sense-overlay.dtb
  20. dtb-$(RPI_DT_OVERLAYS) += sdhost-overlay.dtb
  21. dtb-$(RPI_DT_OVERLAYS) += sdio-overlay.dtb
  22. +dtb-$(RPI_DT_OVERLAYS) += sdtweak-overlay.dtb
  23. dtb-$(RPI_DT_OVERLAYS) += smi-dev-overlay.dtb
  24. dtb-$(RPI_DT_OVERLAYS) += smi-nand-overlay.dtb
  25. dtb-$(RPI_DT_OVERLAYS) += smi-overlay.dtb
  26. --- a/arch/arm/boot/dts/overlays/README
  27. +++ b/arch/arm/boot/dts/overlays/README
  28. @@ -635,6 +635,20 @@ Params: overclock_50 Clock (
  29. (default on: polling once at boot-time)
  30. +Name: sdtweak
  31. +Info: Tunes the bcm2835-sdhost SD/MMC driver
  32. +Load: dtoverlay=sdtweak,<param>=<val>
  33. +Params: overclock_50 Clock (in MHz) to use when the MMC framework
  34. + requests 50MHz
  35. +
  36. + force_pio Disable DMA support (default off)
  37. +
  38. + pio_limit Number of blocks above which to use DMA
  39. + (default 1)
  40. +
  41. + debug Enable debug output (default off)
  42. +
  43. +
  44. Name: smi
  45. Info: Enables the Secondary Memory Interface peripheral. Uses GPIOs 2-25!
  46. Load: dtoverlay=smi
  47. --- /dev/null
  48. +++ b/arch/arm/boot/dts/overlays/sdtweak-overlay.dts
  49. @@ -0,0 +1,21 @@
  50. +/dts-v1/;
  51. +/plugin/;
  52. +
  53. +/{
  54. + compatible = "brcm,bcm2708";
  55. +
  56. + fragment@0 {
  57. + target = <&sdhost>;
  58. + frag1: __overlay__ {
  59. + brcm,overclock-50 = <0>;
  60. + brcm,pio-limit = <1>;
  61. + };
  62. + };
  63. +
  64. + __overrides__ {
  65. + overclock_50 = <&frag1>,"brcm,overclock-50:0";
  66. + force_pio = <&frag1>,"brcm,force-pio?";
  67. + pio_limit = <&frag1>,"brcm,pio-limit:0";
  68. + debug = <&frag1>,"brcm,debug?";
  69. + };
  70. +};