Hi @XD,
devmem2 is not supported for the registers that has a write protection. If you want to access those registers from user space, you can do the following:
Invoke the kernel menuconfig
If are working with a Yocto build the command is:
$bitbake virtual/kernel -c menuconfig
If you work with the manual build from your linux repository the command is:
$make menuconfig
then go in --> Device Drivers --> SOC (System On Chip) specific Drivers -->NXP Userspace Reg Access Driver
and select:
<*>Userspace accessto soc registers
as below:



Rebuild the kernel
If you are using yocto deploy the image.
The you can either reflash the full image or just replace "Image" in the "boot_s32g3" partition of your SD card / eMMC.
With this new image at your userspace you can write on the register as following:
root@s32g399ardb3:~# echo 0x4009C24C 32 0x00123000 > /sys/kernel/s32cc_regaccess/write
this is as
echo [register_address] {access_width} [register_data] > /sys/kernel/s32cc_regaccess/write
for read register you can also use this without the register_data writting an echo to /sys/kernel/s32cc_regaccess/read