Skip to content

Commit

Permalink
tests: drivers: Added overlays to tests for 063_ble
Browse files Browse the repository at this point in the history
Fixed pinout in adc overlays to align with board
Allowed adc driver sample
Added overlay for gpio_basic_api test support
Added overlay for i2c_api test support

Signed-off-by: Pavlo Havrylyuk <[email protected]>
  • Loading branch information
pavloinfineon authored and fabiobaltieri committed Sep 20, 2023
1 parent 215b248 commit 166d89c
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 6 deletions.
8 changes: 4 additions & 4 deletions samples/drivers/adc/boards/cy8cproto_063_ble.overlay
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
zephyr,gain = "ADC_GAIN_1";
zephyr,reference = "ADC_REF_INTERNAL";
zephyr,resolution = <12>;
zephyr,input-positive = <0>; /* P10.0 */
zephyr,input-positive = <2>; /* P10.2 */
};

channel@1 {
Expand All @@ -33,7 +33,7 @@
zephyr,gain = "ADC_GAIN_1";
zephyr,reference = "ADC_REF_INTERNAL";
zephyr,resolution = <12>;
zephyr,input-positive = <1>; /* P10.1 */
zephyr,input-positive = <3>; /* P10.3 */
};

channel@2 {
Expand All @@ -42,7 +42,7 @@
zephyr,gain = "ADC_GAIN_1";
zephyr,reference = "ADC_REF_INTERNAL";
zephyr,resolution = <12>;
zephyr,input-positive = <2>; /* P10.2 */
zephyr,input-positive = <4>; /* P10.4 */
};

channel@3 {
Expand All @@ -51,6 +51,6 @@
zephyr,gain = "ADC_GAIN_1";
zephyr,reference = "ADC_REF_INTERNAL";
zephyr,resolution = <12>;
zephyr,input-positive = <3>; /* P10.3 */
zephyr,input-positive = <5>; /* P10.5 */
};
};
1 change: 1 addition & 0 deletions samples/drivers/adc/sample.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ tests:
- disco_l475_iot1
- cc3220sf_launchxl
- cc3235sf_launchxl
- cy8cproto_063_ble
- stm32l496g_disco
- stm32h735g_disco
- nrf51dk_nrf51422
Expand Down
4 changes: 2 additions & 2 deletions tests/drivers/adc/adc_api/boards/cy8cproto_063_ble.overlay
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
zephyr,gain = "ADC_GAIN_1";
zephyr,reference = "ADC_REF_INTERNAL";
zephyr,resolution = <12>;
zephyr,input-positive = <0>; /* P10.0 */
zephyr,input-positive = <2>; /* P10.2 */
};

channel@1 {
Expand All @@ -33,6 +33,6 @@
zephyr,gain = "ADC_GAIN_1";
zephyr,reference = "ADC_REF_INTERNAL";
zephyr,resolution = <12>;
zephyr,input-positive = <1>; /* P10.1 */
zephyr,input-positive = <3>; /* P10.3 */
};
};
18 changes: 18 additions & 0 deletions tests/drivers/gpio/gpio_basic_api/boards/cy8cproto_063_ble.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/*
* SPDX-License-Identifier: Apache-2.0
*
* Copyright (c) 2023 Cypress Semiconductor Corporation (an Infineon company) or
* an affiliate of Cypress Semiconductor Corporation
*/

/ {
resources {
compatible = "test-gpio-basic-api";
out-gpios = <&gpio_prt9 4 0>;
in-gpios = <&gpio_prt9 2 0>;
};
};

&gpio_prt9 {
status = "okay";
};
32 changes: 32 additions & 0 deletions tests/drivers/i2c/i2c_api/boards/cy8cproto_063_ble.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/*
* SPDX-License-Identifier: Apache-2.0
*
* Copyright (c) 2023 Cypress Semiconductor Corporation (an Infineon company) or
* an affiliate of Cypress Semiconductor Corporation
*/

/ {
aliases {
gy271 = &i2c1;
i2c-0 =&i2c1;
};
};

i2c1: &scb1 {
compatible = "infineon,cat1-i2c";

status = "okay";
pinctrl-0 = <&p10_0_scb1_i2c_scl &p10_1_scb1_i2c_sda>;
pinctrl-names = "default";
};

/* Configure pin control bias mode for i2c pins */
&p10_0_scb1_i2c_scl {
drive-open-drain;
input-enable;
};

&p10_1_scb1_i2c_sda {
drive-open-drain;
input-enable;
};

0 comments on commit 166d89c

Please sign in to comment.