diff mbox

[v4,2/2] DTS: serial: Add bindings documention for the Mediatek UARTs

Message ID 1407852737-17265-3-git-send-email-matthias.bgg@gmail.com
State Superseded, archived
Headers show

Commit Message

Matthias Brugger Aug. 12, 2014, 2:12 p.m. UTC
This patch adds the devicetree documentation for the Mediatek UART.

Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
---
 .../devicetree/bindings/serial/mtk-uart.txt        |   20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/serial/mtk-uart.txt

Comments

Mark Rutland Sept. 2, 2014, 11:31 a.m. UTC | #1
On Tue, Aug 12, 2014 at 03:12:17PM +0100, Matthias Brugger wrote:
> This patch adds the devicetree documentation for the Mediatek UART.
> 
> Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
> ---
>  .../devicetree/bindings/serial/mtk-uart.txt        |   20 ++++++++++++++++++++
>  1 file changed, 20 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/serial/mtk-uart.txt
> 
> diff --git a/Documentation/devicetree/bindings/serial/mtk-uart.txt b/Documentation/devicetree/bindings/serial/mtk-uart.txt
> new file mode 100644
> index 0000000..6ca0e15
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/serial/mtk-uart.txt
> @@ -0,0 +1,20 @@
> +* Mediatek Universal Asynchronous Receiver/Transmitter (UART)
> +
> +Required properties:
> +- compatible: "mediatek,mt6577-uart"
> +  Compatibility with mt6577, mt6589, mt6582
> +
> +- reg: The base address of the UART register bank.
> +
> +- interrupts: A single interrupt specifier.
> +
> +- clocks: Clock driving the hardware.
> +
> +Example:
> +
> +	uart0: serial@11006000 {
> +		compatible = "mediatek,mt6577-uart";
> +		reg = <0x11006000 0x400>;
> +		interrupts = <GIC_SPI 51 IRQ_TYPE_LEVEL_LOW>;
> +		clocks = <&uart_clk>;
> +	};

This looks generally sane to me. It's simple and doesn't seem to have
any of the usual problems bindings have.

For the mt6577, mt6589, and mt6582, Do you expect to have specific
strings like:

compatible = "mediatek,mt6589-uart", "mediatek,mt6577-uart";

If so, could you update the compatible description to something like:

- compatible: should contain:
  * "mediatek,mt6589-uart" for ...
  * "mediatek,mt6582-uart" for ...
  * "mediatek,mt6577-uart" for all compatible UARTS (mt6589,mt6582,mt6577)

That way the driver just needs to recognise "mediatek,mt6577-uart" for
now but can have quirks later if we discover integration differences.

Cheers,
Mark.
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
gregkh@linuxfoundation.org Sept. 8, 2014, 10:33 p.m. UTC | #2
On Tue, Aug 12, 2014 at 04:12:17PM +0200, Matthias Brugger wrote:
> This patch adds the devicetree documentation for the Mediatek UART.
> 
> Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
> ---
>  .../devicetree/bindings/serial/mtk-uart.txt        |   20 ++++++++++++++++++++
>  1 file changed, 20 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/serial/mtk-uart.txt
> 
> diff --git a/Documentation/devicetree/bindings/serial/mtk-uart.txt b/Documentation/devicetree/bindings/serial/mtk-uart.txt
> new file mode 100644
> index 0000000..6ca0e15
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/serial/mtk-uart.txt
> @@ -0,0 +1,20 @@
> +* Mediatek Universal Asynchronous Receiver/Transmitter (UART)
> +
> +Required properties:
> +- compatible: "mediatek,mt6577-uart"
> +  Compatibility with mt6577, mt6589, mt6582
> +
> +- reg: The base address of the UART register bank.
> +
> +- interrupts: A single interrupt specifier.
> +
> +- clocks: Clock driving the hardware.
> +
> +Example:
> +
> +	uart0: serial@11006000 {
> +		compatible = "mediatek,mt6577-uart";
> +		reg = <0x11006000 0x400>;
> +		interrupts = <GIC_SPI 51 IRQ_TYPE_LEVEL_LOW>;
> +		clocks = <&uart_clk>;
> +	};
> -- 
> 1.7.9.5

Resend this one as well with the 1/2 patch please.

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Matthias Brugger Sept. 9, 2014, 2:55 p.m. UTC | #3
2014-09-09 0:33 GMT+02:00 Greg KH <gregkh@linuxfoundation.org>:
> On Tue, Aug 12, 2014 at 04:12:17PM +0200, Matthias Brugger wrote:
>> This patch adds the devicetree documentation for the Mediatek UART.
>>
>> Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
>> ---
>>  .../devicetree/bindings/serial/mtk-uart.txt        |   20 ++++++++++++++++++++
>>  1 file changed, 20 insertions(+)
>>  create mode 100644 Documentation/devicetree/bindings/serial/mtk-uart.txt
>>
>> diff --git a/Documentation/devicetree/bindings/serial/mtk-uart.txt b/Documentation/devicetree/bindings/serial/mtk-uart.txt
>> new file mode 100644
>> index 0000000..6ca0e15
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/serial/mtk-uart.txt
>> @@ -0,0 +1,20 @@
>> +* Mediatek Universal Asynchronous Receiver/Transmitter (UART)
>> +
>> +Required properties:
>> +- compatible: "mediatek,mt6577-uart"
>> +  Compatibility with mt6577, mt6589, mt6582
>> +
>> +- reg: The base address of the UART register bank.
>> +
>> +- interrupts: A single interrupt specifier.
>> +
>> +- clocks: Clock driving the hardware.
>> +
>> +Example:
>> +
>> +     uart0: serial@11006000 {
>> +             compatible = "mediatek,mt6577-uart";
>> +             reg = <0x11006000 0x400>;
>> +             interrupts = <GIC_SPI 51 IRQ_TYPE_LEVEL_LOW>;
>> +             clocks = <&uart_clk>;
>> +     };
>> --
>> 1.7.9.5
>
> Resend this one as well with the 1/2 patch please.

Ok, I will send v5 with the comments from Mark added.

>
> thanks,
>
> greg k-h
diff mbox

Patch

diff --git a/Documentation/devicetree/bindings/serial/mtk-uart.txt b/Documentation/devicetree/bindings/serial/mtk-uart.txt
new file mode 100644
index 0000000..6ca0e15
--- /dev/null
+++ b/Documentation/devicetree/bindings/serial/mtk-uart.txt
@@ -0,0 +1,20 @@ 
+* Mediatek Universal Asynchronous Receiver/Transmitter (UART)
+
+Required properties:
+- compatible: "mediatek,mt6577-uart"
+  Compatibility with mt6577, mt6589, mt6582
+
+- reg: The base address of the UART register bank.
+
+- interrupts: A single interrupt specifier.
+
+- clocks: Clock driving the hardware.
+
+Example:
+
+	uart0: serial@11006000 {
+		compatible = "mediatek,mt6577-uart";
+		reg = <0x11006000 0x400>;
+		interrupts = <GIC_SPI 51 IRQ_TYPE_LEVEL_LOW>;
+		clocks = <&uart_clk>;
+	};