Migrate NXP/Freescale Vybrid based boards to support pure DT
Subsystems (2)
v3 cover Migrate NXP/Freescale Vybrid based boards to support pure DT
Changes since v2:
- Split the patch for updating the license string.
- Reorder the patchset to avoid broken state.
Changes since v1:
- Update the license string in device tree's.
- Update all lpuart's uart nodes in device tree.
- Dropped *_dtb_defconfig and updated the default defconfig's with DT support.
- Reordered defconfig's using defconfig via savedefconfig.
- Use one patch to update all Vybrid based board defconfig's.
- Dropped vybrid_gpio driver legacy code. Thanks! Stefan for pointing this.
- Dropped the legacy way of enabling GPIO, UART and SPI on NXP/Freescale Vybrid based board's.
- Compile checked for vf610twr and pcm052 since I don't have access to such hardware at my end. Reviewer's and tester's welcome!
Bhuvanchandra DV (9):
arm: vybrid: Enable lpuart support
arm: vybrid: Update the license string
arm: colibri-vf: Enable serial support
arm: vybrid: Drop enabling GPIO, UART and SPI in legacy mode
arm: vf610-twr: Add device tree file's
arm: pcm052: Add device tree file's
arm: vybrid: Update defconfig's
dm: lpuart: Drop the legacy code
dm: vybrid_gpio: Drop legacy code
arch/arm/dts/Makefile | 4 +- arch/arm/dts/pcm052.dts | 22 +++++++++ arch/arm/dts/vf-colibri.dtsi | 14 ++++-- arch/arm/dts/vf.dtsi | 48 +++++++++++++++++-- arch/arm/dts/vf500-colibri.dts | 5 -- arch/arm/dts/vf610-colibri.dts | 5 -- arch/arm/dts/vf610-twr.dts | 22 +++++++++ configs/colibri_vf_defconfig | 8 ++++ configs/colibri_vf_dtb_defconfig | 14 ------ configs/pcm052_defconfig | 7 +++ configs/vf610twr_defconfig | 7 +++ configs/vf610twr_nand_defconfig | 7 +++ drivers/gpio/vybrid_gpio.c | 18 ------- drivers/serial/serial_lpuart.c | 101 +-------------------------------------- include/configs/colibri_vf.h | 13 ----- include/configs/pcm052.h | 3 -- include/configs/vf610twr.h | 3 -- 17 files changed, 130 insertions(+), 171 deletions(-) create mode 100644 arch/arm/dts/pcm052.dts create mode 100644 arch/arm/dts/vf610-twr.dts delete mode 100644 configs/colibri_vf_dtb_defconfig
Signature · 1 line
2.7.0
PATCH v3 1/9 arm: vybrid: Enable lpuart support
Add device tree node's for lpuart on Vybrid platform
--- arch/arm/dts/vf.dtsi | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+)
arch/arm/dts/vf.dtsi +43 -0
@@ -17,6 +17,12 @@ gpio2 = &gpio2; gpio3 = &gpio3; gpio4 = &gpio4; + serial0 = &uart0; + serial1 = &uart1; + serial2 = &uart2; + serial3 = &uart3; + serial4 = &uart4; + serial5 = &uart5; spi0 = &dspi0; spi1 = &dspi1; };
@@ -33,6 +39,30 @@ #size-cells = <1>; ranges; + uart0: serial at 40027000 { + compatible = "fsl,vf610-lpuart"; + reg = <0x40027000 0x1000>; + status = "disabled"; + }; + + uart1: serial at 40028000 { + compatible = "fsl,vf610-lpuart"; + reg = <0x40028000 0x1000>; + status = "disabled"; + }; + + uart2: serial at 40029000 { + compatible = "fsl,vf610-lpuart"; + reg = <0x40029000 0x1000>; + status = "disabled"; + }; + + uart3: serial at 4002a000 { + compatible = "fsl,vf610-lpuart"; + reg = <0x4002a000 0x1000>; + status = "disabled"; + }; + dspi0: dspi0 at 4002c000 { #address-cells = <1>; #size-cells = <0>;
@@ -95,6 +125,19 @@ #address-cells = <1>; #size-cells = <1>; ranges; + + uart4: serial at 400a9000 { + compatible = "fsl,vf610-lpuart"; + reg = <0x400a9000 0x1000>; + status = "disabled"; + }; + + uart5: serial at 400aa000 { + compatible = "fsl,vf610-lpuart"; + reg = <0x400aa000 0x1000>; + status = "disabled"; + }; + }; }; };
Signature · 1 line
2.7.0
PATCH v3 1/9 arm: vybrid: Enable lpuart support
Quoted 7 lines · Bhuvanchandra DV
Add device tree node's for lpuart on Vybrid platform
Signed-off-by Bhuvanchandra DV <[email protected]>--- arch/arm/dts/vf.dtsi | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+)
PATCH v3 1/9 arm: vybrid: Enable lpuart support
In reply to Bhuvanchandra DVQuoted 3 lines · Bhuvanchandra DV
Add device tree node's for lpuart on Vybrid platform
Signed-off-by Bhuvanchandra DV <[email protected]>
Quoted 72 lines
--- arch/arm/dts/vf.dtsi | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+)arch/arm/dts/vf.dtsi +43
-0@@ -17,6 +17,12 @@ gpio2 = &gpio2; gpio3 = &gpio3; gpio4 = &gpio4; + serial0 = &uart0; + serial1 = &uart1; + serial2 = &uart2; + serial3 = &uart3; + serial4 = &uart4; + serial5 = &uart5; spi0 = &dspi0; spi1 = &dspi1; };@@ -33,6 +39,30 @@ #size-cells = <1>; ranges; + uart0: serial at 40027000 { + compatible = "fsl,vf610-lpuart"; + reg = <0x40027000 0x1000>; + status = "disabled"; + }; + + uart1: serial at 40028000 { + compatible = "fsl,vf610-lpuart"; + reg = <0x40028000 0x1000>; + status = "disabled"; + }; + + uart2: serial at 40029000 { + compatible = "fsl,vf610-lpuart"; + reg = <0x40029000 0x1000>; + status = "disabled"; + }; + + uart3: serial at 4002a000 { + compatible = "fsl,vf610-lpuart"; + reg = <0x4002a000 0x1000>; + status = "disabled"; + }; + dspi0: dspi0 at 4002c000 { #address-cells = <1>; #size-cells = <0>;@@ -95,6 +125,19 @@ #address-cells = <1>; #size-cells = <1>; ranges; + + uart4: serial at 400a9000 { + compatible = "fsl,vf610-lpuart"; + reg = <0x400a9000 0x1000>; + status = "disabled"; + }; + + uart5: serial at 400aa000 { + compatible = "fsl,vf610-lpuart"; + reg = <0x400aa000 0x1000>; + status = "disabled"; + }; + }; }; };
PATCH v3 2/9 arm: vybrid: Update the license string
In reply to Bhuvanchandra DVSince SPDX license is already there, drop the full one.
--- arch/arm/dts/vf-colibri.dtsi | 5 ----- arch/arm/dts/vf.dtsi | 5 ----- arch/arm/dts/vf500-colibri.dts | 5 ----- arch/arm/dts/vf610-colibri.dts | 5 ----- 4 files changed, 20 deletions(-)
arch/arm/dts/vf-colibri.dtsi +0 -5
@@ -2,11 +2,6 @@ * Copyright 2014 Toradex AG * * SPDX-License-Identifier: GPL-2.0+ or X11 - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. */ #include "vf.dtsi"
arch/arm/dts/vf.dtsi +0 -5
@@ -2,11 +2,6 @@ * Copyright 2013 Freescale Semiconductor, Inc. * * SPDX-License-Identifier: GPL-2.0+ or X11 - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. */ /include/ "skeleton.dtsi"
arch/arm/dts/vf500-colibri.dts +0 -5
@@ -2,11 +2,6 @@ * Copyright 2014 Toradex AG * * SPDX-License-Identifier: GPL-2.0+ or X11 - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. */ /dts-v1/;
arch/arm/dts/vf610-colibri.dts +0 -5
@@ -2,11 +2,6 @@ * Copyright 2014 Toradex AG * * SPDX-License-Identifier: GPL-2.0+ or X11 - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. */ /dts-v1/;
Signature · 1 line
2.7.0
PATCH v3 2/9 arm: vybrid: Update the license string
Quoted 10 lines · Bhuvanchandra DV
Since SPDX license is already there, drop the full one.
Signed-off-by Bhuvanchandra DV <[email protected]>--- arch/arm/dts/vf-colibri.dtsi | 5 ----- arch/arm/dts/vf.dtsi | 5 ----- arch/arm/dts/vf500-colibri.dts | 5 ----- arch/arm/dts/vf610-colibri.dts | 5 ----- 4 files changed, 20 deletions(-)
PATCH v3 2/9 arm: vybrid: Update the license string
In reply to Bhuvanchandra DVQuoted 3 lines · Bhuvanchandra DV
Since SPDX license is already there, drop the full one.
Signed-off-by Bhuvanchandra DV <[email protected]>
Quoted 71 lines
--- arch/arm/dts/vf-colibri.dtsi | 5 ----- arch/arm/dts/vf.dtsi | 5 ----- arch/arm/dts/vf500-colibri.dts | 5 ----- arch/arm/dts/vf610-colibri.dts | 5 ----- 4 files changed, 20 deletions(-)arch/arm/dts/vf-colibri.dtsi +0
-5@@ -2,11 +2,6 @@ * Copyright 2014 Toradex AG * * SPDX-License-Identifier: GPL-2.0+ or X11 - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. */ #include "vf.dtsi"arch/arm/dts/vf.dtsi +0
-5@@ -2,11 +2,6 @@ * Copyright 2013 Freescale Semiconductor, Inc. * * SPDX-License-Identifier: GPL-2.0+ or X11 - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. */ /include/ "skeleton.dtsi"arch/arm/dts/vf500-colibri.dts +0
-5@@ -2,11 +2,6 @@ * Copyright 2014 Toradex AG * * SPDX-License-Identifier: GPL-2.0+ or X11 - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. */ /dts-v1/;arch/arm/dts/vf610-colibri.dts +0
-5@@ -2,11 +2,6 @@ * Copyright 2014 Toradex AG * * SPDX-License-Identifier: GPL-2.0+ or X11 - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. */ /dts-v1/;
PATCH v3 3/9 arm: colibri-vf: Enable serial support
In reply to Bhuvanchandra DV- Enable lpuart support on Toradex Colibri VF50/VF61
- Use UART0 for stdout.
--- arch/arm/dts/vf-colibri.dtsi | 9 +++++++++ 1 file changed, 9 insertions(+)
arch/arm/dts/vf-colibri.dtsi +9 -0
@@ -5,6 +5,12 @@ */ #include "vf.dtsi" +/ { + chosen { + stdout-path = &uart0; + }; +}; + &dspi1 { status = "okay"; bus-num = <1>;
@@ -14,3 +20,6 @@ spi-max-frequency = <50000000>; }; }; +&uart0 { + status = "okay"; +};
Signature · 1 line
2.7.0
PATCH v3 3/9 arm: colibri-vf: Enable serial support
Quoted 27 lines · Bhuvanchandra DV
- Enable lpuart support on Toradex Colibri VF50/VF61
- Use UART0 for stdout.Signed-off-by Bhuvanchandra DV <[email protected]>Acked-by Stefan Agner <[email protected]>--- arch/arm/dts/vf-colibri.dtsi | 9 +++++++++ 1 file changed, 9 insertions(+)arch/arm/dts/vf-colibri.dtsi +6
-0@@ -5,6 +5,12 @@ */ #include "vf.dtsi" +/ { + chosen { + stdout-path = &uart0; + }; +}; + &dspi1 { status = "okay"; bus-num = <1>;
arch/arm/dts/vf-colibri.dtsi line 22
Quoted 3 lines
arch/arm/dts/vf-colibri.dtsi +0
-0@@ -14,3 +20,6 @@ spi-max-frequency = <50000000>; }; };
nits: there should be a blank line here
arch/arm/dts/vf-colibri.dtsi
Quoted 4 lines
arch/arm/dts/vf-colibri.dtsi +3
-1+&uart0 { + status = "okay"; +}; --
Other than that,
PATCH v3 4/9 arm: vybrid: Drop enabling GPIO, SPI and UART in legacy mode
In reply to Bhuvanchandra DVRemove the legacy way of enabling GPIO, SPI and UART on Vybrid based boards since these driver's now only supports DT mode.
--- include/configs/colibri_vf.h | 13 ------------- include/configs/pcm052.h | 3 --- include/configs/vf610twr.h | 3 --- 3 files changed, 19 deletions(-)
include/configs/colibri_vf.h +0 -13
@@ -36,13 +36,10 @@#define CONFIG_BOARD_EARLY_INIT_F -#define LPUART_BASE UART0_BASE -/* Allow to overwrite serial and ethaddr */ #define CONFIG_ENV_OVERWRITE #define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG #define CONFIG_VERSION_VARIABLE -#define CONFIG_SYS_UART_PORT (0)#define CONFIG_BAUDRATE 115200#define CONFIG_CMD_ASKENV
@@ -52,10 +49,6 @@#define CONFIG_SYS_MAX_NAND_DEVICE 1#define CONFIG_SYS_NAND_BASE NFC_BASE_ADDR -/* GPIO support */ -#define CONFIG_DM_GPIO -#define CONFIG_VYBRID_GPIO -/* Dynamic MTD partition support */ #define CONFIG_CMD_MTDPARTS /* Enable 'mtdparts' command line support */ #define CONFIG_MTD_PARTITIONS
@@ -265,10 +258,4 @@#define CONFIG_USB_FUNCTION_MASS_STORAGE #define CONFIG_CMD_USB_MASS_STORAGE -/* Enable SPI support */ -#ifdef CONFIG_OF_CONTROL -#define CONFIG_DM_SPI -#define CONFIG_CMD_SPI -#endif -#endif /* __CONFIG_H */
include/configs/pcm052.h +0 -3
@@ -27,11 +27,8 @@#define CONFIG_BOARD_EARLY_INIT_F -#define LPUART_BASE UART1_BASE -/* Allow to overwrite serial and ethaddr */ #define CONFIG_ENV_OVERWRITE -#define CONFIG_SYS_UART_PORT (1)#define CONFIG_BAUDRATE 115200#undef CONFIG_CMD_IMLS
include/configs/vf610twr.h +0 -3
@@ -34,11 +34,8 @@#define CONFIG_BOARD_EARLY_INIT_F -#define LPUART_BASE UART1_BASE -/* Allow to overwrite serial and ethaddr */ #define CONFIG_ENV_OVERWRITE -#define CONFIG_SYS_UART_PORT (1)#define CONFIG_BAUDRATE 115200/* NAND support */
Signature · 1 line
2.7.0
PATCH v3 4/9 arm: vybrid: Drop enabling GPIO, SPI and UART in legacy mode
Hi Bhuvanchandra,
Quoted 73 lines · Bhuvanchandra DV
Remove the legacy way of enabling GPIO, SPI and UART on Vybrid based boards since these driver's now only supports DT mode.
Signed-off-by Bhuvanchandra DV <[email protected]>--- include/configs/colibri_vf.h | 13 ------------- include/configs/pcm052.h | 3 --- include/configs/vf610twr.h | 3 --- 3 files changed, 19 deletions(-)include/configs/colibri_vf.h +0
-13@@ -36,13 +36,10 @@#define CONFIG_BOARD_EARLY_INIT_F -#define LPUART_BASE UART0_BASE -/* Allow to overwrite serial and ethaddr */ #define CONFIG_ENV_OVERWRITE #define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG #define CONFIG_VERSION_VARIABLE -#define CONFIG_SYS_UART_PORT (0)#define CONFIG_BAUDRATE 115200#define CONFIG_CMD_ASKENV @@ -52,10 +49,6 @@#define CONFIG_SYS_MAX_NAND_DEVICE 1#define CONFIG_SYS_NAND_BASE NFC_BASE_ADDR -/* GPIO support */ -#define CONFIG_DM_GPIO -#define CONFIG_VYBRID_GPIO -/* Dynamic MTD partition support */ #define CONFIG_CMD_MTDPARTS /* Enable 'mtdparts' command line support */ #define CONFIG_MTD_PARTITIONS @@ -265,10 +258,4 @@#define CONFIG_USB_FUNCTION_MASS_STORAGE #define CONFIG_CMD_USB_MASS_STORAGE -/* Enable SPI support */ -#ifdef CONFIG_OF_CONTROL -#define CONFIG_DM_SPI -#define CONFIG_CMD_SPI -#endif -#endif /* __CONFIG_H */ include/configs/pcm052.h +0
-3@@ -27,11 +27,8 @@#define CONFIG_BOARD_EARLY_INIT_F -#define LPUART_BASE UART1_BASE -/* Allow to overwrite serial and ethaddr */ #define CONFIG_ENV_OVERWRITE -#define CONFIG_SYS_UART_PORT (1)#define CONFIG_BAUDRATE 115200#undef CONFIG_CMD_IMLSinclude/configs/vf610twr.h +0
-0@@ -34,11 +34,8 @@#define CONFIG_BOARD_EARLY_INIT_F
include/configs/vf610twr.h
Quoted 10 lines
include/configs/vf610twr.h +0
-4-#define LPUART_BASE UART1_BASE -/* Allow to overwrite serial and ethaddr */ #define CONFIG_ENV_OVERWRITE -#define CONFIG_SYS_UART_PORT (1)#define CONFIG_BAUDRATE 115200/* NAND support */ --
I believe there is still bisectability issue here. At this stage, all these boards are still using legacy lpuart driver and we cannot remove those macros. This patch should come after patch#7 in the v3 series. Can you double check this?
For the patch itself,
PATCH v3 4/9 arm: vybrid: Drop enabling GPIO, SPI and UART in legacy mode
In reply to Bhuvanchandra DVQuoted 4 lines · Bhuvanchandra DV
Remove the legacy way of enabling GPIO, SPI and UART on Vybrid based boards since these driver's now only supports DT mode.
Signed-off-by Bhuvanchandra DV <[email protected]>
Quoted 78 lines
--- include/configs/colibri_vf.h | 13 ------------- include/configs/pcm052.h | 3 --- include/configs/vf610twr.h | 3 --- 3 files changed, 19 deletions(-)include/configs/colibri_vf.h +0
-13@@ -36,13 +36,10 @@#define CONFIG_BOARD_EARLY_INIT_F -#define LPUART_BASE UART0_BASE -/* Allow to overwrite serial and ethaddr */ #define CONFIG_ENV_OVERWRITE #define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG #define CONFIG_VERSION_VARIABLE -#define CONFIG_SYS_UART_PORT (0)#define CONFIG_BAUDRATE 115200#define CONFIG_CMD_ASKENV @@ -52,10 +49,6 @@#define CONFIG_SYS_MAX_NAND_DEVICE 1#define CONFIG_SYS_NAND_BASE NFC_BASE_ADDR -/* GPIO support */ -#define CONFIG_DM_GPIO -#define CONFIG_VYBRID_GPIO -/* Dynamic MTD partition support */ #define CONFIG_CMD_MTDPARTS /* Enable 'mtdparts' command line support */ #define CONFIG_MTD_PARTITIONS @@ -265,10 +258,4 @@#define CONFIG_USB_FUNCTION_MASS_STORAGE #define CONFIG_CMD_USB_MASS_STORAGE -/* Enable SPI support */ -#ifdef CONFIG_OF_CONTROL -#define CONFIG_DM_SPI -#define CONFIG_CMD_SPI -#endif -#endif /* __CONFIG_H */ include/configs/pcm052.h +0
-3@@ -27,11 +27,8 @@#define CONFIG_BOARD_EARLY_INIT_F -#define LPUART_BASE UART1_BASE -/* Allow to overwrite serial and ethaddr */ #define CONFIG_ENV_OVERWRITE -#define CONFIG_SYS_UART_PORT (1)#define CONFIG_BAUDRATE 115200#undef CONFIG_CMD_IMLSinclude/configs/vf610twr.h +0
-3@@ -34,11 +34,8 @@#define CONFIG_BOARD_EARLY_INIT_F -#define LPUART_BASE UART1_BASE -/* Allow to overwrite serial and ethaddr */ #define CONFIG_ENV_OVERWRITE -#define CONFIG_SYS_UART_PORT (1)#define CONFIG_BAUDRATE 115200/* NAND support */
PATCH v3 5/9 arm: vf610-twr: Add device tree file's
In reply to Bhuvanchandra DV- Add device tree files for NXP/Freescale VF610 Tower Board.
- Enable lpuart support on NXP/Freescale VF610 Tower Board.
- Use UART1 as stdout.
--- arch/arm/dts/Makefile | 3 ++- arch/arm/dts/vf610-twr.dts | 22 ++++++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 arch/arm/dts/vf610-twr.dts
arch/arm/dts/Makefile +2 -1
@@ -190,7 +190,8 @@ dtb-$(CONFIG_MACH_SUN9I) += \ sun9i-a80-cubieboard4.dtb dtb-$(CONFIG_VF610) += vf500-colibri.dtb \ - vf610-colibri.dtb + vf610-colibri.dtb \ + vf610-twr.dtb dtb-$(CONFIG_SOC_KEYSTONE) += k2hk-evm.dtb \ k2l-evm.dtb \
arch/arm/dts/vf610-twr.dts new file +22 -0
@@ -0,0 +1,22 @@ +/* + * Copyright 2016 Toradex AG + * + * SPDX-License-Identifier: GPL-2.0+ or X11 + */ + +/dts-v1/; +#include "vf.dtsi" + +/ { + model = "VF610 Tower Board"; + compatible = "fsl,vf610-twr", "fsl,vf610"; + + choosen { + stdout-path = &uart1; + }; + +}; + +&uart1 { + status = "okay"; +};
Signature · 1 line
2.7.0
PATCH v3 5/9 arm: vf610-twr: Add device tree file's
Quoted 11 lines · Bhuvanchandra DV
- Add device tree files for NXP/Freescale VF610 Tower Board.
- Enable lpuart support on NXP/Freescale VF610 Tower Board.
- Use UART1 as stdout.Signed-off-by Bhuvanchandra DV <[email protected]>--- arch/arm/dts/Makefile | 3 ++- arch/arm/dts/vf610-twr.dts | 22 ++++++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 arch/arm/dts/vf610-twr.dts
PATCH v3 6/9 arm: pcm052: Add device tree file's
In reply to Bhuvanchandra DV- Add device tree files for Phytec phyCORE-Vybrid Board.
- Enable lpuart support for Phytec phyCORE-Vybrid Board.
- Use UART1 for stdout.
--- arch/arm/dts/Makefile | 3 ++- arch/arm/dts/pcm052.dts | 22 ++++++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 arch/arm/dts/pcm052.dts
arch/arm/dts/Makefile +2 -1
@@ -191,7 +191,8 @@ dtb-$(CONFIG_MACH_SUN9I) += \ dtb-$(CONFIG_VF610) += vf500-colibri.dtb \ vf610-colibri.dtb \ - vf610-twr.dtb + vf610-twr.dtb \ + pcm052.dtb dtb-$(CONFIG_SOC_KEYSTONE) += k2hk-evm.dtb \ k2l-evm.dtb \
arch/arm/dts/pcm052.dts new file +22 -0
@@ -0,0 +1,22 @@ +/* + * Copyright 2016 Toradex AG + * + * SPDX-License-Identifier: GPL-2.0+ or X11 + */ + +/dts-v1/; +#include "vf.dtsi" + +/ { + model = "Phytec phyCORE-Vybrid"; + compatible = "phytec,pcm052", "fsl,vf610"; + + choosen { + stdout-path = &uart1; + }; + +}; + +&uart1 { + status = "okay"; +};
Signature · 1 line
2.7.0
PATCH v3 6/9 arm: pcm052: Add device tree file's
Quoted 11 lines · Bhuvanchandra DV
- Add device tree files for Phytec phyCORE-Vybrid Board.
- Enable lpuart support for Phytec phyCORE-Vybrid Board.
- Use UART1 for stdout.Signed-off-by Bhuvanchandra DV <[email protected]>--- arch/arm/dts/Makefile | 3 ++- arch/arm/dts/pcm052.dts | 22 ++++++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 arch/arm/dts/pcm052.dts
PATCH v3 7/9 arm: vybrid: Update defconfig's
In reply to Bhuvanchandra DVLet's go with pure DT solution for board's
based on NXP/Freescale Vybrid platform.
- Merge the DT defconfig with non-DT defconfig for Toradex Colibri VF50/VF61 and drop the non-DT defconfig.
- Update the legacy defconfigs for NXP/Freescale VF610 Tower Board with DT.
- Update the legacy defconfigs for Phytec phyCORE-vybrid Board with DT.
--- configs/colibri_vf_defconfig | 8 ++++++++ configs/colibri_vf_dtb_defconfig | 14 -------------- configs/pcm052_defconfig | 7 +++++++ configs/vf610twr_defconfig | 7 +++++++ configs/vf610twr_nand_defconfig | 7 +++++++ 5 files changed, 29 insertions(+), 14 deletions(-) delete mode 100644 configs/colibri_vf_dtb_defconfig
configs/colibri_vf_defconfig +8 -0
@@ -1,11 +1,19 @@ CONFIG_ARM=y CONFIG_TARGET_COLIBRI_VF=y +CONFIG_DM_SERIAL=y +CONFIG_DM_SPI=y +CONFIG_DM_GPIO=y +CONFIG_DEFAULT_DEVICE_TREE="vf610-colibri" CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/toradex/colibri_vf/imximage.cfg,ENV_IS_IN_NAND,IMX_NAND" CONFIG_SYS_PROMPT="Colibri VFxx # " # CONFIG_CMD_IMLS is not set +CONFIG_CMD_SPI=y CONFIG_CMD_GPIO=y # CONFIG_CMD_SETEXPR is not set +CONFIG_OF_CONTROL=y CONFIG_DM=y +CONFIG_VYBRID_GPIO=y CONFIG_NAND_VF610_NFC=y CONFIG_SYS_NAND_VF610_NFC_60_ECC_BYTES=y CONFIG_FSL_LPUART=y +CONFIG_FSL_DSPI=y
configs/colibri_vf_dtb_defconfig deleted +0 -14
@@ -1,14 +0,0 @@ -CONFIG_ARM=y -CONFIG_TARGET_COLIBRI_VF=y -CONFIG_DEFAULT_DEVICE_TREE="vf610-colibri" -CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/toradex/colibri_vf/imximage.cfg,ENV_IS_IN_NAND,IMX_NAND" -CONFIG_SYS_PROMPT="Colibri VFxx # " -# CONFIG_CMD_IMLS is not set -CONFIG_CMD_GPIO=y -# CONFIG_CMD_SETEXPR is not set -# CONFIG_CMD_NET is not set -CONFIG_OF_CONTROL=y -CONFIG_DM=y -CONFIG_NAND_VF610_NFC=y -CONFIG_SYS_NAND_VF610_NFC_60_ECC_BYTES=y -CONFIG_FSL_LPUART=y
configs/pcm052_defconfig +7 -0
@@ -1,6 +1,13 @@ CONFIG_ARM=y CONFIG_TARGET_PCM052=y +CONFIG_DM_SERIAL=y +CONFIG_DM_GPIO=y +CONFIG_DEFAULT_DEVICE_TREE="pcm052" CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/phytec/pcm052/imximage.cfg,ENV_IS_IN_NAND" +CONFIG_CMD_GPIO=y +CONFIG_OF_CONTROL=y +CONFIG_DM=y +CONFIG_VYBRID_GPIO=y CONFIG_NAND_VF610_NFC=y CONFIG_SYS_NAND_BUSWIDTH_16BIT=y CONFIG_FSL_LPUART=y
configs/vf610twr_defconfig +7 -0
@@ -1,8 +1,15 @@ CONFIG_ARM=y CONFIG_TARGET_VF610TWR=y +CONFIG_DM_SERIAL=y +CONFIG_DM_GPIO=y +CONFIG_DEFAULT_DEVICE_TREE="vf610-twr" CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/vf610twr/imximage.cfg,ENV_IS_IN_MMC" # CONFIG_CMD_IMLS is not set +CONFIG_CMD_GPIO=y # CONFIG_CMD_SETEXPR is not set +CONFIG_OF_CONTROL=y +CONFIG_DM=y +CONFIG_VYBRID_GPIO=y CONFIG_NAND_VF610_NFC=y CONFIG_SYS_NAND_BUSWIDTH_16BIT=y CONFIG_SPI_FLASH=y
configs/vf610twr_nand_defconfig +7 -0
@@ -1,8 +1,15 @@ CONFIG_ARM=y CONFIG_TARGET_VF610TWR=y +CONFIG_DM_SERIAL=y +CONFIG_DM_GPIO=y +CONFIG_DEFAULT_DEVICE_TREE="vf610-twr" CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/vf610twr/imximage.cfg,ENV_IS_IN_NAND" # CONFIG_CMD_IMLS is not set +CONFIG_CMD_GPIO=y # CONFIG_CMD_SETEXPR is not set +CONFIG_OF_CONTROL=y +CONFIG_DM=y +CONFIG_VYBRID_GPIO=y CONFIG_NAND_VF610_NFC=y CONFIG_SYS_NAND_BUSWIDTH_16BIT=y CONFIG_SPI_FLASH=y
Signature · 1 line
2.7.0
PATCH v3 7/9 arm: vybrid: Update defconfig's
Quoted 11 lines · Bhuvanchandra DV
Let's go with pure DT solution for board's
based on NXP/Freescale Vybrid platform.- Merge the DT defconfig with non-DT defconfig for Toradex Colibri VF50/VF61 and drop the non-DT defconfig.
- Update the legacy defconfigs for NXP/Freescale VF610 Tower Board with DT.
- Update the legacy defconfigs for Phytec phyCORE-vybrid Board with DT.Signed-off-by Bhuvanchandra DV <[email protected]>
Quoted 9 lines
--- configs/colibri_vf_defconfig | 8 ++++++++ configs/colibri_vf_dtb_defconfig | 14 -------------- configs/pcm052_defconfig | 7 +++++++ configs/vf610twr_defconfig | 7 +++++++ configs/vf610twr_nand_defconfig | 7 +++++++ 5 files changed, 29 insertions(+), 14 deletions(-) delete mode 100644 configs/colibri_vf_dtb_defconfig
PATCH v3 7/9 arm: vybrid: Update defconfig's
In reply to Bhuvanchandra DVQuoted 11 lines · Bhuvanchandra DV
Let's go with pure DT solution for board's
based on NXP/Freescale Vybrid platform.- Merge the DT defconfig with non-DT defconfig for Toradex Colibri VF50/VF61 and drop the non-DT defconfig.
- Update the legacy defconfigs for NXP/Freescale VF610 Tower Board with DT.
- Update the legacy defconfigs for Phytec phyCORE-vybrid Board with DT.Signed-off-by Bhuvanchandra DV <[email protected]>
Quoted 115 lines
--- configs/colibri_vf_defconfig | 8 ++++++++ configs/colibri_vf_dtb_defconfig | 14 -------------- configs/pcm052_defconfig | 7 +++++++ configs/vf610twr_defconfig | 7 +++++++ configs/vf610twr_nand_defconfig | 7 +++++++ 5 files changed, 29 insertions(+), 14 deletions(-) delete mode 100644 configs/colibri_vf_dtb_defconfigconfigs/colibri_vf_defconfig +4
-0@@ -1,11 +1,19 @@ CONFIG_ARM=y CONFIG_TARGET_COLIBRI_VF=y +CONFIG_DM_SERIAL=y +CONFIG_DM_SPI=y +CONFIG_DM_GPIO=y +CONFIG_DEFAULT_DEVICE_TREE="vf610-colibri"
CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/toradex/colibri_vf/imximage.cfg,ENV_IS_IN_NAND,IMX_NAND"
CONFIG_SYS_PROMPT="ColibriVFxx # "
#CONFIG_CMD_IMLSis not setconfigs/colibri_vf_defconfig +4
-0+CONFIG_CMD_SPI=y CONFIG_CMD_GPIO=y # CONFIG_CMD_SETEXPR is not set +CONFIG_OF_CONTROL=y CONFIG_DM=y +CONFIG_VYBRID_GPIO=y CONFIG_NAND_VF610_NFC=y CONFIG_SYS_NAND_VF610_NFC_60_ECC_BYTES=y CONFIG_FSL_LPUART=y +CONFIG_FSL_DSPI=yconfigs/colibri_vf_dtb_defconfig deleted +0
-14@@ -1,14 +0,0 @@ -CONFIG_ARM=y -CONFIG_TARGET_COLIBRI_VF=y -CONFIG_DEFAULT_DEVICE_TREE="vf610-colibri" -CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/toradex/colibri_vf/imximage.cfg,ENV_IS_IN_NAND,IMX_NAND" -CONFIG_SYS_PROMPT="Colibri VFxx # " -# CONFIG_CMD_IMLS is not set -CONFIG_CMD_GPIO=y -# CONFIG_CMD_SETEXPR is not set -# CONFIG_CMD_NET is not set -CONFIG_OF_CONTROL=y -CONFIG_DM=y -CONFIG_NAND_VF610_NFC=y -CONFIG_SYS_NAND_VF610_NFC_60_ECC_BYTES=y -CONFIG_FSL_LPUART=yconfigs/pcm052_defconfig +3
-0@@ -1,6 +1,13 @@ CONFIG_ARM=y CONFIG_TARGET_PCM052=y +CONFIG_DM_SERIAL=y +CONFIG_DM_GPIO=y +CONFIG_DEFAULT_DEVICE_TREE="pcm052"
CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/phytec/pcm052/imximage.cfg,ENV_IS_IN_NAND"configs/pcm052_defconfig +4
-0+CONFIG_CMD_GPIO=y +CONFIG_OF_CONTROL=y +CONFIG_DM=y +CONFIG_VYBRID_GPIO=y CONFIG_NAND_VF610_NFC=y CONFIG_SYS_NAND_BUSWIDTH_16BIT=y CONFIG_FSL_LPUART=yconfigs/vf610twr_defconfig +3
-0@@ -1,8 +1,15 @@ CONFIG_ARM=y CONFIG_TARGET_VF610TWR=y +CONFIG_DM_SERIAL=y +CONFIG_DM_GPIO=y +CONFIG_DEFAULT_DEVICE_TREE="vf610-twr"
CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/vf610twr/imximage.cfg,ENV_IS_IN_MMC"
#CONFIG_CMD_IMLSis not setconfigs/vf610twr_defconfig +4
-0+CONFIG_CMD_GPIO=y # CONFIG_CMD_SETEXPR is not set +CONFIG_OF_CONTROL=y +CONFIG_DM=y +CONFIG_VYBRID_GPIO=y CONFIG_NAND_VF610_NFC=y CONFIG_SYS_NAND_BUSWIDTH_16BIT=y CONFIG_SPI_FLASH=yconfigs/vf610twr_nand_defconfig +3
-0@@ -1,8 +1,15 @@ CONFIG_ARM=y CONFIG_TARGET_VF610TWR=y +CONFIG_DM_SERIAL=y +CONFIG_DM_GPIO=y +CONFIG_DEFAULT_DEVICE_TREE="vf610-twr"
CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/vf610twr/imximage.cfg,ENV_IS_IN_NAND"
#CONFIG_CMD_IMLSis not setconfigs/vf610twr_nand_defconfig +4
-0+CONFIG_CMD_GPIO=y # CONFIG_CMD_SETEXPR is not set +CONFIG_OF_CONTROL=y +CONFIG_DM=y +CONFIG_VYBRID_GPIO=y CONFIG_NAND_VF610_NFC=y CONFIG_SYS_NAND_BUSWIDTH_16BIT=y CONFIG_SPI_FLASH=y
PATCH v3 8/9 dm: lpuart: Drop the legacy code
In reply to Bhuvanchandra DVAll boards using this driver are with device tree support, hence drop the legacy code in driver to have a pure DT solution.
--- drivers/serial/serial_lpuart.c | 101 +---------------------------------------- 1 file changed, 2 insertions(+), 99 deletions(-)
drivers/serial/serial_lpuart.c +2 -99
@@ -48,8 +48,6 @@DECLARE_GLOBAL_DATA_PTR ; -struct lpuart_fsl *base = (struct lpuart_fsl *)LPUART_BASE ; -struct lpuart_serial_platdata {struct lpuart_fsl *reg; };
@@ -127,43 +125,6 @@ static int _lpuart_serial_init(struct lpuart_fsl *base)return 0 ; } -#ifndef CONFIG_DM_SERIAL -static void lpuart_serial_setbrg (void ) -{ -_lpuart_serial_setbrg (base, gd->baudrate); -} - -static int lpuart_serial_getc (void ) -{ -return _lpuart_serial_getc (base); -} - -static void lpuart_serial_putc (const char c) -{ -_lpuart_serial_putc (base, c); -} - -static int lpuart_serial_tstc (void ) -{ -return _lpuart_serial_tstc (base); -} - -static int lpuart_serial_init (void ) -{ -return _lpuart_serial_init (base); -} - -static struct serial_device lpuart_serial_drv = { - .name ="lpuart_serial" , - .start = lpuart_serial_init, - .stop =NULL , - .setbrg = lpuart_serial_setbrg, - .putc = lpuart_serial_putc, - .puts = default_serial_puts, - .getc = lpuart_serial_getc, - .tstc = lpuart_serial_tstc, -}; -#else /* CONFIG_DM_SERIAL */ static int lpuart_serial_setbrg (struct udevice *dev,int baudrate) {struct lpuart_serial_platdata *plat = dev->platdata;
@@ -210,8 +171,8 @@ static int lpuart_serial_probe(struct udevice *dev) return _lpuart_serial_init(reg); } -#endif /* CONFIG_DM_SERIAL */ #else +static void _lpuart32_serial_setbrg (struct lpuart_fsl *base,int baudrate) {u32 clk =CONFIG_SYS_CLK_FREQ ;
@@ -281,43 +242,6 @@ static int _lpuart32_serial_init(struct lpuart_fsl *base)return 0 ; } -#ifndef CONFIG_DM_SERIAL -static void lpuart32_serial_setbrg (void ) -{ -_lpuart32_serial_setbrg (base, gd->baudrate); -} - -static int lpuart32_serial_getc (void ) -{ -return _lpuart32_serial_getc (base); -} - -static void lpuart32_serial_putc (const char c) -{ -_lpuart32_serial_putc (base, c); -} - -static int lpuart32_serial_tstc (void ) -{ -return _lpuart32_serial_tstc (base); -} - -static int lpuart32_serial_init (void ) -{ -return _lpuart32_serial_init (base); -} - -static struct serial_device lpuart32_serial_drv = { - .name ="lpuart32_serial" , - .start = lpuart32_serial_init, - .stop =NULL , - .setbrg = lpuart32_serial_setbrg, - .putc = lpuart32_serial_putc, - .puts = default_serial_puts, - .getc = lpuart32_serial_getc, - .tstc = lpuart32_serial_tstc, -}; -#else /* CONFIG_DM_SERIAL */ static int lpuart32_serial_setbrg (struct udevice *dev,int baudrate) {struct lpuart_serial_platdata *plat = dev->platdata;
@@ -364,28 +288,8 @@ static int lpuart32_serial_probe(struct udevice *dev) return _lpuart32_serial_init(reg); } -#endif /* CONFIG_DM_SERIAL */ -#endif - -#ifndef CONFIG_DM_SERIAL -void lpuart_serial_initialize (void ) -{ -#ifdef CONFIG_LPUART_32B_REG -serial_register (&lpuart32_serial_drv); -#else -serial_register (&lpuart_serial_drv); -#endif -} +#endif /* CONFIG_LPUART_32B_REG */ -__weak struct serial_device *default_serial_console (void ) -{ -#ifdef CONFIG_LPUART_32B_REG -return &lpuart32_serial_drv; -#else -return &lpuart_serial_drv; -#endif -} -#else /* CONFIG_DM_SERIAL */ static int lpuart_serial_ofdata_to_platdata (struct udevice *dev) {struct lpuart_serial_platdata *plat = dev->platdata;
@@ -447,4 +351,3 @@ U_BOOT_DRIVER(serial_lpuart32) = { .flags = DM_FLAG_PRE_RELOC, };#endif /* CONFIG_LPUART_32B_REG */ -#endif /* CONFIG_DM_SERIAL */
Signature · 1 line
2.7.0
PATCH v3 9/9 dm: vybrid_gpio: Drop legacy code
In reply to Bhuvanchandra DVAll boards using this driver are with device tree support, hence drop the legacy code in driver to have a pure DT solution.
--- drivers/gpio/vybrid_gpio.c | 18 ------------------ 1 file changed, 18 deletions(-)
drivers/gpio/vybrid_gpio.c +0 -18
@@ -135,24 +135,6 @@ static int vybrid_gpio_bind(struct udevice *dev)return 0 ; } -#if !CONFIG_IS_ENABLED (OF_CONTROL ) -static const struct vybrid_gpio_platdata vybrid_gpio[] = { - {0 ,GPIO0_BASE_ADDR ,"GPIO0 " }, - {1 ,GPIO1_BASE_ADDR ,"GPIO1 " }, - {2 ,GPIO2_BASE_ADDR ,"GPIO2 " }, - {3 ,GPIO3_BASE_ADDR ,"GPIO3 " }, - {4 ,GPIO4_BASE_ADDR ,"GPIO4 " }, -}; - -U_BOOT_DEVICES (vybrid_gpio) = { - {"gpio_vybrid" , &vybrid_gpio[0 ] }, - {"gpio_vybrid" , &vybrid_gpio[1 ] }, - {"gpio_vybrid" , &vybrid_gpio[2 ] }, - {"gpio_vybrid" , &vybrid_gpio[3 ] }, - {"gpio_vybrid" , &vybrid_gpio[4 ] }, -}; -#endif -static const struct udevice_id vybrid_gpio_ids[] = { { .compatible ="fsl,vf610-gpio" }, { }
Signature · 1 line
2.7.0