i2c-muxes.rst 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. .. SPDX-License-Identifier: GPL-2.0
  2. ==============
  3. ACPI I2C Muxes
  4. ==============
  5. Describing an I2C device hierarchy that includes I2C muxes requires an ACPI
  6. Device () scope per mux channel.
  7. Consider this topology::
  8. +------+ +------+
  9. | SMB1 |-->| MUX0 |--CH00--> i2c client A (0x50)
  10. | | | 0x70 |--CH01--> i2c client B (0x50)
  11. +------+ +------+
  12. which corresponds to the following ASL::
  13. Device (SMB1)
  14. {
  15. Name (_HID, ...)
  16. Device (MUX0)
  17. {
  18. Name (_HID, ...)
  19. Name (_CRS, ResourceTemplate () {
  20. I2cSerialBus (0x70, ControllerInitiated, I2C_SPEED,
  21. AddressingMode7Bit, "^SMB1", 0x00,
  22. ResourceConsumer,,)
  23. }
  24. Device (CH00)
  25. {
  26. Name (_ADR, 0)
  27. Device (CLIA)
  28. {
  29. Name (_HID, ...)
  30. Name (_CRS, ResourceTemplate () {
  31. I2cSerialBus (0x50, ControllerInitiated, I2C_SPEED,
  32. AddressingMode7Bit, "^CH00", 0x00,
  33. ResourceConsumer,,)
  34. }
  35. }
  36. }
  37. Device (CH01)
  38. {
  39. Name (_ADR, 1)
  40. Device (CLIB)
  41. {
  42. Name (_HID, ...)
  43. Name (_CRS, ResourceTemplate () {
  44. I2cSerialBus (0x50, ControllerInitiated, I2C_SPEED,
  45. AddressingMode7Bit, "^CH01", 0x00,
  46. ResourceConsumer,,)
  47. }
  48. }
  49. }
  50. }
  51. }