2015-12-10 20:33:09

by Karsten Merker

[permalink] [raw]
Subject: [PATCH 0/3] ARM: dts: sun7i: Olimex A20-SOM-EVB: LRADC-keys, MMC3 and typo fix in the sunxi LRADC binding

Hello,

the Olimex A20-SOM-EVB is an evaluation board for the Olimex
A20-SOM system-on-module. This patchset adds/enables some more
hardware features in the board dts:

- Patch 1 adds support for the LRADC-keys on the baseboard.

- Patch 2 enables the MMC3 controller to allow use of the
full-size SD card socket on the baseboard.

While adding the LRADC-keys support, I have stumbled over
a typo in the bindings documentation. Patch 3 fixes that.

Regards,
Karsten

Karsten Merker (3):
ARM: dts: sun7i: Olimex A20-SOM-EVB: Add LRADC keys
ARM: dts: sun7i: Olimex A20-SOM-EVB: Enable mmc3 (baseboard SD socket)
ARM: dts: sunxi: allwinner,sun4i-a10-lradc-keys binding: typo fix

.../devicetree/bindings/input/sun4i-lradc-keys.txt | 2 +-
arch/arm/boot/dts/sun7i-a20-olimex-som-evb.dts | 73 ++++++++++++++++++++++
2 files changed, 74 insertions(+), 1 deletion(-)

--
2.1.4


2015-12-10 20:33:15

by Karsten Merker

[permalink] [raw]
Subject: [PATCH 1/3] ARM: dts: sun7i: Olimex A20-SOM-EVB: Add LRADC keys

The Olimex A20-SOM-EVB is an evaluation board for the Olimex
A20-SOM system-on-module. It provides a set of android-style
buttons (labeled "VOL+", "VOL-", "MENU", "SEARCH", "HOME", "ESC"
and "ENTER") which are connected to a low-resolution ADC via a
resistor network.

This patch adds appropriate button definitions to the board
dts. The voltages assigned to the keys are specified in the
board schematics published by the manufacturer.

Signed-off-by: Karsten Merker <[email protected]>
---
arch/arm/boot/dts/sun7i-a20-olimex-som-evb.dts | 56 ++++++++++++++++++++++++++
1 file changed, 56 insertions(+)

diff --git a/arch/arm/boot/dts/sun7i-a20-olimex-som-evb.dts b/arch/arm/boot/dts/sun7i-a20-olimex-som-evb.dts
index b7fe102..6562a6bc 100644
--- a/arch/arm/boot/dts/sun7i-a20-olimex-som-evb.dts
+++ b/arch/arm/boot/dts/sun7i-a20-olimex-som-evb.dts
@@ -1,5 +1,6 @@
/*
* Copyright 2015 - Marcus Cooper <[email protected]>
+ * Copyright 2015 - Karsten Merker <[email protected]>
*
* This file is dual-licensed: you can use it either under the terms
* of the GPL or the X11 license, at your option. Note that this dual
@@ -45,6 +46,7 @@
#include "sunxi-common-regulators.dtsi"

#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/pinctrl/sun4i-a10.h>

@@ -110,6 +112,60 @@
};
};

+&lradc {
+ vref-supply = <&reg_vcc3v0>;
+ status = "okay";
+
+ button@190 {
+ label = "Volume Up";
+ linux,code = <KEY_VOLUMEUP>;
+ channel = <0>;
+ voltage = <190000>;
+ };
+
+ button@390 {
+ label = "Volume Down";
+ linux,code = <KEY_VOLUMEDOWN>;
+ channel = <0>;
+ voltage = <390000>;
+ };
+
+ button@600 {
+ label = "Menu";
+ linux,code = <KEY_MENU>;
+ channel = <0>;
+ voltage = <600000>;
+ };
+
+ button@800 {
+ label = "Search";
+ linux,code = <KEY_SEARCH>;
+ channel = <0>;
+ voltage = <800000>;
+ };
+
+ button@980 {
+ label = "Home";
+ linux,code = <KEY_HOMEPAGE>;
+ channel = <0>;
+ voltage = <980000>;
+ };
+
+ button@1180 {
+ label = "Esc";
+ linux,code = <KEY_ESC>;
+ channel = <0>;
+ voltage = <1180000>;
+ };
+
+ button@1400 {
+ label = "Enter";
+ linux,code = <KEY_ENTER>;
+ channel = <0>;
+ voltage = <1400000>;
+ };
+};
+
&mmc0 {
pinctrl-names = "default";
pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
--
2.1.4

2015-12-10 20:33:07

by Karsten Merker

[permalink] [raw]
Subject: [PATCH 2/3] ARM: dts: sun7i: Olimex A20-SOM-EVB: Enable mmc3 (baseboard SD socket)

The Olimex A20-SOM-EVB is an evaluation board for the Olimex
A20-SOM system-on-module. The baseboard provides a full-size SD
socket (connected to mmc3) in addition to the micro-SD socket on
the SOM itself (which is connected to mmc0).

Enable the mmc3 controller in the dts.

Signed-off-by: Karsten Merker <[email protected]>
---
arch/arm/boot/dts/sun7i-a20-olimex-som-evb.dts | 17 +++++++++++++++++
1 file changed, 17 insertions(+)

diff --git a/arch/arm/boot/dts/sun7i-a20-olimex-som-evb.dts b/arch/arm/boot/dts/sun7i-a20-olimex-som-evb.dts
index 6562a6bc..6a3d95d 100644
--- a/arch/arm/boot/dts/sun7i-a20-olimex-som-evb.dts
+++ b/arch/arm/boot/dts/sun7i-a20-olimex-som-evb.dts
@@ -176,6 +176,16 @@
status = "okay";
};

+&mmc3 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&mmc3_pins_a>, <&mmc3_cd_pin_olimex_som_evb>;
+ vmmc-supply = <&reg_vcc3v3>;
+ bus-width = <4>;
+ cd-gpios = <&pio 7 0 GPIO_ACTIVE_HIGH>; /* PH0 */
+ cd-inverted;
+ status = "okay";
+};
+
&ohci0 {
status = "okay";
};
@@ -198,6 +208,13 @@
allwinner,drive = <SUN4I_PINCTRL_20_MA>;
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
};
+
+ mmc3_cd_pin_olimex_som_evb: mmc3_cd_pin@0 {
+ allwinner,pins = "PH0";
+ allwinner,function = "gpio_in";
+ allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+ allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
+ };
};

