How to add LED device tree on agx orin and it can communication with agx orin via I2C?

I have a led driver chip named max25914, I am referring to the driver instance of lp3592 in the linux kernel to write driver code, but I did not find its device tree, how should I add this led to the device tree to support I2C communication?

the draft of Hardware diagram is as follows:

Please give me some help?

hello 15890986753,

since it’s device connected to Ser/Des chip, please see-also reference driver,
for instance, $public_sources/kernel_src/hardware/nvidia/platform/t23x/concord/kernel-dts/cvb/tegra234-p3737-0000-camera-imx390-a00.dtsi
as you can see… it uses I2C mux, an i2c bus multiplexer/switch (at address 0x70) will have several child bus that are numbered uniquely in a device dependent manner.

Yes, I referred to this dtsi and added the address of the led, but when I ran the driver to write the led register, agx orin suggested that remote I/O fail.

The device tree segment is as follows:
image

I wrote the register in the led probe function directly through the regmap_write interface function.

hello 15890986753,

did you confirm you’ve providing power-supply for this i2c device correctly?

What I can confirm is that the imager sensor/serdes has been powered normally and the circuit of the led has not been measured. Do you suspect that the led is not powered correctly? I think it’s not very likely.

hello 15890986753,

power-supply is mandatory for i2c device,
normally, it should be functional after you’ve given power correctly.

I did not go to work today, so I did not confirm the I2c power supply of led. But from the hardware connection diagram, the I2c power supply of sensor/serializer is normal. I understand that the I2C power supply of led should be normal, but I will confirm again tomorrow. But there is another phenomenon I do not know whether it will help you. When my led drives flash to agx orin, I will restart agx orin. When agx orin starts to run, the display connected to agx orin will lose signal, and I cannot debug. Why is that?

hello 15890986753,

may I confirm which Jetpack release version you’re working with? please share your steps for flashing AGX Orin.
besides, there’s serial console for outputting UART logs, please gather logs for reference.

my sdk is R35.2.1, jetPack is 5.1-b147.

step1: Copy the compiled driver file to the agx orin root directory

step2: Power on the agx orin again

step3: When agx orin runs again, the display will light up first, and the boot content will pop up. After loading, the screen will be black and the signal will be lost

How do I log uart?

please refer to USB micro-B for Debug UART.

uart log is as follows:
putty.log (55.6 KB)

I can’t control my agx orin through the display right now, so the only bad option I have now is to refresh the machine. Can you help me see what the problem is?


Is it in recovery mode from the log? That’s why the display is losing signal, isn’t it?

hello 15890986753,

according to the logs, it looks you’ve corrupted Root file system,

[   10.232136] Run /init as init process
[   10.243731] Root device found: initrd
[   10.244188] Mount initrd as rootfs and enter recovery mode

since it’s corrupted after you updating kernel driver.
please double check Kernel Customization section to examine your steps.

Is there any way to rewrite the root file system, because the display is not available now? Is it possible to use uart?

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