xref: /freebsd/sys/contrib/device-tree/Bindings/w1/w1-uart.yaml (revision 01950c46b8155250f64374fb72fc11faa44bf099)
1*01950c46SEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2*01950c46SEmmanuel Vadot%YAML 1.2
3*01950c46SEmmanuel Vadot---
4*01950c46SEmmanuel Vadot$id: http://devicetree.org/schemas/w1/w1-uart.yaml#
5*01950c46SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6*01950c46SEmmanuel Vadot
7*01950c46SEmmanuel Vadottitle: UART 1-Wire Bus
8*01950c46SEmmanuel Vadot
9*01950c46SEmmanuel Vadotmaintainers:
10*01950c46SEmmanuel Vadot  - Christoph Winklhofer <cj.winklhofer@gmail.com>
11*01950c46SEmmanuel Vadot
12*01950c46SEmmanuel Vadotdescription: |
13*01950c46SEmmanuel Vadot  UART 1-wire bus. Utilizes the UART interface via the Serial Device Bus
14*01950c46SEmmanuel Vadot  to create the 1-Wire timing patterns.
15*01950c46SEmmanuel Vadot
16*01950c46SEmmanuel Vadot  The UART peripheral must support full-duplex and operate in open-drain
17*01950c46SEmmanuel Vadot  mode. The timing patterns are generated by a specific combination of
18*01950c46SEmmanuel Vadot  baud-rate and transmitted byte, which corresponds to a 1-Wire read bit,
19*01950c46SEmmanuel Vadot  write bit or reset pulse.
20*01950c46SEmmanuel Vadot
21*01950c46SEmmanuel Vadot  The default baud-rate for reset and presence detection is 9600 and for
22*01950c46SEmmanuel Vadot  a 1-Wire read or write operation 115200. In case the actual baud-rate
23*01950c46SEmmanuel Vadot  is different from the requested one, the transmitted byte is adapted
24*01950c46SEmmanuel Vadot  to generate the 1-Wire timing patterns.
25*01950c46SEmmanuel Vadot
26*01950c46SEmmanuel Vadot  https://www.analog.com/en/technical-articles/using-a-uart-to-implement-a-1wire-bus-master.html
27*01950c46SEmmanuel Vadot
28*01950c46SEmmanuel Vadotproperties:
29*01950c46SEmmanuel Vadot  compatible:
30*01950c46SEmmanuel Vadot    const: w1-uart
31*01950c46SEmmanuel Vadot
32*01950c46SEmmanuel Vadot  reset-bps:
33*01950c46SEmmanuel Vadot    default: 9600
34*01950c46SEmmanuel Vadot    description:
35*01950c46SEmmanuel Vadot      The baud rate for the 1-Wire reset and presence detect.
36*01950c46SEmmanuel Vadot
37*01950c46SEmmanuel Vadot  write-0-bps:
38*01950c46SEmmanuel Vadot    default: 115200
39*01950c46SEmmanuel Vadot    description:
40*01950c46SEmmanuel Vadot      The baud rate for the 1-Wire write-0 cycle.
41*01950c46SEmmanuel Vadot
42*01950c46SEmmanuel Vadot  write-1-bps:
43*01950c46SEmmanuel Vadot    default: 115200
44*01950c46SEmmanuel Vadot    description:
45*01950c46SEmmanuel Vadot      The baud rate for the 1-Wire write-1 and read cycle.
46*01950c46SEmmanuel Vadot
47*01950c46SEmmanuel Vadotrequired:
48*01950c46SEmmanuel Vadot  - compatible
49*01950c46SEmmanuel Vadot
50*01950c46SEmmanuel VadotadditionalProperties:
51*01950c46SEmmanuel Vadot  type: object
52*01950c46SEmmanuel Vadot
53*01950c46SEmmanuel Vadotexamples:
54*01950c46SEmmanuel Vadot  - |
55*01950c46SEmmanuel Vadot    serial {
56*01950c46SEmmanuel Vadot        onewire {
57*01950c46SEmmanuel Vadot            compatible = "w1-uart";
58*01950c46SEmmanuel Vadot        };
59*01950c46SEmmanuel Vadot    };
60