OneWire Support

Jump to: navigation, search

The right pin for onewire is PD2 (labelled on the socket LCD-D2).

 # cat /sys/kernel/debug/pinctrl/1c20800.pinctrl/pinmux-pins | grep onewire
 pin 98 (PD2): onewire 1c20800.pinctrl:98 function gpio_in group PD2

Using my kernel (see Kernel Hacking) I have connected a ds18b20 to +3,3v, LCD-D2 and ground, a 4.7K resistor between +3.3v and LCD-D2 and it works:

$ sudo modprobe w1_therm 
$ ls /sys/bus/w1/devices/
10-0008021884c0  w1_bus_master1
$ cat /sys/bus/w1/devices/10-0008021884c0/w1_slave 
30 00 4b 46 ff ff 0f 10 b8 : crc=b8 YES
30 00 4b 46 ff ff 0f 10 b8 t=23812

A question is: if PD2 is configured for onewire how can be shared with the display?