I2c bus mapping in Tegra kernel and uboot

Hi
I have found one interesting thing,
I could see few devices on i2c bus 0 in uboot but same devices are available on i2c bus 4 in linux.
Following are the details:
Tegra210 (P2371-2180) # i2c dev 0
Setting bus to 0
Tegra210 (P2371-2180) # i2c probe
Valid chip addresses: 3C 68

Tegra210 (P2371-2180) #

ubuntu@tegra-ubuntu:~$ sudo i2cdetect -y -r 0
[sudo] password for ubuntu:
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: – – – – – – – – – – – – –
10: – – – – – – – – – – – – – – – –
20: – – – – – – – – – – – – – – – –
30: – – – – – – – – – – – – – – – –
40: – – – – – – – – – – – – UU – – –
50: – – – – – – – – – – – – – – – –
60: – – – – – – – – – – – – – – – –
70: – – – – – – – –
ubuntu@tegra-ubuntu:~$ sudo i2cdetect -y -r 4
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: – – – – – – – – – – – – –
10: – – – – – – – – – – – – – – – –
20: – – – – – – – – – – – – – – – –
30: – – – – – – – – – – – – UU – – –
40: – – – – – – – – – – – – – – – –
50: – – – – – – – – – – – – – – – –
60: – – – – – – – – UU – – – – – – –
70: – – – – – – – –
ubuntu@tegra-ubuntu:~$

Could someone from Nvidia explain me how mapping is happening in kernel and uboot for i2c buses with proper addressing info for i2c buses???

@patyarahate
That’s interesting, you can check with the bus address to map to the right one.

Tegra210 (P2371-2180) # i2c bus
Bus 5: i2c@0,546c0c00
Bus 2: i2c@0,7000c400
Bus 3: i2c@0,7000c500
Bus 0: i2c@0,7000d000 (active 0)

    aliases {
            i2c0 = "/i2c@7000c000";
            i2c1 = "/i2c@7000c400";
            i2c2 = "/i2c@7000c500";
            i2c3 = "/i2c@7000c700";
            i2c4 = "/i2c@7000d000";
            i2c5 = "/i2c@7000d100";
            i2c6 = "/host1x/i2c@546c0000";

Hi Shane,

Thanks for the reply.
Why i could not see i2c@7000c000 in uboot?
Is there something i need to enable in uboot for i2c@7000c000 to be accessible in uboot?
The bus of interest to me is I2C_GP0(I2C_GEN1) which according to technical reference manual has address of 7000c000.

Thanks,
Prathamesh

@patyarahate
I think developer want to make the uboot much lighter as they can so only to enable the necessary bus for the uboot. I think you can check the source and enable it.