Commit 270db3c4 authored by Christian Galante's avatar Christian Galante Committed by Benjamin Cabé
Browse files

tests: drivers: comparator: gpio_loopback: extend to xg24 and xg29 boards

Add board overlays to execute the comparator gpio_loopback testsuite on
xg24_dk2601b and xg29_rb4412a. The testsuite was executed and was seen
to pass on both boards locally with twister.

Signed-off-by: default avatarChristian Galante <christian.galante@silabs.com>
parent 7d4e972f
Loading
Loading
Loading
Loading
+41 −0
Changes for tests/drivers/comparator/gpio_loopback/boards/xg24_dk2601b.overlay: 41 added lines, 0 removed lines.
Original line number Diff line number Diff line
/*
 * Copyright (c) 2025 Silicon Laboratories Inc.
 *
 * SPDX-License-Identifier: Apache-2.0
 */

#include <zephyr/dt-bindings/gpio/gpio.h>
#include <zephyr/dt-bindings/comparator/silabs-acmp.h>
#include <zephyr/dt-bindings/pinctrl/silabs/xg24-pinctrl.h>

/ {
	aliases {
		test-comp = &acmp0;
	};

	zephyr,user {
		test-gpios = <&gpioc 3 GPIO_ACTIVE_HIGH>;
	};

};

&pinctrl {
	acmp0_default: acmp0_default {
		group0 {
			silabs,analog-bus = <ABUS_CDODD0_ACMP0>;
		};
	};
};

&acmp0 {
	pinctrl-0 = <&acmp0_default>;
	pinctrl-names = "default";
	status = "okay";

	hysteresis-mode = "disabled";
	accuracy-mode = "high";
	input-range = "full";
	input-positive = <ACMP_INPUT_PC3>;
	input-negative = <ACMP_INPUT_VREFDIV1V25>;
	vref-divider = <63>;
};
+42 −0
Changes for tests/drivers/comparator/gpio_loopback/boards/xg29_rb4412a.overlay: 42 added lines, 0 removed lines.
Original line number Diff line number Diff line
/*
 * Copyright (c) 2025 Silicon Laboratories Inc.
 *
 * SPDX-License-Identifier: Apache-2.0
 */

#include <zephyr/dt-bindings/gpio/gpio.h>
#include <zephyr/dt-bindings/comparator/silabs-acmp.h>
#include <zephyr/dt-bindings/pinctrl/silabs/xg29-pinctrl.h>

/ {
	aliases {
		test-comp = &acmp0;
	};

	zephyr,user {
		test-gpios = <&gpioc 3 GPIO_ACTIVE_HIGH>;
	};

};

&pinctrl {
	acmp0_default: acmp0_default {
		group0 {
			silabs,analog-bus = <ABUS_CDODD0_ACMP0>;
		};
	};
};

&acmp0 {
	pinctrl-0 = <&acmp0_default>;
	pinctrl-names = "default";
	status = "okay";

	bias = <0>;
	hysteresis-mode = "disabled";
	accuracy-mode = "high";
	input-range = "full";
	input-positive = <ACMP_INPUT_PC3>;
	input-negative = <ACMP_INPUT_VREFDIV1V25>;
	vref-divider = <63>;
};
+4 −0
Changes for tests/drivers/comparator/gpio_loopback/testcase.yaml: 4 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -8,6 +8,10 @@ common:
    - drivers
    - comparator
tests:
  drivers.comparator.gpio_loopback.silabs_acmp:
    platform_allow:
      - xg24_dk2601b
      - xg29_rb4412a
  drivers.comparator.gpio_loopback.mcux_acmp:
    platform_allow:
      - frdm_ke15z