Message ID | 1501161456-13367-4-git-send-email-yegorslists@googlemail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Thu, Jul 27, 2017 at 03:17:36PM +0200, yegorslists@googlemail.com wrote: > From: Yegor Yefremov <yegorslists@googlemail.com> > > Describe {rts,cts,dtr,dsr,rng,dcd}-gpios usage. > > Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> > Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com> > --- > Documentation/devicetree/bindings/serial/8250.txt | 26 +++++++++++++++++++++++ > 1 file changed, 26 insertions(+) > > diff --git a/Documentation/devicetree/bindings/serial/8250.txt b/Documentation/devicetree/bindings/serial/8250.txt > index 419ff6c..1c09db2 100644 > --- a/Documentation/devicetree/bindings/serial/8250.txt > +++ b/Documentation/devicetree/bindings/serial/8250.txt > @@ -48,6 +48,16 @@ Optional properties: > - tx-threshold: Specify the TX FIFO low water indication for parts with > programmable TX FIFO thresholds. > - resets : phandle + reset specifier pairs > +- rts-gpios: > +- cts-gpios: > +- dtr-gpios: > +- dsr-gpios: > +- rng-gpios: > +- dcd-gpios: specify a GPIO for RTS/CTS/DTR/DSR/RI/DCD > + line respectively. It will use specified GPIO instead of the peripheral > + function pin for the UART feature. If unsure, don't specify this property. These are already described in serial.txt. > + If "wakeup-source" property is specified for the device this GPIO > + initialization will be aborted. Why? Many GPIOs can function as wake-up sources. You would need get the IRQ for the GPIO. Also, some UARTs wake-up from the RX line. Not sure about any 8250 flavors, but is probably implementation specific what is the trigger for wake-up. Rob -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/Documentation/devicetree/bindings/serial/8250.txt b/Documentation/devicetree/bindings/serial/8250.txt index 419ff6c..1c09db2 100644 --- a/Documentation/devicetree/bindings/serial/8250.txt +++ b/Documentation/devicetree/bindings/serial/8250.txt @@ -48,6 +48,16 @@ Optional properties: - tx-threshold: Specify the TX FIFO low water indication for parts with programmable TX FIFO thresholds. - resets : phandle + reset specifier pairs +- rts-gpios: +- cts-gpios: +- dtr-gpios: +- dsr-gpios: +- rng-gpios: +- dcd-gpios: specify a GPIO for RTS/CTS/DTR/DSR/RI/DCD + line respectively. It will use specified GPIO instead of the peripheral + function pin for the UART feature. If unsure, don't specify this property. + If "wakeup-source" property is specified for the device this GPIO + initialization will be aborted. Note: * fsl,ns16550: @@ -69,3 +79,19 @@ Example: interrupts = <10>; reg-shift = <2>; }; + +Example for OMAP UART using GPIO-based modem control signals: + + uart4: serial@49042000 { + compatible = "ti,omap3-uart"; + reg = <0x49042000 0x400>; + interrupts = <80>; + ti,hwmods = "uart4"; + clock-frequency = <48000000>; + cts-gpios = <&gpio3 5 GPIO_ACTIVE_LOW>; + rts-gpios = <&gpio3 6 GPIO_ACTIVE_LOW>; + dtr-gpios = <&gpio1 12 GPIO_ACTIVE_LOW>; + dsr-gpios = <&gpio1 13 GPIO_ACTIVE_LOW>; + dcd-gpios = <&gpio1 14 GPIO_ACTIVE_LOW>; + rng-gpios = <&gpio1 15 GPIO_ACTIVE_LOW>; + };