Device Tree Configuration
A DTS/DTSI file is used to store all the device tree configuration.
MIPI DSI
In the file
jh7110.dtsi
, you can find the device tree configuration
of MIPI DSI as the following code
block:linux/arch/riscv/boot/dts/starfive/jh7110.dtsi: mipi_dsi: mipi@295d0000 { compatible = "starfive,jh7110-mipi_dsi","cdns,dsi"; reg = <0x0 0x295d0000 0x0 0x10000>; interrupts = <98>; reg-names = "dsi"; clocks = <&clkvout JH7110_U0_CDNS_DSITX_CLK_SYS>, <&clkvout JH7110_U0_CDNS_DSITX_CLK_APB>, <&clkvout JH7110_U0_CDNS_DSITX_CLK_TXESC>, <&clkvout JH7110_U0_CDNS_DSITX_CLK_DPI>; clock-names = "sys", "apb", "txesc", "dpi"; resets = <&rstgen RSTN_U0_CDNS_DSITX_DPI>, <&rstgen RSTN_U0_CDNS_DSITX_APB>, <&rstgen RSTN_U0_CDNS_DSITX_RXESC>, <&rstgen RSTN_U0_CDNS_DSITX_SYS>, <&rstgen RSTN_U0_CDNS_DSITX_TXBYTEHS>, <&rstgen RSTN_U0_CDNS_DSITX_TXESC>; reset-names = "dsi_dpi", "dsi_apb", "dsi_rxesc", "dsi_sys", "dsi_txbytehs", "dsi_txesc"; phys = <&mipi_dphy>; phy-names = "dphy"; status = "disabled"; mipi_panel: panel@0 { /*compatible = "";*/ status = "okay"; }; };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 "0x295d0000" and range "0x10000".
- interrupts: Hardware interrupt ID.
- reg-name: The name of the register.
- clocks: The clocks used by the eDP module.
- clock-names: The names of the above clocks.
- resets: The reset signals used by the eDP module.
- reset-names: The names of the above reset signals.
- status: The work status of the eDP module. To enable the module, set this bit as "okay" or to disable the module, set this bit as "disabled".
MIPI DPHY
In the file
jh7110.dts
, you can find the device tree configuration
of MIPI DPHY as the following code
block:linux/arch/riscv/boot/dts/starfive/jh7110.dts: mipi_dphy: mipi-dphy@295e0000{ compatible = "starfive,jh7110-mipi-dphy-tx","m31,mipi-dphy-tx"; reg = <0x0 0x295e0000 0x0 0x10000>; clocks = <&clkvout JH7110_U0_MIPITX_DPHY_CLK_TXESC>; clock-names = "dphy_txesc"; resets = <&rstgen RSTN_U0_MIPITX_DPHY_SYS>, <&rstgen RSTN_U0_MIPITX_DPHY_TXBYTEHS>; reset-names = "dphy_sys", "dphy_txbytehs"; #phy-cells = <0>; status = "disabled"; };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 "0x295e0000" and range "0x10000".
- clocks: The clocks used by the eDP module.
- clock-names: The names of the above clocks.
- resets: The reset signals used by the eDP module.
- reset-names: The names of the above reset signals.
- status: The work status of the eDP module. To enable the module, set this bit as "okay" or to disable the module, set this bit as "disabled".
I2C2
In the file
jh7110-devkits.dts
, to configure
lt8911exb
, the lt8911exb
dts port should be added into i2c2
. You can find
the device tree configuration of i2c2
as the
following code
block:linux/arch/riscv/boot/dts/starfive/jh7110-devkits.dts: &i2c2 { clock-frequency = <100000>; i2c-sda-hold-time-ns = <300>; i2c-sda-falling-time-ns = <510>; i2c-scl-falling-time-ns = <510>; auto_calc_scl_lhcnt; pinctrl-names = "default"; pinctrl-0 = <&i2c2_pins>; status = "okay"; lt8911exb_i2c@29 { compatible = "lontium,lt8911exb"; reg = <0x29>; reset-gpio = <&gpio 41 1>; pwm-gpio = <&gpio 33 1>; bl-gpio = <&ext_gpio 6 GPIO_ACTIVE_LOW>; port { lt8911exb_in: endpoint { remote-endpoint = <&dsi0_output>; }; }; }; };
In the above code block, the parameters of pinctrl-names and
pinctrl-0 are used to configure the i2c2
pin configuration settings.
&MIPI DST
In the file
jh7110-devkits.dts
, configure remote-end point for
connecting DSI and panel. You can find the device tree configuration
of &MIPI DST as the following code
block:linux/arch/riscv/boot/dts/starfive/jh7110-devkits.dts: &mipi_dsi { status = "okay"; ports { #address-cells = <1>; #size-cells = <0>; port@0 { reg = <0>; #address-cells = <1>; #size-cells = <0>; dsi0_output: endpoint@0 { reg = <0>; remote-endpoint = <<8911exb_in>; }; dsi1_output: endpoint@1 { reg = <1>; remote-endpoint = <&panel_dsi_port>; }; dsi2_output: endpoint@2 { reg = <2>; remote-endpoint = <&radxa_in>; }; }; port@1{ reg = <1>; dsi_in_port: endpoint { remote-endpoint = <&mipi_out>; }; }; }; };