* [PATCH 1/1] riscv: add DT binding for BOOT button on Maix board
@ 2020-09-02 20:11 Heinrich Schuchardt
2020-09-11 7:14 ` Bin Meng
0 siblings, 1 reply; 3+ messages in thread
From: Heinrich Schuchardt @ 2020-09-02 20:11 UTC (permalink / raw)
To: u-boot
Add a device tree binding for the BOOT button on the Maix board.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
---
Together with
[PATCH 1/1] cmd/button: return button status
https://lists.denx.de/pipermail/u-boot/2020-September/425221.html
we can use the button status to decide which program to boot.
---
arch/riscv/dts/k210-maix-bit.dts | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/arch/riscv/dts/k210-maix-bit.dts b/arch/riscv/dts/k210-maix-bit.dts
index e840e04ada..c2beec602c 100644
--- a/arch/riscv/dts/k210-maix-bit.dts
+++ b/arch/riscv/dts/k210-maix-bit.dts
@@ -8,6 +8,7 @@
#include "k210.dtsi"
#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
/ {
model = "Sipeed Maix Bit 2.0";
@@ -33,6 +34,16 @@
};
};
+ gpio-keys {
+ compatible = "gpio-keys";
+
+ boot {
+ label = "BOOT";
+ linux,code = <BTN_0>;
+ gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
+ };
+ };
+
sound {
compatible = "simple-audio-card";
simple-audio-card,format = "i2s";
--
2.28.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 1/1] riscv: add DT binding for BOOT button on Maix board
2020-09-02 20:11 [PATCH 1/1] riscv: add DT binding for BOOT button on Maix board Heinrich Schuchardt
@ 2020-09-11 7:14 ` Bin Meng
2020-09-11 8:17 ` Heinrich Schuchardt
0 siblings, 1 reply; 3+ messages in thread
From: Bin Meng @ 2020-09-11 7:14 UTC (permalink / raw)
To: u-boot
On Thu, Sep 3, 2020 at 4:12 AM Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:
>
> Add a device tree binding for the BOOT button on the Maix board.
>
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> ---
> Together with
> [PATCH 1/1] cmd/button: return button status
> https://lists.denx.de/pipermail/u-boot/2020-September/425221.html
> we can use the button status to decide which program to boot.
> ---
> arch/riscv/dts/k210-maix-bit.dts | 11 +++++++++++
> 1 file changed, 11 insertions(+)
>
> diff --git a/arch/riscv/dts/k210-maix-bit.dts b/arch/riscv/dts/k210-maix-bit.dts
> index e840e04ada..c2beec602c 100644
> --- a/arch/riscv/dts/k210-maix-bit.dts
> +++ b/arch/riscv/dts/k210-maix-bit.dts
> @@ -8,6 +8,7 @@
> #include "k210.dtsi"
>
> #include <dt-bindings/gpio/gpio.h>
> +#include <dt-bindings/input/input.h>
>
> / {
> model = "Sipeed Maix Bit 2.0";
> @@ -33,6 +34,16 @@
> };
> };
>
> + gpio-keys {
> + compatible = "gpio-keys";
> +
> + boot {
> + label = "BOOT";
> + linux,code = <BTN_0>;
I cannot find how U-Boot is handling "linux,code". Any pointers?
> + gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
> + };
> + };
> +
> sound {
> compatible = "simple-audio-card";
> simple-audio-card,format = "i2s";
> --
Regards,
Bin
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 1/1] riscv: add DT binding for BOOT button on Maix board
2020-09-11 7:14 ` Bin Meng
@ 2020-09-11 8:17 ` Heinrich Schuchardt
0 siblings, 0 replies; 3+ messages in thread
From: Heinrich Schuchardt @ 2020-09-11 8:17 UTC (permalink / raw)
To: u-boot
On 11.09.20 09:14, Bin Meng wrote:
> On Thu, Sep 3, 2020 at 4:12 AM Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:
>>
>> Add a device tree binding for the BOOT button on the Maix board.
>>
>> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
>> ---
>> Together with
>> [PATCH 1/1] cmd/button: return button status
>> https://lists.denx.de/pipermail/u-boot/2020-September/425221.html
>> we can use the button status to decide which program to boot.
>> ---
>> arch/riscv/dts/k210-maix-bit.dts | 11 +++++++++++
>> 1 file changed, 11 insertions(+)
>>
>> diff --git a/arch/riscv/dts/k210-maix-bit.dts b/arch/riscv/dts/k210-maix-bit.dts
>> index e840e04ada..c2beec602c 100644
>> --- a/arch/riscv/dts/k210-maix-bit.dts
>> +++ b/arch/riscv/dts/k210-maix-bit.dts
>> @@ -8,6 +8,7 @@
>> #include "k210.dtsi"
>>
>> #include <dt-bindings/gpio/gpio.h>
>> +#include <dt-bindings/input/input.h>
>>
>> / {
>> model = "Sipeed Maix Bit 2.0";
>> @@ -33,6 +34,16 @@
>> };
>> };
>>
>> + gpio-keys {
>> + compatible = "gpio-keys";
>> +
>> + boot {
>> + label = "BOOT";
>> + linux,code = <BTN_0>;
>
> I cannot find how U-Boot is handling "linux,code". Any pointers?
U-Boot does not use the information. It is used by Linux to determine
which key code should be emitted. See
Documentation/devicetree/bindings/input/gpio-keys.txt
Hence this entry is only relevant if we pass our internal device tree to
Linux. In arch/arm/dts/ I saw that the property is typically set.
Best regards
Heinrich
>
>> + gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
>> + };
>> + };
>> +
>> sound {
>> compatible = "simple-audio-card";
>> simple-audio-card,format = "i2s";
>> --
>
> Regards,
> Bin
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-09-11 8:17 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-02 20:11 [PATCH 1/1] riscv: add DT binding for BOOT button on Maix board Heinrich Schuchardt
2020-09-11 7:14 ` Bin Meng
2020-09-11 8:17 ` Heinrich Schuchardt
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.