Linux Serial subsystem development
 help / color / mirror / Atom feed
* Re: [PATCH v3 2/4] soc: qcom: Add GENI based QUP Wrapper driver
From: Robin Murphy @ 2018-03-08 13:24 UTC (permalink / raw)
  To: Karthik Ramasubramanian, Stephen Boyd, Stephen Boyd,
	andy.gross-QSEj5FYQhm4dnm+yROfE0A, corbet-T1hC0tSOHrs,
	david.brown-QSEj5FYQhm4dnm+yROfE0A,
	gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r, mark.rutland-5wv7dgnIgG8,
	robh+dt-DgEjT+Ai2ygdnm+yROfE0A, wsa-z923LK4zBo2bacvFa/9K2g,
	hch-jcswGhMUV9g, m.szyprowski-Sze3O3UU22JBDgjK7y7TUQ
  Cc: devicetree-u79uwXL29TY76Z2rM5mHXA, Girish Mahadevan,
	acourbot-F7+t8E8rja9g9hUCZPvPmw, linux-doc-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-msm-u79uwXL29TY76Z2rM5mHXA,
	evgreen-F7+t8E8rja9g9hUCZPvPmw,
	iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
	linux-i2c-u79uwXL29TY76Z2rM5mHXA,
	linux-serial-u79uwXL29TY76Z2rM5mHXA, jslaby-IBi9RG/b67k,
	Sagar Dharia
In-Reply-To: <945b6c00-dde6-6ec7-4577-4cc0d034796b-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>

On 08/03/18 06:46, Karthik Ramasubramanian wrote:
> 
> 
> On 3/6/2018 2:56 PM, Stephen Boyd wrote:
>> Quoting Karthik Ramasubramanian (2018-03-02 16:58:23)
>>
>>>>> +       return iova;
>>>>> +}
>>>>> +EXPORT_SYMBOL(geni_se_tx_dma_prep);
>>>>> +
>>>>> +/**
>>>>> + * geni_se_rx_dma_prep() - Prepare the Serial Engine for RX DMA 
>>>>> transfer
>>>>> + * @se:                        Pointer to the concerned Serial 
>>>>> Engine.
>>>>> + * @buf:               Pointer to the RX buffer.
>>>>> + * @len:               Length of the RX buffer.
>>>>> + *
>>>>> + * This function is used to prepare the buffers for DMA RX.
>>>>> + *
>>>>> + * Return: Mapped DMA Address of the buffer on success, NULL on 
>>>>> failure.
>>>>> + */
>>>>> +dma_addr_t geni_se_rx_dma_prep(struct geni_se *se, void *buf, 
>>>>> size_t len)
>>>>> +{
>>>>> +       dma_addr_t iova;
>>>>> +       struct geni_wrapper *wrapper = se->wrapper;
>>>>> +       u32 val;
>>>>> +
>>>>> +       iova = dma_map_single(wrapper->dev, buf, len, 
>>>>> DMA_FROM_DEVICE);
>>>>> +       if (dma_mapping_error(wrapper->dev, iova))
>>>>> +               return (dma_addr_t)NULL;
>>>>
>>>> Can't return a dma_mapping_error address to the caller and have them
>>>> figure it out?
>>> Earlier we used to return the DMA_ERROR_CODE which has been removed
>>> recently in arm64 architecture. If we return the dma_mapping_error, then
>>> the caller also needs the device which encountered the mapping error.
>>> The serial interface drivers can use their parent currently to resolve
>>> the mapping error. Once the wrapper starts mapping using IOMMU context
>>> bank, then the serial interface drivers do not know which device to use
>>> to know if there is an error.
>>>
>>> Having said that, the dma_ops suggestion might help with handling this
>>> situation. I will look into it further.
>>
>> Ok, thanks.
>>
>>>>> +{
>>>>> +       struct geni_wrapper *wrapper = se->wrapper;
>>>>> +
>>>>> +       if (iova)
>>>>> +               dma_unmap_single(wrapper->dev, iova, len, 
>>>>> DMA_FROM_DEVICE);
>>>>> +}
>>>>> +EXPORT_SYMBOL(geni_se_rx_dma_unprep);
>>>>
>>>> Instead of having the functions exported, could we set the dma_ops on
>>>> all child devices of the wrapper that this driver populates and then
>>>> implement the DMA ops for those devices here? I assume that there's
>>>> never another DMA master between the wrapper and the serial engine, 
>>>> so I
>>>> think it would work.
>>> This suggestion looks like it will work.
>>
>> It would be a good idea to check with some other people on the dma_ops
>> suggestion. Maybe add the DMA mapping subsystem folks to help out here
> I have added the DMA mapping subsystem folks to help out here.
> 
> To present an overview, we have a wrapper controller which is composed 
> of several serial engines. The serial engines are programmed with UART, 
> I2C or SPI protocol and support DMA transfer. When the serial engines 
> perform DMA transfer, the wrapper controller device is used to perform 
> the mapping. The reason wrapper device is used is because of IOMMU and 
> there is only one IOMMU context bank to perform the translation for the 
> entire wrapper controller. So the wrapper controller exports map and 
> unmap functions to the individual protocol drivers.
> 
> There is a suggestion to make the parent wrapper controller implement 
> the dma_map_ops, instead of exported map/unmap functions and populate 
> those dma_map_ops on all the children serial engines. Can you please 
> provide your inputs regarding this suggestion?

Implementing dma_map_ops inside a driver for real hardware is almost 
always the wrong thing to do.

Based on what I could infer about the hardware from looking through the 
whole series in the linux-arm-msm archive, this is probably more like a 
multi-channel DMA controller where each "channel" has a configurable 
serial interface on the other end, as opposed to an actual bus where the 
serial engines are individually distinct AHB masters routed through the 
wrapper. If that's true, then using the QUP platform device for DMA API 
calls is the appropriate thing to do. Personally I'd be inclined not to 
abstract the dma_{map,unmap} calls at all, and just have the protocol 
drivers make them directly using dev->parent/wrapper->dev/whatever, but 
if you do want to abstract those then just give the abstraction a saner 
interface, i.e. pass the DMA handle by reference and return a regular 
int for error/success status.

Robin.
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

^ permalink raw reply

* Re: [PATCH v3 2/4] soc: qcom: Add GENI based QUP Wrapper driver
From: Karthik Ramasubramanian @ 2018-03-08  6:46 UTC (permalink / raw)
  To: Stephen Boyd, Stephen Boyd, andy.gross-QSEj5FYQhm4dnm+yROfE0A,
	corbet-T1hC0tSOHrs, david.brown-QSEj5FYQhm4dnm+yROfE0A,
	gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r, mark.rutland-5wv7dgnIgG8,
	robh+dt-DgEjT+Ai2ygdnm+yROfE0A, wsa-z923LK4zBo2bacvFa/9K2g,
	hch-jcswGhMUV9g, m.szyprowski-Sze3O3UU22JBDgjK7y7TUQ,
	robin.murphy-5wv7dgnIgG8
  Cc: devicetree-u79uwXL29TY76Z2rM5mHXA, Girish Mahadevan,
	acourbot-F7+t8E8rja9g9hUCZPvPmw, linux-doc-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-msm-u79uwXL29TY76Z2rM5mHXA,
	evgreen-F7+t8E8rja9g9hUCZPvPmw,
	iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
	linux-i2c-u79uwXL29TY76Z2rM5mHXA,
	linux-serial-u79uwXL29TY76Z2rM5mHXA, jslaby-IBi9RG/b67k,
	Sagar Dharia
In-Reply-To: <152037339742.218381.11498404122038956963-n1Xw8LXHxjTHt/MElyovVYaSKrA+ACpX0E9HWUfgJXw@public.gmane.org>



On 3/6/2018 2:56 PM, Stephen Boyd wrote:
> Quoting Karthik Ramasubramanian (2018-03-02 16:58:23)
> 
>>>> +       return iova;
>>>> +}
>>>> +EXPORT_SYMBOL(geni_se_tx_dma_prep);
>>>> +
>>>> +/**
>>>> + * geni_se_rx_dma_prep() - Prepare the Serial Engine for RX DMA transfer
>>>> + * @se:                        Pointer to the concerned Serial Engine.
>>>> + * @buf:               Pointer to the RX buffer.
>>>> + * @len:               Length of the RX buffer.
>>>> + *
>>>> + * This function is used to prepare the buffers for DMA RX.
>>>> + *
>>>> + * Return: Mapped DMA Address of the buffer on success, NULL on failure.
>>>> + */
>>>> +dma_addr_t geni_se_rx_dma_prep(struct geni_se *se, void *buf, size_t len)
>>>> +{
>>>> +       dma_addr_t iova;
>>>> +       struct geni_wrapper *wrapper = se->wrapper;
>>>> +       u32 val;
>>>> +
>>>> +       iova = dma_map_single(wrapper->dev, buf, len, DMA_FROM_DEVICE);
>>>> +       if (dma_mapping_error(wrapper->dev, iova))
>>>> +               return (dma_addr_t)NULL;
>>>
>>> Can't return a dma_mapping_error address to the caller and have them
>>> figure it out?
>> Earlier we used to return the DMA_ERROR_CODE which has been removed
>> recently in arm64 architecture. If we return the dma_mapping_error, then
>> the caller also needs the device which encountered the mapping error.
>> The serial interface drivers can use their parent currently to resolve
>> the mapping error. Once the wrapper starts mapping using IOMMU context
>> bank, then the serial interface drivers do not know which device to use
>> to know if there is an error.
>>
>> Having said that, the dma_ops suggestion might help with handling this
>> situation. I will look into it further.
> 
> Ok, thanks.
> 
>>>> +{
>>>> +       struct geni_wrapper *wrapper = se->wrapper;
>>>> +
>>>> +       if (iova)
>>>> +               dma_unmap_single(wrapper->dev, iova, len, DMA_FROM_DEVICE);
>>>> +}
>>>> +EXPORT_SYMBOL(geni_se_rx_dma_unprep);
>>>
>>> Instead of having the functions exported, could we set the dma_ops on
>>> all child devices of the wrapper that this driver populates and then
>>> implement the DMA ops for those devices here? I assume that there's
>>> never another DMA master between the wrapper and the serial engine, so I
>>> think it would work.
>> This suggestion looks like it will work.
> 
> It would be a good idea to check with some other people on the dma_ops
> suggestion. Maybe add the DMA mapping subsystem folks to help out here
I have added the DMA mapping subsystem folks to help out here.

To present an overview, we have a wrapper controller which is composed 
of several serial engines. The serial engines are programmed with UART, 
I2C or SPI protocol and support DMA transfer. When the serial engines 
perform DMA transfer, the wrapper controller device is used to perform 
the mapping. The reason wrapper device is used is because of IOMMU and 
there is only one IOMMU context bank to perform the translation for the 
entire wrapper controller. So the wrapper controller exports map and 
unmap functions to the individual protocol drivers.

There is a suggestion to make the parent wrapper controller implement 
the dma_map_ops, instead of exported map/unmap functions and populate 
those dma_map_ops on all the children serial engines. Can you please 
provide your inputs regarding this suggestion?
> 
> DMA MAPPING HELPERS
> M:      Christoph Hellwig <hch-jcswGhMUV9g@public.gmane.org>
> M:      Marek Szyprowski <m.szyprowski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
> R:      Robin Murphy <robin.murphy-5wv7dgnIgG8@public.gmane.org>
> L:      iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org
> 
> 
Regards,
Karthik.
-- 
Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

^ permalink raw reply

* Re: [PATCH v2] earlycon: Allow specifying a uartclk in options
From: Daniel Kurtz @ 2018-03-07 23:30 UTC (permalink / raw)
  To: Daniel Kurtz
  Cc: adurbin, Brian Norris, Jonathan Corbet, Greg Kroah-Hartman,
	jslaby, mingo, Thomas Gleixner, Christoffer Dall, Paul McKenney,
	marc.zyngier, frederic, dwmw, tom.saeger, zohar, alexander.levin,
	linux-doc, linux-kernel, linux-serial
In-Reply-To: <20180301184335.248378-1-djkurtz@chromium.org>

On Thu, Mar 1, 2018 at 11:43 AM Daniel Kurtz <djkurtz@chromium.org> wrote:

> Currently when an earlycon is registered, the uartclk is assumed to be
> BASE_BAUD * 16 = 1843200.  If a baud rate is specified in the earlycon
> options, then 8250_early's init_port will program the UART clock divider
> registers based on this assumed uartclk.

> However, not all uarts have a UART clock of 1843200.  For example, the
> 8250_dw uart in AMD's CZ/ST uses a fixed 48 MHz clock (as specified in
> cz_uart_desc in acpi_apd.c).  Thus, specifying a baud when using earlycon
> on such a device will result in incorrect divider values and a wrong UART
> clock.

