Device Tree Configuration

A DTS/DTSI file is used to store all the device tree configuration.

The device tree of HDMI is stored in the following path:
linux-5.10/arch/riscv/boot/dts/starfive/
The following code block shows the DTS file structure for HDMI.
linux-5.15.0
└-- arch
└-- | -- riscv
| -- | -- | -- boot
| -- | -- | -- | -- dts
| -- | -- | -- | -- | -- starfive
| -- | -- | -- | -- | -- | -- jh7110-common.dtsi
| -- | -- | -- | -- | -- | -- jh7110.dtsi
The following is an example of the HDMI configuration in the file jh7110.dts.
hdmi: hdmi@29590000 {
		compatible = "starfive,jh7100-hdmi","inno,hdmi";
			reg = <0x0 0x29590000 0x0 0x4000>;
			interrupts = <99>;
			status = "disabled";
			clocks = <&clkvout JH7110_U0_HDMI_TX_CLK_SYS>,
				<&clkvout JH7110_U0_HDMI_TX_CLK_MCLK>,
				<&clkvout JH7110_U0_HDMI_TX_CLK_BCLK>,
				<&hdmitx0_pixelclk>;
			clock-names = "sysclk", "mclk","bclk","pclk";
			resets = <&rstgen RSTN_U0_HDMI_TX_HDMI>;
			reset-names = "hdmi_tx";
		};
The following list provides explanations for the parameters included in the above code block.
  • compatible: Compatibility information, used to associate the driver and its target device.
  • reg: Register base address "0x29590000" and range "0x4000".
  • interrupts: Hardware interrupt ID.
  • status: The work status of the HDMI module. To enable the module, set this bit as "okay" or to disable the module, set this bit as "disabled".
  • clocks: The clocks used by the HDMI module.
  • clock-names: The names of the above clocks.
  • resets: The reset signals used by the HDMI module.
  • reset-names: The names of the above reset signals.
The following is an example of the HDMI configuration in the file jh7110-common.dtsi.
&hdmi {
	status = "okay";
	pinctrl-names = "default";
	pinctrl-0 = <&inno_hdmi_pins>;

	hdmi_in: port {
		#address-cells = <1>;
		#size-cells = <0>;
		hdmi_in_lcdc: endpoint@0 {
			reg = <0>;
			remote-endpoint = <&dc_out_dpi1>;
		};
	};
};

In the above code block, the parameters of pinctrl-names and pinctrl-0 are used to configure the HDMI IOMUX pin configuration settings.