[U-Boot,v2,2/9] serial: stm32x7: add STM32H7 support

Message ID 1505318412-27121-3-git-send-email-patrice.chotard@st.com
State Accepted
Delegated to: Tom Rini
Headers show
Series
  • Add STM32H7 SoC, Discovery and Evaluation board support
Related show

Commit Message

Patrice CHOTARD Sept. 13, 2017, 4 p.m.
From: Patrice Chotard <patrice.chotard@st.com>

STM32F7 and STM32H7 shares the same UART block, add
STM32H7 compatible string.

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
---
 drivers/serial/Kconfig          | 7 ++++---
 drivers/serial/serial_stm32x7.c | 2 ++
 2 files changed, 6 insertions(+), 3 deletions(-)

Comments

Simon Glass Sept. 17, 2017, 5:53 p.m. | #1
On 13 September 2017 at 10:00,  <patrice.chotard@st.com> wrote:
> From: Patrice Chotard <patrice.chotard@st.com>
>
> STM32F7 and STM32H7 shares the same UART block, add
> STM32H7 compatible string.
>
> Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
> ---
>  drivers/serial/Kconfig          | 7 ++++---
>  drivers/serial/serial_stm32x7.c | 2 ++
>  2 files changed, 6 insertions(+), 3 deletions(-)

Reviewed-by: Simon Glass <sjg@chromium.org>
Vikas Manocha Sept. 18, 2017, 10:40 p.m. | #2
Hi Patrice,

On 09/13/2017 09:00 AM, patrice.chotard@st.com wrote:
> From: Patrice Chotard <patrice.chotard@st.com>
> 
> STM32F7 and STM32H7 shares the same UART block, add
> STM32H7 compatible string.
> 
> Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
> ---
>  drivers/serial/Kconfig          | 7 ++++---
>  drivers/serial/serial_stm32x7.c | 2 ++
>  2 files changed, 6 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig
> index aeed538..0775d95 100644
> --- a/drivers/serial/Kconfig
> +++ b/drivers/serial/Kconfig
> @@ -524,10 +524,11 @@ config STI_ASC_SERIAL
>  
>  config STM32X7_SERIAL
>  	bool "STMicroelectronics STM32 SoCs on-chip UART"
> -	depends on DM_SERIAL && STM32F7
> +	depends on DM_SERIAL && (STM32F7 || STM32H7)
>  	help
> -	  If you have a machine based on a STM32 F7 you can enable its
> -	  onboard serial ports, say Y to this option. If unsure, say N.
> +	  If you have a machine based on a STM32 F7 or H7 SoC you can
> +	  enable its onboard serial ports, say Y to this option.
> +	  If unsure, say N.
>  
>  config MPC8XX_CONS
>  	bool "Console driver for MPC8XX"
> diff --git a/drivers/serial/serial_stm32x7.c b/drivers/serial/serial_stm32x7.c
> index bf118a7..2f4eafa 100644
> --- a/drivers/serial/serial_stm32x7.c
> +++ b/drivers/serial/serial_stm32x7.c
> @@ -112,6 +112,8 @@ static int stm32_serial_probe(struct udevice *dev)
>  static const struct udevice_id stm32_serial_id[] = {
>  	{.compatible = "st,stm32f7-usart"},
>  	{.compatible = "st,stm32f7-uart"},
> +	{.compatible = "st,stm32h7-usart"},
> +	{.compatible = "st,stm32h7-uart"},

two compatibles are consuming space & time without adding any value.

Cheers,
Vikas

>  	{}
>  };
>  
>
Tom Rini Sept. 22, 2017, 2:19 p.m. | #3
On Wed, Sep 13, 2017 at 06:00:05PM +0200, patrice.chotard@st.com wrote:

> From: Patrice Chotard <patrice.chotard@st.com>
> 
> STM32F7 and STM32H7 shares the same UART block, add
> STM32H7 compatible string.
> 
> Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
> Reviewed-by: Simon Glass <sjg@chromium.org>

