boards: add mcp7940n to bl5340_dvk
Adding mcp7940n and attached pins to board dts file Signed-off-by: Greg Leach <greg.leach@lairdconnect.com>
This commit is contained in:
parent
94e006f0fc
commit
42b05fa024
|
@ -86,6 +86,12 @@
|
|||
label = "dac0";
|
||||
#io-channel-cells = <1>;
|
||||
};
|
||||
|
||||
extrtc0: mcp7940n@6f {
|
||||
compatible = "microchip,mcp7940n";
|
||||
reg = <0x6f>;
|
||||
label = "mcp7940n";
|
||||
};
|
||||
};
|
||||
|
||||
&spi2 {
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
# Enable RTC
|
||||
CONFIG_I2C=y
|
||||
CONFIG_COUNTER=y
|
||||
CONFIG_COUNTER_MICROCHIP_MCP7940N=y
|
|
@ -0,0 +1,12 @@
|
|||
/*
|
||||
* Copyright (c) 2021 Laird Connectivity
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
&i2c1 {
|
||||
/* Connect MCP7940N MFP pin TP9 to P0.04 */
|
||||
extrtc0: mcp7940n@6f {
|
||||
int-gpios = <&gpio0 4 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
};
|
|
@ -6,6 +6,7 @@ tests:
|
|||
harness: console
|
||||
platform_allow: nucleo_f746zg nrf51dk_nrf51422 nrf52dk_nrf52832
|
||||
nrf52840dk_nrf52840 nrf9160dk_nrf9160 atsamd20_xpro
|
||||
bl5340_dvk_cpuapp
|
||||
harness_config:
|
||||
type: multi_line
|
||||
ordered: true
|
||||
|
|
|
@ -19,6 +19,8 @@ struct counter_alarm_cfg alarm_cfg;
|
|||
#define TIMER DT_LABEL(DT_NODELABEL(tc4))
|
||||
#elif defined(CONFIG_SOC_FAMILY_SAM)
|
||||
#define TIMER DT_LABEL(DT_NODELABEL(tc0))
|
||||
#elif defined(CONFIG_COUNTER_MICROCHIP_MCP7940N)
|
||||
#define TIMER DT_LABEL(DT_NODELABEL(extrtc0))
|
||||
#elif defined(CONFIG_COUNTER_RTC0)
|
||||
#define TIMER DT_LABEL(DT_NODELABEL(rtc0))
|
||||
#elif defined(CONFIG_COUNTER_RTC_STM32)
|
||||
|
|
Loading…
Reference in New Issue