Enable I2C 6 on custom board with no HDMI

Hi,

I am trying to enable I2C-6 (DP0_AUX) on our custom baseboard. We are using several other I2C busses on the board which all work and we have 3v3 pullups on this bus.
From what I have read in the many forum posts, it seems that DP0_AUX cannot be set using the pinmux template (the xml file found in downloads). I have tried changing the the status of DP0_AUX_CH+ and DP0_AUX_CH- in the pinmux template however when i generate output files they are no different before and after these changes (comparing the dtsi files in my editor).

My method for detecting whether I2C 6 is up and running is to run sudo i2cdetect -r -y 5, my current output is that the command freezes and then times out while trying to scan the bus:. This is the output from DMESG when the scan is running:
[ 89.420624] tegra-i2c 31b0000.i2c: pio timed out addr: 0x4 tlen:12 rlen:4
[ 89.427584] tegra-i2c 31b0000.i2c: — register dump for debugging ----
[ 89.434300] tegra-i2c 31b0000.i2c: I2C_CNFG - 0x22c00
[ 89.439397] tegra-i2c 31b0000.i2c: I2C_PACKET_TRANSFER_STATUS - 0x10001
[ 89.446134] tegra-i2c 31b0000.i2c: I2C_FIFO_CONTROL - 0xe0
[ 89.451660] tegra-i2c 31b0000.i2c: I2C_FIFO_STATUS - 0x800080
[ 89.457428] tegra-i2c 31b0000.i2c: I2C_INT_MASK - 0x7d
[ 89.462581] tegra-i2c 31b0000.i2c: I2C_INT_STATUS - 0x2
[ 89.467814] tegra-i2c 31b0000.i2c: i2c transfer timed out addr: 0x4

I have also tried following the solution from this forum post however my device tree will not compile with error: ERROR (phandle_references): Reference to non-existent node or label "clk32k_in" (note I am replacing the host1x section in tegra186-quill-p3310-1000-a00-00-base.dts).

I have also tried making changes which disable sor and sor1 in the device tree as per this post. This also did not enable the I2C port.

From this post I have gathered that if you are trying to use the dpaux0 pins for I2C on a board that does not have HDMI, you need to disable all references to sor, sor1 and any nvdisplay nodes to prevent the HDMI driver from loading. I have tried decompiling tegra186-quill-p3310-1000-c03-00-base.dtband tegra186-quill-p3310-1000-a00-00-base.dtb, disabling all references and then recompiling and flashing the device tree however this also didn’t enable the bus. I can see that I am at least disabling the HDMI driver by running:
sudo -s
cat find /sys -name 'edid'
and receiving “No EDID” as the response.

Can you please advise any other changes that I should try and also the files that I should be making changes to. I would appreciate a quick response as we will have to order new hardware if we can’t get this bus running.

Thanks,
Jack

Are you trying to enable dp0_aux for DP monitor or you want to confiugre dp0_aux as a general i2c pin?

I am trying to enable dp0_aux as a general I2C pin

Hi,

This requires special configuration.

To configure the pinmux setting of i2c-4 and i2c-6
You must make three changes to the device tree configure the pinmux settings of i2c-4 (dpaux1) and i2c-6 (dpaux0):

  1. In the i2c controller node, set pinctrl-0 to point to dpaux-default, and pinctrl-names to “default”:
    i2c@31b0000 {
             pinctrl-names = "default";
             pinctrl-0 = <&dpaux_default>;
            };
    

Define the dpaux controller node like this:

 host1x {
        dpaux@nodename {
            status = "okay";
            compatible = "nvidia,tegra186-dpaux-padctl";
            dpaux_default: pinmux@0 {
                dpaux_pins {
                    pins = "dpaux-<port>";
                    function = "i2c";
                };
            };
           /delete-property/ power-domains;
        };
    };

Where:
nodename is 155c0000 for dpaux0, or 15040000 for dpaux1
port is “0” for depaux0. or “1” for dpaux1

For more information about this setting,
see /‌kernel/‌nvidia/‌Documentation/‌devicetree/‌bindings/‌pinctrl/‌nvidia,tegra186-dpaux-pinctrl.txt.

Thanks for your help Wayne, the bus is now up and running. Just for completeness i will post the changes that fixed my issue:

Add to tegra186-quill-p3310-1000-a00-00-base.dtb outside of the host1x node:
i2c@31b0000 {
pinctrl-names = “default”;
pinctrl-0 = <&dpaux_default>;
};

Add to tegra186-quill-p3310-1000-a00-00-base.dtb inside of the host1x node (note the position of /delete-property/ is different from above:

dpaux@155c0000 {
           status = "okay";
           compatible = "nvidia,tegra186-dpaux-padctl";
          /delete-property/ power-domains;
           dpaux_default: pinmux@0 {
               dpaux_pins {
                   pins = "dpaux-0";
                   function = "i2c";
			   	};
           	};
       	};

I was also possibly having a problem with the way the DTB was being flashed. Make sure you are using this command:
sudo ./flash.sh -k kernel-dtb jeston-tx2 mmcblk0p1

2 Likes