From eb5f711b7b24df5c0ddaf1ae2e72c013a142d286 Mon Sep 17 00:00:00 2001 From: Wealian Liao Date: Tue, 9 Nov 2021 15:23:17 +0800 Subject: [PATCH] test: driver: buildall: Add NCT38XX gpio Add support NCT38XX I2C-based GPIO in build all test. Signed-off-by: Wealian Liao --- tests/drivers/build_all/gpio/app.overlay | 70 +++++++++++++++++++++++- tests/drivers/build_all/gpio/prj.conf | 1 + 2 files changed, 70 insertions(+), 1 deletion(-) diff --git a/tests/drivers/build_all/gpio/app.overlay b/tests/drivers/build_all/gpio/app.overlay index d67def8a49c..8ea18b9337e 100644 --- a/tests/drivers/build_all/gpio/app.overlay +++ b/tests/drivers/build_all/gpio/app.overlay @@ -71,6 +71,7 @@ ngpios = <8>; nint-gpios = <&test_gpio 0 0>; }; + test_i2c_fxl6408: fxl6408@43 { status = "okay"; compatible = "fcs,fxl6408"; @@ -79,7 +80,74 @@ ngpios = <8>; #gpio-cells = <2>; gpio-controller; - }; + }; + + test_i2c_nct3807: nct3807@72 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "nuvoton,nct38xx-gpio"; + reg = <0x72>; + label = "NCT3807_0"; + + gpio@0 { + compatible = "nuvoton,nct38xx-gpio-port"; + reg = <0x0>; + label = "NCT3807_0_GPIO0"; + gpio-controller; + #gpio-cells = <2>; + ngpios = <8>; + pin_mask = <0xff>; + pinmux_mask = <0xf7>; + }; + + gpio@1 { + compatible = "nuvoton,nct38xx-gpio-port"; + reg = <0x1>; + label = "NCT3807_0_GPIO1"; + gpio-controller; + #gpio-cells = <2>; + ngpios = <8>; + pin_mask = <0xff>; + }; + }; + + test_i2c_nct3808_p1: nct3808_0_P1@71 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "nuvoton,nct38xx-gpio"; + reg = <0x71>; + label = "NCT3808_0_P1"; + + gpio@0 { + compatible = "nuvoton,nct38xx-gpio-port"; + reg = <0x0>; + label = "NCT3808_0_P1_GPIO0"; + gpio-controller; + #gpio-cells = <2>; + ngpios = <8>; + pin_mask = <0xdc>; + pinmux_mask = <0xff>; + }; + }; + + test_i2c_nct3808_p2: nct3808_0_P2@75 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "nuvoton,nct38xx-gpio"; + reg = <0x75>; + label = "NCT3808_0_P2"; + + gpio@0 { + compatible = "nuvoton,nct38xx-gpio-port"; + reg = <0x0>; + label = "NCT3808_0_P2_GPIO0"; + gpio-controller; + #gpio-cells = <2>; + ngpios = <8>; + pin_mask = <0xdc>; + pinmux_mask = <0xff>; + }; + }; }; test_spi: spi@33334444 { diff --git a/tests/drivers/build_all/gpio/prj.conf b/tests/drivers/build_all/gpio/prj.conf index 65e6a50e054..287ab72e8bd 100644 --- a/tests/drivers/build_all/gpio/prj.conf +++ b/tests/drivers/build_all/gpio/prj.conf @@ -8,3 +8,4 @@ CONFIG_GPIO_PCA953X=y CONFIG_GPIO_FXL6408=y CONFIG_SPI=y CONFIG_GPIO_MCP23S17=y +CONFIG_GPIO_NCT38XX=y