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.

Linux/BEAGLEBK: 1-wire device tree entry

Part Number: BEAGLEBK

Tool/software: Linux

Hello,

I'm able to configure / compile / install / boot kernel and modules for 1-wire support.

Have Dallas DS18B20 temp sensors.

modprobe w1_therm       ok

lsmod
Module                  Size  Used by
w1_therm                5618  0
wire                   23592  1 w1_therm

But what exactly do I have to add to arch/arm/boot/dts/am335x-boneblack.dts?

Temp sensors are connected on P9_12    .... expect that's currently unknown for w1_therm

Thanks for help

Pepito 

  • Hi Pepito,

    You can find a DS18B20 1-wire temperature sensor device tree configuration example at:
    kvurd.com/.../
    github.com/.../am335x-boneblack-minimal-1wire.dts

    BR
    Tsvetolin Shulev
  • Hi Tsvetolin,
    thank you, I found it already, doesn't work, maybe my mistake.
    I append this to arch/arm/boot/dts/am335x-boneblack.dts:
    / {
    ocp {
    P9_12_pinmux {status = "disabled"; }; /* Dallas 1W */
    };
    };

    / {
    onewire {
    compatible = "wire";
    pinctrl-names = "default";
    pinctrl-0 = <&dallas_w1_pins>;
    status = "okay";
    gpios = <&gpio0 2 0>;
    };
    };

    &am33xx_pinmux {
    dallas_w1_pins: pinmux_dallas_w1_pins {
    pinctrl-single,pins = <0x078 0x37>;
    };
    };

    My sensors are connected to P9_12
    I tried already different strings in compatible="...."
    1.) wire
    2.) w1-gpio
    3.) w1_term

    Which one is correct for Dallas DS18B20 temp sensors?
    If I load the module with modprobe, dmesg is reporting success.
    But it doesn't work, can't see the device.

    Is the value of gpios= correct?

    Have a good day
    Pepito
  • Hi Tsvetolin,
    think this example is not for TI SDK, it's for the Debian version. I understood the format / syntax is not equal.
    kvurd.com/.../

    Have a good day
    Pepito
  • Hi Tsvetolin,
    cloud you please provide a snipped of your device tree with working 1-wire kernel based 1-wire support?
    I do need exact data to make a step forward. As it should be is known, but it dosn't work. I'm sure there
    is a failure in my setup, but I have no idea where to search.
    Please provide data of a working reference. Then I will switch everything else of, so that we have exactly the same environment.
    Thanks and have a good day
    Pepito