General GPIO
The following code block shows an example of a general GPIO device tree configuration.
&sdio0 { clock-frequency = <102400000>; max-frequency = <200000000>; card-detect-delay = <300>; bus-width = <4>; broken-cd; cap-sd-highspeed; post-power-on-delay-ms = <200>; cd-gpios = <&gpio 23 0>; status = "okay"; };
The input, output and interrupt of a general GPIO are all configured in the DTS configuration file.
In the line
cd-gpios = <&gpio 23 0>
, make sure you understand the
use of the following values: - gpio: The GPIO controller.
- 23: The GPIO index number.
- 0: Active level status. 0: low level active; 1: high level active.