All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/2] ns16550: update compatible and reg-shift binding
@ 2015-12-11  5:08 Thomas Chou
  2015-12-11  5:08 ` [U-Boot] [PATCH 2/2] ns16550: zap the rockchip serial compatible string Thomas Chou
  2015-12-11  5:35 ` [U-Boot] [PATCH 1/2] ns16550: update compatible and reg-shift binding Stephen Warren
  0 siblings, 2 replies; 6+ messages in thread
From: Thomas Chou @ 2015-12-11  5:08 UTC (permalink / raw)
  To: u-boot

Update compatible and reg-shift in device tree binding.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
---
 doc/device-tree-bindings/serial/ns16550.txt | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)

diff --git a/doc/device-tree-bindings/serial/ns16550.txt b/doc/device-tree-bindings/serial/ns16550.txt
index ef0b9ae..2b3904b 100644
--- a/doc/device-tree-bindings/serial/ns16550.txt
+++ b/doc/device-tree-bindings/serial/ns16550.txt
@@ -3,8 +3,21 @@ NS16550 UART
 This UART driver supports many chip variants and is used in mamy SoCs.
 
 Required properties:
-- compatible: "ns16550" or "nvidia,tegra20-uart"
+- compatible: one of:
+	- "ns16550"
+	- "ns16550a"
+	- "nvidia,tegra20-uart"
+	- "snps,dw-apb-uart"
+	- "ti,omap2-uart"
+	- "ti,omap3-uart"
+	- "ti,omap4-uart"
+	- "ti,am3352-uart"
+	- "ti,am4372-uart"
+	- "ti,dra742-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)
+
+Optional properties:
+- reg-shift: shift value indicating register size: 0=byte, 1=16bit, 2=32bit etc.
+  default to 0 if not given.
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH 2/2] ns16550: zap the rockchip serial compatible string
  2015-12-11  5:08 [U-Boot] [PATCH 1/2] ns16550: update compatible and reg-shift binding Thomas Chou
@ 2015-12-11  5:08 ` Thomas Chou
  2015-12-19  2:51   ` Simon Glass
  2015-12-11  5:35 ` [U-Boot] [PATCH 1/2] ns16550: update compatible and reg-shift binding Stephen Warren
  1 sibling, 1 reply; 6+ messages in thread
From: Thomas Chou @ 2015-12-11  5:08 UTC (permalink / raw)
  To: u-boot

Zap the rockchip serial compatible string, because rockchip
serial has "snps,dw-apb-uart" compatible string in the dts.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
---
 drivers/serial/ns16550.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/serial/ns16550.c b/drivers/serial/ns16550.c
index 3fab3f1..06ac005 100644
--- a/drivers/serial/ns16550.c
+++ b/drivers/serial/ns16550.c
@@ -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" },
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH 1/2] ns16550: update compatible and reg-shift binding
  2015-12-11  5:08 [U-Boot] [PATCH 1/2] ns16550: update compatible and reg-shift binding Thomas Chou
  2015-12-11  5:08 ` [U-Boot] [PATCH 2/2] ns16550: zap the rockchip serial compatible string Thomas Chou
@ 2015-12-11  5:35 ` Stephen Warren
  2015-12-11  7:08   ` Thomas Chou
  1 sibling, 1 reply; 6+ messages in thread
From: Stephen Warren @ 2015-12-11  5:35 UTC (permalink / raw)
  To: u-boot

On 12/10/2015 10:08 PM, Thomas Chou wrote:
> Update compatible and reg-shift in device tree binding.

Has this change been submitted to and accepted by the Linux kernel?
That's where the official DT binding documents are stored. Honestly I
think we should remove the copies in U-Boot to avoid confusion and forking.

