Hi Everyone, I've been working with a Beaglebone Black recently and its eQEP peripheral; running into an issue where it works great when I manually configure it (with the config-pin command), but not when I set the pins up with a .dtbo...
First, here's my system info: [root@beaglebone]> uname -a Linux beaglebone 4.4.91-ti-r133 #1 SMP Tue Oct 10 05:18:08 UTC 2017 armv7l GNU/Linux [root@beaglebone]> cat /boot/uEnv.txt #Docs: http://elinux.org/Beagleboard:U-boot_partitioning_layout_2.0 uname_r=4.4.91-ti-r133 #uuid= dtb= #dtb=am335x-boneblack-overlay.dtb ###U-Boot Overlays### ###Documentation: http://elinux.org/Beagleboard:BeagleBoneBlack_Debian#U-Boot_Overlays ###Master Enable enable_uboot_overlays=1 ### ###Overide capes with eeprom uboot_overlay_addr0=/lib/firmware/bone_eqep2b-00A0.dtbo #uboot_overlay_addr1=/lib/firmware/<file1>.dtbo #uboot_overlay_addr2=/lib/firmware/<file2>.dtbo #uboot_overlay_addr3=/lib/firmware/<file3>.dtbo ### ###Additional custom capes #uboot_overlay_addr4=/lib/firmware/bone_eqep0-00A0.dtbo #uboot_overlay_addr5=/lib/firmware/BB-PWM1-00A0.dtbo #uboot_overlay_addr6=/lib/firmware/<file6>.dtbo #uboot_overlay_addr7=/lib/firmware/<file7>.dtbo ### ###Custom Cape #dtb_overlay=/lib/firmware/<file8>.dtbo ### ###Disable auto loading of virtual capes (emmc/video/wireless/adc) disable_uboot_overlay_emmc=1 disable_uboot_overlay_video=1 disable_uboot_overlay_audio=1 disable_uboot_overlay_wireless=1 #disable_uboot_overlay_adc=1 ### ###PRUSS OPTIONS ###pru_rproc (4.4.x-ti kernel) uboot_overlay_pru=/lib/firmware/AM335X-PRU-RPROC-4-4-TI-00A0.dtbo ###pru_uio (4.4.x-ti & mainline/bone kernel) #uboot_overlay_pru=/lib/firmware/AM335X-PRU-UIO-00A0.dtbo ### ###Cape Universal Enable enable_uboot_cape_universal=1 ### ###Debug: disable uboot autoload of Cape #disable_uboot_overlay_addr0=1 #disable_uboot_overlay_addr1=1 #disable_uboot_overlay_addr2=1 #disable_uboot_overlay_addr3=1 ### ###U-Boot fdt tweaks... #uboot_fdt_buffer=0x60000 ###U-Boot Overlays### #cmdline=coherent_pool=1M net.ifnames=0 quiet cape_universal=enable cmdline=coherent_pool=1M net.ifnames=0 quiet #In the event of edid real failures, uncomment this next line: #cmdline=coherent_pool=1M net.ifnames=0 quiet video=HDMI-A-1:1024x768@60e ##Example v3.8.x #cape_disable=capemgr.disable_partno= #cape_enable=capemgr.enable_partno= ##Example v4.1.x #cape_disable=bone_capemgr.disable_partno= #cape_enable=bone_capemgr.enable_partno= ##enable Generic eMMC Flasher: ##make sure, these tools are installed: dosfstools rsync #cmdline=init=/opt/scripts/tools/eMMC/init-eMMC-flasher-v3.sh With this configuration, after booting: [root@beaglebone]> find /sys/devices | grep eqep | grep position /sys/devices/platform/ocp/48304000.epwmss/48304180.eqep/position [root@beaglebone]> cat /sys/kernel/debug/pinctrl/44e10800.pinmux/pins registered pins: 142 pin 0 (44e10800.0) 00000031 pinctrl-single pin 1 (44e10804.0) 00000031 pinctrl-single pin 2 (44e10808.0) 00000031 pinctrl-single pin 3 (44e1080c.0) 00000031 pinctrl-single pin 4 (44e10810.0) 00000027 pinctrl-single pin 5 (44e10814.0) 00000027 pinctrl-single pin 6 (44e10818.0) 00000027 pinctrl-single pin 7 (44e1081c.0) 00000027 pinctrl-single pin 8 (44e10820.0) 00000027 pinctrl-single pin 9 (44e10824.0) 00000027 pinctrl-single pin 10 (44e10828.0) 00000027 pinctrl-single pin 11 (44e1082c.0) 00000027 pinctrl-single pin 12 (44e10830.0) 0000002c pinctrl-single pin 13 (44e10834.0) 0000002c pinctrl-single pin 14 (44e10838.0) 0000002c pinctrl-single pin 15 (44e1083c.0) 0000002c pinctrl-single pin 16 (44e10840.0) 00000027 pinctrl-single pin 17 (44e10844.0) 00000027 pinctrl-single . . . -->All of this looks good, and I have a good encoder signal going to pins p8.11 & p8.12 (pins 13 & 14 above) on the BBB. However, my counts keep hovering within +/-10 of 0, ie, they're not incrementing. My mode is set to Absolute... [root@beaglebone]> cat mode 0 and my period is 1sec [root@beaglebone]> cat period 1000000000 here are the contents of the eqep device folder: /sys/devices/platform/ocp/48304000.epwmss/48304180.eqep/ [root@beaglebone]> ls -lha total 0 drwxr-xr-x 3 root root 0 Jan 18 22:39 . drwxr-xr-x 4 root root 0 Jan 18 22:39 .. lrwxrwxrwx 1 root root 0 Jan 18 22:39 driver -> ../../../../../bus/platform/drivers/eqep -rw-r--r-- 1 root root 4.0K Jan 18 22:39 driver_override -rw-r--r-- 1 root root 4.0K Jan 18 22:39 enabled -r--r--r-- 1 root root 4.0K Jan 18 22:39 modalias -rw-r--r-- 1 root root 4.0K Jan 18 22:39 mode lrwxrwxrwx 1 root root 0 Jan 18 22:39 of_node -> ../../../../../firmware/devicetree/base/ocp/epwmss@48304000/eqep@0x48304180 -rw-r--r-- 1 root root 4.0K Jan 18 22:39 period -rw-r--r-- 1 root root 4.0K Jan 18 22:39 position drwxr-xr-x 2 root root 0 Jan 18 22:39 power lrwxrwxrwx 1 root root 0 Jan 18 22:39 subsystem -> ../../../../../bus/platform -rw-r--r-- 1 root root 4.0K Jan 18 22:39 uevent What's weird is when I comment out loading the eQEP 2b dtbo in the uEnv.txt file and boot, I can get my count working properly just by manually configuring the relevant pins, ie: [root@beaglebone]> config-pin p8.11 qep [root@beaglebone]> config-pin p8.12 qep [root@beaglebone]> cat /sys/kernel/debug/pinctrl/44e10800.pinmux/pins registered pins: 142 pin 0 (44e10800.0) 00000027 pinctrl-single pin 1 (44e10804.0) 00000027 pinctrl-single pin 2 (44e10808.0) 00000027 pinctrl-single pin 3 (44e1080c.0) 00000027 pinctrl-single pin 4 (44e10810.0) 00000027 pinctrl-single pin 5 (44e10814.0) 00000027 pinctrl-single pin 6 (44e10818.0) 00000027 pinctrl-single pin 7 (44e1081c.0) 00000027 pinctrl-single pin 8 (44e10820.0) 00000027 pinctrl-single pin 9 (44e10824.0) 00000027 pinctrl-single pin 10 (44e10828.0) 00000027 pinctrl-single pin 11 (44e1082c.0) 00000027 pinctrl-single pin 12 (44e10830.0) 00000024 pinctrl-single pin 13 (44e10834.0) 00000024 pinctrl-single pin 14 (44e10838.0) 00000027 pinctrl-single pin 15 (44e1083c.0) 00000027 pinctrl-single pin 16 (44e10840.0) 00000027 pinctrl-single . . . (I do notice the difference in bit 3 for pins 12 & 13, referring to pull ups, which shouldn't have an affect). IMMEDIATELY, the position starts incrementing correctly. Is my uEnv.txt file missing something? I thought I would only need to load eQEP 2b's dtbo and it would work... Any help or advice you can give would be greatly appreciated. Thanks in advance, Leo On Monday, May 1, 2017 at 8:07:34 AM UTC-7, RobertCNelson wrote: > > Hey Everyone, > > It's that time, U-Boot Overlays are now enabled by Default. > > With no /boot/uEnv.txt changes you can swap in a 4/7 lcd panel > (*supported) and the image will seamlessly use the lcd overlay. > > http://elinux.org/Beagleboard:BeagleBoneBlack_Debian#2017-04-30 > > Remember the biggest gotcha is U-Boot, we now rely on U-Boot being the > most upto date, specially for new LCD's or anything that needs > eMMC/HDMI/WL18xx disabled to be utilzed. > > Bootloader: > > debian@beaglebone:~$ sudo /opt/scripts/tools/version.sh | grep bootloader > bootloader:[microSD-(push-button)]:[/dev/mmcblk0]:[U-Boot > 2017.05-rc2-00002-g1516ae] > > If you have something eariler then 2017.05-rc2, please upgrade your > version: > > http://elinux.org/Beagleboard:BeagleBoneBlack_Debian#U-Boot_Overlays > > /boot/uEnv.txt walkthru > > ###U-Boot Overlays### > ###Documentation: > http://elinux.org/Beagleboard:BeagleBoneBlack_Debian#U-Boot_Overlays > ###Master Enable > enable_uboot_overlays=1 > ### > ###Overide capes with eeprom > #uboot_overlay_addr0=/lib/firmware/<file0>.dtbo > #uboot_overlay_addr1=/lib/firmware/<file1>.dtbo > #uboot_overlay_addr2=/lib/firmware/<file2>.dtbo > #uboot_overlay_addr3=/lib/firmware/<file3>.dtbo > ### > ###Additional custom capes > #uboot_overlay_addr4=/lib/firmware/<file4>.dtbo > #uboot_overlay_addr5=/lib/firmware/<file5>.dtbo > #uboot_overlay_addr6=/lib/firmware/<file6>.dtbo > #uboot_overlay_addr7=/lib/firmware/<file7>.dtbo > ### > ###Custom Cape > #dtb_overlay=/lib/firmware/<file8>.dtbo > ### > ###Disable auto loading of virtual capes (emmc/video/wireless/adc) > #disable_uboot_overlay_emmc=1 > #disable_uboot_overlay_video=1 > #disable_uboot_overlay_audio=1 > #disable_uboot_overlay_wireless=1 > #disable_uboot_overlay_adc=1 > ### > ###PRUSS OPTIONS > ###pru_rproc (4.4.x-ti kernel) > uboot_overlay_pru=/lib/firmware/AM335X-PRU-RPROC-4-4-TI-00A0.dtbo > ###pru_uio (mainline kernel) > #uboot_overlay_pru=/lib/firmware/AM335X-PRU-UIO-00A0.dtbo > ### > ###Cape Universal Enable > enable_uboot_cape_universal=1 > ### > ###Debug: disable uboot autoload of Cape > #disable_uboot_overlay_addr0=1 > #disable_uboot_overlay_addr1=1 > #disable_uboot_overlay_addr2=1 > #disable_uboot_overlay_addr3=1 > ### > ###U-Boot fdt tweaks... > #uboot_fdt_buffer=0x60000 > ###U-Boot Overlays### > > Cape Detection: (using BeagleBone Serial Cape Rev A1 for examples) > > BeagleBone: cape eeprom: i2c_probe: 0x54: > BeagleBone: cape eeprom: i2c_probe: 0x55: > /lib/firmware/BB-BONE-SERL-03-00A1.dtbo [0xaedaf] > BeagleBone: cape eeprom: i2c_probe: 0x56: > BeagleBone: cape eeprom: i2c_probe: 0x57: > > uboot_overlays: loading /lib/firmware/BB-BONE-SERL-03-00A1.dtbo ... > 887 bytes read in 102 ms (7.8 KiB/s) > > Customization: > > "disable" 0x55 Cape: > > disable_uboot_overlay_addr1=1 > > BeagleBone: cape eeprom: i2c_probe: 0x54: > BeagleBone: cape eeprom: i2c_probe: 0x55: > /lib/firmware/BB-BONE-SERL-03-00A1.dtbo [0xaedaf] > BeagleBone: cape eeprom: i2c_probe: 0x56: > BeagleBone: cape eeprom: i2c_probe: 0x57: > > uboot_overlays: uboot loading of > [/lib/firmware/BB-BONE-SERL-03-00A1.dtbo] disabled by /boot/uEnv.txt > [disable_uboot_overlay_addr1=1]... > > "override" 0x55 Cape: > > uboot_overlay_addr1=/lib/firmware/BB-UART2-00A0.dtbo > > BeagleBone: cape eeprom: i2c_probe: 0x54: > BeagleBone: cape eeprom: i2c_probe: 0x55: > /lib/firmware/BB-BONE-SERL-03-00A1.dtbo [0xaedaf] > BeagleBone: cape eeprom: i2c_probe: 0x56: > BeagleBone: cape eeprom: i2c_probe: 0x57: > > uboot_overlays: loading /lib/firmware/BB-UART2-00A0.dtbo ... > 883 bytes read in 223 ms (2.9 KiB/s) > > Cape Universal (config-pin), these boards are currently supported fully: > > BeagleBone Black > BeagleBone Black Wireless > BeagleBone Green > BeagleBone Green Wireless > Element14 BeagleBone Black Industrial > MENTOREL BeagleBone uSomIQ > > You can invidually disable eMMC/HDMI-Video/HDMI-Audio/WL18xx/ADC > > When, HDMI-AUDIO is disabled, the HDMI-VIDEO automaticly gets disabled too > > #disable_uboot_overlay_emmc=1 > #disable_uboot_overlay_video=1 > #disable_uboot_overlay_audio=1 > #disable_uboot_overlay_wireless=1 > #disable_uboot_overlay_adc=1 > > PRUSS Options: (TI RPROC 4.4.x-ti enabled by default) > > uboot_overlay_pru=/lib/firmware/AM335X-PRU-RPROC-4-4-TI-00A0.dtbo > > To switch to "PRU-UIO", enable: > > uboot_overlay_pru=/lib/firmware/AM335X-PRU-UIO-00A0.dtbo > > and remove: > > sudo rm /etc/modprobe.d/pruss-blacklist.conf > > Regards, > > -- > Robert Nelson > https://rcn-ee.com/ > -- 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 beagleboard+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/98174113-c1dd-468b-a931-7c431001f2ae%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.