Hej

It's friday and I have some time to play a bit around. I like to build a 
simple test-adapter using a RPi. I want to connect some of the 40GPIO pins 
with a custom mainboard. For that I like to define the pin behaviour by an 
own dts file.

I created my own dts file (testboard.dts) + a simple patch for 
"arch/arm/boot/dts/Makefile" to add the file.

For adding them into the build-process I am append the kernel build 
(linux-raspberrypi%.bbappend).

Now I have problems bringing them together, because the name of the 
git/source links changes (git -> linux-raspberrypi2-standard-build/source 
). Maybe some one has an idea?

I put the listings of the files below:

########## linux-raspberrypi%.bbappend ##########
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"

SRC_URI += "file://testboard.dts
;subdir=linux-raspberrypi2-standard-build/source/arch/arm/boot/dts \
        file://0001-add-testboard-to-makefile.patch \
        "
PACKAGE_ARCH = "raspberrypi2"

KERNEL_DEVICETREE += "testboard.dtb"
#############################################

########## 0001-add-testboard-to-makefile.patch ##########
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile

@@ -1,4 +1,8 @@
 ifeq ($(CONFIG_OF),y)
+
+# my own dts files
+dtb-$(CONFIG_ARCH_BCM2835) += \
+       testboard.dts
 
 dtb-$(CONFIG_ARCH_BCM2835) += \
        bcm2708-rpi-b.dtb \
#############################################

########## testboard.dts ##########
/dts-v1/;
#include "bcm2836.dtsi"
#include "bcm2835-rpi.dtsi"
#include "bcm283x-rpi-smsc9514.dtsi"
#include "bcm283x-rpi-usb-host.dtsi"

/ {
        compatible = "raspberrypi,2-model-b", "brcm,bcm2836";
        model = "RPi test";

        memory {
                reg = <0 0x40000000>;
        };

        leds {
                act {
                        gpios = <&gpio 47 0>;
                };

                pwr {
                        label = "PWR";
                        gpios = <&gpio 35 0>;
                        default-state = "keep";
                        linux,default-trigger = "default-on";
                };
        };

};

&gpio {
        pinctrl-0 = <&gpioout &alt0 &i2s_alt0>;

        /* I2S interface */
        i2s_alt0: i2s_alt0 {
                brcm,pins = <18 19 20 21>;
                brcm,function = <BCM2835_FSEL_ALT0>;
                status = "disabled";
        };

        cord0: cord0 {
                brcm,pins = <5 6 25>;
                brcm,function = <BCM2835_FSEL_ALT2>;
                status = "okay";
        };

};

&hdmi {
        hpd-gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
        status = "disabled";
};
#############################################

For that I put a question on stackoverflow:
https://stackoverflow.com/questions/44702426/how-to-setup-an-own-device-tree-for-a-raspberrypi-in-yocto

Regards form Germany!

Stefan

------------------------------------------------------------
ESA Elektroschaltanlagen Grimma GmbH
Broner Ring 30
04668 Grimma
Telefon: +49 3437 9211 181
Telefax: +49 3437 9211 26
E-Mail: s.jar...@esa-grimma.de
Internet: www.esa-grimma.de


Geschäftsführer:
Dipl.-Ing. Jörg Gaitzsch
Jörg Reinker

Sitz der Gesellschaft: Grimma
Ust.-ID: DE 141784437
Amtsgericht: Leipzig, HRB 5159
Steuernummer: 238/108/00755


Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte 
Informationen. 
Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich 
erhalten 
haben, informieren Sie bitte sofort den Absender und löschen Sie diese 
Nachricht. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser 
Mail 
ist nicht gestattet.

This e-mail may contain confidential and/or privileged information. If you 
are 
not the intended recipient (or have received this e-mail in error) please 
notify the sender immediately and destroy this e-mail. Any unauthorized 
copying, disclosure or distribution of the material in this e-mail is 
strictly 
forbidden.
-- 
_______________________________________________
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto

Reply via email to