1# Copyright (c) 2023 Hudson C. Dalpra 2# SPDX-License-Identifier: Apache-2.0 3 4description: | 5 Zephyr W1 GPIO node 6 7 This defines a one-wire driver through GPIO bit-banging. 8 9 For example: 10 11 / { 12 w1: w1 { 13 compatible = "zephyr,w1-gpio"; 14 gpios = <&gpio0 13 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN | GPIO_PULL_UP)>; 15 }; 16 }; 17 18 Above: 19 - w1 is pin 13 on gpio0. The gpio is active when the pin is high, is 20 configured as an open-drain, and has a pull-up resistor. 21 22 Implementation details: 23 - Most drivers require the selected gpio to support open drain, this enables onewire 24 devices to lower the signal when the SOC set the signal high. 25 - Ensure pullup is strong enough (4.7K according to the specification). Standard pullup in 26 SOC are usually weak, and may not be strong enough. 27 28compatible: "zephyr,w1-gpio" 29 30include: [w1-master.yaml] 31 32properties: 33 gpios: 34 type: phandle-array 35 required: true 36