I2C on Espressobin V7

that means... it's likely upstream ( within kernel source );

find build_dir/target-* | grep armada-3720-espressobin.dts

be advised... patches may modify these pre<->post build...

fgrep -r armada-3720-espressobin.dts target/linux/ | grep '.patch'

I see. So, does that mean writing a patch, just to enable I2C is the only way to go since it is within the Kernel source, and not in a separate file?

n007@Probook:~/openwrt$ find build_dir/target-* | grep armada-3720-espressobin.dts
find: ‘build_dir/target-*’: No such file or directory

if you have not yet run a build... those directories will not exist...

there is a guide on the wiki re: quilt + kernel custom patches workflow...

I use alternate means... so i'm not the best person to advise you...

all you really need though is to add the leaf + status = 'okay'; within your dts... i.e.;

                        i2c@11080 {
                                status = "okay";
                        };

as they enherit / override the primary dts...

i'd recommend trying one at a time...

1 Like

Thank you. I will run a build now.

I ran "make" command once to get all the build files, then traced the master dtsi file, enabled I2C along with SATA, and ran make --assume-new=FILE The image files were built and it booted without any problem at all, didn't have to change a thing this time, I see the beauty of building from source.

Thank you for being patient and walking me through it.

I have one final question. I ran make --assume-new=FILE because I thought just running make by itself will overwrite the dts files I modified, so I used this switch as I wasn't sure.
Is this the correct way of doing it, or just simply use make and my changes will still be carried into the image?

I was able to build the image and now I2C seems to be enabled but still can't get the I2Cdetect to work

                                        #gpio-cells = <0x02>;
                                        linux,phandle = <0x0c>;
                                        gpio-ranges = <0x05 0x00 0x00 0x24>;
                                };

                                i2c2-pins {
                                        function = "i2c";
                                        groups = "i2c2";
                                };

                                i2c1-pins {
                                        function = "i2c";
                                        groups = "i2c1";
                                };

                                uart2-pins {
                                        function = "uart";
                                        groups = "uart2";
--
                                        full-duplex;
                                        speed = <0x3e8>;
                                };
                        };

                        i2c@11080 {
                                #address-cells = <0x01>;
                                mrvl,i2c-fast-mode;
                                interrupts = <0x00 0x02 0x04>;
                                clocks = <0x02 0x09>;
                                #size-cells = <0x00>;
                                compatible = "marvell,armada-3700-i2c";
                                status = "okay";
                                reg = <0x11080 0x24>;
                        };

                        interrupt-controller@1d00000 {
--
                                                };
                                        };
                                };
                        };

                        i2c@11000 {
                                #address-cells = <0x01>;
                                mrvl,i2c-fast-mode;
                                interrupts = <0x00 0x01 0x04>;
                                clocks = <0x02 0x0a>;
                                #size-cells = <0x00>;
                                compatible = "marvell,armada-3700-i2c";
                                status = "okay";
                                reg = <0x11000 0x24>;
                        };

                        nb-periph-clk@13000 {


root@OpenWrt:/# dmesg | grep i2c
[    1.769168] i2c /dev entries driver

root@OpenWrt:/# insmod i2c-dev
Failed to find i2c-dev. Maybe it is a built in module 
opkg list-installed | grep i2c 
1 Like

Thank you. I'm sorry that I took some of your time just trying to figure out the image itself, but now everything's running smooth and this is the only thing that's left.


root@OpenWrt:/# opkg list-installed | grep i2c
i2c-tools - 4.1-3
kmod-i2c-algo-bit - 4.14.195-1
kmod-i2c-core - 4.14.195-1
kmod-i2c-gpio - 4.14.195-1
kmod-i2c-gpio-custom - 4.14.195-3
kmod-i2c-smbus - 4.14.195-1
libi2c - 4.1-3

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.