You are not logged in.

#1 2016-02-05 00:16:18

teganburns
Member
Registered: 2016-02-04
Posts: 9

Infrared / Proximity sensor not found?

I am trying to use/find the proximity sensor that is from a laptop (HP Envy 17 with Beats) and I was unable to find the device listed.
-Below are some commands I ran to see if I could find the device but to no avail.
-I know it's connected because the webcam works perfectly and shows on the devices.

I'm thinking there just isn't a driver for the sensors...?


lsusb

 
Bus 002 Device 005: ID 064e:e258 Suyin Corp. HP TrueVision HD Integrated Webcam
Bus 002 Device 004: ID 0424:b832 Standard Microsystems Corp.
Bus 002 Device 003: ID 0846:9020 NetGear, Inc. WNA3100(v1) Wireless-N 300 [Broadcom BCM43231]
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 8086:0189 Intel Corp.
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
 

lspci

 
00:00.0 Host bridge: Intel Corporation 2nd Generation Core Processor Family DRAM Controller (rev 09)
00:01.0 PCI bridge: Intel Corporation Xeon E3-1200/2nd Generation Core Processor Family PCI Express Root Port (rev 09)
00:01.1 PCI bridge: Intel Corporation Xeon E3-1200/2nd Generation Core Processor Family PCI Express Root Port (rev 09)
00:01.2 PCI bridge: Intel Corporation Xeon E3-1200/2nd Generation Core Processor Family PCI Express Root Port (rev 09)
00:16.0 Communication controller: Intel Corporation 6 Series/C200 Series Chipset Family MEI Controller #1 (rev 04)
00:1a.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #2 (rev 05)
00:1b.0 Audio device: Intel Corporation 6 Series/C200 Series Chipset Family High Definition Audio Controller (rev 05)
00:1c.0 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 1 (rev b5)
00:1c.2 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 3 (rev b5)
00:1c.4 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 5 (rev b5)
00:1c.6 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 7 (rev b5)
00:1c.7 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 8 (rev b5)
00:1d.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #1 (rev 05)
00:1f.0 ISA bridge: Intel Corporation HM65 Express Chipset Family LPC Controller (rev 05)
00:1f.2 SATA controller: Intel Corporation 6 Series/C200 Series Chipset Family 6 port SATA AHCI Controller (rev 05)
00:1f.3 SMBus: Intel Corporation 6 Series/C200 Series Chipset Family SMBus Controller (rev 05)
01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Whistler [Radeon HD 6730M/6770M/7690M XT]
01:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Turks/Whistler HDMI Audio [Radeon HD 6000 Series]
09:00.0 Network controller: Intel Corporation Centrino Advanced-N 6230 [Rainbow Peak] (rev 34)
0a:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS5209 PCI Express Card Reader (rev 01)
10:00.0 Ethernet controller: Qualcomm Atheros AR8151 v2.0 Gigabit Ethernet (rev c0)
11:00.0 USB controller: NEC Corporation uPD720200 USB 3.0 Host Controller (rev 04)
12:00.0 USB controller: NEC Corporation uPD720200 USB 3.0 Host Controller (rev 04)

lshw -short

