scripts: ci: add compliance check for device MMIO API usage

Add a DeviceMmioCheck to check_compliance.py that flags driver files
casting DT_REG_ADDR() or DT_INST_REG_ADDR() to a pointer without
using the device MMIO API.

    .base = (SomeType *)DT_INST_REG_ADDR(n),

This stores the raw physical address and dereferences it directly. On
systems with an MMU, the physical address has no page table entry and
the access will fault unless someone else has created an identity
mapping (typically via mmu_regions.c).

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2 files changed