* [PATCH 0/3] A/C and Sound device tree nodes for LEGO MINDSTORMS EV3
@ 2017-02-07 19:22 David Lechner
2017-02-07 19:22 ` [PATCH 1/3] ARM: da850-lego-ev3: Add device tree node for A/DC David Lechner
` (3 more replies)
0 siblings, 4 replies; 6+ messages in thread
From: David Lechner @ 2017-02-07 19:22 UTC (permalink / raw)
To: linux-arm-kernel, devicetree
Cc: David Lechner, Sekhar Nori, Kevin Hilman, Rob Herring,
Mark Rutland, linux-kernel
This series adds device tree nodes for an analog/digital convert and for sound
on LEGO MINDSTORMS EV3. The device tree bindings for these nodes have been acked
and the drivers used by these nodes have been in linux-next for a couple weeks
now and as far as I know, will be included in mainline v4.11.
This series has been tested on LEGO MINDSTORMS EV3 using next-20170207 merged
with linux-davinci/master.
David Lechner (3):
ARM: da850-lego-ev3: Add device tree node for A/DC
ARM: davinci_all_defconfig: Enable TI ADS7950
ARM: da850-lego-ev3: Add device tree node for sound
arch/arm/boot/dts/da850-lego-ev3.dts | 52 ++++++++++++++++++++++++++++++++++
arch/arm/configs/davinci_all_defconfig | 4 +--
2 files changed, 53 insertions(+), 3 deletions(-)
--
2.7.4
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/3] ARM: da850-lego-ev3: Add device tree node for A/DC
2017-02-07 19:22 [PATCH 0/3] A/C and Sound device tree nodes for LEGO MINDSTORMS EV3 David Lechner
@ 2017-02-07 19:22 ` David Lechner
2017-02-07 19:22 ` [PATCH 2/3] ARM: davinci_all_defconfig: Enable TI ADS7950 David Lechner
` (2 subsequent siblings)
3 siblings, 0 replies; 6+ messages in thread
From: David Lechner @ 2017-02-07 19:22 UTC (permalink / raw)
To: linux-arm-kernel, devicetree
Cc: David Lechner, Sekhar Nori, Kevin Hilman, Rob Herring,
Mark Rutland, linux-kernel
This adds a node for the TI ADS7957 analog/digital converter on LEGO
MINDSTORMS EV3 as well as a regulator node that is used by the A/DC node.
Signed-off-by: David Lechner <david@lechnology.com>
---
arch/arm/boot/dts/da850-lego-ev3.dts | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/arch/arm/boot/dts/da850-lego-ev3.dts b/arch/arm/boot/dts/da850-lego-ev3.dts
index 112ec92..0309537 100644
--- a/arch/arm/boot/dts/da850-lego-ev3.dts
+++ b/arch/arm/boot/dts/da850-lego-ev3.dts
@@ -139,6 +139,19 @@
enable-active-high;
regulator-boot-on;
};
+
+ /*
+ * This is a simple voltage divider on VCC5V to provide a 2.5V
+ * reference signal to the ADC.
+ */
+ adc_ref: regulator2 {
+ compatible = "regulator-fixed";
+ regulator-name = "adc ref";
+ regulator-min-microvolt = <2500000>;
+ regulator-max-microvolt = <2500000>;
+ regulator-boot-on;
+ vin-supply = <&vcc5v>;
+ };
};
&pmx_core {
@@ -293,6 +306,14 @@
};
};
};
+
+ adc: adc@3 {
+ compatible = "ti,ads7957";
+ reg = <3>;
+ #io-channel-cells = <1>;
+ spi-max-frequency = <10000000>;
+ vref-supply = <&adc_ref>;
+ };
};
&gpio {
--
2.7.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/3] ARM: davinci_all_defconfig: Enable TI ADS7950
2017-02-07 19:22 [PATCH 0/3] A/C and Sound device tree nodes for LEGO MINDSTORMS EV3 David Lechner
2017-02-07 19:22 ` [PATCH 1/3] ARM: da850-lego-ev3: Add device tree node for A/DC David Lechner
@ 2017-02-07 19:22 ` David Lechner
2017-02-07 19:22 ` [PATCH 3/3] ARM: da850-lego-ev3: Add device tree node for sound David Lechner
2017-02-20 10:36 ` [PATCH 0/3] A/C and Sound device tree nodes for LEGO MINDSTORMS EV3 Sekhar Nori
3 siblings, 0 replies; 6+ messages in thread
From: David Lechner @ 2017-02-07 19:22 UTC (permalink / raw)
To: linux-arm-kernel, devicetree
Cc: David Lechner, Sekhar Nori, Kevin Hilman, Rob Herring,
Mark Rutland, linux-kernel
This enables the TI ADS7950 IIO driver. This is used on LEGO MINDSTORMS
EV3. The other IIO configs removed in this patch are selected by
CONFIG_TI_ADS7950, so they are not actually being desabled.
Signed-off-by: David Lechner <david@lechnology.com>
---
arch/arm/configs/davinci_all_defconfig | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/arch/arm/configs/davinci_all_defconfig b/arch/arm/configs/davinci_all_defconfig
index c8663ea..0a95fc4 100644
--- a/arch/arm/configs/davinci_all_defconfig
+++ b/arch/arm/configs/davinci_all_defconfig
@@ -204,12 +204,10 @@ CONFIG_MEMORY=y
CONFIG_TI_AEMIF=m
CONFIG_DA8XX_DDRCTL=y
CONFIG_IIO=m
-CONFIG_IIO_BUFFER=y
CONFIG_IIO_BUFFER_CB=m
-CONFIG_IIO_KFIFO_BUF=m
-CONFIG_IIO_TRIGGER=y
CONFIG_IIO_SW_DEVICE=m
CONFIG_IIO_SW_TRIGGER=m
+CONFIG_TI_ADS7950=m
CONFIG_IIO_HRTIMER_TRIGGER=m
CONFIG_IIO_SYSFS_TRIGGER=m
CONFIG_PWM=y
--
2.7.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 3/3] ARM: da850-lego-ev3: Add device tree node for sound
2017-02-07 19:22 [PATCH 0/3] A/C and Sound device tree nodes for LEGO MINDSTORMS EV3 David Lechner
2017-02-07 19:22 ` [PATCH 1/3] ARM: da850-lego-ev3: Add device tree node for A/DC David Lechner
2017-02-07 19:22 ` [PATCH 2/3] ARM: davinci_all_defconfig: Enable TI ADS7950 David Lechner
@ 2017-02-07 19:22 ` David Lechner
2017-02-20 10:36 ` [PATCH 0/3] A/C and Sound device tree nodes for LEGO MINDSTORMS EV3 Sekhar Nori
3 siblings, 0 replies; 6+ messages in thread
From: David Lechner @ 2017-02-07 19:22 UTC (permalink / raw)
To: linux-arm-kernel, devicetree
Cc: David Lechner, Sekhar Nori, Kevin Hilman, Rob Herring,
Mark Rutland, linux-kernel
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>
---
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 = <&>;
+ };
+
/*
* 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 = <&_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";
};
--
2.7.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 0/3] A/C and Sound device tree nodes for LEGO MINDSTORMS EV3
2017-02-07 19:22 [PATCH 0/3] A/C and Sound device tree nodes for LEGO MINDSTORMS EV3 David Lechner
` (2 preceding siblings ...)
2017-02-07 19:22 ` [PATCH 3/3] ARM: da850-lego-ev3: Add device tree node for sound David Lechner
@ 2017-02-20 10:36 ` Sekhar Nori
2017-03-07 10:41 ` Sekhar Nori
3 siblings, 1 reply; 6+ messages in thread
From: Sekhar Nori @ 2017-02-20 10:36 UTC (permalink / raw)
To: David Lechner, linux-arm-kernel, devicetree
Cc: Kevin Hilman, Rob Herring, Mark Rutland, linux-kernel
On Wednesday 08 February 2017 12:52 AM, David Lechner wrote:
> This series adds device tree nodes for an analog/digital convert and for sound
> on LEGO MINDSTORMS EV3. The device tree bindings for these nodes have been acked
> and the drivers used by these nodes have been in linux-next for a couple weeks
> now and as far as I know, will be included in mainline v4.11.
>
> This series has been tested on LEGO MINDSTORMS EV3 using next-20170207 merged
> with linux-davinci/master.
Looks good to me. Will wait for device tree maintainers. And also for
v4.11-rc1 to come out.
Thanks,
Sekhar
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 0/3] A/C and Sound device tree nodes for LEGO MINDSTORMS EV3
2017-02-20 10:36 ` [PATCH 0/3] A/C and Sound device tree nodes for LEGO MINDSTORMS EV3 Sekhar Nori
@ 2017-03-07 10:41 ` Sekhar Nori
0 siblings, 0 replies; 6+ messages in thread
From: Sekhar Nori @ 2017-03-07 10:41 UTC (permalink / raw)
To: David Lechner, linux-arm-kernel, devicetree
Cc: Mark Rutland, Kevin Hilman, Rob Herring, linux-kernel
On Monday 20 February 2017 04:06 PM, Sekhar Nori wrote:
> On Wednesday 08 February 2017 12:52 AM, David Lechner wrote:
>> This series adds device tree nodes for an analog/digital convert and for sound
>> on LEGO MINDSTORMS EV3. The device tree bindings for these nodes have been acked
>> and the drivers used by these nodes have been in linux-next for a couple weeks
>> now and as far as I know, will be included in mainline v4.11.
>>
>> This series has been tested on LEGO MINDSTORMS EV3 using next-20170207 merged
>> with linux-davinci/master.
>
> Looks good to me. Will wait for device tree maintainers. And also for
> v4.11-rc1 to come out.
Applied now.
Thanks,
Sekhar
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2017-03-07 10:50 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-07 19:22 [PATCH 0/3] A/C and Sound device tree nodes for LEGO MINDSTORMS EV3 David Lechner
2017-02-07 19:22 ` [PATCH 1/3] ARM: da850-lego-ev3: Add device tree node for A/DC David Lechner
2017-02-07 19:22 ` [PATCH 2/3] ARM: davinci_all_defconfig: Enable TI ADS7950 David Lechner
2017-02-07 19:22 ` [PATCH 3/3] ARM: da850-lego-ev3: Add device tree node for sound David Lechner
2017-02-20 10:36 ` [PATCH 0/3] A/C and Sound device tree nodes for LEGO MINDSTORMS EV3 Sekhar Nori
2017-03-07 10:41 ` Sekhar Nori
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).