[U-Boot] [U-Boot, 2/3] rockchip: rv1108: add adc key dt node for evb_rv1108

Philipp Tomsich philipp.tomsich at theobroma-systems.com
Tue Nov 28 13:58:54 UTC 2017


+sjg

On Tue, 28 Nov 2017, Andy Yan wrote:

> RV1108 EVB uses a adc-based recovery(VOL+) key, which
> connected to saradc channel 0.
> This patch add dt node for it.
>
> Signed-off-by: Andy Yan <andy.yan at rock-chips.com>
> Acked-by: Philipp Tomsich <philipp.tomsich at theobroma-systems.com>

See below for comments.

> ---
>
> arch/arm/dts/rv1108-evb.dts | 21 +++++++++++++++++++++
> 1 file changed, 21 insertions(+)
>
> diff --git a/arch/arm/dts/rv1108-evb.dts b/arch/arm/dts/rv1108-evb.dts
> index 8e857b2..66da40c 100644
> --- a/arch/arm/dts/rv1108-evb.dts
> +++ b/arch/arm/dts/rv1108-evb.dts
> @@ -7,11 +7,32 @@
> /dts-v1/;
>
> #include "rv1108.dtsi"
> +#include <dt-bindings/input/input.h>
>
> / {
> 	model = "Rockchip RV1108 Evaluation board";
> 	compatible = "rockchip,rv1108-evb", "rockchip,rv1108";
>
> +	adc-keys {
> +		compatible = "adc-keys";

The DTS-binding should be documented in the documentation directory.

"adc-keys" seems to be a standard binding in Linux and used by the input 
subsystem: so this sounds like it should be a driver in  drivers/input for 
U-Boot that uses an ADC driver.

> +		io-channels = <&saradc 0>;
> +		io-channel-names = "buttons";
> +		poll-interval = <100>;
> +		keyup-threshold-microvolt = <3300000>;
> +
> +		button-up {
> +			label = "Volume Up";
> +			linux,code = <KEY_VOLUMEUP>;
> +			press-threshold-microvolt = <0>;
> +		};
> +
> +		button-down {
> +			label = "Volume Down";
> +			linux,code = <KEY_VOLUMEDOWN>;
> +			press-threshold-microvolt = <1650000>;
> +		};
> +	};
> +
> 	memory at 60000000 {
> 		device_type = "memory";
> 		reg = <0x60000000 0x08000000>;
>


More information about the U-Boot mailing list