Eugen Hristev | e1721ba | 2018-09-18 10:35:26 +0300 | [diff] [blame] | 1 | W1 gpio device binding - one wire protocol over bitbanged gpio |
| 2 | ======================= |
| 3 | |
| 4 | |
| 5 | Child nodes are required in device tree. The driver will detect |
| 6 | the devices serial number and then search in the child nodes in the device tree |
| 7 | for the proper node and try to match it with the device. |
| 8 | |
| 9 | Also check doc/device-tree-bindings/w1-eeprom for possible child nodes drivers |
| 10 | |
| 11 | Driver: |
| 12 | - drivers/w1/w1-gpio.c |
| 13 | |
| 14 | Software w1 device-tree node properties: |
| 15 | Required: |
| 16 | * compatible = "w1-gpio"; |
| 17 | * gpios = <...>; |
| 18 | This is the gpio used for one wire protocol, using bitbanging |
| 19 | |
| 20 | Optional: |
| 21 | * none |
| 22 | |
| 23 | Example: |
| 24 | |
| 25 | onewire_tm: onewire { |
| 26 | compatible = "w1-gpio"; |
| 27 | gpios = <&pioA 32 0>; |
| 28 | }; |
| 29 | |
| 30 | Example with child: |
| 31 | |
| 32 | onewire_tm: onewire { |
| 33 | compatible = "w1-gpio"; |
| 34 | gpios = <&pioA 32 0>; |
| 35 | |
| 36 | eeprom1: eeprom@0 { |
| 37 | compatible = "maxim,ds24xxx"; |
| 38 | } |
| 39 | }; |