devicetree: implement `DT_INST_NODE_HAS_COMPAT`

Implement `DT_INST_NODE_HAS_COMPAT` to check if a node has a
compatible. This is helpful when a node has more than one
compatible, which can be used to enable additional features
in the driver.

Updated the devicetree test to play with the new API.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2 files changed