> Fix this by extending the earlycon options parameter to allow
specification
> of a uartclk, like so:

>   earlycon=uart,mmio32,0xfedc6000,115200,48000000

> If none is specified, fall-back to prior behavior - 1843200.

> Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>

This general approach is facing resistance, so trying another more targeted
approach to work around the "BASE_BAUD=115200" assumption in arch/x86:

https://patchwork.kernel.org/patch/10265587/

^ permalink raw reply

* [PATCH v4 3/3] ARM: dts: STi: Remove "console=ttyASN" from bootargs for STi boards
From: patrice.chotard @ 2018-03-07 17:35 UTC (permalink / raw)
  To: robh+dt, mark.rutland, linux, linux-arm-kernel, linux-kernel,
	devicetree, gregkh, jslaby, linux-serial
  Cc: patrice.chotard
In-Reply-To: <1520444134-30144-1-git-send-email-patrice.chotard@st.com>

From: Patrice Chotard <patrice.chotard@st.com>

As serial interface is already specified into stdout-path property,
"console=ttyASN,115200" from bootargs can be removed.

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
---
v4: _ none
v3: _ remove "console=serialN,115200" from bootargs and use prefered 
      stdout-path property
v2: _ none

 arch/arm/boot/dts/stih407-b2120.dts | 2 +-
 arch/arm/boot/dts/stih410-b2120.dts | 2 +-
 arch/arm/boot/dts/stih410-b2260.dts | 2 +-
 arch/arm/boot/dts/stih418-b2199.dts | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/arm/boot/dts/stih407-b2120.dts b/arch/arm/boot/dts/stih407-b2120.dts
index 00de810a3bcc..62ce1cecbb1f 100644
--- a/arch/arm/boot/dts/stih407-b2120.dts
+++ b/arch/arm/boot/dts/stih407-b2120.dts
@@ -14,7 +14,7 @@
 	compatible = "st,stih407-b2120", "st,stih407";
 
 	chosen {
-		bootargs = "console=ttyAS0,115200 clk_ignore_unused";
+		bootargs = "clk_ignore_unused";
 		stdout-path = &sbc_serial0;
 	};
 
diff --git a/arch/arm/boot/dts/stih410-b2120.dts b/arch/arm/boot/dts/stih410-b2120.dts
index 07d7969923ea..2a5a9802a5ec 100644
--- a/arch/arm/boot/dts/stih410-b2120.dts
+++ b/arch/arm/boot/dts/stih410-b2120.dts
@@ -14,7 +14,7 @@
 	compatible = "st,stih410-b2120", "st,stih410";
 
 	chosen {
-		bootargs = "console=ttyAS0,115200 clk_ignore_unused";
+		bootargs = "clk_ignore_unused";
 		stdout-path = &sbc_serial0;
 	};
 
diff --git a/arch/arm/boot/dts/stih410-b2260.dts b/arch/arm/boot/dts/stih410-b2260.dts
index 0b2129712bef..155caa8c002a 100644
--- a/arch/arm/boot/dts/stih410-b2260.dts
+++ b/arch/arm/boot/dts/stih410-b2260.dts
@@ -15,7 +15,7 @@
 	compatible = "st,stih410-b2260", "st,stih410";
 
 	chosen {
-		bootargs = "console=ttyAS1,115200 clk_ignore_unused";
+		bootargs = "clk_ignore_unused";
 		stdout-path = &uart1;
 	};
 
diff --git a/arch/arm/boot/dts/stih418-b2199.dts b/arch/arm/boot/dts/stih418-b2199.dts
index f88856c36a3f..cd0d719e31b7 100644
--- a/arch/arm/boot/dts/stih418-b2199.dts
+++ b/arch/arm/boot/dts/stih418-b2199.dts
@@ -14,7 +14,7 @@
 	compatible = "st,stih418-b2199", "st,stih418";
 
 	chosen {
-		bootargs = "console=ttyAS0,115200 clk_ignore_unused";
+		bootargs = "clk_ignore_unused";
 		stdout-path = &sbc_serial0;
 	};
 
-- 
1.9.1

^ permalink raw reply related

* [PATCH v4 2/3] ARM: dts: STi: Fix aliases property name for STi boards
From: patrice.chotard @ 2018-03-07 17:35 UTC (permalink / raw)
  To: robh+dt, mark.rutland, linux, linux-arm-kernel, linux-kernel,
	devicetree, gregkh, jslaby, linux-serial
  Cc: patrice.chotard
In-Reply-To: <1520444134-30144-1-git-send-email-patrice.chotard@st.com>

From: Patrice Chotard <patrice.chotard@st.com>

Update serial aliases from "ttyASN" to more common "serialN".

Since dtc v1.4.6-9-gaadd0b65c987, aliases property name must
be lowercase only. This allows to fix following dtc warnings:

arch/arm/boot/dts/stih418-b2199.dtb: Warning (alias_paths): /aliases: aliases property name must include only lowercase and '-'
arch/arm/boot/dts/stih407-b2120.dtb: Warning (alias_paths): /aliases: aliases property name must include only lowercase and '-'
arch/arm/boot/dts/stih410-b2260.dtb: Warning (alias_paths): /aliases: aliases property name must include only lowercase and '-'
arch/arm/boot/dts/stih410-b2120.dtb: Warning (alias_paths): /aliases: aliases property name must include only lowercase and '-'

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
---
v4: _ remove bootargs chunks
v3: _ none
v2: _ use serialN instead of ttyasN aliases to not break ABI

 arch/arm/boot/dts/stih407-b2120.dts | 2 +-
 arch/arm/boot/dts/stih410-b2120.dts | 2 +-
 arch/arm/boot/dts/stih410-b2260.dts | 2 +-
 arch/arm/boot/dts/stih418-b2199.dts | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/arm/boot/dts/stih407-b2120.dts b/arch/arm/boot/dts/stih407-b2120.dts
index de3c8bf129b5..00de810a3bcc 100644
--- a/arch/arm/boot/dts/stih407-b2120.dts
+++ b/arch/arm/boot/dts/stih407-b2120.dts
@@ -24,7 +24,7 @@
 	};
 
 	aliases {
-		ttyAS0 = &sbc_serial0;
+		serial0 = &sbc_serial0;
 		ethernet0 = &ethernet0;
 	};
 
diff --git a/arch/arm/boot/dts/stih410-b2120.dts b/arch/arm/boot/dts/stih410-b2120.dts
index 0a59b7b0f4b2..07d7969923ea 100644
--- a/arch/arm/boot/dts/stih410-b2120.dts
+++ b/arch/arm/boot/dts/stih410-b2120.dts
@@ -24,7 +24,7 @@
 	};
 
 	aliases {
-		ttyAS0 = &sbc_serial0;
+		serial0 = &sbc_serial0;
 		ethernet0 = &ethernet0;
 	};
 
