Radarcape:Devicetree: Difference between revisions

From Beast Wiki
Jump to navigation Jump to search
imported>Beastadmin
Created page with "==Set Environment Variables and Aliases== '''/etc/profile:'''<br> <code> export SLOTS=/sys/devices/bone_capemgr.7/slots<br> export PINS=/sys/kernel/debug/pinctrl/44e10800.pin..."
 
imported>Beastadmin
No edit summary
Line 2: Line 2:


'''/etc/profile:'''<br>
'''/etc/profile:'''<br>
<code>
<source lang="bash" line>
export SLOTS=/sys/devices/bone_capemgr.7/slots<br>
export SLOTS=/sys/devices/bone_capemgr.7/slots<br>
export PINS=/sys/kernel/debug/pinctrl/44e10800.pinmux/pins<br>
export PINS=/sys/kernel/debug/pinctrl/44e10800.pinmux/pins<br>
Line 9: Line 9:
stty cols 132<br>
stty cols 132<br>
stty rows 50<br>
stty rows 50<br>
</code>
</source>
 
 
==Device Tree Overlays==
 
'''/lib/firmware/BB-W-Radarcape.dts:'''<br>
<source lang="text" line>
/* 
* 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 Purpose License Version 2 as
* published by the Free Software Foundation
*
* Original from: github.com/jadonk/validation-scripts/blob/master/test-capemgr/
*
* Modified by Guenter Koellner for the Radarcape
* using: UART5 handshake signals and some GPIOs           
* with a great thanks to Derek Molloy - http://derekmolloy.ie/beaglebone
*
* As on the Beaglebone Black pins beeing used are occupied by eMMC and HDMI,
* it will require a different setting (and obviously, a different cape hardware)
*/
 
/dts-v1/;
/plugin/;
 
/{
    compatible = "ti,beaglebone";
    part-number = "radarcape";
    version = "00A0";
 
    fragment@0 {
        target = <&am33xx_pinmux>;
           
        __overlay__ {
            pinctrl_radarcape: radarcape_Pins {
                pinctrl-single,pins = <
 
                    /* GPIO Values: */
                    /* GPIO 0x07 Output        */
                    /* GPIO 0x27 Input pullup  */
                    /* GPIO 0x37 Input pulldown */
                    /* GPIO 0x2f Input no pull  */
                                                                   
                    /* Watchdog retrigger output */
                    0x078 0x07  /* P9_12 GPIO1_28 #60 Output Mode7 */           
                    /* GPS 1PPS Input */
                    0x040 0x37  /* P9_15 GPIO1_16 #48 Input  Mode7 pullup    PPS1 input */
                   
                    /* FPGA Pins */
                    0x018 0x37  /* P8_3  GPIO1_6  #38 Input  Mode7 pullup    CONF_DONE  */
                    0x01c 0x07  /* P8_4  GPIO1_7  #39 Output Mode7          DCLK      */
                    0x008 0x37  /* P8_5  GPIO1_2  #34 Input  Mode7 pullup    nStatus    */
                    0x030 0x07  /* P8_12 GPIO1_12 #44 Output Mode7          DATA0      */
                    0x014 0x07  /* P8_22 GPIO1_5  #37 Output Mode7          nCONF      */
 
                    /* UART5 CTS/RTS as addon to the default UART5 device tree settings */
                    0x0d8 0x36  /* P8_31 UART5_CTSN  Input  Mode6 pullup    CTS input  */
                    0x0dc 0x06  /* P8_32 UART5_RTSN  Output Mode6 no pull  RTS output */
                >;
            };
        };
    };
 
    fragment@1 {
        target = <&ocp>;
        __overlay__ {
            test_helper: helper {
                compatible = "bone-pinmux-helper";
                pinctrl-names = "default";
                pinctrl-0 = <&pinctrl_radarcape>;
                status = "okay";
            };
        };
    };
};
<source>

Revision as of 23:04, 30 September 2013

Set Environment Variables and Aliases

/etc/profile:

export SLOTS=/sys/devices/bone_capemgr.7/slots<br>
export PINS=/sys/kernel/debug/pinctrl/44e10800.pinmux/pins<br>
alias ll='ls -l'<br>
sleep 3; rdate -s ptbtime1.ptb.de &<br>
stty cols 132<br>
stty rows 50<br>


Device Tree Overlays

/lib/firmware/BB-W-Radarcape.dts:
<source lang="text" line> /*

  • 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 Purpose License Version 2 as
  • published by the Free Software Foundation
  • Original from: github.com/jadonk/validation-scripts/blob/master/test-capemgr/
  • Modified by Guenter Koellner for the Radarcape
  • using: UART5 handshake signals and some GPIOs
  • with a great thanks to Derek Molloy - http://derekmolloy.ie/beaglebone
  • As on the Beaglebone Black pins beeing used are occupied by eMMC and HDMI,
  • it will require a different setting (and obviously, a different cape hardware)
  • /

/dts-v1/; /plugin/;

/{

   compatible = "ti,beaglebone";
   part-number = "radarcape";
   version = "00A0";
   fragment@0 {
       target = <&am33xx_pinmux>;
           
       __overlay__ {
           pinctrl_radarcape: radarcape_Pins {
               pinctrl-single,pins = <
                   /* GPIO Values: */
                   /* GPIO 0x07 Output         */
                   /* GPIO 0x27 Input pullup   */
                   /* GPIO 0x37 Input pulldown */
                   /* GPIO 0x2f Input no pull  */
                                                                    
                   /* Watchdog retrigger output */
                   0x078 0x07  /* P9_12 GPIO1_28 #60 Output Mode7 */            

                   /* GPS 1PPS Input */
                   0x040 0x37  /* P9_15 GPIO1_16 #48 Input  Mode7 pullup    PPS1 input */
                   
                   /* FPGA Pins */ 
                   0x018 0x37  /* P8_3  GPIO1_6  #38 Input  Mode7 pullup    CONF_DONE  */
                   0x01c 0x07  /* P8_4  GPIO1_7  #39 Output Mode7           DCLK       */
                   0x008 0x37  /* P8_5  GPIO1_2  #34 Input  Mode7 pullup    nStatus    */
                   0x030 0x07  /* P8_12 GPIO1_12 #44 Output Mode7           DATA0      */
                   0x014 0x07  /* P8_22 GPIO1_5  #37 Output Mode7           nCONF      */
                   /* UART5 CTS/RTS as addon to the default UART5 device tree settings */ 
                   0x0d8 0x36  /* P8_31 UART5_CTSN   Input  Mode6 pullup    CTS input  */
                   0x0dc 0x06  /* P8_32 UART5_RTSN   Output Mode6 no pull   RTS output */
               >;
           };
       };
   };
   fragment@1 {
       target = <&ocp>;
       __overlay__ {
           test_helper: helper {
               compatible = "bone-pinmux-helper";
               pinctrl-names = "default";
               pinctrl-0 = <&pinctrl_radarcape>;
               status = "okay";
           };
       };
   };

}; <source>