Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7723d70b authored by David Lechner's avatar David Lechner Committed by Sekhar Nori
Browse files

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: default avatarDavid Lechner <david@lechnology.com>
Signed-off-by: default avatarSekhar Nori <nsekhar@ti.com>
parent 8a81ff17
Loading
Loading
Loading
Loading
+31 −0
Original line number Diff line number Diff line
@@ -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";
};