diff --git a/arch/arm/boot/dts/stih410-b2260.dts b/arch/arm/boot/dts/stih410-b2260.dts
index feb8834478fa..0b2129712bef 100644
--- a/arch/arm/boot/dts/stih410-b2260.dts
+++ b/arch/arm/boot/dts/stih410-b2260.dts
@@ -25,7 +25,7 @@
 	};
 
 	aliases {
-		ttyAS1 = &uart1;
+		serial1 = &uart1;
 		ethernet0 = &ethernet0;
 	};
 
diff --git a/arch/arm/boot/dts/stih418-b2199.dts b/arch/arm/boot/dts/stih418-b2199.dts
index 39b4db2e3507..f88856c36a3f 100644
--- a/arch/arm/boot/dts/stih418-b2199.dts
+++ b/arch/arm/boot/dts/stih418-b2199.dts
@@ -24,7 +24,7 @@
 	};
 
 	aliases {
-		ttyAS0 = &sbc_serial0;
+		serial0 = &sbc_serial0;
 		ethernet0 = &ethernet0;
 	};
 
-- 
1.9.1

^ permalink raw reply related

* [PATCH v4 1/3] tty: st-asc: Update tty alias
From: patrice.chotard @ 2018-03-07 17:35 UTC (permalink / raw)
  To: robh+dt, mark.rutland, linux, linux-arm-kernel, linux-kernel,
	devicetree, gregkh, jslaby, linux-serial
  Cc: patrice.chotard
In-Reply-To: <1520444134-30144-1-git-send-email-patrice.chotard@st.com>

From: Patrice Chotard <patrice.chotard@st.com>

Since dtc v1.4.6-9-gaadd0b65c987, aliases property name
must include only lowercase and '-'.

After having updated all STi boards serial aliases from "ttyASN"
to "serialN", st-asc driver need to be updated accordingly as tty
aliases id is retrieved using of_alias_get_id().

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Reviewed-by: Rob Herring <robh@kernel.org>
---

v4: _ add Reviewed-by
v3: _ update st-asc driver with "serial" alias prefix and keep "ttyAS" in second choice
v2: _ update st-asc driver with "serial" alias prefix

 drivers/tty/serial/st-asc.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/tty/serial/st-asc.c b/drivers/tty/serial/st-asc.c
index c763253514e9..5f9f01fac6dd 100644
--- a/drivers/tty/serial/st-asc.c
+++ b/drivers/tty/serial/st-asc.c
@@ -782,7 +782,9 @@ static struct asc_port *asc_of_get_asc_port(struct platform_device *pdev)
 	if (!np)
 		return NULL;
 
-	id = of_alias_get_id(np, ASC_SERIAL_NAME);
+	id = of_alias_get_id(np, "serial");
+	if (id < 0)
+		id = of_alias_get_id(np, ASC_SERIAL_NAME);
 
 	if (id < 0)
 		id = 0;
-- 
1.9.1

^ permalink raw reply related

* [PATCH v4 0/3] Fix STi aliases property name
From: patrice.chotard @ 2018-03-07 17:35 UTC (permalink / raw)
  To: robh+dt, mark.rutland, linux, linux-arm-kernel, linux-kernel,
	devicetree, gregkh, jslaby, linux-serial
  Cc: patrice.chotard

From: Patrice Chotard <patrice.chotard@st.com>

Since dtc v1.4.6-9-gaadd0b65c987, when compiling dtb with W=1 option,
the following warnings are triggered :
    
arch/arm/boot/dts/stih418-b2199.dtb: Warning (alias_paths): /aliases: aliases property name must include only lowercase and '-'
arch/arm/boot/dts/stih407-b2120.dtb: Warning (alias_paths): /aliases: aliases property name must include only lowercase and '-'
arch/arm/boot/dts/stih410-b2260.dtb: Warning (alias_paths): /aliases: aliases property name must include only lowercase and '-'
arch/arm/boot/dts/stih410-b2120.dtb: Warning (alias_paths): /aliases: aliases property name must include only lowercase and '-'

_ Patch 1, convert the aliases property name in lowercase in 
  all STi board dts files.

_ Patch 2, remove "console=serialN" from bootargs property

_ Patch 3, rework the tty driver st-asc accordingly, as aliases id is retrieved 
  using of_alias_get_id() with a defined string with is not lowercase only.

v4: Fix Rob Herring's remarks :
      _ reorder patches, first st-asc driver update and the DTS patches
        in order to not break boot.
      _ squash chunks of previous patch 1 into previous patch 2

v3: Fix Rob Herring's remarks :
      _ remove "console=serialN,115200" from bootargs and use prefered stdout-path property
      _ update st-asc driver with "serial" alias prefix and keep "ttyAS" in second choice

v2: Fix Rob Herring's remarks :
      _ use serialN instead of ttyasN aliases to not break ABI
      _ remove useless stdout-path property
      _ update st-asc driver with "serial" alias prefix

Patrice Chotard (3):
  tty: st-asc: Update tty alias
  ARM: dts: STi: Fix aliases property name for STi boards
  ARM: dts: STi: Remove "console=ttyASN" from bootargs for STi boards

 arch/arm/boot/dts/stih407-b2120.dts | 4 ++--
 arch/arm/boot/dts/stih410-b2120.dts | 4 ++--
 arch/arm/boot/dts/stih410-b2260.dts | 4 ++--
 arch/arm/boot/dts/stih418-b2199.dts | 4 ++--
 drivers/tty/serial/st-asc.c         | 4 +++-
 5 files changed, 11 insertions(+), 9 deletions(-)

-- 
1.9.1

^ permalink raw reply

* Re: [PATCH v3 1/3] ARM: dts: STi: Fix aliases property name for STi boards
From: Patrice CHOTARD @ 2018-03-07 17:11 UTC (permalink / raw)
  To: Rob Herring
  Cc: Mark Rutland, Russell King,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE,
	linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
	Greg Kroah-Hartman, Jiri Slaby, linux-serial@vger.kernel.org
In-Reply-To: <CAL_JsqKBkfCsx4pyjUebwkV0q+S5LhwePWw59-7ibt77qdAGbw@mail.gmail.com>

Hi Rob

On 03/07/2018 05:15 PM, Rob Herring wrote:
> On Wed, Mar 7, 2018 at 2:49 AM,  <patrice.chotard@st.com> wrote:
>> From: Patrice Chotard <patrice.chotard@st.com>
>>
>> Update serial aliases from "ttyASN" to more common "serialN".
>>
>> Since dtc v1.4.6-9-gaadd0b65c987, aliases property name must
>> be lowercase only. This allows to fix following dtc warnings:
>>
>> arch/arm/boot/dts/stih418-b2199.dtb: Warning (alias_paths): /aliases: aliases property name must include only lowercase and '-'
>> arch/arm/boot/dts/stih407-b2120.dtb: Warning (alias_paths): /aliases: aliases property name must include only lowercase and '-'
>> arch/arm/boot/dts/stih410-b2260.dtb: Warning (alias_paths): /aliases: aliases property name must include only lowercase and '-'
>> arch/arm/boot/dts/stih410-b2120.dtb: Warning (alias_paths): /aliases: aliases property name must include only lowercase and '-'
>>
>> Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
>> ---
>>
>> v3: _ none
>> v2: _ use serialN instead of ttyasN aliases to not break ABI
>>
>>   arch/arm/boot/dts/stih407-b2120.dts | 4 ++--
>>   arch/arm/boot/dts/stih410-b2120.dts | 4 ++--
>>   arch/arm/boot/dts/stih410-b2260.dts | 4 ++--
>>   arch/arm/boot/dts/stih418-b2199.dts | 4 ++--
>>   4 files changed, 8 insertions(+), 8 deletions(-)
>>
>> diff --git a/arch/arm/boot/dts/stih407-b2120.dts b/arch/arm/boot/dts/stih407-b2120.dts
>> index de3c8bf129b5..2c4d6033b448 100644
>> --- a/arch/arm/boot/dts/stih407-b2120.dts
>> +++ b/arch/arm/boot/dts/stih407-b2120.dts
>> @@ -14,7 +14,7 @@
>>          compatible = "st,stih407-b2120", "st,stih407";
>>
>>          chosen {
>> -               bootargs = "console=ttyAS0,115200 clk_ignore_unused";
>> +               bootargs = "console=serial0,115200 clk_ignore_unused";
> 
> These hunks for bootargs are still wrong. You wouldn't boot with a
> console if you only apply patch 1. These hunks should be squashed with
> patch 2.

Thanks for pointing this, i even noticed that patches must be reordered, 
first st-asc driver update and then DTS patches.

Thanks

Patrice

> 
>>                  stdout-path = &sbc_serial0;
>>          };
>>
>> @@ -24,7 +24,7 @@
>>          };
>>
>>          aliases {
>> -               ttyAS0 = &sbc_serial0;
>> +               serial0 = &sbc_serial0;
>>                  ethernet0 = &ethernet0;
>>          };
>>
>> diff --git a/arch/arm/boot/dts/stih410-b2120.dts b/arch/arm/boot/dts/stih410-b2120.dts
>> index 0a59b7b0f4b2..5422850641e8 100644
>> --- a/arch/arm/boot/dts/stih410-b2120.dts
>> +++ b/arch/arm/boot/dts/stih410-b2120.dts
>> @@ -14,7 +14,7 @@
>>          compatible = "st,stih410-b2120", "st,stih410";
>>
>>          chosen {
>> -               bootargs = "console=ttyAS0,115200 clk_ignore_unused";
>> +               bootargs = "console=serial0,115200 clk_ignore_unused";
>>                  stdout-path = &sbc_serial0;
>>          };
>>
>> @@ -24,7 +24,7 @@
>>          };
>>
>>          aliases {
>> -               ttyAS0 = &sbc_serial0;
>> +               serial0 = &sbc_serial0;
>>                  ethernet0 = &ethernet0;
>>          };
>>
>> diff --git a/arch/arm/boot/dts/stih410-b2260.dts b/arch/arm/boot/dts/stih410-b2260.dts
>> index feb8834478fa..ca347160e35d 100644
>> --- a/arch/arm/boot/dts/stih410-b2260.dts
>> +++ b/arch/arm/boot/dts/stih410-b2260.dts
>> @@ -15,7 +15,7 @@
>>          compatible = "st,stih410-b2260", "st,stih410";
>>
>>          chosen {
>> -               bootargs = "console=ttyAS1,115200 clk_ignore_unused";
>> +               bootargs = "console=serial1,115200 clk_ignore_unused";
>>                  stdout-path = &uart1;
>>          };
>>
>> @@ -25,7 +25,7 @@
>>          };
>>
>>          aliases {
>> -               ttyAS1 = &uart1;
>> +               serial1 = &uart1;
>>                  ethernet0 = &ethernet0;
>>          };
>>
>> diff --git a/arch/arm/boot/dts/stih418-b2199.dts b/arch/arm/boot/dts/stih418-b2199.dts
>> index 39b4db2e3507..dbf7bb704a1a 100644
>> --- a/arch/arm/boot/dts/stih418-b2199.dts
>> +++ b/arch/arm/boot/dts/stih418-b2199.dts
>> @@ -14,7 +14,7 @@
>>          compatible = "st,stih418-b2199", "st,stih418";
>>
>>          chosen {
>> -               bootargs = "console=ttyAS0,115200 clk_ignore_unused";
>> +               bootargs = "console=serial0,115200 clk_ignore_unused";
>>                  stdout-path = &sbc_serial0;
>>          };
>>
>> @@ -24,7 +24,7 @@
>>          };
>>
>>          aliases {
>> -               ttyAS0 = &sbc_serial0;
>> +               serial0 = &sbc_serial0;
>>                  ethernet0 = &ethernet0;
>>          };
>>
>> --
>> 1.9.1
>>