Applied to u-boot/master, thanks!
Patrice CHOTARD Sept. 25, 2017, 7:48 a.m. | #4
Hi Vikas

On 09/19/2017 12:40 AM, Vikas Manocha wrote:
> Hi Patrice,
> 
> On 09/13/2017 09:00 AM, patrice.chotard@st.com wrote:
>> From: Patrice Chotard <patrice.chotard@st.com>
>>
>> STM32F7 and STM32H7 shares the same UART block, add
>> STM32H7 compatible string.
>>
>> Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
>> ---
>>   drivers/serial/Kconfig          | 7 ++++---
>>   drivers/serial/serial_stm32x7.c | 2 ++
>>   2 files changed, 6 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig
>> index aeed538..0775d95 100644
>> --- a/drivers/serial/Kconfig
>> +++ b/drivers/serial/Kconfig
>> @@ -524,10 +524,11 @@ config STI_ASC_SERIAL
>>   
>>   config STM32X7_SERIAL
>>   	bool "STMicroelectronics STM32 SoCs on-chip UART"
>> -	depends on DM_SERIAL && STM32F7
>> +	depends on DM_SERIAL && (STM32F7 || STM32H7)
>>   	help
>> -	  If you have a machine based on a STM32 F7 you can enable its
>> -	  onboard serial ports, say Y to this option. If unsure, say N.
>> +	  If you have a machine based on a STM32 F7 or H7 SoC you can
>> +	  enable its onboard serial ports, say Y to this option.
>> +	  If unsure, say N.
>>   
>>   config MPC8XX_CONS
>>   	bool "Console driver for MPC8XX"
>> diff --git a/drivers/serial/serial_stm32x7.c b/drivers/serial/serial_stm32x7.c
>> index bf118a7..2f4eafa 100644
>> --- a/drivers/serial/serial_stm32x7.c
>> +++ b/drivers/serial/serial_stm32x7.c
>> @@ -112,6 +112,8 @@ static int stm32_serial_probe(struct udevice *dev)
>>   static const struct udevice_id stm32_serial_id[] = {
>>   	{.compatible = "st,stm32f7-usart"},
>>   	{.compatible = "st,stm32f7-uart"},
>> +	{.compatible = "st,stm32h7-usart"},
>> +	{.compatible = "st,stm32h7-uart"},
> 
> two compatibles are consuming space & time without adding any value.

Agree, i will send a series to remove the "usart" compatible as this 
series has been already merged in u-boot/master

Thanks

Patrice

> 
> Cheers,
> Vikas
> 
>>   	{}
>>   };
>>   
>>

Patch

diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig
index aeed538..0775d95 100644
--- a/drivers/serial/Kconfig
+++ b/drivers/serial/Kconfig
@@ -524,10 +524,11 @@  config STI_ASC_SERIAL
 
 config STM32X7_SERIAL
 	bool "STMicroelectronics STM32 SoCs on-chip UART"
-	depends on DM_SERIAL && STM32F7
+	depends on DM_SERIAL && (STM32F7 || STM32H7)
 	help
-	  If you have a machine based on a STM32 F7 you can enable its
-	  onboard serial ports, say Y to this option. If unsure, say N.
+	  If you have a machine based on a STM32 F7 or H7 SoC you can
+	  enable its onboard serial ports, say Y to this option.
+	  If unsure, say N.
 
 config MPC8XX_CONS
 	bool "Console driver for MPC8XX"
diff --git a/drivers/serial/serial_stm32x7.c b/drivers/serial/serial_stm32x7.c
index bf118a7..2f4eafa 100644
--- a/drivers/serial/serial_stm32x7.c
+++ b/drivers/serial/serial_stm32x7.c
@@ -112,6 +112,8 @@  static int stm32_serial_probe(struct udevice *dev)
 static const struct udevice_id stm32_serial_id[] = {
 	{.compatible = "st,stm32f7-usart"},
 	{.compatible = "st,stm32f7-uart"},
+	{.compatible = "st,stm32h7-usart"},
+	{.compatible = "st,stm32h7-uart"},
 	{}
 };