1 of 5

A cheap concave solution on $\mathbb{R}^2$ is $$f_0(x,y):=3 \min\Big(\frac{x+1}{3} ,y\Big)-1\, ,$$
which also verifies $f_0(x,y)=y$ for all $(x,y)$ in the rectangle $$[-1/4, 5/4]\times [-1/4,1/4]=\big([0,1]\times\{0 \}\big)\;{\bf +}\; [-1/4,1/4]^2 \, , $$ and $f_0(x,y)=x$ in the rectangle $$[-1/4, 5/4]\times [3/4,5/4]=\big([0,1]\times\{1 \}\big)\big)\;{\bf +}\; [-1/4,1/4]^2 \, .$$ This implies that if $\phi$ is a symmetric $C^\infty$ convolution kernel with support in $[-1/4,1/4]^2$, the function $f:=f_0*\phi$ is a $C^\infty$ concave function on $\mathbb{R}^2$ and $f(x,0)=0$ and $f(x,1)=x$.

(We can take e.g. $\phi(x,y):=\psi(x)\psi(y)$ with $\psi\in C^\infty(\mathbb{R})$, $\psi\ge0$, $\operatorname{supp}(\psi)\subset[-1/4,1/4]$, $\int_\mathbb{R}\psi(t)dt=1$)