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>
diff --git a/arch/sandbox/dts/test.dts b/arch/sandbox/dts/test.dts
index f5f43eb..0b1c29f 100644
--- a/arch/sandbox/dts/test.dts
+++ b/arch/sandbox/dts/test.dts
@@ -16,6 +16,7 @@
eth5 = ð_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>;