* [PATCH v2] ARM: dts: microchip: sama7d65: Add GPIO buttons and LEDs
@ 2025-09-17 21:04 Ryan.Wanner
2025-09-22 13:28 ` Nicolas Ferre
0 siblings, 1 reply; 2+ messages in thread
From: Ryan.Wanner @ 2025-09-17 21:04 UTC (permalink / raw)
To: robh, krzk+dt, conor+dt, nicolas.ferre, alexandre.belloni,
claudiu.beznea
Cc: devicetree, linux-arm-kernel, linux-kernel, linux-leds,
Ryan Wanner
From: Ryan Wanner <Ryan.Wanner@microchip.com>
Add the USER button as a GPIO input as well as add the LEDs and enable
the blue LED as a heartbeat.
Signed-off-by: Ryan Wanner <Ryan.Wanner@microchip.com>
---
Changes v1 -> v2:
- Remove the label node in the LEDs.
- Use properties color and function to describe the LEDs.
- Add phandles for the LEDs.
.../dts/microchip/at91-sama7d65_curiosity.dts | 51 +++++++++++++++++++
1 file changed, 51 insertions(+)
diff --git a/arch/arm/boot/dts/microchip/at91-sama7d65_curiosity.dts b/arch/arm/boot/dts/microchip/at91-sama7d65_curiosity.dts
index f091cc40a9f0..927c27260b6c 100644
--- a/arch/arm/boot/dts/microchip/at91-sama7d65_curiosity.dts
+++ b/arch/arm/boot/dts/microchip/at91-sama7d65_curiosity.dts
@@ -11,6 +11,8 @@
#include "sama7d65-pinfunc.h"
#include "sama7d65.dtsi"
#include <dt-bindings/mfd/atmel-flexcom.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
#include <dt-bindings/pinctrl/at91.h>
/ {
@@ -26,6 +28,43 @@ chosen {
stdout-path = "serial0:115200n8";
};
+ gpio-keys {
+ compatible = "gpio-keys";
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_key_gpio_default>;
+
+ button {
+ label = "PB_USER";
+ gpios = <&pioa PIN_PC10 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_PROG1>;
+ wakeup-source;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_led_gpio_default>;
+
+ led0: led-red {
+ color = <LED_COLOR_ID_RED>;
+ gpios = <&pioa PIN_PB17 GPIO_ACTIVE_HIGH>; /* Conflict with pwm. */
+ };
+
+ led1: led-green {
+ color = <LED_COLOR_ID_GREEN>;
+ gpios = <&pioa PIN_PB15 GPIO_ACTIVE_HIGH>; /* Conflict with pwm. */
+ };
+
+ led2: led-blue {
+ color = <LED_COLOR_ID_BLUE>;
+ function = LED_FUNCTION_HEARTBEAT;
+ gpios = <&pioa PIN_PA21 GPIO_ACTIVE_HIGH>;
+ linux,default-trigger = "heartbeat";
+ };
+ };
+
memory@60000000 {
device_type = "memory";
reg = <0x60000000 0x40000000>;
@@ -352,6 +391,18 @@ pinctrl_i2c10_default: i2c10-default {
bias-pull-up;
};
+ pinctrl_key_gpio_default: key-gpio-default {
+ pinmux = <PIN_PC10__GPIO>;
+ bias-pull-up;
+ };
+
+ pinctrl_led_gpio_default: led-gpio-default {
+ pinmux = <PIN_PB15__GPIO>,
+ <PIN_PB17__GPIO>,
+ <PIN_PA21__GPIO>;
+ bias-pull-up;
+ };
+
pinctrl_sdmmc1_default: sdmmc1-default {
cmd-data {
pinmux = <PIN_PB22__SDMMC1_CMD>,
--
2.43.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] ARM: dts: microchip: sama7d65: Add GPIO buttons and LEDs
2025-09-17 21:04 [PATCH v2] ARM: dts: microchip: sama7d65: Add GPIO buttons and LEDs Ryan.Wanner
@ 2025-09-22 13:28 ` Nicolas Ferre
0 siblings, 0 replies; 2+ messages in thread
From: Nicolas Ferre @ 2025-09-22 13:28 UTC (permalink / raw)
To: Ryan.Wanner, robh, krzk+dt, conor+dt, alexandre.belloni,
claudiu.beznea
Cc: devicetree, linux-arm-kernel, linux-kernel, linux-leds
On 17/09/2025 at 23:04, Ryan.Wanner@microchip.com wrote:
> From: Ryan Wanner <Ryan.Wanner@microchip.com>
>
> Add the USER button as a GPIO input as well as add the LEDs and enable
> the blue LED as a heartbeat.
>
> Signed-off-by: Ryan Wanner <Ryan.Wanner@microchip.com>
Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>
And queued in at91-dt branch.
Regards,
Nicolas
> ---
> Changes v1 -> v2:
> - Remove the label node in the LEDs.
> - Use properties color and function to describe the LEDs.
> - Add phandles for the LEDs.
>
> .../dts/microchip/at91-sama7d65_curiosity.dts | 51 +++++++++++++++++++
> 1 file changed, 51 insertions(+)
>
> diff --git a/arch/arm/boot/dts/microchip/at91-sama7d65_curiosity.dts b/arch/arm/boot/dts/microchip/at91-sama7d65_curiosity.dts
> index f091cc40a9f0..927c27260b6c 100644
> --- a/arch/arm/boot/dts/microchip/at91-sama7d65_curiosity.dts
> +++ b/arch/arm/boot/dts/microchip/at91-sama7d65_curiosity.dts
> @@ -11,6 +11,8 @@
> #include "sama7d65-pinfunc.h"
> #include "sama7d65.dtsi"
> #include <dt-bindings/mfd/atmel-flexcom.h>
> +#include <dt-bindings/input/input.h>
> +#include <dt-bindings/leds/common.h>
> #include <dt-bindings/pinctrl/at91.h>
>
> / {
> @@ -26,6 +28,43 @@ chosen {
> stdout-path = "serial0:115200n8";
> };
>
> + gpio-keys {
> + compatible = "gpio-keys";
> +
> + pinctrl-names = "default";
> + pinctrl-0 = <&pinctrl_key_gpio_default>;
> +
> + button {
> + label = "PB_USER";
> + gpios = <&pioa PIN_PC10 GPIO_ACTIVE_LOW>;
> + linux,code = <KEY_PROG1>;
> + wakeup-source;
> + };
> + };
> +
> + leds {
> + compatible = "gpio-leds";
> + pinctrl-names = "default";
> + pinctrl-0 = <&pinctrl_led_gpio_default>;
> +
> + led0: led-red {
> + color = <LED_COLOR_ID_RED>;
> + gpios = <&pioa PIN_PB17 GPIO_ACTIVE_HIGH>; /* Conflict with pwm. */
> + };
> +
> + led1: led-green {
> + color = <LED_COLOR_ID_GREEN>;
> + gpios = <&pioa PIN_PB15 GPIO_ACTIVE_HIGH>; /* Conflict with pwm. */
> + };
> +
> + led2: led-blue {
> + color = <LED_COLOR_ID_BLUE>;
> + function = LED_FUNCTION_HEARTBEAT;
> + gpios = <&pioa PIN_PA21 GPIO_ACTIVE_HIGH>;
> + linux,default-trigger = "heartbeat";
> + };
> + };
> +
> memory@60000000 {
> device_type = "memory";
> reg = <0x60000000 0x40000000>;
> @@ -352,6 +391,18 @@ pinctrl_i2c10_default: i2c10-default {
> bias-pull-up;
> };
>
> + pinctrl_key_gpio_default: key-gpio-default {
> + pinmux = <PIN_PC10__GPIO>;
> + bias-pull-up;
> + };
> +
> + pinctrl_led_gpio_default: led-gpio-default {
> + pinmux = <PIN_PB15__GPIO>,
> + <PIN_PB17__GPIO>,
> + <PIN_PA21__GPIO>;
> + bias-pull-up;
> + };
> +
> pinctrl_sdmmc1_default: sdmmc1-default {
> cmd-data {
> pinmux = <PIN_PB22__SDMMC1_CMD>,
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-09-22 13:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-17 21:04 [PATCH v2] ARM: dts: microchip: sama7d65: Add GPIO buttons and LEDs Ryan.Wanner
2025-09-22 13:28 ` Nicolas Ferre
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).