You know this makes me cringe when I think about it. But perhaps Bonescript
needs it's own dt overlay ? One needs consistency when using a certain
thing, and based on what I'm seeing, you're not guaranteed that. What's
more, there is no real way you can expect this either, considering
difference capes do different things.

*Or* there needs to be a mechanism in device tree, that populates some file
somewhere, that lets the users know what's going on. This *can* be done via
/dev/mem/ and using mmap() to read out register data for every pin, and
perihperal to see what state it's in but man . . . that'd be an awful lot
of work to do, just to port bonescript . . .

On Mon, Feb 8, 2016 at 5:36 PM, Mark A. Yoder <[email protected]>
wrote:

> Yup, here's the mappings depending on which dts file is used:
>
> # universaln
> # 0 lrwxrwxrwx 1 root root 0 Feb  8 19:32 pwmchip0 ->
> ../../devices/platform/ocp/48300000.epwmss/48300200.ehrpwm/pwm/pwmchip0
> # 0 lrwxrwxrwx 1 root root 0 Feb  8 19:32 pwmchip2 ->
> ../../devices/platform/ocp/48302000.epwmss/48302200.ehrpwm/pwm/pwmchip2
> # 0 lrwxrwxrwx 1 root root 0 Feb  8 19:32 pwmchip4 ->
> ../../devices/platform/ocp/48300000.epwmss/48300100.ecap/pwm/pwmchip4
> # 0 lrwxrwxrwx 1 root root 0 Feb  8 19:32 pwmchip5 ->
> ../../devices/platform/ocp/48304000.epwmss/48304100.ecap/pwm/pwmchip5
> # 0 lrwxrwxrwx 1 root root 0 Feb  8 19:32 pwmchip6 ->
> ../../devices/platform/ocp/48304000.epwmss/48304200.ehrpwm/pwm/pwmchip6
>
>
> # cape-emmc
> # 0 lrwxrwxrwx 1 root root 0 Feb  8 19:01 pwmchip0 ->
> ../../devices/platform/ocp/48300000.epwmss/48300100.ecap/pwm/pwmchip0
> # 0 lrwxrwxrwx 1 root root 0 Feb  8 19:01 pwmchip1 ->
> ../../devices/platform/ocp/48304000.epwmss/48304100.ecap/pwm/pwmchip1
> # 0 lrwxrwxrwx 1 root root 0 Feb  8 19:01 pwmchip2 ->
> ../../devices/platform/ocp/48300000.epwmss/48300200.ehrpwm/pwm/pwmchip2
> # 0 lrwxrwxrwx 1 root root 0 Feb  8 19:01 pwmchip4 ->
> ../../devices/platform/ocp/48302000.epwmss/48302200.ehrpwm/pwm/pwmchip4
> # 0 lrwxrwxrwx 1 root root 0 Feb  8 19:01 pwmchip6 ->
> ../../devices/platform/ocp/48304000.epwmss/48304200.ehrpwm/pwm/pwmchip6
>
> Yes, the addresses are there, so I need to find a place that maps the
> addresses to the header pin numbers.
>
> --Mark
>
> On Monday, February 8, 2016 at 6:42:11 PM UTC-5, RobertCNelson wrote:
>>
>> On Mon, Feb 8, 2016 at 5:36 PM, Mark A. Yoder <[email protected]>
>> wrote:
>> > Well....  /sys/class/pwm/pwmchip2/pwm0 worked!  Thanks...
>> >
>> > So given the pin name (P9_14 for example) how do I find the pwm path?
>> (I'm
>> > trying to port bonescript to Jessie.)
>>
>> For the pwm, I think it's load order (scary)....  not sure if we can
>> for an alias in the dt..
>>
>> 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 [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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].
For more options, visit https://groups.google.com/d/optout.

Reply via email to