Adam FordAdvanced Member Posts:793
24 Aug 2017 03:20 PM |
|
An updated User Guide with instructions and patches to build Linux 4.4.76 for the Torpedo + Wireless have been posted to:
http://support.logicpd.co...d=0&EntryId=3053
The coresponding Release Notes are located: http://support.logicpd.co...d=0&EntryId=3128
Please note this is a beta, and not all SOM or Baseboard features may be available.
Please note, you should be logged into the system before the links become available. A virtual Machine image will be uploaded shortly.
|
|
|
|
William DeningerNew Member Posts:22
14 Sep 2017 04:30 PM |
|
Hi Adam,
I've noticed my 4.4.76 beta images is missing all the spi devices (/dev/spidevX.X). Did I somehow misconfigure my build, or is SPI porting still in progress?
Also, I can't locate any reference to gps or gps drivers within the kernel or target packages. Is this also under development?
-William
|
|
|
|
Adam FordAdvanced Member Posts:793
15 Sep 2017 07:08 AM |
|
William, Texas Instruments did not open source their GPS code, and the company that we hired to do the GPS code for our original BSP went out of business, and we do not have their source do to licencing restrictions, so the newer kernels will not have GPS compatibility. This beta was generated by pulling the kernel directly from kernel.org and patching a few things, so if the mainline Linux kernel does not have it, there is a good change this won't either. Having said that, we have sent some of our customers to a third party who has the licensing agreement with TI to write the GPS drivers, but I do not know what they charge and if they have modern kernel drivers, but let me know if you want me to send you their contact info. To answer your other question about SPIdev, you can enable it manually. It's not enabled by default. Full disclosure, this hasn't been well tested or reviewed by other Logic PD people, but the following worked for me: Decide which SPI bus you want to use the spidev driver. You'll then need to modify the device tree to tell spidev which bus it may reside. This file is located at (buildroot)/output/build/linux-4.4.76/arch/arm/boot/dts/logicpd-torpedo-37xx-devkit.dts Insert the following into the corresponding SPI container: spidev@0x00 { compatible = "spidev"; spi-max-frequency = <1200000>; reg = <0>; }; Notice that in the above example, both spidev@0x00 and reg=0. This is because the 0x00 represents CS0, and reg must match. If you want to use CS1, change both of those values. If you have a driver that uses the same chip select, you'll need to remove the binding from the tree as two different drivers may not share the same chip select on a given SPI bus. From the buildroot directory: Type: make linux-menuconfig Select: Device Drivers -> SPI Support -> User mode SPI device driver support Exit and Save Type: make linux-rebuild (This will rebuild the kernel with the driver enabled. Don't worry, it won't take that long) Now we'll install the accompanying userspace software: From the buildroot directory, type make menuconfig Select Target Packages->Debugging, profiling and benchmark->spidev_test Device Drivers -> SPI Support -> User mode SPI device driver support Now build the missing package: (still in the buildroot directory) make Now re-install Linux per the user Guide info Once you're booted, you'll need to modprobe the spidev driver. modprobe spidev Now a tool called spidev_test should be available.
|
|
|
|
William DeningerNew Member Posts:22
01 Nov 2017 06:37 PM |
|
I performed the following modifications to to the logicpd-torpedo-37xx-devkit.dts file and rebuilt the kernel. The devices /dev/spidev1.0, /dev/spidev1.1, /dev/spidev1.2 and /dev/spidev1.3 all became visible. However, spidev_test testing on the LogicPD baseboard (as well as our target hardware) indicate only CS0 as functioning. CS1, CS2 and CS3 states do not seem to change when directing SPI reads to /dev/spidev1.1 through spidev1.3. I suspect I did not correctly modify the device tree. Any suggestions? Device tree modified from: &mcspi1 { at25@0 { compatible = "atmel,at25"; reg = <0>; spi-max-frequency = <5000000>; spi-cpha; spi-cpol; pagesize = <64>; size = <32768>; address-width = <16>; }; }; to &mcspi1 { spidev@0x00 { compatible = "spidev"; spi-max-frequency = <1200000>; reg = <0>; }; spidev@0x01 { compatible = "spidev"; spi-max-frequency = <1200000>; reg = <1>; }; spidev@0x02 { compatible = "spidev"; spi-max-frequency = <1200000>; reg = <2>; }; spidev@0x03 { compatible = "spidev"; spi-max-frequency = <1200000>; reg = <3>; }; }; -William
|
|
|
|
Adam FordAdvanced Member Posts:793
02 Nov 2017 07:54 AM |
|
On the surface, you're doing what I would do. Do you have the chip select pins properly pin-muxed for CS2 and CS3? If the mux is wrong the CS pins won't toggle. adam
|
|
|
|
Adam FordAdvanced Member Posts:793
02 Nov 2017 07:58 AM |
|
The pin muxing is happeninig in the logicpd-torpedo-som.dtsi file. In that file, look for mcspi1_pins, and add the additional pin muxing for the other chip selects.
|
|
|
|
William DeningerNew Member Posts:22
02 Nov 2017 01:43 PM |
|
Excellent!! And Thank You Adam!! It appears the problem was the missing entries in the logicpd-torpedo-som.dtsi file. After recompiling the kernel, spidev1.0- through spidev1.3 are functioning. In summary, modifications to enable CS1-CS3 for spidev1.X must be made to logicpd-torpedo-som.dtsi file (located in ./output/build/linux-4.4.76/arch/arm/boot/dts): The mcspi1_pins entry was modified from: mcspi1_pins: pinmux_mcspi1_pins { pinctrl-single,pins = < OMAP3_CORE1_IOPAD(0x21c8, PIN_INPUT | MUX_MODE0) /* mcspi1_clk.mcspi1_clk */ OMAP3_CORE1_IOPAD(0x21ca, PIN_OUTPUT | MUX_MODE0) /* mcspi1_simo.mcspi1_simo */ OMAP3_CORE1_IOPAD(0x21cc, PIN_INPUT_PULLUP | MUX_MODE0) /* mcspi1_somi.mcspi1_somi */ OMAP3_CORE1_IOPAD(0x21ce, PIN_OUTPUT | MUX_MODE0) /* mcspi1_cs0.mcspi1_cs0 */ >; to: mcspi1_pins: pinmux_mcspi1_pins { pinctrl-single,pins = < OMAP3_CORE1_IOPAD(0x21c8, PIN_INPUT | MUX_MODE0) /* mcspi1_clk.mcspi1_clk */ OMAP3_CORE1_IOPAD(0x21ca, PIN_OUTPUT | MUX_MODE0) /* mcspi1_simo.mcspi1_simo */ OMAP3_CORE1_IOPAD(0x21cc, PIN_INPUT_PULLUP | MUX_MODE0) /* mcspi1_somi.mcspi1_somi */ OMAP3_CORE1_IOPAD(0x21ce, PIN_OUTPUT | MUX_MODE0) /* mcspi1_cs0.mcspi1_cs0 */ OMAP3_CORE1_IOPAD(0x21d0, PIN_OUTPUT | MUX_MODE0) /* mcspi1_cs1.mcspi1_cs1 */ OMAP3_CORE1_IOPAD(0x21d2, PIN_OUTPUT | MUX_MODE0) /* mcspi1_cs2.mcspi1_cs2 */ OMAP3_CORE1_IOPAD(0x21d4, PIN_OUTPUT | MUX_MODE0) /* mcspi1_cs3.mcspi1_cs3 */ >; }; Kernel rebuild was performed using: make linux-rebuild Thank you again! -William
|
|
|
|