From: Simon Glass <sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org> To: U-Boot Mailing List <u-boot-0aAXYlwwYIKGBzrmiIFOJg@public.gmane.org> Cc: Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>, Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>, Joe Hershberger <joe.hershberger-acOepvfBmUk@public.gmane.org>, Masahiro Yamada <yamada.masahiro-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org>, Simon Glass <sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>, devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>, Linus Walleij <linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>, Marek Vasut <marek.vasut-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>, Pavel Herrmann <morpheus.ibis-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>, Vikas Manocha <vikas.manocha-qxv4g6HH51o@public.gmane.org>, Geert Uytterhoeven <geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org> Subject: [PATCH v3 01/11] dm: serial: Update binding for PL01x serial UART Date: Fri, 7 Aug 2015 07:42:21 -0600 [thread overview] Message-ID: <1438954951-13329-2-git-send-email-sjg@chromium.org> (raw) In-Reply-To: <1438954951-13329-1-git-send-email-sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org> This binding differs from that of Linux. Update it and change existing users. Signed-off-by: Simon Glass <sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org> --- Changes in v3: - Rename binding file to pl01x.txt Changes in v2: None arch/arm/dts/stv0991.dts | 2 +- doc/device-tree-bindings/serial/pl01x.txt | 55 ++++++++++++++++++++++++++++--- drivers/serial/serial_pl01x.c | 6 ++-- 3 files changed, 56 insertions(+), 7 deletions(-) diff --git a/arch/arm/dts/stv0991.dts b/arch/arm/dts/stv0991.dts index fa3fd64..d20c87a 100644 --- a/arch/arm/dts/stv0991.dts +++ b/arch/arm/dts/stv0991.dts @@ -18,7 +18,7 @@ uart0: serial@0x80406000 { compatible = "arm,pl011", "arm,primecell"; reg = <0x80406000 0x1000>; - clock = <2700000>; + clock-frequency = <2700000>; }; aliases { diff --git a/doc/device-tree-bindings/serial/pl01x.txt b/doc/device-tree-bindings/serial/pl01x.txt index 61c27d1..4483553 100644 --- a/doc/device-tree-bindings/serial/pl01x.txt +++ b/doc/device-tree-bindings/serial/pl01x.txt @@ -1,7 +1,54 @@ -* ARM AMBA Primecell PL011 & PL010 serial UART +* ARM AMBA Primecell PL011 serial UART Required properties: -- compatible: must be "arm,primecell", "arm,pl011" or "arm,pl010" +- compatible: must be "arm,primecell", "arm,pl011" - reg: exactly one register range with length 0x1000 -- clock: input clock frequency for the UART (used to calculate the baud - rate divisor) +- interrupts: exactly one interrupt specifier + +Optional properties: +- pinctrl: + When present, must have one state named "default", + and may contain a second name named "sleep". The former + state sets up pins for ordinary operation whereas + the latter state will put the associated pins to sleep + when the UART is unused +- clocks: + When present, the first clock listed must correspond to + the clock named UARTCLK on the IP block, i.e. the clock + to the external serial line, whereas the second clock + must correspond to the PCLK clocking the internal logic + of the block. Just listing one clock (the first one) is + deprecated. +- clocks-names: + When present, the first clock listed must be named + "uartclk" and the second clock listed must be named + "apb_pclk" +- dmas: + When present, may have one or two dma channels. + The first one must be named "rx", the second one + must be named "tx". +- auto-poll: + Enables polling when using RX DMA. +- poll-rate-ms: + Rate at which poll occurs when auto-poll is set, + default 100ms. +- poll-timeout-ms: + Poll timeout when auto-poll is set, default + 3000ms. +- clock-frequency: + Input clock frequency for UART. This is optional in Linux but required + in U-Boot. + +See also bindings/arm/primecell.txt + +Example: + +uart@80120000 { + compatible = "arm,pl011", "arm,primecell"; + reg = <0x80120000 0x1000>; + interrupts = <0 11 IRQ_TYPE_LEVEL_HIGH>; + dmas = <&dma 13 0 0x2>, <&dma 13 0 0x0>; + dma-names = "rx", "tx"; + clocks = <&foo_clk>, <&bar_clk>; + clock-names = "uartclk", "apb_pclk"; +}; diff --git a/drivers/serial/serial_pl01x.c b/drivers/serial/serial_pl01x.c index ad503af..ae6fc0e 100644 --- a/drivers/serial/serial_pl01x.c +++ b/drivers/serial/serial_pl01x.c @@ -365,13 +365,15 @@ static int pl01x_serial_ofdata_to_platdata(struct udevice *dev) struct pl01x_serial_platdata *plat = dev_get_platdata(dev); fdt_addr_t addr; - addr = fdtdec_get_addr(gd->fdt_blob, dev->of_offset, "reg"); + addr = dev_get_addr(dev); if (addr == FDT_ADDR_T_NONE) return -EINVAL; plat->base = addr; - plat->clock = fdtdec_get_int(gd->fdt_blob, dev->of_offset, "clock", 1); + plat->clock = fdtdec_get_int(gd->fdt_blob, dev->of_offset, + "clock-frequency", 1); plat->type = dev_get_driver_data(dev); + return 0; } #endif -- 2.5.0.rc2.392.g76e840b -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html
WARNING: multiple messages have this Message-ID (diff)
From: Simon Glass <sjg@chromium.org> To: u-boot@lists.denx.de Subject: [U-Boot] [PATCH v3 01/11] dm: serial: Update binding for PL01x serial UART Date: Fri, 7 Aug 2015 07:42:21 -0600 [thread overview] Message-ID: <1438954951-13329-2-git-send-email-sjg@chromium.org> (raw) In-Reply-To: <1438954951-13329-1-git-send-email-sjg@chromium.org> This binding differs from that of Linux. Update it and change existing users. Signed-off-by: Simon Glass <sjg@chromium.org> --- Changes in v3: - Rename binding file to pl01x.txt Changes in v2: None arch/arm/dts/stv0991.dts | 2 +- doc/device-tree-bindings/serial/pl01x.txt | 55 ++++++++++++++++++++++++++++--- drivers/serial/serial_pl01x.c | 6 ++-- 3 files changed, 56 insertions(+), 7 deletions(-) diff --git a/arch/arm/dts/stv0991.dts b/arch/arm/dts/stv0991.dts index fa3fd64..d20c87a 100644 --- a/arch/arm/dts/stv0991.dts +++ b/arch/arm/dts/stv0991.dts @@ -18,7 +18,7 @@ uart0: serial at 0x80406000 { compatible = "arm,pl011", "arm,primecell"; reg = <0x80406000 0x1000>; - clock = <2700000>; + clock-frequency = <2700000>; }; aliases { diff --git a/doc/device-tree-bindings/serial/pl01x.txt b/doc/device-tree-bindings/serial/pl01x.txt index 61c27d1..4483553 100644 --- a/doc/device-tree-bindings/serial/pl01x.txt +++ b/doc/device-tree-bindings/serial/pl01x.txt @@ -1,7 +1,54 @@ -* ARM AMBA Primecell PL011 & PL010 serial UART +* ARM AMBA Primecell PL011 serial UART Required properties: -- compatible: must be "arm,primecell", "arm,pl011" or "arm,pl010" +- compatible: must be "arm,primecell", "arm,pl011" - reg: exactly one register range with length 0x1000 -- clock: input clock frequency for the UART (used to calculate the baud - rate divisor) +- interrupts: exactly one interrupt specifier + +Optional properties: +- pinctrl: + When present, must have one state named "default", + and may contain a second name named "sleep". The former + state sets up pins for ordinary operation whereas + the latter state will put the associated pins to sleep + when the UART is unused +- clocks: + When present, the first clock listed must correspond to + the clock named UARTCLK on the IP block, i.e. the clock + to the external serial line, whereas the second clock + must correspond to the PCLK clocking the internal logic + of the block. Just listing one clock (the first one) is + deprecated. +- clocks-names: + When present, the first clock listed must be named + "uartclk" and the second clock listed must be named + "apb_pclk" +- dmas: + When present, may have one or two dma channels. + The first one must be named "rx", the second one + must be named "tx". +- auto-poll: + Enables polling when using RX DMA. +- poll-rate-ms: + Rate at which poll occurs when auto-poll is set, + default 100ms. +- poll-timeout-ms: + Poll timeout when auto-poll is set, default + 3000ms. +- clock-frequency: + Input clock frequency for UART. This is optional in Linux but required + in U-Boot. + +See also bindings/arm/primecell.txt + +Example: + +uart at 80120000 { + compatible = "arm,pl011", "arm,primecell"; + reg = <0x80120000 0x1000>; + interrupts = <0 11 IRQ_TYPE_LEVEL_HIGH>; + dmas = <&dma 13 0 0x2>, <&dma 13 0 0x0>; + dma-names = "rx", "tx"; + clocks = <&foo_clk>, <&bar_clk>; + clock-names = "uartclk", "apb_pclk"; +}; diff --git a/drivers/serial/serial_pl01x.c b/drivers/serial/serial_pl01x.c index ad503af..ae6fc0e 100644 --- a/drivers/serial/serial_pl01x.c +++ b/drivers/serial/serial_pl01x.c @@ -365,13 +365,15 @@ static int pl01x_serial_ofdata_to_platdata(struct udevice *dev) struct pl01x_serial_platdata *plat = dev_get_platdata(dev); fdt_addr_t addr; - addr = fdtdec_get_addr(gd->fdt_blob, dev->of_offset, "reg"); + addr = dev_get_addr(dev); if (addr == FDT_ADDR_T_NONE) return -EINVAL; plat->base = addr; - plat->clock = fdtdec_get_int(gd->fdt_blob, dev->of_offset, "clock", 1); + plat->clock = fdtdec_get_int(gd->fdt_blob, dev->of_offset, + "clock-frequency", 1); plat->type = dev_get_driver_data(dev); + return 0; } #endif -- 2.5.0.rc2.392.g76e840b
next prev parent reply other threads:[~2015-08-07 13:42 UTC|newest] Thread overview: 58+ messages / expand[flat|nested] mbox.gz Atom feed top 2015-08-07 13:42 [PATCH v3 00/11] arm: rpi: Enable USB and Ethernet driver model Raspberry Pi Simon Glass 2015-08-07 13:42 ` [U-Boot] " Simon Glass [not found] ` <1438954951-13329-1-git-send-email-sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org> 2015-08-07 13:42 ` Simon Glass [this message] 2015-08-07 13:42 ` [U-Boot] [PATCH v3 01/11] dm: serial: Update binding for PL01x serial UART Simon Glass 2015-08-11 3:57 ` Stephen Warren 2015-08-11 3:57 ` [U-Boot] " Stephen Warren [not found] ` <55C972BA.5050706-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org> 2015-08-11 4:11 ` Simon Glass 2015-08-11 4:11 ` [U-Boot] " Simon Glass [not found] ` <CAPnjgZ2XdOPGMfAPHGy4c7vuc+exrirXkZ5DF+wHKGmAPg8ZjA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2015-08-11 4:24 ` Stephen Warren 2015-08-11 4:24 ` [U-Boot] " Stephen Warren [not found] ` <1438954951-13329-2-git-send-email-sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org> 2015-08-11 13:00 ` Linus Walleij 2015-08-11 13:00 ` [U-Boot] " Linus Walleij [not found] ` <CACRpkdZa2O1MqCVT8q2P0u0ciXK+6HFbQQGXB_-chimg=FbzQg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2015-08-13 15:59 ` Simon Glass 2015-08-13 15:59 ` [U-Boot] " Simon Glass [not found] ` <CAPnjgZ3V1KS7POEhsvj63OSB29MUtyaZGBoFR8JGPnaN=-fXVw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2015-08-13 16:02 ` Stephen Warren 2015-08-13 16:02 ` [U-Boot] " Stephen Warren 2015-08-13 18:13 ` Tom Rini 2015-08-13 18:13 ` [U-Boot] " Tom Rini 2015-08-13 19:04 ` Ian Lepore 2015-08-13 19:04 ` Ian Lepore [not found] ` <1439492679.242.35.camel-h+KGxgPPiopAfugRpC6u6w@public.gmane.org> 2015-08-13 19:37 ` Stephen Warren 2015-08-13 19:37 ` Stephen Warren [not found] ` <55CCF20C.9000104-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org> 2015-08-14 7:43 ` Geert Uytterhoeven 2015-08-14 7:43 ` Geert Uytterhoeven 2015-08-14 10:22 ` Linus Walleij 2015-08-14 10:22 ` Linus Walleij 2015-08-14 14:27 ` Rob Herring 2015-08-14 14:27 ` Rob Herring [not found] ` <CAL_JsqL8tcECpdwCxatd6ULS8z0UU160OXr8S0ZGTTRRrUaeSQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2015-08-14 17:45 ` Ian Lepore 2015-08-14 17:45 ` Ian Lepore [not found] ` <1439574356.242.60.camel-h+KGxgPPiopAfugRpC6u6w@public.gmane.org> 2015-08-14 18:42 ` Stephen Warren 2015-08-14 18:42 ` Stephen Warren 2015-08-17 7:46 ` Linus Walleij 2015-08-17 7:46 ` Linus Walleij 2015-08-14 19:32 ` Pantelis Antoniou 2015-08-14 19:32 ` [U-Boot] " Pantelis Antoniou 2015-08-13 22:24 ` Rob Herring 2015-08-13 22:24 ` [U-Boot] " Rob Herring 2015-08-07 13:42 ` [U-Boot] [PATCH v3 02/11] arm: rpi: Define CONFIG_TFTP_TSIZE to show tftp size info Simon Glass 2015-08-11 3:58 ` Stephen Warren 2016-05-23 15:39 ` Simon Glass 2015-08-07 13:42 ` [U-Boot] [PATCH v3 03/11] arm: rpi: Bring in kernel device tree files Simon Glass 2015-08-07 13:42 ` [U-Boot] [PATCH v3 04/11] arm: rpi: Device tree modifications for U-Boot Simon Glass 2015-08-11 4:00 ` Stephen Warren 2015-08-11 4:17 ` Simon Glass 2015-08-11 4:25 ` Stephen Warren 2015-08-12 13:28 ` Simon Glass 2015-08-07 13:42 ` [U-Boot] [PATCH v3 05/11] arm: rpi: Add device tree files for Raspberry Pi 2 Simon Glass 2015-08-07 13:42 ` [U-Boot] [PATCH v3 06/11] arm: rpi: Enable device tree control for Rasberry Pi Simon Glass 2015-08-11 3:47 ` Stephen Warren 2015-08-14 19:20 ` Simon Glass 2015-08-15 3:32 ` Stephen Warren 2015-08-15 13:59 ` Simon Glass 2015-08-07 13:42 ` [U-Boot] [PATCH v3 07/11] arm: rpi: Enable device tree control for Rasberry Pi 2 Simon Glass 2015-08-07 13:42 ` [U-Boot] [PATCH v3 08/11] arm: rpi: Drop the UART console platform data Simon Glass 2015-08-07 13:42 ` [U-Boot] [PATCH v3 09/11] arm: rpi: Drop the GPIO " Simon Glass 2015-08-07 13:42 ` [U-Boot] [PATCH v3 10/11] arm: rpi: Move to driver model for USB Simon Glass 2015-08-07 13:42 ` [U-Boot] [PATCH v3 11/11] arm: rpi: Use driver model for Ethernet Simon Glass
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=1438954951-13329-2-git-send-email-sjg@chromium.org \ --to=sjg-f7+t8e8rja9g9huczpvpmw@public.gmane.org \ --cc=arnd-r2nGTMty4D4@public.gmane.org \ --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \ --cc=geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org \ --cc=joe.hershberger-acOepvfBmUk@public.gmane.org \ --cc=linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \ --cc=marek.vasut-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \ --cc=morpheus.ibis-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \ --cc=swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org \ --cc=swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \ --cc=u-boot-0aAXYlwwYIKGBzrmiIFOJg@public.gmane.org \ --cc=vikas.manocha-qxv4g6HH51o@public.gmane.org \ --cc=yamada.masahiro-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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.