ns16550: replace with binding files from Linux kernel
PATCH v2 1/2 ns16550: replace with binding files from Linux kernel
Replace ns16550.txt with binding files from Linux kernel. As suggested by Stephen Warren, we should keep the directory structure, filenames, and file content identical to the bindings in the Linux kernel.
--- doc/device-tree-bindings/serial/8250.txt | 66 +++++++++++++++++++ doc/device-tree-bindings/serial/ns16550.txt | 10 --- doc/device-tree-bindings/serial/omap_serial.txt | 33 ++++++++++ .../serial/snps-dw-apb-uart.txt | 76 ++++++++++++++++++++++ 4 files changed, 175 insertions(+), 10 deletions(-) create mode 100644 doc/device-tree-bindings/serial/8250.txt delete mode 100644 doc/device-tree-bindings/serial/ns16550.txt create mode 100644 doc/device-tree-bindings/serial/omap_serial.txt create mode 100644 doc/device-tree-bindings/serial/snps-dw-apb-uart.txt
doc/device-tree-bindings/serial/8250.txt new file +66 -0
@@ -0,0 +1,66 @@ +* UART (Universal Asynchronous Receiver/Transmitter) + +Required properties: +- compatible : one of: + - "ns8250" + - "ns16450" + - "ns16550a" + - "ns16550" + - "ns16750" + - "ns16850" + - For Tegra20, must contain "nvidia,tegra20-uart" + - For other Tegra, must contain '"nvidia,<chip>-uart", + "nvidia,tegra20-uart"' where <chip> is tegra30, tegra114, tegra124, + tegra132, or tegra210. + - "nxp,lpc3220-uart" + - "ralink,rt2880-uart" + - "ibm,qpace-nwp-serial" + - "altr,16550-FIFO32" + - "altr,16550-FIFO64" + - "altr,16550-FIFO128" + - "fsl,16550-FIFO64" + - "fsl,ns16550" + - "serial" if the port type is unknown. +- reg : offset and length of the register set for the device. +- interrupts : should contain uart interrupt. +- clock-frequency : the input clock frequency for the UART + or + clocks phandle to refer to the clk used as per Documentation/devicetree + /bindings/clock/clock-bindings.txt + +Optional properties: +- current-speed : the current active speed of the UART. +- reg-offset : offset to apply to the mapbase from the start of the registers. +- reg-shift : quantity to shift the register offsets by. +- reg-io-width : the size (in bytes) of the IO accesses that should be + performed on the device. There are some systems that require 32-bit + accesses to the UART (e.g. TI davinci). +- used-by-rtas : set to indicate that the port is in use by the OpenFirmware + RTAS and should not be registered. +- no-loopback-test: set to indicate that the port does not implements loopback + test mode +- fifo-size: the fifo size of the UART. +- auto-flow-control: one way to enable automatic flow control support. The + driver is allowed to detect support for the capability even without this + property. + +Note: +* fsl,ns16550: + ------------ + Freescale DUART is very similar to the PC16552D (and to a + pair of NS16550A), albeit with some nonstandard behavior such as + erratum A-004737 (relating to incorrect BRK handling). + + Represents a single port that is compatible with the DUART found + on many Freescale chips (examples include mpc8349, mpc8548, + mpc8641d, p4080 and ls2085a). + +Example: + + uart at 80230000 { + compatible = "ns8250"; + reg = <0x80230000 0x100>; + clock-frequency = <3686400>; + interrupts = <10>; + reg-shift = <2>; + };
doc/device-tree-bindings/serial/ns16550.txt deleted +0 -10
@@ -1,10 +0,0 @@ -NS16550 UART - -This UART driver supports many chip variants and is used in mamy SoCs. - -Required properties: -- compatible: "ns16550" or "nvidia,tegra20-uart" -- reg: start address and size of registers -- reg-shift: shift value indicating register size: 0=byte, 1=16bit,2=32bit etc. -- clock-frequency: input clock frequency for the UART (used to calculate the - baud rate divisor)
doc/device-tree-bindings/serial/omap_serial.txt new file +33 -0
@@ -0,0 +1,33 @@ +OMAP UART controller + +Required properties: +- compatible : should be "ti,omap2-uart" for OMAP2 controllers +- compatible : should be "ti,omap3-uart" for OMAP3 controllers +- compatible : should be "ti,omap4-uart" for OMAP4 controllers +- compatible : should be "ti,am4372-uart" for AM437x controllers +- compatible : should be "ti,am3352-uart" for AM335x controllers +- compatible : should be "ti,dra742-uart" for DRA7x controllers +- reg : address and length of the register space +- interrupts or interrupts-extended : Should contain the uart interrupt + specifier or both the interrupt + controller phandle and interrupt + specifier. +- ti,hwmods : Must be "uart<n>", n being the instance number (1-based) + +Optional properties: +- clock-frequency : frequency of the clock input to the UART +- dmas : DMA specifier, consisting of a phandle to the DMA controller + node and a DMA channel number. +- dma-names : "rx" for receive channel, "tx" for transmit channel. + +Example: + + uart4: serial at 49042000 { + compatible = "ti,omap3-uart"; + reg = <0x49042000 0x400>; + interrupts = <80>; + dmas = <&sdma 81 &sdma 82>; + dma-names = "tx", "rx"; + ti,hwmods = "uart4"; + clock-frequency = <48000000>; + };
doc/device-tree-bindings/serial/snps-dw-apb-uart.txt new file +76 -0
76 lines not on this page · raw message
Signature · 1 line
2.5.0
PATCH v2 2/2 ns16550: zap the rockchip serial compatible string
Zap the rockchip serial compatible string, because rockchip serial has "snps,dw-apb-uart" compatible string in the dts.
--- drivers/serial/ns16550.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/serial/ns16550.c +5 -1
@@ -424,11 +424,15 @@ const struct dm_serial_ops ns16550_serial_ops = { };#if CONFIG_IS_ENABLED (OF_CONTROL ) +/* +* Please consider existing compatible strings before adding a new +* one to keep this table compact. Or you may add a generic "ns16550" +* compatible string to your dts. +*/ static const struct udevice_id ns16550_serial_ids[] = { { .compatible ="ns16550" }, { .compatible ="ns16550a" }, { .compatible ="nvidia,tegra20-uart" }, - { .compatible ="rockchip,rk3036-uart" }, { .compatible ="snps,dw-apb-uart" }, { .compatible ="ti,omap2-uart" }, { .compatible = "ti,omap3-uart" },
Signature · 1 line
2.5.0
PATCH v2 2/2 ns16550: zap the rockchip serial compatible string
Quoted 2 lines · Thomas Chou
Zap the rockchip serial compatible string, because rockchip serial has "snps,dw-apb-uart" compatible string in the dts.
More importantly, the rockchip compatible value isn't defined in the binding.
PATCH v2 2/2 ns16550: zap the rockchip serial compatible string
In reply to Thomas ChouQuoted 7 lines · Thomas Chou
Zap the rockchip serial compatible string, because rockchip serial has "snps,dw-apb-uart" compatible string in the dts.
Signed-off-by Thomas Chou <[email protected]>--- drivers/serial/ns16550.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
PATCH v2 2/2 ns16550: zap the rockchip serial compatible string
In reply to Thomas ChouQuoted 5 lines · Thomas Chou
Zap the rockchip serial compatible string, because rockchip serial has "snps,dw-apb-uart" compatible string in the dts.
Signed-off-by Thomas Chou <[email protected]>Acked-by Simon Glass <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160125/271f51af/attachment.sig>
PATCH v2 1/2 ns16550: replace with binding files from Linux kernel
In reply to Thomas ChouQuoted 3 lines · Thomas Chou
Replace ns16550.txt with binding files from Linux kernel. As suggested by Stephen Warren, we should keep the directory structure, filenames, and file content identical to the bindings in the Linux kernel.
(I assume that the new files are identical to the kernel versions, although I didn't validate this)
(Or, I'd give my ack to simply deleting doc/device-tree-bindings/ so the redundant copy doesn't have to be maintained).
PATCH v2 1/2 ns16550: replace with binding files from Linux kernel
Hi,
Quoted 8 lines · Stephen Warren
Quoted 4 lines · Thomas Chou
Replace ns16550.txt with binding files from Linux kernel. As suggested by Stephen Warren, we should keep the directory structure, filenames, and file content identical to the bindings in the Linux kernel.
Quoted 5 lines
Acked-by Stephen Warren <[email protected]>(I assume that the new files are identical to the kernel versions, although I didn't validate this)
(Or, I'd give my ack to simply deleting doc/device-tree-bindings/ so the redundant copy doesn't have to be maintained).
I think we should keep it for now, until there is a separate repo and we have had some success upstreaming our bindings.
Regards,
Simon
PATCH v2 1/2 ns16550: replace with binding files from Linux kernel
In reply to Stephen WarrenQuoted 10 lines · Stephen Warren
Quoted 3 lines · Thomas Chou
Replace ns16550.txt with binding files from Linux kernel. As suggested by Stephen Warren, we should keep the directory structure, filenames, and file content identical to the bindings in the Linux kernel.
Acked-by Stephen Warren <[email protected]>(I assume that the new files are identical to the kernel versions, although I didn't validate this)
Yes, they are exactly identical to the kernel versions.
Quoted 3 lines
(Or, I'd give my ack to simply deleting doc/device-tree-bindings/ so the redundant copy doesn't have to be maintained).
Best regards,
Thomas
PATCH v2 1/2 ns16550: replace with binding files from Linux kernel
In reply to Thomas ChouQuoted 5 lines · Thomas Chou
Replace ns16550.txt with binding files from Linux kernel. As suggested by Stephen Warren, we should keep the directory structure, filenames, and file content identical to the bindings in the Linux kernel.
Signed-off-by Thomas Chou <[email protected]>
Quoted 10 lines
--- doc/device-tree-bindings/serial/8250.txt | 66 +++++++++++++++++++ doc/device-tree-bindings/serial/ns16550.txt | 10 --- doc/device-tree-bindings/serial/omap_serial.txt | 33 ++++++++++ .../serial/snps-dw-apb-uart.txt | 76 ++++++++++++++++++++++ 4 files changed, 175 insertions(+), 10 deletions(-) create mode 100644 doc/device-tree-bindings/serial/8250.txt delete mode 100644 doc/device-tree-bindings/serial/ns16550.txt create mode 100644 doc/device-tree-bindings/serial/omap_serial.txt create mode 100644 doc/device-tree-bindings/serial/snps-dw-apb-uart.txt
PATCH v2 1/2 ns16550: replace with binding files from Linux kernel
In reply to Thomas ChouQuoted 7 lines · Thomas Chou
Replace ns16550.txt with binding files from Linux kernel. As suggested by Stephen Warren, we should keep the directory structure, filenames, and file content identical to the bindings in the Linux kernel.
Signed-off-by Thomas Chou <[email protected]>Acked-by Stephen Warren <[email protected]>Reviewed-by Simon Glass <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160125/3b51c094/attachment.sig>