^ permalink raw reply

* Re: [PATCH v3 1/3] ARM: dts: STi: Fix aliases property name for STi boards
From: Rob Herring @ 2018-03-07 16:15 UTC (permalink / raw)
  To: Patrice Chotard
  Cc: Mark Rutland, Russell King,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE,
	linux-kernel@vger.kernel.org, devicetree, Greg Kroah-Hartman,
	Jiri Slaby, linux-serial
In-Reply-To: <1520412597-30545-2-git-send-email-patrice.chotard@st.com>

On Wed, Mar 7, 2018 at 2:49 AM,  <patrice.chotard@st.com> wrote:
> From: Patrice Chotard <patrice.chotard@st.com>
>
> Update serial aliases from "ttyASN" to more common "serialN".
>
> Since dtc v1.4.6-9-gaadd0b65c987, aliases property name must
> be lowercase only. This allows to fix following dtc warnings:
>
> arch/arm/boot/dts/stih418-b2199.dtb: Warning (alias_paths): /aliases: aliases property name must include only lowercase and '-'
> arch/arm/boot/dts/stih407-b2120.dtb: Warning (alias_paths): /aliases: aliases property name must include only lowercase and '-'
> arch/arm/boot/dts/stih410-b2260.dtb: Warning (alias_paths): /aliases: aliases property name must include only lowercase and '-'
> arch/arm/boot/dts/stih410-b2120.dtb: Warning (alias_paths): /aliases: aliases property name must include only lowercase and '-'
>
> Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
> ---
>
> v3: _ none
> v2: _ use serialN instead of ttyasN aliases to not break ABI
>
>  arch/arm/boot/dts/stih407-b2120.dts | 4 ++--
>  arch/arm/boot/dts/stih410-b2120.dts | 4 ++--
>  arch/arm/boot/dts/stih410-b2260.dts | 4 ++--
>  arch/arm/boot/dts/stih418-b2199.dts | 4 ++--
>  4 files changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/arch/arm/boot/dts/stih407-b2120.dts b/arch/arm/boot/dts/stih407-b2120.dts
> index de3c8bf129b5..2c4d6033b448 100644
> --- a/arch/arm/boot/dts/stih407-b2120.dts
> +++ b/arch/arm/boot/dts/stih407-b2120.dts
> @@ -14,7 +14,7 @@
>         compatible = "st,stih407-b2120", "st,stih407";
>
>         chosen {
> -               bootargs = "console=ttyAS0,115200 clk_ignore_unused";
> +               bootargs = "console=serial0,115200 clk_ignore_unused";

These hunks for bootargs are still wrong. You wouldn't boot with a
console if you only apply patch 1. These hunks should be squashed with
patch 2.

>                 stdout-path = &sbc_serial0;
>         };
>
> @@ -24,7 +24,7 @@
>         };
>
>         aliases {
> -               ttyAS0 = &sbc_serial0;
> +               serial0 = &sbc_serial0;
>                 ethernet0 = &ethernet0;
>         };
>
> diff --git a/arch/arm/boot/dts/stih410-b2120.dts b/arch/arm/boot/dts/stih410-b2120.dts
> index 0a59b7b0f4b2..5422850641e8 100644
> --- a/arch/arm/boot/dts/stih410-b2120.dts
> +++ b/arch/arm/boot/dts/stih410-b2120.dts
> @@ -14,7 +14,7 @@
>         compatible = "st,stih410-b2120", "st,stih410";
>
>         chosen {
> -               bootargs = "console=ttyAS0,115200 clk_ignore_unused";
> +               bootargs = "console=serial0,115200 clk_ignore_unused";
>                 stdout-path = &sbc_serial0;
>         };
>
> @@ -24,7 +24,7 @@
>         };
>
>         aliases {
> -               ttyAS0 = &sbc_serial0;
> +               serial0 = &sbc_serial0;
>                 ethernet0 = &ethernet0;
>         };
>
> diff --git a/arch/arm/boot/dts/stih410-b2260.dts b/arch/arm/boot/dts/stih410-b2260.dts
> index feb8834478fa..ca347160e35d 100644
> --- a/arch/arm/boot/dts/stih410-b2260.dts
> +++ b/arch/arm/boot/dts/stih410-b2260.dts
> @@ -15,7 +15,7 @@
>         compatible = "st,stih410-b2260", "st,stih410";
>
>         chosen {
> -               bootargs = "console=ttyAS1,115200 clk_ignore_unused";
> +               bootargs = "console=serial1,115200 clk_ignore_unused";
>                 stdout-path = &uart1;
>         };
>
> @@ -25,7 +25,7 @@
>         };
>
>         aliases {
> -               ttyAS1 = &uart1;
> +               serial1 = &uart1;
>                 ethernet0 = &ethernet0;
>         };
>
> diff --git a/arch/arm/boot/dts/stih418-b2199.dts b/arch/arm/boot/dts/stih418-b2199.dts
> index 39b4db2e3507..dbf7bb704a1a 100644
> --- a/arch/arm/boot/dts/stih418-b2199.dts
> +++ b/arch/arm/boot/dts/stih418-b2199.dts
> @@ -14,7 +14,7 @@
>         compatible = "st,stih418-b2199", "st,stih418";
>
>         chosen {
> -               bootargs = "console=ttyAS0,115200 clk_ignore_unused";
> +               bootargs = "console=serial0,115200 clk_ignore_unused";
>                 stdout-path = &sbc_serial0;
>         };
>
> @@ -24,7 +24,7 @@
>         };
>
>         aliases {
> -               ttyAS0 = &sbc_serial0;
> +               serial0 = &sbc_serial0;
>                 ethernet0 = &ethernet0;
>         };
>
> --
> 1.9.1
>

^ permalink raw reply

* Re: [PATCH v3 3/3] tty: st-asc: Update tty alias
From: Rob Herring @ 2018-03-07 16:13 UTC (permalink / raw)
  To: Patrice Chotard
  Cc: Mark Rutland, Russell King,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE,
	linux-kernel@vger.kernel.org, devicetree, Greg Kroah-Hartman,
	Jiri Slaby, linux-serial
In-Reply-To: <1520412597-30545-4-git-send-email-patrice.chotard@st.com>

On Wed, Mar 7, 2018 at 2:49 AM,  <patrice.chotard@st.com> wrote:
> From: Patrice Chotard <patrice.chotard@st.com>
>
> Since dtc v1.4.6-9-gaadd0b65c987, aliases property name
> must include only lowercase and '-'.
>
> After having updated all STi boards serial aliases from "ttyASN"
> to "serialN", st-asc driver need to be updated accordingly as tty
> aliases id is retrieved using of_alias_get_id().
>
> Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
> ---
> v3: _ update st-asc driver with "serial" alias prefix and keep "ttyAS" in second choice
> v2: _ update st-asc driver with "serial" alias prefix
>
>  drivers/tty/serial/st-asc.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)

Reviewed-by: Rob Herring <robh@kernel.org>

^ permalink raw reply

* [PATCH v3 3/3] tty: st-asc: Update tty alias
From: patrice.chotard @ 2018-03-07  8:49 UTC (permalink / raw)
  To: robh+dt, mark.rutland, linux, linux-arm-kernel, linux-kernel,
	devicetree, gregkh, jslaby, linux-serial
  Cc: patrice.chotard
In-Reply-To: <1520412597-30545-1-git-send-email-patrice.chotard@st.com>

From: Patrice Chotard <patrice.chotard@st.com>

Since dtc v1.4.6-9-gaadd0b65c987, aliases property name
must include only lowercase and '-'.

After having updated all STi boards serial aliases from "ttyASN"
to "serialN", st-asc driver need to be updated accordingly as tty
aliases id is retrieved using of_alias_get_id().

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
---
v3: _ update st-asc driver with "serial" alias prefix and keep "ttyAS" in second choice
v2: _ update st-asc driver with "serial" alias prefix

 drivers/tty/serial/st-asc.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/tty/serial/st-asc.c b/drivers/tty/serial/st-asc.c
