Commit 0d120311 authored by Kumar Gala's avatar Kumar Gala Committed by Anas Nashif
Browse files

boards: x86: Convert boards to use device tree for LEDs & Buttons



Convert over x86 based boards to use device tree instead of board.h to
describe buttons & LEDs.  There are a few boards that the button gpio
flags need validation.

Signed-off-by: default avatarKumar Gala <kumar.gala@linaro.org>
parent 8a830bfb
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -12,6 +12,7 @@
	compatible = "arduino,101","intel,quark";

	aliases {
		led0 = &led0;
		uart-0 = &uart0;
		uart-1 = &uart1;
	};
@@ -28,6 +29,14 @@
		zephyr,uart-pipe = &uart1;
		zephyr,bt-mon-uart = &uart1;
	};

	leds {
		compatible = "gpio-leds";
		led0: led_0 {
			gpios = <&gpio0 8 0>;
			label = "LED";
		};
	};
};

&uart0 {
+0 −3
Original line number Diff line number Diff line
@@ -9,9 +9,6 @@

#include <soc.h>

#define LED0_GPIO_PORT  CONFIG_GPIO_QMSI_0_NAME
#define LED0_GPIO_PIN   8

#if defined(CONFIG_USB)
/* GPIO driver name */
#define USB_GPIO_DRV_NAME	CONFIG_GPIO_QMSI_0_NAME
+0 −9
Original line number Diff line number Diff line
@@ -9,13 +9,4 @@

#include <soc.h>


/* Push button switch 0 */
#define SW0_GPIO_PIN	2
#define SW0_GPIO_NAME	CONFIG_GPIO_QMSI_0_NAME

/* Onboard LED */
#define LED0_GPIO_PORT	CONFIG_GPIO_QMSI_0_NAME
#define LED0_GPIO_PIN	24

#endif /* __INC_BOARD_H */
+19 −0
Original line number Diff line number Diff line
@@ -12,6 +12,8 @@
	compatible = "intel,quark-d2000-crb", "intel,quark-d2000";

	aliases {
		led0 = &led0;
		sw0 = &button0;
		uart-0 = &uart0;
		uart-1 = &uart1;
	};
@@ -21,6 +23,23 @@
		zephyr,flash = &flash0;
		zephyr,console = &uart0;
	};

	leds {
		compatible = "gpio-leds";
		led0: led_0 {
			gpios = <&gpio 24 0>;
			label = "LED";
		};
	};

	buttons {
		compatible = "gpio-keys";
		button0: button_0 {
			/* gpio flags need validation */
			gpios = <&gpio 2 GPIO_INT_ACTIVE_LOW>;
			label = "Push button switch 0";
		};
	};
};

&uart0 {
+0 −12
Original line number Diff line number Diff line
@@ -9,18 +9,6 @@

#include <soc.h>

/* Push button switch 0 */
#define SW0_GPIO_PIN	4
#define SW0_GPIO_NAME	CONFIG_GPIO_QMSI_1_NAME

/* Push button switch 1 */
#define SW1_GPIO_PIN	5
#define SW1_GPIO_NAME	CONFIG_GPIO_QMSI_0_NAME

/* Onboard LED */
#define LED0_GPIO_PORT  CONFIG_GPIO_QMSI_0_NAME
#define LED0_GPIO_PIN   25

#if defined(CONFIG_IEEE802154_CC2520)

/* GPIO numbers where the TI cc2520 chip is connected to */
Loading