| 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ |
| 2 | /* |
| 3 | * Channel numbers used by the microchip-tcb-capture driver |
| 4 | * Copyright (C) 2025 Bence Csókás |
| 5 | */ |
| 6 | #ifndef _COUNTER_MCHP_TCB_H_ |
| 7 | #define _COUNTER_MCHP_TCB_H_ |
| 8 | |
| 9 | /* |
| 10 | * The driver defines the following components: |
| 11 | * |
| 12 | * Count 0 |
| 13 | * \__ Synapse 0 -- Signal 0 (Channel A, i.e. TIOA) |
| 14 | * \__ Synapse 1 -- Signal 1 (Channel B, i.e. TIOB) |
| 15 | * \__ Extension capture0 (RA register) |
| 16 | * \__ Extension capture1 (RB register) |
| 17 | * |
| 18 | * It also supports the following events: |
| 19 | * |
| 20 | * Channel 0: |
| 21 | * - CV register changed |
| 22 | * - CV overflowed |
| 23 | * - RA captured |
| 24 | * Channel 1: |
| 25 | * - RB captured |
| 26 | * Channel 2: |
| 27 | * - RC compare triggered |
| 28 | */ |
| 29 | |
| 30 | /* Capture extensions */ |
| 31 | #define COUNTER_MCHP_EXCAP_RA 0 |
| 32 | #define COUNTER_MCHP_EXCAP_RB 1 |
| 33 | |
| 34 | /* Event channels */ |
| 35 | #define COUNTER_MCHP_EVCHN_CV 0 |
| 36 | #define COUNTER_MCHP_EVCHN_RA 0 |
| 37 | #define COUNTER_MCHP_EVCHN_RB 1 |
| 38 | #define COUNTER_MCHP_EVCHN_RC 2 |
| 39 | |
| 40 | #endif /* _COUNTER_MCHP_TCB_H_ */ |