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
5 changes: 5 additions & 0 deletions boards/shields/adafruit_ds2484/Kconfig.shield
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Copyright (c) 2025 Jonas Berg
# SPDX-License-Identifier: Apache-2.0

config SHIELD_ADAFRUIT_DS2484
def_bool $(shields_list_contains,adafruit_ds2484)
18 changes: 18 additions & 0 deletions boards/shields/adafruit_ds2484/adafruit_ds2484.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/*
* Copyright (c) 2025 Jonas Berg
*
* SPDX-License-Identifier: Apache-2.0
*/

&zephyr_i2c {
status = "okay";

w1_adafruit_ds2482: w1@18 {
compatible = "maxim,ds2484";
status = "okay";
reg = <0x18>;
};
};

/* Alternate node label for samples/drivers/w1/scanner */
w1: &w1_adafruit_ds2482 {};
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
65 changes: 65 additions & 0 deletions boards/shields/adafruit_ds2484/doc/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
.. _adafruit_ds2484:

Adafruit DS2484 Shield
######################

Overview
********

The `Adafruit DS2484 I2C to 1-Wire Bus Adapter Shield`_ features
an `Analog Devices DS2484 1-Wire Master`_ and two STEMMA QT connectors.

.. figure:: adafruit_ds2484.webp
:align: center
:alt: Adafruit DS2484 Shield

Adafruit DS2484 Shield (Credit: Adafruit)


Requirements
************

This shield can be used with boards which provide an I2C connector, for
example STEMMA QT or Qwiic connectors.
The target board must define a ``zephyr_i2c`` node label.
See :ref:`shields` for more details.


Pin Assignments
===============

+--------------+------------------------------+
| Shield Pin | Function |
+==============+==============================+
| SDA | DS2484 I2C SDA |
+--------------+------------------------------+
| SCL | DS2484 I2C SCL |
+--------------+------------------------------+
| 1WIRE | Connection to 1-Wire devices |
+--------------+------------------------------+
| SLPZ | Digital input for sleep mode |
+--------------+------------------------------+

See :dtcompatible:`maxim,ds2484` for documentation on how to adjust the
devicetree file for sleep mode etc.


Programming
***********

Set ``--shield adafruit_ds2484`` when you invoke ``west build``. For example
when running the :zephyr:code-sample:`w1-scanner` 1-Wire scanning sample:

.. zephyr-app-commands::
:zephyr-app: samples/drivers/w1/scanner
:board: adafruit_qt_py_rp2040
:shield: adafruit_ds2484
:goals: build

Connect one or several 1-Wire devices to the shield before running the scanning sample.

.. _Adafruit DS2484 I2C to 1-Wire Bus Adapter Shield:
https://learn.adafruit.com/adafruit-ds2484-i2c-to-1-wire-bus-adapter-breakout

.. _Analog Devices DS2484 1-Wire Master:
https://www.analog.com/en/products/ds2484.html
10 changes: 10 additions & 0 deletions boards/shields/adafruit_ds2484/shield.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# SPDX-License-Identifier: Apache-2.0
#
# Copyright (c) 2025, Jonas Berg

shield:
name: adafruit_ds2484
full_name: Adafruit DS2484 I2C to 1-Wire Bus Adapter Shield
vendor: adafruit
supported_features:
- w1
12 changes: 12 additions & 0 deletions samples/drivers/w1/scanner/sample.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,15 @@ tests:
regex:
- "Number of devices found on bus: .*"
fixture: w1_scanner_w1_max
sample.drivers.w1.scanner.shields:
platform_allow:
- adafruit_qt_py_rp2040/rp2040
integration_platforms:
- adafruit_qt_py_rp2040/rp2040
extra_args:
- platform:adafruit_qt_py_rp2040/rp2040:SHIELD="adafruit_ds2484"
harness_config:
type: one_line
regex:
- "Number of devices found on bus: .*"
fixture: zepyhr_i2c_ds2484