On Thu, Feb 15, 2018 at 2:11 PM, Robert Nelson <[email protected]> wrote: > On Thu, Feb 15, 2018 at 1:48 PM, <[email protected]> wrote: >> I am trying to implement the 1-Wire protocol to read a DS18B20 temperature >> sensor on the PocketBeagle. So far I have been able to correctly read the >> temperature on a BeagleBone Black (BBB) using the following guide: >> >> http://www.bonebrews.com/temperature-monitoring-with-the-ds18b20-on-a-beaglebone-black/ >> >> I changed the .dts file below to use the same GPIO port on the BBB (P8.11 - >> GPIO45) as on the PocketBeagle (P2.33 - GPIO45) on line 19 and added the >> missing semicolon on line 37. I checked the GPIO offset for both of these >> pins and they are the same, so it should be the same signal. >> >> /* >> * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/ >> * >> * This program is free software; you can redistribute it and/or modify >> * it under the terms of the GNU General Public License version 2 as >> * published by the Free Software Foundation. >> * >> * Modified by Russell Senior from the weather cape's DTS file. >> * Minor formatting by C W Rose. >> */ >> /dts-v1/; >> /plugin/; >> >> >> / { >> compatible = "ti,beaglebone", "ti,beaglebone-black"; >> part-number = "BB-W1"; >> version = "00A0"; >> >> >> exclusive-use = "P8.11"; /*changed to P2.33 for PocketBeagle*/ >> >> >> fragment@0 { >> target = <&am33xx_pinmux>; >> __overlay__ { >> bb_w1_pins: pinmux_bb_w1_pins { >> pinctrl-single,pins = <0x34 0x37 /* gpmc_ad13.gpio1_13, >> OMAP_PIN_INPUT_PULLUP | OMAP_MUX_MODE7 - w1-gpio */ >; >> }; >> }; >> }; >> >> >> fragment@1 { >> target = <&ocp>; >> __overlay__ { >> onewire@0 { >> status = "okay"; >> compatible = "w1-gpio"; >> pinctrl-names = "default"; >> pinctrl-0 = <&bb_w1_pins> /*missing semicolon here!*/ >> >> >> gpios = <&gpio2 13 0>; >> }; >> }; >> }; >> }; >> >> >> However, when I try to use the same procedure on the PocketBeagle (which is >> running Ubuntu), I run into a problem when trying to load the overlay. The >> guide I have been following uses the capemgr.9 for the BBB, which is not >> supported by the PocketBeagle. I then tried to load the overlay using the >> uEnv.txt file to load the overlay (.dcbo file located in /lib/firmware/) at >> boot. I uncommented the master enable and Overlay 1 lines and replaced the >> "file" placed holder with the .dcbo file name. >> >> After attempting the reboot the PocketBeagle to load the overlay, the >> PocketBeagle gets stuck during its boot procedure and fails to fully boot >> and have to reflash the SD card to boot the device; I believe this is due to >> trying to load the overlay. >> >> Therefore I have a few questions: >> >> Is there information in the above .dts file that is causing this error? >> Is changing "P8.11" to "P2.33" supported by the PocketBeagle? >> Are there any other steps I am missing to load the overlay using uEnv.txt? > > Give this a shot: > > https://gist.github.com/RobertCNelson/dfd4f707a89b83c9366ecfcdc24321b0 > > In fragment 0, we drop the cape-universal pinmux for P2_33, this > free's up the pin for dedicated functions. > > In fragment 1, no change > > In fragment 2, &gpio2 -> &gpio1
Looking at my old example: https://github.com/beagleboard/bb.org-overlays/blob/master/src/arm/BB-W1-P9.12-00A0.dts#L41-L55 we'll need a nother change.. 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]. To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/CAOCHtYi1sosf2k3qiK%3DWyJvEXo6OuJVe9h_ZvGkjSS2Zt-Bfjg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
