boards: shields: Add Adafruit DS2484 1-Wire shield

Product photo from https://learn.adafruit.com/assets/130701
with license CC BY-SA 3.0

Tested with command mentioned in the index.rst page.

Signed-off-by: Jonas Berg <jonas.s.t.berg@gmail.com>
This commit is contained in:
Jonas Berg
2025-08-30 23:37:01 +02:00
committed by Henrik Brix Andersen
parent d99cddd4ec
commit 9434b2cb92
6 changed files with 110 additions and 0 deletions

View File

@@ -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)

View File

@@ -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 {};

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

View File

@@ -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

View File

@@ -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

View File

@@ -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