0423-BCM270X_DT-Declare-the-audio-PWM-pins-explicitly.patch 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. From 44bc32bd05018d23b4145d56d09419ce8bd89055 Mon Sep 17 00:00:00 2001
  2. From: Phil Elwell <phil@raspberrypi.org>
  3. Date: Mon, 20 Jun 2016 13:21:26 +0100
  4. Subject: [PATCH] BCM270X_DT: Declare the audio PWM pins explicitly
  5. Make the audio driver's use of the PWM functions explicit. Overlays
  6. that want to use the PWM functionality for other purposes must
  7. disable the audio node.
  8. See: https://github.com/raspberrypi/linux/issues/1473
  9. Signed-off-by: Phil Elwell <phil@raspberrypi.org>
  10. ---
  11. arch/arm/boot/dts/bcm2708-rpi-b-plus.dts | 10 ++++++++++
  12. arch/arm/boot/dts/bcm2708-rpi-b.dts | 9 +++++++++
  13. arch/arm/boot/dts/bcm2709-rpi-2-b.dts | 10 ++++++++++
  14. arch/arm/boot/dts/bcm2710-rpi-3-b.dts | 10 ++++++++++
  15. 4 files changed, 39 insertions(+)
  16. --- a/arch/arm/boot/dts/bcm2708-rpi-b-plus.dts
  17. +++ b/arch/arm/boot/dts/bcm2708-rpi-b-plus.dts
  18. @@ -37,6 +37,11 @@
  19. brcm,pins = <18 19 20 21>;
  20. brcm,function = <4>; /* alt0 */
  21. };
  22. +
  23. + audio_pins: audio_pins {
  24. + brcm,pins = <40 45>;
  25. + brcm,function = <4>;
  26. + };
  27. };
  28. &sdhost {
  29. @@ -120,6 +125,11 @@
  30. hpd-gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
  31. };
  32. +&audio {
  33. + pinctrl-names = "default";
  34. + pinctrl-0 = <&audio_pins>;
  35. +};
  36. +
  37. / {
  38. __overrides__ {
  39. uart0 = <&uart0>,"status";
  40. --- a/arch/arm/boot/dts/bcm2708-rpi-b.dts
  41. +++ b/arch/arm/boot/dts/bcm2708-rpi-b.dts
  42. @@ -36,6 +36,10 @@
  43. i2s_pins: i2s {
  44. brcm,pins = <28 29 30 31>;
  45. brcm,function = <6>; /* alt2 */
  46. +
  47. + audio_pins: audio_pins {
  48. + brcm,pins = <40 45>;
  49. + brcm,function = <4>;
  50. };
  51. };
  52. @@ -114,6 +118,11 @@
  53. hpd-gpios = <&gpio 46 GPIO_ACTIVE_HIGH>;
  54. };
  55. +&audio {
  56. + pinctrl-names = "default";
  57. + pinctrl-0 = <&audio_pins>;
  58. +};
  59. +
  60. / {
  61. __overrides__ {
  62. uart0 = <&uart0>,"status";
  63. --- a/arch/arm/boot/dts/bcm2709-rpi-2-b.dts
  64. +++ b/arch/arm/boot/dts/bcm2709-rpi-2-b.dts
  65. @@ -37,6 +37,11 @@
  66. brcm,pins = <18 19 20 21>;
  67. brcm,function = <4>; /* alt0 */
  68. };
  69. +
  70. + audio_pins: audio_pins {
  71. + brcm,pins = <40 45>;
  72. + brcm,function = <4>;
  73. + };
  74. };
  75. &sdhost {
  76. @@ -120,6 +125,11 @@
  77. hpd-gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
  78. };
  79. +&audio {
  80. + pinctrl-names = "default";
  81. + pinctrl-0 = <&audio_pins>;
  82. +};
  83. +
  84. / {
  85. __overrides__ {
  86. uart0 = <&uart0>,"status";
  87. --- a/arch/arm/boot/dts/bcm2710-rpi-3-b.dts
  88. +++ b/arch/arm/boot/dts/bcm2710-rpi-3-b.dts
  89. @@ -61,6 +61,11 @@
  90. brcm,function;
  91. brcm,pull;
  92. };
  93. +
  94. + audio_pins: audio_pins {
  95. + brcm,pins = <40 41>;
  96. + brcm,function = <4>;
  97. + };
  98. };
  99. &sdhost {
  100. @@ -165,6 +170,11 @@
  101. hpd-gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
  102. };
  103. +&audio {
  104. + pinctrl-names = "default";
  105. + pinctrl-0 = <&audio_pins>;
  106. +};
  107. +
  108. / {
  109. chosen {
  110. bootargs = "8250.nr_uarts=1";