samples: gpio: add board overlay for up_squared
This adds a board overlay for up_squared to be used with the GPIO sample. Using the overlay is because the pins being used are not actually LED and switch but GPIO pins used as such. Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This commit is contained in:
parent
44cf206c2e
commit
2958938fb6
1 changed files with 42 additions and 0 deletions
42
samples/drivers/gpio/boards/up_squared.overlay
Normal file
42
samples/drivers/gpio/boards/up_squared.overlay
Normal file
|
@ -0,0 +1,42 @@
|
|||
/*
|
||||
* Copyright (c) 2019 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/*
|
||||
* This uses pin 40 on HAT as LED, and pin 38 as interrupt line.
|
||||
*
|
||||
* Note:
|
||||
* Need to change the BIOS settings:
|
||||
* () Advanced -> HAT Configurations:
|
||||
* - HD-Audio / I2S6 Selec -> Disabled
|
||||
*
|
||||
* - GPIO 27 (Pin38) Confi -> Input
|
||||
* - GPIO 28 (Pin40) Confi -> Output
|
||||
*/
|
||||
|
||||
/ {
|
||||
aliases {
|
||||
led0 = &led0;
|
||||
sw0 = &sw0;
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
led0: led_0 {
|
||||
gpios = <&gpio_w_000_031 19 0>;
|
||||
label = "HAT Pin 40 as LED";
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
buttons {
|
||||
compatible = "gpio-keys";
|
||||
sw0: switch_0 {
|
||||
gpios = <&gpio_w_000_031 18 0>;
|
||||
label = "HAT Pin 38 as Input";
|
||||
};
|
||||
};
|
||||
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue