class Control2Reg
Defined at line 474 of file ../../src/devices/power/drivers/fusb302/registers.h
CONTROL2 - Configures automated power role detection.
This register has reserved/undocumented bits. It can only be safely updated
via read/modify/write operations.
The Rev 5 datasheet refers to the entire power role detection feature as
"toggling". That term is a bit misleading, as the process can be configured
to only advertise as a Source or Sink, in which case no DRP toggling is
involved.
After reset, automated power role detection is disabled.
Rev 5 datasheet: Table 23 on page 22
Public Members
field_tog_save_pwr_489
field_tog_rd_only_496
field_wake_en_502
field_mode_505
field_toggle_518
Public Methods
template <, >
SelfType & set_tog_save_pwr (SleepDuration val)
The duration of sleep intervals between power role detection cycles.
This field is only used when `automated_dual_power_role_toggle` is set. It
configures the amount of time spent in a low-power sleep state after one
cycle of the power role detection process completes.
Defined at line 489 of file ../../src/devices/power/drivers/fusb302/registers.h
template <, >
SleepDuration tog_save_pwr ()
The duration of sleep intervals between power role detection cycles.
This field is only used when `automated_dual_power_role_toggle` is set. It
configures the amount of time spent in a low-power sleep state after one
cycle of the power role detection process completes.
Defined at line 489 of file ../../src/devices/power/drivers/fusb302/registers.h
template <, >
SelfType & set_tog_rd_only (typename SelfType::ValueType val)
If true, the power role detection process will ignore Ra termination.
This bit is only used when `toggle` is set. If set,
the hardware will not end the DRP toggling cycle when it detects Ra
termination (used by Audio Accessories) on its CC pins.
Defined at line 496 of file ../../src/devices/power/drivers/fusb302/registers.h
template <, >
typename SelfType::ValueType tog_rd_only ()
If true, the power role detection process will ignore Ra termination.
This bit is only used when `toggle` is set. If set,
the hardware will not end the DRP toggling cycle when it detects Ra
termination (used by Audio Accessories) on its CC pins.
Defined at line 496 of file ../../src/devices/power/drivers/fusb302/registers.h
template <, >
SelfType & set_wake_en (typename SelfType::ValueType val)
If true, Wake Detection is enabled.
Wake Detection only works if the `wake_detection_powered_on` field in the
`PowerReg` register is set to true.
Defined at line 502 of file ../../src/devices/power/drivers/fusb302/registers.h
template <, >
typename SelfType::ValueType wake_en ()
If true, Wake Detection is enabled.
Wake Detection only works if the `wake_detection_powered_on` field in the
`PowerReg` register is set to true.
Defined at line 502 of file ../../src/devices/power/drivers/fusb302/registers.h
template <, >
Fusb302RoleDetectionMode mode ()
The behavior in a cycle of the automated power role detection process.
Defined at line 505 of file ../../src/devices/power/drivers/fusb302/registers.h
template <, >
SelfType & set_mode (Fusb302RoleDetectionMode val)
The behavior in a cycle of the automated power role detection process.
Defined at line 505 of file ../../src/devices/power/drivers/fusb302/registers.h
template <, >
SelfType & set_toggle (typename SelfType::ValueType val)
If true, the hardware performs automated Type C power role detection.
This bit enables the partial hardware implementation of the state machines
in usbpd2.2 4.5 "Configuration Channel (CC)". The driver sets this bit to
true to start the power role detection process. The hardware sets this bit
to false after it detects a Port Partner and establishes its own power
role.
Before setting this bit to true, the driver should configure other
registers as described in the "Toggle Functionality" section on page 7 of
the Rev 5 datasheet.
Defined at line 518 of file ../../src/devices/power/drivers/fusb302/registers.h
template <, >
typename SelfType::ValueType toggle ()
If true, the hardware performs automated Type C power role detection.
This bit enables the partial hardware implementation of the state machines
in usbpd2.2 4.5 "Configuration Channel (CC)". The driver sets this bit to
true to start the power role detection process. The hardware sets this bit
to false after it detects a Port Partner and establishes its own power
role.
Before setting this bit to true, the driver should configure other
registers as described in the "Toggle Functionality" section on page 7 of
the Rev 5 datasheet.
Defined at line 518 of file ../../src/devices/power/drivers/fusb302/registers.h
hwreg::I2cRegisterAddr<Control2Reg> Get ()
Defined at line 520 of file ../../src/devices/power/drivers/fusb302/registers.h
Enumerations
enum SleepDuration
| Name | Value |
|---|---|
| k0ms | 0b00 |
| k40ms | 0b01 |
| k80ms | 0b10 |
| k160ms | 0b11 |
Values for `tog_save_pwr`.
Defined at line 477 of file ../../src/devices/power/drivers/fusb302/registers.h