Hi people,

I have compiled linux-yocto-3.14 (need it for specific reasons), and I need 
to enable SPIDEV (on SPI1) in userspace to be able to access it as a device 
from C.
So far, I've disabled the hdmi-device in the device-tree, since I read it 
uses some pins that SPI1 needs.

This device-tree worked fine (Compiled it with: make ARCH=arm 
CROSS_COMPILE=/usr/bin/arm-linux-gnueabi- dtbs) and put in the boot folder 
on my sdcard properly (correct filename etc).

<am335x-boneblack.dts file content>

/*
 * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/
 *
 * 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.
 */
/dts-v1/;

#include "am33xx.dtsi"
#include "am335x-bone-common.dtsi"

&ldo3_reg {
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-always-on;
};

&mmc1 {
vmmc-supply = <&vmmcsd_fixed>;
};

&mmc2 {
vmmc-supply = <&vmmcsd_fixed>;
pinctrl-names = "default";
pinctrl-0 = <&emmc_pins>;
bus-width = <8>;
status = "okay";
ti,vcc-aux-disable-is-sleep;
};

&am33xx_pinmux {
};

&lcdc {
status = "okay";
};





Now to enable SPIDEV, I tried to put in some more stuff in my device-tree 
file


/* SPI1 */
/* D1 Output and D0 Input */

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

    /* identification */
    part-number = "spi1mux";

    fragment@0 {
        target = <&am33xx_pinmux>;
        __overlay__ {
            spi1_pins_s0: spi1_pins_s0 {
                        pinctrl-single,pins = <
                                0x190 0x33      /* mcasp0_aclkx.spi1_sclk, 
INPUT_PULLUP | MODE3 */
                                0x194 0x33      /* mcasp0_fsx.spi1_d0, 
INPUT_PULLUP | MODE3 */
                                0x198 0x13      /* mcasp0_axr0.spi1_d1, 
OUTPUT_PULLUP | MODE3 */
                                0x19c 0x13      /* mcasp0_ahclkr.spi1_cs0, 
OUTPUT_PULLUP | MODE3 */
                >;
            };
        };
    };

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

             #address-cells = <1>;
             #size-cells = <0>;
             status = "okay";
             pinctrl-names = "default";
             pinctrl-0 = <&spi1_pins_s0>;

             spidev@1 {
                 spi-max-frequency = <24000000>;
                 reg = <0>;
                 compatible = "linux,spidev";
            };
        };
    };
};


When I add this last part, it just doesn't boot after "Starting kernel ..." 
so something is wrong.

I have not been able to find out the error yet, so I'm asking for help.
I have a guess, perhaps I'm not using the correct syntax or adding it the 
correct way, since the addition is an "overlay" and I'm not really doing an 
overlay, just adding more to the original device-tree that gets compiled to 
the binary version.

Any help is appreciated.

/Johan

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to