Power & Source of Big Ideas

Change i2c speed on neo-core from 100KHz to 400KHz

Moderators: chensy, FATechsupport

I am using the i2c bus quite extensively and have found that it is running at 100KHz.
I have decompiled the sun8i-h3-nanopi-neo-core.dtb and confirmed that it is set to 100KHz.
The .dts file was modified with a 'clock-frequency' value of <0x61a80> (400000 decimal) and recompiled.
After reboot, the logic analyser is showing that it is still only running at 100KHz. :(

This is the modified section of the dts.
The original value for 'clock-frequency' was <186a0>

Code: Select all

                i2c@01f02400 {
                        compatible = "allwinner,sun6i-a31-i2c";
                        reg = <0x1f02400 0x400>;
                        interrupts = <0x0 0x2c 0x4>;
                        pinctrl-names = "default";
                        pinctrl-0 = <0x32>;
                        clocks = <0x30 0x9>;
                        clock-frequency = <0x61a80>;
                        resets = <0x30 0x5>;
                        status = "disabled";
                        #address-cells = <0x1>;
                        #size-cells = <0x0>;
                        linux,phandle = <0x77>;
                        phandle = <0x77>;
         
};

It would appear that the value in the dtb is being ignored.
Has anyone out there been able to change the speed successfully on one of these boards?
Any help will be most gratefully received.

Gerry
Nano pi Neo

i2c@1c2ac00 {
compatible = "allwinner,sun6i-a31-i2c";
reg = <0x1c2ac00 0x400>;
interrupts = <0x0 0x6 0x4>;
clocks = <0x3 0x3b>;
resets = <0x3 0x2e>;
pinctrl-names = "default";
pinctrl-0 = <0x17>;
status = "okay";
#address-cells = <0x1>;
#size-cells = <0x0>;
clock-frequency = <1700000>;
}; // 1.7 Mhz для MCP23017


Here is more .. https://github.com/AlekseyMamontov/NanoPI-NEO-I2C-
status = "disabled";

status = "okay"

i2c@1c2ac00 {
compatible = "allwinner,sun6i-a31-i2c";
reg = <0x1c2ac00 0x400>;
interrupts = <0x0 0x6 0x4>;
clocks = <0x3 0x3b>;
resets = <0x3 0x2e>;
pinctrl-names = "default";
pinctrl-0 = <0x17>;
status = "okay";
#address-cells = <0x1>;
#size-cells = <0x0>;
clock-frequency = <1700000>;
}; // 1.7 Mhz для MCP23017

Who is online

In total there are 33 users online :: 0 registered, 0 hidden and 33 guests (based on users active over the past 5 minutes)
Most users ever online was 5185 on Wed Jan 22, 2020 1:44 pm

Users browsing this forum: No registered users and 33 guests