Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  1) ========================================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  2) Kernel driver for omap HDQ/1-wire module
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  3) ========================================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  4) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  5) Supported chips:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  6) ================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  7) HDQ/1-wire controller on the TI OMAP 2430/3430 platforms.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  8) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  9) A useful link about HDQ basics:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) ===============================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) http://focus.ti.com/lit/an/slua408a/slua408a.pdf
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) Description:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) ============
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) The HDQ/1-Wire module of TI OMAP2430/3430 platforms implement the hardware
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) protocol of the master functions of the Benchmark HDQ and the Dallas
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) Semiconductor 1-Wire protocols. These protocols use a single wire for
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) communication between the master (HDQ/1-Wire controller) and the slave
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) (HDQ/1-Wire external compliant device).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) A typical application of the HDQ/1-Wire module is the communication with battery
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) monitor (gas gauge) integrated circuits.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) The controller supports operation in both HDQ and 1-wire mode. The essential
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) difference between the HDQ and 1-wire mode is how the slave device responds to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) initialization pulse.In HDQ mode, the firmware does not require the host to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) create an initialization pulse to the slave.However, the slave can be reset by
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) using an initialization pulse (also referred to as a break pulse).The slave
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) does not respond with a presence pulse as it does in the 1-Wire protocol.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) Remarks:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) ========
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) The driver (drivers/w1/masters/omap_hdq.c) supports the HDQ mode of the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) controller. In this mode, as we can not read the ID which obeys the W1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) spec(family:id:crc), a module parameter can be passed to the driver which will
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) be used to calculate the CRC and pass back an appropriate slave ID to the W1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) core.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) By default the master driver and the BQ slave i/f
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) driver(drivers/w1/slaves/w1_bq27000.c) sets the ID to 1.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) Please note to load both the modules with a different ID if required, but note
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) that the ID used should be same for both master and slave driver loading.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) e.g::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46)   insmod omap_hdq.ko W1_ID=2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47)   insmod w1_bq27000.ko F_ID=2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) The driver also supports 1-wire mode. In this mode, there is no need to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) pass slave ID as parameter. The driver will auto-detect slaves connected
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) to the bus using SEARCH_ROM procedure. 1-wire mode can be selected by
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) setting "ti,mode" property to "1w" in DT (see
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) Documentation/devicetree/bindings/w1/omap-hdq.txt for more details).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54) By default driver is in HDQ mode.