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.

How can I use S-TWI PL0/PL1 - i2C (orangepiZeroPlus2? (Do I need a pinctrl config?)

Featured Replies

Hello, I have spend a lot of time trying to make it work I2C PL0/PL1 of orangepi zero plus 2 H5.

 

I change sunxi-h3-h5.dtsi to status="okay" and i can not to see i2c PL0/PL1 only I can see others i2c. Can anybody help me to understand what I am doing bad?

Spoiler



    r_i2c: i2c@1f02400 {
            compatible = "allwinner,sun6i-a31-i2c";
            reg = <0x01f02400 0x400>;
            interrupts = <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>;
            pinctrl-names = "default";
            pinctrl-0 = <&r_i2c_pins>;
            clocks = <&r_ccu CLK_APB0_I2C>;
            resets = <&r_ccu RST_APB0_I2C>;
            status = "okay";
            #address-cells = <1>;
            #size-cells = <0>;
        };

r_pio: pinctrl@1f02c00 {
            compatible = "allwinner,sun8i-h3-r-pinctrl";
            reg = <0x01f02c00 0x400>;
            interrupts = <GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH>;
            clocks = <&r_ccu CLK_APB0_PIO>, <&osc24M>, <&rtc 0>;
            clock-names = "apb", "hosc", "losc";
            gpio-controller;
            #gpio-cells = <3>;
            interrupt-controller;
            #interrupt-cells = <3>;

            r_ir_rx_pin: r-ir-rx-pin {
                pins = "PL11";
                function = "s_cir_rx";
            };

            r_i2c_pins: r-i2c-pins {
                pins = "PL0", "PL1";
                function = "s_i2c";
            };
        };


 


 

Edited by TRS-80
put in code and spoiler block

2 hours ago, redmaze said:

I change sunxi-h3-h5.dtsi to status="okay" and i can not to see i2c PL0/PL1 only I can see others i2c. Can anybody help me to understand what I am doing bad?

I gave it a try and I got /dev/i2c-2 added to my previous setup, although I didn't plug any devices on it yet ...

root@orangepizeroplus2:~# i2cdetect -l
i2c-1	i2c       	DesignWare HDMI                 	I2C adapter
i2c-2	i2c       	mv64xxx_i2c adapter             	I2C adapter
i2c-0	i2c       	mv64xxx_i2c adapter             	I2C adapter

 

  • Author

 

Thanks martinayotte.

 

I try to see i2c-1 but nothing is shown even when I change connections between i2c ports (0<>1). May be it's a problem related to pinmux?. Thanks for your help

 

# i2cdetect -l
i2c-1    i2c           mv64xxx_i2c adapter                 I2C adapter
i2c-0    i2c           mv64xxx_i2c adapter                 I2C adapter
 

# i2cdetect -y 0
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- 0a 0b -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --                         
# i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --                         
 

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.