diff --git a/boards/shields/adafruit_adalogger_featherwing/Kconfig.shield b/boards/shields/adafruit_adalogger_featherwing/Kconfig.shield new file mode 100644 index 00000000000..eb5446a4746 --- /dev/null +++ b/boards/shields/adafruit_adalogger_featherwing/Kconfig.shield @@ -0,0 +1,5 @@ +# Copyright (c) 2024 Philip-Dylan Gleonec +# SPDX-License-Identifier: Apache-2.0 + +config SHIELD_ADAFRUIT_DATA_LOGGER + def_bool $(shields_list_contains,adafruit_adalogger_featherwing) diff --git a/boards/shields/adafruit_adalogger_featherwing/adafruit_adalogger_featherwing.overlay b/boards/shields/adafruit_adalogger_featherwing/adafruit_adalogger_featherwing.overlay new file mode 100644 index 00000000000..3576ff838b0 --- /dev/null +++ b/boards/shields/adafruit_adalogger_featherwing/adafruit_adalogger_featherwing.overlay @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2024 Philip-Dylan Gleonec + * + * SPDX-License-Identifier: Apache-2.0 + */ + +/ { + aliases { + rtc = &rtc0_adafruit_adalogger_featherwing; + sdhc0 = &sdhc0_adafruit_adalogger_featherwing; + }; +}; + +&feather_spi { + status = "okay"; + cs-gpios = <&feather_header 17 GPIO_ACTIVE_LOW>; /* D10 */ + + sdhc0_adafruit_adalogger_featherwing: sdhc@0 { + compatible = "zephyr,sdhc-spi-slot"; + reg = <0>; + spi-max-frequency = <12000000>; + status = "okay"; + + sdmmc { + compatible = "zephyr,sdmmc-disk"; + status = "okay"; + }; + }; +}; + +&feather_i2c { + status = "okay"; + + rtc0_adafruit_adalogger_featherwing: rtc@68 { + compatible = "nxp,pcf8523"; + reg = <0x68>; + alarms-count = <1>; + battery-switch-over = "standard"; + status = "okay"; + }; +}; diff --git a/boards/shields/adafruit_adalogger_featherwing/doc/adafruit_adalogger_featherwing.webp b/boards/shields/adafruit_adalogger_featherwing/doc/adafruit_adalogger_featherwing.webp new file mode 100644 index 00000000000..1e8e5960c04 Binary files /dev/null and b/boards/shields/adafruit_adalogger_featherwing/doc/adafruit_adalogger_featherwing.webp differ diff --git a/boards/shields/adafruit_adalogger_featherwing/doc/index.rst b/boards/shields/adafruit_adalogger_featherwing/doc/index.rst new file mode 100644 index 00000000000..bc11d86bf51 --- /dev/null +++ b/boards/shields/adafruit_adalogger_featherwing/doc/index.rst @@ -0,0 +1,58 @@ +.. _adafruit_adalogger_featherwing_shield: + +Adafruit Adalogger Featherwing Shield +##################################### + +Overview +******** + +The `Adafruit Adalogger Featherwing Shield`_ features an `NXP PCF8523 Real-Time +Clock/Calendar with Battery Backup`_, and an SD card interface. + +.. figure:: adafruit_adalogger_featherwing.webp + :align: center + :alt: Adafruit Adalogger Featherwing Shield + + Adafruit Adalogger Featherwing Shield (Credit: Adafruit) + +Pin Assignments +=============== + ++-----------------------+---------------------------------------------+ +| Shield Connector Pin | Function | ++=======================+=============================================+ +| D10 | SD card SPI CS | ++-----------------------+---------------------------------------------+ +| MOSI | SD card SPI MOSI | ++-----------------------+---------------------------------------------+ +| MISO | SD card SPI MISO | ++-----------------------+---------------------------------------------+ +| SCK | SD card SPI SCK | ++-----------------------+---------------------------------------------+ +| SDA | PCF8523 RTC I2C SDA | ++-----------------------+---------------------------------------------+ +| SCL | PCF8523 RTC I2C SCL | ++-----------------------+---------------------------------------------+ + +Requirements +************ + +This shield can only be used with a board which provides a configuration for Feather connectors and +defines node aliases for SPI, I2C and GPIO interfaces (see :ref:`shields` for more details). + +Programming +*********** + +Set ``--shield adafruit_adalogger_featherwing`` when you invoke ``west build``. For example: + +.. zephyr-app-commands:: + :zephyr-app: tests/drivers/rtc/rtc_api + :board: adafruit_feather_m0_basic_proto + :shield: adafruit_adalogger_featherwing + :goals: build + +.. _Adafruit Adalogger Featherwing Shield: + https://learn.adafruit.com/adafruit-adalogger-featherwing + +.. _NXP PCF8523 Real-Time Clock/Calendar with Battery Backup: + https://www.nxp.com/docs/en/data-sheet/PCF8523.pdf