Commit 8a830bfb authored by Kumar Gala's avatar Kumar Gala Committed by Kumar Gala
Browse files

boards: atmel: Convert boards to use device tree for LEDs



Convert over Atmel based boards to use device tree instead of board.h to
describe LEDs.

Signed-off-by: default avatarKumar Gala <kumar.gala@linaro.org>
parent 8ce758a8
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -18,6 +18,19 @@
		zephyr,flash = &flash0;
		zephyr,code-partition = &code_partition;
	};

	/* These aliases are provided for compatibility with samples */
	aliases {
		led0 = &led0;
	};

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

&sercom0 {
+0 −4
Original line number Diff line number Diff line
@@ -9,10 +9,6 @@

#include <soc.h>

/* LED on PA17 */
#define LED0_GPIO_PORT	CONFIG_GPIO_SAM0_PORTA_LABEL
#define LED0_GPIO_PIN	17

#define CONFIG_UART_SAM0_SERCOM0_PADS \
	(SERCOM_USART_CTRLA_RXPO(3) | SERCOM_USART_CTRLA_TXPO(1))

+13 −0
Original line number Diff line number Diff line
@@ -17,6 +17,19 @@
		zephyr,flash = &flash0;
		zephyr,code-partition = &code_partition;
	};

	/* These aliases are provided for compatibility with samples */
	aliases {
		led0 = &led0;
	};

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

&sercom0 {
+0 −4
Original line number Diff line number Diff line
@@ -9,10 +9,6 @@

#include <soc.h>

/* LED on PA10 */
#define LED0_GPIO_PORT	CONFIG_GPIO_SAM0_PORTA_LABEL
#define LED0_GPIO_PIN	10

#define CONFIG_UART_SAM0_SERCOM0_PADS \
	(SERCOM_USART_CTRLA_RXPO(3) | SERCOM_USART_CTRLA_TXPO(1))
#define CONFIG_UART_SAM0_SERCOM2_PADS \
+24 −0
Original line number Diff line number Diff line
@@ -16,6 +16,30 @@
		zephyr,sram = &sram0;
		zephyr,flash = &flash0;
	};

	/* These aliases are provided for compatibility with samples */
	aliases {
		led0 = &led0;
		led1 = &led1;
		led2 = &led2;
	};

	leds {
		compatible = "gpio-leds";
		led0: led_0 {
			gpios = <&porta 17 0>;
			label = "LED";
		};
		led1: led_1 {
			gpios = <&porta 27 0>;
			label = "TX";
		};
		led2: led_2 {
			gpios = <&portb 3 0>;
			label = "RX";
		};
	};

};

&sercom0 {
Loading