owc(4)

owc4

Dallas semiconductor 1-wire controller

Usage

device owc

Overview

The owc module implements Dallas Semiconductor 1-Wire signaling. It attaches the ow(4) driver 1-Wire bus protocol. The owc device implements the Link Layer of the 1-Wire bus protocol stack.

Bit banging a pin on a gpiobus(4) is the only supported controller. Both standard and overdrive transfer timings are implemented. Strong pull-up functionality needed to support parasitic mode is not implemented.

To enable 1-Wire for FDT systems requires modifying the DTS for your board to add something like:

/ {
	...
	onewire {
		compatible = "w1-gpio";
		gpios = <&gpio 4 1>;
	};
	...
};

The gpios property describes the GPIO pin the 1-Wire bus is connected to. For more details about the gpios property, please consult /usr/src/sys/dts/bindings-gpio.txt.

On a device.hints(5) based system these values are required for the owc:

hint.owc.%d.at

The gpiobus you are attaching to.

hint.owc.%d.pins

This is a bitmask that defines a pin on the gpiobus that is to be used for the 1-Wire bus. For instance, to configure pin 10, use the bitmask of 0x400. Please note that this mask should have only one bit set (any other bits - i.e., pins - will be ignored).

Caveats

The gpio driver implements timing by busy waiting, which can cause a high load on slower systems.

Releases

25 releases since FreeBSD 11.0-RELEASE; the text changed 11 times.

  1. 11.0
  2. 11.1
  3. 11.2
  4. 11.3
  5. 11.4
  6. 12.0
  7. 12.1
  8. 12.2
  9. 12.3
  10. 12.4
  11. 13.0–13.2
  12. 13.3–16.0

History

The owc driver first appeared in FreeBSD 11.0.

Authors

The owc device driver and this manual page were written by Warner Losh.

Bugs

Overdrive mode has not actually been tested.

From base 16.0-CURRENT-20261027-61c70dc16a79 in FreeBSD 16.0-CURRENT (2026-10-27). Parsed by carta from the page's mdoc source.