DTS Configuration

The configuration of DTS includes: I2C mount, body, regulator, rtc, and other parts. The following code block shows an example of the device tree source code of the "&i2c5" and "pmic_axp15060: axp15060_reg@36 ".
&i2c5 {
    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 = <&i2c5_pins>;
status = "okay";

    pmic_axp15060: axp15060_reg@36 {
        compatible = "starfive,axp15060-regulator";
        reg = <0x36>;

        regulators {
            cpu_vdd: DCDC2 {
                regulator-boot-on;
                regulator-always-on;
                regulator-compatible = "cpu_vdd";
                regulator-name = "cpu_vdd";
                regulator-min-microvolt = <500000>;
                regulator-max-microvolt = <1540000>;
            };
            emmc_vdd: BLDO3 {
                regulator-boot-on;
                regulator-always-on;
                regulator-compatible = "emmc_vdd";
                regulator-name = "emmc_vdd";
                regulator-min-microvolt = <1800000>;
                regulator-max-microvolt = <1800000>;
            };
            vcc_3v3: BLDO4 {
                regulator-boot-on;
                regulator-always-on;
                regulator-compatible = "vcc_3v3";
                regulator-name = "vcc_3v3";
                regulator-min-microvolt = <3300000>;
                regulator-max-microvolt = <3300000>;
            };
        };
    };
};
The following list provides explanations for the parameters included in the above code block.
  • clock-frequency: The frequency of the above clock.
  • pinctrl-names: The name of the pinctrl.
  • status: The work status of the i2c.
  • compatible: Compatibility information, used to associate the driver and its target device.
  • reg: Register base address of i2c.
  • regulators: Regulators that needed to be controlled.
  • regulator-boot-on: The regulator that is enabled by the bootloader or firmware.
  • regulator-always-on: Never perform the power-off operation on the regulator.
  • regulator-min-microvolt: The minimum voltage that the user can set.
  • regulator-max-microvolt: The maximum voltage that the user can set.