This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM5728: HDQ interface problems

Part Number: AM5728

Hello,

We have a AM57xx-based design and are having trouble with hot-plugging 1-wire devices. We're using the 4.4 Linux kernel from the processor-sdk-linux-3.02.00 branch, with the omap_hdq.c driver for the 1-wire bus master interface.

The issues we're seeing are as follows:

  1. The kernel driver doesn't appear to respond to userspace requests in a timely way (e.g. "cat /sys/bus/w1/devices/w1_bus_master1/w1_master_attempts" can take ~15-30 seconds to actually respond).
  2. The interface only recognizes new devices on boot.
  3. The interface takes on the order of minutes to detect a device removal event
  4. The interface appears to lock up when hot-plugging a new device into the bus.

I enabled DEBUG in the kernel driver and looked at some of the logs, and I noticed that the PRESENCEDETECT bit of the HDQ_CTRL_STATUS register appears to immediately detect the device being removed, but that the Linux 1-wire interface takes several minutes to actually reflect that the device has been removed.

However, when plugging a new device into the bus, the bus appears to lock up--I stop getting HDQ interrupts, and all of the bus scanning calls time out (not via interrupt).

Any help with this would be appreciated!

  • Hi Jonathan,

    Could you check whether the issue appears with the last Processor SDK v04.03 with Linux kernel 4.9.69.
    If the issue still appears check device tree weather matching to description at:
    www.kernel.org/.../omap-hdq.txt
    Also please share your kernel configuration settings related to HDQ/1-wire interface.

    BR
    Tsvetolin Shulev
  • Hello,

    Thank you for the response! I am building the 4.9.69 kernel and will report back shortly. In the meantime, here is the relevant portion of our device tree:

    hdqw1w: 1w@480b2000 {
        pinctrl-names = "default";
        pinctrl-0 = <&hdq_pins>;
        status = "okay";
        compatible = "ti,omap3-1w";
        reg = <0x480b2000 0x1000>;
        interrupts = <GIC_SPI 53 IRQ_TYPE_LEVEL_HIGH>;
        ti,hwmods = "hdq1w";
        ti,mode = "1w";
    };

  • Ok, all of the same issues happen with the 4.6.69 kernel (additionally ethernet doesn't appear to work but I imagine that's unrelated).
  • Jonathan,

    The latest work we've done is for the AM437x device family. We have not validated it, nor can we support it, on AM57x, at this time.

    I will log your request as a Feature Request. Any information that you can provide to help us disposition this request is appreciated.
  • OK, we will have to go another way for our product, then.

    In short, we were evaluating the on-chip 1-wire interface for devices on the bus that can appear and disappear at runtime. The problems were easily reproduced on a bench supply with the omap_hdq.c driver installed (with DEBUG enabled for that kernel module) -- just connect and disconnect a device from the bus and the bus seems to stop getting interrupts.

    Thank you,

    Jonathan