0163-BCM270X_DT-Add-pi3-disable-bt-overlay.patch 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. From 12cde6a9a34f49c31e2f1689b53cd40a165b35d9 Mon Sep 17 00:00:00 2001
  2. From: Phil Elwell <phil@raspberrypi.org>
  3. Date: Wed, 2 Mar 2016 10:59:05 +0000
  4. Subject: [PATCH 163/381] BCM270X_DT: Add pi3-disable-bt overlay
  5. Disable Bluetooth and restore UART0/ttyAMA0 over GPIOs 14 & 15. To disable
  6. the systemd service that initialises the modem so it doesn't use the UART:
  7. sudo systemctl disable hciuart
  8. Signed-off-by: Phil Elwell <phil@raspberrypi.org>
  9. ---
  10. arch/arm/boot/dts/overlays/Makefile | 1 +
  11. arch/arm/boot/dts/overlays/README | 8 ++++
  12. .../boot/dts/overlays/pi3-disable-bt-overlay.dts | 48 ++++++++++++++++++++++
  13. 3 files changed, 57 insertions(+)
  14. create mode 100644 arch/arm/boot/dts/overlays/pi3-disable-bt-overlay.dts
  15. --- a/arch/arm/boot/dts/overlays/Makefile
  16. +++ b/arch/arm/boot/dts/overlays/Makefile
  17. @@ -39,6 +39,7 @@ dtb-$(RPI_DT_OVERLAYS) += mcp2515-can0-o
  18. dtb-$(RPI_DT_OVERLAYS) += mcp2515-can1-overlay.dtb
  19. dtb-$(RPI_DT_OVERLAYS) += mmc-overlay.dtb
  20. dtb-$(RPI_DT_OVERLAYS) += mz61581-overlay.dtb
  21. +dtb-$(RPI_DT_OVERLAYS) += pi3-disable-bt-overlay.dtb
  22. dtb-$(RPI_DT_OVERLAYS) += piscreen-overlay.dtb
  23. dtb-$(RPI_DT_OVERLAYS) += piscreen2r-overlay.dtb
  24. dtb-$(RPI_DT_OVERLAYS) += pitft28-capacitive-overlay.dtb
  25. --- a/arch/arm/boot/dts/overlays/README
  26. +++ b/arch/arm/boot/dts/overlays/README
  27. @@ -496,6 +496,14 @@ Params: speed Display
  28. [ The pcf8563-rtc overlay has been deleted. See i2c-rtc. ]
  29. +Name: pi3-disable-bt
  30. +Info: Disable Pi3 Bluetooth and restore UART0/ttyAMA0 over GPIOs 14 & 15
  31. + N.B. To disable the systemd service that initialises the modem so it
  32. + doesn't use the UART, use 'sudo systemctl disable hciuart'.
  33. +Load: dtoverlay=pi3-disable-bt
  34. +Params: <None>
  35. +
  36. +
  37. Name: piscreen
  38. Info: PiScreen display by OzzMaker.com
  39. Load: dtoverlay=piscreen,<param>=<val>
  40. --- /dev/null
  41. +++ b/arch/arm/boot/dts/overlays/pi3-disable-bt-overlay.dts
  42. @@ -0,0 +1,48 @@
  43. +/dts-v1/;
  44. +/plugin/;
  45. +
  46. +/* Disable Bluetooth and restore UART0/ttyAMA0 over GPIOs 14 & 15.
  47. + To disable the systemd service that initialises the modem so it doesn't use
  48. + the UART:
  49. +
  50. + sudo systemctl disable hciuart
  51. +*/
  52. +
  53. +/{
  54. + compatible = "brcm,bcm2708";
  55. +
  56. + fragment@0 {
  57. + target = <&uart1>;
  58. + __overlay__ {
  59. + status = "disabled";
  60. + };
  61. + };
  62. +
  63. + fragment@1 {
  64. + target = <&uart0>;
  65. + __overlay__ {
  66. + pinctrl-names = "default";
  67. + pinctrl-0 = <&uart0_pins>;
  68. + status = "okay";
  69. + };
  70. + };
  71. +
  72. + fragment@2 {
  73. + target = <&gpio>;
  74. + __overlay__ {
  75. + uart0_pins: uart0_pins {
  76. + brcm,pins = <14 15>;
  77. + brcm,function = <4>; /* alt0 */
  78. + brcm,pull = <0 2>;
  79. + };
  80. + };
  81. + };
  82. +
  83. + fragment@3 {
  84. + target-path = "/aliases";
  85. + __overlay__ {
  86. + serial0 = "/soc/uart@7e201000";
  87. + serial1 = "/soc/uart@7e215040";
  88. + };
  89. + };
  90. +};