| 1 | package register |
| 2 | |
| 3 | import "review.coreboot.org/coreboot.git/util/intelp2m/platforms/common/register/bits" |
| 4 | |
| 5 | type DW1 struct { |
| 6 | Register |
| 7 | } |
| 8 | |
| 9 | // GetPadTol() |
| 10 | func (dw1 *DW1) GetPadTol() uint32 { |
| 11 | return dw1.GetFieldVal(bits.DW1, bits.DW1PadTol) |
| 12 | } |
| 13 | |
| 14 | // GetIOStandbyState() returns IO Standby State (IOSSTATE) |
| 15 | // 0 = Tx enabled driving last value driven, Rx enabled |
| 16 | // 1 = Tx enabled driving 0, Rx disabled and Rx driving 0 back to its controller internally |
| 17 | // 2 = Tx enabled driving 0, Rx disabled and Rx driving 1 back to its controller internally |
| 18 | // 3 = Tx enabled driving 1, Rx disabled and Rx driving 0 back to its controller internally |
| 19 | // 4 = Tx enabled driving 1, Rx disabled and Rx driving 1 back to its controller internally |
| 20 | // 5 = Tx enabled driving 0, Rx enabled |
| 21 | // 6 = Tx enabled driving 1, Rx enabled |
| 22 | // 7 = Hi-Z, Rx driving 0 back to its controller internally |
| 23 | // 8 = Hi-Z, Rx driving 1 back to its controller internally |
| 24 | // 9 = Tx disabled, Rx enabled |
| 25 | // 15 = IO-Standby is ignored for this pin (same as functional mode) |
| 26 | // Others reserved |
| 27 | func (dw1 *DW1) GetIOStandbyState() uint32 { |
| 28 | return dw1.GetFieldVal(bits.DW1, bits.DW1IOStandbyState) |
| 29 | } |
| 30 | |
| 31 | // GetIOStandbyTermination() returns IO Standby Termination (IOSTERM) |
| 32 | // 0 = Same as functional mode (no change) |
| 33 | // 1 = Disable Pull-up and Pull-down (no on-die termination) |
| 34 | // 2 = Enable Pull-down |
| 35 | // 3 = Enable Pull-up |
| 36 | func (dw1 *DW1) GetIOStandbyTermination() uint32 { |
| 37 | return dw1.GetFieldVal(bits.DW1, bits.DW1IOStandbyTermination) |
| 38 | } |
| 39 | |
| 40 | // GetTermination() returns the pad termination state defines the different weak |
| 41 | // pull-up and pull-down settings that are supported by the buffer |
| 42 | // 0000 = none; 0010 = 5k PD; 0100 = 20k PD; 1010 = 5k PU; 1100 = 20k PU; |
| 43 | // 1111 = Native controller selected |
| 44 | func (dw1 *DW1) GetTermination() uint32 { |
| 45 | return dw1.GetFieldVal(bits.DW1, bits.DW1Term) |
| 46 | } |
| 47 | |
| 48 | // GetInterruptSelect() returns Interrupt Line number from the GPIO controller |
| 49 | func (dw1 *DW1) GetInterruptSelect() uint32 { |
| 50 | return dw1.GetFieldVal(bits.DW1, bits.DW1InterruptSelect) |
| 51 | } |