aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/brcm2708/patches-4.4/0424-BCM270X_DT-Declare-the-audio-PWM-pins-explicitly.patch
blob: c0f2c39457c60ea5aea451b17309662cc7b36572 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
From 4a1655a918b26f5d24d04b1bb798feb39982ac78 Mon Sep 17 00:00:00 2001
From: Phil Elwell <phil@raspberrypi.org>
Date: Mon, 20 Jun 2016 13:21:26 +0100
Subject: [PATCH] BCM270X_DT: Declare the audio PWM pins explicitly

Make the audio driver's use of the PWM functions explicit. Overlays
that want to use the PWM functionality for other purposes must
disable the audio node.

See: https://github.com/raspberrypi/linux/issues/1473

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
---
 arch/arm/boot/dts/bcm2708-rpi-b-plus.dts | 10 ++++++++++
 arch/arm/boot/dts/bcm2708-rpi-b.dts      |  9 +++++++++
 arch/arm/boot/dts/bcm2709-rpi-2-b.dts    | 10 ++++++++++
 arch/arm/boot/dts/bcm2710-rpi-3-b.dts    | 10 ++++++++++
 4 files changed, 39 insertions(+)

--- a/arch/arm/boot/dts/bcm2708-rpi-b-plus.dts
+++ b/arch/arm/boot/dts/bcm2708-rpi-b-plus.dts
@@ -37,6 +37,11 @@
 		brcm,pins = <18 19 20 21>;
 		brcm,function = <4>; /* alt0 */
 	};
+
+	audio_pins: audio_pins {
+		brcm,pins = <40 45>;
+		brcm,function = <4>;
+	};
 };
 
 &sdhost {
@@ -120,6 +125,11 @@
 	hpd-gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
 };
 
+&audio {
+	pinctrl-names = "default";
+	pinctrl-0 = <&audio_pins>;
+};
+
 / {
 	__overrides__ {
 		uart0 = <&uart0>,"status";
--- a/arch/arm/boot/dts/bcm2708-rpi-b.dts
+++ b/arch/arm/boot/dts/bcm2708-rpi-b.dts
@@ -36,6 +36,10 @@
 	i2s_pins: i2s {
 		brcm,pins = <28 29 30 31>;
 		brcm,function = <6>; /* alt2 */
+
+	audio_pins: audio_pins {
+		brcm,pins = <40 45>;
+		brcm,function = <4>;
 	};
 };
 
@@ -114,6 +118,11 @@
 	hpd-gpios = <&gpio 46 GPIO_ACTIVE_HIGH>;
 };
 
+&audio {
+	pinctrl-names = "default";
+	pinctrl-0 = <&audio_pins>;
+};
+
 / {
 	__overrides__ {
 		uart0 = <&uart0>,"status";
--- a/arch/arm/boot/dts/bcm2709-rpi-2-b.dts
+++ b/arch/arm/boot/dts/bcm2709-rpi-2-b.dts
@@ -37,6 +37,11 @@
 		brcm,pins = <18 19 20 21>;
 		brcm,function = <4>; /* alt0 */
 	};
+
+	audio_pins: audio_pins {
+		brcm,pins = <40 45>;
+		brcm,function = <4>;
+	};
 };
 
 &sdhost {
@@ -120,6 +125,11 @@
 	hpd-gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
 };
 
+&audio {
+	pinctrl-names = "default";
+	pinctrl-0 = <&audio_pins>;
+};
+
 / {
 	__overrides__ {
 		uart0 = <&uart0>,"status";
--- a/arch/arm/boot/dts/bcm2710-rpi-3-b.dts
+++ b/arch/arm/boot/dts/bcm2710-rpi-3-b.dts
@@ -61,6 +61,11 @@
 		brcm,function;
 		brcm,pull;
 	};
+
+	audio_pins: audio_pins {
+		brcm,pins = <40 41>;
+		brcm,function = <4>;
+	};
 };
 
 &sdhost {
@@ -165,6 +170,11 @@
 	hpd-gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
 };
 
+&audio {
+	pinctrl-names = "default";
+	pinctrl-0 = <&audio_pins>;
+};
+
 / {
 	chosen {
 		bootargs = "8250.nr_uarts=1";