Re: [Machinekit] Re: config-pin setting for Mode 0 (gpmc) question
Hi Charles, OK, I think I got it (notes below so I have a place to refer to in the future - and if you have any comments) I copied cape-universal-00A0.dts to a file called cape-univ-gpmc.dts in the bb.org-overlays/src/arm directory. I then modified it to have gpmc pin configs I wanted Then I ran ./install.sh After that I modified the config-pin file in /usr/local/bin to allow the new gpmc variable with the various new pin function (AD0, AD2, CEn, WEn...) Then I modified the /boot/uEnv.txt to use uboot_overlay_addr4=/lib/firmware/cape-univ-gpmc-00A0.dtbo Followed by a reboot. After that I was able to do a *config-pin P8.03 gpmc* without getting the error from before. I won't know if it *really* works until I test it with my hm2-servo stuff and if it doesn't,...* I'll be back*. The biggest issue I was having was trying to wade through so many different ways to update an overlay that can be found with a google search (most of which are now out of date). After I found this page: https://github.com/beagleboard/bb.org-overlays it became clearer. After I make sure it is all working I'll try to get a new copy of config-pin and cape-univ-gpmc.dts up to the machinekit code base. Thanks, Jeff On Friday, April 19, 2019 at 7:24:11 PM UTC-7, Jeff Pollard wrote: > > > Hi, > > One of the reasons I'm trying to update is the uSD card I was using > stopped working(booting). I can access some of the files, but I don't > remember exactly the process I used to enable the pins (it was 4 to 5 years > ago!). So, I'm not actually "running" it any more. > > In any case I think what I did was modify your old config-pin to a > different version called config-pins: > > http://xylotex.com/config-pins.txt > > and the overlay file here: > > http://xylotex.com/cape-univ-gpmc-00A0.dts.txt > > I would program the fpga with a general I/O bit-bang and then had a > simple batch file that would call config-pins for each gpmc pin I wanted to > switch modes on: > > *sudo ./config-pins P8.14 gpmc* > > I just did similar for all 20 pins I wanted to use for gpmc, and I was > able to use the bus. I could then call the linuxcnc script (before the > scripts was changed to machinekit), and the hm2-servo code would be able to > access the fpga through the gpmc bus. > > Now when I try the same thing I end up with errors, which I'm now trying > to solve. > > Thanks, > > Jeff > > On Friday, April 19, 2019 at 6:32:57 PM UTC-7, Charles Steinkuehler wrote: >> >> OK, so for that I would definitely recommend crafting your own overlay >> that enables the GPMC pins you need. Again, most "casual" users will >> not be able to do anything with GPMC, which is why it isn't part of >> the "universal" cape to begin with. >> >> It shouldn't be too hard to migrate your existing device tree (or >> overlay) to work on modern kernels. Do you have a link to the source >> for what you're currently running? >> >> On 4/19/2019 7:40 PM, Jeff Pollard wrote: >> > >> > Hi, >> > >> > Not taken the wrong way. >> > I've already used the gpmc to communicate with my fpga board. >> > I have a servo system based on hostmot2 and a custom driver to go >> between >> > hm2-servo and the gpmc which then 'talks' to the fpga. >> > This all works fine >> > This way way back in 2015 though. >> > The method of accessing the gpmc connectivity has changed a lot since >> I >> > last tried using the BBB with the old version of machinekit I was >> using. >> > Now I'm trying to update what I have to newer machinekit software >> (with >> > all the new overlays, etc.) and can no longer program the pins to allow >> me >> > to access the gpmc. >> > >> > Jeff >> > >> > >> > On Friday, April 19, 2019 at 4:51:17 PM UTC-7, Charles Steinkuehler >> wrote: >> >> >> >> On 4/19/2019 6:39 PM, Jeff Pollard wrote: >> >>> >> >>> Hi, >> >>> >> >>> Thanks Robert and Charles. >> >>> I've taken this: >> >>> >> >> >> https://github.com/RobertCNelson/bb.org-overlays/blob/master/src/arm/cape-universal-00A0.dts#L1551-L1562 >> >> >>> >> >>> and added what would be necessary to get the gmpc pins usable >> >> following >> >>> the convention of the rest of the file. >> >>> Hopefully this something I can test here... or is this something >> that >> >> has >> >>> to be in the "kernel" and out of my reach? >> >>> If I can test here, can you tell me how to compile and deploy the >> new >> >> dts >> >>> file so I can test it out? >> >> >> >> Don't take this the wrong way, but if you have to ask about how to >> >> compile a device tree (or overlay), you probably shouldn't be trying >> >> to use the GPMC interface. >> >> >> >> Let's take a step back...exactly what are you trying to do? >> >> >> >> -- >> >> Charles Steinkuehler >> >> cha...@steinkuehler.net >> >> >> > >> >> >> -- >> Charles Steinkuehler >> cha...@steinkuehler.net >> > -- website:
Re: [Machinekit] Re: config-pin setting for Mode 0 (gpmc) question
Hi, One of the reasons I'm trying to update is the uSD card I was using stopped working(booting). I can access some of the files, but I don't remember exactly the process I used to enable the pins (it was 4 to 5 years ago!). So, I'm not actually "running" it any more. In any case I think what I did was modify your old config-pin to a different version called config-pins: http://xylotex.com/config-pins.txt and the overlay file here: http://xylotex.com/cape-univ-gpmc-00A0.dts.txt I would program the fpga with a general I/O bit-bang and then had a simple batch file that would call config-pins for each gpmc pin I wanted to switch modes on: *sudo ./config-pins P8.14 gpmc* I just did similar for all 20 pins I wanted to use for gpmc, and I was able to use the bus. I could then call the linuxcnc script (before the scripts was changed to machinekit), and the hm2-servo code would be able to access the fpga through the gpmc bus. Now when I try the same thing I end up with errors, which I'm now trying to solve. Thanks, Jeff On Friday, April 19, 2019 at 6:32:57 PM UTC-7, Charles Steinkuehler wrote: > > OK, so for that I would definitely recommend crafting your own overlay > that enables the GPMC pins you need. Again, most "casual" users will > not be able to do anything with GPMC, which is why it isn't part of > the "universal" cape to begin with. > > It shouldn't be too hard to migrate your existing device tree (or > overlay) to work on modern kernels. Do you have a link to the source > for what you're currently running? > > On 4/19/2019 7:40 PM, Jeff Pollard wrote: > > > > Hi, > > > > Not taken the wrong way. > > I've already used the gpmc to communicate with my fpga board. > > I have a servo system based on hostmot2 and a custom driver to go > between > > hm2-servo and the gpmc which then 'talks' to the fpga. > > This all works fine > > This way way back in 2015 though. > > The method of accessing the gpmc connectivity has changed a lot since > I > > last tried using the BBB with the old version of machinekit I was using. > > Now I'm trying to update what I have to newer machinekit software > (with > > all the new overlays, etc.) and can no longer program the pins to allow > me > > to access the gpmc. > > > > Jeff > > > > > > On Friday, April 19, 2019 at 4:51:17 PM UTC-7, Charles Steinkuehler > wrote: > >> > >> On 4/19/2019 6:39 PM, Jeff Pollard wrote: > >>> > >>> Hi, > >>> > >>> Thanks Robert and Charles. > >>> I've taken this: > >>> > >> > https://github.com/RobertCNelson/bb.org-overlays/blob/master/src/arm/cape-universal-00A0.dts#L1551-L1562 > > >>> > >>> and added what would be necessary to get the gmpc pins usable > >> following > >>> the convention of the rest of the file. > >>> Hopefully this something I can test here... or is this something > that > >> has > >>> to be in the "kernel" and out of my reach? > >>> If I can test here, can you tell me how to compile and deploy the > new > >> dts > >>> file so I can test it out? > >> > >> Don't take this the wrong way, but if you have to ask about how to > >> compile a device tree (or overlay), you probably shouldn't be trying > >> to use the GPMC interface. > >> > >> Let's take a step back...exactly what are you trying to do? > >> > >> -- > >> Charles Steinkuehler > >> cha...@steinkuehler.net > >> > > > > > -- > Charles Steinkuehler > cha...@steinkuehler.net > -- website: http://www.machinekit.io blog: http://blog.machinekit.io github: https://github.com/machinekit --- You received this message because you are subscribed to the Google Groups "Machinekit" group. To unsubscribe from this group and stop receiving emails from it, send an email to machinekit+unsubscr...@googlegroups.com. Visit this group at https://groups.google.com/group/machinekit. For more options, visit https://groups.google.com/d/optout.
Re: [Machinekit] Re: config-pin setting for Mode 0 (gpmc) question
OK, so for that I would definitely recommend crafting your own overlay that enables the GPMC pins you need. Again, most "casual" users will not be able to do anything with GPMC, which is why it isn't part of the "universal" cape to begin with. It shouldn't be too hard to migrate your existing device tree (or overlay) to work on modern kernels. Do you have a link to the source for what you're currently running? On 4/19/2019 7:40 PM, Jeff Pollard wrote: > > Hi, > > Not taken the wrong way. > I've already used the gpmc to communicate with my fpga board. > I have a servo system based on hostmot2 and a custom driver to go between > hm2-servo and the gpmc which then 'talks' to the fpga. > This all works fine > This way way back in 2015 though. > The method of accessing the gpmc connectivity has changed a lot since I > last tried using the BBB with the old version of machinekit I was using. > Now I'm trying to update what I have to newer machinekit software (with > all the new overlays, etc.) and can no longer program the pins to allow me > to access the gpmc. > > Jeff > > > On Friday, April 19, 2019 at 4:51:17 PM UTC-7, Charles Steinkuehler wrote: >> >> On 4/19/2019 6:39 PM, Jeff Pollard wrote: >>> >>> Hi, >>> >>> Thanks Robert and Charles. >>> I've taken this: >>> >> https://github.com/RobertCNelson/bb.org-overlays/blob/master/src/arm/cape-universal-00A0.dts#L1551-L1562 >> >>> >>> and added what would be necessary to get the gmpc pins usable >> following >>> the convention of the rest of the file. >>> Hopefully this something I can test here... or is this something that >> has >>> to be in the "kernel" and out of my reach? >>> If I can test here, can you tell me how to compile and deploy the new >> dts >>> file so I can test it out? >> >> Don't take this the wrong way, but if you have to ask about how to >> compile a device tree (or overlay), you probably shouldn't be trying >> to use the GPMC interface. >> >> Let's take a step back...exactly what are you trying to do? >> >> -- >> Charles Steinkuehler >> cha...@steinkuehler.net >> > -- Charles Steinkuehler char...@steinkuehler.net -- website: http://www.machinekit.io blog: http://blog.machinekit.io github: https://github.com/machinekit --- You received this message because you are subscribed to the Google Groups "Machinekit" group. To unsubscribe from this group and stop receiving emails from it, send an email to machinekit+unsubscr...@googlegroups.com. Visit this group at https://groups.google.com/group/machinekit. For more options, visit https://groups.google.com/d/optout.
Re: [Machinekit] Re: config-pin setting for Mode 0 (gpmc) question
Hi, Not taken the wrong way. I've already used the gpmc to communicate with my fpga board. I have a servo system based on hostmot2 and a custom driver to go between hm2-servo and the gpmc which then 'talks' to the fpga. This all works fine This way way back in 2015 though. The method of accessing the gpmc connectivity has changed a lot since I last tried using the BBB with the old version of machinekit I was using. Now I'm trying to update what I have to newer machinekit software (with all the new overlays, etc.) and can no longer program the pins to allow me to access the gpmc. Jeff On Friday, April 19, 2019 at 4:51:17 PM UTC-7, Charles Steinkuehler wrote: > > On 4/19/2019 6:39 PM, Jeff Pollard wrote: > > > > Hi, > > > > Thanks Robert and Charles. > > I've taken this: > > > https://github.com/RobertCNelson/bb.org-overlays/blob/master/src/arm/cape-universal-00A0.dts#L1551-L1562 > > > > > and added what would be necessary to get the gmpc pins usable > following > > the convention of the rest of the file. > > Hopefully this something I can test here... or is this something that > has > > to be in the "kernel" and out of my reach? > > If I can test here, can you tell me how to compile and deploy the new > dts > > file so I can test it out? > > Don't take this the wrong way, but if you have to ask about how to > compile a device tree (or overlay), you probably shouldn't be trying > to use the GPMC interface. > > Let's take a step back...exactly what are you trying to do? > > -- > Charles Steinkuehler > cha...@steinkuehler.net > -- website: http://www.machinekit.io blog: http://blog.machinekit.io github: https://github.com/machinekit --- You received this message because you are subscribed to the Google Groups "Machinekit" group. To unsubscribe from this group and stop receiving emails from it, send an email to machinekit+unsubscr...@googlegroups.com. Visit this group at https://groups.google.com/group/machinekit. For more options, visit https://groups.google.com/d/optout.
Re: [Machinekit] Re: config-pin setting for Mode 0 (gpmc) question
On 4/19/2019 6:39 PM, Jeff Pollard wrote: > > Hi, > > Thanks Robert and Charles. > I've taken this: > https://github.com/RobertCNelson/bb.org-overlays/blob/master/src/arm/cape-universal-00A0.dts#L1551-L1562 > > and added what would be necessary to get the gmpc pins usable following > the convention of the rest of the file. > Hopefully this something I can test here... or is this something that has > to be in the "kernel" and out of my reach? > If I can test here, can you tell me how to compile and deploy the new dts > file so I can test it out? Don't take this the wrong way, but if you have to ask about how to compile a device tree (or overlay), you probably shouldn't be trying to use the GPMC interface. Let's take a step back...exactly what are you trying to do? -- Charles Steinkuehler char...@steinkuehler.net -- website: http://www.machinekit.io blog: http://blog.machinekit.io github: https://github.com/machinekit --- You received this message because you are subscribed to the Google Groups "Machinekit" group. To unsubscribe from this group and stop receiving emails from it, send an email to machinekit+unsubscr...@googlegroups.com. Visit this group at https://groups.google.com/group/machinekit. For more options, visit https://groups.google.com/d/optout.
Re: [Machinekit] Re: config-pin setting for Mode 0 (gpmc) question
Hi, Thanks Robert and Charles. I've taken this: https://github.com/RobertCNelson/bb.org-overlays/blob/master/src/arm/cape-universal-00A0.dts#L1551-L1562 and added what would be necessary to get the gmpc pins usable following the convention of the rest of the file. Hopefully this something I can test here... or is this something that has to be in the "kernel" and out of my reach? If I can test here, can you tell me how to compile and deploy the new dts file so I can test it out? Thanks, Jeff On Friday, April 19, 2019 at 2:10:56 PM UTC-7, Charles Steinkuehler wrote: > > You are correct...you error is at a lower level than config-pin. > > The problem is the mode you want is not implemented by the universal > overlay: > > > https://github.com/RobertCNelson/bb.org-overlays/blob/master/src/arm/cape-universal-00A0.dts#L1551-L1562 > > > You can either request an update to the universal overlay, patch it > and send a PR, or migrate to using a "real" device-tree overlay. > > When I created the "Universal" overlay, I didn't expect many people to > be trying to use the General Purpose Memory Controller. ;-) > > On 4/19/2019 3:08 PM, Jeff Pollard wrote: > > Hi, > > That makes sense, but > > > > I can use config-pin to set the value to something like: > > * pwm* > > for example: > > * config-pin P8.14 pwm* > > will work just fine > > as will *gpio* > > and > > *gpio_pd, etc.* > > > > But, *gpmc* (mode 0) is not a valid choice i.e. config-pin p8.14 gpmc > is > > invalid > > I tried adding it to the config-pin script for pin 8_14, but that > didn't > > help as it appears the problem is deeper than than. I can't change the > > value of state in: > > > > /sys/devices/platform/ocp/ocp:P8_14_pinmux/state > > > > the error I get is: > > > > *Cannot write pinmux File: > /sys/devices/platform/ocp/ocp:P8_14_pinmux/state* > > > > Jeff > > > > On Friday, April 19, 2019 at 12:39:21 PM UTC-7, Mala Dies wrote: > >> > >> Hello, > >> > >> The config-pin utility can be used in user land or user land w/ a .sh > >> script and .service file to boot the board w/ the required config-pin > >> utility being present. > >> > >> Seth > >> > >> P.S. If you know how to do this instead, this may work for you. So, > use: > >> config-pin P8.14 <--- this would be your mode, i.e. GPIO, UART, > and > >> etc. > >> > >> So, if you wanted to put in gpio in , you could if this is what > you > >> want. Does this sort of make sense? > >> > >> On Friday, April 19, 2019 at 1:55:21 PM UTC-5, Jeff Pollard wrote: > >>> > >>> > >>> Hi, > >>> > >>> I'm using:* Linux beaglebone 4.14.106-bone-rt-r19 #1 PREEMPT RT Tue > >>> Mar 26 19:02:06 UTC 2019 armv7l GNU/Linux* > >>> > >>> I started by disabling the emmc in uEnv.txt > >>> > >>> I then tried to modify the config-pin script for P8_14 (which would > be > >>> gpmc_AD14 as a starting example), but I get > >>> > >>> *Cannot write pinmux File: > >>> /sys/devices/platform/ocp/ocp:P8_14_pinmux/state* > >>> > >>> Can anyone give a pointer on how to go about configuring pins to use > >>> gmpc mode with the config-pin script (or any other method)? > >>> > >>> Thanks, > >>> > >>> Jeff > >>> > >> > > > > > -- > Charles Steinkuehler > cha...@steinkuehler.net > -- website: http://www.machinekit.io blog: http://blog.machinekit.io github: https://github.com/machinekit --- You received this message because you are subscribed to the Google Groups "Machinekit" group. To unsubscribe from this group and stop receiving emails from it, send an email to machinekit+unsubscr...@googlegroups.com. Visit this group at https://groups.google.com/group/machinekit. For more options, visit https://groups.google.com/d/optout.
Re: [Machinekit] Re: config-pin setting for Mode 0 (gpmc) question
On Fri, Apr 19, 2019 at 3:08 PM Jeff Pollard wrote: > > Hi, > That makes sense, but > > I can use config-pin to set the value to something like: > pwm > for example: > config-pin P8.14 pwm > will work just fine > as will gpio > and gpio_pd, etc. > > But, gpmc (mode 0) is not a valid choice i.e. config-pin p8.14 gpmc is > invalid > I tried adding it to the config-pin script for pin 8_14, but that didn't > help as it appears the problem is deeper than than. I can't change the value > of state in: > > /sys/devices/platform/ocp/ocp:P8_14_pinmux/state > > the error I get is: > > Cannot write pinmux File: /sys/devices/platform/ocp/ocp:P8_14_pinmux/state Hi Jeff, This is the first we've had anyone ask about gpmc. Right now the kernel overlay isn't setup to export the gpmc pinmux. Thus the error. Today, your best bet is to write an overlay to enable the gpmc pinmux. Regards, -- Robert Nelson https://rcn-ee.com/ -- website: http://www.machinekit.io blog: http://blog.machinekit.io github: https://github.com/machinekit --- You received this message because you are subscribed to the Google Groups "Machinekit" group. To unsubscribe from this group and stop receiving emails from it, send an email to machinekit+unsubscr...@googlegroups.com. Visit this group at https://groups.google.com/group/machinekit. For more options, visit https://groups.google.com/d/optout.
Re: [Machinekit] Re: config-pin setting for Mode 0 (gpmc) question
You are correct...you error is at a lower level than config-pin. The problem is the mode you want is not implemented by the universal overlay: https://github.com/RobertCNelson/bb.org-overlays/blob/master/src/arm/cape-universal-00A0.dts#L1551-L1562 You can either request an update to the universal overlay, patch it and send a PR, or migrate to using a "real" device-tree overlay. When I created the "Universal" overlay, I didn't expect many people to be trying to use the General Purpose Memory Controller. ;-) On 4/19/2019 3:08 PM, Jeff Pollard wrote: > Hi, > That makes sense, but > > I can use config-pin to set the value to something like: > * pwm* > for example: > * config-pin P8.14 pwm* > will work just fine > as will *gpio* > and > *gpio_pd, etc.* > > But, *gpmc* (mode 0) is not a valid choice i.e. config-pin p8.14 gpmc is > invalid > I tried adding it to the config-pin script for pin 8_14, but that didn't > help as it appears the problem is deeper than than. I can't change the > value of state in: > > /sys/devices/platform/ocp/ocp:P8_14_pinmux/state > > the error I get is: > > *Cannot write pinmux File: /sys/devices/platform/ocp/ocp:P8_14_pinmux/state* > > Jeff > > On Friday, April 19, 2019 at 12:39:21 PM UTC-7, Mala Dies wrote: >> >> Hello, >> >> The config-pin utility can be used in user land or user land w/ a .sh >> script and .service file to boot the board w/ the required config-pin >> utility being present. >> >> Seth >> >> P.S. If you know how to do this instead, this may work for you. So, use: >> config-pin P8.14 <--- this would be your mode, i.e. GPIO, UART, and >> etc. >> >> So, if you wanted to put in gpio in , you could if this is what you >> want. Does this sort of make sense? >> >> On Friday, April 19, 2019 at 1:55:21 PM UTC-5, Jeff Pollard wrote: >>> >>> >>> Hi, >>> >>> I'm using:* Linux beaglebone 4.14.106-bone-rt-r19 #1 PREEMPT RT Tue >>> Mar 26 19:02:06 UTC 2019 armv7l GNU/Linux* >>> >>> I started by disabling the emmc in uEnv.txt >>> >>> I then tried to modify the config-pin script for P8_14 (which would be >>> gpmc_AD14 as a starting example), but I get >>> >>> *Cannot write pinmux File: >>> /sys/devices/platform/ocp/ocp:P8_14_pinmux/state* >>> >>> Can anyone give a pointer on how to go about configuring pins to use >>> gmpc mode with the config-pin script (or any other method)? >>> >>> Thanks, >>> >>> Jeff >>> >> > -- Charles Steinkuehler char...@steinkuehler.net -- website: http://www.machinekit.io blog: http://blog.machinekit.io github: https://github.com/machinekit --- You received this message because you are subscribed to the Google Groups "Machinekit" group. To unsubscribe from this group and stop receiving emails from it, send an email to machinekit+unsubscr...@googlegroups.com. Visit this group at https://groups.google.com/group/machinekit. For more options, visit https://groups.google.com/d/optout.