Board Level Configuration
The board.dts file is used to store the configuration profiles at the board level.
For the VisionFive
2 SBC, the
board.dts file is in the following path:
linux/arch/riscv/boot/dts/starfive/jh7110-visionfive-v2.dtsTake UART0 module as an example, its board.dts file is in the
following path:
linux/arch/riscv/boot/dts/starfive/jh7110-visionfive-v2.dtsIn the file, you can find the following configuration information for UART pin control
configuration:
&gpio {
uart0_pins: uart0-pins {
uart0-pins-tx {
sf,pins = <PAD_GPIO5>;
sf,pin-ioconfig = <IO(GPIO_IE(1) | GPIO_DS(3))>;
sf,pin-gpio-dout = <GPO_UART0_SOUT>;
sf,pin-gpio-doen = <OEN_LOW>;
};
uart0-pins-rx {
sf,pins = <PAD_GPIO6>;
sf,pinmux = <PAD_GPIO6_FUNC_SEL 0>;
sf,pin-ioconfig = <IO(GPIO_IE(1) | GPIO_PU(1))>;
sf,pin-gpio-doen = <OEN_HIGH>;
sf,pin-gpio-din = <GPI_UART0_SIN>;
};
};
};
And you can also find the following configuration information for pin control.
&uart0 {
pinctrl-names = "default";
pinctrl-0 = <&uart0_pins>;
status = "okay";
};
