Wojtekgoo123, I am not a GAAP expert, but as as far as I know;
HTM, once you take the impairment charge and reduce the carrying amount of the security to its new, lower value, you would recognise any difference between that value and the cash flows expected to be collected on the security over its remaining life as interest income.
If your expectation of those future cash flows subsequently increases, you would prospectively update (upwards) the rate at which you accrue that interest income. The effect is such that any increase in expected cash flows to be collected is brought back into income over the life of the security (as interest income). This is very much different to what you would see under IFRS, where you would have an immediate impairment reversal in income and an increase in the carrying amount of the asset!
AFS: any fair value increases will indeed go to OCI, so once again, no reversal of the impairment charge in income.