1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-09-01 16:52:14 +02:00

test: dm: update test for pins configuration in gpio

Add tests for new API set_dir_flags and set_dir_flags and associated
code in gpio uclass.

Test support for new flags GPIO_OPEN_DRAIN, GPIO_OPEN_SOURCE
GPIO_PULL_UP and GPIO_PULL_DOWN.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
This commit is contained in:
Patrick Delaunay
2020-01-13 11:35:14 +01:00
committed by Tom Rini
parent 2c0f782e0f
commit ff52665d03
5 changed files with 163 additions and 27 deletions

View File

@@ -16,6 +16,7 @@
eth5 = &eth_5;
gpio1 = &gpio_a;
gpio2 = &gpio_b;
gpio3 = &gpio_c;
i2c0 = "/i2c@0";
mmc0 = "/mmc0";
mmc1 = "/mmc1";
@@ -97,6 +98,13 @@
<&gpio_b 7 GPIO_IN 3 2 1>,
<&gpio_b 8 GPIO_OUT 3 2 1>,
<&gpio_b 9 (GPIO_OUT|GPIO_OUT_ACTIVE) 3 2 1>;
test3-gpios =
<&gpio_c 0 (GPIO_OUT|GPIO_OPEN_DRAIN)>,
<&gpio_c 1 (GPIO_OUT|GPIO_OPEN_SOURCE)>,
<&gpio_c 2 GPIO_OUT>,
<&gpio_c 3 (GPIO_IN|GPIO_PULL_UP)>,
<&gpio_c 4 (GPIO_IN|GPIO_PULL_DOWN)>,
<&gpio_c 5 GPIO_IN>;
int-value = <1234>;
uint-value = <(-1234)>;
int64-value = /bits/ 64 <0x1111222233334444>;
@@ -307,6 +315,14 @@
sandbox,gpio-count = <10>;
};
gpio_c: extra2-gpios {
compatible = "sandbox,gpio";
gpio-controller;
#gpio-cells = <2>;
gpio-bank-name = "c";
sandbox,gpio-count = <10>;
};
i2c@0 {
#address-cells = <1>;
#size-cells = <0>;