Skip to content

Commit

Permalink
Add skeleton for RV-8263-C8 RTC, rename display driver to match it wi…
Browse files Browse the repository at this point in the history
…th the vendor_type scheme of the other drivers
  • Loading branch information
Kampi committed May 27, 2024
1 parent 8152f4b commit 772fa69
Show file tree
Hide file tree
Showing 13 changed files with 64 additions and 3 deletions.
3 changes: 1 addition & 2 deletions app/boards/arm/zswatch_nrf5340/zswatch_nrf5340_cpuapp_5.conf
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
CONFIG_ZSWATCH_PCB_REV=5
CONFIG_BT_DIS_HW_REV_STR="5"

#---------------
# FLASH
#-----------------
CONFIG_FLASH=y
CONFIG_FLASH_PAGE_LAYOUT=y
CONFIG_STREAM_FLASH=y
Expand Down Expand Up @@ -49,3 +47,4 @@ CONFIG_NVS=y

CONFIG_DEBUG_COREDUMP_BACKEND_OTHER=y

CONFIG_RTC=y
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,12 @@
};

&i2c1 {
rtc: rv-8263-c8@A2 {
compatible = "microcrystal,rv-8263-c8";
reg = <0xA2>;
status = "okay";
};

bmi270: bmi270@68 {
compatible = "bosch,bmi270-plus";
reg = <0x68>;
Expand Down
1 change: 1 addition & 0 deletions app/drivers/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
add_subdirectory(display)
add_subdirectory(input)
add_subdirectory(rtc)

add_subdirectory_ifdef(CONFIG_SENSOR sensor)
1 change: 1 addition & 0 deletions app/drivers/Kconfig
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
rsource "display/Kconfig"
rsource "input/Kconfig"
rsource "rtc/Kconfig"

menu "Drivers"
rsource "sensor/Kconfig"
Expand Down
2 changes: 1 addition & 1 deletion app/drivers/display/gc9a01/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
zephyr_sources(gc9a01.c)
zephyr_sources(buydisplay_gc9a01.c)
File renamed without changes.
6 changes: 6 additions & 0 deletions app/drivers/rtc/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Copyright (c) 2024, Daniel Kampert
#
# SPDX-License-Identifier: Apache-2.0
#

add_subdirectory_ifdef(CONFIG_RV8263C8 rv8263c8)
3 changes: 3 additions & 0 deletions app/drivers/rtc/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
if RTC
rsource "rv8263c8/Kconfig"
endif
6 changes: 6 additions & 0 deletions app/drivers/rtc/rv8263c8/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Copyright (c) 2024, Daniel Kampert
#
# SPDX-License-Identifier: Apache-2.0
#

zephyr_sources(microcrystal_rv8263c8.c)
21 changes: 21 additions & 0 deletions app/drivers/rtc/rv8263c8/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# RV-8263-C8 RTC configuration options.

# Copyright (c) 240, Daniel Kampert
#
# SPDX-License-Identifier: Apache-2.0

menuconfig RV_8263_C8
bool "RV-8263-C8 RTC"
depends on DT_HAS_MICRO_CRYSTAL_RV_8263_C8_ENABLED
default y
select I2C
help
Enable the driver for the RV-8263-C8 RTC.

if RV_8263_C8

module = MICRO_CRYSTAL_RV_8263_C8
module-str = MICRO_CRYSTAL_RV_8263_C8
source "subsys/logging/Kconfig.template.log_config"

endif
Empty file.
9 changes: 9 additions & 0 deletions app/drivers/rtc/rv8263c8/microcrystal_rv8263c8.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/* microcrystal_rv8263c8.h - Driver for Micro Crystal RV-8263-C8 RTC. */

/*
* Copyright (c 2024, Daniel Kampert
*
* SPDX-License-Identifier: Apache-2.0
*/

#pragma once
9 changes: 9 additions & 0 deletions app/dts/bindings/rtc/microcrystal,rv-8263-c8.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
description: |
The RV-8263-C8 is a CMOS real-time clock/calendar module optimized for low power consumption. An Offset
register makes it possible to compensate for the frequency deviation of the clock of 32.768 kHz
compatible: "microcrystal,rv-8263-c8"

include: [rtc-device.yaml, i2c-device.yaml]

#properties:

0 comments on commit 772fa69

Please sign in to comment.