Build device tree for 1-wire failed

72 views
Skip to first unread message

Fohnbit

unread,
Nov 18, 2019, 11:22:57 AM11/18/19
to BeagleBoard
Hello,

I used the P9.12 pin for 1-wire ... this is working.

Now I want 2 lanes more. I thought to use for the second lane: P8.27 and P8.28
/*
 * Copyright (C) 2015 Robert Nelson <robert...@gmail.com>
 *
 * Virtual cape for onewire on connector pin P9.12
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 */


/* Modified by Connor Shapiro for use with P8.27 & P8.28 */

/dts-v1/;
/plugin/;

#include <dt-bindings/board/am335x-bbw-bbb-base.h>
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/pinctrl/am33xx.h>

/ {
        compatible
= "ti,beaglebone", "ti,beaglebone-black", "ti,beaglebone-green";

       
/* identification */
        part
-number = "BB-W1-P8.27_28";
        version
= "00A0";

       
/* state the resources this cape uses */
        exclusive
-use =
               
/* the pin header uses */
               
"P8.27",
               
"P8.28";

       
/*
         * Free up the pins used by the cape from the pinmux helpers.
         */

        fragment@0
{
                target
= <&ocp>;
                __overlay__
{
                        P8_27_pinmux
{ status = "disabled"; };
                        P8_28_pinmux
{ status = "disabled"; };
               
};
       
};
       

        fragment@1 {
                target
= <&am33xx_pinmux>;
                __overlay__
{

                        dallas_w1_1_pins
: pinmux-dallas-w1-1pins {
                                pinctrl
-single,pins = <
                                        BONE_P8_27
0x37
                               
>;
                       
};

                        dallas_w1_2_pins
: pinmux-dallas-w1-2-pins {
                                pinctrl
-single,pins = <
                                        BONE_P8_28
0x37
                               
>;
                       
};
               
};
       
};

        fragment@2
{
                target
-path="/";
                __overlay__
{

                        onewire2
{
                                status
= "okay";
                                pinctrl
-names = "default";
                                pinctrl
-0 = <&dallas_w1_pins>;

                                compatible
= "w1-gpio";
                                gpios
= <&gpio2 22 GPIO_ACTIVE_HIGH>;
                       
};
               
};
       
};

        fragment@3
{
                target
-path="/";
                __overlay__
{

                        onewire3
{
                                status
= "okay";
                                pinctrl
-names = "default";
                                pinctrl
-0 = <&dallas_w1_pins>;

                                compatible
= "w1-gpio";
                                gpios
= <&gpio2 24 GPIO_ACTIVE_HIGH>;
                       
};
               
};
       
};
};

But when I try to compile, I get an error:
> dtc -O dtb -o BB-W1-P8.27_28-00A0.dtbo -b o -@ BB-W1-P8.27_28-00A0.dts
Error: BB-W1-P8.27_28-00A0.dts:16.1-9 syntax error
FATAL ERROR
: Unable to parse input tree

Line 16:
#include <dt-bindings/board/am335x-bbw-bbb-base.h>
Maybe this are not existing on my BBB?

Thank you!

Mark A. Yoder

unread,
Nov 19, 2019, 11:27:25 AM11/19/19
to BeagleBoard
I think dtc doesn't do the preprocess of the include files.  The easiest way might be to follow the instructions here[1] to find the sources on your bone.  Put your new .dts file in with the sources in src/arm and run make.

--Mark

Fohnbit

unread,
Nov 21, 2019, 4:38:16 AM11/21/19
to BeagleBoard
ok, thank you.

with this it will compiled, but after reboot, the BBB don´t boot and all 4 LED´s are on
Reply all
Reply to author
Forward
0 new messages