Lemuntu

UART rts/cts support

6 638
r9ft  
Hi

Is it possible to get flow control (rts/cts) for uart0 (/dev/ttyS0)  working? I need it for external RS485 convertor TX control.
So we need to modify DTS (https://github.com/LeMaker/linux ... guitar_bbb_plus.dts) file or anything else?

In S500 Datasheet I found that "Only UART2\3 supports RTS/CTS Automatic Hardware Flow Control".
How to enable it linux support for uart2 or  uart3?

Is it possible to enable software (in serial device driver) rts/cts for uart0?

Thanks a lot for any response.
r9ft  
I found that baseboard 40-pin pin connector does not have rts/cts S500 hardware pins.

So, the only good way (I think...) is to implement software pin control in /linux-actions/arch/arm/mach-owl/serial-owl.c

I have done some quick test with it. Here is a patch to control rs485 transmitter on GPIOB8 pin 12, but it is still need to be modidfied for a good work.

Any comments?

  1. --- serial-owl.c_       2017-04-10 12:39:31.000000000 +0500
  2. +++ serial-owl.c        2017-05-05 16:58:25.816473623 +0500
  3. @@ -40,6 +40,8 @@
  4. #include <linux/dma-mapping.h>
  5. #include <linux/dma-direction.h>

  6. +#include <linux/gpio.h>
  7. +
  8. #include <mach/hardware.h>
  9. #include <mach/irqs.h>
  10. #include <mach/hdmac-owl.h>
  11. @@ -166,6 +168,17 @@

  12. static int owl_uart_start_dma(struct owl_uart_port *owl_uart_port, bool dma_to_memory);

  13. +static void txen485_on()
  14. +{
  15. +       gpio_set_value(40,1);
  16. +}
  17. +
  18. +static void txen485_off()
  19. +{
  20. +       gpio_set_value(40,0);
  21. +}
  22. +
  23. +
  24. static inline struct uart_port *get_port_from_line(unsigned int line)
  25. {
  26.         return &owl_uart_ports[line].uart;
  27. @@ -200,6 +213,8 @@
  28.         unsigned int data;
  29.         struct owl_uart_port *owl_uart_port = UART_TO_OWL_UART_PORT(port);

  30. +txen485_on();
  31. +
  32.         if (owl_uart_port->enable_dma_tx) {
  33.                 if (owl_uart_port->tx_dma_in_progress)
  34.                         return;
  35. @@ -224,10 +239,20 @@
  36.         struct owl_uart_port *owl_uart_port = UART_TO_OWL_UART_PORT(port);
  37.         unsigned int data;

  38. +
  39.         owl_uart_port->tx_dma_in_progress = 0;
  40.         if (owl_uart_port->enable_dma_tx)
  41.                 dmaengine_terminate_all(owl_uart_port->tx_dma_chan);

  42. +       data = owl_read(port, UART_STAT);
  43. +if (data & UART_STAT_TFES)
  44. +{
  45. +mdelay(10);
  46. +txen485_off();
  47. +}
  48. +
  49. +
  50. +
  51.         data = owl_read(port, UART_CTL);
  52.         data &= ~(UART_CTL_TXIE | UART_CTL_TXDE);
  53.         owl_write(port, data, UART_CTL);
  54. @@ -1531,6 +1556,10 @@
  55.                         owl_console_port);
  56. #endif

  57. +gpio_request(40,"gpio40");
  58. +gpio_direction_output(40, 0);
  59. +
  60. +
  61.         return uart_set_options(port, co, baud, parity, bits, flow);
  62. }
Copy the Code

abc20180506
jordan retro 11
ralph lauren
moncler jackets
ralph lauren outlet
christian louboutin outlet
longchamp handbags
moncler outlet
oakley sunglasses
michael kors outlet
michael kors outlet canada
skechers shoes
oakley sunglasses
timberland boots outlet
fitflops sale
gucci handbags
adidas shoes
ray ban sunglasses
coach factory outlet online
air max 2019
tory burch outlet
valentino shoes outlet
michael kors factory outlet
canada goose outlet
air max 97
cheap ray ban sunglasses
michael kors outlet
yeezy 350 boost
canada goose outlet
michael kors outlet
pandora charms
burberry outlet
air max 90
michael kors outlet
tiffany and co
nike shoes for men
cheap uggs
coach outlet store
valentino shoes
canada goose uk
polo ralph lauren
birkenstock sandals
asics shoes
abercrombie and fitch
pandora outlet
canada goose
jordans
ralph lauren
mont blanc
michael kors
michael kors handbags
moncler jackets
michael kors outlet
hermes birkin
red bottoms
adidas nmd
uggs outlet
kate spade outlet store
adidas yeezy
abercrombie
philipp plein shirt
ugg outlet
ralph lauren outlet online
cheap jordans
kate spade
cheap jordans
coach outlet canada
canada goose sale
birkenstock outlet
moncler outlet
adidas nmd
oakley sunglasses
jordans
jordan shoes
cheap jordans
ugg boots on sale
pandora jewelry
gucci outlet
kate spade outlet
ferragamo outlet
ralph lauren uk
oakley sunglasses
ugg outlet
fitflops
kate spade handbags
adidas nmd
canada goose outlet
jordan shoes
yeezy boost
oakley sunglasses
coach outlet online
canada goose
birkenstock sandals
adidas shoes
kate spade outlet store
oakley sunglasses
ray ban sunglasses
pandora jewelry
kobe shoes
discount oakley sunglasses
polo ralph lauren outlet online
canada goose outlet
adidas outlet
coach outlet
moncler
ray ban sunglasses discount
michael kors outlet clearance
michael kors outlet clearance
michael kors outlet clearance
adidas outlet
salvatore ferragamo
nike shoes
michael kors outlet clearance
coach factory outlet
ralph lauren
coach factory outlet
cheap jordans
ultra boost
canada goose outlet
moncler jackets
coach outlet
canada goose jackets
salvatore ferragamo shoes
uggs
gucci handbags outlet
louis vuitton outlet online
longchamp outlet
pandora outlet
fitflops
new balance outlet
tory burch outlet
abc20180506

2018.9.10zhouyanhua
sac longchamp
timberland
true religion jeans
james harden jersey
burberry sunglasses
versace handbags
pandora rings
burberry bags
longchamp
converse
nfl jerseys
ray ban sunglasses
salvatore ferragamo shoes
basketball jerseys
lebron james shoes
nike vapor max
adidas zx flux
antonio brown jersey
ray ban sunglasses
burberry outlet
prada outlet
adidas slides
jordans
air zoom pegasus
toms outlet
sac vanessa bruno
asics gel lyte
longchamp handbags
nike roshe
scarpe nike
michael kors outlet
adidas outlet
kd 9
karen millen
fendi sunglasses
nike air max
tory burch
nike air max
pandora bracciali
christian louboutin
pandora jewelry
bijoux swarovski
hollister outlet
jordan
adidas superstar
rolex watches
dior handbags
nike free run
bathing ape
chloe sunglasses
nike shoes canada
stuart weitzman shoes
marc jacobs handbags
kristaps porzingis jersey
canada goose jackets
jordan shoes
converse
nike blazer
nike blazer
valentino shoes
guess handbags
nike outlet
gucci outlet online
chanel
prada handbags
mizuno running shoes
polo ralph lauren
wedding dresses
fendi
adidas originals
sac michael kors
swarovski jewelry
dolce & gabbana sunglasses
air max 95
adidas outlet
sac burberry
soccer jerseys
air max 90
kobe 12
kobe 11
nike air max
gucci shoes
converse shoes
air max 95
timberland
lunette ray ban
10 deep clothing
pandora charms
air force 1
chanel handbags
nike shoes
true religion outlet
tiffany jewelry
insanity workout
lacoste jeans
tory burch outlet
jordan shoes
freshjive clothing
argentina world cup jersey
lululemon outlet
2018.9.10zhouyanhua

ferragamo shoes
pandora charms
womens ugg boots
lebron james jersey
nike trainers
jordan 5
ugg slippers
under armour
the north face
oakley sunglasses
ugg outlet
nike lunarglide
audemars piguet
miu miu handbags
michael kors outlet
ugg sale
nike outlet
nike air force 1
ray ban wayfarers
adidas shoes
jordan shoes
cheap soccer jerseys
christian louboutin shoes
coach outlet online
ralph lauren
coach outlet
nike sb
nike shoes for women
bcbg
fitflops
nike flight bonafide
stephen curry shoes
christian louboutin outlet
jordan shoes
oakley sunglasses
burberry outlet
coach bags
ugg boots
harden vol 1
polo outlet
cheap jerseys
moncler outlet
adidas stan smith
ugg boots
fitflops
ugg for women
cristiano ronaldo jersey
lebron ambassador 10
jordan shoes
stuart weitzman
north face jackets
monster headphones
dolce & gabbana
ray ban sunglasses
adidas outlet
air jordan
cheap jordans
maglia calcio
louboutin
saucony shoes
nike socks
nike factory
true religion jeans
soccer jerseys
ugg boots
mlb jerseys
jordan xx9
polo shirts
spalding basketball
coach outlet
columbia outlet
basketball shoes
ray ban
flops
pasotti ombrelli
ugg shoes
marc jacobs
nfl jerseys
nike factory
manolo blahnik
baby uggs
salvatore ferragamo
jordan pas cher
canada goose jackets
pandora jewelry
coach factory outlet
oakley sunglasses
soccer jerseys
north face outlet
coach outlet
michael kors handbags
michael kors handbags
fitflops sale
ugg australia
bvlgari jewelry
off-white
michael kors handbags
light up shoes
ugg sale
basketball shoes
chenyingying20180912

portugal world cup jersey
polo lacoste pas cher
rolex watches
occhiali oakley
cheap wedding dresses
adidas soccer
nike air zoom pegasus
timberland boots
dolce & gabbana sunglasses
aaron rodgers jersey
ferragamo sunglasses
vibram fivefingers
jordan 4
dyson hair dryer
furla handbags
michael kors uk
madrid jersey
tory burch outlet
adidas flip-flops
nike roshe
longchamp pas cher
canada goose jackets
rolex watches
christian louboutin
arcteryx jackets
nike free
jordan 6
michael jordan
jordan 4
bcbg dresses
oakley sunglasses
dsquared2 jeans
cheap wedding dresses
oakley sunglasses
longchamp
curry 3
jordan 7
dansko outlet
adidas superstar
dak prescott jersey
kevin durant shoes
supra shoes
chopard jewelry
lacoste shoes
ralph lauren outlet
adidas zx flux
adidas outlet
marc jacobs handbags
ray ban
kenzo clothing
true religion jeans
supra shoes
karen millen
adidas running shoes
adidas superstar
soccer jerseys
true religion jeans
kates pade outlet online
jordan 5
burberry sale
michael kors outlet
mont blanc pens
nike shoes
insanity
christian louboutin
links of london uk
nike blazer
adidas outlet store
jordan 10
jordan 32
antonio brown jersey
barbour
dolce & gabbana
adidas crazy
fossil handbags
oakley pas cher
lebron shoes
cheap oakley sunglasses
ray ban
nike roshe run
moncler jackets
curry 4
mac cosmetics
hermes bags
montre homme
guess canada
adidas outlet store
oakley sunglasses
burberry
nike shoes
air max
air more uptempo
nike mercurial
jordan 31
toms shoes
hermes
argentina world cup jersey
kobe bryant shoes
nike canada
replica watches
2018.10.20xukaimin

michael kors bags
air max
air jordan
russell westbrook shoes
running shoes
lebron 15
cheap soccer jerseys
vetements clothing
ugg clearance
canada goose jackets
ugg outlet
ugg australia
adidas uk
mcm bags
coach factory outlet
vendita maglie calcio
ugg sale
coach purse
supreme uk
wholesale hats
moncler jackets
soccer shirts
air max
cheap mlb jerseys
coach outlet
hermes birkin bag
russell wilson jersey
fingerlings monkey
balenciaga sandals
jordan 4
jordan 8
omega watches
longchamp
bcbg dresses
coach outlet online
burberry canada
nike dunks
longchamp handbags
jimmy choo
air max 90
ugg boots
baseball jersey
montblanc pen
michael kors handbags
oakley sunglasses cheap
nfl jerseys
coach outlet
prada sunglasses
air jordan 11
burberry outlet
nike shoes for men
ugg outlet
nine west shoes
polo ralph lauren
ugg outlet
tiffany jewelry
new balance
air jordan
stuart weitzman shoes
ugg outlet
maillot de foot
nike shox
oakley vault
ugg sale
ralph lauren
cheap nfl jerseys
prada handbags
parajumpers jackets
ugg boots
adidas superstar
timberland boots
nike air max
ugg outlet
harden vol 2
michael kors outlet clearance
nobis jackets
snapback hats
oakley sunglasses
pasotti ombrelli
bottega veneta
moncler outlet
adidas football boots
nike outlet store online
ray ban
coach handbags
kate spade
nike free run
uggs on sale
coach outlet online
pelikan pens
louboutin
michael kors handbags
tom brady jersey
pandora jewelry
jimmy choo
christian louboutin
canada goose outlet
ray ban sunglasses
nike lunarglide
201810.20wengdongdong

You have to log in before you can reply Login | Sign Up

Points Rules