&reg_ahci_5v {
--
2.1.4

2015-12-10 20:33:24

by Karsten Merker

[permalink] [raw]
Subject: [PATCH 3/3] ARM: dts: sunxi: allwinner,sun4i-a10-lradc-keys binding: typo fix

Trivial typo fix ("mut" -> "must") in the sunxi LRADC-keys binding
documentation.

Signed-off-by: Karsten Merker <[email protected]>
---
Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt b/Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt
index b9c32f6..4357e49 100644
--- a/Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt
+++ b/Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt
@@ -12,7 +12,7 @@ Each key is represented as a sub-node of "allwinner,sun4i-a10-lradc-keys":
Required subnode-properties:
- label: Descriptive name of the key.
- linux,code: Keycode to emit.
- - channel: Channel this key is attached to, mut be 0 or 1.
+ - channel: Channel this key is attached to, must be 0 or 1.
- voltage: Voltage in µV at lradc input when this key is pressed.

Example:
--
2.1.4

2015-12-11 03:45:30

by Rob Herring (Arm)

[permalink] [raw]
Subject: Re: [PATCH 3/3] ARM: dts: sunxi: allwinner,sun4i-a10-lradc-keys binding: typo fix

On Thu, Dec 10, 2015 at 09:32:01PM +0100, Karsten Merker wrote:
> Trivial typo fix ("mut" -> "must") in the sunxi LRADC-keys binding
> documentation.
>
> Signed-off-by: Karsten Merker <[email protected]>

Acked-by: Rob Herring <[email protected]>

> ---
> Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt b/Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt
> index b9c32f6..4357e49 100644
> --- a/Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt
> +++ b/Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt
> @@ -12,7 +12,7 @@ Each key is represented as a sub-node of "allwinner,sun4i-a10-lradc-keys":
> Required subnode-properties:
> - label: Descriptive name of the key.
> - linux,code: Keycode to emit.
> - - channel: Channel this key is attached to, mut be 0 or 1.
> + - channel: Channel this key is attached to, must be 0 or 1.
> - voltage: Voltage in ?V at lradc input when this key is pressed.
>
> Example:
> --
> 2.1.4
>

2015-12-11 03:54:28

by Chen-Yu Tsai

[permalink] [raw]
Subject: Re: [PATCH 3/3] ARM: dts: sunxi: allwinner,sun4i-a10-lradc-keys binding: typo fix

On Fri, Dec 11, 2015 at 11:45 AM, Rob Herring <[email protected]> wrote:
> On Thu, Dec 10, 2015 at 09:32:01PM +0100, Karsten Merker wrote:
>> Trivial typo fix ("mut" -> "must") in the sunxi LRADC-keys binding
>> documentation.
>>
>> Signed-off-by: Karsten Merker <[email protected]>
>
> Acked-by: Rob Herring <[email protected]>

Acked-by: Chen-Yu Tsai <[email protected]>

2015-12-11 03:56:10

by Chen-Yu Tsai

[permalink] [raw]
Subject: Re: [PATCH 3/3] ARM: dts: sunxi: allwinner,sun4i-a10-lradc-keys binding: typo fix

On Fri, Dec 11, 2015 at 11:54 AM, Chen-Yu Tsai <[email protected]> wrote:
> On Fri, Dec 11, 2015 at 11:45 AM, Rob Herring <[email protected]> wrote:
>> On Thu, Dec 10, 2015 at 09:32:01PM +0100, Karsten Merker wrote:
>>> Trivial typo fix ("mut" -> "must") in the sunxi LRADC-keys binding
>>> documentation.
>>>
>>> Signed-off-by: Karsten Merker <[email protected]>
>>
>> Acked-by: Rob Herring <[email protected]>
>
> Acked-by: Chen-Yu Tsai <[email protected]>

You should send this patch to the input subsystem maintainer and input
mailing list (with all the acks gathered in this thread).

ChenYu

2015-12-11 04:06:07

by Chen-Yu Tsai

[permalink] [raw]
Subject: Re: [PATCH 1/3] ARM: dts: sun7i: Olimex A20-SOM-EVB: Add LRADC keys

On Fri, Dec 11, 2015 at 4:31 AM, Karsten Merker <[email protected]> wrote:
> The Olimex A20-SOM-EVB is an evaluation board for the Olimex
> A20-SOM system-on-module. It provides a set of android-style
> buttons (labeled "VOL+", "VOL-", "MENU", "SEARCH", "HOME", "ESC"
> and "ENTER") which are connected to a low-resolution ADC via a
> resistor network.
>
> This patch adds appropriate button definitions to the board
> dts. The voltages assigned to the keys are specified in the
> board schematics published by the manufacturer.
>
> Signed-off-by: Karsten Merker <[email protected]>

Acked-by: Chen-Yu Tsai <[email protected]>

2015-12-11 04:07:38

by Chen-Yu Tsai

[permalink] [raw]
Subject: Re: [PATCH 2/3] ARM: dts: sun7i: Olimex A20-SOM-EVB: Enable mmc3 (baseboard SD socket)

On Fri, Dec 11, 2015 at 4:32 AM, Karsten Merker <[email protected]> wrote:
> The Olimex A20-SOM-EVB is an evaluation board for the Olimex
> A20-SOM system-on-module. The baseboard provides a full-size SD
> socket (connected to mmc3) in addition to the micro-SD socket on
> the SOM itself (which is connected to mmc0).
>
> Enable the mmc3 controller in the dts.
>
> Signed-off-by: Karsten Merker <[email protected]>

Acked-by: Chen-Yu Tsai <[email protected]>

2015-12-11 08:22:12

by Maxime Ripard

[permalink] [raw]
Subject: Re: [PATCH 1/3] ARM: dts: sun7i: Olimex A20-SOM-EVB: Add LRADC keys

Hi,

On Thu, Dec 10, 2015 at 09:31:59PM +0100, Karsten Merker wrote:
> The Olimex A20-SOM-EVB is an evaluation board for the Olimex
> A20-SOM system-on-module. It provides a set of android-style
> buttons (labeled "VOL+", "VOL-", "MENU", "SEARCH", "HOME", "ESC"
> and "ENTER") which are connected to a low-resolution ADC via a
> resistor network.
>
> This patch adds appropriate button definitions to the board
> dts. The voltages assigned to the keys are specified in the
> board schematics published by the manufacturer.
>
> Signed-off-by: Karsten Merker <[email protected]>

Applied 1 and 2, thanks!
Maxime

--
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com


Attachments:
(No filename) (721.00 B)
signature.asc (819.00 B)
Digital signature
Download all attachments