I have made some measurements with a scope and find the followings: The input voltage (output of the max 16820) measured at the pin 8 of the mcu becomes noisy at 7 volts.

Attiny input at 5V input voltage

pwm signal at 5V input

Attiny input az 7V input voltage

pwm signal at 7V input