Read CS state SPI interface

You would need su permission for these operations.
Or you could refer to the following thread with using gpiod to control GPIO.
Unable to access GPIO in the latest L4T 35.3.1 - #23 by lhoang