summaryrefslogtreecommitdiffstats
path: root/board/lego/ev3/patches/linux/0002-sound-device-tree-node.patch
diff options
context:
space:
mode:
authorDavid Lechner <david@lechnology.com>2017-05-15 18:21:23 -0500
committerPeter Korsgaard <peter@korsgaard.com>2017-05-16 22:55:37 +0200
commitda6d09788133bf10dccf6482ee812ff30060f86e (patch)
tree80409d8259df22932afa9544fe3622fd06af3afe /board/lego/ev3/patches/linux/0002-sound-device-tree-node.patch
parent09dfdd07c52c7b01f41635cd035b5743a8a40b21 (diff)
downloadbuildroot-da6d09788133bf10dccf6482ee812ff30060f86e.tar.gz
buildroot-da6d09788133bf10dccf6482ee812ff30060f86e.zip
lego: ev3: use mainline kernel
It is finally possible to boot LEGO MINDSTORMS EV3 from the mainline Linux kernel. This patch updates the defconfg to use the mainline kernel instead of the custom ev3dev kernel. [Peter: lock kernel headers version] Signed-off-by: David Lechner <david@lechnology.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Diffstat (limited to 'board/lego/ev3/patches/linux/0002-sound-device-tree-node.patch')
-rw-r--r--board/lego/ev3/patches/linux/0002-sound-device-tree-node.patch85
1 files changed, 85 insertions, 0 deletions
diff --git a/board/lego/ev3/patches/linux/0002-sound-device-tree-node.patch b/board/lego/ev3/patches/linux/0002-sound-device-tree-node.patch
new file mode 100644
index 0000000000..a095222c2f
--- /dev/null
+++ b/board/lego/ev3/patches/linux/0002-sound-device-tree-node.patch
@@ -0,0 +1,85 @@
+From 7723d70bebd749ef24fef19db52d827c7fd7f858 Mon Sep 17 00:00:00 2001
+From: David Lechner <david@lechnology.com>
+Date: Tue, 7 Feb 2017 13:22:09 -0600
+Subject: ARM: da850-lego-ev3: Add device tree node for sound
+
+This adds a device tree node for sound on LEGO MINDSTORMS EV3. The EV3
+uses one of the SoC PWMs connected to an amplifier to create sound from
+a speaker.
+
+The PWM is passed through a low-pass filter, so it is actually possible
+to do PCM playback, but there is no existing driver, so just using
+pwm-beeper for now, since it is also a compatible mode of operation.
+
+Signed-off-by: David Lechner <david@lechnology.com>
+Signed-off-by: Sekhar Nori <nsekhar@ti.com>
+---
+ arch/arm/boot/dts/da850-lego-ev3.dts | 31 +++++++++++++++++++++++++++++++
+ 1 file changed, 31 insertions(+)
+
+diff --git a/arch/arm/boot/dts/da850-lego-ev3.dts b/arch/arm/boot/dts/da850-lego-ev3.dts
+index 0309537..c20580a 100644
+--- a/arch/arm/boot/dts/da850-lego-ev3.dts
++++ b/arch/arm/boot/dts/da850-lego-ev3.dts
+@@ -123,6 +123,14 @@
+ pinctrl-0 = <&system_power_pin>;
+ };
+
++ sound {
++ compatible = "pwm-beeper";
++ pinctrl-names = "default";
++ pinctrl-0 = <&ehrpwm0b_pins>;
++ pwms = <&ehrpwm0 1 1000000 0>;
++ amp-supply = <&amp>;
++ };
++
+ /*
+ * This is a 5V current limiting regulator that is shared by USB,
+ * the sensor (input) ports, the motor (output) ports and the A/DC.
+@@ -152,6 +160,18 @@
+ regulator-boot-on;
+ vin-supply = <&vcc5v>;
+ };
++
++ /*
++ * This is the amplifier for the speaker.
++ */
++ amp: regulator3 {
++ pinctrl-names = "default";
++ pinctrl-0 = <&amp_pins>;
++ compatible = "regulator-fixed";
++ regulator-name = "amp";
++ gpio = <&gpio 111 GPIO_ACTIVE_HIGH>;
++ enable-active-high;
++ };
+ };
+
+ &pmx_core {
+@@ -208,6 +228,13 @@
+ 0x4c 0x00008000 0x0000f000
+ >;
+ };
++
++ amp_pins: pinmux_amp_pins {
++ pinctrl-single,bits = <
++ /* GP6[15] */
++ 0x34 0x00000008 0x0000000f
++ >;
++ };
+ };
+
+ &pinconf {
+@@ -316,6 +343,10 @@
+ };
+ };
+
++&ehrpwm0 {
++ status = "okay";
++};
++
+ &gpio {
+ status = "okay";
+ };
+--
+cgit v1.1
+
OpenPOWER on IntegriCloud