Analog Devices IIO

I am trying to add support for an IIO device, specifically the AD5993. I have enabled the options in the kernel and after loading the new Image, still only see one IIO device, the INA3221 chip which is already on the Nano dev kit. I’m not exactly sure where to go from here. My assumption was that enabling this in the kernel and flashing the Image on the Nano would allow me to register the i2c device and another IIO device would enumerate, but I havent been successful. Do i need to also modify the device tree?

hello joe,

usually, you’ll need to customize the device tree to report the usage of regulators and GPIOs. you may compile kernel sources for building your own device tree binary,
please also refer to Flash Script Usage to enable -k DTB options for device tree updates.

Right. I went into Linux_for_Tegra/kernel/dtb and decompiled the tegra210-p3448-0000-p3449-0000-a02.dtb into a dts file. I added this under i2c@7000c000 which I am trying to guess is the i2c on the 40 pin header.

`	i2c@7000c000 {
	#address-cells = <0x1>;
	#size-cells = <0x0>;
	compatible = "nvidia,tegra210-i2c";
	reg = <0x0 0x7000c000 0x0 0x100>;
	interrupts = <0x0 0x26 0x4>;
	iommus = <0x2b 0xe>;
	status = "okay";
	clock-frequency = <0x61a80>;
	dmas = <0x4c 0x15 0x4c 0x15>;
	dma-names = "rx", "tx";
	clocks = <0x21 0xc 0x21 0xf3>;
	clock-names = "div-clk", "parent";
	resets = <0x21 0xc>;
	reset-names = "i2c";
	linux,phandle = <0xab>;
	phandle = <0xab>;

	temp-sensor@4c {
		#thermal-sensor-cells = <0x1>;
		compatible = "ti,tmp451";
		reg = <0x4c>;
		sensor-name = "tegra";
		supported-hwrev = <0x1>;
		offset = <0x0>;
		conv-rate = <0x6>;
		extended-rage = <0x1>;
		interrupt-parent = <0x56>;
		interrupts = <0xbc 0x8>;
		vdd-supply = <0x36>;
		temp-alert-gpio = <0x56 0xbc 0x0>;
		status = "disabled";
		linux,phandle = <0x117>;
		phandle = <0x117>;

		loc {
			shutdown-limit = <0x78>;

		ext {
			shutdown-limit = <0x69>;

	impedance-analyzer@0d {
		compatible = "adi,ad5933";
		reg = <0x0d>;
		vdd-supply = <0x47>;

I then recompiled and ran sudo ./ -k DTB jetson-nano-qspi-sd mmcblk0p1 with my nano in recovery mode.

I boot up and it is like the changes didnt apply.

I resolved this. Thank you for the help. It came down to finding the correct “compatible” string for my device.

1 Like