Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions drivers/entropy/entropy_smartbond.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ static void trng_enable(bool enable)
} else {
CRG_TOP->CLK_AMBA_REG &= ~CRG_TOP_CLK_AMBA_REG_TRNG_CLK_ENABLE_Msk;
TRNG->TRNG_CTRL_REG = 0;
NVIC_ClearPendingIRQ(IRQN);

entropy_smartbond_pm_policy_state_lock_put();
}
Expand Down
13 changes: 7 additions & 6 deletions drivers/gpio/gpio_smartbond.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
#include <da1469x_pdc.h>
#include <da1469x_pd.h>

#define GPIO_MODE_RESET 0x200

#define GPIO_PUPD_INPUT 0
#define GPIO_PUPD_INPUT_PU 1
#define GPIO_PUPD_INPUT_PD 2
Expand Down Expand Up @@ -117,8 +115,8 @@ static int gpio_smartbond_pin_configure(const struct device *dev,
const struct gpio_smartbond_config *config = dev->config;

if (flags == GPIO_DISCONNECTED) {
/* Reset to default value */
config->mode_regs[pin] = GPIO_MODE_RESET;
/* Set pin as input with no resistors selected */
config->mode_regs[pin] = GPIO_PUPD_INPUT << GPIO_P0_00_MODE_REG_PUPD_Pos;
return 0;
}

Expand Down Expand Up @@ -166,7 +164,8 @@ static int gpio_smartbond_port_set_masked_raw(const struct device *dev,
{
const struct gpio_smartbond_config *config = dev->config;

config->data_regs->data = value & mask;
config->data_regs->set = value & mask;
config->data_regs->reset = ~value & mask;

return 0;
}
Expand Down Expand Up @@ -244,7 +243,9 @@ static int gpio_smartbond_pin_interrupt_configure(const struct device *dev,
config->wkup_regs->clear = pin_mask;
data->both_edges_pins &= ~pin_mask;
#if CONFIG_PM
da1469x_pdc_del(pdc_ix);
if (pdc_ix >= 0) {
da1469x_pdc_del(pdc_ix);
}
#endif
} else {
if (trig == GPIO_INT_TRIG_BOTH) {
Expand Down
13 changes: 13 additions & 0 deletions tests/drivers/gpio/gpio_basic_api/boards/da1469x_dk_pro.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/*
* Copyright (c) 2024 Renesas Electronics Corporation
*
* SPDX-License-Identifier: Apache-2.0
*/

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