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) Kernel driver adm1021
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   2) =====================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   3) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   4) Supported chips:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   5) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   6)   * Analog Devices ADM1021
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   7) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   8)     Prefix: 'adm1021'
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   9) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  10)     Addresses scanned: I2C 0x18 - 0x1a, 0x29 - 0x2b, 0x4c - 0x4e
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  11) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  12)     Datasheet: Publicly available at the Analog Devices website
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  13) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  14)   * Analog Devices ADM1021A/ADM1023
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  15) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  16)     Prefix: 'adm1023'
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  17) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  18)     Addresses scanned: I2C 0x18 - 0x1a, 0x29 - 0x2b, 0x4c - 0x4e
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  19) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  20)     Datasheet: Publicly available at the Analog Devices website
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  21) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  22)   * Genesys Logic GL523SM
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  23) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  24)     Prefix: 'gl523sm'
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  25) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  26)     Addresses scanned: I2C 0x18 - 0x1a, 0x29 - 0x2b, 0x4c - 0x4e
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  27) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  28)     Datasheet:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  29) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  30)   * Maxim MAX1617
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  31) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  32)     Prefix: 'max1617'
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  33) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  34)     Addresses scanned: I2C 0x18 - 0x1a, 0x29 - 0x2b, 0x4c - 0x4e
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  35) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  36)     Datasheet: Publicly available at the Maxim website
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  37) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  38)   * Maxim MAX1617A
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  39) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  40)     Prefix: 'max1617a'
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  41) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  42)     Addresses scanned: I2C 0x18 - 0x1a, 0x29 - 0x2b, 0x4c - 0x4e
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  43) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  44)     Datasheet: Publicly available at the Maxim website
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  45) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  46)   * National Semiconductor LM84
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  47) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  48)     Prefix: 'lm84'
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  49) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  50)     Addresses scanned: I2C 0x18 - 0x1a, 0x29 - 0x2b, 0x4c - 0x4e
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  51) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  52)     Datasheet: Publicly available at the National Semiconductor website
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  53) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  54)   * Philips NE1617
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  55) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  56)     Prefix: 'max1617' (probably detected as a max1617)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  57) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  58)     Addresses scanned: I2C 0x18 - 0x1a, 0x29 - 0x2b, 0x4c - 0x4e
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  59) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  60)     Datasheet: Publicly available at the Philips website
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  61) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  62)   * Philips NE1617A
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  63) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  64)     Prefix: 'max1617' (probably detected as a max1617)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  65) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  66)     Addresses scanned: I2C 0x18 - 0x1a, 0x29 - 0x2b, 0x4c - 0x4e
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  67) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  68)     Datasheet: Publicly available at the Philips website
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  69) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  70)   * TI THMC10
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  71) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  72)     Prefix: 'thmc10'
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  73) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  74)     Addresses scanned: I2C 0x18 - 0x1a, 0x29 - 0x2b, 0x4c - 0x4e
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  75) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  76)     Datasheet: Publicly available at the TI website
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  77) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  78)   * Onsemi MC1066
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  79) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  80)     Prefix: 'mc1066'
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  81) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  82)     Addresses scanned: I2C 0x18 - 0x1a, 0x29 - 0x2b, 0x4c - 0x4e
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  83) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  84)     Datasheet: Publicly available at the Onsemi website
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  85) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  86) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  87) Authors:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  88) 	- Frodo Looijaard <frodol@dds.nl>,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  89) 	- Philip Edelbrock <phil@netroedge.com>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  90) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  91) Module Parameters
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  92) -----------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  93) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  94) * read_only: int
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  95)   Don't set any values, read only mode
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  96) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  97) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  98) Description
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  99) -----------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) The chips supported by this driver are very similar. The Maxim MAX1617 is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) the oldest; it has the problem that it is not very well detectable. The
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) MAX1617A solves that. The ADM1021 is a straight clone of the MAX1617A.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) Ditto for the THMC10. From here on, we will refer to all these chips as
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105) ADM1021-clones.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) The ADM1021 and MAX1617A reports a die code, which is a sort of revision
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) code. This can help us pinpoint problems; it is not very useful
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) otherwise.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) ADM1021-clones implement two temperature sensors. One of them is internal,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) and measures the temperature of the chip itself; the other is external and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) is realised in the form of a transistor-like device. A special alarm
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) indicates whether the remote sensor is connected.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116) Each sensor has its own low and high limits. When they are crossed, the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) corresponding alarm is set and remains on as long as the temperature stays
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118) out of range. Temperatures are measured in degrees Celsius. Measurements
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) are possible between -65 and +127 degrees, with a resolution of one degree.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) If an alarm triggers, it will remain triggered until the hardware register
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122) is read at least once. This means that the cause for the alarm may already
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) have disappeared!
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125) This driver only updates its values each 1.5 seconds; reading it more often
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) will do no harm, but will return 'old' values. It is possible to make
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127) ADM1021-clones do faster measurements, but there is really no good reason
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128) for that.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131) Netburst-based Xeon support
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132) ---------------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134) Some Xeon processors based on the Netburst (early Pentium 4, from 2001 to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) 2003) microarchitecture had real MAX1617, ADM1021, or compatible chips
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) within them, with two temperature sensors. Other Xeon processors of this
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137) era (with 400 MHz FSB) had chips with only one temperature sensor.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139) If you have such an old Xeon, and you get two valid temperatures when
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140) loading the adm1021 module, then things are good.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142) If nothing happens when loading the adm1021 module, and you are certain
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143) that your specific Xeon processor model includes compatible sensors, you
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144) will have to explicitly instantiate the sensor chips from user-space. See
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145) method 4 in Documentation/i2c/instantiating-devices.rst. Possible slave
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) addresses are 0x18, 0x1a, 0x29, 0x2b, 0x4c, or 0x4e. It is likely that
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) only temp2 will be correct and temp1 will have to be ignored.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149) Previous generations of the Xeon processor (based on Pentium II/III)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150) didn't have these sensors. Next generations of Xeon processors (533 MHz
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151) FSB and faster) lost them, until the Core-based generation which
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152) introduced integrated digital thermal sensors. These are supported by
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) the coretemp driver.