Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Setting i2c speed - dtc error

Featured Replies

4.14.65-sunxi on an Orange Pi Zero. Trying to set the i2c bus speed to 400kHz using the following dts:

 

/dts-v1/;
/plugin/;

/ {
        compatible = "allwinner,sun8i-h3";

        fragment@0 {
                target = <&i2c0>;
                __overlay__ {
                        clock-frequency = <400000>;
                };
        };
};

Which produces:

 

Error: dtc does not support compiling overlays
Please try to install matching kernel headers

Installed linux-headers-next-sunxi and still getting the same thing. Device tree compiler version: DTC 1.4.2.

 

What am I doing wrong?

Spoiler

 

 

  • Author

Thanks ag123 - the link to the other post did the trick. Didn't need to try the other dtc compiler.

 

In case someone else is doing the same thing:

 

Decompile the dtb in /boot/dtb. In the case of the Orange Pi Zero, it's sun8i-h2-plus-orangepi-zero.dtb:

dtc -I dtb -O dts sun8i-h2-plus-orangepi-zero.dtb -o sun8i-h2-plus-orangepi-zero.dts

The original dtb had no clock frequency entries for any of the i2c buses: i2c0 (i2c@01c2ac00), i2c1 (i2c@01c2b000) and i2c2 (i2c@01c2b400). Add a line to the i2c@01c2b000 (i2c) section (or whichever bus you're wishing to change):

 clock-frequency = <0x61A80>; 

Recompile the dts:

dtc -I dts -O dtb sun8i-h2-plus-orangepi-zero.dts -o sun8i-h2-plus-orangepi-zero.dtb

Reboot.

 

Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.