Thank you Robert, I did not initially realize that the pinmux for those
pins are disabled from within the dts file.
I have been attempting to swap the MISO and MOSI pins on the beaglebone,
unsuccessfully. I have tried by modifying the BB-SPIDEV1-00A0.dts file, and
recompiling to a .dtbo. I then put this dtbo file in /lib/firmware, and
ensured that I have referenced it in the /boot/uEnv.txt file at
uboot_overlay_addr4, as well as disabled the HDMI.
No matter what I've done, P9_29 acts as MISO, and P9_30 acts as MOSI. I
need them to be swapped.
Here is my dts file:
> /dts-v1/;
> /plugin/;
>
> #include <dt-bindings/board/am335x-bbw-bbb-base.h>
> #include <dt-bindings/pinctrl/am33xx.h>
>
> / {
> compatible = "ti,beaglebone", "ti,beaglebone-black",
> "ti,beaglebone-green";
>
> /* identification */
> part-number = "BB-SPIDEV1";
> version = "00A0";
>
> /* state the resources this cape uses */
> exclusive-use =
> /* the pin header uses */
> "P9.31", /* spi1_sclk */
> "P9.29", /* spi1_d0 */
> "P9.30", /* spi1_d1 */
> "P9.28", /* spi1_cs0 */
> // "P9.42", /* spi1_cs1 */
> /* the hardware ip uses */
> "spi1";
>
> /*
> * Helper to show loaded overlays under:
> /proc/device-tree/chosen/overlays/
> */
> fragment@0 {
> target-path="/";
> __overlay__ {
>
> chosen {
> overlays {
> BB-SPIDEV1-00A0 = __TIMESTAMP__;
> };
> };
> };
> };
>
> /*
> * Free up the pins used by the cape from the pinmux helpers.
> */
> fragment@1 {
> target = <&ocp>;
> __overlay__ {
> P9_28_pinmux { status = "disabled"; }; /*
> spi1_cs0 */
> P9_30_pinmux { status = "disabled"; }; /* spi1_d0
> */
> P9_29_pinmux { status = "disabled"; }; /* spi1_d1
> */
> P9_31_pinmux { status = "disabled"; }; /*
> spi1_sclk */
> };
> };
>
> fragment@2 {
> target = <&am33xx_pinmux>;
> __overlay__ {
> /* default state has all gpios released and mode
> set to uart1 */
> bb_spi1_pins: pinmux_bb_spi1_pins {
> pinctrl-single,pins = <
> 0x190 0x33 /*
> mcasp0_aclkx.spi1_sclk, INPUT_PULLUP | MODE3 */
> 0x194 0x33 /*
> mcasp0_fsx.spi1_d0, OUTPUT_PULLUP | MODE3 */
> 0x198 0x13 /*
> mcasp0_axr0.spi1_d1, INPUT_PULLUP | MODE3 */
> 0x19c 0x13 /*
> mcasp0_ahclkr.spi1_cs0, OUTPUT_PULLUP | MODE3 */
> // 0x164 0x12 /*
> eCAP0_in_PWM0_out.spi1_cs1 OUTPUT_PULLUP | MODE2 */
> >;
> };
> };
> };
>
> fragment@3 {
> target = <&spi1>;
> __overlay__ {
> #address-cells = <1>;
> #size-cells = <0>;
>
> status = "okay";
> pinctrl-names = "default";
> pinctrl-0 = <&bb_spi1_pins>;
> ti,pio-mode; /* disable dma when used as an
> overlay, dma gets stuck at 160 bits... */
> ti,pindir-do-out-d1-in = <1>;
>
> channel@0 {
> #address-cells = <1>;
> #size-cells = <0>;
>
> compatible = "spidev";
> symlink = "spi/1.0";
>
> reg = <0>;
> spi-max-frequency = <16000000>;
> spi-cpha;
> };
>
> channel@1 {
> #address-cells = <1>;
> #size-cells = <0>;
>
> compatible = "spidev";
> symlink = "spi/1.1";
>
> reg = <1>;
> spi-max-frequency = <16000000>;
> };
> };
> };
> };
>
And my version info:
debian@beaglebone:/opt/scripts/tools$ ./version.sh
> must be run as root
> debian@beaglebone:/opt/scripts/tools$ sudo ./version.sh
> git:/opt/scripts/:[1aa73453b2c980b75e31e83dab7dd8b6696f10c7]
> eeprom:[A335BNLTEIA04218BBBK0D06]
> model:[TI_AM335x_BeagleBone_Black]
> dogtag:[BeagleBoard.org Debian Image 2018-10-07]
> bootloader:[eMMC-(default)]:[/dev/mmcblk1]:[U-Boot
> 2018.09-00002-g0b54a51eee]:[location: dd MBR]
> kernel:[4.19.59-ti-rt-r25]
> nodejs:[v6.14.4]
> uboot_overlay_options:[enable_uboot_overlays=1]
>
> uboot_overlay_options:[uboot_overlay_addr4=/lib/firmware/BB-SPIDEV1-00A0.dtbo]
> uboot_overlay_options:[disable_uboot_overlay_video=1]
> uboot_overlay_options:[disable_uboot_overlay_audio=1]
>
> uboot_overlay_options:[uboot_overlay_pru=/lib/firmware/AM335X-PRU-RPROC-4-19-TI-00A0.dtbo]
> uboot_overlay_options:[enable_uboot_cape_universal=1]
> pkg check: to individually upgrade run: [sudo apt install --only-upgrade
> <pkg>]
> pkg:[bb-cape-overlays]:[4.4.20190812.0-0rcnee0~stretch+20190812]
> pkg:[bb-wl18xx-firmware]:[1.20180517-0rcnee0~stretch+20180517]
> pkg:[kmod]:[23-2rcnee1~stretch+20171005]
> pkg:[librobotcontrol]:[1.0.3-git20181005.0-0rcnee0~stretch+20181005]
> pkg:[firmware-ti-connectivity]:[20170823-1rcnee1~stretch+20180328]
> groups:[debian : debian adm kmem dialout cdrom floppy audio dip video
> plugdev users systemd-journal i2c bluetooth netdev cloud9ide gpio pwm eqep
> admin spi tisdk weston-launch xenomai]
> cmdline:[console=ttyO0,115200n8 bone_capemgr.uboot_capemgr_enabled=1
> root=/dev/mmcblk1p1 ro rootfstype=ext4 rootwait coherent_pool=1M
> net.ifnames=0 quiet]
> dmesg | grep pinctrl-single
> [ 1.403716] pinctrl-single 44e10800.pinmux: 142 pins, size 568
> dmesg | grep gpio-of-helper
> [ 1.427457] gpio-of-helper ocp:cape-universal: ready
> END
>
And show-pins:
debian@beaglebone:~$ show-pins
> P9.31 / hdmi audio clk 100 fast rx up 3 spi 1 clk
> spi@481a0000 (pinmux_bb_spi1_pins)
> P9.29 / hdmi audio fs 101 fast rx up 3 spi 1 d0 miso
> spi@481a0000 (pinmux_bb_spi1_pins)
> P9.30 102 fast up 3 spi 1 d1 mosi
> spi@481a0000 (pinmux_bb_spi1_pins)
> P9.28 / hdmi audio data 103 fast up 3 spi 1 cs 0
> spi@481a0000 (pinmux_bb_spi1_pins)
>
--
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].
To view this discussion on the web visit
https://groups.google.com/d/msgid/beagleboard/544cb9cf-009d-49fe-852b-e88898fecc25%40googlegroups.com.