Hi Oswalag,
I resolved the problem by using the kernel 5.15.
As I understand it, the reason is that the first blocks on my spi nor flash chip have a size of 32KB, while if using the erasing command on the old 5.4 kernel, it only supports erasing blocks of size 256KB.
Thanks,