This is a cache of https://discuss.96boards.org/t/how-to-change-the-dragon-board-i2c-clock-speed/658. It is a snapshot of the page at 2024-10-31T03:45:32.363+0000.
How to change the dragon board i2c clock speed - DragonBoard410c - 96Boards Forum

How to change the dragon board i2c clock speed

Hi all
Now i am porting a kma36 sensor to the dragon board linux platform .
My linux kernel version is 4.2.
Because the kma36 sensor i2c up speed is 100khz. The other sensor can work at the 400khz speed.

And the dragon board i2c default speed is 400khz.
How to change the i2c0 speed clock .

            /* BLSP1 QUP2 */
            blsp_i2c0: i2c@78b6000 {
                    compatible = "qcom,i2c-qup-v2.2.1";
                    reg = <0x78b6000 0x1000>;
                    interrupts = <GIC_SPI 96 0>;
                    clocks = <&gcc GCC_BLSP1_AHB_CLK>,
                            <&gcc GCC_BLSP1_QUP2_I2C_APPS_CLK>;
                    clock-names = "iface", "core";
                    qcom,clk-freq-in = <19200000>;
                    qcom,clk-freq-out= <100000>;

qcom,fs-clk-div = <28>;
qcom,high-time-clk-div = <14>;

pinctrl-names = “default”;
pinctrl-0 = <&i2c0_default>;
#address-cells = <1>;
#size-cells = <0>;
status = “disabled”;
};

&blsp_i2c0 {
status = “ok”;
clock-frequency = <100000>;
tsys01: tsys01 {
compatible =“measspec,tsys01”;
reg = <0x77>;
};

    ms8607: ms8607 {
    compatible ="measspec,ms8607";
    reg = &lt;0x76&gt;;
    };

    mshtu21: htu21 {
    compatible ="measspec,htu21";
    reg = &lt;0x40&gt;;
    };
    kma36: kma36 {
    compatible ="measspec,kma36";
    reg = &lt;0x5D&gt;;
    };

};

qcom,clk-freq-in = <19200000>;
qcom,clk-freq-out= <100000>;
qcom,fs-clk-div = <28>;
qcom,high-time-clk-div = <14>
the 4 line code is added by me.
It seems no useful .