index c763253514e9..5f9f01fac6dd 100644
--- a/drivers/tty/serial/st-asc.c
+++ b/drivers/tty/serial/st-asc.c
@@ -782,7 +782,9 @@ static struct asc_port *asc_of_get_asc_port(struct platform_device *pdev)
 	if (!np)
 		return NULL;
 
-	id = of_alias_get_id(np, ASC_SERIAL_NAME);
+	id = of_alias_get_id(np, "serial");
+	if (id < 0)
+		id = of_alias_get_id(np, ASC_SERIAL_NAME);
 
 	if (id < 0)
 		id = 0;
-- 
1.9.1

^ permalink raw reply related

* [PATCH v3 2/3] ARM: dts: STi: Remove console=serialN from bootargs for STi boards
From: patrice.chotard @ 2018-03-07  8:49 UTC (permalink / raw)
  To: robh+dt, mark.rutland, linux, linux-arm-kernel, linux-kernel,
	devicetree, gregkh, jslaby, linux-serial
  Cc: patrice.chotard
In-Reply-To: <1520412597-30545-1-git-send-email-patrice.chotard@st.com>

From: Patrice Chotard <patrice.chotard@st.com>

As serial interface is already specified into stdout-path property,
"console=serialN,115200" from bootargs can be removed.

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
---
v3: _ remove "console=serialN,115200" from bootargs and use prefered 
      stdout-path property
v2: _ none

 arch/arm/boot/dts/stih407-b2120.dts | 2 +-
 arch/arm/boot/dts/stih410-b2120.dts | 2 +-
 arch/arm/boot/dts/stih410-b2260.dts | 2 +-
 arch/arm/boot/dts/stih418-b2199.dts | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/arm/boot/dts/stih407-b2120.dts b/arch/arm/boot/dts/stih407-b2120.dts
index 2c4d6033b448..62ce1cecbb1f 100644
--- a/arch/arm/boot/dts/stih407-b2120.dts
+++ b/arch/arm/boot/dts/stih407-b2120.dts
@@ -14,7 +14,7 @@
 	compatible = "st,stih407-b2120", "st,stih407";
 
 	chosen {
-		bootargs = "console=serial0,115200 clk_ignore_unused";
+		bootargs = "clk_ignore_unused";
 		stdout-path = &sbc_serial0;
 	};
 
diff --git a/arch/arm/boot/dts/stih410-b2120.dts b/arch/arm/boot/dts/stih410-b2120.dts
index 5422850641e8..2a5a9802a5ec 100644
--- a/arch/arm/boot/dts/stih410-b2120.dts
+++ b/arch/arm/boot/dts/stih410-b2120.dts
@@ -14,7 +14,7 @@
 	compatible = "st,stih410-b2120", "st,stih410";
 
 	chosen {
-		bootargs = "console=serial0,115200 clk_ignore_unused";
+		bootargs = "clk_ignore_unused";
 		stdout-path = &sbc_serial0;
 	};
 
diff --git a/arch/arm/boot/dts/stih410-b2260.dts b/arch/arm/boot/dts/stih410-b2260.dts
index ca347160e35d..155caa8c002a 100644
--- a/arch/arm/boot/dts/stih410-b2260.dts
+++ b/arch/arm/boot/dts/stih410-b2260.dts
@@ -15,7 +15,7 @@
 	compatible = "st,stih410-b2260", "st,stih410";
 
 	chosen {
-		bootargs = "console=serial1,115200 clk_ignore_unused";
+		bootargs = "clk_ignore_unused";
 		stdout-path = &uart1;
 	};
 
diff --git a/arch/arm/boot/dts/stih418-b2199.dts b/arch/arm/boot/dts/stih418-b2199.dts
index dbf7bb704a1a..cd0d719e31b7 100644
--- a/arch/arm/boot/dts/stih418-b2199.dts
+++ b/arch/arm/boot/dts/stih418-b2199.dts
@@ -14,7 +14,7 @@
 	compatible = "st,stih418-b2199", "st,stih418";
 
 	chosen {
-		bootargs = "console=serial0,115200 clk_ignore_unused";
+		bootargs = "clk_ignore_unused";
 		stdout-path = &sbc_serial0;
 	};
 
-- 
1.9.1

^ permalink raw reply related

* [PATCH v3 1/3] ARM: dts: STi: Fix aliases property name for STi boards
From: patrice.chotard @ 2018-03-07  8:49 UTC (permalink / raw)
  To: robh+dt, mark.rutland, linux, linux-arm-kernel, linux-kernel,
	devicetree, gregkh, jslaby, linux-serial
  Cc: patrice.chotard
In-Reply-To: <1520412597-30545-1-git-send-email-patrice.chotard@st.com>

From: Patrice Chotard <patrice.chotard@st.com>

Update serial aliases from "ttyASN" to more common "serialN".

Since dtc v1.4.6-9-gaadd0b65c987, aliases property name must
be lowercase only. This allows to fix following dtc warnings:

arch/arm/boot/dts/stih418-b2199.dtb: Warning (alias_paths): /aliases: aliases property name must include only lowercase and '-'
arch/arm/boot/dts/stih407-b2120.dtb: Warning (alias_paths): /aliases: aliases property name must include only lowercase and '-'
arch/arm/boot/dts/stih410-b2260.dtb: Warning (alias_paths): /aliases: aliases property name must include only lowercase and '-'
arch/arm/boot/dts/stih410-b2120.dtb: Warning (alias_paths): /aliases: aliases property name must include only lowercase and '-'

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
---

v3: _ none
v2: _ use serialN instead of ttyasN aliases to not break ABI

 arch/arm/boot/dts/stih407-b2120.dts | 4 ++--
 arch/arm/boot/dts/stih410-b2120.dts | 4 ++--
 arch/arm/boot/dts/stih410-b2260.dts | 4 ++--
 arch/arm/boot/dts/stih418-b2199.dts | 4 ++--
 4 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/arch/arm/boot/dts/stih407-b2120.dts b/arch/arm/boot/dts/stih407-b2120.dts
index de3c8bf129b5..2c4d6033b448 100644
--- a/arch/arm/boot/dts/stih407-b2120.dts
+++ b/arch/arm/boot/dts/stih407-b2120.dts
@@ -14,7 +14,7 @@
 	compatible = "st,stih407-b2120", "st,stih407";
 
 	chosen {
-		bootargs = "console=ttyAS0,115200 clk_ignore_unused";
+		bootargs = "console=serial0,115200 clk_ignore_unused";
 		stdout-path = &sbc_serial0;
 	};
 
@@ -24,7 +24,7 @@
 	};
 
 	aliases {
-		ttyAS0 = &sbc_serial0;
+		serial0 = &sbc_serial0;
 		ethernet0 = &ethernet0;
 	};
 
diff --git a/arch/arm/boot/dts/stih410-b2120.dts b/arch/arm/boot/dts/stih410-b2120.dts
index 0a59b7b0f4b2..5422850641e8 100644
--- a/arch/arm/boot/dts/stih410-b2120.dts
+++ b/arch/arm/boot/dts/stih410-b2120.dts
@@ -14,7 +14,7 @@
 	compatible = "st,stih410-b2120", "st,stih410";
 
 	chosen {
-		bootargs = "console=ttyAS0,115200 clk_ignore_unused";
+		bootargs = "console=serial0,115200 clk_ignore_unused";
 		stdout-path = &sbc_serial0;
 	};
 
@@ -24,7 +24,7 @@
 	};
 
 	aliases {
-		ttyAS0 = &sbc_serial0;
+		serial0 = &sbc_serial0;
 		ethernet0 = &ethernet0;
 	};
 
diff --git a/arch/arm/boot/dts/stih410-b2260.dts b/arch/arm/boot/dts/stih410-b2260.dts
index feb8834478fa..ca347160e35d 100644
--- a/arch/arm/boot/dts/stih410-b2260.dts
+++ b/arch/arm/boot/dts/stih410-b2260.dts
@@ -15,7 +15,7 @@
 	compatible = "st,stih410-b2260", "st,stih410";
 
 	chosen {
-		bootargs = "console=ttyAS1,115200 clk_ignore_unused";
+		bootargs = "console=serial1,115200 clk_ignore_unused";
 		stdout-path = &uart1;
 	};
 
@@ -25,7 +25,7 @@
 	};
 
 	aliases {
-		ttyAS1 = &uart1;
+		serial1 = &uart1;
 		ethernet0 = &ethernet0;
 	};
 
diff --git a/arch/arm/boot/dts/stih418-b2199.dts b/arch/arm/boot/dts/stih418-b2199.dts
index 39b4db2e3507..dbf7bb704a1a 100644
--- a/arch/arm/boot/dts/stih418-b2199.dts
+++ b/arch/arm/boot/dts/stih418-b2199.dts
@@ -14,7 +14,7 @@
 	compatible = "st,stih418-b2199", "st,stih418";
 
 	chosen {
-		bootargs = "console=ttyAS0,115200 clk_ignore_unused";
+		bootargs = "console=serial0,115200 clk_ignore_unused";
 		stdout-path = &sbc_serial0;
 	};
 
@@ -24,7 +24,7 @@
 	};
 
 	aliases {
-		ttyAS0 = &sbc_serial0;
+		serial0 = &sbc_serial0;
 		ethernet0 = &ethernet0;
 	};
 
-- 
1.9.1

^ permalink raw reply related

* [PATCH v3 0/3] Fix STi aliases property name
From: patrice.chotard @ 2018-03-07  8:49 UTC (permalink / raw)
  To: robh+dt, mark.rutland, linux, linux-arm-kernel, linux-kernel,
	devicetree, gregkh, jslaby, linux-serial
  Cc: patrice.chotard

From: Patrice Chotard <patrice.chotard@st.com>

Since dtc v1.4.6-9-gaadd0b65c987, when compiling dtb with W=1 option,
the following warnings are triggered :
    
