iic(4) doesn't seem to work well on a Blade 2500; devices on the bus
are detected but reading from them fails:

pcfiic0 at ebus0 addr 320-321 ivec 0x2e
iic0 at pcfiic0
"SUNW,i2c-imax" at iic0 addr 0x9 not configured
"pca9556" at iic0 addr 0x18 not configured
admtt0 at iic0 addr 0x2c, unable to read fan setting
admtt1 at iic0 addr 0x2e, unable to read fan setting
"fm3560" at iic0 addr 0x37 not configured
"fm3560" at iic0 addr 0x4e not configured
spdmem0 at iic0 addr 0x5d: no EEPROM found
spdmem1 at iic0 addr 0x5e: no EEPROM found
spdmem2 at iic0 addr 0x65: no EEPROM found
spdmem3 at iic0 addr 0x66: no EEPROM found
"ics951601" at iic0 addr 0x69 not configured

There's a short delay after admtt attach messages, and a long
delay after each spdmem line (64 seconds). Inserting printfs to
the loop at the top of spdmem_attach_common(), there is a 1-second
delay for each spdmem_read, and every value returned from
spdmem_iic_read() is 0xff.

uint8_t
spdmem_iic_read(struct spdmem_softc *v, uint8_t reg)
{
        struct spdmem_iic_softc *sc = (struct spdmem_iic_softc *)v;
        uint8_t val = 0xff;

        iic_acquire_bus(sc->sc_tag,0);
        iic_exec(sc->sc_tag, I2C_OP_READ_WITH_STOP, sc->sc_addr,
            &reg, sizeof reg, &val, sizeof val, 0);
        iic_release_bus(sc->sc_tag, 0);

        return val;
}

The obvious next place to trace is iic_exec() but I thought I'd ask
if anyone has an inkling what might be wrong before I go there.

Machine details (OpenPROM dump, dmesg, etc) are in ~sthen/blade2500
or http://junkpile.org/blade2500/. I've included an excerpt of the
dump for the main i2c bus below.

            Node 0xf008cef0
                interrupt-map: 
00000000.00000058.00000001.f007134c.0000001d.00000000.0000005c.00000001.f007134c.0000001e
                interrupts: 00000001
                #interrupt-cells: 00000001
                interrupt-map-mask: 00000000.000000ff.00000003
                reg: 00000000.00000320.00000002
                device_type: 'i2c'
                compatible: 'pcf8584'
                #size-cells: 00000000
                #address-cells: 00000002
                name: 'i2c'

                Node 0xf008e228
                    revision-id: 00000014
                    reg: 00000000.00000012
                    compatible: 'SUNW,i2c-imax'
                    name: 'i2c-bridge'
                Node 0xf008e42c
                    reg: 00000000.00000030
                    compatible: 'i2c-pca9556'
                    name: 'gpio'

                Node 0xf008e5a0
                    interrupts: 00000001
                    reg: 00000000.00000058
                    compatible: 'i2c-adm1031'
                    name: 'hardware-monitor'

                Node 0xf008e74c
                    interrupts: 00000001
                    reg: 00000000.0000005c
                    compatible: 'i2c-adm1031'
                    name: 'hardware-monitor'

                Node 0xf008e8f8
                    reg: 00000000.0000006e
                    compatible: 'i2c-fm3560'
                    name: 'gpio'

                Node 0xf008e9b8
                    reg: 00000000.0000009c
                    compatible: 'i2c-fm3560'
                    name: 'gpio'

                Node 0xf008ea78
                    reg: 00000000.000000a0
                    compatible: 'i2c-at24c64'
                    device_type: 'fru-prom'
                    name: 'audio-card-fru-prom'

                Node 0xf008ed2c
                    reg: 00000000.000000a2
                    compatible: 'i2c-at24c64'
                    device_type: 'fru-prom'
                    name: 'motherboard-fru-prom'

                Node 0xf008efe0
                    reg: 00000000.000000a8
                    compatible: 'i2c-at24c64'
                    device_type: 'fru-prom'
                    name: 'scsi-backplane-fru-prom'

                Node 0xf008f298
                    reg: 00000000.000000ba
                    compatible: 'i2c-at34c02'
                    name: 'dimm-spd'

                Node 0xf008f458
                    reg: 00000000.000000bc
                    compatible: 'i2c-at34c02'
                    name: 'dimm-spd'

                Node 0xf008f618
                    reg: 00000000.000000ca
                    compatible: 'i2c-at34c02'
                    name: 'dimm-spd'

                Node 0xf008f7d8
                    reg: 00000000.000000cc
                    compatible: 'i2c-at34c02'
                    name: 'dimm-spd'

                Node 0xf008f998
                    reg: 00000000.000000d2
                    compatible: 'i2c-ics951601'
                    name: 'clock-generator'

Reply via email to