AGX Xavier how to set the i2c@c240000 as a i2c slave mode [2]

Hi
In the past time , i post a qusetion about how to set the i2c@c240000 as a slave mode, at https://forums.developer.nvidia.com/t/agx-xavier-how-to-set-the-i2c-c240000-as-a-i2c-slave-mode/189992

Now , i still meet some questions about setting the i2c@c240000 as a slave i2c node.
Please help , thank you

My setting steps like below:

1 : hardware\nvidia\platform\t19x\galen\kernel-dts\common\tegra194-p2888-0001-p2822-0000-common.dtsi
i add the code as below

i2c@c240000 {
		compatible = "nvidia,tegra194-i2c-slave";
		eeprom@64 {
			reg = <0x64>;
			compatible="slave-24c02";
			status = "okay";
		};
	};

2 : make menuconfig
in kernel menuconfig, i set “Y” about some configs

Symbol: I2C_SLAVE [=y]                                                                                                                                                                              │  
  │ Type  : boolean                                                                                                                                                                                     │  
  │ Prompt: I2C slave support                                                                                                                                                                           │  
  │   Location:                                                                                                                                                                                         │  
  │     -> Device Drivers                                                                                                                                                                               │  
  │       -> I2C support                                                                                                                                                                                │  
  │ (1)     -> I2C support (I2C [=y])                                                                                                                                                                   │  
  │   Defined at drivers/i2c/Kconfig:112                                                                                                                                                                │  
  │   Depends on: I2C [=y]                                                                                                                                                                              │  
  │   Selected by: I2C_EMEV2 [=m] && I2C [=y] && HAS_IOMEM [=y] && HAVE_CLK [=y] || I2C_TEGRA_SLAVE [=y] && I2C [=y] && HAS_IOMEM [=y] && ARCH_TEGRA [=y] || I2C_RCAR [=n] && I2C [=y] && HAS_IOMEM [=y │  
  │                                                                                                                                                                                                     │  
  │                                                                                                                                                                                                     │  
  │ Symbol: I2C_SLAVE_EEPROM [=y]                                                                                                                                                                       │  
  │ Type  : tristate                                                                                                                                                                                    │  
  │ Prompt: I2C eeprom slave driver                                                                                                                                                                     │  
  │   Location:                                                                                                                                                                                         │  
  │     -> Device Drivers                                                                                                                                                                               │  
  │       -> I2C support                                                                                                                                                                                │  
  │         -> I2C support (I2C [=y])                                                                                                                                                                   │  
  │ (2)       -> I2C slave support (I2C_SLAVE [=y])                                                                                                                                                     │  
  │   Defined at drivers/i2c/Kconfig:117                                                                                                                                                                │  
  │   Depends on: I2C [=y] && I2C_SLAVE [=y]                                                                                                                                                            │  
  │                                          

3 : dmesg | grep i2c

[    0.794174] iommu: Adding device 3160000.i2c to group 13
[    0.794647] iommu: Adding device c240000.i2c to group 14
[    0.795051] iommu: Adding device 3180000.i2c to group 15
[    0.795519] iommu: Adding device 3190000.i2c to group 16
[    0.796097] iommu: Adding device 31b0000.i2c to group 17
[    0.796525] iommu: Adding device 31c0000.i2c to group 18
[    0.796986] iommu: Adding device c250000.i2c to group 19
[    0.797396] iommu: Adding device 31e0000.i2c to group 20
[    0.923203] tegra-i2c 31e0000.i2c: could not find pctldev for node /host1x/dpaux@155F0000/pinmux@0, deferring probe
[    7.259617] i2c /dev entries driver
[    7.263784] i2c i2c-2: Added multiplexed i2c bus 30
[    7.264095] i2c i2c-2: Added multiplexed i2c bus 31
[    7.264396] i2c i2c-2: Added multiplexed i2c bus 32
[    7.264623] i2c i2c-2: Added multiplexed i2c bus 33
[    7.264778] i2c-slave-eeprom 1-0064: i2c_slave_register: client slave flag not set. You might see address collisions, flag = 0x0
[    7.266107] tuyun-slave-eeprom_i2c: zp:  func[i2c_slave_eeprom_probe] line[201]->|| chip_addr = 0x64
[    7.266113] tuyun-slave-eeprom_i2c: zp:  func[i2c_slave_eeprom_probe] line[202]->|| bin.size = 256
[   11.123135] Error: Driver 'tegra194-i2cslv' is already registered, aborting...

4 : now i use two board , one board as i2c master, and one board as i2c slave, and use line connect two board
I use i2cdetect command to detect , but dont have any i2c slave address about the i2c slave

root@dev-desktop:~# i2cdetect -y -r -a 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

So i want to know where is wrong? And what should i do to realize the i2c slave mode.

Thank you very much!

Has anyone help?

Comments from our internal team as your reference:

Customer using Xavier product with compatible string “nvidia,tegra194-i2c-slave”. So ideally below flags should be set to y.

CONFIG_I2C_TEGRA194_SLAVE=y
CONFIG_I2C_SLAVE_EEPROM=y

But I don’t see CONFIG_I2C_TEGRA194_SLAVE is being set to y in the steps mentioned.

Hi kayccc

I2C_TEGRA194_SLAVE is also set as y

Symbol: I2C_TEGRA194_SLAVE [=y]                                                                                                                                                                     │  
  │ Type  : tristate                                                                                                                                                                                    │  
  │ Prompt: NVIDIA Tegra194 internal I2C slave controller                                                                                                                                               │  
  │   Location:                                                                                                                                                                                         │  
  │     -> Device Drivers                                                                                                                                                                               │  
  │       -> I2C support                                                                                                                                                                                │  
  │         -> I2C support (I2C [=y])                                                                                                                                                                   │  
  │ (1)       -> I2C Hardware Bus support                                                                                                                                                               │  
  │   Defined at /home/zhou/lab/nvdia_sdk/sdk/JetPack_4.5.1_Linux_JETSON_AGX_XAVIER/Linux_for_Tegra/sources/kernel/nvidia/drivers/i2c/busses/Kconfig:49                                                 │  
  │   Depends on: I2C [=y] && HAS_IOMEM [=y]                                                                                                                                                            │  
  │   Selects: I2C_SLAVE [=y]