arch/arm/boot/dts/stih418-b2199.dtb: Warning (alias_paths): /aliases: aliases property name must include only lowercase and '-'
arch/arm/boot/dts/stih407-b2120.dtb: Warning (alias_paths): /aliases: aliases property name must include only lowercase and '-'
arch/arm/boot/dts/stih410-b2260.dtb: Warning (alias_paths): /aliases: aliases property name must include only lowercase and '-'
arch/arm/boot/dts/stih410-b2120.dtb: Warning (alias_paths): /aliases: aliases property name must include only lowercase and '-'

_ Patch 1, convert the aliases property name in lowercase in 
  all STi board dts files.

_ Patch 2, remove "console=serialN" from bootargs property

_ Patch 3, rework the tty driver st-asc accordingly, as aliases id is retrieved 
  using of_alias_get_id() with a defined string with is not lowercase only.

v3: Fix Rob Herring's remarks :
      _ remove "console=serialN,115200" from bootargs and use prefered stdout-path property
      _ update st-asc driver with "serial" alias prefix and keep "ttyAS" in second choice

v2: Fix Rob Herring's remarks :
      _ use serialN instead of ttyasN aliases to not break ABI
      _ remove useless stdout-path property
      _ update st-asc driver with "serial" alias prefix

Patrice Chotard (3):
  ARM: dts: STi: Fix aliases property name for STi boards
  ARM: dts: STi: Remove console=serialN from bootargs for STi boards
  tty: st-asc: Update tty alias

 arch/arm/boot/dts/stih407-b2120.dts | 4 ++--
 arch/arm/boot/dts/stih410-b2120.dts | 4 ++--
 arch/arm/boot/dts/stih410-b2260.dts | 4 ++--
 arch/arm/boot/dts/stih418-b2199.dts | 4 ++--
 drivers/tty/serial/st-asc.c         | 4 +++-
 5 files changed, 11 insertions(+), 9 deletions(-)

-- 
1.9.1

^ permalink raw reply

* Re: [PATCH v2 3/3] tty: st-asc: Update tty alias
From: Patrice CHOTARD @ 2018-03-07  8:01 UTC (permalink / raw)
  To: Rob Herring
  Cc: Mark Rutland, devicetree@vger.kernel.org, Greg Kroah-Hartman,
	Russell King, linux-kernel@vger.kernel.org,
	linux-serial@vger.kernel.org, Jiri Slaby,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE
In-Reply-To: <CAL_JsqJv-FV4T8=+py2EEr4kipnQikJPhDKkDdvkAab2QTgBzg@mail.gmail.com>

Hi Rob

On 03/06/2018 02:29 PM, Rob Herring wrote:
> On Tue, Mar 6, 2018 at 2:07 AM,  <patrice.chotard@st.com> wrote:
>> From: Patrice Chotard <patrice.chotard@st.com>
>>
>> Since dtc v1.4.6-9-gaadd0b65c987, aliases property name
>> must include only lowercase and '-'.
>>
>> After having updated all STi boards serial aliases from "ttyASN"
>> to "serialN", st-asc driver need to be updated accordingly as tty
>> aliases id is retrieved using of_alias_get_id(np, ASC_SERIAL_NAME);
> 
> Again, changing the tty name breaks userspace. You can't do that.
> 
> You need to do something like this:
> 
> diff --git a/drivers/tty/serial/st-asc.c b/drivers/tty/serial/st-asc.c
> index c763253514e9..5f9f01fac6dd 100644
> --- a/drivers/tty/serial/st-asc.c
> +++ b/drivers/tty/serial/st-asc.c
> @@ -782,7 +782,9 @@ static struct asc_port *asc_of_get_asc_port(struct
> platform_device *pdev)
>          if (!np)
>                  return NULL;
> 
> -       id = of_alias_get_id(np, ASC_SERIAL_NAME);
> +       id = of_alias_get_id(np, "serial");
> +       if (id < 0)
> +               id = of_alias_get_id(np, ASC_SERIAL_NAME);
> 
>          if (id < 0)
>                  id = 0;
> 
I will fix this too

Patrice

^ permalink raw reply

* Re: [PATCH v2 2/3] ARM: dts: STi: Remove useless stdout-path for STi boards
From: Patrice CHOTARD @ 2018-03-07  7:59 UTC (permalink / raw)
  To: Rob Herring
  Cc: Mark Rutland, Russell King,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE,
	linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
	Greg Kroah-Hartman, Jiri Slaby, linux-serial@vger.kernel.org
In-Reply-To: <CAL_Jsq+-C5h1-xLOB39bhSsn9JR31UaEQL+cRwydD0a4w6sYNw@mail.gmail.com>

Hi Rob

On 03/06/2018 02:26 PM, Rob Herring wrote:
> On Tue, Mar 6, 2018 at 2:07 AM,  <patrice.chotard@st.com> wrote:
>> From: Patrice Chotard <patrice.chotard@st.com>
>>
>> As serial interface is already specified into bootargs,
>> stdout-path can be removed.
> 
> Wrong way around. stdout-path is preferred over using console in bootargs.

Ah sorry, i misunderstood what you previously suggested. I will fix it.

Thanks

Patrice

