Announcement

Collapse
No announcement yet.

4DCAPE-70T GPIO key-map ?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • 4DCAPE-70T GPIO key-map ?

    I'm wondering if it's possible to change the current configuration of the front buttons/key-map? I'd like to change a few of the buttons say from left/right to F11/F12. Is this possible?

    I'm running one of the Ubuntu editions. Everything seems to work, I'm just unsure where the said 'key-map file' is. Can someone point me in the right direction?

    Thanks in advance!

  • #2
    Bump! any suggestions? Weeks out and no response. I even noticed the same results for a similar question asked... Great support on this product, NOT. You'd think asking this question on a forum dedicated to this product, I would find some real answers... But, I guess I seek to find better resolve elsewhere.
    AT LEAST I've discovered one thing....
    I know NOT TO, incorporate this garbage into any future projects. Seems questions, have no simple answers around here. So unprofessional....

    Comment


    • #3
      Hello,

      I can only apologise for the delay in getting back to you. It may have been researched through various BBB forums with no result.

      Your question is not related to a physical hardware problem and is more a software issue.

      We produce the hardware 4DCAPE70T which is fitted to the hardware pin's on the BBB, we have no control over the various OS's that can be installed on the BBB which is why we may not have an answer to software or configuration issues.

      I will continue to try to find an answer to your problem.

      Best regards

      Paul


      Comment


      • #4
        Pual,

        Thank you for the response. Well I certainly don't want to come off as rude. I just figured I'd have at-least got that response the first week... Anyhow, now I know someone does view these forums. I have to ask... IF you guys only design the hardware thats fine. What file currently maps the set of buttons already active? I'd like to have a look and see what's what. I'm sure when you guys designed the carrier board for the BBB to LCD you didn't just willy-nilly the GPIO connections. I'm sure they went to specific pins. From there what maps the up,down,left,right,enter restart,power? Maybe I can just figure it out with that answer... Something maps those keys. Thanks.

        Comment


        • #5
          Hello,

          It's fine, I understand the frustration.

          In the datasheet http://www.4dsystems.com.au/productp...heet_R_1_3.pdf page 8, there is a circuit diagram which shows the hardware pins that the switches are connected to which may be useful.

          I hope this helps

          Best regards

          Paul

          Comment


          • #6
            Pual,

            Thanks again for the prompt response.

            I came across the schematic already..

            Okay, I'll ask this question in another fashion...

            When your 4D systems engineer was designing this on Eagle, Altium, whatever, ect... Where did he/she get their reference for what GPIO ports to hook/route into?? I'm sure it wasn't a guess.

            Each switch pulls to ground..
            So
            sys reset- T1-reset
            GPIO15- T2-left
            GPIO17-T3-right
            GPIO18-T4-up
            GPIO-16T5-down
            GPIO3T6-enter
            PowerBJT-T7-power

            Where did that information come from?? HOW did your engineer know UP,DOWN,LEFT,RIGHT,ENTER??? As far as GPIO's are concerned?

            There is a missing link of information here... I'd like to know how GPIO 15,16,17,3 were decided on? SOOOO again, how did you know say GPIO17 was Right on the keyboard? Where is this reference to GPIO-to key-press?


            Thanks in advance!

            Comment


            • #7
              Hello,

              The GPIO used are based on the reference design from CircuitCo (Beaglebones main CAPE supplier at the time). Ref. LCD4/LCD7

              The GPIO is set in overlays from memory, which are built into the kernel. So its not something we can change. If you do want to change it, I believe you download the kernel source, and make the modifications required and rebuild the kernel to your requirements.
              This is something we cant really help you with though, so you will need to seek assistance from the beaglebone forums I am sorry, as we cant support their software.

              Maybe this post will help you: http://forum.4dsystems.com.au/forum/...oid-kernel-3-8

              Regards
              James

              Comment


            • #8
              I'm just responding to inform folks of the method that I've taken to change the 5-button functions for the LCD cape.

              This is something that should be 'common knowledge' for a company making such a product. How can you sell this LCD and provide ZERO software support?

              ANYHOW...

              The short answer in fixing this problem is nothing more then modifying the u-boot overlay(S) All the answer's I needed came from working threw another product/project. I had to back-burner this for a few months until I personally gained the knowledge to fix the issue. AGAIN, something 4D systems should be far more proficient at doing. Honestly you guys should have at-least 'ONE' person on payroll that can solve and answer these more advance question's with ease. There is really no excuse, for stupid... Time to hire better EE's period. I WILL NOT buy another 4D product because of this simple issue, oh which I had to resolve myself. Simply unacceptable, and beyond unprofessional.

              Lets start here.. HOW TO CHANGE THE 5-BUTTONs..
              https://elinux.org/Beagleboard:Beagl...-Boot_Overlays
              OMG, are you 4D guys learning anything yet? .... Probably not, So I'll continue to spell it out for you..

              I'm working with kernel/image
              Kernel: 4.4.113-ti-r145
              microSD/Standalone: (lxqt-2gb) (All BeagleBone Variants & PocketBeagle) < It's linked about half-way down the page. BUT any newer kernel past my reference SHOULD WORK*** but if it doesn't I'm not helping support it. JUST point you in the right direction. This image woked right out the box with the 7inLCD and all stock buttons/LED functions.
              Check your current BB image/ then kernel

              cat /etc/dogtag
              BeagleBoard.org Debian Image 2018-02-01
              uname -a
              Linux beaglebone 4.4.113-ti-r145 #1 SMP Mon Jan 29 19:44:54 UTC 2018 armv7l GNU/Linux


              -Now starting from the top of that linked BBB u-boot-overlays.

              sudo apt-get update
              sudo apt-get install ti-pru-cgt-installer

              grab kernal headers

              sudo apt-get install linux-headers-`uname -r`

              Then grab build-essentials & overlays

              sudo apt-get install build-essential git-core device-tree-compiler

              Download overlays
              git clone https://github.com/beagleboard/bb.org-overlays/

              Alright you're about halfway there now... You're all set to re-configure these buttons.

              dmesg | grep cape

              This will show an output of
              [ 1.179420] gpio-of-helper ocp:cape-universal: Allocated GPIO id=0
              [ 1.179573] gpio-of-helper ocp:cape-universal: Allocated GPIO id=1
              [ 1.179585] gpio-of-helper ocp:cape-universal: ready
              [ 2.740787] bone_capemgr bone_capemgr: Baseboard: 'A335BNLT,000C,1215BBBK0727'
              [ 2.748147] bone_capemgr bone_capemgr: compatible-baseboard=ti,beaglebone-black - #slots=4
              [ 2.795713] bone_capemgr bone_capemgr: slot #0: '4D 7.0 LCD CAPE- 4DCAPE-70T ,00A3,4D SYSTEMS ,BB-BONE-LCD7-01'
              [ 2.863516] bone_capemgr bone_capemgr: slot #1: No cape found
              [ 2.903710] bone_capemgr bone_capemgr: slot #2: No cape found
              [ 2.958333] bone_capemgr bone_capemgr: slot #3: No cape found
              [ 2.965097] bone_capemgr bone_capemgr: initialized OK.
              [ 3.093699] bone_capemgr bone_capemgr: slot #0: dtbo 'BB-BONE-LCD7-01-00A3.dtbo' loaded; overlay id #0

              Oh.... All the work someone aside the company that makes it should be doing.... OR providing proper documentation for....

              Nevertheless, this shows us, BB-BONE-LCD7-01-00A3.dtbo is the overlay used. NOW we need to modify this overlay.

              cd bb.org-overlays/src/arm

              then modify the BB-BONE-LCD7-01-00A3.dts

              vi BB-BONE-LCD7-01-00A3.dts

              you should have this towards the bottom. I just changed the linux,code <xx>

              gpio_keys {
              compatible = "gpio-keys";
              pinctrl-names = "default";
              pinctrl-0 = <&bb_lcd_keymap_pins>;

              #address-cells = <1>;
              #size-cells = <0>;

              button@1 {
              debounce_interval = <50>;
              linux,code = <88>;
              label = "left";
              gpios = <&gpio1 16 0x1>;
              gpio-key,wakeup;
              autorepeat;
              };
              button@2 {
              debounce_interval = <50>;
              linux,code = <87>;
              label = "right";
              gpios = <&gpio1 17 0x1>;
              gpio-key,wakeup;
              autorepeat;
              };
              button@3 {
              debounce_interval = <50>;
              linux,code = <1>;
              label = "up";
              gpios = <&gpio1 19 0x1>;
              gpio-key,wakeup;
              autorepeat;
              };
              button@4 {
              debounce_interval = <50>;
              linux,code = <15>;
              label = "down";
              gpios = <&gpio3 16 0x1>;
              gpio-key,wakeup;
              autorepeat;
              };
              button@5 {
              debounce_interval = <50>;
              linux,code = <56>;
              label = "enter";
              gpios = <&gpio0 3 0x1>;
              gpio-key,wakeup;



              I've linked to a quick reference for linux key code table
              http://www.comptechdoc.org/os/linux/...lkeycodes.html

              Change the linux,code<xx> to the values you need. I left mine as an example. F12,F11,ESC, TAB, &ALT

              Save the file as-is already named.

              Okay, time to build your new .dtbo file and install it

              cd ~//bb.org-overlays/
              make

              ./dtc-overlay.sh
              then
              ./install.sh

              lastly a quick mod to the boot file uEnv.txt
              cd /boot
              sudo vi uEnv.txt

              my file as MODIFIED.


              #Docs: http://elinux.org/Beagleboard:U-boot...ing_layout_2.0

              uname_r=4.4.113-ti-r145
              #uuid=
              #dtb=


              ###U-Boot Overlays###
              ###Documentation: http://elinux.org/Beagleboard:Beagle...-Boot_Overlays
              ###Master Enable
              #enable_uboot_overlays=1
              ###
              ###Overide capes with eeprom
              uboot_overlay_addr0=/lib/firmware/BB-BONE-LCD7-01-00A3.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/BB-BONE-LCD7-01-00A3.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... (60000 = 384KB)
              #uboot_fdt_buffer=0x60000
              ###U-Boot Overlays###

              cmdline=coherent_pool=1M net.ifnames=0 cape_universal=disable

              #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

              ##enable Generic eMMC Flasher:
              ##make sure, these tools are installed: dosfstools rsync
              #cmdline=init=/opt/scripts/tools/eMMC/init-eMMC-flasher-v3.sh



              SAVE the file and reboot... You should have successfully re-programmed the 5 buttons on the front of the screen. WAS this this the correct way of doing it???? I'm not even close to sure. BUT I really don't care. Everything works. The product will now ship, this is OUT OF MY LIFE! and same with 4D-systems. goodness.

              GOOD LUCK EVERYONE WITH YOUR HACKING!! :D

              OH and PS your forum time-out on re-login sucks! We lost the good first write-up. and now I don't care.
              Last edited by Tammy-turUp; 12th February 2018, 02:08 PM.

              Comment

              Working...
              X