Grid cell,tm & sp

Hello here, it s been awhile hope you all alright.

These times i have read around grid Cell and how it works in HTM
but still have some questions that i would like to clear . thus In case grid cell can be seen as a model encoder,

1- Is it possible to replace SP or TM by Grid Cell?
2- If Yes then how can it be train? in order words how to train grid cell?

Hope someone can highlight my thoughts.

Thanks.