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.

i2c-gpio device-tree help

Featured Replies

Hello,

im trying to map the i2c-2 to some GPIO ports and have to rewrite the device-tree on armbian 22.04.
I'm failing miserably and have no idea how-to do it. I managed to compile the i2c-gpio.ko kernel module as it is not part of the armbian 5.15.89-sunxi kernel.

However, here i'm stuck and cant manage to make it happen.

 

On RPi it was simple adding an overlay to config.txt:

    dtoverlay=i2c-gpio,bus=2,i2c_gpio_sda=27,i2c_gpio_scl=17
    /boot/overlays/i2c-gpio.dtbo  


I'm trying to replicate that for Armbian, here is my dts file:

 

	// Overlay for i2c_gpio bitbanging host bus.
    /dts-v1/;
    /plugin/;
    / {
        compatible = "allwinner,sun8i-h3";
        fragment@0 {
            target-path = "/";
            __overlay__ {
                i2c_gpio: i2c@2 {
                    reg = <0>;
                    compatible = "i2c-gpio";
                    gpios = <&pio 17 0     /* sda */
                         &pio 27 0    /* scl */
                    >;    
                    i2c-gpio,delay-us = <2>;
                    #address-cells = <1>;
                    #size-cells = <0>;
                };
            };
        };
        fragment@1 {
            target-path = "/aliases";
            __overlay__ {
                i2c_gpio = "/i2c@2";
            };
        };
        fragment@2 {
            target-path = "/__symbols__";
            __overlay__ {
                i2c_gpio = "/i2c@2";
            };
        };
        __overrides__ {
            i2c_gpio_sda = <&i2c_gpio>,"gpios:4";
            i2c_gpio_scl = <&i2c_gpio>,"gpios:16";
            i2c_gpio_delay_us = <&i2c_gpio>,"i2c-gpio,delay-us:0";
            bus = <&i2c_gpio>, "reg:0";
        };
    };

 

What am I doing wrong?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

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.