H/W path        Device     Class          Description
=====================================================
                           system         HP ENVY 17 Notebook PC (A9P78UA#ABA)
/0                         bus            1689
/0/0                       memory         1MiB BIOS
/0/1a                      memory         8GiB System Memory
/0/1a/0                    memory         4GiB SODIMM DDR3 Synchronous 1600 MHz (0.6 ns)
/0/1a/1                    memory         4GiB SODIMM DDR3 Synchronous 1600 MHz (0.6 ns)
/0/24                      processor      Intel(R) Core(TM) i7-2670QM CPU @ 2.20GHz
/0/24/26                   memory         32KiB L1 cache
/0/24/27                   memory         256KiB L2 cache
/0/24/28                   memory         6MiB L3 cache
/0/25                      memory         32KiB L1 cache
/0/100                     bridge         2nd Generation Core Processor Family DRAM Controller
/0/100/1                   bridge         Xeon E3-1200/2nd Generation Core Processor Family PCI Express Root Port
/0/100/1/0                 display        Whistler [Radeon HD 6730M/6770M/7690M XT]
/0/100/1/0.1               multimedia     Turks/Whistler HDMI Audio [Radeon HD 6000 Series]
/0/100/1.1                 bridge         Xeon E3-1200/2nd Generation Core Processor Family PCI Express Root Port
/0/100/1.2                 bridge         Xeon E3-1200/2nd Generation Core Processor Family PCI Express Root Port
/0/100/16                  communication  6 Series/C200 Series Chipset Family MEI Controller #1
/0/100/1a                  bus            6 Series/C200 Series Chipset Family USB Enhanced Host Controller #2
/0/100/1b                  multimedia     6 Series/C200 Series Chipset Family High Definition Audio Controller
/0/100/1c                  bridge         6 Series/C200 Series Chipset Family PCI Express Root Port 1
/0/100/1c/0     wlan0      network        Centrino Advanced-N 6230 [Rainbow Peak]
/0/100/1c.2                bridge         6 Series/C200 Series Chipset Family PCI Express Root Port 3
/0/100/1c.2/0              generic        RTS5209 PCI Express Card Reader
/0/100/1c.4                bridge         6 Series/C200 Series Chipset Family PCI Express Root Port 5
/0/100/1c.4/0   eth0       network        AR8151 v2.0 Gigabit Ethernet
/0/100/1c.6                bridge         6 Series/C200 Series Chipset Family PCI Express Root Port 7
/0/100/1c.6/0              bus            uPD720200 USB 3.0 Host Controller
/0/100/1c.7                bridge         6 Series/C200 Series Chipset Family PCI Express Root Port 8
/0/100/1c.7/0              bus            uPD720200 USB 3.0 Host Controller
/0/100/1d                  bus            6 Series/C200 Series Chipset Family USB Enhanced Host Controller #1
/0/100/1f                  bridge         HM65 Express Chipset Family LPC Controller
/0/100/1f.2                storage        6 Series/C200 Series Chipset Family 6 port SATA AHCI Controller
/0/100/1f.3                bus            6 Series/C200 Series Chipset Family SMBus Controller
/0/1            scsi1      storage
/0/1/0.0.0      /dev/sda   disk           80GB Hitachi HTS54328
/0/1/0.0.0/1    /dev/sda1  volume         66GiB EXT4 volume
/0/1/0.0.0/2    /dev/sda2  volume         8172MiB Extended partition
/0/1/0.0.0/2/5  /dev/sda5  volume         8172MiB Linux swap / Solaris partition
/0/2            scsi2      storage
/0/2/0.0.0      /dev/sdb   disk           320GB WDC WD3200BEVT-8
/0/2/0.0.0/1    /dev/sdb1  volume         298GiB EXT4 volume
/1                         power          Lithium Ion Battery
/2                         power          OEM_Define5

cat /proc/bus/input/devices

 
I: Bus=0019 Vendor=0000 Product=0005 Version=0000
N: Name="Lid Switch"
P: Phys=PNP0C0D/button/input0
S: Sysfs=/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0D:00/input/input0
U: Uniq=
H: Handlers=event0
B: PROP=0
B: EV=21
B: SW=1

I: Bus=0019 Vendor=0000 Product=0001 Version=0000
N: Name="Power Button"
P: Phys=PNP0C0C/button/input0
S: Sysfs=/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0C:00/input/input1
U: Uniq=
H: Handlers=kbd event1
B: PROP=0
B: EV=3
B: KEY=10000000000000 0

I: Bus=0019 Vendor=0000 Product=0001 Version=0000
N: Name="Power Button"
P: Phys=LNXPWRBN/button/input0
S: Sysfs=/devices/LNXSYSTM:00/LNXPWRBN:00/input/input2
U: Uniq=
H: Handlers=kbd event2
B: PROP=0
B: EV=3
B: KEY=10000000000000 0

I: Bus=0011 Vendor=0001 Product=0001 Version=ab41
N: Name="AT Translated Set 2 keyboard"
P: Phys=isa0060/serio0/input0
S: Sysfs=/devices/platform/i8042/serio0/input/input3
U: Uniq=
H: Handlers=sysrq kbd event3
B: PROP=0
B: EV=120013
B: KEY=20000 20 0 0 1500f02100000 3803078f900d401 feffffdfffefffff fffffffffffffffe
B: MSC=10
B: LED=7

I: Bus=0019 Vendor=0000 Product=0006 Version=0000
N: Name="Video Bus"
P: Phys=LNXVIDEO/video/input0
S: Sysfs=/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:2e/LNXVIDEO:00/input/input6
U: Uniq=
H: Handlers=kbd event4
B: PROP=0
B: EV=3
B: KEY=3e000b00000000 0 0 0

I: Bus=0011 Vendor=0002 Product=0001 Version=0000
N: Name="PS/2 Generic Mouse"
P: Phys=isa0060/serio1/input0
S: Sysfs=/devices/platform/i8042/serio1/input/input5
U: Uniq=
H: Handlers=mouse0 event5
B: PROP=0
B: EV=7
B: KEY=70000 0 0 0 0
B: REL=3

I: Bus=0003 Vendor=0424 Product=b832 Version=0110
N: Name="Standard Microsystems Corp. HP Wireless Audio Adapter"
P: Phys=usb-0000:00:1d.0-1.5/input3
S: Sysfs=/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.5/2-1.5:1.3/0003:0424:B832.0001/input/input7
U: Uniq=
H: Handlers=kbd event6
B: PROP=0
B: EV=1b
B: KEY=30040 0 0 808003072fd025 bf14444200000000 1 12001300138000 43fa00404c00 9e168000004400 10000002
B: ABS=100000000
B: MSC=10

I: Bus=0019 Vendor=0000 Product=0000 Version=0000
N: Name="HP Wireless hotkeys"
P: Phys=hpq6001/input0
S: Sysfs=/devices/virtual/input/input8
U: Uniq=
H: Handlers=rfkill kbd event7
B: PROP=0
B: EV=3
B: KEY=80000000000000 0 0 0

I: Bus=0000 Vendor=0000 Product=0000 Version=0000
N: Name="HDA ATI HDMI HDMI/DP,pcm=3"
P: Phys=ALSA
S: Sysfs=/devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/input9
U: Uniq=
H: Handlers=event8
B: PROP=0
B: EV=21
B: SW=140

I: Bus=0000 Vendor=0000 Product=0000 Version=0000
N: Name="HDA Intel PCH Mic"
P: Phys=ALSA
S: Sysfs=/devices/pci0000:00/0000:00:1b.0/sound/card0/input11
U: Uniq=
H: Handlers=event9
B: PROP=0
B: EV=21
B: SW=10

I: Bus=0000 Vendor=0000 Product=0000 Version=0000
N: Name="HDA Intel PCH Headphone"
P: Phys=ALSA
S: Sysfs=/devices/pci0000:00/0000:00:1b.0/sound/card0/input12
U: Uniq=
H: Handlers=event10
B: PROP=0
B: EV=21
B: SW=4

I: Bus=0000 Vendor=0000 Product=0000 Version=0000
N: Name="HDA Intel PCH HDMI/DP,pcm=3"
P: Phys=ALSA
S: Sysfs=/devices/pci0000:00/0000:00:1b.0/sound/card0/input13
U: Uniq=
H: Handlers=event11
B: PROP=0
B: EV=21
B: SW=140

I: Bus=0000 Vendor=0000 Product=0000 Version=0000
N: Name="HDA Intel PCH HDMI/DP,pcm=7"
P: Phys=ALSA
S: Sysfs=/devices/pci0000:00/0000:00:1b.0/sound/card0/input14
U: Uniq=
H: Handlers=event12
B: PROP=0
B: EV=21
B: SW=140

I: Bus=0000 Vendor=0000 Product=0000 Version=0000
N: Name="HDA Intel PCH HDMI/DP,pcm=8"
P: Phys=ALSA
S: Sysfs=/devices/pci0000:00/0000:00:1b.0/sound/card0/input15
U: Uniq=
H: Handlers=event13
B: PROP=0
B: EV=21
B: SW=140

I: Bus=0019 Vendor=0000 Product=0000 Version=0000
N: Name="ST LIS3LV02DL Accelerometer"
P: Phys=lis3lv02d/input0
S: Sysfs=/devices/platform/lis3lv02d/input/input16
U: Uniq=
H: Handlers=event14 js0
B: PROP=0
B: EV=9
B: ABS=7

I: Bus=0019 Vendor=0000 Product=0000 Version=0000
N: Name="HP WMI hotkeys"
P: Phys=wmi/input0
S: Sysfs=/devices/virtual/input/input10
U: Uniq=
H: Handlers=kbd event15
B: PROP=0
B: EV=33
B: KEY=4000000000 0 1000700000000 2102400 0 0
B: MSC=10
B: SW=22

I: Bus=0003 Vendor=064e Product=e258 Version=0110
N: Name="HP TrueVision HD"
P: Phys=usb-0000:00:1d.0-1.6/button
S: Sysfs=/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.6/2-1.6:1.0/input/input17
U: Uniq=
H: Handlers=kbd event16
B: PROP=0
B: EV=3
B: KEY=100000 0 0 0

sensors

 
acpitz-virtual-0
Adapter: Virtual device
temp1:        +41.0°C  (crit = +120.0°C)
temp2:        +39.0°C  (crit = +127.0°C)

radeon-pci-0100
Adapter: PCI adapter
temp1:        +39.5°C  (crit = +120.0°C, hyst = +90.0°C)

coretemp-isa-0000
Adapter: ISA adapter
Physical id 0:  +44.0°C  (high = +86.0°C, crit = +100.0°C)
Core 0:         +43.0°C  (high = +86.0°C, crit = +100.0°C)
Core 1:         +42.0°C  (high = +86.0°C, crit = +100.0°C)
Core 2:         +44.0°C  (high = +86.0°C, crit = +100.0°C)
Core 3:         +41.0°C  (high = +86.0°C, crit = +100.0°C)
 

Link to Pictures

What each picture is:

  1. The proximity sensor I'm trying to use

  2. reverse

  3. Webcam (seems to have 2 IR sensors/receivers? Maybe TOF camera??)

  4. IR sensor/receiver??

  5. reverse

(first post, apologies if there are any informalities)

Offline

#2 2016-02-05 10:37:53

mich41
Member
Registered: 2012-06-22
Posts: 796

Re: Infrared / Proximity sensor not found?

It doesn't seem to be any of these USB or PCI devices, maybe it's on SMBus?

Try googling, maybe somebody got it to work. And if you have Windows, find it in Device Manager and see what's its name and how it is connected (view menu -> sort devices by connection).

Offline

#3 2016-02-06 23:35:39

teganburns
Member
Registered: 2016-02-04
Posts: 9

Re: Infrared / Proximity sensor not found?

Ok so I loaded the i2c-dev module

sudo modprobe i2c-dev

Then ran i2cdetect -l and got

 i2c-0   unknown         Radeon i2c bit bus 0x90                 N/A
i2c-1   unknown         Radeon i2c bit bus 0x91                 N/A
i2c-2   unknown         Radeon i2c bit bus 0x92                 N/A
i2c-3   unknown         Radeon i2c bit bus 0x93                 N/A
i2c-4   unknown         Radeon i2c bit bus 0x94                 N/A
i2c-5   unknown         Radeon i2c bit bus 0x95                 N/A
i2c-6   unknown         Radeon i2c bit bus 0x96                 N/A
i2c-7   unknown         Radeon i2c bit bus 0x97                 N/A
i2c-8   unknown         card0-DP-1                              N/A
i2c-9   unknown         card0-DP-2                              N/A

i2cdetect -F 0
(did this on 0-9 all were the same)

Functionalities implemented by /dev/i2c-9:
I2C                              yes
SMBus Quick Command              yes
SMBus Send Byte                  yes
SMBus Receive Byte               yes
SMBus Write Byte                 yes
SMBus Read Byte                  yes
SMBus Write Word                 yes
SMBus Read Word                  yes
SMBus Process Call               yes
SMBus Block Write                yes
SMBus Block Read                 yes
SMBus Block Process Call         yes
SMBus PEC                        yes
I2C Block Write                  yes
I2C Block Read                   yes

i2cdetect -r 0
(again ran on 0-9 all were the same)

WARNING! This program can confuse your I2C bus, cause data loss and worse!
I will probe file /dev/i2c-0 using read byte commands.
I will probe address range 0x03-0x77.
Continue? [Y/n] y
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --

I'm thinking because there is no chip on the ic (just resistors and voltage regs) it might just be send high and low to XX address and read XX address for the IR receiver. Is this a possibility?
If so it would just be a matter of finding out how to interface it.

I was looking for the chip on the Webcam (Picture #3 link in first comment) to see if that could give me any clues but was unable to find anything.
au3821-b53-jcn-gr <-- the chip for reference

Is the best bet from here going to be probing the i2 bus addresses and seeing if the IR light turns on? I have a microcontroller that I could use to detect if the IR light turns on but I feel like there is an easier way...

Offline

#4 2016-02-07 00:19:44

mich41
Member
Registered: 2012-06-22
Posts: 796

Re: Infrared / Proximity sensor not found?

teganburns wrote:

Then ran i2cdetect -l and got

All of these buses are "Display Data Channels", nothing to see there. You probably need acpi_enforce_resources=lax to access the SMBus. See lm_sensors wiki.
BTW, just today somebody bumped this thread about laptop LCDs broken by sensors-detect wink But you were lucky, it seems.

teganburns wrote:

I'm thinking because there is no chip on the ic (just resistors and voltage regs) it might just be send high and low to XX address and read XX address for the IR receiver. Is this a possibility?

IC = chip. Maybe you meant "on this PCB"? Two questions: are you sure this is the proximity sensor? Are you sure they really are voltage regs and not something else?
Maybe it is a low/high output routed to some SuperIO or southbridge GPIO, but in such case - good luck tracing where it goes.

teganburns wrote:

Is the best bet from here going to be probing the i2 bus addresses and seeing if the IR light turns on?

I don't think so, if there are no chips then probably there is no I2C.

teganburns wrote:

I have a microcontroller that I could use to detect if the IR light turns on but I feel like there is an easier way...

I think many cameras see IR.

Offline

#5 2016-02-07 02:42:17

teganburns
Member
Registered: 2016-02-04
Posts: 9

Re: Infrared / Proximity sensor not found?

mich41 wrote:

All of these buses are "Display Data Channels", nothing to see there. You probably need acpi_enforce_resources=lax to access the SMBus. See lm_sensors wiki.
BTW, just today somebody bumped this thread about laptop LCDs broken by sensors-detect wink But you were lucky, it seems.

I'm not sure how to add acpi_enforce_recources=lax to the kernel like the wiki was describing and the FAQ Tutorial link is broken?
Always good to hear that I didn't break something lol

mich41 wrote:

IC = chip. Maybe you meant "on this PCB"?

Yepp, whoops. yikes

mich41 wrote:

Two questions: are you sure this is the proximity sensor? Are you sure they really are voltage regs and not something else?

Well I'm lead to believe it is because of  image #2 . The back side has LOUIS-XXXXX-PROXIMITY-XXX written on the back of the PCB in question.
In my experience I would say yes there are 2 voltage regs b/c there are 2 diodes, but just for reference I wrote down what I could read on each chip. I really don't think it could be anything else unless there was some signal processing going on.
the larger of the two = 02CDAC
smaller = NC

mich41 wrote:

I don't think so, if there are no chips then probably there is no I2C.

Ok, how do I interact with the southbridge GPIO?

There is a chip detected by superiotool -e

superiotool r6637
Found SMSC SCH5317 (id=0x85, rev=0x72) at 0x2e
No extra registers known for this chip.

Then I finally found a viable pdf  http://h20565.www2.hp.com/hpsc/doc/publ … -c00771619

Offline

#6 2016-02-07 10:52:03

mich41
Member
Registered: 2012-06-22
Posts: 796

Re: Infrared / Proximity sensor not found?

OK, those chips indeed look like vregs or discrete transistors (aren't they marked Qnnnn - this would be transistor). Which means there is some nontrivial logic in this transcluent "sensor" thing. Probably it's I2C or SPI, which means you won't know how to talk to this chip without identifying it. Look for markings underneath this black rubber or try to find schematic of your laptop on the net - those sometimes leak and circulate among laptop repairers.

As for kernel parameters, you specify them in the configuration of whatever bootloader you are using. But:
1. scanning I2C may (rarely) screw something up
2. even if it doesn't, you'll only get a list of addresses of devices which responded
3. knowing the address may help in identification of this chip
4. but it will be mixed with addresses of other devices on the motherboard
5. devices like clock generators, voltage regulators and flash memories, which you really don't want to spam with random bytes to "see what happens"

Offline

#7 2016-02-22 22:46:23

teganburns
Member
Registered: 2016-02-04
Posts: 9

Re: Infrared / Proximity sensor not found?

mich41 wrote:

Look for markings underneath this black rubber or try to find schematic of your laptop on the net - those sometimes leak and circulate among laptop repairers.

Nothing under the rubber or tape besides blank PCB board. The link I posted before gives some pretty detailed information on the SCH5317 control registers (4-25) so that should help.


I found this online which seems to be a ASM (intel x86_64) based driver, I haven't had the time to use this successfully but I wanted to post this here before I forgot about it. Maybe someone else will find this and be able to test it out.
Here is the link https://www.kernel.org/doc/Documentation/hwmon/smsc47b397
but incase it gets removed from the website I pasted the raw text below.

Kernel driver smsc47b397
========================

Supported chips:
  * SMSC LPC47B397-NC
  * SMSC SCH5307-NS
  * SMSC SCH5317
    Prefix: 'smsc47b397'
    Addresses scanned: none, address read from Super I/O config space
    Datasheet: In this file

Authors: Mark M. Hoffman <mhoffman@lightlink.com>
         Utilitek Systems, Inc.

November 23, 2004

The following specification describes the SMSC LPC47B397-NC[1] sensor chip
(for which there is no public datasheet available). This document was
provided by Craig Kelly (In-Store Broadcast Network) and edited/corrected
by Mark M. Hoffman <mhoffman@lightlink.com>.

[1] And SMSC SCH5307-NS and SCH5317, which have different device IDs but are
otherwise compatible.

* * * * *

Methods for detecting the HP SIO and reading the thermal data on a dc7100.

The thermal information on the dc7100 is contained in the SIO Hardware Monitor
(HWM). The information is accessed through an index/data pair. The index/data
pair is located at the HWM Base Address + 0 and the HWM Base Address + 1. The
HWM Base address can be obtained from Logical Device 8, registers 0x60 (MSB)
and 0x61 (LSB). Currently we are using 0x480 for the HWM Base Address and
0x480 and 0x481 for the index/data pair.

Reading temperature information.
The temperature information is located in the following registers:
Temp1		0x25	(Currently, this reflects the CPU temp on all systems).
Temp2		0x26
Temp3		0x27
Temp4		0x80

Programming Example
The following is an example of how to read the HWM temperature registers:
MOV	DX,480H
MOV	AX,25H
OUT	DX,AL
MOV	DX,481H
IN	AL,DX

AL contains the data in hex, the temperature in Celsius is the decimal
equivalent.

Ex: If AL contains 0x2A, the temperature is 42 degrees C.

Reading tach information.
The fan speed information is located in the following registers:
		LSB	MSB
Tach1		0x28	0x29	(Currently, this reflects the CPU
				fan speed on all systems).
Tach2		0x2A	0x2B
Tach3		0x2C	0x2D
Tach4		0x2E	0x2F

Important!!!
Reading the tach LSB locks the tach MSB.
The LSB Must be read first.

How to convert the tach reading to RPM.
The tach reading (TCount) is given by: (Tach MSB * 256) + (Tach LSB)
The SIO counts the number of 90kHz (11.111us) pulses per revolution.
RPM = 60/(TCount * 11.111us)

Example:
Reg 0x28 = 0x9B
Reg 0x29 = 0x08

TCount = 0x89B = 2203

RPM = 60 / (2203 * 11.11111 E-6) = 2451 RPM

Obtaining the SIO version.

CONFIGURATION SEQUENCE
To program the configuration registers, the following sequence must be followed:
1. Enter Configuration Mode
2. Configure the Configuration Registers
3. Exit Configuration Mode.

Enter Configuration Mode
To place the chip into the Configuration State The config key (0x55) is written
to the CONFIG PORT (0x2E).

Configuration Mode
In configuration mode, the INDEX PORT is located at the CONFIG PORT address and
the DATA PORT is at INDEX PORT address + 1.

The desired configuration registers are accessed in two steps:
a.	Write the index of the Logical Device Number Configuration Register
	(i.e., 0x07) to the INDEX PORT and then write the number of the
	desired logical device to the DATA PORT.

b.	Write the address of the desired configuration register within the
	logical device to the INDEX PORT and then write or read the config-
	uration register through the DATA PORT.

Note: If accessing the Global Configuration Registers, step (a) is not required.

Exit Configuration Mode
To exit the Configuration State the write 0xAA to the CONFIG PORT (0x2E).
The chip returns to the RUN State.  (This is important).

Programming Example
The following is an example of how to read the SIO Device ID located at 0x20

; ENTER CONFIGURATION MODE
MOV	DX,02EH
MOV	AX,055H
OUT	DX,AL
; GLOBAL CONFIGURATION  REGISTER
MOV	DX,02EH
MOV	AL,20H
OUT	DX,AL
; READ THE DATA
MOV	DX,02FH
IN	AL,DX
; EXIT CONFIGURATION MODE
MOV	DX,02EH
MOV	AX,0AAH
OUT	DX,AL

The registers of interest for identifying the SIO on the dc7100 are Device ID
(0x20) and Device Rev  (0x21).

The Device ID will read 0x6F (0x81 for SCH5307-NS, and 0x85 for SCH5317)
The Device Rev currently reads 0x01

Obtaining the HWM Base Address.
The following is an example of how to read the HWM Base Address located in
Logical Device 8.

; ENTER CONFIGURATION MODE
MOV	DX,02EH
MOV	AX,055H
OUT	DX,AL
; CONFIGURE REGISTER CRE0,
; LOGICAL DEVICE 8
MOV	DX,02EH
MOV	AL,07H
OUT	DX,AL ;Point to LD# Config Reg
MOV	DX,02FH
MOV	AL, 08H
OUT	DX,AL;Point to Logical Device 8
;
MOV	DX,02EH
MOV	AL,60H
OUT	DX,AL	; Point to HWM Base Addr MSB
MOV	DX,02FH
IN	AL,DX	; Get MSB of HWM Base Addr
; EXIT CONFIGURATION MODE
MOV	DX,02EH
MOV	AX,0AAH
OUT	DX,AL

Offline

#8 2016-02-22 23:03:56

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,464

Re: Infrared / Proximity sensor not found?

Where in the system was that sensor?  What thing it it that you think this sensor is supposed to detect?

I am wondering if this is not a fan speed sensor (based on the comments in the text from post 7)


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Online

#9 2016-02-23 00:00:34

mich41
Member
Registered: 2012-06-22
Posts: 796

Re: Infrared / Proximity sensor not found?

But SCH5317 is a SuperIO, completely different chip.

This one probably sits on SMBus. I suppose you could verify this and also determine its address by scanning the SMBus (see post #4) twice - with the sensor connected and disconnected.

And if you can find Windows drivers for this device, see if maybe they contain its name somewhere.

Last edited by mich41 (2016-02-23 00:08:26)

Offline

#10 2016-02-23 00:27:01

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,464

Re: Infrared / Proximity sensor not found?

Well, I could not find a datasheet for the SCH5317, but Super I/O parts generally sit on the LPC bus (Low Pin Count) over which the legacy EISA address space is implemented.  These Super I/O chips pin out legacy low speed devices such as PS/2 keyboard connections, serial UARTS at the old 0x3f8/0x2f8 base addresses.  They also implement floppy controllers, parallel ports, and (significant to this discussion) SMBus ports.  The SMBus is, for all intents and purposes, an i2c interface with a slightly more defined protocol, and tighter requirements for drive and rise times to permit faster speeds.

My bet is that this sensor detects fan RPM and is a SMBus device;  that and that that SMBusis hosted by the SCH5317, which is a LPC device, which means the SMBus controller is not discoverable


Edit:  For things that are not discoverable, one must know about the design.  Here is an example from another HP machine that seems to use this same part:
http://www.manualslib.com/manual/72058/ … ml?page=77

This may, or may not be applicable to your machine,  YMMV.  Take a look around the net for manuals on your machine (which I think had been mentioned afore)

Last edited by ewaller (2016-02-23 00:32:00)


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Online

Board footer

Powered by FluxBB