Advertisement
Guest User

Beaglebone RS485 DTS

a guest
Jun 22nd, 2015
448
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.42 KB | None | 0 0
  1. /*
  2.  * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/
  3.  *
  4.  * This program is free software; you can redistribute it and/or modify
  5.  * it under the terms of the GNU General Public License version 2 as
  6.  * published by the Free Software Foundation.
  7.  */
  8. /dts-v1/;
  9. /plugin/;
  10.  
  11. / {
  12.     compatible = "ti,beaglebone", "ti,beaglebone-black";
  13.  
  14.     /* identification */
  15.     part-number = "BB-BONE-EXT-485";
  16.     version = "00A0";
  17.  
  18.     exclusive-use =
  19.         "P9.21", /* UART2_RXD */
  20.         "P9.22", /* UART2_TXD */
  21.         "P9.12",
  22.         "gpio1_28", /* UART2_RTS */
  23.         "uart2";
  24.  
  25.     fragment@0 {
  26.         target = <&am33xx_pinmux>;
  27.         __overlay__ {
  28.             bb_rs485_ext_pins: pinmux_bb_rs485_ext_pins {
  29.                 pinctrl-single,pins = <
  30.                          0x150 0x21  /* P0_3 = UART2_RXD, MODE1 */
  31.                          0x154 0x01  /* P0_2 = UART2_TXD, MODE1 */
  32.                          0x078 0x07
  33.                  >;
  34.             };
  35.         };
  36.     };
  37.  
  38.     fragment@1{
  39.         target = <&uart3>; /* note we are really using uart2 but say uart3 here to force creation of /dev/ttyO2 */
  40.         __overlay__ {
  41.         pinctrl-names = "default";
  42.         pinctrl-0 = <&bb_rs485_ext_pins>;
  43.         rs485-rts-delay = <0 0>;
  44.         rts-gpio = <&gpio1 28 0>;
  45.         rs485-rts-active-high;
  46.         linux,rs485-enabled-at-boot-time;
  47.         status = "okay";
  48.         };
  49.     };
  50. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement