Page MenuHomeFreeBSD

acpi_iicbus: shift the ACPI slave address into the form iicbus(4) stores
Needs ReviewPublic

Authored by yarshure_gmail.com on Sun, Sep 27, 1:37 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Sep 28, 12:16 PM
Unknown Object (File)
Mon, Sep 28, 6:01 AM
Unknown Object (File)
Mon, Sep 28, 3:59 AM
Unknown Object (File)
Mon, Sep 28, 3:49 AM
Unknown Object (File)
Mon, Sep 28, 3:48 AM
Unknown Object (File)
Sun, Sep 27, 11:35 PM
Unknown Object (File)
Sun, Sep 27, 11:17 PM
Subscribers
None
This revision needs review, but there are no reviewers specified.

Details

Reviewers
None
Summary

An I2cSerialBus resource carries the 7-bit slave address, but iicbus(4)
stores and passes around the 8-bit form -- ofw_iicbus(4) shifts a device-tree
"reg" value for the same reason, and the AML address space handler in this
file already shifts before issuing a transfer. Without the shift every
device enumerated from ACPI is addressed at half its address, and a driver
that probes by reading a register sees no ack.

Depends on D60061

Test Plan

arm64 GENERIC, and a variant with iicbus as a module.

On a SolidRun CEX7 (NXP LX2160A) under UEFI/ACPI, the two i2c devices this
board's firmware describes now carry the address their _CRS gives, shifted
into the form iicbus(4) stores:

unknown _HID=PRP0001 ... at addr=0x30 handle=\_SB_.I2C0.MUX0.CH01.FAN1
unknown _HID=PRP0001 ... at addr=0x94 handle=\_SB_.I2C0.MUX0.CH03.THE1

whose I2cSerialBusV2 resources give 0x18 and 0x4A. Before, each was
enumerated at half its address.

Both still show as "unknown" -- the tree has no driver for ti,amc6821 or
nxp,sa56004 -- so what this changes is the address they are reachable at, not
whether they attach.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped