Re: [beagleboard] Re: How to access GPIO using derek molloy's GPIO Library

2021-03-27 Thread jonnymo
Since you are using a PocketBeagle, isn't P1_32 mapped to gpio1.10 and not
P1_36 which is mapped to gpio3.14?
https://github.com/beagleboard/linux/blob/4.14/arch/arm/boot/dts/am335x-pocketbeagle.dts
https://docs.google.com/spreadsheets/d/1fE-AsDZvJ-bBwzNBj1_sPDrutvEvsmARqFwvbw_HkrE/edit#gid=1518010293

Jon



On Sat, Mar 27, 2021 at 7:19 PM Piyush Raj ae19m009 <
ae19m...@smail.iitm.ac.in> wrote:

> Thanks for replying Dennis
>
> I tried changing the uBoot.env as suggested by you. Results weren't as
> expected. However I was able to find a work around method which I would
> like to share with the community.
>
> I was able to access gpio on P1 headers (almost all of them) using the
> bonescript library. Since my application is cpp based , I had to find a way
> to use these gpios on P1 header.
> Here's what I did:
> 1)Created a service which runs a javascript bonescript application with P1
> pins configured in bonescript.
> 2)allowed this service to run in background and then ran my main.cpp
> application using these additional pins on P1 as gpios.
>
> Results:
>
> Got access to 30 pins total, as gpio
>
> Assessment:
>
> Bonescript is doing the configuration of pins for me. Although I haven't
> deep dived into bonescript, someone who already has knowledge of it can
> better explain how is bonescript able to configure gpio.
>
> Regards
>
> Piyush
>
> On Fri, 26 Mar, 2021, 04:00 Dennis Lee Bieber, 
> wrote:
>
>> On Thu, 25 Mar 2021 10:07:13 -0700 (PDT), in
>> gmane.comp.hardware.beagleboard.user
>> "jeff-re5jqeeqqe8avxtiumw...@public.gmane.org"
>>  wrote:
>>
>>
>> >
>> >The following post shows a line in uEnv.txt for enabling, and I assuming
>> >disabling cape universal:
>> >
>> >https://github.com/beagleboard/bb.org-overlays/issues/79
>> >
>> >enable_uboot_cape_universal=1
>> >
>> >So, not sure if this means that if you change to 0 in uEnv.txt, that it
>> >would free up pins so that pin-config no longer gives an error.
>> >
>>
>> I seem to recall that disabling cape_universal ALSO disables any
>> use of
>> config-pin. More likely is that one needs to disable /other/ overlays that
>> are claiming the desired pins. From my BBB:
>>
>> ###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.14.x-ti kernel)
>> #uboot_overlay_pru=/lib/firmware/AM335X-PRU-RPROC-4-14-TI-00A0.dtbo
>> ###pru_rproc (4.19.x-ti kernel)
>> uboot_overlay_pru=/lib/firmware/AM335X-PRU-RPROC-4-19-TI-00A0.dtbo
>> ###pru_uio (4.14.x-ti, 4.19.x-ti & mainline/bone kernel)
>> #uboot_overlay_pru=/lib/firmware/AM335X-PRU-UIO-00A0.dtbo
>> ###
>> ###Cape Universal Enable
>> enable_uboot_cape_universal=1
>>
>> Though what overlay claims P1_36 (PWM0 A) is not apparent. May
>> have to
>> search the device tree sources to find it.
>>
>>
>> --
>> Dennis L Bieber
>>
>> --
>> For more options, visit http://beagleboard.org/discuss
>> ---
>> You received this message because you are subscribed to a topic in the
>> Google Groups "BeagleBoard" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/beagleboard/IocB0viAW2A/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to
>> beagleboard+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/beagleboard/gv2q5gpoi1o10hfvio4ishmebffvhlrusc%404ax.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/CAD20Z3y-UmK7XDn39927cTNjiMC0FTAwcmSpW-94iur_NMHRFg%40mail.gmail.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/CAG99bkr2%3DeyB%2BDNGJngxvem4no3MdijLgxLKWabkXHgH6Q8mXA%40mail.gmail.com.


Re: [beagleboard] Re: How to access GPIO using derek molloy's GPIO Library

2021-03-27 Thread Piyush Raj ae19m009
Thanks for replying Dennis

I tried changing the uBoot.env as suggested by you. Results weren't as
expected. However I was able to find a work around method which I would
like to share with the community.

I was able to access gpio on P1 headers (almost all of them) using the
bonescript library. Since my application is cpp based , I had to find a way
to use these gpios on P1 header.
Here's what I did:
1)Created a service which runs a javascript bonescript application with P1
pins configured in bonescript.
2)allowed this service to run in background and then ran my main.cpp
application using these additional pins on P1 as gpios.

Results:

Got access to 30 pins total, as gpio

Assessment:

Bonescript is doing the configuration of pins for me. Although I haven't
deep dived into bonescript, someone who already has knowledge of it can
better explain how is bonescript able to configure gpio.

Regards

Piyush

On Fri, 26 Mar, 2021, 04:00 Dennis Lee Bieber, 
wrote:

> On Thu, 25 Mar 2021 10:07:13 -0700 (PDT), in
> gmane.comp.hardware.beagleboard.user
> "jeff-re5jqeeqqe8avxtiumw...@public.gmane.org"
>  wrote:
>
>
> >
> >The following post shows a line in uEnv.txt for enabling, and I assuming
> >disabling cape universal:
> >
> >https://github.com/beagleboard/bb.org-overlays/issues/79
> >
> >enable_uboot_cape_universal=1
> >
> >So, not sure if this means that if you change to 0 in uEnv.txt, that it
> >would free up pins so that pin-config no longer gives an error.
> >
>
> I seem to recall that disabling cape_universal ALSO disables any
> use of
> config-pin. More likely is that one needs to disable /other/ overlays that
> are claiming the desired pins. From my BBB:
>
> ###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.14.x-ti kernel)
> #uboot_overlay_pru=/lib/firmware/AM335X-PRU-RPROC-4-14-TI-00A0.dtbo
> ###pru_rproc (4.19.x-ti kernel)
> uboot_overlay_pru=/lib/firmware/AM335X-PRU-RPROC-4-19-TI-00A0.dtbo
> ###pru_uio (4.14.x-ti, 4.19.x-ti & mainline/bone kernel)
> #uboot_overlay_pru=/lib/firmware/AM335X-PRU-UIO-00A0.dtbo
> ###
> ###Cape Universal Enable
> enable_uboot_cape_universal=1
>
> Though what overlay claims P1_36 (PWM0 A) is not apparent. May
> have to
> search the device tree sources to find it.
>
>
> --
> Dennis L Bieber
>
> --
> For more options, visit http://beagleboard.org/discuss
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "BeagleBoard" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/beagleboard/IocB0viAW2A/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> beagleboard+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beagleboard/gv2q5gpoi1o10hfvio4ishmebffvhlrusc%404ax.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/CAD20Z3y-UmK7XDn39927cTNjiMC0FTAwcmSpW-94iur_NMHRFg%40mail.gmail.com.


[beagleboard] Re: How to access GPIO using derek molloy's GPIO Library

2021-03-25 Thread Dennis Lee Bieber
On Thu, 25 Mar 2021 10:07:13 -0700 (PDT), in
gmane.comp.hardware.beagleboard.user
"jeff-re5jqeeqqe8avxtiumw...@public.gmane.org"
 wrote:


>
>The following post shows a line in uEnv.txt for enabling, and I assuming 
>disabling cape universal:
>
>https://github.com/beagleboard/bb.org-overlays/issues/79
>
>enable_uboot_cape_universal=1
>
>So, not sure if this means that if you change to 0 in uEnv.txt, that it 
>would free up pins so that pin-config no longer gives an error.
>

I seem to recall that disabling cape_universal ALSO disables any use of
config-pin. More likely is that one needs to disable /other/ overlays that
are claiming the desired pins. From my BBB:

###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.14.x-ti kernel)
#uboot_overlay_pru=/lib/firmware/AM335X-PRU-RPROC-4-14-TI-00A0.dtbo
###pru_rproc (4.19.x-ti kernel)
uboot_overlay_pru=/lib/firmware/AM335X-PRU-RPROC-4-19-TI-00A0.dtbo
###pru_uio (4.14.x-ti, 4.19.x-ti & mainline/bone kernel)
#uboot_overlay_pru=/lib/firmware/AM335X-PRU-UIO-00A0.dtbo
###
###Cape Universal Enable
enable_uboot_cape_universal=1

Though what overlay claims P1_36 (PWM0 A) is not apparent. May have to
search the device tree sources to find it.


-- 
Dennis L Bieber

-- 
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/gv2q5gpoi1o10hfvio4ishmebffvhlrusc%404ax.com.


[beagleboard] Re: How to access GPIO using derek molloy's GPIO Library

2021-03-25 Thread jeff....@gmail.com
Take the following with a grain of salt in that it's probably outdated, but 
it may also be something to consider if you're not planning on using capes:

A few year's back on BBB, we ran across an issue where config-pin gave an 
error when attempting to reconfigure pins that were already in use by the 
cape manager/cape universal.  At the time, I THINK, there was a way to 
disable the cape manager/cape universal via changing a variable/flag 
setting in uEnv.txt.  I think that was on an image around the time the 
transition to U-boot overlays was going on.. 

The following post shows a line in uEnv.txt for enabling, and I assuming 
disabling cape universal:

https://github.com/beagleboard/bb.org-overlays/issues/79

enable_uboot_cape_universal=1

So, not sure if this means that if you change to 0 in uEnv.txt, that it 
would free up pins so that pin-config no longer gives an error.

On Wednesday, March 24, 2021 at 11:03:52 AM UTC-4 Dennis Bieber wrote:

> On Tue, 23 Mar 2021 14:17:30 -0700 (PDT), in
> gmane.comp.hardware.beagleboard.user Piyush Raj ae19m009
>  wrote:
>
>
> >I have started using GPIOs on pocketbeagle in my application. I need 24 
> of 
> >them. However, using the GPIO library on github (exploring BB), i am able 
> >to access only 18 of them. How can i access more GPIOs on the P1 header 
> say 
> >for instance, gpio110 (P1_36).
> >
>
> You have to reconfigure the pin-mux for those pins. config-pin might be
> capable of that (note: there are two config-pin executables; the one on the
> path is a compiled version that lacks some capability over the older shell
> script version [searching the file system should find it]).
>
> At worse, it may require modifying one or more device tree files.
>
>
> -- 
> Dennis L Bieber
>
>

-- 
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/ae43d0b1-d8d3-4286-9cb6-2b69955e9403n%40googlegroups.com.


[beagleboard] Re: How to access GPIO using derek molloy's GPIO Library

2021-03-24 Thread Dennis Lee Bieber
On Tue, 23 Mar 2021 14:17:30 -0700 (PDT), in
gmane.comp.hardware.beagleboard.user Piyush Raj ae19m009
 wrote:


>I have started using GPIOs on pocketbeagle in my application. I need 24 of 
>them. However, using the GPIO library on github (exploring BB), i am able 
>to access only 18 of them. How can i access more GPIOs on the P1 header say 
>for instance, gpio110 (P1_36).
>

You have to reconfigure the pin-mux for those pins. config-pin might be
capable of that (note: there are two config-pin executables; the one on the
path is a compiled version that lacks some capability over the older shell
script version [searching the file system should find it]).

At worse, it may require modifying one or more device tree files.


-- 
Dennis L Bieber

-- 
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/aukm5ghounegkeqb68so8lf1as2ge1srls%404ax.com.