Let $T>0$ be fixed and let $f$ be a real valued function such that $$\|f\|_{\infty}\le T,$$ where $\|\cdot\|_{\infty}$ denotes the sup-norm.
My question is the following: if $$\int_0^T f(x) dx \le \int_0^T |f(x)|^2 dx,$$
is that true $$\int_0^T f(x) dx \le \int_0^T |f(x)|^2 dx\iff 1\le \int_0^T |f(x)| dx \, ?$$
On the spot I would say that it is not true. Could someone please help me to understand under which assumptions on $f$ and/or $T$ does the previous equivalence hold true?
Thank you in advance!
$\bf{EDIT:}$ Also partial answer will be accepted (in particular, I am mostly interested in the condition "$\implies$"). Thank you.