Requesting guidance for beaglebone black

Hi,

We have made a custom board from beagle bone black. We have a requirement to use I2C1 on E17 and E18 pins of MPU. However, we see that all pins are reference w.r.t port 8 or port 9 in dts files.

I am using kernel_version of “4.14.108-ti-r140”, Debian 10 Root File System. The MPU is am3358bzcz100

I also have following questions :

  1. The device tree files that is used by beagle bone black is taken from “ti-linux-kernel-dev/KERNEL/arch/arm/boot/dts”?
  2. How can i modify the device tree so that i2c1 is enabled and available on E17 and E18 pins of MPU?

@RobertCNelson : Please help

Regards,
Kiran B V

Using TI’s pinmux tool with the AM335x and ZCZ package we can configure E17/E18 as:

		pinctrl-single,pins = <
			AM33XX_IOPAD(0x96c, PIN_INPUT_PULLUP | MUX_MODE3) /* (E17) uart0_rtsn.I2C1_SCL */
			AM33XX_IOPAD(0x968, PIN_INPUT_PULLUP | MUX_MODE3) /* (E18) uart0_ctsn.I2C1_SDA */
		>;

Clone repo:

git clone -b ti-linux-4.14.y https://github.com/RobertCNelson/ti-linux-kernel-dev.git
cd ./ti-linux-kernel-dev/
./build_kernel.sh

Hit ESC, ESC, and Ctrl-C after menuconfig loads, then patch this file, under the KERNEL directory

diff --git a/arch/arm/boot/dts/am335x-bone-common.dtsi b/arch/arm/boot/dts/am335x-bone-common.dtsi
index 6e5b6ae03b59..ee4ba20d08a2 100644
--- a/arch/arm/boot/dts/am335x-bone-common.dtsi
+++ b/arch/arm/boot/dts/am335x-bone-common.dtsi
@@ -79,6 +79,13 @@
                >;
        };
 
+       i2c1_pins: pinmux_i2c1_pins {
+               pinctrl-single,pins = <
+                       AM33XX_IOPAD(0x96c, PIN_INPUT_PULLUP | MUX_MODE3) /* (E17) uart0_rtsn.I2C1_SCL */
+                       AM33XX_IOPAD(0x968, PIN_INPUT_PULLUP | MUX_MODE3) /* (E18) uart0_ctsn.I2C1_SDA */
+               >;
+       };
+
 //     i2c2_pins: pinmux_i2c2_pins {
 //             pinctrl-single,pins = <
 //                     AM33XX_PADCONF(AM335X_PIN_UART1_CTSN, PIN_INPUT_PULLUP, MUX_MODE3)      /* uart1_ctsn.i2c2_sda */
@@ -283,6 +290,14 @@
        };
 };
 
+&i2c1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&i2c1_pins>;
+
+       status = "okay";
+       clock-frequency = <100000>;
+};
+
 &i2c2 {
        pinctrl-names = "default";
        //pinctrl-0 = <&i2c2_pins>;

Then finish the build:

./tools/rebuild.sh

Regards,

2 Likes

Thanks a lot for the specific inputs. I used the TI’s pinmux tool to verify this on P9 of beagle-bone black since E17 and E18 are not accessible. And it is working as expected.

@RobertCNelson : However, in my last kernel build a virtual COM port was showing up when i booted the BBB (USB used for powering the BBB). Is there some specific kernel module that i need to select for this feature? Actually we require a COM port through USB for testing purposes.

I think there is some problem. The older image used “4.14.108-ti-r127” and i could see “[ OK ] Found device /dev/ttyGS0.” message. But its timing out in “4.14.108-ti-r140”. Please check the screenshot below.

Hi @kiranbv i have not completely fixed the /dev/ttyGS0 issue… It’s a USB gadget driver we load at boot time, to provide a connection point between your pc and the board. systemd see’s it’s enabled, but is waiting for it to load…

loaded here:

Configured here:

There is a patch for systemd:

This isn’t fully ready yet…

Regards,