On Sun, Dec 28, 2014 at 11:04 PM, Rick Mann <[email protected]> wrote:
>
>> On Dec 28, 2014, at 19:56 , Robert Nelson <[email protected]> wrote:
>>
>> So the ADC is pretty straight forward, for example the proxy cape uses
>> 3 adc channels..
>>
>> https://github.com/RobertCNelson/dtb-rebuilder/blob/3.14-ti/src/arm/am335x-bone-basic-proto-cape.dtsi
>>
>> So if you add that node (with the 2 adc channels you need) to:
>>
>> https://github.com/RobertCNelson/dtb-rebuilder/blob/3.14-ti/src/arm/am335x-boneblack.dts
>>
>> then it's just
>>
>> make
>> sudo make install
>> sudo reboot
>>
>> (this is with the 3.14-ti branch of dtb-rebuilder)
>>
>> The best gpio example is in the argus dtsi
>>
>> https://github.com/RobertCNelson/dtb-rebuilder/blob/3.14-ti/src/arm/am335x-bone-argus.dtsi
>
> Okay, that seemed to re-enable the ADC, but it killed my GPIOs (which were
> working, actually). I didn't yet try to add a node for the GPIOs. I have many
> questions:
>
> A) What does it mean for all those resulting .dtb files to be in the
> /boot/... directory? Do they all get loaded? Does only the main one
> ("am335x-boneblack")?
Only one "*.dtb" will get loaded by u-boot from /boot/
For most "capes" (that work in v3.14.x) i've created a single *.dtb
file for them.
am335x-boneblack-<cape>.dtb
This is what the commented out "#dtb=" variable in /boot/uEnv.txt is for.
Say if you have the "4dcape-70t" cape plugged in and you don't want to
edit anything between kernel versions you'd set:
dtb=am335x-boneblack-4dcape-70t.dtb
> B) In the Argus example, all the &ocp/..._pinmux statuses are set to
> "disabled." Wouldn't I want the pinmux to be enabled ("okay")? What does it
> mean to disable the pinmux?
So the *_pinmux status are for the cape-universal. If you'd like to
use "pin-config" in userspace you'd have to define those to a default
state. In our case with the Argus it's not fully converted over so we
control the pin stage in the am33xx_pinmux instea.
> C) Can there be multiple &ocp, &am33xx_pinmux entries?
Correct.. It just overlays on top of each other. The dtc compiler will
match &node and combine them in the final dtb
> D) There's a comment on
> https://github.com/RobertCNelson/dtb-rebuilder/blob/3.14-ti/src/arm/am335x-bone-argus.dtsi#L56
> that says the gpio controllers appear to be numbered starting at 1, but then
> list gpio controllers numbered 0.
Oh i need to double check that. Back in v3.8.x all the "gpio[X]" was
off by one, which was fixed in mainline shortly after. So v3.14.x
"gpio[X]" actually matches the am335x datasheet now..
> E) What does "debug" and "shutdown" do?
Which reference is that too?
>
> F) I'm going to add version of each of these ampersand-nodes, and a root
> node, just like the argus ones, replacing "argus_ups" with "podtique", and
> adjusting the pins to what I need. Is that the right approach? That will
> result in am335x-boneblack.dts having multiple root nodes, and multiple &ocp
> and &am335x-pinmux nodes. Eventually, this suggests making a separate .dtsi
> with all the stuff for my cape, and just including it into .dts, right?
Yeap, that's the best way.. Just edit your own *.dtsi and include it.
Btw, there's two ways of doing gpio's..
Say if you have a key event, and you want something done look at gpio-keys:
https://github.com/beagleboard/linux/blob/3.14/Documentation/devicetree/bindings/gpio/gpio_keys.txt
rtc example, gpio to wake up with:
https://github.com/RobertCNelson/dtb-rebuilder/blob/3.14-ti/src/arm/am335x-bone-rtc-01-00a1.dtsi#L27
There's a few other specially ways here:
https://github.com/beagleboard/linux/tree/3.14/Documentation/devicetree/bindings/gpio
>
> G) What should my uEnv.txt look like? It currently looks like this:
> http://pastebin.com/3fx5SDb9
That looks fine. If we ever ship a new default image, that's exactly
how the new default will look like.
Regards,
--
Robert Nelson
http://www.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.