> 
>>
>> Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
>> ---
>>
>> v2: _ none
>>
>>   arch/arm/boot/dts/stih407-b2120.dts | 1 -
>>   arch/arm/boot/dts/stih410-b2120.dts | 1 -
>>   arch/arm/boot/dts/stih410-b2260.dts | 1 -
>>   arch/arm/boot/dts/stih418-b2199.dts | 1 -
>>   4 files changed, 4 deletions(-)
>>
>> diff --git a/arch/arm/boot/dts/stih407-b2120.dts b/arch/arm/boot/dts/stih407-b2120.dts
>> index 2c4d6033b448..074b4cd0ca89 100644
>> --- a/arch/arm/boot/dts/stih407-b2120.dts
>> +++ b/arch/arm/boot/dts/stih407-b2120.dts
>> @@ -15,7 +15,6 @@
>>
>>          chosen {
>>                  bootargs = "console=serial0,115200 clk_ignore_unused";
>> -               stdout-path = &sbc_serial0;
>>          };
>>
>>          memory@40000000 {
>> diff --git a/arch/arm/boot/dts/stih410-b2120.dts b/arch/arm/boot/dts/stih410-b2120.dts
>> index 5422850641e8..eae3050984d0 100644
>> --- a/arch/arm/boot/dts/stih410-b2120.dts
>> +++ b/arch/arm/boot/dts/stih410-b2120.dts
>> @@ -15,7 +15,6 @@
>>
>>          chosen {
>>                  bootargs = "console=serial0,115200 clk_ignore_unused";
>> -               stdout-path = &sbc_serial0;
>>          };
>>
>>          memory@40000000 {
>> diff --git a/arch/arm/boot/dts/stih410-b2260.dts b/arch/arm/boot/dts/stih410-b2260.dts
>> index ca347160e35d..c26e388bd1a4 100644
>> --- a/arch/arm/boot/dts/stih410-b2260.dts
>> +++ b/arch/arm/boot/dts/stih410-b2260.dts
>> @@ -16,7 +16,6 @@
>>
>>          chosen {
>>                  bootargs = "console=serial1,115200 clk_ignore_unused";
>> -               stdout-path = &uart1;
>>          };
>>
>>          memory@40000000 {
>> diff --git a/arch/arm/boot/dts/stih418-b2199.dts b/arch/arm/boot/dts/stih418-b2199.dts
>> index dbf7bb704a1a..d948f774fee7 100644
>> --- a/arch/arm/boot/dts/stih418-b2199.dts
>> +++ b/arch/arm/boot/dts/stih418-b2199.dts
>> @@ -15,7 +15,6 @@
>>
>>          chosen {
>>                  bootargs = "console=serial0,115200 clk_ignore_unused";
>> -               stdout-path = &sbc_serial0;
>>          };
>>
>>          memory@40000000 {
>> --
>> 1.9.1
>>

^ permalink raw reply

* Re: [PATCH v2 3/3] tty: st-asc: Update tty alias
From: Rob Herring @ 2018-03-06 13:29 UTC (permalink / raw)
  To: Patrice Chotard
  Cc: Mark Rutland, Russell King,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE,
	linux-kernel@vger.kernel.org, devicetree, Greg Kroah-Hartman,
	Jiri Slaby, linux-serial
In-Reply-To: <1520323650-11030-4-git-send-email-patrice.chotard@st.com>

On Tue, Mar 6, 2018 at 2:07 AM,  <patrice.chotard@st.com> wrote:
> From: Patrice Chotard <patrice.chotard@st.com>
>
> Since dtc v1.4.6-9-gaadd0b65c987, aliases property name
> must include only lowercase and '-'.
>
> After having updated all STi boards serial aliases from "ttyASN"
> to "serialN", st-asc driver need to be updated accordingly as tty
> aliases id is retrieved using of_alias_get_id(np, ASC_SERIAL_NAME);

Again, changing the tty name breaks userspace. You can't do that.

You need to do something like this:

diff --git a/drivers/tty/serial/st-asc.c b/drivers/tty/serial/st-asc.c
index c763253514e9..5f9f01fac6dd 100644
--- a/drivers/tty/serial/st-asc.c
+++ b/drivers/tty/serial/st-asc.c
@@ -782,7 +782,9 @@ static struct asc_port *asc_of_get_asc_port(struct
platform_device *pdev)
        if (!np)
                return NULL;

-       id = of_alias_get_id(np, ASC_SERIAL_NAME);
+       id = of_alias_get_id(np, "serial");
+       if (id < 0)
+               id = of_alias_get_id(np, ASC_SERIAL_NAME);

        if (id < 0)
                id = 0;

^ permalink raw reply related

* Re: [PATCH v2 2/3] ARM: dts: STi: Remove useless stdout-path for STi boards
From: Rob Herring @ 2018-03-06 13:26 UTC (permalink / raw)
  To: Patrice Chotard
  Cc: Mark Rutland, Russell King,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE,
	linux-kernel@vger.kernel.org, devicetree, Greg Kroah-Hartman,
	Jiri Slaby, linux-serial
In-Reply-To: <1520323650-11030-3-git-send-email-patrice.chotard@st.com>

On Tue, Mar 6, 2018 at 2:07 AM,  <patrice.chotard@st.com> wrote:
> From: Patrice Chotard <patrice.chotard@st.com>
>
> As serial interface is already specified into bootargs,
> stdout-path can be removed.

Wrong way around. stdout-path is preferred over using console in bootargs.

>
> Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
> ---
>
> v2: _ none
>
>  arch/arm/boot/dts/stih407-b2120.dts | 1 -
>  arch/arm/boot/dts/stih410-b2120.dts | 1 -
>  arch/arm/boot/dts/stih410-b2260.dts | 1 -
>  arch/arm/boot/dts/stih418-b2199.dts | 1 -
>  4 files changed, 4 deletions(-)
>
> diff --git a/arch/arm/boot/dts/stih407-b2120.dts b/arch/arm/boot/dts/stih407-b2120.dts
> index 2c4d6033b448..074b4cd0ca89 100644
> --- a/arch/arm/boot/dts/stih407-b2120.dts
> +++ b/arch/arm/boot/dts/stih407-b2120.dts
> @@ -15,7 +15,6 @@
>
>         chosen {
>                 bootargs = "console=serial0,115200 clk_ignore_unused";
> -               stdout-path = &sbc_serial0;
>         };
>
>         memory@40000000 {
> diff --git a/arch/arm/boot/dts/stih410-b2120.dts b/arch/arm/boot/dts/stih410-b2120.dts
> index 5422850641e8..eae3050984d0 100644
> --- a/arch/arm/boot/dts/stih410-b2120.dts
> +++ b/arch/arm/boot/dts/stih410-b2120.dts
> @@ -15,7 +15,6 @@
>
>         chosen {
>                 bootargs = "console=serial0,115200 clk_ignore_unused";
> -               stdout-path = &sbc_serial0;
>         };
>
>         memory@40000000 {
> diff --git a/arch/arm/boot/dts/stih410-b2260.dts b/arch/arm/boot/dts/stih410-b2260.dts
> index ca347160e35d..c26e388bd1a4 100644
> --- a/arch/arm/boot/dts/stih410-b2260.dts
> +++ b/arch/arm/boot/dts/stih410-b2260.dts
> @@ -16,7 +16,6 @@
>
>         chosen {
>                 bootargs = "console=serial1,115200 clk_ignore_unused";
> -               stdout-path = &uart1;
>         };
>
>         memory@40000000 {
> diff --git a/arch/arm/boot/dts/stih418-b2199.dts b/arch/arm/boot/dts/stih418-b2199.dts
> index dbf7bb704a1a..d948f774fee7 100644
> --- a/arch/arm/boot/dts/stih418-b2199.dts
> +++ b/arch/arm/boot/dts/stih418-b2199.dts
> @@ -15,7 +15,6 @@
>
>         chosen {
>                 bootargs = "console=serial0,115200 clk_ignore_unused";
> -               stdout-path = &sbc_serial0;
>         };
>
>         memory@40000000 {
> --
> 1.9.1
>

^ permalink raw reply

* Re: [PATCH 0/2] Update interrupt names
From: Bich HEMON @ 2018-03-06  9:58 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Rob Herring, Mark Rutland, Maxime Coquelin,
	Alexandre TORGUE, Jiri Slaby, linux-serial@vger.kernel.org,
	devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
In-Reply-To: <1519815044-22669-1-git-send-email-bich.hemon@st.com>

Hi all,

On 02/28/2018 11:51 AM, Bich HEMON wrote:
> This patchset updates existing stm32 usart driver by updating interrupt
> initialization by name.
> 
> Bich Hemon (2):
>    dt-bindings: serial: stm32: add wakeup option using note
>    serial: stm32: update interrupt initialization
> 
>   Documentation/devicetree/bindings/serial/st,stm32-usart.txt | 4 ++++
>   drivers/tty/serial/stm32-usart.c                            | 4 ++--
>   2 files changed, 6 insertions(+), 2 deletions(-)
> 

Please note that this patch set is abandoned. As Rob pointed that out, 
the interrupt indices are fixed, so there is no need to keep these patches.

Best regards,

Bich

^ permalink raw reply

* [PATCH v2 3/3] tty: st-asc: Update tty alias
From: patrice.chotard @ 2018-03-06  8:07 UTC (permalink / raw)
  To: robh+dt, mark.rutland, linux, linux-arm-kernel, linux-kernel,
	devicetree, gregkh, jslaby, linux-serial
  Cc: patrice.chotard
In-Reply-To: <1520323650-11030-1-git-send-email-patrice.chotard@st.com>

From: Patrice Chotard <patrice.chotard@st.com>

Since dtc v1.4.6-9-gaadd0b65c987, aliases property name
must include only lowercase and '-'.

After having updated all STi boards serial aliases from "ttyASN"
to "serialN", st-asc driver need to be updated accordingly as tty
aliases id is retrieved using of_alias_get_id(np, ASC_SERIAL_NAME);

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
---

v2: _ update st-asc driver with "serial" alias prefix


 drivers/tty/serial/st-asc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/serial/st-asc.c b/drivers/tty/serial/st-asc.c
index c763253514e9..f9372b690e54 100644
--- a/drivers/tty/serial/st-asc.c
+++ b/drivers/tty/serial/st-asc.c
@@ -29,7 +29,7 @@
 #include <linux/gpio/consumer.h>
 
 #define DRIVER_NAME "st-asc"
-#define ASC_SERIAL_NAME "ttyAS"
+#define ASC_SERIAL_NAME "serial"
 #define ASC_FIFO_SIZE 16
 #define ASC_MAX_PORTS 8
 
-- 
1.9.1

^ permalink raw reply related

* [PATCH v2 2/3] ARM: dts: STi: Remove useless stdout-path for STi boards
From: patrice.chotard @ 2018-03-06  8:07 UTC (permalink / raw)
  To: robh+dt, mark.rutland, linux, linux-arm-kernel, linux-kernel,
	devicetree, gregkh, jslaby, linux-serial
  Cc: patrice.chotard
In-Reply-To: <1520323650-11030-1-git-send-email-patrice.chotard@st.com>

From: Patrice Chotard <patrice.chotard@st.com>

As serial interface is already specified into bootargs,
stdout-path can be removed.

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
---

v2: _ none

 arch/arm/boot/dts/stih407-b2120.dts | 1 -
 arch/arm/boot/dts/stih410-b2120.dts | 1 -
 arch/arm/boot/dts/stih410-b2260.dts | 1 -
 arch/arm/boot/dts/stih418-b2199.dts | 1 -
 4 files changed, 4 deletions(-)

diff --git a/arch/arm/boot/dts/stih407-b2120.dts b/arch/arm/boot/dts/stih407-b2120.dts
index 2c4d6033b448..074b4cd0ca89 100644
--- a/arch/arm/boot/dts/stih407-b2120.dts
+++ b/arch/arm/boot/dts/stih407-b2120.dts
@@ -15,7 +15,6 @@
 
 	chosen {
 		bootargs = "console=serial0,115200 clk_ignore_unused";
-		stdout-path = &sbc_serial0;
 	};
 
 	memory@40000000 {
diff --git a/arch/arm/boot/dts/stih410-b2120.dts b/arch/arm/boot/dts/stih410-b2120.dts
index 5422850641e8..eae3050984d0 100644
--- a/arch/arm/boot/dts/stih410-b2120.dts
+++ b/arch/arm/boot/dts/stih410-b2120.dts
@@ -15,7 +15,6 @@
 
 	chosen {
 		bootargs = "console=serial0,115200 clk_ignore_unused";
-		stdout-path = &sbc_serial0;
 	};
 
 	memory@40000000 {
diff --git a/arch/arm/boot/dts/stih410-b2260.dts b/arch/arm/boot/dts/stih410-b2260.dts
index ca347160e35d..c26e388bd1a4 100644
--- a/arch/arm/boot/dts/stih410-b2260.dts
+++ b/arch/arm/boot/dts/stih410-b2260.dts
@@ -16,7 +16,6 @@
 
 	chosen {
 		bootargs = "console=serial1,115200 clk_ignore_unused";
-		stdout-path = &uart1;
 	};
 
 	memory@40000000 {
diff --git a/arch/arm/boot/dts/stih418-b2199.dts b/arch/arm/boot/dts/stih418-b2199.dts
index dbf7bb704a1a..d948f774fee7 100644
--- a/arch/arm/boot/dts/stih418-b2199.dts
+++ b/arch/arm/boot/dts/stih418-b2199.dts
@@ -15,7 +15,6 @@
 
 	chosen {
 		bootargs = "console=serial0,115200 clk_ignore_unused";
-		stdout-path = &sbc_serial0;
 	};
 
 	memory@40000000 {
-- 
1.9.1

^ permalink raw reply related

* [PATCH v2 1/3] ARM: dts: STi: Fix aliases property name for STi boards
From: patrice.chotard @ 2018-03-06  8:07 UTC (permalink / raw)
  To: robh+dt, mark.rutland, linux, linux-arm-kernel, linux-kernel,
	devicetree, gregkh, jslaby, linux-serial
  Cc: patrice.chotard
In-Reply-To: <1520323650-11030-1-git-send-email-patrice.chotard@st.com>

From: Patrice Chotard <patrice.chotard@st.com>

Update serial aliases from "ttyASN" to more common "serialN".

Since dtc v1.4.6-9-gaadd0b65c987, aliases property name must
be lowercase only. This allows to fix following dtc warnings:

arch/arm/boot/dts/stih418-b2199.dtb: Warning (alias_paths): /aliases: aliases property name must include only lowercase and '-'
arch/arm/boot/dts/stih407-b2120.dtb: Warning (alias_paths): /aliases: aliases property name must include only lowercase and '-'
arch/arm/boot/dts/stih410-b2260.dtb: Warning (alias_paths): /aliases: aliases property name must include only lowercase and '-'
arch/arm/boot/dts/stih410-b2120.dtb: Warning (alias_paths): /aliases: aliases property name must include only lowercase and '-'

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
---

v2: _ use serialN instead of ttyasN aliases to not break ABI


 arch/arm/boot/dts/stih407-b2120.dts | 4 ++--
 arch/arm/boot/dts/stih410-b2120.dts | 4 ++--
 arch/arm/boot/dts/stih410-b2260.dts | 4 ++--
 arch/arm/boot/dts/stih418-b2199.dts | 4 ++--
 4 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/arch/arm/boot/dts/stih407-b2120.dts b/arch/arm/boot/dts/stih407-b2120.dts
index de3c8bf129b5..2c4d6033b448 100644
--- a/arch/arm/boot/dts/stih407-b2120.dts
+++ b/arch/arm/boot/dts/stih407-b2120.dts
@@ -14,7 +14,7 @@
 	compatible = "st,stih407-b2120", "st,stih407";
 
 	chosen {
-		bootargs = "console=ttyAS0,115200 clk_ignore_unused";
+		bootargs = "console=serial0,115200 clk_ignore_unused";
 		stdout-path = &sbc_serial0;
 	};
 
@@ -24,7 +24,7 @@
 	};
 
 	aliases {
-		ttyAS0 = &sbc_serial0;
+		serial0 = &sbc_serial0;
 		ethernet0 = &ethernet0;
 	};
 
diff --git a/arch/arm/boot/dts/stih410-b2120.dts b/arch/arm/boot/dts/stih410-b2120.dts
index 0a59b7b0f4b2..5422850641e8 100644
--- a/arch/arm/boot/dts/stih410-b2120.dts
+++ b/arch/arm/boot/dts/stih410-b2120.dts
@@ -14,7 +14,7 @@
 	compatible = "st,stih410-b2120", "st,stih410";
 
 	chosen {
-		bootargs = "console=ttyAS0,115200 clk_ignore_unused";
+		bootargs = "console=serial0,115200 clk_ignore_unused";
 		stdout-path = &sbc_serial0;
 	};
 
@@ -24,7 +24,7 @@
 	};
 
 	aliases {
-		ttyAS0 = &sbc_serial0;
+		serial0 = &sbc_serial0;
 		ethernet0 = &ethernet0;
 	};
 
diff --git a/arch/arm/boot/dts/stih410-b2260.dts b/arch/arm/boot/dts/stih410-b2260.dts
index feb8834478fa..ca347160e35d 100644
--- a/arch/arm/boot/dts/stih410-b2260.dts
+++ b/arch/arm/boot/dts/stih410-b2260.dts
@@ -15,7 +15,7 @@
 	compatible = "st,stih410-b2260", "st,stih410";
 
 	chosen {
-		bootargs = "console=ttyAS1,115200 clk_ignore_unused";
+		bootargs = "console=serial1,115200 clk_ignore_unused";
 		stdout-path = &uart1;
 	};
 
@@ -25,7 +25,7 @@
 	};
 
 	aliases {
-		ttyAS1 = &uart1;
+		serial1 = &uart1;
 		ethernet0 = &ethernet0;
 	};
 
diff --git a/arch/arm/boot/dts/stih418-b2199.dts b/arch/arm/boot/dts/stih418-b2199.dts
index 39b4db2e3507..dbf7bb704a1a 100644
--- a/arch/arm/boot/dts/stih418-b2199.dts
+++ b/arch/arm/boot/dts/stih418-b2199.dts
@@ -14,7 +14,7 @@
 	compatible = "st,stih418-b2199", "st,stih418";
 
 	chosen {
-		bootargs = "console=ttyAS0,115200 clk_ignore_unused";
+		bootargs = "console=serial0,115200 clk_ignore_unused";
 		stdout-path = &sbc_serial0;
 	};
 
@@ -24,7 +24,7 @@
 	};
 
 	aliases {
-		ttyAS0 = &sbc_serial0;
+		serial0 = &sbc_serial0;
 		ethernet0 = &ethernet0;
 	};
 
-- 
1.9.1

^ permalink raw reply related

* [PATCH v2 0/3] Fix STi aliases property name
From: patrice.chotard @ 2018-03-06  8:07 UTC (permalink / raw)
  To: robh+dt, mark.rutland, linux, linux-arm-kernel, linux-kernel,
	devicetree, gregkh, jslaby, linux-serial
  Cc: patrice.chotard

From: Patrice Chotard <patrice.chotard@st.com>

Since dtc v1.4.6-9-gaadd0b65c987, when compiling dtb with W=1 option,
the following warnings are triggered :
    
arch/arm/boot/dts/stih418-b2199.dtb: Warning (alias_paths): /aliases: aliases property name must include only lowercase and '-'
arch/arm/boot/dts/stih407-b2120.dtb: Warning (alias_paths): /aliases: aliases property name must include only lowercase and '-'
arch/arm/boot/dts/stih410-b2260.dtb: Warning (alias_paths): /aliases: aliases property name must include only lowercase and '-'
arch/arm/boot/dts/stih410-b2120.dtb: Warning (alias_paths): /aliases: aliases property name must include only lowercase and '-'

_ Patch 1, convert the aliases property name in lowercase in 
  all STi board dts files.

_ Patch 2, remove useless stdout-path property

_ Patch 3, rework the tty driver st-asc accordingly, as aliases id is retrieved 
  using of_alias_get_id() with a defined string with is not lowercase only.

v2: Fix Rob Herring's remarks :
  	  _ use serialN instead of ttyasN aliases to not break ABI
	  _ remove useless stdout-path property
	  _ update st-asc driver with "serial" alias prefix

Patrice Chotard (2):
  ARM: dts: STi: Fix aliases property name for STi boards
  ARM: dts: STi: Remove useless stdout-path for STi boards
  tty: st-asc: Update tty alias

 arch/arm/boot/dts/stih407-b2120.dts | 5 ++---
 arch/arm/boot/dts/stih410-b2120.dts | 5 ++---
 arch/arm/boot/dts/stih410-b2260.dts | 5 ++---
 arch/arm/boot/dts/stih418-b2199.dts | 5 ++---
 drivers/tty/serial/st-asc.c         | 2 +-
 5 files changed, 9 insertions(+), 13 deletions(-)

-- 
1.9.1

^ permalink raw reply

* Re: [PATCH 1/2] dt-bindings: serial: stm32: add RS485 optional properties
From: Rob Herring @ 2018-03-06  0:53 UTC (permalink / raw)
  To: Bich HEMON
  Cc: Greg Kroah-Hartman, Mark Rutland, Maxime Coquelin,
	Alexandre TORGUE, Jiri Slaby, linux-serial@vger.kernel.org,
	devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
In-Reply-To: <1519815373-22940-2-git-send-email-bich.hemon@st.com>

On Wed, Feb 28, 2018 at 10:56:18AM +0000, Bich HEMON wrote:
> Add options for enabling RS485 hardware control and configuring
> Driver Enable signal:
> - rs485-rts-delay
> - rs485-rx-during-tx
> - rs485-rts-active-low
> - linux,rs485-enabled-at-boot-time
> 
> Signed-off-by: Bich Hemon <bich.hemon@st.com>
> ---
>  Documentation/devicetree/bindings/serial/st,stm32-usart.txt | 2 ++
>  1 file changed, 2 insertions(+)

Reviewed-by: Rob Herring <robh@kernel.org>

^ permalink raw reply

* Re: [PATCH 1/2] dt-bindings: serial: stm32: add wakeup option using note
From: Rob Herring @ 2018-03-06  0:52 UTC (permalink / raw)
  To: Bich HEMON
  Cc: Greg Kroah-Hartman, Mark Rutland, Maxime Coquelin,
	Alexandre TORGUE, Jiri Slaby, linux-serial@vger.kernel.org,
	devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
In-Reply-To: <1519815044-22669-2-git-send-email-bich.hemon@st.com>

On Wed, Feb 28, 2018 at 10:51:17AM +0000, Bich HEMON wrote:
> Update bindings with interrupt-names and wakeup-source information
> 
> Signed-off-by: Bich Hemon <bich.hemon@st.com>
> ---
>  Documentation/devicetree/bindings/serial/st,stm32-usart.txt | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/serial/st,stm32-usart.txt b/Documentation/devicetree/bindings/serial/st,stm32-usart.txt
> index d150b04..aaeb564 100644
> --- a/Documentation/devicetree/bindings/serial/st,stm32-usart.txt
> +++ b/Documentation/devicetree/bindings/serial/st,stm32-usart.txt
> @@ -10,6 +10,7 @@ Required properties:
>  - interrupts:
>    - The interrupt line for the USART instance,
>    - An optional wake-up interrupt.
> +- interrupt-names: Contains "event" for the USART interrupt line.

This should be moved down into optional properties.

>  - clocks: The input clock of the USART instance
>  
>  Optional properties:
> @@ -17,6 +18,9 @@ Optional properties:
>  - st,hw-flow-ctrl: bool flag to enable hardware flow control.
>  - dmas: phandle(s) to DMA controller node(s). Refer to stm32-dma.txt
>  - dma-names: "rx" and/or "tx"
> +- wakeup-source: bool flag to indicate this device has wakeup capabilities
> +- interrupt-names : Should contain "wakeup" if optional wake-up interrupt is
> +  used.
>  
>  Examples:
>  usart4: serial@40004c00 {
> -- 
> 1.9.1

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox