Commit f387f26a authored by Kumar Gala's avatar Kumar Gala Committed by Kumar Gala
Browse files

boards: sam_e70_xplained: Move led/button info to DTS



Move the details about LEDs and Buttons from board.h into device tree.

Signed-off-by: default avatarKumar Gala <kumar.gala@linaro.org>
parent 3bc13842
Loading
Loading
Loading
Loading
+0 −16
Original line number Diff line number Diff line
@@ -9,20 +9,4 @@

#include <soc.h>

#define BOARD_GREEN_LED_GPIO_PORT	CONFIG_GPIO_SAM_PORTC_LABEL
#define BOARD_GREEN_LED_GPIO_PIN	8

/* The switch is labeled SW300 in the schematic, and labeled SW0 on the
 * board.
 */
#define BOARD_SW0_GPIO_PORT	CONFIG_GPIO_SAM_PORTA_LABEL
#define BOARD_SW0_GPIO_PIN	11

/* Aliases to make the basic samples work. */
#define LED0_GPIO_PORT		BOARD_GREEN_LED_GPIO_PORT
#define LED0_GPIO_PIN		BOARD_GREEN_LED_GPIO_PIN
#define SW0_GPIO_NAME		BOARD_SW0_GPIO_PORT
#define SW0_GPIO_PIN		BOARD_SW0_GPIO_PIN
#define SW0_GPIO_PIN_PUD	GPIO_PUD_PULL_UP

#endif /* _INC_BOARD_H_ */
+23 −0
Original line number Diff line number Diff line
@@ -17,6 +17,8 @@
		i2c-0 = &i2c0;
		i2c-1 = &i2c1;
		i2c-2 = &i2c2;
		led0 = &green_led;
		sw0 = &sw0_user_button;
	};

	chosen {
@@ -24,6 +26,27 @@
		zephyr,sram = &sram0;
		zephyr,flash = &flash0;
	};

	leds {
		compatible = "gpio-leds";
		green_led: led_0 {
			gpios = <&portc 8 0>;
			label = "User LED";
		};
	};

	gpio_keys {
		compatible = "gpio-keys";

		/* The switch is labeled SW300 in the schematic, and labeled
		 * SW0 on the board, and labeld SW1 User Button on docs
		 */
		sw0_user_button: button_1 {
			label = "User Button";
			gpios = <&porta 11 (GPIO_PUD_PULL_UP |
					    GPIO_INT_ACTIVE_LOW)>;
		};
	};
};

&adc0 {