Sebastien Motala Posted October 24, 2023 Share Posted October 24, 2023 This is my config : Odroid M1 (8G) with Armbian 6.6.0-rc6-edge-rk3568-odroid build myself. >root@yanas3:/dev# i2cdetect -l >i2c-3 i2c rk3x-i2c I2C adapter >i2c-6 i2c DesignWare HDMI I2C adapter >root@yanas3:/dev# i2cdetect -y 3 > 0 1 2 3 4 5 6 7 8 9 a b c d e f >00: -- -- -- -- -- -- -- -- >10: -- -- -- -- -- -- -- -- -- -- -- -- UU -- -- -- >20: UU -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- >30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- >40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- >50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- >60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- >70: -- -- -- -- -- -- -- -- My peripheral is an OLED screen SSD1306. It works perfectly with an Orange Pi5. It's connected to GPIO pin 1 (VDD), 3 (SDA),5 (SDL),9 (GND) but I can't see it. What am i doing wrong ? 0 Quote Link to comment Share on other sites More sharing options...
usual user Posted October 25, 2023 Share Posted October 25, 2023 On 10/24/2023 at 3:41 PM, Sebastien Motala said: What am i doing wrong ? The IOs of the expansion connector are multifunction IOs, so the deault configuration does not necessarily correspond to your use case. How did you wire up the corresponding i2c bus in DT? 0 Quote Link to comment Share on other sites More sharing options...
Sebastien Motala Posted October 25, 2023 Author Share Posted October 25, 2023 I don't know what DT is. I add "overlays=rockchip-i2c0" to armbianEnv.txt 0 Quote Link to comment Share on other sites More sharing options...
usual user Posted October 26, 2023 Share Posted October 26, 2023 7 hours ago, Sebastien Motala said: I add "overlays=rockchip-i2c0" to armbianEnv.txt I don't know what that overlay wires up but with proper wired DT you should get this: # i2cdetect -l i2c-0 i2c rk3x-i2c I2C adapter i2c-3 i2c rk3x-i2c I2C adapter i2c-6 i2c DesignWare HDMI I2C adapter 0 Quote Link to comment Share on other sites More sharing options...
Sebastien Motala Posted October 26, 2023 Author Share Posted October 26, 2023 You're allright, I should see i2c-0 in /dev but the overlay from hardkernel use i2c3 in his rockchip-i2c0.dtbo file. # less /boot/dtb/rockchip/overlay/rockchip-i2c0.dtbo <D0>^M<FE><ED>^@^@^@<DF>^@^@^@8^@^@^@<CC>^@^@^@(^@^@^@^Q^@^@^@^P^@^@^@^@^@^@^@^S^@^@^@<94>^@^@^@^@^@^@^@^@^@^@^@^@ ^@^@^@^@^@^@^@^A^@^@^@^@^@^@^@^Afragment@0^@^@^@^@^@^C^@^@^@^D^@^@^@^@<FF><FF><FF><FF>^@^@^@^A__overlay__^@^@^@^@^C^@^@^@^E^@^^@^@^Gokay^@^@^@^@^@^@^@^B^@^@^@^B^@^ @^@^A__fixups__^@^@^@^@^@^C^@^@^@^U^@^@^@^N/fragment@0:target:0^@^@^@^@^@^@^@^ B^@^@^@^B^@^@^@ target^@status^@i2c3^ 0 Quote Link to comment Share on other sites More sharing options...
usual user Posted October 26, 2023 Share Posted October 26, 2023 (edited) - backup your existing rk3568-odroid-m1.dtb - replace /boot/dtb/rockchip/rk3568-odroid-m1.dtb with the provided DTB - disable all currently applied overlays (the provided DTB has everything already wired up) - reboot and post the output of: # i2cdetect -y 0 rk3568-odroid-m1.dtb Edited October 28, 2023 by usual user Re-uploaded corrected DTB 0 Quote Link to comment Share on other sites More sharing options...
Sebastien Motala Posted October 27, 2023 Author Share Posted October 27, 2023 Thank you for your reply. It works. root@yanas3:~# time i2cdetect -y 0 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 70: -- -- -- -- -- -- -- -- real 1m56.467s user 0m0.015s sys 0m0.000s But the display is very slow, it took nearly 2 minutes to display. What pins are activated on the GPIO for i2c0 ? 0 Quote Link to comment Share on other sites More sharing options...
usual user Posted October 28, 2023 Share Posted October 28, 2023 11 hours ago, Sebastien Motala said: What pins are activated on the GPIO for i2c0 ? That was a good question. While researching the answer, I noticed that the basic DTB wires the i2c functionality to pads that are inaccessible on this device. After appropriate correction, the i2c functionality is now available on the documented pins of the board. I plugged in my LK-OLED1 display and it works as expected: # i2cdetect -y 0 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- -- -- -- -- -- UU -- -- -- 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 70: -- -- -- -- -- -- -- -- I re-uploaded the corrected DTB in the previous post. Please download the DTB again to replace the wrong one. 0 Quote Link to comment Share on other sites More sharing options...
Sebastien Motala Posted October 29, 2023 Author Share Posted October 29, 2023 Thank you, your DTB file works. But I have another problem the tty1 display on the oled screen. Where can i disabled this ? 0 Quote Link to comment Share on other sites More sharing options...
usual user Posted October 29, 2023 Share Posted October 29, 2023 (edited) On 10/29/2023 at 11:05 AM, Sebastien Motala said: Thank you, your DTB file works. Nice to hear, then I can issue my invoice now 😉 It is now your task to make my contributed knowledge easily available to all Armbian users. Prepare a PR so that my used overlay (which was applied to my provided DTB) will be included in the Armbian build system. And while you're at it, include this one (also applied to my provided DTB by default) as well. It simplifies GPIO handling and connector pinout identification immensely. If I am correctly informed, they have even simplified the overlay integration into the build system. All you have to do is make the overlay source available in an appropriate directory. To do this, I have attached the sources of both overlays to this post. Repairing the pinctrl in the base DTB is not that easy, for this you have to apply the attached patch to the board DTS and rebuild the base DTB. This is necessary so that the correct code artifacts can be integrated into the DTB, this cannot be corrected in a reasonable way with an overlay. And don't forget, you'll reap a lot of Armbian users who will be grateful for your contribution. Not to mention the fact that your desired functionality will be available out-of-the-box to everyone in the future. On 10/29/2023 at 11:05 AM, Sebastien Motala said: I have another problem the tty1 display on the oled screen. I'm guessing you only have the OLED display driver loaded in your system and no additional other. This then provides /dev/fb0, which in turn is assigned /dev/tty1 by the system. Usually, the console is also assigned to /dev/tty1 by default. On 10/29/2023 at 11:05 AM, Sebastien Motala said: Where can i disabled this ? I don't know the system you're using, but I always configure the console mapping with the kernel command line (/proc/cmdline). rk3568-odroid-m1-con1.dtsork3568-odroid-m1-lk-oled1.dtsospecify-pinctrl-for-i2c3-adapter-on-ODROID-M1.patch Edited February 9 by usual user rk3568-odroid-m1-lk-oled1.dtso with SPDX-License-Identifier uploaded 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.