Tools: new dts file for SPI on PXF cape

This commit is contained in:
Andrew Tridgell 2014-07-19 13:22:09 +10:00
parent 05f5d91709
commit ad532b89bd
3 changed files with 39 additions and 14 deletions

View File

@ -1,3 +1,9 @@
/*
SPI0 overlay for PXF cape
The strategy we use is to do the chip select in software. This is
necessary as the pix mix doesn't allow for the CS pins the cape has
*/
/dts-v1/;
/plugin/;
@ -5,17 +11,22 @@
compatible = "ti,beaglebone", "ti,beaglebone-black";
/* identification */
part-number = "spi0pinmux";
part-number = "spi0mux";
fragment@0 {
target = <&am33xx_pinmux>;
__overlay__ {
spi0_pins_s0: spi0_pins_s0 {
pinctrl-single,pins = <
0x150 0x30 /* spi0_sclk, INPUT_PULLUP | MODE0 */
0x154 0x10 /* spi0_d0, OUTPUT_PULLUP | MODE0 */
0x158 0x30 /* spi0_d1, INPUT_PULLUP | MODE0 */
0x054 0x07 /* spi0_cs0, OUTPUT_PULLUP | MODE0 */
0x150 0x30 /* spi0_sclk, SPI0_SCLK P9_22 */
0x154 0x10 /* spi0_d0, SPI0_MOSI P9_21 */
0x158 0x30 /* spi0_d1, SPI0_MISO P9_18 */
/* setup a dummy CS for the SPI driver to use, then
setup pin modes for the two real CS lines to
set them pull-up */
0x054 0x07 /* led pin, dummy CS */
0x15C 0x37 /* LSM9DSO_AM CS P9_17 */
0x09C 0x37 /* LSM9DSO_G CS P8_9 */
>;
};
};
@ -24,9 +35,9 @@
fragment@1 {
target = <&spi0>;
__overlay__ {
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&spi0_pins_s0>;

View File

@ -1,3 +1,10 @@
/*
SPI1 overlay for PXF cape
The strategy we use is to do the chip select in software. This is
necessary as the pix mix doesn't allow for the CS pins the cape has
*/
/dts-v1/;
/plugin/;
@ -15,10 +22,17 @@
__overlay__ {
spi1_pins_s0: spi1_pins_s0 {
pinctrl-single,pins = <
0x190 0x33 /* mcasp0_aclkx.spi1_sclk, INPUT_PULLUP | MODE3 */
0x194 0x13 /* mcasp0_fsx.spi1_d0, OUTPUT_PULLUP | MODE3 */
0x198 0x33 /* mcasp0_axr0.spi1_d1, INPUT_PULLUP | MODE3 */
0x058 0x07 /* mcasp0_ahclkr.spi1_cs0, OUTPUT_PULLUP | MODE3 */
0x190 0x33 /* mcasp0_aclkx.spi1_sclk, SPI1_SCLK P9_31 */
0x194 0x13 /* mcasp0_fsx.spi1_d0, SPI1_MOSI P9_29 */
0x198 0x33 /* mcasp0_axr0.spi1_d1, SPI1_MISO P9_30 */
/* setup a dummy CS for the SPI driver to use, then
setup pin modes for the four real CS lines to
set them pull-up */
0x058 0x07 /* dummy CS */
0x164 0x37 /* P9_42 MS5611 CS */
0x19C 0x37 /* P9_28 MPU6000 CS */
0x044 0x37 /* P9_23 MPU9250 CS */
0x030 0x37 /* P8_12 FRAM CS */
>;
};
};

View File

@ -1,13 +1,13 @@
if [ "`echo $1`" = "load" ]; then
echo "Loading Test_Capes..."
cp BB-SPI0-SWP-01-00A0.dtbo /lib/firmware/
cp BB-SPI1-SWP-01-00A0.dtbo /lib/firmware/
cp BB-SPI0-PXF-01-00A0.dtbo /lib/firmware/
cp BB-SPI1-PXF-01-00A0.dtbo /lib/firmware/
cp BB-BONE-PRU-05-00A0.dtbo /lib/firmware/
cp testpru0 /lib/firmware
cp pwmpru1 /lib/firmware
echo BB-BONE-PRU-05 > /sys/devices/bone_capemgr.*/slots
echo BB-SPI0-SWP-01 > /sys/devices/bone_capemgr.*/slots
echo BB-SPI1-SWP-01 > /sys/devices/bone_capemgr.*/slots
echo BB-SPI0-PXF-01 > /sys/devices/bone_capemgr.*/slots
echo BB-SPI1-PXF-01 > /sys/devices/bone_capemgr.*/slots
dmesg | grep "SPI"
dmesg | grep "PRU"
cat /sys/devices/bone_capemgr.*/slots