class GMBusCommand
Defined at line 158 of file ../../src/graphics/display/drivers/intel-display/registers-gmbus.h
GMBUS1
(Graphic Management Bus Configuration Register 1 -- Command / Status)
This register lets the software (driver) indicate to the GMBUS controller
the target device address, register index and indicate when the data write
is complete.
All reserved bits in this register are MBZ (must be zero). So, the register
can be safely updated without reading it first.
Tiger Lake: IHD-OS-TGL-Vol 2c-1.22-Rev 2.0 Part 1, Page 1022
Kaby Lake: IHD-OS-KBL-Vol 2c-1.17 Part 1, Page 730
Skylake: IHD-OS-SKL-Vol 2c-05.16 Part 1, Page 724
Public Members
field_software_clear_interrupt_173
field_software_ready_187
field_enable_timeout_194
field_stop_generated_202
field_index_transaction_used_217
field_wait_state_enabled_227
field_total_byte_count_239
field_target_index_246
field_target_address_258
field_is_read_transaction_265
Public Methods
template <, >
SelfType & set_software_clear_interrupt (typename SelfType::ValueType val)
This bit is used to clear error flags and resets the controller status.
For normal bus operation, this bit must be set to 0.
To perform a GMBUS reset,
- Software transitions this bit 0->1 to start the hardware reset sequence.
The GMBUS configuration registers become write-protected.
- Hardware sets the `is_ready` bit in the `GMBusControllerStatus` (GMBUS2)
register to 1 when the reset is complete.
- Software transitions this bit 1->0 to remove the write protection from
the GMBUS configuration registers.
- Hardware sets the `is_ready` bit back to 0 and restores normal operation.
GMBUS can be used.
Defined at line 173 of file ../../src/graphics/display/drivers/intel-display/registers-gmbus.h
template <, >
typename SelfType::ValueType software_clear_interrupt ()
This bit is used to clear error flags and resets the controller status.
For normal bus operation, this bit must be set to 0.
To perform a GMBUS reset,
- Software transitions this bit 0->1 to start the hardware reset sequence.
The GMBUS configuration registers become write-protected.
- Hardware sets the `is_ready` bit in the `GMBusControllerStatus` (GMBUS2)
register to 1 when the reset is complete.
- Software transitions this bit 1->0 to remove the write protection from
the GMBUS configuration registers.
- Hardware sets the `is_ready` bit back to 0 and restores normal operation.
GMBUS can be used.
Defined at line 173 of file ../../src/graphics/display/drivers/intel-display/registers-gmbus.h
template <, >
SelfType & set_software_ready (typename SelfType::ValueType val)
Trigger the start of a GMBUS transfer cycle when set to 1.
When `is_ready` in `GMBusControllerStatus` is true and `software_ready`
is 0, the driver can request the GMBUS controller to start handshaking
and data transfer by setting `software_ready` to 1.
Then the `controller_is_ready` bit in `GMBusControllerStatus` (GMBUS2) register will be
de-asserted until GMBUS finishes reading / writing the data register (GMBUS3) or an active
GMBUS cycle is terminated. That will also set `software_ready` bit to 0.
For each transfer, the driver only needs to set `software_ready` bit to 1
once and should not set it again once it's de-asserted.
Defined at line 187 of file ../../src/graphics/display/drivers/intel-display/registers-gmbus.h
template <, >
typename SelfType::ValueType software_ready ()
Trigger the start of a GMBUS transfer cycle when set to 1.
When `is_ready` in `GMBusControllerStatus` is true and `software_ready`
is 0, the driver can request the GMBUS controller to start handshaking
and data transfer by setting `software_ready` to 1.
Then the `controller_is_ready` bit in `GMBusControllerStatus` (GMBUS2) register will be
de-asserted until GMBUS finishes reading / writing the data register (GMBUS3) or an active
GMBUS cycle is terminated. That will also set `software_ready` bit to 0.
For each transfer, the driver only needs to set `software_ready` bit to 1
once and should not set it again once it's de-asserted.
Defined at line 187 of file ../../src/graphics/display/drivers/intel-display/registers-gmbus.h
template <, >
typename SelfType::ValueType enable_timeout ()
If true, target stall status bit in `GMBusControllerStatus` will be updated
and interrupts will be generated when corresponding mask bit is enabled,
when the target device stalls the acknowledgement bit longer than the time
limit specified (in VESA DDC/CI standard, the required time limit is 2
milliseconds).
Defined at line 194 of file ../../src/graphics/display/drivers/intel-display/registers-gmbus.h
template <, >
SelfType & set_enable_timeout (typename SelfType::ValueType val)
If true, target stall status bit in `GMBusControllerStatus` will be updated
and interrupts will be generated when corresponding mask bit is enabled,
when the target device stalls the acknowledgement bit longer than the time
limit specified (in VESA DDC/CI standard, the required time limit is 2
milliseconds).
Defined at line 194 of file ../../src/graphics/display/drivers/intel-display/registers-gmbus.h
template <, >
SelfType & set_stop_generated (typename SelfType::ValueType val)
If true, an I2C STOP signal will be transmitted at the current GMBUS cycle
to terminate the transaction.
Setting this to false while setting `wait_state_enabled` to true allows the
driver to continue data read / write by letting controller issue a RESTART
signal to start a new data cycle after the current GMBUS cycle completes.
Defined at line 202 of file ../../src/graphics/display/drivers/intel-display/registers-gmbus.h
template <, >
typename SelfType::ValueType stop_generated ()
If true, an I2C STOP signal will be transmitted at the current GMBUS cycle
to terminate the transaction.
Setting this to false while setting `wait_state_enabled` to true allows the
driver to continue data read / write by letting controller issue a RESTART
signal to start a new data cycle after the current GMBUS cycle completes.
Defined at line 202 of file ../../src/graphics/display/drivers/intel-display/registers-gmbus.h
template <, >
typename SelfType::ValueType index_transaction_used ()
If true, the GMBUS cycle contains a special index write transaction.
When this field is true, the GMBUS controller uses the I2C combined format
to perform a 1-byte or 2-byte index write transaction, immediately followed
(via RESTART) by a second transaction in the direction indicated by
`is_read_transaction`. In other words, the main transaction is preceded
by a short (1-byte / 2-byte) write transaction.
This operation matches the VESA E-DDC (Enhanced Display Data Channel)
specification for reading EDID / DisplayID contents, where the E-DDC
"start address" / "word offset" (0 or 128) is a 1-byte index.
If this field is true, `wait_state_enabled` must also be true.
Defined at line 217 of file ../../src/graphics/display/drivers/intel-display/registers-gmbus.h
template <, >
SelfType & set_index_transaction_used (typename SelfType::ValueType val)
If true, the GMBUS cycle contains a special index write transaction.
When this field is true, the GMBUS controller uses the I2C combined format
to perform a 1-byte or 2-byte index write transaction, immediately followed
(via RESTART) by a second transaction in the direction indicated by
`is_read_transaction`. In other words, the main transaction is preceded
by a short (1-byte / 2-byte) write transaction.
This operation matches the VESA E-DDC (Enhanced Display Data Channel)
specification for reading EDID / DisplayID contents, where the E-DDC
"start address" / "word offset" (0 or 128) is a 1-byte index.
If this field is true, `wait_state_enabled` must also be true.
Defined at line 217 of file ../../src/graphics/display/drivers/intel-display/registers-gmbus.h
template <, >
SelfType & set_wait_state_enabled (typename SelfType::ValueType val)
If true, the GMBUS controller may enter the wait state after the cycle.
If this field is true and `stop_generated` is false, the GMBUS controller
will enter the wait state after completing the GMBUS cycle, waiting for
the driver to read / write the GMBusData register with new data bytes.
During this state, the GMBUS controller pulls the I2C clock line low to
hold incoming transactions from target devices.
Defined at line 227 of file ../../src/graphics/display/drivers/intel-display/registers-gmbus.h
template <, >
typename SelfType::ValueType wait_state_enabled ()
If true, the GMBUS controller may enter the wait state after the cycle.
If this field is true and `stop_generated` is false, the GMBUS controller
will enter the wait state after completing the GMBUS cycle, waiting for
the driver to read / write the GMBusData register with new data bytes.
During this state, the GMBUS controller pulls the I2C clock line low to
hold incoming transactions from target devices.
Defined at line 227 of file ../../src/graphics/display/drivers/intel-display/registers-gmbus.h
template <, >
SelfType & set_total_byte_count (typename SelfType::ValueType val)
Total number of bytes to be transferred (read / written) during the DATA
phase of the GMBUS cycle.
The GMBUS controller is expected to read / write `total_byte_count` from
the bus, but this may be prematurely terminated by the driver (by
triggering a STOP cycle) if needed (for example, if the display engine
receives a NACK from the display device).
This field must not be changed once a cycle transaction has started.
The value of this field must not be zero.
Defined at line 239 of file ../../src/graphics/display/drivers/intel-display/registers-gmbus.h
template <, >
typename SelfType::ValueType total_byte_count ()
Total number of bytes to be transferred (read / written) during the DATA
phase of the GMBUS cycle.
The GMBUS controller is expected to read / write `total_byte_count` from
the bus, but this may be prematurely terminated by the driver (by
triggering a STOP cycle) if needed (for example, if the display engine
receives a NACK from the display device).
This field must not be changed once a cycle transaction has started.
The value of this field must not be zero.
Defined at line 239 of file ../../src/graphics/display/drivers/intel-display/registers-gmbus.h
template <, >
SelfType & set_target_index (typename SelfType::ValueType val)
When `index_transaction_used` is set, the index byte in this field will be
written to the `target_address` before the DATA read / write phase.
This field is in effect only when `index_transaction_used` is set, and
`two_byte_index_enable` in GMBusTwoByteIndex (GMBUS5) is disabled.
Defined at line 246 of file ../../src/graphics/display/drivers/intel-display/registers-gmbus.h
template <, >
typename SelfType::ValueType target_index ()
When `index_transaction_used` is set, the index byte in this field will be
written to the `target_address` before the DATA read / write phase.
This field is in effect only when `index_transaction_used` is set, and
`two_byte_index_enable` in GMBusTwoByteIndex (GMBUS5) is disabled.
Defined at line 246 of file ../../src/graphics/display/drivers/intel-display/registers-gmbus.h
template <, >
SelfType & set_target_address (typename SelfType::ValueType val)
7-bit GMBUS target address (SADDR). This is the target address used in I2C
protocol when GMBUS generates bus cycles.
On some documents (including VESA E-DDC and DDC/CI, and Intel Programmer's
Reference Manuals), an 8-bit address is used including this field and the
`is_read_transaction` bit.
Some of the `target_address` / `is_read_transaction` combinations are
reserved by I2C and recognized by GMBUS controller for special purposes,
though the VESA DDC/CI protocol doesn't use or prohibits them.
Defined at line 258 of file ../../src/graphics/display/drivers/intel-display/registers-gmbus.h
template <, >
typename SelfType::ValueType target_address ()
7-bit GMBUS target address (SADDR). This is the target address used in I2C
protocol when GMBUS generates bus cycles.
On some documents (including VESA E-DDC and DDC/CI, and Intel Programmer's
Reference Manuals), an 8-bit address is used including this field and the
`is_read_transaction` bit.
Some of the `target_address` / `is_read_transaction` combinations are
reserved by I2C and recognized by GMBUS controller for special purposes,
though the VESA DDC/CI protocol doesn't use or prohibits them.
Defined at line 258 of file ../../src/graphics/display/drivers/intel-display/registers-gmbus.h
template <, >
typename SelfType::ValueType is_read_transaction ()
True if the new GMBUS cycle to generate will read data from target device;
otherwise the new cycle will write data to target device.
On some documents, this bit together with `target_address` are combined as
an 8-bit address for target addressing.
Defined at line 265 of file ../../src/graphics/display/drivers/intel-display/registers-gmbus.h
template <, >
SelfType & set_is_read_transaction (typename SelfType::ValueType val)
True if the new GMBUS cycle to generate will read data from target device;
otherwise the new cycle will write data to target device.
On some documents, this bit together with `target_address` are combined as
an 8-bit address for target addressing.
Defined at line 265 of file ../../src/graphics/display/drivers/intel-display/registers-gmbus.h
hwreg::RegisterAddr<GMBusCommand> Get ()
Defined at line 267 of file ../../src/graphics/display/drivers/intel-display/registers-gmbus.h