[linux-yocto] Enable SPIDEV for SPI1-problem
Johan Sandgren
jsa at svep.se
Wed Feb 18 04:56:40 PST 2015
Hi
I'm trying to add SPIDEV (on SPI1) in userspace for my board, which I run linux-yocto-3.14 on.
I read somewhere that the HDMI-support is conflicting with using some pins for SPI1, so I have disabled all I can find with menuconfig (graphics LCD drivers and such).
I also modified the dts-file (am335x-boneblack.dts) and compiled it again, and put on my sdcard and it boots successfully.
I also notice that in /proc/device-tree/ .... The hdmi-folder is gone, which is a success, great!
Now, how I move further I'm not sure and I have problems with what I have tried.
Perhaps some of you experienced users can guide me in the right direction to do this right.
Here's the content of my <am335x-boneblack.dts>
/*
* 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 or setup the hardware (I'm still trying to understand what I'm doing...), I tried to put in some more stuff in my device-tree file, to tell linux about this SPI1, how it connects to the hardware. The below clip I found somewhere, so it's not me who created it, but it is for beagle bone black.
/* SPI1 */
/* D1 Output and D0 Input */
/ {
compatible = "ti,beaglebone", "ti,beaglebone-black";
/* identification */
part-number = "spi1mux";
fragment at 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 at 1 {
target = <&spi1>;
__overlay__ {
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&spi1_pins_s0>;
spidev at 1 {
spi-max-frequency = <24000000>;
reg = <0>;
compatible = "linux,spidev";
};
};
};
};
When I add this last part, (and do all steps to use it) 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
_______________
Johan Sandgren (Software Engineer)
Svep Design Center AB
Box 1233, 221 05 Lund, Sweden
E-mail johan.sandgren at svep.se<mailto:johan.sandgren at svep.se>
Website www.svep.se<http://www.svep.se/>
Subscribe to our newsletter<http://eepurl.com/_P72P>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/linux-yocto/attachments/20150218/720a3032/attachment.html>
More information about the linux-yocto
mailing list