The content of the change looks reasonable at a quick glance.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH 1/2] ns16550: update compatible and reg-shift binding
  2015-12-11  5:35 ` [U-Boot] [PATCH 1/2] ns16550: update compatible and reg-shift binding Stephen Warren
@ 2015-12-11  7:08   ` Thomas Chou
  2015-12-11 15:42     ` Stephen Warren
  0 siblings, 1 reply; 6+ messages in thread
From: Thomas Chou @ 2015-12-11  7:08 UTC (permalink / raw)
  To: u-boot

Hi Stephen,

On 2015?12?11? 13:35, Stephen Warren wrote:
> On 12/10/2015 10:08 PM, Thomas Chou wrote:
>> Update compatible and reg-shift in device tree binding.
>
> Has this change been submitted to and accepted by the Linux kernel?
> That's where the official DT binding documents are stored. Honestly I
> think we should remove the copies in U-Boot to avoid confusion and forking.
>
> The content of the change looks reasonable at a quick glance.
>

These changes actually came from Linux kernel. They are scattered in 
several files. I included only those are prevalent to u-boot.

8250.txt
- 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.

omap_serial.txt
- 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

snps-dw-apb-uart.txt
- compatible : "snps,dw-apb-uart"
- reg-shift : quantity to shift the register offsets by.  If this 
property is not present then the register offsets are not shifted.

I can change the description reg-shift property to above if this make it 
clearer.

I would agree that we can remove these copies of Linux kernel. Almost 
every dts binding I added to u-boot these months are copied from Linux 
kernel.

Best regards,
Thomas

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH 1/2] ns16550: update compatible and reg-shift binding
  2015-12-11  7:08   ` Thomas Chou
@ 2015-12-11 15:42     ` Stephen Warren
  0 siblings, 0 replies; 6+ messages in thread
From: Stephen Warren @ 2015-12-11 15:42 UTC (permalink / raw)
  To: u-boot

On 12/11/2015 12:08 AM, Thomas Chou wrote:
> Hi Stephen,
>
> On 2015?12?11? 13:35, Stephen Warren wrote:
>> On 12/10/2015 10:08 PM, Thomas Chou wrote:
>>> Update compatible and reg-shift in device tree binding.
>>
>> Has this change been submitted to and accepted by the Linux kernel?
>> That's where the official DT binding documents are stored. Honestly I
>> think we should remove the copies in U-Boot to avoid confusion and
>> forking.
>>
>> The content of the change looks reasonable at a quick glance.
>>
>
> These changes actually came from Linux kernel. They are scattered in
> several files. I included only those are prevalent to u-boot.
>
> 8250.txt
> - compatible : one of:
>      - "ns8250"
...
>
> omap_serial.txt
> - compatible : should be "ti,omap2-uart" for OMAP2 controllers
...
>
> snps-dw-apb-uart.txt
> - compatible : "snps,dw-apb-uart"
> - reg-shift : quantity to shift the register offsets by.  If this
> property is not present then the register offsets are not shifted.

If we are going to have DT binding definitions in U-Boot, we should at 
least keep the directory structure, filenames, and file content 
identical to the bindings in the Linux kernel.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH 2/2] ns16550: zap the rockchip serial compatible string
  2015-12-11  5:08 ` [U-Boot] [PATCH 2/2] ns16550: zap the rockchip serial compatible string Thomas Chou
@ 2015-12-19  2:51   ` Simon Glass
  0 siblings, 0 replies; 6+ messages in thread
From: Simon Glass @ 2015-12-19  2:51 UTC (permalink / raw)
  To: u-boot

On 10 December 2015 at 22:08, Thomas Chou <thomas@wytron.com.tw> wrote:
> Zap the rockchip serial compatible string, because rockchip
> serial has "snps,dw-apb-uart" compatible string in the dts.
>
> Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
> ---
>  drivers/serial/ns16550.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)

Acked-by: Simon Glass <sjg@chromium.org>

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-12-19  2:51 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-11  5:08 [U-Boot] [PATCH 1/2] ns16550: update compatible and reg-shift binding Thomas Chou
2015-12-11  5:08 ` [U-Boot] [PATCH 2/2] ns16550: zap the rockchip serial compatible string Thomas Chou
2015-12-19  2:51   ` Simon Glass
2015-12-11  5:35 ` [U-Boot] [PATCH 1/2] ns16550: update compatible and reg-shift binding Stephen Warren
2015-12-11  7:08   ` Thomas Chou
2015-12-11 15:42     ` Stephen Warren

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.