I've been a C and assembly programmer since the 80's, but all of this with dtc is still pure greek to me.
I'm assuming the original intent was to install the latest git version of the dtc compiler, though I'm not sure what implications the sed command has, so I'd defer to you or the OP's opinions.
> . . .
| P8_07_default_pin: pinmux_P8_07_default_pin { |
So a lot of text there to "Wade" through so I'll try to answer the questions you have in order. Without the "Sea of text" ;)
I think Universal IO, which includes the shell script config-pin is a really cool tool for getting started. Especially, when all you want to do is get down to writing code for the hardware. However, at the same time I strongly feel that it is not a permanent solution for configuring the hardware, especially for a production system. For many reasons, partly because there can be some glitches, and partly because now we have uboot overlays, that one can load through the second stage bootloader. Which also means, for a production system you can have your pins, and hardware configured exactly how it needs to be. Prior to Linux being up and running. If you script config-pin, this has to be done after Linux is running.
Let's take this:
/* P8_07 (ZCZ ball R7 ) */pinctrl-single,pins = <0x090 0x37>; }; /* Mode 7, Pull-Up, RxActive */
P8_07_default_pin: pinmux_P8_07_default_pin { This is just part of configuring a pin. Obviously for P8_07. So for pins that can be operating in GPIO mode. This will be the first entry in any of the universal io overlay files. The first line after the comment is pretty much just a "#define", or a "prototype" definition of the pin in question. Kind of like prototyping a function in C. The second line after the comment is the actual pin information. 0x090 being the pin, which is a kernel pin identifier I think. The second number 0x37 is the mux, and pullup mode( put simply ). You can read the TRM and get a much better explanation of the mux / pullup mode register.
Anyway, check this out. https://github.com/beagleboard/bb.org-overlays/blob/master/include/dt-bindings/board/am335x-bbw-bbb-base.h#L17 The point here, if you #include Robert's header file, you can use all the BONE_Px_xx #defines in place of the actual "kernel pin value".
Which can( does for me ) remove a lot of tedious work trying to memorize, or digging through documentation just to get a pin to work the way you want. Additionally, there is another header file, which #define mux, and other register modes. These two headers alone can take a lot of learning pressure off your shoulders. Then if like me, you do know C very well ( I'm assuming you do ), you can read through these source header files, along with the TRM, or whatever documentation that makes the most sense to you. Suddenly, that light at the end of the tunnel starts to appear. Pullup modes, you simply OR together ( FOO | BAR )
Anyway, right now I am kind of busy with work related code. Bu maybe, sometime soon I can make a working device tree overlay, with an explanation of the file for one pin. Put it on my blog page, and link back to it. The problem with that, is it often takes more work to create a post, than it does to actually just write the code, and *maybe* explain it, if needed.
On Thursday, May 18, 2017 at 3:58:03 PM UTC-7, William Hermans wrote:
[..]along with the TRM, or whatever documentation that makes the most sense to you. [..]
For fun, I tried to determine what 0x37 means. You referred to the "TRM", which I take to mean the Sitara Tech Ref Manual (rev c).. that ~2300 page monster! ;) Spent a bit of time in there, but was unable to figure out which table was relevant.
I decided not to copy what was in the TRM into the SRM. That is why the SRM is specific to the BBB. And the TRM gets updated failry often by TI.
Gerald
--
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...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/beagleboard/CALHSORrAaF4Z%2B%3DUZRq%2Bi_oMFRM_K88noC7y5D%3D9MQAkeRUovrw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
I decided not to copy what was in the TRM into the SRM. That is why the SRM is specific to the BBB. And the TRM gets updated failry often by TI.
Gerald
From: beagl...@googlegroups.com [mailto:beagleboard@googlegroups.com] On Behalf Of William Hermans
Sent: Saturday, May 20, 2017 8:00 PM
To: beagl...@googlegroups.com
Subject: Re: [beagleboard] Re: Surefire PRU - Setup.
System reference manual SRM, Technical reference manual TRM.
On Sat, May 20, 2017 at 5:58 PM, William Hermans <yyr...@gmail.com> wrote:
No, prior to uboot overlays, overlays were loaded from the initrd, at best. Also we need to understand that the board file(also an overlay of sorts - but required )is seperate from all this discussion.
I do not understand why you would have "field people" playing around with hardware overlays though. Once your hardware is finalized, it should never change. Which is one small reason why I personally find Universal IO unnecessary for my own purposes.The problem I've seen with explanations, and documentation on device tree, is that no one explains it really well. Additionally, as a new player into device tree overlays. Its not clear where to get information from. See, you need to understand the pin-ctrl subsystem, gpio subsystem . . . list goes one, and on . . .A lot of this information has to be found from the Linux kernel source documentation.HOWEVER, you do not necessarily need to memorize all of this. We ( programmers ) just need a reference that does not goes on, and on for days about silly details we do not need to know to get our jobs done. Nothing like this exists.
Anyway, in order to learn, you need to "do".
--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/CALHSORrAaF4Z%2B%3DUZRq%2Bi_oMFRM_K88noC7y5D%3D9MQAkeRUovrw%40mail.gmail.com.
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 beagleboard+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/a67232f2a5a94c10abc16cc8ff83aa70%40winhexbeus11.winus.mail.
System reference manual SRM, Technical reference manual TRM.
By the way these are my own preffered "pin mux mode" "spread sheet" PDF files for working with various pins: https://github.com/wphermans/bb-info/blob/master/BeagleboneBlackP8HeaderPinMuxModes.pdf
Greg,
You know what. If I were you, I would get a Beaglebone black or green, and make learning about it your favorite hobby. This way, you could experiment with various things, until you're happy with what you end up using.
If memory is serving me correctly yes, you're using a blue.
So yes, buy a beaglebone, take it home, and start experimenting. Then I would probably not worry about HAVING to have hardware connected up with it. There is a lot you can do by experimenting with software only. How, and where to explore the GPIO subsystem.
I do not understand why you would have "field people" playing around with hardware overlays though. Once your hardware is finalized, it should never change. Which is one small reason why I personally find Universal IO unnecessary for my own purposes.