Configure CEC

I have Odroid N2, Samsung TV and AVR Denon and I would like to know if there is an option so that when turning on and off the TV does not turn on and off the N2.
My intention (I do not know if this is possible), is to make the N2 only turn on and off when you connect the Denon AVR.