CVM EEPROM support in the device tree

I’m adding support to write data into the user area of the cvm eeprom on the TX2 NX. We have a serial number we’d like to keep there. I’m using the tegra eeprom tool as the basis of my work. They advise that it’s necessary to enable CONFIG_AT24 and modify the device tree to enable support for the eeprom driver in order to write to it. I’ve added the kernel module but I’m unsure how to make the device tree changes.

I believe the CVM EEPROM on the TX2 NX is on i2c bus 7 at address 0x50. What’s the preferred way of adding this to the device tree .dts files?

What is the exact request here? What do you want to do?

If you just want to write a data to module eeprom, then you don’t need special tool. Just i2c tool commands can make it work. No need to change anything in kernel.

But you must ensure you write the correct field and update the crc checksum bit in eeprom. Otherwise you would not able to flash the board.

What I want to do is get the at24 eeprom driver working by adding it to the kernel and the device tree. I’ve already added it to the kernel - it’s the device tree I’m asking for help with.

The tegra-eeprom-tool guys say that using i2c commands directly from user space gives unpredictable results when writing to the eeprom so they only support using the dedicated at24 driver instead.

Answering my own question - the guy from tegra-eeprom-tool tells me he uses:

    i2c@c250000 {
		eeprom@50 {
			compatible = "atmel,24c02";
			reg = <0x50>;
		};
	};

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