serial: Introduce linflex uart support
Subsystems (3)
PATCH v3 1/2 serial: Introduce linflex uart support
From: Stoica Cosmin-Stefan <[email protected]>
The Linflex module is integrated on some NXP automotive SoCs part of the former Freescale portfolio, like S32V234, an SoC for Advanced Driver Assistance Systems.
--- drivers/serial/Makefile | 1 + drivers/serial/serial_linflexuart.c | 147 ++++++++++++++++++++++++++++++++++++ 2 files changed, 148 insertions(+) create mode 100644 drivers/serial/serial_linflexuart.c
drivers/serial/Makefile +1 -0
@@ -33,6 +33,7 @@ obj-$(CONFIG_SCIF_CONSOLE) += serial_sh.o obj-$(CONFIG_ZYNQ_SERIAL) += serial_zynq.o obj-$(CONFIG_BFIN_SERIAL) += serial_bfin.o obj-$(CONFIG_FSL_LPUART) += serial_lpuart.o +obj-$(CONFIG_FSL_LINFLEXUART) += serial_linflexuart.o obj-$(CONFIG_ARC_SERIAL) += serial_arc.o obj-$(CONFIG_UNIPHIER_SERIAL) += serial_uniphier.o obj-$(CONFIG_STM32_SERIAL) += serial_stm32.o
drivers/serial/serial_linflexuart.c new file +147 -0
147 lines not on this page · raw message
Signature · 1 line
2.1.4
PATCH v3 2/2 armv8: s32v234: Introduce basic support for s32v234evb
Add initial support for NXP's S32V234 SoC and S32V234EVB board.
The S32V230 family is designed to support computation-intensive applications for image processing. The S32V234, as part of the S32V230 family, is a high-performance automotive processor designed to support safe computation-intensive applications in the area of vision and sensor fusion.
Code originally writen by:
--- arch/arm/Kconfig | 5 + arch/arm/cpu/armv8/Makefile | 1 + arch/arm/cpu/armv8/s32v234/Makefile | 8 + arch/arm/cpu/armv8/s32v234/cpu.c | 97 ++++++ arch/arm/cpu/armv8/s32v234/cpu.h | 8 + arch/arm/cpu/armv8/s32v234/generic.c | 437 ++++++++++++++++++++++++ arch/arm/include/asm/arch-s32v234/clock.h | 34 ++ arch/arm/include/asm/arch-s32v234/ddr.h | 157 +++++++++ arch/arm/include/asm/arch-s32v234/imx-regs.h | 329 ++++++++++++++++++ arch/arm/include/asm/arch-s32v234/lpddr2.h | 75 ++++ arch/arm/include/asm/arch-s32v234/mc_cgm_regs.h | 267 +++++++++++++++ arch/arm/include/asm/arch-s32v234/mc_me_regs.h | 212 ++++++++++++ arch/arm/include/asm/arch-s32v234/mc_rgm_regs.h | 44 +++ arch/arm/include/asm/arch-s32v234/mmdc.h | 102 ++++++ arch/arm/include/asm/arch-s32v234/siul.h | 163 +++++++++ board/freescale/s32v234evb/Kconfig | 23 ++ board/freescale/s32v234evb/MAINTAINERS | 8 + board/freescale/s32v234evb/Makefile | 24 ++ board/freescale/s32v234evb/clock.c | 412 ++++++++++++++++++++++ board/freescale/s32v234evb/lpddr2.c | 150 ++++++++ board/freescale/s32v234evb/s32v234evb.c | 200 +++++++++++ board/freescale/s32v234evb/s32v234evb.cfg | 43 +++ configs/s32v234evb_defconfig | 3 + drivers/mmc/fsl_esdhc.c | 10 +- include/configs/s32v234evb.h | 301 ++++++++++++++++ 25 files changed, 3108 insertions(+), 5 deletions(-) create mode 100644 arch/arm/cpu/armv8/s32v234/Makefile create mode 100644 arch/arm/cpu/armv8/s32v234/cpu.c create mode 100644 arch/arm/cpu/armv8/s32v234/cpu.h create mode 100644 arch/arm/cpu/armv8/s32v234/generic.c create mode 100644 arch/arm/include/asm/arch-s32v234/clock.h create mode 100644 arch/arm/include/asm/arch-s32v234/ddr.h create mode 100644 arch/arm/include/asm/arch-s32v234/imx-regs.h create mode 100644 arch/arm/include/asm/arch-s32v234/lpddr2.h create mode 100644 arch/arm/include/asm/arch-s32v234/mc_cgm_regs.h create mode 100644 arch/arm/include/asm/arch-s32v234/mc_me_regs.h create mode 100644 arch/arm/include/asm/arch-s32v234/mc_rgm_regs.h create mode 100644 arch/arm/include/asm/arch-s32v234/mmdc.h create mode 100644 arch/arm/include/asm/arch-s32v234/siul.h create mode 100644 board/freescale/s32v234evb/Kconfig create mode 100644 board/freescale/s32v234evb/MAINTAINERS create mode 100644 board/freescale/s32v234evb/Makefile create mode 100644 board/freescale/s32v234evb/clock.c create mode 100644 board/freescale/s32v234evb/lpddr2.c create mode 100644 board/freescale/s32v234evb/s32v234evb.c create mode 100644 board/freescale/s32v234evb/s32v234evb.cfg create mode 100644 configs/s32v234evb_defconfig create mode 100644 include/configs/s32v234evb.h
arch/arm/Kconfig +5 -0
@@ -511,6 +511,10 @@ config RMOBILE bool "Renesas ARM SoCs" select CPU_V7 +config TARGET_S32V234EVB + bool "Support s32v234evb" + select ARM64 + config ARCH_SOCFPGA bool "Altera SOCFPGA family" select CPU_V7
@@ -829,6 +833,7 @@ source "board/freescale/mx53ard/Kconfig" source "board/freescale/mx53evk/Kconfig" source "board/freescale/mx53loco/Kconfig" source "board/freescale/mx53smd/Kconfig" +source "board/freescale/s32v234evb/Kconfig" source "board/freescale/vf610twr/Kconfig" source "board/gumstix/pepper/Kconfig" source "board/h2200/Kconfig"
arch/arm/cpu/armv8/Makefile +1 -0
@@ -17,5 +17,6 @@ obj-y += transition.o obj-y += fwcall.o obj-$(CONFIG_FSL_LAYERSCAPE) += fsl-layerscape/ +obj-$(CONFIG_S32V234) += s32v234/ obj-$(CONFIG_ARCH_ZYNQMP) += zynqmp/ obj-$(CONFIG_TARGET_HIKEY) += hisilicon/
arch/arm/cpu/armv8/s32v234/Makefile new file +8 -0
@@ -0,0 +1,8 @@ +# +# (C) Copyright 2013-2016, Freescale Semiconductor, Inc. +# +# SPDX-License-Identifier: GPL-2.0+ +# + +obj-y += generic.o +obj-y += cpu.o
arch/arm/cpu/armv8/s32v234/cpu.c new file +97 -0
97 lines not on this page · raw message
arch/arm/cpu/armv8/s32v234/cpu.h new file +8 -0
@@ -0,0 +1,8 @@ +/* +* (C) Copyright 2014-2016, Freescale Semiconductor, Inc. +* +* SPDX-License-Identifier: GPL-2.0+ +*/ + +u32 cpu_mask (void ); +int cpu_numcores (void );
arch/arm/cpu/armv8/s32v234/generic.c new file +437 -0
437 lines not on this page · raw message
arch/arm/include/asm/arch-s32v234/clock.h new file +34 -0
@@ -0,0 +1,34 @@ +/* +* (C) Copyright 2015-2016, Freescale Semiconductor, Inc. +* +* SPDX-License-Identifier: GPL-2.0+ +*/ + +#ifndef __ASM_ARCH_CLOCK_H +#define __ASM_ARCH_CLOCK_H + +#include <common.h> + +enum mxc_clock { +MXC_ARM_CLK =0 , +MXC_BUS_CLK , +MXC_PERIPHERALS_CLK , +MXC_UART_CLK , +MXC_USDHC_CLK , +MXC_FEC_CLK , +MXC_I2C_CLK , +}; +enum pll_type { +ARM_PLL =0 , +PERIPH_PLL , +ENET_PLL , +DDR_PLL , +VIDEO_PLL , +}; + +unsigned int mxc_get_clock (enum mxc_clock clk); +void clock_init (void ); + +#define imx_get_fecclk () mxc_get_clock(MXC_FEC_CLK) + +#endif /* __ASM_ARCH_CLOCK_H */
arch/arm/include/asm/arch-s32v234/ddr.h new file +157 -0
157 lines not on this page · raw message
arch/arm/include/asm/arch-s32v234/imx-regs.h new file +329 -0
329 lines not on this page · raw message
arch/arm/include/asm/arch-s32v234/lpddr2.h new file +75 -0
75 lines not on this page · raw message
arch/arm/include/asm/arch-s32v234/mc_cgm_regs.h new file +267 -0
267 lines not on this page · raw message
arch/arm/include/asm/arch-s32v234/mc_me_regs.h new file +212 -0
212 lines not on this page · raw message
arch/arm/include/asm/arch-s32v234/mc_rgm_regs.h new file +44 -0
44 lines not on this page · raw message
arch/arm/include/asm/arch-s32v234/mmdc.h new file +102 -0
102 lines not on this page · raw message
arch/arm/include/asm/arch-s32v234/siul.h new file +163 -0
163 lines not on this page · raw message
board/freescale/s32v234evb/Kconfig new file +23 -0
@@ -0,0 +1,23 @@ +if TARGET_S32V234EVB + +config SYS_CPU + string + default "armv8" + +config SYS_BOARD + string + default "s32v234evb" + +config SYS_VENDOR + string + default "freescale" + +config SYS_SOC + string + default "s32v234" + +config SYS_CONFIG_NAME + string + default "s32v234evb" + +endif
board/freescale/s32v234evb/MAINTAINERS new file +8 -0
@@ -0,0 +1,8 @@ +S32V234 Evaluation BOARD +M: Eddy Petri?or <[email protected]> +S: Maintained +F: arch/arm/cpu/armv8/s32v234/ +F: arch/arm/include/asm/arch-s32v234/ +F: board/freescale/s32v234evb/ +F: include/configs/s32v234evb.h +F: configs/s32v234evb_defconfig
board/freescale/s32v234evb/Makefile new file +24 -0
@@ -0,0 +1,24 @@ +# +# Copyright 2013-2015 Freescale Semiconductor, Inc. +# +# 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. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA +# + +obj-y := clock.o +obj-y += lpddr2.o +obj-y += s32v234evb.o + +#########################################################################
board/freescale/s32v234evb/clock.c new file +412 -0
412 lines not on this page · raw message
board/freescale/s32v234evb/lpddr2.c new file +150 -0
150 lines not on this page · raw message
board/freescale/s32v234evb/s32v234evb.c new file +200 -0
200 lines not on this page · raw message
board/freescale/s32v234evb/s32v234evb.cfg new file +43 -0
43 lines not on this page · raw message
configs/s32v234evb_defconfig new file +3 -0
@@ -0,0 +1,3 @@ +CONFIG_ARM=y +CONFIG_TARGET_S32V234EVB=y +CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/s32v234evb/s32v234evb.cfg"
drivers/mmc/fsl_esdhc.c +5 -5
@@ -182,7 +182,7 @@ static int esdhc_setup_data(struct mmc *mmc, struct mmc_data *data)int timeout;struct fsl_esdhc_cfg *cfg = mmc->priv;struct fsl_esdhc *regs = (struct fsl_esdhc *)cfg->esdhc_base; -#ifdef CONFIG_FSL_LAYERSCAPE +#if defined(CONFIG_FSL_LAYERSCAPE ) || defined(CONFIG_S32V234 )dma_addr_t addr;#endif uint wml_value;
@@ -195,7 +195,7 @@ static int esdhc_setup_data(struct mmc *mmc, struct mmc_data *data)esdhc_clrsetbits32 (®s->wml,WML_RD_WML_MASK , wml_value);#ifndef CONFIG_SYS_FSL_ESDHC_USE_PIO -#ifdef CONFIG_FSL_LAYERSCAPE +#if defined(CONFIG_FSL_LAYERSCAPE ) || defined(CONFIG_S32V234 ) addr =virt_to_phys ((void *)(data->dest));if (upper_32_bits (addr))printf ("Error found for upper 32 bits\n" );
@@ -221,7 +221,7 @@ static int esdhc_setup_data(struct mmc *mmc, struct mmc_data *data)esdhc_clrsetbits32 (®s->wml,WML_WR_WML_MASK , wml_value <<16 );#ifndef CONFIG_SYS_FSL_ESDHC_USE_PIO -#ifdef CONFIG_FSL_LAYERSCAPE +#if defined(CONFIG_FSL_LAYERSCAPE ) || defined(CONFIG_S32V234 ) addr =virt_to_phys ((void *)(data->src));if (upper_32_bits (addr))printf ("Error found for upper 32 bits\n" );
@@ -282,7 +282,7 @@ static int esdhc_setup_data(struct mmc *mmc, struct mmc_data *data)static void check_and_invalidate_dcache_range (struct mmc_cmd *cmd,struct mmc_data *data) { -#ifdef CONFIG_FSL_LAYERSCAPE +#if defined(CONFIG_FSL_LAYERSCAPE ) || defined(CONFIG_S32V234 )unsigned start =0 ;#else unsigned start = (unsigned )data->dest ;
@@ -290,7 +290,7 @@ static void check_and_invalidate_dcache_rangeunsigned size =roundup (ARCH_DMA_MINALIGN , data->blocks*data->blocksize);unsigned end = start+size ; -#ifdef CONFIG_FSL_LAYERSCAPE +#if defined(CONFIG_FSL_LAYERSCAPE ) || defined(CONFIG_S32V234 )dma_addr_t addr; addr =virt_to_phys ((void *)(data->dest));
include/configs/s32v234evb.h new file +301 -0
141 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.1.4
Part of the diff is not shown here. View the raw message.
PATCH 2/2 armv8: s32v234: Introduce basic support for s32v234evb
Quoted 7 lines · Eddy Petri?or
Add initial support for NXP's S32V234 SoC and S32V234EVB board.
The S32V230 family is designed to support computation-intensive applications for image processing. The S32V234, as part of the S32V230 family, is a high-performance automotive processor designed to support safe computation-intensive applications in the area of vision and sensor fusion.
Quoted 6 lines
Code originally writen by:
Original-signed-off-by Stoica Cosmin-Stefan <[email protected]>Original-signed-off-by Mihaela Martinas <[email protected]>Original-signed-off-by Eddy Petri?or <[email protected]>Signed-off-by Eddy Petri?or <[email protected]>
Interesting, thanks for the contribution. Some comments:
[snip]
arch/arm/cpu/armv8/s32v234/cpu.c line 31
Quoted 10 lines
arch/arm/cpu/armv8/s32v234/cpu.c new file +10
-0+#ifndef CONFIG_SYS_DCACHE_OFF + +#define CONFIG_SYS_FSL_IRAM_BASE 0x3e800000UL +#define CONFIG_SYS_FSL_IRAM_SIZE 0x800000UL +#define CONFIG_SYS_FSL_DRAM_BASE1 0x80000000UL +#define CONFIG_SYS_FSL_DRAM_SIZE1 0x40000000UL +#define CONFIG_SYS_FSL_DRAM_BASE2 0xC0000000UL +#define CONFIG_SYS_FSL_DRAM_SIZE2 0x20000000UL +#define CONFIG_SYS_FSL_PERIPH_BASE 0x40000000UL +#define CONFIG_SYS_FSL_PERIPH_SIZE 0x40000000UL
We shouldn't use CONFIG_SYS here as it's not a config option.
[snip]
Quoted 1 line
+++
b/arch/arm/cpu/armv8/s32v234/generic.c
[snip]
arch/arm/cpu/armv8/s32v234/generic.c line 28
Quoted 3 lines
arch/arm/cpu/armv8/s32v234/generic.c new file +3
-0+#ifdef CONFIG_FSL_ESDHC +DECLARE_GLOBAL_DATA_PTR ; +#endif
No need to guard this.
[snip]
arch/arm/cpu/armv8/s32v234/generic.c line 294
Quoted 5 lines
arch/arm/cpu/armv8/s32v234/generic.c new file +5
-0+/* Dump some core clocks */ +int do_s32v234_showclocks (cmd_tbl_t * cmdtp,int flag,int argc, +char *const argv[]) +{ +#if 0 /* Disable until the clock code will updated for S32V234 */
We should probably remove this then..
arch/arm/cpu/armv8/s32v234/generic.c line 343
Quoted 2 lines
arch/arm/cpu/armv8/s32v234/generic.c new file +2
-0+U_BOOT_CMD (clocks,CONFIG_SYS_MAXARGS ,1 , do_s32v234_showclocks, +"display clocks" ,"" );
And we're trying to not have commands in places other than cmd/
Quoted 11 lines
arch/arm/cpu/armv8/s32v234/generic.c new file +11
-0+#ifdef CONFIG_FEC_MXC +void imx_get_mac_from_fuse (int dev_id,unsigned char *mac) +{ +#if 0 /* b46902 */ +struct ocotp_regs *ocotp = (struct ocotp_regs *)OCOTP_BASE_ADDR ; +struct fuse_bank *bank = &ocotp->bank[4 ]; +struct fuse_bank4_regs *fuse = + (struct fuse_bank4_regs *)bank->fuse_regs; + +u32 value =readl (&fuse->mac_addr0); + mac[0 ] = (value >>8 );
arch/arm/cpu/armv8/s32v234/generic.c line 365
Quoted 10 lines
arch/arm/cpu/armv8/s32v234/generic.c new file +10
-0+ mac[1 ] = value; + + value =readl (&fuse->mac_addr1); + mac[2 ] = value >>24 ; + mac[3 ] = value >>16 ; + mac[4 ] = value >>8 ; + mac[5 ] = value; +#endif +} +#endif
If the FEC stuff doesn't work yet, lets just leave it out.
Quoted 4 lines
arch/arm/cpu/armv8/s32v234/generic.c new file +4
-0+void reset_cpu (ulong addr) +{ +#if 0 /* b46902 */ +struct src *src_regs = (struct src *)SRC_BASE_ADDR ;
arch/arm/cpu/armv8/s32v234/generic.c line 408
Quoted 10 lines
arch/arm/cpu/armv8/s32v234/generic.c new file +10
-0+ +/* Generate a SW reset from SRC SCR register */ +writel (SRC_SCR_SW_RST , &src_regs->scr); + +/* If we get there, we are not in good shape */ +mdelay (1000 ); +printf ("FATAL: Reset Failed!\n" ); +hang (); +#endif +};
Here and elsewhere, we should drop if 0'd code. Can we not really do a reset?
arch/arm/include/asm/arch-s32v234/mc_me_regs.h line 7
Quoted 13 lines
arch/arm/include/asm/arch-s32v234/mc_me_regs.h new file +7
-0@@ -0,0 +1,212 @@ +/* +* Copyright 2015 Freescale Semiconductor, Inc. +* +* 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.
Here and anywhere else that was missed, please use SPDX tags.
[snip]
board/freescale/s32v234evb/lpddr2.c
Quoted 5 lines
board/freescale/s32v234evb/lpddr2.c new file +0
-0
This file, and a few other things too possibly, feel more like SoC specific things rather than board specific things. Further, especially for the DDR parts, can we leverage arch/arm/cpu/armv7/mx6/ddr.c perhaps here? And move it into drivers/ddr/imx/ ?
Quoted 6 lines
board/freescale/s32v234evb/lpddr2.c new file +6
-0+static void setup_iomux_enet (void ) +{ +/* TODO: Implement enet iomux when it is activated. */ +} + +static void setup_iomux_i2c (void )
board/freescale/s32v234evb/lpddr2.c
Quoted 10 lines
board/freescale/s32v234evb/lpddr2.c new file +10
-0+{ +/* TODO: Implement i2c iomux when it is activated. */ +} + +#ifdef CONFIG_SYS_USE_NAND +void setup_iomux_nfc (void ) +{ +/*TODO: Implement nfc iomux when it is activated. */ +} +#endif
We should leave out these TODO bits for now.
drivers/mmc/fsl_esdhc.c static int esdhc_setup_data(struct mmc *mmc, struct mmc_data *data) · line 188
Quoted 13 lines
drivers/mmc/fsl_esdhc.c +1
-1@@ -182,7 +182,7 @@ static int esdhc_setup_data(struct mmc *mmc, struct mmc_data *data)int timeout;struct fsl_esdhc_cfg *cfg = mmc->priv;struct fsl_esdhc *regs = (struct fsl_esdhc *)cfg->esdhc_base; -#ifdef CONFIG_FSL_LAYERSCAPE +#if defined(CONFIG_FSL_LAYERSCAPE ) || defined(CONFIG_S32V234 )dma_addr_t addr;#endif uint wml_value;
Maybe we need to come up with a flag that says 64bit CPU and use that here? Thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160419/6ebbbed3/attachment.sig>
PATCH v3 2/2 armv8: s32v234: Introduce basic support for s32v234evb
Pe 19 apr. 2016 6:53 p.m., "Tom Rini" <[email protected]> a scris:
Quoted 6 lines · Eddy Petri?or
Quoted 4 lines
Add initial support for NXP's S32V234 SoC and S32V234EVB board.
The S32V230 family is designed to support computation-intensive
applications
Quoted 3 lines
Quoted 3 lines
for image processing. The S32V234, as part of the S32V230 family, is a high-performance automotive processor designed to support safe computation-intensive applications in the area of vision and sensor
fusion.
Quoted 3 lines
Quoted 3 lines
Code originally writen by:
Original-signed-off-by: Stoica Cosmin-Stefan <
Quoted 7 lines
Quoted 5 lines
Original-signed-off-by Mihaela Martinas <[email protected]Original-signed-off-by Eddy Petri?or <[email protected]>Signed-off-by Eddy Petri?or <[email protected]>Interesting, thanks for the contribution.
I am trying to make our vendor branch less divergent from mainline, so most of the todo-s and '#if 0'-s are due to squashing of existing old commits from our vendor repository, sorry for the unclean code due to this.
Quoted 15 lines
Some comments:
[snip]
arch/arm/cpu/armv8/s32v234/cpu.c line 31
Quoted 10 lines
arch/arm/cpu/armv8/s32v234/cpu.c new file +10
-0+#ifndef CONFIG_SYS_DCACHE_OFF + +#define CONFIG_SYS_FSL_IRAM_BASE 0x3e800000UL +#define CONFIG_SYS_FSL_IRAM_SIZE 0x800000UL +#define CONFIG_SYS_FSL_DRAM_BASE1 0x80000000UL +#define CONFIG_SYS_FSL_DRAM_SIZE1 0x40000000UL +#define CONFIG_SYS_FSL_DRAM_BASE2 0xC0000000UL +#define CONFIG_SYS_FSL_DRAM_SIZE2 0x20000000UL +#define CONFIG_SYS_FSL_PERIPH_BASE 0x40000000UL +#define CONFIG_SYS_FSL_PERIPH_SIZE 0x40000000ULWe shouldn't use
CONFIG_SYShere as it's not a config option.
What other way of defining these should we use? Should we simply put this kind of defines in a board or SoC specific header?
Quoted 9 lines
[snip]
Quoted 1 line
+++
b/arch/arm/cpu/armv8/s32v234/generic.c[snip]
arch/arm/cpu/armv8/s32v234/generic.c line 28
Quoted 3 lines
arch/arm/cpu/armv8/s32v234/generic.c new file +3
-0+#ifdef CONFIG_FSL_ESDHC +DECLARE_GLOBAL_DATA_PTR ; +#endif No need to guard this.
OK, will remove the guard, maybe it was a temporary workaround until the SD support was ready and I failed to pick the clean up, too.
Quoted 7 lines
[snip]
arch/arm/cpu/armv8/s32v234/generic.c
Quoted 5 lines
arch/arm/cpu/armv8/s32v234/generic.c new file +5
-0+/* Dump some core clocks */ +int do_s32v234_showclocks (cmd_tbl_t * cmdtp,int flag,int argc, +char *const argv[]) +{ +#if 0 /* Disable until the clock code
will updated for S32V234 */
Quoted 2 lines
We should probably remove this then..
Will do.
Quoted 4 lines
arch/arm/cpu/armv8/s32v234/generic.c line 343
Quoted 2 lines
arch/arm/cpu/armv8/s32v234/generic.c new file +2
-0+U_BOOT_CMD (clocks,CONFIG_SYS_MAXARGS ,1 , do_s32v234_showclocks, +"display clocks" ,"" );And we're trying to not have commands in places other than cmd/
OK, I'll look for a matching command it remove it for now. It was only for debug purposes added at this stage of the support.
Quoted 6 lines
Quoted 6 lines
arch/arm/cpu/armv8/s32v234/generic.c new file +5
-0+#ifdef CONFIG_FEC_MXC +void imx_get_mac_from_fuse (int dev_id,unsigned char *mac) +{ +#if 0 /* b46902 */ + struct ocotp_regs *ocotp = (struct
[...]
Quoted 6 lines
arch/arm/cpu/armv8/s32v234/generic.c line 365
Quoted 4 lines
arch/arm/cpu/armv8/s32v234/generic.c new file +4
-0+ mac[5 ] = value; +#endif +} +#endif If the FEC stuff doesn't work yet, lets just leave it out.
OK.
Quoted 10 lines
Quoted 10 lines
arch/arm/cpu/armv8/s32v234/generic.c new file +9
-0+void reset_cpu (ulong addr) +{ +#if 0 /* b46902 */ +struct src *src_regs = (struct src *)SRC_BASE_ADDR ; + +/* Generate a SW reset from SRC SCR register */ +writel (SRC_SCR_SW_RST , &src_regs->scr); + +/* If we get there, we are not in good shape */
Quoted 8 lines
arch/arm/cpu/armv8/s32v234/generic.c line 408
Quoted 5 lines
arch/arm/cpu/armv8/s32v234/generic.c new file +5
-0+mdelay (1000 ); +printf ("FATAL: Reset Failed!\n" ); +hang (); +#endif +};Here and elsewhere, we should drop if 0'd code. Can we not really do a reset?
The code was added at a later point, so for rebasing and synchronisation reasons I prefer to insert it in later patches, too.
I'll try to see if I can easily cherry pick the code, but I doubt it, since there was some major refactoring of the code in our vendor branch when support for other boards was added.
If I can't, I'll put a message there so it says the feature is not yet supported. Is that OK, or should I simply leave it empty?
Quoted 2 lines
Review
Quoted 2 lines
(quoted diff) +0
-0
b/arch/arm/include/asm/arch-s32v234/mc_me_regs.h
Quoted 6 lines
Quoted 6 lines
new file mode 100644
index 0000000..4313140arch/arm/include/asm/arch-s32v234/mc_me_regs.h new file +1
-0@@ -0,0 +1,212 @@ +/*
Quoted 8 lines
arch/arm/include/asm/arch-s32v234/mc_me_regs.h line 7
Quoted 6 lines
arch/arm/include/asm/arch-s32v234/mc_me_regs.h new file +6
-0+* Copyright 2015 Freescale Semiconductor, Inc. +* +* 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. Here and anywhere else that was missed, please use SPDX tags.
Sorry, I missed this, I'll make a script to detect all remaining non-SPDX copyright headers.
Quoted 3 lines
[snip]
Review
Quoted 1 line
(quoted diff) +0
-0
b/board/freescale/s32v234evb/lpddr2.c
Quoted 9 lines
board/freescale/s32v234evb/lpddr2.c
Quoted 4 lines
new file mode 100644
index 0000000..0bd5183board/freescale/s32v234evb/lpddr2.c new file +0
-0This file, and a few other things too possibly, feel more like SoC specific things rather than board specific things. Further, especially for the DDR parts, can we leverage
arch/arm/cpu/armv7/mx6/ddr.cperhaps here? And move it intodrivers/ddr/imx/?
Actually, depending on the board we might use ddr2 or ddr3.
I don't know how I should refer the armv7 files from this armv8 config. Are there any examples in the code where I could see am example?
Also I'll have to check if i.mx6 code matches what we have on s32v234.
Quoted 10 lines
Quoted 10 lines
board/freescale/s32v234evb/lpddr2.c new file +10
-0+static void setup_iomux_enet (void ) +{ +/* TODO: Implement enet iomux when it is activated. */ +} + +static void setup_iomux_i2c (void ) +{ +/* TODO: Implement i2c iomux when it is activated. */ +} +
Quoted 8 lines
board/freescale/s32v234evb/lpddr2.c
Quoted 6 lines
board/freescale/s32v234evb/lpddr2.c new file +6
-0+#ifdef CONFIG_SYS_USE_NAND +void setup_iomux_nfc (void ) +{ +/*TODO: Implement nfc iomux when it is activated. */ +} +#endif We should leave out these TODO bits for now.
Will remove them.
Quoted 5 lines
drivers/mmc/fsl_esdhc.c static int esdhc_setup_data(struct mmc *mmc, struct
Quoted 5 lines
drivers/mmc/fsl_esdhc.c +0
-0@@ -182,7 +182,7 @@ static int esdhc_setup_data(struct mmc *mmc, struct
mmc_data *data)
Quoted 11 lines
drivers/mmc/fsl_esdhc.c static int esdhc_setup_data(struct mmc *mmc, struct mmc_data *data) · line 188
Quoted 8 lines
drivers/mmc/fsl_esdhc.c +1
-1int timeout;struct fsl_esdhc_cfg *cfg = mmc->priv;struct fsl_esdhc *regs = (struct fsl_esdhc *)cfg->esdhc_base; -#ifdef CONFIG_FSL_LAYERSCAPE +#if defined(CONFIG_FSL_LAYERSCAPE ) || defined(CONFIG_S32V234 )dma_addr_t addr;#endif uint wml_value;Maybe we need to come up with a flag that says 64bit CPU and use that here? Thanks!
I am thinking we need to represent (also) the fact we have 64 bit core, but 32 bit peripherals.
Quoted 2 lines
--
Tom
Eddy
PATCH 2/2 armv8: s32v234: Introduce basic support for s32v234evb
Quoted 20 lines · Eddy Petri?or
Pe 19 apr. 2016 6:53 p.m., "Tom Rini" <[email protected]> a scris:
Quoted 6 lines · Eddy Petri?or
Quoted 4 lines
Add initial support for NXP's S32V234 SoC and S32V234EVB board.
The S32V230 family is designed to support computation-intensive
applications
Quoted 3 lines
Quoted 3 lines
for image processing. The S32V234, as part of the S32V230 family, is a high-performance automotive processor designed to support safe computation-intensive applications in the area of vision and sensor
fusion.
Quoted 3 lines
Quoted 3 lines
Code originally writen by:
Original-signed-off-by: Stoica Cosmin-Stefan <cosminstefan.stoica at freescale.com>
Quoted 4 lines
Quoted 4 lines
Original-signed-off-by Mihaela Martinas <[email protected]Original-signed-off-by Eddy Petri?or <[email protected]>
Quoted 7 lines
Quoted 3 lines
Quoted 1 line
Signed-off-by Eddy Petri?or <[email protected]>Interesting, thanks for the contribution.
I am trying to make our vendor branch less divergent from mainline, so most of the todo-s and '#if 0'-s are due to squashing of existing old commits from our vendor repository, sorry for the unclean code due to this.
Good to know, thanks.
Quoted 16 lines
Quoted 15 lines
Some comments:
[snip]
arch/arm/cpu/armv8/s32v234/cpu.c line 31
Quoted 10 lines
arch/arm/cpu/armv8/s32v234/cpu.c new file +10
-0+#ifndef CONFIG_SYS_DCACHE_OFF + +#define CONFIG_SYS_FSL_IRAM_BASE 0x3e800000UL +#define CONFIG_SYS_FSL_IRAM_SIZE 0x800000UL +#define CONFIG_SYS_FSL_DRAM_BASE1 0x80000000UL +#define CONFIG_SYS_FSL_DRAM_SIZE1 0x40000000UL +#define CONFIG_SYS_FSL_DRAM_BASE2 0xC0000000UL +#define CONFIG_SYS_FSL_DRAM_SIZE2 0x20000000UL +#define CONFIG_SYS_FSL_PERIPH_BASE 0x40000000UL +#define CONFIG_SYS_FSL_PERIPH_SIZE 0x40000000ULWe shouldn't use
CONFIG_SYShere as it's not a config option.
Quoted 2 lines
What other way of defining these should we use? Should we simply put this kind of defines in a board or SoC specific header?
Yes. some SoC header (since this is unlikely to be board specific).
[snip]
Quoted 7 lines
Quoted 4 lines
arch/arm/cpu/armv8/s32v234/generic.c line 343
Quoted 2 lines
arch/arm/cpu/armv8/s32v234/generic.c new file +2
-0+U_BOOT_CMD (clocks,CONFIG_SYS_MAXARGS ,1 , do_s32v234_showclocks, +"display clocks" ,"" );And we're trying to not have commands in places other than cmd/
OK, I'll look for a matching command it remove it for now. It was only for debug purposes added at this stage of the support.
It's also possible to just drop debug things like that :)
[snip]
Quoted 21 lines
Quoted 9 lines
Quoted 9 lines
arch/arm/cpu/armv8/s32v234/generic.c new file +9
-0+void reset_cpu (ulong addr) +{ +#if 0 /* b46902 */ +struct src *src_regs = (struct src *)SRC_BASE_ADDR ; + +/* Generate a SW reset from SRC SCR register */ +writel (SRC_SCR_SW_RST , &src_regs->scr); + +/* If we get there, we are not in good shape */ Quoted 8 lines
arch/arm/cpu/armv8/s32v234/generic.c line 408
Quoted 5 lines
arch/arm/cpu/armv8/s32v234/generic.c new file +5
-0+mdelay (1000 ); +printf ("FATAL: Reset Failed!\n" ); +hang (); +#endif +};Here and elsewhere, we should drop if 0'd code. Can we not really do a reset?
The code was added at a later point, so for rebasing and synchronisation reasons I prefer to insert it in later patches, too.
Quoted 6 lines
I'll try to see if I can easily cherry pick the code, but I doubt it, since there was some major refactoring of the code in our vendor branch when support for other boards was added.
If I can't, I'll put a message there so it says the feature is not yet supported. Is that OK, or should I simply leave it empty?
I'm OK with a message as a last resort.
[snip]
Quoted 13 lines
Quoted 2 lines
[snip]
Review
Quoted 1 line
(quoted diff) +0
-0
b/board/freescale/s32v234evb/lpddr2.cQuoted 9 lines
board/freescale/s32v234evb/lpddr2.c
Quoted 4 lines
new file mode 100644
index 0000000..0bd5183board/freescale/s32v234evb/lpddr2.c new file +0
-0This file, and a few other things too possibly, feel more like SoC specific things rather than board specific things. Further, especially for the DDR parts, can we leverage
arch/arm/cpu/armv7/mx6/ddr.cperhaps here? And move it intodrivers/ddr/imx/?
Quoted 6 lines
Actually, depending on the board we might use ddr2 or ddr3.
I don't know how I should refer the armv7 files from this armv8 config. Are there any examples in the code where I could see am example?
Also I'll have to check if i.mx6 code matches what we have on s32v234.
So, if we can (and I suspect we can), we would move the armv7 code out of arch/arm/cpu/armv7/ and into drivers/dd/imx/ and that would make access easy for both :) It will require some research on your end but I strongly suspect the IP block was updated and re-used so there should be a great deal of overlap.
[snip]
Quoted 18 lines
Quoted 5 lines
drivers/mmc/fsl_esdhc.c static int esdhc_setup_data(struct mmc *mmc, struct
Quoted 5 lines
drivers/mmc/fsl_esdhc.c +0
-0@@ -182,7 +182,7 @@ static int esdhc_setup_data(struct mmc *mmc, struct
mmc_data*data)Quoted 11 lines
drivers/mmc/fsl_esdhc.c static int esdhc_setup_data(struct mmc *mmc, struct mmc_data *data) · line 188
Quoted 8 lines
drivers/mmc/fsl_esdhc.c +1
-1int timeout;struct fsl_esdhc_cfg *cfg = mmc->priv;struct fsl_esdhc *regs = (struct fsl_esdhc *)cfg->esdhc_base; -#ifdef CONFIG_FSL_LAYERSCAPE +#if defined(CONFIG_FSL_LAYERSCAPE ) || defined(CONFIG_S32V234 )dma_addr_t addr;#endif uint wml_value;Maybe we need to come up with a flag that says 64bit CPU and use that here? Thanks!
Quoted 2 lines
I am thinking we need to represent (also) the fact we have 64 bit core, but 32 bit peripherals.
Right, that's what I was trying to convey.
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160421/3ab6c387/attachment.sig>
PATCH 1/2 serial: Introduce linflex uart support
In reply to Eddy PetrișorQuoted 97 lines · Eddy Petri?or
From: Stoica Cosmin-Stefan <[email protected]>
The Linflex module is integrated on some NXP automotive SoCs part of the former Freescale portfolio, like S32V234, an SoC for Advanced Driver Assistance Systems.
Signed-off-by Stoica Cosmin-Stefan <[email protected]>Signed-off-by Chircu Bogdan <[email protected]>Signed-off-by Depons Eric <[email protected]>Signed-off-by Eddy Petri?or <[email protected]>--- drivers/serial/Makefile | 1 + drivers/serial/serial_linflexuart.c | 147 ++++++++++++++++++++++++++++++++++++ 2 files changed, 148 insertions(+) create mode 100644 drivers/serial/serial_linflexuart.cdrivers/serial/Makefile +1
-0@@ -33,6 +33,7 @@ obj-$(CONFIG_SCIF_CONSOLE) += serial_sh.o obj-$(CONFIG_ZYNQ_SERIAL) += serial_zynq.o obj-$(CONFIG_BFIN_SERIAL) += serial_bfin.o obj-$(CONFIG_FSL_LPUART) += serial_lpuart.o +obj-$(CONFIG_FSL_LINFLEXUART) += serial_linflexuart.o obj-$(CONFIG_ARC_SERIAL) += serial_arc.o obj-$(CONFIG_UNIPHIER_SERIAL) += serial_uniphier.o obj-$(CONFIG_STM32_SERIAL) += serial_stm32.odrivers/serial/serial_linflexuart.c new file +63
-0@@ -0,0 +1,147 @@ +/* +* (C) Copyright 2013-2016 Freescale Semiconductor, Inc. +* +* SPDX-License-Identifier: GPL-2.0+ +*/ + +#include <common.h> +#include <watchdog.h> +#include <asm/io.h> +#include <serial.h> +#include <linux/compiler.h> +#include <asm/arch/imx-regs.h> +#include <asm/arch/clock.h> + +#define US1_TDRE (1 << 7) +#define US1_RDRF (1 << 5) +#define UC2_TE (1 << 3) +#define LINCR1_INIT (1 << 0) +#define LINCR1_MME (1 << 4) +#define LINCR1_BF (1 << 7) +#define LINSR_LINS_INITMODE (0x00001000) +#define LINSR_LINS_MASK (0x0000F000) +#define UARTCR_UART (1 << 0) +#define UARTCR_WL0 (1 << 1) +#define UARTCR_PCE (1 << 2) +#define UARTCR_PC0 (1 << 3) +#define UARTCR_TXEN (1 << 4) +#define UARTCR_RXEN (1 << 5) +#define UARTCR_PC1 (1 << 6) +#define UARTSR_DTF (1 << 1) +#define UARTSR_DRF (1 << 2) +#define UARTSR_RMB (1 << 9) + +DECLARE_GLOBAL_DATA_PTR ; + +struct linflex_fsl *base = (struct linflex_fsl *)LINFLEXUART_BASE ; + +static void linflex_serial_setbrg (void ) +{ +u32 clk =mxc_get_clock (MXC_UART_CLK ); +u32 ibr, fbr; + +if (!gd->baudrate) + gd->baudrate =CONFIG_BAUDRATE ; + + ibr = (u32) (clk / (16 * gd->baudrate)); + fbr = (u32) (clk % (16 * gd->baudrate)) *16 ; + +__raw_writel (ibr, &base->linibrr); +__raw_writel (fbr, &base->linfbrr); +} + +static int linflex_serial_getc (void ) +{ +char c; + +/* waiting for data reception complete - TODO: add a timeout */ +while ((__raw_readb (&base->uartsr) &UARTSR_DRF ) !=UARTSR_DRF ); + +/* waiting for data buffer to be ready - TODO: add a timeout */ + +while ((__raw_readl (&base->uartsr) &UARTSR_RMB ) !=UARTSR_RMB ); +
drivers/serial/serial_linflexuart.c line 73
Quoted 10 lines
drivers/serial/serial_linflexuart.c new file +10
-0+ c =__raw_readl (&base->bdrm); +__raw_writeb ((__raw_readb (&base->uartsr) | (UARTSR_DRF |UARTSR_RMB )), + &base->uartsr); +return c; +} + +static void linflex_serial_putc (const char c) +{ +if (c =='\n' ) +serial_putc ('\r' );
Please remove this \n \r handling.
Quoted 65 lines
drivers/serial/serial_linflexuart.c new file +65
-0+ +__raw_writeb (c, &base->bdrl); + +/* waiting for data transmission completed - TODO: add a timeout */ +while ((__raw_readb (&base->uartsr) &UARTSR_DTF ) !=UARTSR_DTF ); + +__raw_writeb ((__raw_readb (&base->uartsr) |UARTSR_DTF ), &base->uartsr); +} + +/* +* Test whether a character is in the RX buffer +*/ +static int linflex_serial_tstc (void ) +{ +return 0 ; +} + +/* +* Initialise the serial port with the given baudrate. The settings +* are always 8 data bits, no parity, 1 stop bit, no start bits. +*/ +static int linflex_serial_init (void ) +{ +volatile u32 ctrl; + +/* set the Linflex in master mode amd activate by-pass filter */ + ctrl =LINCR1_BF |LINCR1_MME ; +__raw_writel (ctrl, &base->lincr1); + +/* init mode */ + ctrl |=LINCR1_INIT ; +__raw_writel (ctrl, &base->lincr1); + +/* waiting for init mode entry - TODO: add a timeout */ +while ((__raw_readl (&base->linsr) &LINSR_LINS_MASK ) != +LINSR_LINS_INITMODE ); + +/* set UART bit to allow writing other bits */ +__raw_writel (UARTCR_UART , &base->uartcr); + +/* provide data bits, parity, stop bit, etc */ +serial_setbrg (); + +/* 8 bit data, no parity, Tx and Rx enabled, UART mode */ +__raw_writel (UARTCR_PC1 |UARTCR_RXEN |UARTCR_TXEN |UARTCR_PC0 + |UARTCR_WL0 |UARTCR_UART , &base->uartcr); + + ctrl =__raw_readl (&base->lincr1); + ctrl &= ~LINCR1_INIT ; +__raw_writel (ctrl, &base->lincr1);/* end init mode */ + +return 0 ; +} + +static struct serial_device linflex_serial_drv = { + .name ="linflex_serial" , + .start = linflex_serial_init, + .stop =NULL , + .setbrg = linflex_serial_setbrg, + .putc = linflex_serial_putc, + .puts = default_serial_puts, + .getc = linflex_serial_getc, + .tstc = linflex_serial_tstc, +}; +
drivers/serial/serial_linflexuart.c
Quoted 10 lines
drivers/serial/serial_linflexuart.c new file +9
-1+void linflex_serial_initialize (void ) +{ +serial_register (&linflex_serial_drv); +} + +__weak struct serial_device *default_serial_console (void ) +{ +return &linflex_serial_drv; +} --
You should really start creating DM serial driver. Non-DM serial driver is not going to be accepted.
Regards,
Bin
PATCH v3 1/2 serial: Introduce linflex uart support
(- Eric, he left the company a little after he contributed to the linflex driver, so he's email is no longer valid)
Pe 4 apr. 2016 6:22 a.m., "Bin Meng" <[email protected]> a scris:
Quoted 2 lines
On Sun, Apr 3, 2016 at 8:10 AM, Eddy Petri?or <[email protected]>
Quoted 3 lines · wrote:
Quoted 3 lines
From: Stoica Cosmin-Stefan <[email protected]>
The Linflex module is integrated on some NXP automotive SoCs part of
the former
Quoted 1 line
Quoted 1 line
Freescale portfolio, like S32V234, an
[..]
Quoted 6 lines
drivers/serial/serial_linflexuart.c line 73
Quoted 4 lines
drivers/serial/serial_linflexuart.c new file +4
-0+static void linflex_serial_putc (const char c) +{ +if (c =='\n' ) +serial_putc ('\r' );Please remove this \n \r handling.
I will and retest, but without it we saw in the past the console not behaving correctly.
[..]
Quoted 4 lines
Quoted 1 line
--
You should really start creating DM serial driver. Non-DM serial driver is not going to be accepted.
I see. Does that imply also SPL support? Our current vendor branch has no SPL support and we had no real need for it. On the other hand it is entirely possible I am misunderstanding what/if the SPL would benefit us.
Eddy
PATCH 1/2 serial: Introduce linflex uart support
Quoted 21 lines · Eddy Petri?or
(- Eric, he left the company a little after he contributed to the linflex driver, so he's email is no longer valid)
Pe 4 apr. 2016 6:22 a.m., "Bin Meng" <[email protected]> a scris:
Quoted 8 lines
Quoted 5 lines · Eddy Petri?or
From: Stoica Cosmin-Stefan <[email protected]>
The Linflex module is integrated on some NXP automotive SoCs part of the former
Freescale portfolio, like S32V234, an[..]
Quoted 6 lines
drivers/serial/serial_linflexuart.c line 73
Quoted 4 lines
drivers/serial/serial_linflexuart.c new file +4
-0+static void linflex_serial_putc (const char c) +{ +if (c =='\n' ) +serial_putc ('\r' );Please remove this \n \r handling.
Quoted 3 lines
I will and retest, but without it we saw in the past the console not behaving correctly.
With driver model, this is no longer needed. For legacy drivers, yes, it's needed.
Quoted 11 lines
[..]
Quoted 4 lines
Quoted 1 line
--
You should really start creating DM serial driver. Non-DM serial driver is not going to be accepted.
I see. Does that imply also SPL support? Our current vendor branch has no SPL support and we had no real need for it. On the other hand it is entirely possible I am misunderstanding what/if the SPL would benefit us.
No need to do SPL support if your board does not need SPL.
Regards,
Bin
cover Initial support for S32V234 - version 2
In reply to Eddy PetrișorHere is the second version of the proposed inital support for S32V234. Please excuse the delay, I was kept busy by some unplanned events.
Tom:
I did not spllit the MMU definitions into a separate file since they are not used anywhere else yet.
Eddy Petri?or (1):
armv8: s32v234: Introduce basic support for s32v234evb
Stoica Cosmin-Stefan (1):
serial: Introduce linflex uart support
arch/arm/Kconfig | 5 + arch/arm/cpu/armv8/Makefile | 1 + arch/arm/cpu/armv8/s32v234/Makefile | 8 + arch/arm/cpu/armv8/s32v234/cpu.c | 97 +++++++ arch/arm/cpu/armv8/s32v234/cpu.h | 8 + arch/arm/cpu/armv8/s32v234/generic.c | 350 ++++++++++++++++++++++++ arch/arm/include/asm/arch-s32v234/clock.h | 34 +++ arch/arm/include/asm/arch-s32v234/ddr.h | 157 +++++++++++ arch/arm/include/asm/arch-s32v234/imx-regs.h | 329 ++++++++++++++++++++++ arch/arm/include/asm/arch-s32v234/lpddr2.h | 75 +++++ arch/arm/include/asm/arch-s32v234/mc_cgm_regs.h | 254 +++++++++++++++++ arch/arm/include/asm/arch-s32v234/mc_me_regs.h | 199 ++++++++++++++ arch/arm/include/asm/arch-s32v234/mc_rgm_regs.h | 31 +++ arch/arm/include/asm/arch-s32v234/mmdc.h | 89 ++++++ arch/arm/include/asm/arch-s32v234/siul.h | 150 ++++++++++ board/freescale/s32v234evb/Kconfig | 23 ++ board/freescale/s32v234evb/MAINTAINERS | 8 + board/freescale/s32v234evb/Makefile | 11 + board/freescale/s32v234evb/clock.c | 344 +++++++++++++++++++++++ board/freescale/s32v234evb/lpddr2.c | 137 ++++++++++ board/freescale/s32v234evb/s32v234evb.c | 183 +++++++++++++ board/freescale/s32v234evb/s32v234evb.cfg | 29 ++ configs/s32v234evb_defconfig | 6 + drivers/mmc/fsl_esdhc.c | 10 +- drivers/serial/Makefile | 1 + drivers/serial/serial_linflexuart.c | 274 +++++++++++++++++++ include/configs/s32v234evb.h | 305 +++++++++++++++++++++ 27 files changed, 3113 insertions(+), 5 deletions(-) create mode 100644 arch/arm/cpu/armv8/s32v234/Makefile create mode 100644 arch/arm/cpu/armv8/s32v234/cpu.c create mode 100644 arch/arm/cpu/armv8/s32v234/cpu.h create mode 100644 arch/arm/cpu/armv8/s32v234/generic.c create mode 100644 arch/arm/include/asm/arch-s32v234/clock.h create mode 100644 arch/arm/include/asm/arch-s32v234/ddr.h create mode 100644 arch/arm/include/asm/arch-s32v234/imx-regs.h create mode 100644 arch/arm/include/asm/arch-s32v234/lpddr2.h create mode 100644 arch/arm/include/asm/arch-s32v234/mc_cgm_regs.h create mode 100644 arch/arm/include/asm/arch-s32v234/mc_me_regs.h create mode 100644 arch/arm/include/asm/arch-s32v234/mc_rgm_regs.h create mode 100644 arch/arm/include/asm/arch-s32v234/mmdc.h create mode 100644 arch/arm/include/asm/arch-s32v234/siul.h create mode 100644 board/freescale/s32v234evb/Kconfig create mode 100644 board/freescale/s32v234evb/MAINTAINERS create mode 100644 board/freescale/s32v234evb/Makefile create mode 100644 board/freescale/s32v234evb/clock.c create mode 100644 board/freescale/s32v234evb/lpddr2.c create mode 100644 board/freescale/s32v234evb/s32v234evb.c create mode 100644 board/freescale/s32v234evb/s32v234evb.cfg create mode 100644 configs/s32v234evb_defconfig create mode 100644 drivers/serial/serial_linflexuart.c create mode 100644 include/configs/s32v234evb.h
Signature · 1 line
2.1.4
PATCH 1/2 serial: Introduce linflex uart support
In reply to Eddy PetrișorFrom: Stoica Cosmin-Stefan <[email protected]>
The Linflex module is integrated on some NXP automotive SoCs part of the former Freescale portfolio, like S32V234, an SoC for Advanced Driver Assistance Systems.
--- drivers/serial/Makefile | 1 + drivers/serial/serial_linflexuart.c | 274 ++++++++++++++++++++++++++++++++++++ 2 files changed, 275 insertions(+) create mode 100644 drivers/serial/serial_linflexuart.c
drivers/serial/Makefile +1 -0
@@ -33,6 +33,7 @@ obj-$(CONFIG_SCIF_CONSOLE) += serial_sh.o obj-$(CONFIG_ZYNQ_SERIAL) += serial_zynq.o obj-$(CONFIG_BFIN_SERIAL) += serial_bfin.o obj-$(CONFIG_FSL_LPUART) += serial_lpuart.o +obj-$(CONFIG_FSL_LINFLEXUART) += serial_linflexuart.o obj-$(CONFIG_ARC_SERIAL) += serial_arc.o obj-$(CONFIG_UNIPHIER_SERIAL) += serial_uniphier.o obj-$(CONFIG_STM32_SERIAL) += serial_stm32.o
drivers/serial/serial_linflexuart.c new file +274 -0
274 lines not on this page · raw message
Signature · 1 line
2.1.4
PATCH 2/2 armv8: s32v234: Introduce basic support for s32v234evb
In reply to Eddy PetrișorFrom: Eddy Petri?or <[email protected]>
Add initial support for NXP's S32V234 SoC and S32V234EVB board.
The S32V230 family is designed to support computation-intensive applications for image processing. The S32V234, as part of the S32V230 family, is a high-performance automotive processor designed to support safe computation-intensive applications in the area of vision and sensor fusion.
Code originally writen by:
--- arch/arm/Kconfig | 5 + arch/arm/cpu/armv8/Makefile | 1 + arch/arm/cpu/armv8/s32v234/Makefile | 8 + arch/arm/cpu/armv8/s32v234/cpu.c | 97 +++++++ arch/arm/cpu/armv8/s32v234/cpu.h | 8 + arch/arm/cpu/armv8/s32v234/generic.c | 350 ++++++++++++++++++++++++ arch/arm/include/asm/arch-s32v234/clock.h | 34 +++ arch/arm/include/asm/arch-s32v234/ddr.h | 157 +++++++++++ arch/arm/include/asm/arch-s32v234/imx-regs.h | 329 ++++++++++++++++++++++ arch/arm/include/asm/arch-s32v234/lpddr2.h | 75 +++++ arch/arm/include/asm/arch-s32v234/mc_cgm_regs.h | 254 +++++++++++++++++ arch/arm/include/asm/arch-s32v234/mc_me_regs.h | 199 ++++++++++++++ arch/arm/include/asm/arch-s32v234/mc_rgm_regs.h | 31 +++ arch/arm/include/asm/arch-s32v234/mmdc.h | 89 ++++++ arch/arm/include/asm/arch-s32v234/siul.h | 150 ++++++++++ board/freescale/s32v234evb/Kconfig | 23 ++ board/freescale/s32v234evb/MAINTAINERS | 8 + board/freescale/s32v234evb/Makefile | 11 + board/freescale/s32v234evb/clock.c | 344 +++++++++++++++++++++++ board/freescale/s32v234evb/lpddr2.c | 137 ++++++++++ board/freescale/s32v234evb/s32v234evb.c | 183 +++++++++++++ board/freescale/s32v234evb/s32v234evb.cfg | 29 ++ configs/s32v234evb_defconfig | 6 + drivers/mmc/fsl_esdhc.c | 10 +- include/configs/s32v234evb.h | 305 +++++++++++++++++++++ 25 files changed, 2838 insertions(+), 5 deletions(-) create mode 100644 arch/arm/cpu/armv8/s32v234/Makefile create mode 100644 arch/arm/cpu/armv8/s32v234/cpu.c create mode 100644 arch/arm/cpu/armv8/s32v234/cpu.h create mode 100644 arch/arm/cpu/armv8/s32v234/generic.c create mode 100644 arch/arm/include/asm/arch-s32v234/clock.h create mode 100644 arch/arm/include/asm/arch-s32v234/ddr.h create mode 100644 arch/arm/include/asm/arch-s32v234/imx-regs.h create mode 100644 arch/arm/include/asm/arch-s32v234/lpddr2.h create mode 100644 arch/arm/include/asm/arch-s32v234/mc_cgm_regs.h create mode 100644 arch/arm/include/asm/arch-s32v234/mc_me_regs.h create mode 100644 arch/arm/include/asm/arch-s32v234/mc_rgm_regs.h create mode 100644 arch/arm/include/asm/arch-s32v234/mmdc.h create mode 100644 arch/arm/include/asm/arch-s32v234/siul.h create mode 100644 board/freescale/s32v234evb/Kconfig create mode 100644 board/freescale/s32v234evb/MAINTAINERS create mode 100644 board/freescale/s32v234evb/Makefile create mode 100644 board/freescale/s32v234evb/clock.c create mode 100644 board/freescale/s32v234evb/lpddr2.c create mode 100644 board/freescale/s32v234evb/s32v234evb.c create mode 100644 board/freescale/s32v234evb/s32v234evb.cfg create mode 100644 configs/s32v234evb_defconfig create mode 100644 include/configs/s32v234evb.h
arch/arm/Kconfig +5 -0
@@ -511,6 +511,10 @@ config RMOBILE bool "Renesas ARM SoCs" select CPU_V7 +config TARGET_S32V234EVB + bool "Support s32v234evb" + select ARM64 + config ARCH_SNAPDRAGON bool "Qualcomm Snapdragon SoCs" select ARM64
@@ -842,6 +846,7 @@ source "board/freescale/mx53ard/Kconfig" source "board/freescale/mx53evk/Kconfig" source "board/freescale/mx53loco/Kconfig" source "board/freescale/mx53smd/Kconfig" +source "board/freescale/s32v234evb/Kconfig" source "board/freescale/vf610twr/Kconfig" source "board/gumstix/pepper/Kconfig" source "board/h2200/Kconfig"
arch/arm/cpu/armv8/Makefile +1 -0
@@ -17,5 +17,6 @@ obj-y += transition.o obj-y += fwcall.o obj-$(CONFIG_FSL_LAYERSCAPE) += fsl-layerscape/ +obj-$(CONFIG_S32V234) += s32v234/ obj-$(CONFIG_ARCH_ZYNQMP) += zynqmp/ obj-$(CONFIG_TARGET_HIKEY) += hisilicon/
arch/arm/cpu/armv8/s32v234/Makefile new file +8 -0
@@ -0,0 +1,8 @@ +# +# (C) Copyright 2013-2016, Freescale Semiconductor, Inc. +# +# SPDX-License-Identifier: GPL-2.0+ +# + +obj-y += generic.o +obj-y += cpu.o
arch/arm/cpu/armv8/s32v234/cpu.c new file +97 -0
97 lines not on this page · raw message
arch/arm/cpu/armv8/s32v234/cpu.h new file +8 -0
@@ -0,0 +1,8 @@ +/* +* (C) Copyright 2014-2016, Freescale Semiconductor, Inc. +* +* SPDX-License-Identifier: GPL-2.0+ +*/ + +u32 cpu_mask (void ); +int cpu_numcores (void );
arch/arm/cpu/armv8/s32v234/generic.c new file +350 -0
350 lines not on this page · raw message
arch/arm/include/asm/arch-s32v234/clock.h new file +34 -0
@@ -0,0 +1,34 @@ +/* +* (C) Copyright 2015-2016, Freescale Semiconductor, Inc. +* +* SPDX-License-Identifier: GPL-2.0+ +*/ + +#ifndef __ASM_ARCH_CLOCK_H +#define __ASM_ARCH_CLOCK_H + +#include <common.h> + +enum mxc_clock { +MXC_ARM_CLK =0 , +MXC_BUS_CLK , +MXC_PERIPHERALS_CLK , +MXC_UART_CLK , +MXC_USDHC_CLK , +MXC_FEC_CLK , +MXC_I2C_CLK , +}; +enum pll_type { +ARM_PLL =0 , +PERIPH_PLL , +ENET_PLL , +DDR_PLL , +VIDEO_PLL , +}; + +unsigned int mxc_get_clock (enum mxc_clock clk); +void clock_init (void ); + +#define imx_get_fecclk () mxc_get_clock(MXC_FEC_CLK) + +#endif /* __ASM_ARCH_CLOCK_H */
arch/arm/include/asm/arch-s32v234/ddr.h new file +157 -0
157 lines not on this page · raw message
arch/arm/include/asm/arch-s32v234/imx-regs.h new file +329 -0
329 lines not on this page · raw message
arch/arm/include/asm/arch-s32v234/lpddr2.h new file +75 -0
75 lines not on this page · raw message
arch/arm/include/asm/arch-s32v234/mc_cgm_regs.h new file +254 -0
254 lines not on this page · raw message
arch/arm/include/asm/arch-s32v234/mc_me_regs.h new file +199 -0
199 lines not on this page · raw message
arch/arm/include/asm/arch-s32v234/mc_rgm_regs.h new file +31 -0
@@ -0,0 +1,31 @@ +/* +* (C) Copyright 2015, Freescale Semiconductor, Inc. +* +* SPDX-License-Identifier: GPL-2.0+ +*/ + +#ifndef __ARCH_ARM_MACH_S32V234_MCRGM_REGS_H__ +#define __ARCH_ARM_MACH_S32V234_MCRGM_REGS_H__ + +#define MC_RGM_DES (MC_RGM_BASE_ADDR) +#define MC_RGM_FES (MC_RGM_BASE_ADDR + 0x300) +#define MC_RGM_FERD (MC_RGM_BASE_ADDR + 0x310) +#define MC_RGM_FBRE (MC_RGM_BASE_ADDR + 0x330) +#define MC_RGM_FESS (MC_RGM_BASE_ADDR + 0x340) +#define MC_RGM_DDR_HE (MC_RGM_BASE_ADDR + 0x350) +#define MC_RGM_DDR_HS (MC_RGM_BASE_ADDR + 0x354) +#define MC_RGM_FRHE (MC_RGM_BASE_ADDR + 0x358) +#define MC_RGM_FREC (MC_RGM_BASE_ADDR + 0x600) +#define MC_RGM_FRET (MC_RGM_BASE_ADDR + 0x607) +#define MC_RGM_DRET (MC_RGM_BASE_ADDR + 0x60B) + +/* function reset sources mask */ +#define F_SWT4 0x8000 +#define F_JTAG 0x400 +#define F_FCCU_SOFT 0x40 +#define F_FCCU_HARD 0x20 +#define F_SOFT_FUNC 0x8 +#define F_ST_DONE 0x4 +#define F_EXT_RST 0x1 + +#endif /* __ARCH_ARM_MACH_S32V234_MCRGM_REGS_H__ */
arch/arm/include/asm/arch-s32v234/mmdc.h new file +89 -0
89 lines not on this page · raw message
arch/arm/include/asm/arch-s32v234/siul.h new file +150 -0
150 lines not on this page · raw message
board/freescale/s32v234evb/Kconfig new file +23 -0
@@ -0,0 +1,23 @@ +if TARGET_S32V234EVB + +config SYS_CPU + string + default "armv8" + +config SYS_BOARD + string + default "s32v234evb" + +config SYS_VENDOR + string + default "freescale" + +config SYS_SOC + string + default "s32v234" + +config SYS_CONFIG_NAME + string + default "s32v234evb" + +endif
board/freescale/s32v234evb/MAINTAINERS new file +8 -0
@@ -0,0 +1,8 @@ +S32V234 Evaluation BOARD +M: Eddy Petri?or <[email protected]> +S: Maintained +F: arch/arm/cpu/armv8/s32v234/ +F: arch/arm/include/asm/arch-s32v234/ +F: board/freescale/s32v234evb/ +F: include/configs/s32v234evb.h +F: configs/s32v234evb_defconfig
board/freescale/s32v234evb/Makefile new file +11 -0
@@ -0,0 +1,11 @@ +# +# (C) Copyright 2013-2015, Freescale Semiconductor, Inc. +# +# SPDX-License-Identifier: GPL-2.0+ +# + +obj-y := clock.o +obj-y += lpddr2.o +obj-y += s32v234evb.o + +#########################################################################
board/freescale/s32v234evb/clock.c new file +344 -0
344 lines not on this page · raw message
board/freescale/s32v234evb/lpddr2.c new file +137 -0
137 lines not on this page · raw message
board/freescale/s32v234evb/s32v234evb.c new file +183 -0
183 lines not on this page · raw message
board/freescale/s32v234evb/s32v234evb.cfg new file +29 -0
@@ -0,0 +1,29 @@ +/* + * (C) Copyright 2013-2015, Freescale Semiconductor, Inc. + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +/* + * Refer docs/README.imxmage for more details about how-to configure + * and create imximage boot image + * + * The syntax is taken as close as possible with the kwbimage + */ +#include <asm/imx-common/imximage.cfg> + +/* image version */ +IMAGE_VERSION 2 +BOOT_FROM sd + + +/* + * Boot Device : one of qspi, sd: + * qspi: flash_offset: 0x1000 + * sd/mmc: flash_offset: 0x1000 + */ + + +#ifdef CONFIG_SECURE_BOOT +SECURE_BOOT +#endif
configs/s32v234evb_defconfig new file +6 -0
@@ -0,0 +1,6 @@ +CONFIG_ARM=y +CONFIG_TARGET_S32V234EVB=y +CONFIG_SYS_MALLOC_F=y +CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/s32v234evb/s32v234evb.cfg" +CONFIG_CMD_BOOTZ=y +CONFIG_OF_LIBFDT=y
drivers/mmc/fsl_esdhc.c +5 -5
@@ -208,7 +208,7 @@ static int esdhc_setup_data(struct mmc *mmc, struct mmc_data *data)int timeout;struct fsl_esdhc_priv *priv = mmc->priv;struct fsl_esdhc *regs = priv->esdhc_regs; -#ifdef CONFIG_FSL_LAYERSCAPE +#if defined(CONFIG_FSL_LAYERSCAPE ) || defined(CONFIG_S32V234 )dma_addr_t addr;#endif uint wml_value;
@@ -221,7 +221,7 @@ static int esdhc_setup_data(struct mmc *mmc, struct mmc_data *data)esdhc_clrsetbits32 (®s->wml,WML_RD_WML_MASK , wml_value);#ifndef CONFIG_SYS_FSL_ESDHC_USE_PIO -#ifdef CONFIG_FSL_LAYERSCAPE +#if defined(CONFIG_FSL_LAYERSCAPE ) || defined(CONFIG_S32V234 ) addr =virt_to_phys ((void *)(data->dest));if (upper_32_bits (addr))printf ("Error found for upper 32 bits\n" );
@@ -247,7 +247,7 @@ static int esdhc_setup_data(struct mmc *mmc, struct mmc_data *data)esdhc_clrsetbits32 (®s->wml,WML_WR_WML_MASK , wml_value <<16 );#ifndef CONFIG_SYS_FSL_ESDHC_USE_PIO -#ifdef CONFIG_FSL_LAYERSCAPE +#if defined(CONFIG_FSL_LAYERSCAPE ) || defined(CONFIG_S32V234 ) addr =virt_to_phys ((void *)(data->src));if (upper_32_bits (addr))printf ("Error found for upper 32 bits\n" );
@@ -308,7 +308,7 @@ static int esdhc_setup_data(struct mmc *mmc, struct mmc_data *data)static void check_and_invalidate_dcache_range (struct mmc_cmd *cmd,struct mmc_data *data) { -#ifdef CONFIG_FSL_LAYERSCAPE +#if defined(CONFIG_FSL_LAYERSCAPE ) || defined(CONFIG_S32V234 )unsigned start =0 ;#else unsigned start = (unsigned )data->dest ;
@@ -316,7 +316,7 @@ static void check_and_invalidate_dcache_rangeunsigned size =roundup (ARCH_DMA_MINALIGN , data->blocks*data->blocksize);unsigned end = start+size ; -#ifdef CONFIG_FSL_LAYERSCAPE +#if defined(CONFIG_FSL_LAYERSCAPE ) || defined(CONFIG_S32V234 )dma_addr_t addr; addr =virt_to_phys ((void *)(data->dest));
include/configs/s32v234evb.h new file +305 -0
305 lines not on this page · raw message
Signature · 1 line
2.1.4
v2 cover Initial S32V234 support - version 2 (with notes now)
In reply to Eddy PetrișorHere are the reworked patches for initial S32V234 support, including the git notes in both patches.
Sorry for the repost.
Eddy Petri?or (1):
armv8: s32v234: Introduce basic support for s32v234evb
Stoica Cosmin-Stefan (1):
serial: Introduce linflex uart support
arch/arm/Kconfig | 5 + arch/arm/cpu/armv8/Makefile | 1 + arch/arm/cpu/armv8/s32v234/Makefile | 8 + arch/arm/cpu/armv8/s32v234/cpu.c | 97 +++++++ arch/arm/cpu/armv8/s32v234/cpu.h | 8 + arch/arm/cpu/armv8/s32v234/generic.c | 350 ++++++++++++++++++++++++ arch/arm/include/asm/arch-s32v234/clock.h | 34 +++ arch/arm/include/asm/arch-s32v234/ddr.h | 157 +++++++++++ arch/arm/include/asm/arch-s32v234/imx-regs.h | 329 ++++++++++++++++++++++ arch/arm/include/asm/arch-s32v234/lpddr2.h | 75 +++++ arch/arm/include/asm/arch-s32v234/mc_cgm_regs.h | 254 +++++++++++++++++ arch/arm/include/asm/arch-s32v234/mc_me_regs.h | 199 ++++++++++++++ arch/arm/include/asm/arch-s32v234/mc_rgm_regs.h | 31 +++ arch/arm/include/asm/arch-s32v234/mmdc.h | 89 ++++++ arch/arm/include/asm/arch-s32v234/siul.h | 150 ++++++++++ board/freescale/s32v234evb/Kconfig | 23 ++ board/freescale/s32v234evb/MAINTAINERS | 8 + board/freescale/s32v234evb/Makefile | 11 + board/freescale/s32v234evb/clock.c | 344 +++++++++++++++++++++++ board/freescale/s32v234evb/lpddr2.c | 137 ++++++++++ board/freescale/s32v234evb/s32v234evb.c | 183 +++++++++++++ board/freescale/s32v234evb/s32v234evb.cfg | 29 ++ configs/s32v234evb_defconfig | 6 + drivers/mmc/fsl_esdhc.c | 10 +- drivers/serial/Makefile | 1 + drivers/serial/serial_linflexuart.c | 274 +++++++++++++++++++ include/configs/s32v234evb.h | 305 +++++++++++++++++++++ 27 files changed, 3113 insertions(+), 5 deletions(-) create mode 100644 arch/arm/cpu/armv8/s32v234/Makefile create mode 100644 arch/arm/cpu/armv8/s32v234/cpu.c create mode 100644 arch/arm/cpu/armv8/s32v234/cpu.h create mode 100644 arch/arm/cpu/armv8/s32v234/generic.c create mode 100644 arch/arm/include/asm/arch-s32v234/clock.h create mode 100644 arch/arm/include/asm/arch-s32v234/ddr.h create mode 100644 arch/arm/include/asm/arch-s32v234/imx-regs.h create mode 100644 arch/arm/include/asm/arch-s32v234/lpddr2.h create mode 100644 arch/arm/include/asm/arch-s32v234/mc_cgm_regs.h create mode 100644 arch/arm/include/asm/arch-s32v234/mc_me_regs.h create mode 100644 arch/arm/include/asm/arch-s32v234/mc_rgm_regs.h create mode 100644 arch/arm/include/asm/arch-s32v234/mmdc.h create mode 100644 arch/arm/include/asm/arch-s32v234/siul.h create mode 100644 board/freescale/s32v234evb/Kconfig create mode 100644 board/freescale/s32v234evb/MAINTAINERS create mode 100644 board/freescale/s32v234evb/Makefile create mode 100644 board/freescale/s32v234evb/clock.c create mode 100644 board/freescale/s32v234evb/lpddr2.c create mode 100644 board/freescale/s32v234evb/s32v234evb.c create mode 100644 board/freescale/s32v234evb/s32v234evb.cfg create mode 100644 configs/s32v234evb_defconfig create mode 100644 drivers/serial/serial_linflexuart.c create mode 100644 include/configs/s32v234evb.h
Signature · 1 line
2.1.4
PATCH v2 1/2 serial: Introduce linflex uart support
In reply to Eddy PetrișorFrom: Stoica Cosmin-Stefan <[email protected]>
The Linflex module is integrated on some NXP automotive SoCs part of the former Freescale portfolio, like S32V234, an SoC for Advanced Driver Assistance Systems.
---
Notes:
Changes in v2:
Added support for device model. Compatibility with non-DM code is kept for easier synchronization with the code on the vendor branch where the conversion to DM is not done for all boards.
drivers/serial/Makefile | 1 + drivers/serial/serial_linflexuart.c | 274 ++++++++++++++++++++++++++++++++++++ 2 files changed, 275 insertions(+) create mode 100644 drivers/serial/serial_linflexuart.c
drivers/serial/Makefile +1 -0
@@ -33,6 +33,7 @@ obj-$(CONFIG_SCIF_CONSOLE) += serial_sh.o obj-$(CONFIG_ZYNQ_SERIAL) += serial_zynq.o obj-$(CONFIG_BFIN_SERIAL) += serial_bfin.o obj-$(CONFIG_FSL_LPUART) += serial_lpuart.o +obj-$(CONFIG_FSL_LINFLEXUART) += serial_linflexuart.o obj-$(CONFIG_ARC_SERIAL) += serial_arc.o obj-$(CONFIG_UNIPHIER_SERIAL) += serial_uniphier.o obj-$(CONFIG_STM32_SERIAL) += serial_stm32.o
drivers/serial/serial_linflexuart.c new file +274 -0
274 lines not on this page · raw message
Signature · 1 line
2.1.4
PATCH v2 1/2 serial: Introduce linflex uart support
+Simon
Hi Eddy,
Quoted 11 lines · Eddy Petri?or
From: Stoica Cosmin-Stefan <[email protected]>
The Linflex module is integrated on some NXP automotive SoCs part of the former Freescale portfolio, like S32V234, an SoC for Advanced Driver Assistance Systems.
Original-signed-off-by Stoica Cosmin-Stefan <[email protected]>Original-signed-off-by Chircu Bogdan <[email protected]>Original-signed-off-by Depons Eric <[email protected]>Original-signed-off-by Eddy Petri?or <[email protected]>
Quoted 8 lines
Signed-off-by Eddy Petri?or <[email protected]>---
Notes:
Changes in v2:
Added support for device model. Compatibility with non-DM code is kept for easier synchronization with the code on the vendor branch where the conversion to DM is not done for all boards.
I see this is a NEW driver. Then you should only add DM support. We don't want to carry forward any legacy stuff.
Quoted 6 lines
drivers/serial/Makefile | 1 + drivers/serial/serial_linflexuart.c | 274 ++++++++++++++++++++++++++++++++++++ 2 files changed, 275 insertions(+) create mode 100644 drivers/serial/serial_linflexuart.c
[snip]
Regards,
Bin
PATCH v2 1/2 serial: Introduce linflex uart support
Pe 7 mai 2016 5:56 p.m., "Bin Meng" <[email protected]> a scris:
Quoted 6 lines
+Simon
Hi Eddy,
On Thu, Apr 28, 2016 at 6:07 AM, Eddy Petri?or <[email protected]>
Quoted 3 lines · wrote:
Quoted 3 lines
From: Stoica Cosmin-Stefan <[email protected]>
The Linflex module is integrated on some NXP automotive SoCs part of
the former
Quoted 4 lines
Quoted 4 lines
Freescale portfolio, like S32V234, an SoC for Advanced Driver Assistance Systems.
Original-signed-off-by: Stoica Cosmin-Stefan <
Quoted 10 lines
Quoted 10 lines
Original-signed-off-by Chircu Bogdan <[email protected]>Original-signed-off-by Depons Eric <[email protected]>Original-signed-off-by Eddy Petri?or <[email protected]>Signed-off-by Eddy Petri?or <[email protected]>---
Notes:
Changes in v2:
Added support for device model. Compatibility with non-DM code is
kept
Quoted 1 line
Quoted 1 line
for easier synchronization with the code on the vendor branch where
the
Quoted 4 lines
Quoted 1 line
conversion to DM is not done for all boards.
I see this is a NEW driver. Then you should only add DM support. We don't want to carry forward any legacy stuff.
Ok, I'll kill the legacy stuff and send version 3.
Eddy
PATCH v2 2/2 armv8: s32v234: Introduce basic support for s32v234evb
In reply to Eddy PetrișorFrom: Eddy Petri?or <[email protected]>
Add initial support for NXP's S32V234 SoC and S32V234EVB board.
The S32V230 family is designed to support computation-intensive applications for image processing. The S32V234, as part of the S32V230 family, is a high-performance automotive processor designed to support safe computation-intensive applications in the area of vision and sensor fusion.
Code originally writen by:
---
Notes:
Changes in v2:
- Added support for device model. Compatibility with non-DM code is kept for easier synchronization with the code on the vendor branch where the conversion to DM is not done for all boards.
- remove TODO-s
- remove '#if 0'-ed code
- switched to SPDX headers
- removed uselss guard around 'DECLARE_GLOBAL_DATA_PTR;'
- replaced 'CONFIG_SYS_FSL' with 'S32V234' in defines for MMU bases and sizes
- reset_cpu now says it's not implemented
- moved OF_LIBFDT and BOOTZ config options to Kconfig
arch/arm/Kconfig | 5 + arch/arm/cpu/armv8/Makefile | 1 + arch/arm/cpu/armv8/s32v234/Makefile | 8 + arch/arm/cpu/armv8/s32v234/cpu.c | 97 +++++++ arch/arm/cpu/armv8/s32v234/cpu.h | 8 + arch/arm/cpu/armv8/s32v234/generic.c | 350 ++++++++++++++++++++++++ arch/arm/include/asm/arch-s32v234/clock.h | 34 +++ arch/arm/include/asm/arch-s32v234/ddr.h | 157 +++++++++++ arch/arm/include/asm/arch-s32v234/imx-regs.h | 329 ++++++++++++++++++++++ arch/arm/include/asm/arch-s32v234/lpddr2.h | 75 +++++ arch/arm/include/asm/arch-s32v234/mc_cgm_regs.h | 254 +++++++++++++++++ arch/arm/include/asm/arch-s32v234/mc_me_regs.h | 199 ++++++++++++++ arch/arm/include/asm/arch-s32v234/mc_rgm_regs.h | 31 +++ arch/arm/include/asm/arch-s32v234/mmdc.h | 89 ++++++ arch/arm/include/asm/arch-s32v234/siul.h | 150 ++++++++++ board/freescale/s32v234evb/Kconfig | 23 ++ board/freescale/s32v234evb/MAINTAINERS | 8 + board/freescale/s32v234evb/Makefile | 11 + board/freescale/s32v234evb/clock.c | 344 +++++++++++++++++++++++ board/freescale/s32v234evb/lpddr2.c | 137 ++++++++++ board/freescale/s32v234evb/s32v234evb.c | 183 +++++++++++++ board/freescale/s32v234evb/s32v234evb.cfg | 29 ++ configs/s32v234evb_defconfig | 6 + drivers/mmc/fsl_esdhc.c | 10 +- include/configs/s32v234evb.h | 305 +++++++++++++++++++++ 25 files changed, 2838 insertions(+), 5 deletions(-) create mode 100644 arch/arm/cpu/armv8/s32v234/Makefile create mode 100644 arch/arm/cpu/armv8/s32v234/cpu.c create mode 100644 arch/arm/cpu/armv8/s32v234/cpu.h create mode 100644 arch/arm/cpu/armv8/s32v234/generic.c create mode 100644 arch/arm/include/asm/arch-s32v234/clock.h create mode 100644 arch/arm/include/asm/arch-s32v234/ddr.h create mode 100644 arch/arm/include/asm/arch-s32v234/imx-regs.h create mode 100644 arch/arm/include/asm/arch-s32v234/lpddr2.h create mode 100644 arch/arm/include/asm/arch-s32v234/mc_cgm_regs.h create mode 100644 arch/arm/include/asm/arch-s32v234/mc_me_regs.h create mode 100644 arch/arm/include/asm/arch-s32v234/mc_rgm_regs.h create mode 100644 arch/arm/include/asm/arch-s32v234/mmdc.h create mode 100644 arch/arm/include/asm/arch-s32v234/siul.h create mode 100644 board/freescale/s32v234evb/Kconfig create mode 100644 board/freescale/s32v234evb/MAINTAINERS create mode 100644 board/freescale/s32v234evb/Makefile create mode 100644 board/freescale/s32v234evb/clock.c create mode 100644 board/freescale/s32v234evb/lpddr2.c create mode 100644 board/freescale/s32v234evb/s32v234evb.c create mode 100644 board/freescale/s32v234evb/s32v234evb.cfg create mode 100644 configs/s32v234evb_defconfig create mode 100644 include/configs/s32v234evb.h
arch/arm/Kconfig +5 -0
@@ -511,6 +511,10 @@ config RMOBILE bool "Renesas ARM SoCs" select CPU_V7 +config TARGET_S32V234EVB + bool "Support s32v234evb" + select ARM64 + config ARCH_SNAPDRAGON bool "Qualcomm Snapdragon SoCs" select ARM64
@@ -842,6 +846,7 @@ source "board/freescale/mx53ard/Kconfig" source "board/freescale/mx53evk/Kconfig" source "board/freescale/mx53loco/Kconfig" source "board/freescale/mx53smd/Kconfig" +source "board/freescale/s32v234evb/Kconfig" source "board/freescale/vf610twr/Kconfig" source "board/gumstix/pepper/Kconfig" source "board/h2200/Kconfig"
arch/arm/cpu/armv8/Makefile +1 -0
@@ -17,5 +17,6 @@ obj-y += transition.o obj-y += fwcall.o obj-$(CONFIG_FSL_LAYERSCAPE) += fsl-layerscape/ +obj-$(CONFIG_S32V234) += s32v234/ obj-$(CONFIG_ARCH_ZYNQMP) += zynqmp/ obj-$(CONFIG_TARGET_HIKEY) += hisilicon/
arch/arm/cpu/armv8/s32v234/Makefile new file +8 -0
@@ -0,0 +1,8 @@ +# +# (C) Copyright 2013-2016, Freescale Semiconductor, Inc. +# +# SPDX-License-Identifier: GPL-2.0+ +# + +obj-y += generic.o +obj-y += cpu.o
arch/arm/cpu/armv8/s32v234/cpu.c new file +97 -0
97 lines not on this page · raw message
arch/arm/cpu/armv8/s32v234/cpu.h new file +8 -0
@@ -0,0 +1,8 @@ +/* +* (C) Copyright 2014-2016, Freescale Semiconductor, Inc. +* +* SPDX-License-Identifier: GPL-2.0+ +*/ + +u32 cpu_mask (void ); +int cpu_numcores (void );
arch/arm/cpu/armv8/s32v234/generic.c new file +350 -0
350 lines not on this page · raw message
arch/arm/include/asm/arch-s32v234/clock.h new file +34 -0
@@ -0,0 +1,34 @@ +/* +* (C) Copyright 2015-2016, Freescale Semiconductor, Inc. +* +* SPDX-License-Identifier: GPL-2.0+ +*/ + +#ifndef __ASM_ARCH_CLOCK_H +#define __ASM_ARCH_CLOCK_H + +#include <common.h> + +enum mxc_clock { +MXC_ARM_CLK =0 , +MXC_BUS_CLK , +MXC_PERIPHERALS_CLK , +MXC_UART_CLK , +MXC_USDHC_CLK , +MXC_FEC_CLK , +MXC_I2C_CLK , +}; +enum pll_type { +ARM_PLL =0 , +PERIPH_PLL , +ENET_PLL , +DDR_PLL , +VIDEO_PLL , +}; + +unsigned int mxc_get_clock (enum mxc_clock clk); +void clock_init (void ); + +#define imx_get_fecclk () mxc_get_clock(MXC_FEC_CLK) + +#endif /* __ASM_ARCH_CLOCK_H */
arch/arm/include/asm/arch-s32v234/ddr.h new file +157 -0
157 lines not on this page · raw message
arch/arm/include/asm/arch-s32v234/imx-regs.h new file +329 -0
329 lines not on this page · raw message
arch/arm/include/asm/arch-s32v234/lpddr2.h new file +75 -0
75 lines not on this page · raw message
arch/arm/include/asm/arch-s32v234/mc_cgm_regs.h new file +254 -0
254 lines not on this page · raw message
arch/arm/include/asm/arch-s32v234/mc_me_regs.h new file +199 -0
199 lines not on this page · raw message
arch/arm/include/asm/arch-s32v234/mc_rgm_regs.h new file +31 -0
@@ -0,0 +1,31 @@ +/* +* (C) Copyright 2015, Freescale Semiconductor, Inc. +* +* SPDX-License-Identifier: GPL-2.0+ +*/ + +#ifndef __ARCH_ARM_MACH_S32V234_MCRGM_REGS_H__ +#define __ARCH_ARM_MACH_S32V234_MCRGM_REGS_H__ + +#define MC_RGM_DES (MC_RGM_BASE_ADDR) +#define MC_RGM_FES (MC_RGM_BASE_ADDR + 0x300) +#define MC_RGM_FERD (MC_RGM_BASE_ADDR + 0x310) +#define MC_RGM_FBRE (MC_RGM_BASE_ADDR + 0x330) +#define MC_RGM_FESS (MC_RGM_BASE_ADDR + 0x340) +#define MC_RGM_DDR_HE (MC_RGM_BASE_ADDR + 0x350) +#define MC_RGM_DDR_HS (MC_RGM_BASE_ADDR + 0x354) +#define MC_RGM_FRHE (MC_RGM_BASE_ADDR + 0x358) +#define MC_RGM_FREC (MC_RGM_BASE_ADDR + 0x600) +#define MC_RGM_FRET (MC_RGM_BASE_ADDR + 0x607) +#define MC_RGM_DRET (MC_RGM_BASE_ADDR + 0x60B) + +/* function reset sources mask */ +#define F_SWT4 0x8000 +#define F_JTAG 0x400 +#define F_FCCU_SOFT 0x40 +#define F_FCCU_HARD 0x20 +#define F_SOFT_FUNC 0x8 +#define F_ST_DONE 0x4 +#define F_EXT_RST 0x1 + +#endif /* __ARCH_ARM_MACH_S32V234_MCRGM_REGS_H__ */
arch/arm/include/asm/arch-s32v234/mmdc.h new file +89 -0
89 lines not on this page · raw message
arch/arm/include/asm/arch-s32v234/siul.h new file +150 -0
150 lines not on this page · raw message
board/freescale/s32v234evb/Kconfig new file +23 -0
@@ -0,0 +1,23 @@ +if TARGET_S32V234EVB + +config SYS_CPU + string + default "armv8" + +config SYS_BOARD + string + default "s32v234evb" + +config SYS_VENDOR + string + default "freescale" + +config SYS_SOC + string + default "s32v234" + +config SYS_CONFIG_NAME + string + default "s32v234evb" + +endif
board/freescale/s32v234evb/MAINTAINERS new file +8 -0
@@ -0,0 +1,8 @@ +S32V234 Evaluation BOARD +M: Eddy Petri?or <[email protected]> +S: Maintained +F: arch/arm/cpu/armv8/s32v234/ +F: arch/arm/include/asm/arch-s32v234/ +F: board/freescale/s32v234evb/ +F: include/configs/s32v234evb.h +F: configs/s32v234evb_defconfig
board/freescale/s32v234evb/Makefile new file +11 -0
@@ -0,0 +1,11 @@ +# +# (C) Copyright 2013-2015, Freescale Semiconductor, Inc. +# +# SPDX-License-Identifier: GPL-2.0+ +# + +obj-y := clock.o +obj-y += lpddr2.o +obj-y += s32v234evb.o + +#########################################################################
board/freescale/s32v234evb/clock.c new file +344 -0
344 lines not on this page · raw message
board/freescale/s32v234evb/lpddr2.c new file +137 -0
137 lines not on this page · raw message
board/freescale/s32v234evb/s32v234evb.c new file +183 -0
183 lines not on this page · raw message
board/freescale/s32v234evb/s32v234evb.cfg new file +29 -0
@@ -0,0 +1,29 @@ +/* + * (C) Copyright 2013-2015, Freescale Semiconductor, Inc. + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +/* + * Refer docs/README.imxmage for more details about how-to configure + * and create imximage boot image + * + * The syntax is taken as close as possible with the kwbimage + */ +#include <asm/imx-common/imximage.cfg> + +/* image version */ +IMAGE_VERSION 2 +BOOT_FROM sd + + +/* + * Boot Device : one of qspi, sd: + * qspi: flash_offset: 0x1000 + * sd/mmc: flash_offset: 0x1000 + */ + + +#ifdef CONFIG_SECURE_BOOT +SECURE_BOOT +#endif
configs/s32v234evb_defconfig new file +6 -0
@@ -0,0 +1,6 @@ +CONFIG_ARM=y +CONFIG_TARGET_S32V234EVB=y +CONFIG_SYS_MALLOC_F=y +CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/s32v234evb/s32v234evb.cfg" +CONFIG_CMD_BOOTZ=y +CONFIG_OF_LIBFDT=y
drivers/mmc/fsl_esdhc.c +5 -5
@@ -208,7 +208,7 @@ static int esdhc_setup_data(struct mmc *mmc, struct mmc_data *data)int timeout;struct fsl_esdhc_priv *priv = mmc->priv;struct fsl_esdhc *regs = priv->esdhc_regs; -#ifdef CONFIG_FSL_LAYERSCAPE +#if defined(CONFIG_FSL_LAYERSCAPE ) || defined(CONFIG_S32V234 )dma_addr_t addr;#endif uint wml_value;
@@ -221,7 +221,7 @@ static int esdhc_setup_data(struct mmc *mmc, struct mmc_data *data)esdhc_clrsetbits32 (®s->wml,WML_RD_WML_MASK , wml_value);#ifndef CONFIG_SYS_FSL_ESDHC_USE_PIO -#ifdef CONFIG_FSL_LAYERSCAPE +#if defined(CONFIG_FSL_LAYERSCAPE ) || defined(CONFIG_S32V234 ) addr =virt_to_phys ((void *)(data->dest));if (upper_32_bits (addr))printf ("Error found for upper 32 bits\n" );
@@ -247,7 +247,7 @@ static int esdhc_setup_data(struct mmc *mmc, struct mmc_data *data)esdhc_clrsetbits32 (®s->wml,WML_WR_WML_MASK , wml_value <<16 );#ifndef CONFIG_SYS_FSL_ESDHC_USE_PIO -#ifdef CONFIG_FSL_LAYERSCAPE +#if defined(CONFIG_FSL_LAYERSCAPE ) || defined(CONFIG_S32V234 ) addr =virt_to_phys ((void *)(data->src));if (upper_32_bits (addr))printf ("Error found for upper 32 bits\n" );
@@ -308,7 +308,7 @@ static int esdhc_setup_data(struct mmc *mmc, struct mmc_data *data)static void check_and_invalidate_dcache_range (struct mmc_cmd *cmd,struct mmc_data *data) { -#ifdef CONFIG_FSL_LAYERSCAPE +#if defined(CONFIG_FSL_LAYERSCAPE ) || defined(CONFIG_S32V234 )unsigned start =0 ;#else unsigned start = (unsigned )data->dest ;
@@ -316,7 +316,7 @@ static void check_and_invalidate_dcache_rangeunsigned size =roundup (ARCH_DMA_MINALIGN , data->blocks*data->blocksize);unsigned end = start+size ; -#ifdef CONFIG_FSL_LAYERSCAPE +#if defined(CONFIG_FSL_LAYERSCAPE ) || defined(CONFIG_S32V234 )dma_addr_t addr; addr =virt_to_phys ((void *)(data->dest));
include/configs/s32v234evb.h new file +305 -0
305 lines not on this page · raw message
Signature · 1 line
2.1.4
PATCH v2 2/2 armv8: s32v234: Introduce basic support for s32v234evb
Quoted 9 lines · Eddy Petri?or
From: Eddy Petri?or <[email protected]>
Add initial support for NXP's S32V234 SoC and S32V234EVB board.
The S32V230 family is designed to support computation-intensive applications for image processing. The S32V234, as part of the S32V230 family, is a high-performance automotive processor designed to support safe computation-intensive applications in the area of vision and sensor fusion.
Quoted 8 lines
Code originally writen by:
Original-signed-off-by Stoica Cosmin-Stefan <[email protected]>Original-signed-off-by Mihaela Martinas <[email protected]>Original-signed-off-by Eddy Petri?or <[email protected]>Signed-off-by Eddy Petri?or <[email protected]>---
[?]
Quoted 86 lines
include/configs/s32v234evb.h new file +86
-0+#define CONFIG_CMD_ENV +#define CONFIG_EXTRA_ENV_SETTINGS \ + "script=boot.scr\0" \ + "uimage=uImage\0" \ + "ramdisk=rootfs.uimg\0"\ + "console=ttyLF0\0" \ + "fdt_high=0xffffffff\0" \ + "initrd_high=0xffffffff\0" \ + "fdt_file=s32v234-evb.dtb\0" \ + "fdt_addr=0xC2000000\0" \ + "kernel_addr=0xC307FFC0\0" \ + "ramdisk_addr=0xC4000000\0" \ + "boot_fdt=try\0" \ + "ip_dyn=yes\0" \ + "mmcdev=" __stringify(CONFIG_SYS_MMC_ENV_DEV) "\0" \ + "mmcpart=1\0" \ + "mmcroot=/dev/mmcblk0p2 rootwait rw\0" \ + "update_sd_firmware_filename=u-boot.imx\0" \ + "update_sd_firmware=" \ + "if test ${ip_dyn} = yes; then " \ + "setenv get_cmd dhcp; " \ + "else " \ + "setenv get_cmd tftp; " \ + "fi; " \ + "if mmc dev ${mmcdev}; then " \ + "if ${get_cmd} ${update_sd_firmware_filename}; then " \ + "setexpr fw_sz ${filesize} / 0x200; " \ + "setexpr fw_sz ${fw_sz} + 1; " \ + "mmc write ${loadaddr} 0x2 ${fw_sz}; " \ + "fi; " \ + "fi\0" \ + "mmcargs=setenv bootargs console=${console},${baudrate} " \ + "root=${mmcroot}\0" \ + "loadbootscript=" \ + "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \ + "bootscript=echo Running bootscript from mmc ...; " \ + "source\0" \ + "loaduimage=fatload mmc ${mmcdev}:${mmcpart} ${kernel_addr} ${uimage}\0" \ + "loadramdisk=fatload mmc ${mmcdev}:${mmcpart} ${ramdisk_addr} ${ramdisk}\0" \ + "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \ + "jtagboot=echo Booting using jtag...; " \ + "bootm ${kernel_addr} ${ramdisk_addr} ${fdt_addr}\0" \ + "jtagsdboot=echo Booting loading Linux with ramdisk from SD...; " \ + "run loaduimage; run loadramdisk; run loadfdt;"\ + "bootm ${kernel_addr} ${ramdisk_addr} ${fdt_addr}\0" \ + "mmcboot=echo Booting from mmc ...; " \ + "run mmcargs; " \ + "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \ + "if run loadfdt; then " \ + "bootm ${loadaddr} - ${fdt_addr}; " \ + "else " \ + "if test ${boot_fdt} = try; then " \ + "bootm; " \ + "else " \ + "echo WARN: Cannot load the DT; " \ + "fi; " \ + "fi; " \ + "else " \ + "bootm; " \ + "fi;\0" \ + "netargs=setenv bootargs console=${console},${baudrate} " \ + "root=/dev/nfs " \ + "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \ + "netboot=echo Booting from net ...; " \ + "run netargs; " \ + "if test ${ip_dyn} = yes; then " \ + "setenv get_cmd dhcp; " \ + "else " \ + "setenv get_cmd tftp; " \ + "fi; " \ + "${get_cmd} ${uimage}; " \ + "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \ + "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \ + "bootm ${loadaddr} - ${fdt_addr}; " \ + "else " \ + "if test ${boot_fdt} = try; then " \ + "bootm; " \ + "else " \ + "echo WARN: Cannot load the DT; " \ + "fi; " \ + "fi; " \ + "else " \ + "bootm; " \ + "fi;\0" + +#define CONFIG_BOOTCOMMAND \
include/configs/s32v234evb.h line 234
Quoted 10 lines
include/configs/s32v234evb.h new file +10
-0+"mmc dev ${mmcdev}; if mmc rescan; then " \ +"if run loadbootscript; then " \ +"run bootscript; " \ +"else " \ +"if run loaduimage; then " \ +"run mmcboot; " \ +"else run netboot; " \ +"fi; " \ +"fi; " \ +"else run netboot; fi"
Do you think you could move all of that to distro boot (config_distro_defaults.h)?
Alex
PATCH v2 2/2 armv8: s32v234: Introduce basic support for s32v234evb
Pe 7 mai 2016 7:22 p.m., "Alexander Graf" <[email protected]> a scris:
Quoted 26 lines · Eddy Petri?or
Quoted 2 lines
From: Eddy Petri?or <[email protected]>
[?]
Quoted 18 lines
include/configs/s32v234evb.h new file +18
-0+#define CONFIG_CMD_ENV +#define CONFIG_EXTRA_ENV_SETTINGS \ + "script=boot.scr\0" \ + "uimage=uImage\0" \ + "ramdisk=rootfs.uimg\0"\ + "console=ttyLF0\0" \ + "fdt_high=0xffffffff\0" \ + "initrd_high=0xffffffff\0" \ + "fdt_file=s32v234-evb.dtb\0" \ + "fdt_addr=0xC2000000\0" \ + "kernel_addr=0xC307FFC0\0" \ + "ramdisk_addr=0xC4000000\0" \ + "boot_fdt=try\0" \ + "ip_dyn=yes\0" \ + "mmcdev=" __stringify(CONFIG_SYS_MMC_ENV_DEV) "\0" \ + "mmcpart=1\0" \ + "mmcroot=/dev/mmcblk0p2 rootwait rw\0" \ + "update_sd_firmware_filename=u-boot.imx\0" \
Quoted 8 lines
include/configs/s32v234evb.h
Quoted 8 lines
include/configs/s32v234evb.h new file +8
-0+"update_sd_firmware=" \ +"if test ${ip_dyn} = yes; then " \ +"setenv get_cmd dhcp; " \ +"else " \ +"setenv get_cmd tftp; " \ +"fi; " \ +"if mmc dev ${mmcdev}; then " \ + "if ${get_cmd} ${update_sd_firmware_filename};
then " \
Quoted 9 lines
include/configs/s32v234evb.h
Quoted 9 lines
include/configs/s32v234evb.h new file +9
-0+"setexpr fw_sz ${filesize} / 0x200; " \ +"setexpr fw_sz ${fw_sz} + 1; " \ +"mmc write ${loadaddr} 0x2 ${fw_sz}; " \ +"fi; " \ +"fi\0" \ +"mmcargs=setenv bootargs console=${console},${baudrate} " \ +"root=${mmcroot}\0" \ +"loadbootscript=" \ + "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr}
${script};\0" \
Quoted 3 lines
include/configs/s32v234evb.h
Quoted 3 lines
include/configs/s32v234evb.h new file +3
-0+"bootscript=echo Running bootscript from mmc ...; " \ +"source\0" \ + "loaduimage=fatload mmc ${mmcdev}:${mmcpart} ${kernel_addr}
${uimage}\0" \
Quoted 1 line
Quoted 1 line
+ "loadramdisk=fatload mmc ${mmcdev}:${mmcpart} ${ramdisk_addr}
${ramdisk}\0" \
Quoted 1 line
Quoted 1 line
+ "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr}
${fdt_file}\0" \
Quoted 3 lines
include/configs/s32v234evb.h
Quoted 3 lines
include/configs/s32v234evb.h new file +3
-0+"jtagboot=echo Booting using jtag...; " \ +"bootm ${kernel_addr} ${ramdisk_addr} ${fdt_addr}\0" \ +"jtagsdboot=echo Booting loading Linux with ramdisk from SD...; "
\
Quoted 5 lines
include/configs/s32v234evb.h
Quoted 5 lines
include/configs/s32v234evb.h new file +5
-0+"run loaduimage; run loadramdisk; run loadfdt;" \ +"bootm ${kernel_addr} ${ramdisk_addr} ${fdt_addr}\0" \ +"mmcboot=echo Booting from mmc ...; " \ +"run mmcargs; " \ + "if test ${boot_fdt} = yes || test ${boot_fdt} = try;
then " \
Quoted 7 lines
include/configs/s32v234evb.h
Quoted 7 lines
include/configs/s32v234evb.h new file +7
-0+"if run loadfdt; then " \ +"bootm ${loadaddr} - ${fdt_addr}; " \ +"else " \ +"if test ${boot_fdt} = try; then " \ +"bootm; " \ +"else " \ +"echo WARN: Cannot load the DT; "
\
Quoted 9 lines
Quoted 9 lines
include/configs/s32v234evb.h new file +9
-0+"fi; " \ +"fi; " \ +"else " \ +"bootm; " \ +"fi;\0" \ +"netargs=setenv bootargs console=${console},${baudrate} " \ +"root=/dev/nfs " \ +"ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \ +"netboot=echo Booting from net ...; " \
Quoted 8 lines
include/configs/s32v234evb.h
Quoted 8 lines
include/configs/s32v234evb.h new file +8
-0+"run netargs; " \ +"if test ${ip_dyn} = yes; then " \ +"setenv get_cmd dhcp; " \ +"else " \ +"setenv get_cmd tftp; " \ +"fi; " \ +"${get_cmd} ${uimage}; " \ + "if test ${boot_fdt} = yes || test ${boot_fdt} = try;
then " \
Quoted 7 lines
include/configs/s32v234evb.h
Quoted 7 lines
include/configs/s32v234evb.h new file +7
-0+"if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \ +"bootm ${loadaddr} - ${fdt_addr}; " \ +"else " \ +"if test ${boot_fdt} = try; then " \ +"bootm; " \ +"else " \ +"echo WARN: Cannot load the DT; "
\
Quoted 11 lines
Quoted 11 lines
include/configs/s32v234evb.h new file +11
-0+"fi; " \ +"fi; " \ +"else " \ +"bootm; " \ +"fi;\0" + +#define CONFIG_BOOTCOMMAND \ +"mmc dev ${mmcdev}; if mmc rescan; then " \ +"if run loadbootscript; then " \ +"run bootscript; " \ +"else " \
Quoted 8 lines
include/configs/s32v234evb.h line 234
Quoted 6 lines
include/configs/s32v234evb.h new file +6
-0+"if run loaduimage; then " \ +"run mmcboot; " \ +"else run netboot; " \ +"fi; " \ +"fi; " \ +"else run netboot; fi" Do you think you could move all of that to distro boot
(config_distro_defaults.h)?
I've looked at the code there and I haven't seen yet how it binds with the rest of the code, I'll have to test the change. I can try and get back to you.
I suppose I should rebase on the latest code and target 2016.07, so I should repost in the next merge window, right? Because in that case I would like to discuss some other changes in the imximage tool that are needed for s32v234.
Eddy
PATCH v2 2/2 armv8: s32v234: Introduce basic support for s32v234evb
Quoted 121 lines · Eddy Petri?or
Pe 7 mai 2016 7:22 p.m., "Alexander Graf" <[email protected] <mailto:[email protected]>> a scris:
Quoted 3 lines
On Apr 28, 2016, at 12:07 AM, Eddy Petri?or <[email protected]
Quoted 2 lines · <mailto:[email protected]>> wrote:
Quoted 2 lines
From: Eddy Petri?or <[email protected]
<mailto:[email protected]>>
Quoted 21 lines
[?]
Quoted 18 lines
include/configs/s32v234evb.h new file +18
-0+#define CONFIG_CMD_ENV +#define CONFIG_EXTRA_ENV_SETTINGS \ + "script=boot.scr\0" \ + "uimage=uImage\0" \ + "ramdisk=rootfs.uimg\0"\ + "console=ttyLF0\0" \ + "fdt_high=0xffffffff\0" \ + "initrd_high=0xffffffff\0" \ + "fdt_file=s32v234-evb.dtb\0" \ + "fdt_addr=0xC2000000\0" \ + "kernel_addr=0xC307FFC0\0" \ + "ramdisk_addr=0xC4000000\0" \ + "boot_fdt=try\0" \ + "ip_dyn=yes\0" \ + "mmcdev=" __stringify(CONFIG_SYS_MMC_ENV_DEV) "\0" \ + "mmcpart=1\0" \ + "mmcroot=/dev/mmcblk0p2 rootwait rw\0" \ + "update_sd_firmware_filename=u-boot.imx\0" \Quoted 8 lines
include/configs/s32v234evb.h
Quoted 8 lines
include/configs/s32v234evb.h new file +8
-0+"update_sd_firmware=" \ +"if test ${ip_dyn} = yes; then " \ +"setenv get_cmd dhcp; " \ +"else " \ +"setenv get_cmd tftp; " \ +"fi; " \ +"if mmc dev ${mmcdev}; then " \ + "if ${get_cmd} ${update_sd_firmware_filename};then " \
Quoted 9 lines
include/configs/s32v234evb.h
Quoted 9 lines
include/configs/s32v234evb.h new file +9
-0+"setexpr fw_sz ${filesize} / 0x200; " \ +"setexpr fw_sz ${fw_sz} + 1; " \ +"mmc write ${loadaddr} 0x2 ${fw_sz}; " \ +"fi; " \ +"fi\0" \ +"mmcargs=setenv bootargs console=${console},${baudrate} " \ +"root=${mmcroot}\0" \ +"loadbootscript=" \ + "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr}${script};\0" \
Quoted 3 lines
include/configs/s32v234evb.h
Quoted 3 lines
include/configs/s32v234evb.h new file +3
-0+"bootscript=echo Running bootscript from mmc ...; " \ +"source\0" \ + "loaduimage=fatload mmc ${mmcdev}:${mmcpart} ${kernel_addr}${uimage}\0" \
Quoted 1 line
Quoted 1 line
+ "loadramdisk=fatload mmc ${mmcdev}:${mmcpart} ${ramdisk_addr}
${ramdisk}\0" \
Quoted 1 line
Quoted 1 line
+ "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr}
${fdt_file}\0" \
Quoted 3 lines
include/configs/s32v234evb.h
Quoted 3 lines
include/configs/s32v234evb.h new file +3
-0+"jtagboot=echo Booting using jtag...; " \ +"bootm ${kernel_addr} ${ramdisk_addr} ${fdt_addr}\0" \ + "jtagsdboot=echo Booting loading Linux with ramdisk fromSD...; " \
Quoted 5 lines
include/configs/s32v234evb.h
Quoted 5 lines
include/configs/s32v234evb.h new file +5
-0+"run loaduimage; run loadramdisk; run loadfdt;" \ +"bootm ${kernel_addr} ${ramdisk_addr} ${fdt_addr}\0" \ +"mmcboot=echo Booting from mmc ...; " \ +"run mmcargs; " \ + "if test ${boot_fdt} = yes || test ${boot_fdt} = try;then " \
Quoted 7 lines
include/configs/s32v234evb.h
Quoted 7 lines
include/configs/s32v234evb.h new file +7
-0+"if run loadfdt; then " \ +"bootm ${loadaddr} - ${fdt_addr}; " \ +"else " \ +"if test ${boot_fdt} = try; then " \ +"bootm; " \ +"else " \ + "echo WARN: Cannot load theDT; " \
Quoted 9 lines
Quoted 9 lines
include/configs/s32v234evb.h new file +9
-0+"fi; " \ +"fi; " \ +"else " \ +"bootm; " \ +"fi;\0" \ +"netargs=setenv bootargs console=${console},${baudrate} " \ +"root=/dev/nfs " \ +"ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \ +"netboot=echo Booting from net ...; " \Quoted 8 lines
include/configs/s32v234evb.h
Quoted 8 lines
include/configs/s32v234evb.h new file +8
-0+"run netargs; " \ +"if test ${ip_dyn} = yes; then " \ +"setenv get_cmd dhcp; " \ +"else " \ +"setenv get_cmd tftp; " \ +"fi; " \ +"${get_cmd} ${uimage}; " \ + "if test ${boot_fdt} = yes || test ${boot_fdt} = try;then " \
Quoted 7 lines
include/configs/s32v234evb.h
Quoted 7 lines
include/configs/s32v234evb.h new file +7
-0+"if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \ +"bootm ${loadaddr} - ${fdt_addr}; " \ +"else " \ +"if test ${boot_fdt} = try; then " \ +"bootm; " \ +"else " \ + "echo WARN: Cannot load theDT; " \
Quoted 11 lines
Quoted 11 lines
include/configs/s32v234evb.h new file +11
-0+"fi; " \ +"fi; " \ +"else " \ +"bootm; " \ +"fi;\0" + +#define CONFIG_BOOTCOMMAND \ +"mmc dev ${mmcdev}; if mmc rescan; then " \ +"if run loadbootscript; then " \ +"run bootscript; " \ +"else " \Quoted 8 lines
include/configs/s32v234evb.h line 234
Quoted 6 lines
include/configs/s32v234evb.h new file +6
-0+"if run loaduimage; then " \ +"run mmcboot; " \ +"else run netboot; " \ +"fi; " \ +"fi; " \ +"else run netboot; fi" Do you think you could move all of that to distro boot
Quoted 5 lines
(
config_distro_defaults.h)?I've looked at the code there and I haven't seen yet how it binds with the rest of the code, I'll have to test the change. I can try and get back to you.
I don't see anything particular in your boot command that wouldn't get covered by the existing distro targets, so I guess it's just a matter of defining the right boot targets and including the header.
Please check out doc/README.distro for more details.
Quoted 5 lines
I suppose I should rebase on the latest code and target 2016.07, so I should repost in the next merge window, right? Because in that case I would like to discuss some other changes in the imximage tool that are needed for s32v234.
I don't think you need to wait for the merge window. The merge window only says when patches get picked up into the tree, but you can post and have patches reviewed at any time.
Alex
v3 cover Initial support for S32V234 - version 3
In reply to Eddy PetrișorHello,
Here are the reworked patches (3rd version) for the initial s32v234evb support.
Eddy Petri?or (1):
armv8: s32v234: Introduce basic support for s32v234evb
Stoica Cosmin-Stefan (1):
serial: Introduce linflex uart support
arch/arm/Kconfig | 5 + arch/arm/cpu/armv8/Makefile | 1 + arch/arm/cpu/armv8/s32v234/Makefile | 8 + arch/arm/cpu/armv8/s32v234/cpu.c | 97 +++++++ arch/arm/cpu/armv8/s32v234/cpu.h | 8 + arch/arm/cpu/armv8/s32v234/generic.c | 350 ++++++++++++++++++++++++ arch/arm/include/asm/arch-s32v234/clock.h | 34 +++ arch/arm/include/asm/arch-s32v234/ddr.h | 157 +++++++++++ arch/arm/include/asm/arch-s32v234/imx-regs.h | 329 ++++++++++++++++++++++ arch/arm/include/asm/arch-s32v234/lpddr2.h | 75 +++++ arch/arm/include/asm/arch-s32v234/mc_cgm_regs.h | 254 +++++++++++++++++ arch/arm/include/asm/arch-s32v234/mc_me_regs.h | 199 ++++++++++++++ arch/arm/include/asm/arch-s32v234/mc_rgm_regs.h | 31 +++ arch/arm/include/asm/arch-s32v234/mmdc.h | 89 ++++++ arch/arm/include/asm/arch-s32v234/siul.h | 150 ++++++++++ board/freescale/s32v234evb/Kconfig | 23 ++ board/freescale/s32v234evb/MAINTAINERS | 8 + board/freescale/s32v234evb/Makefile | 11 + board/freescale/s32v234evb/clock.c | 344 +++++++++++++++++++++++ board/freescale/s32v234evb/lpddr2.c | 137 ++++++++++ board/freescale/s32v234evb/s32v234evb.c | 183 +++++++++++++ board/freescale/s32v234evb/s32v234evb.cfg | 29 ++ configs/s32v234evb_defconfig | 6 + drivers/mmc/fsl_esdhc.c | 10 +- drivers/serial/Makefile | 1 + drivers/serial/serial_linflexuart.c | 221 +++++++++++++++ include/configs/s32v234evb.h | 260 ++++++++++++++++++ 27 files changed, 3015 insertions(+), 5 deletions(-) create mode 100644 arch/arm/cpu/armv8/s32v234/Makefile create mode 100644 arch/arm/cpu/armv8/s32v234/cpu.c create mode 100644 arch/arm/cpu/armv8/s32v234/cpu.h create mode 100644 arch/arm/cpu/armv8/s32v234/generic.c create mode 100644 arch/arm/include/asm/arch-s32v234/clock.h create mode 100644 arch/arm/include/asm/arch-s32v234/ddr.h create mode 100644 arch/arm/include/asm/arch-s32v234/imx-regs.h create mode 100644 arch/arm/include/asm/arch-s32v234/lpddr2.h create mode 100644 arch/arm/include/asm/arch-s32v234/mc_cgm_regs.h create mode 100644 arch/arm/include/asm/arch-s32v234/mc_me_regs.h create mode 100644 arch/arm/include/asm/arch-s32v234/mc_rgm_regs.h create mode 100644 arch/arm/include/asm/arch-s32v234/mmdc.h create mode 100644 arch/arm/include/asm/arch-s32v234/siul.h create mode 100644 board/freescale/s32v234evb/Kconfig create mode 100644 board/freescale/s32v234evb/MAINTAINERS create mode 100644 board/freescale/s32v234evb/Makefile create mode 100644 board/freescale/s32v234evb/clock.c create mode 100644 board/freescale/s32v234evb/lpddr2.c create mode 100644 board/freescale/s32v234evb/s32v234evb.c create mode 100644 board/freescale/s32v234evb/s32v234evb.cfg create mode 100644 configs/s32v234evb_defconfig create mode 100644 drivers/serial/serial_linflexuart.c create mode 100644 include/configs/s32v234evb.h
Signature · 1 line
2.5.0
PATCH v3 1/2 serial: Introduce linflex uart support
From: Stoica Cosmin-Stefan <[email protected]>
The Linflex module is integrated on some NXP automotive SoCs part of the former Freescale portfolio, like S32V234, an SoC for Advanced Driver Assistance Systems.
---
Notes:
Changes in v2:
Added support for device model. Compatibility with non-DM code is kept for easier synchronization with the code on the vendor branch where the conversion to DM is not done for all boards.
Changes in v3:
Removed non-DM compatibility, as requested.
drivers/serial/Makefile | 1 + drivers/serial/serial_linflexuart.c | 221 ++++++++++++++++++++++++++++++++++++ 2 files changed, 222 insertions(+) create mode 100644 drivers/serial/serial_linflexuart.c
drivers/serial/Makefile +1 -0
@@ -34,6 +34,7 @@ obj-$(CONFIG_SCIF_CONSOLE) += serial_sh.o obj-$(CONFIG_ZYNQ_SERIAL) += serial_zynq.o obj-$(CONFIG_BFIN_SERIAL) += serial_bfin.o obj-$(CONFIG_FSL_LPUART) += serial_lpuart.o +obj-$(CONFIG_FSL_LINFLEXUART) += serial_linflexuart.o obj-$(CONFIG_ARC_SERIAL) += serial_arc.o obj-$(CONFIG_UNIPHIER_SERIAL) += serial_uniphier.o obj-$(CONFIG_STM32_SERIAL) += serial_stm32.o
drivers/serial/serial_linflexuart.c new file +221 -0
221 lines not on this page · raw message
Signature · 1 line
2.5.0
PATCH v3 2/2 armv8: s32v234: Introduce basic support for s32v234evb
In reply to Eddy PetrișorAdd initial support for NXP's S32V234 SoC and S32V234EVB board.
The S32V230 family is designed to support computation-intensive applications for image processing. The S32V234, as part of the S32V230 family, is a high-performance automotive processor designed to support safe computation-intensive applications in the area of vision and sensor fusion.
Code originally writen by:
---
Notes:
Changes in v2:
- Added support for device model. Compatibility with non-DM code is kept for easier synchronization with the code on the vendor branch where the conversion to DM is not done for all boards.
- remove TODO-s
- remove '#if 0'-ed code
- switched to SPDX headers
- removed uselss guard around 'DECLARE_GLOBAL_DATA_PTR;'
- replaced 'CONFIG_SYS_FSL' with 'S32V234' in defines for MMU bases and sizes
- reset_cpu now says it's not implemented
- moved OF_LIBFDT and BOOTZ config options to Kconfig
Changes in v3:
- Switch s32v234evb to config_distro_defaults.h and config_distro_bootcmd.h
arch/arm/Kconfig | 5 + arch/arm/cpu/armv8/Makefile | 1 + arch/arm/cpu/armv8/s32v234/Makefile | 8 + arch/arm/cpu/armv8/s32v234/cpu.c | 97 +++++++ arch/arm/cpu/armv8/s32v234/cpu.h | 8 + arch/arm/cpu/armv8/s32v234/generic.c | 350 ++++++++++++++++++++++++ arch/arm/include/asm/arch-s32v234/clock.h | 34 +++ arch/arm/include/asm/arch-s32v234/ddr.h | 157 +++++++++++ arch/arm/include/asm/arch-s32v234/imx-regs.h | 329 ++++++++++++++++++++++ arch/arm/include/asm/arch-s32v234/lpddr2.h | 75 +++++ arch/arm/include/asm/arch-s32v234/mc_cgm_regs.h | 254 +++++++++++++++++ arch/arm/include/asm/arch-s32v234/mc_me_regs.h | 199 ++++++++++++++ arch/arm/include/asm/arch-s32v234/mc_rgm_regs.h | 31 +++ arch/arm/include/asm/arch-s32v234/mmdc.h | 89 ++++++ arch/arm/include/asm/arch-s32v234/siul.h | 150 ++++++++++ board/freescale/s32v234evb/Kconfig | 23 ++ board/freescale/s32v234evb/MAINTAINERS | 8 + board/freescale/s32v234evb/Makefile | 11 + board/freescale/s32v234evb/clock.c | 344 +++++++++++++++++++++++ board/freescale/s32v234evb/lpddr2.c | 137 ++++++++++ board/freescale/s32v234evb/s32v234evb.c | 183 +++++++++++++ board/freescale/s32v234evb/s32v234evb.cfg | 29 ++ configs/s32v234evb_defconfig | 6 + drivers/mmc/fsl_esdhc.c | 10 +- include/configs/s32v234evb.h | 260 ++++++++++++++++++ 25 files changed, 2793 insertions(+), 5 deletions(-) create mode 100644 arch/arm/cpu/armv8/s32v234/Makefile create mode 100644 arch/arm/cpu/armv8/s32v234/cpu.c create mode 100644 arch/arm/cpu/armv8/s32v234/cpu.h create mode 100644 arch/arm/cpu/armv8/s32v234/generic.c create mode 100644 arch/arm/include/asm/arch-s32v234/clock.h create mode 100644 arch/arm/include/asm/arch-s32v234/ddr.h create mode 100644 arch/arm/include/asm/arch-s32v234/imx-regs.h create mode 100644 arch/arm/include/asm/arch-s32v234/lpddr2.h create mode 100644 arch/arm/include/asm/arch-s32v234/mc_cgm_regs.h create mode 100644 arch/arm/include/asm/arch-s32v234/mc_me_regs.h create mode 100644 arch/arm/include/asm/arch-s32v234/mc_rgm_regs.h create mode 100644 arch/arm/include/asm/arch-s32v234/mmdc.h create mode 100644 arch/arm/include/asm/arch-s32v234/siul.h create mode 100644 board/freescale/s32v234evb/Kconfig create mode 100644 board/freescale/s32v234evb/MAINTAINERS create mode 100644 board/freescale/s32v234evb/Makefile create mode 100644 board/freescale/s32v234evb/clock.c create mode 100644 board/freescale/s32v234evb/lpddr2.c create mode 100644 board/freescale/s32v234evb/s32v234evb.c create mode 100644 board/freescale/s32v234evb/s32v234evb.cfg create mode 100644 configs/s32v234evb_defconfig create mode 100644 include/configs/s32v234evb.h
arch/arm/Kconfig +5 -0
@@ -511,6 +511,10 @@ config RMOBILE bool "Renesas ARM SoCs" select CPU_V7 +config TARGET_S32V234EVB + bool "Support s32v234evb" + select ARM64 + config ARCH_SNAPDRAGON bool "Qualcomm Snapdragon SoCs" select ARM64
@@ -853,6 +857,7 @@ source "board/freescale/mx53ard/Kconfig" source "board/freescale/mx53evk/Kconfig" source "board/freescale/mx53loco/Kconfig" source "board/freescale/mx53smd/Kconfig" +source "board/freescale/s32v234evb/Kconfig" source "board/freescale/vf610twr/Kconfig" source "board/gumstix/pepper/Kconfig" source "board/h2200/Kconfig"
arch/arm/cpu/armv8/Makefile +1 -0
@@ -17,5 +17,6 @@ obj-y += transition.o obj-y += fwcall.o obj-$(CONFIG_FSL_LAYERSCAPE) += fsl-layerscape/ +obj-$(CONFIG_S32V234) += s32v234/ obj-$(CONFIG_ARCH_ZYNQMP) += zynqmp/ obj-$(CONFIG_TARGET_HIKEY) += hisilicon/
arch/arm/cpu/armv8/s32v234/Makefile new file +8 -0
@@ -0,0 +1,8 @@ +# +# (C) Copyright 2013-2016, Freescale Semiconductor, Inc. +# +# SPDX-License-Identifier: GPL-2.0+ +# + +obj-y += generic.o +obj-y += cpu.o
arch/arm/cpu/armv8/s32v234/cpu.c new file +97 -0
97 lines not on this page · raw message
arch/arm/cpu/armv8/s32v234/cpu.h new file +8 -0
@@ -0,0 +1,8 @@ +/* +* (C) Copyright 2014-2016, Freescale Semiconductor, Inc. +* +* SPDX-License-Identifier: GPL-2.0+ +*/ + +u32 cpu_mask (void ); +int cpu_numcores (void );
arch/arm/cpu/armv8/s32v234/generic.c new file +350 -0
350 lines not on this page · raw message
arch/arm/include/asm/arch-s32v234/clock.h new file +34 -0
@@ -0,0 +1,34 @@ +/* +* (C) Copyright 2015-2016, Freescale Semiconductor, Inc. +* +* SPDX-License-Identifier: GPL-2.0+ +*/ + +#ifndef __ASM_ARCH_CLOCK_H +#define __ASM_ARCH_CLOCK_H + +#include <common.h> + +enum mxc_clock { +MXC_ARM_CLK =0 , +MXC_BUS_CLK , +MXC_PERIPHERALS_CLK , +MXC_UART_CLK , +MXC_USDHC_CLK , +MXC_FEC_CLK , +MXC_I2C_CLK , +}; +enum pll_type { +ARM_PLL =0 , +PERIPH_PLL , +ENET_PLL , +DDR_PLL , +VIDEO_PLL , +}; + +unsigned int mxc_get_clock (enum mxc_clock clk); +void clock_init (void ); + +#define imx_get_fecclk () mxc_get_clock(MXC_FEC_CLK) + +#endif /* __ASM_ARCH_CLOCK_H */
arch/arm/include/asm/arch-s32v234/ddr.h new file +157 -0
157 lines not on this page · raw message
arch/arm/include/asm/arch-s32v234/imx-regs.h new file +329 -0
329 lines not on this page · raw message
arch/arm/include/asm/arch-s32v234/lpddr2.h new file +75 -0
75 lines not on this page · raw message
arch/arm/include/asm/arch-s32v234/mc_cgm_regs.h new file +254 -0
254 lines not on this page · raw message
arch/arm/include/asm/arch-s32v234/mc_me_regs.h new file +199 -0
199 lines not on this page · raw message
arch/arm/include/asm/arch-s32v234/mc_rgm_regs.h new file +31 -0
@@ -0,0 +1,31 @@ +/* +* (C) Copyright 2015, Freescale Semiconductor, Inc. +* +* SPDX-License-Identifier: GPL-2.0+ +*/ + +#ifndef __ARCH_ARM_MACH_S32V234_MCRGM_REGS_H__ +#define __ARCH_ARM_MACH_S32V234_MCRGM_REGS_H__ + +#define MC_RGM_DES (MC_RGM_BASE_ADDR) +#define MC_RGM_FES (MC_RGM_BASE_ADDR + 0x300) +#define MC_RGM_FERD (MC_RGM_BASE_ADDR + 0x310) +#define MC_RGM_FBRE (MC_RGM_BASE_ADDR + 0x330) +#define MC_RGM_FESS (MC_RGM_BASE_ADDR + 0x340) +#define MC_RGM_DDR_HE (MC_RGM_BASE_ADDR + 0x350) +#define MC_RGM_DDR_HS (MC_RGM_BASE_ADDR + 0x354) +#define MC_RGM_FRHE (MC_RGM_BASE_ADDR + 0x358) +#define MC_RGM_FREC (MC_RGM_BASE_ADDR + 0x600) +#define MC_RGM_FRET (MC_RGM_BASE_ADDR + 0x607) +#define MC_RGM_DRET (MC_RGM_BASE_ADDR + 0x60B) + +/* function reset sources mask */ +#define F_SWT4 0x8000 +#define F_JTAG 0x400 +#define F_FCCU_SOFT 0x40 +#define F_FCCU_HARD 0x20 +#define F_SOFT_FUNC 0x8 +#define F_ST_DONE 0x4 +#define F_EXT_RST 0x1 + +#endif /* __ARCH_ARM_MACH_S32V234_MCRGM_REGS_H__ */
arch/arm/include/asm/arch-s32v234/mmdc.h new file +89 -0
89 lines not on this page · raw message
arch/arm/include/asm/arch-s32v234/siul.h new file +150 -0
150 lines not on this page · raw message
board/freescale/s32v234evb/Kconfig new file +23 -0
@@ -0,0 +1,23 @@ +if TARGET_S32V234EVB + +config SYS_CPU + string + default "armv8" + +config SYS_BOARD + string + default "s32v234evb" + +config SYS_VENDOR + string + default "freescale" + +config SYS_SOC + string + default "s32v234" + +config SYS_CONFIG_NAME + string + default "s32v234evb" + +endif
board/freescale/s32v234evb/MAINTAINERS new file +8 -0
@@ -0,0 +1,8 @@ +S32V234 Evaluation BOARD +M: Eddy Petri?or <[email protected]> +S: Maintained +F: arch/arm/cpu/armv8/s32v234/ +F: arch/arm/include/asm/arch-s32v234/ +F: board/freescale/s32v234evb/ +F: include/configs/s32v234evb.h +F: configs/s32v234evb_defconfig
board/freescale/s32v234evb/Makefile new file +11 -0
@@ -0,0 +1,11 @@ +# +# (C) Copyright 2013-2015, Freescale Semiconductor, Inc. +# +# SPDX-License-Identifier: GPL-2.0+ +# + +obj-y := clock.o +obj-y += lpddr2.o +obj-y += s32v234evb.o + +#########################################################################
board/freescale/s32v234evb/clock.c new file +344 -0
344 lines not on this page · raw message
board/freescale/s32v234evb/lpddr2.c new file +137 -0
137 lines not on this page · raw message
board/freescale/s32v234evb/s32v234evb.c new file +183 -0
183 lines not on this page · raw message
board/freescale/s32v234evb/s32v234evb.cfg new file +29 -0
@@ -0,0 +1,29 @@ +/* + * (C) Copyright 2013-2015, Freescale Semiconductor, Inc. + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +/* + * Refer docs/README.imxmage for more details about how-to configure + * and create imximage boot image + * + * The syntax is taken as close as possible with the kwbimage + */ +#include <asm/imx-common/imximage.cfg> + +/* image version */ +IMAGE_VERSION 2 +BOOT_FROM sd + + +/* + * Boot Device : one of qspi, sd: + * qspi: flash_offset: 0x1000 + * sd/mmc: flash_offset: 0x1000 + */ + + +#ifdef CONFIG_SECURE_BOOT +SECURE_BOOT +#endif
configs/s32v234evb_defconfig new file +6 -0
@@ -0,0 +1,6 @@ +CONFIG_ARM=y +CONFIG_TARGET_S32V234EVB=y +CONFIG_SYS_MALLOC_F=y +CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/s32v234evb/s32v234evb.cfg" +CONFIG_CMD_BOOTZ=y +CONFIG_OF_LIBFDT=y
drivers/mmc/fsl_esdhc.c +5 -5
@@ -208,7 +208,7 @@ static int esdhc_setup_data(struct mmc *mmc, struct mmc_data *data)int timeout;struct fsl_esdhc_priv *priv = mmc->priv;struct fsl_esdhc *regs = priv->esdhc_regs; -#ifdef CONFIG_FSL_LAYERSCAPE +#if defined(CONFIG_FSL_LAYERSCAPE ) || defined(CONFIG_S32V234 )dma_addr_t addr;#endif uint wml_value;
@@ -221,7 +221,7 @@ static int esdhc_setup_data(struct mmc *mmc, struct mmc_data *data)esdhc_clrsetbits32 (®s->wml,WML_RD_WML_MASK , wml_value);#ifndef CONFIG_SYS_FSL_ESDHC_USE_PIO -#ifdef CONFIG_FSL_LAYERSCAPE +#if defined(CONFIG_FSL_LAYERSCAPE ) || defined(CONFIG_S32V234 ) addr =virt_to_phys ((void *)(data->dest));if (upper_32_bits (addr))printf ("Error found for upper 32 bits\n" );
@@ -247,7 +247,7 @@ static int esdhc_setup_data(struct mmc *mmc, struct mmc_data *data)esdhc_clrsetbits32 (®s->wml,WML_WR_WML_MASK , wml_value <<16 );#ifndef CONFIG_SYS_FSL_ESDHC_USE_PIO -#ifdef CONFIG_FSL_LAYERSCAPE +#if defined(CONFIG_FSL_LAYERSCAPE ) || defined(CONFIG_S32V234 ) addr =virt_to_phys ((void *)(data->src));if (upper_32_bits (addr))printf ("Error found for upper 32 bits\n" );
@@ -308,7 +308,7 @@ static int esdhc_setup_data(struct mmc *mmc, struct mmc_data *data)static void check_and_invalidate_dcache_range (struct mmc_cmd *cmd,struct mmc_data *data) { -#ifdef CONFIG_FSL_LAYERSCAPE +#if defined(CONFIG_FSL_LAYERSCAPE ) || defined(CONFIG_S32V234 )unsigned start =0 ;#else unsigned start = (unsigned )data->dest ;
@@ -316,7 +316,7 @@ static void check_and_invalidate_dcache_rangeunsigned size =roundup (ARCH_DMA_MINALIGN , data->blocks*data->blocksize);unsigned end = start+size ; -#ifdef CONFIG_FSL_LAYERSCAPE +#if defined(CONFIG_FSL_LAYERSCAPE ) || defined(CONFIG_S32V234 )dma_addr_t addr; addr =virt_to_phys ((void *)(data->dest));
include/configs/s32v234evb.h new file +260 -0
260 lines not on this page · raw message
Signature · 1 line
2.5.0
PATCH v3 2/2 armv8: s32v234: Introduce basic support for s32v234evb
Quoted 28 lines · Eddy Petri?or
Add initial support for NXP's S32V234 SoC and S32V234EVB board.
The S32V230 family is designed to support computation-intensive applications for image processing. The S32V234, as part of the S32V230 family, is a high-performance automotive processor designed to support safe computation-intensive applications in the area of vision and sensor fusion.
Code originally writen by:
Original-signed-off-by Stoica Cosmin-Stefan <[email protected]>Original-signed-off-by Mihaela Martinas <[email protected]>Original-signed-off-by Eddy Petri?or <[email protected]>Signed-off-by Eddy Petri?or <[email protected]>---
Notes:
Changes in v2:
- Added support for device model. Compatibility with non-DM code is kept for easier synchronization with the code on the vendor branch where the conversion to DM is not done for all boards.
- remove TODO-s
- remove '#if 0'-ed code
- switched to SPDX headers
- removed uselss guard around 'DECLARE_GLOBAL_DATA_PTR;'
- replaced 'CONFIG_SYS_FSL' with 'S32V234' in defines for MMU bases and sizes
-reset_cpunow says it's not implemented
- movedOF_LIBFDTand BOOTZ config options toKconfig
Quoted 2 lines
Changes in v3:
- Switch s32v234evb toconfig_distro_defaults.handconfig_distro_bootcmd.h
Awesome, thanks a lot :).
Alex
v4 cover Initial support for s32v234
In reply to Eddy PetrișorChanges in v4:
Corrected a typo in the linflex driver: _debUG_uart_init -> _debug_uart_init
Eddy Petri?or (1):
armv8: s32v234: Introduce basic support for s32v234evb
Stoica Cosmin-Stefan (1):
serial: Introduce linflex uart support
arch/arm/Kconfig | 5 + arch/arm/cpu/armv8/Makefile | 1 + arch/arm/cpu/armv8/s32v234/Makefile | 8 + arch/arm/cpu/armv8/s32v234/cpu.c | 97 +++++++ arch/arm/cpu/armv8/s32v234/cpu.h | 8 + arch/arm/cpu/armv8/s32v234/generic.c | 350 ++++++++++++++++++++++++ arch/arm/include/asm/arch-s32v234/clock.h | 34 +++ arch/arm/include/asm/arch-s32v234/ddr.h | 157 +++++++++++ arch/arm/include/asm/arch-s32v234/imx-regs.h | 329 ++++++++++++++++++++++ arch/arm/include/asm/arch-s32v234/lpddr2.h | 75 +++++ arch/arm/include/asm/arch-s32v234/mc_cgm_regs.h | 254 +++++++++++++++++ arch/arm/include/asm/arch-s32v234/mc_me_regs.h | 199 ++++++++++++++ arch/arm/include/asm/arch-s32v234/mc_rgm_regs.h | 31 +++ arch/arm/include/asm/arch-s32v234/mmdc.h | 89 ++++++ arch/arm/include/asm/arch-s32v234/siul.h | 150 ++++++++++ board/freescale/s32v234evb/Kconfig | 23 ++ board/freescale/s32v234evb/MAINTAINERS | 8 + board/freescale/s32v234evb/Makefile | 11 + board/freescale/s32v234evb/clock.c | 344 +++++++++++++++++++++++ board/freescale/s32v234evb/lpddr2.c | 137 ++++++++++ board/freescale/s32v234evb/s32v234evb.c | 183 +++++++++++++ board/freescale/s32v234evb/s32v234evb.cfg | 29 ++ configs/s32v234evb_defconfig | 6 + drivers/mmc/fsl_esdhc.c | 10 +- drivers/serial/Makefile | 1 + drivers/serial/serial_linflexuart.c | 221 +++++++++++++++ include/configs/s32v234evb.h | 260 ++++++++++++++++++ 27 files changed, 3015 insertions(+), 5 deletions(-) create mode 100644 arch/arm/cpu/armv8/s32v234/Makefile create mode 100644 arch/arm/cpu/armv8/s32v234/cpu.c create mode 100644 arch/arm/cpu/armv8/s32v234/cpu.h create mode 100644 arch/arm/cpu/armv8/s32v234/generic.c create mode 100644 arch/arm/include/asm/arch-s32v234/clock.h create mode 100644 arch/arm/include/asm/arch-s32v234/ddr.h create mode 100644 arch/arm/include/asm/arch-s32v234/imx-regs.h create mode 100644 arch/arm/include/asm/arch-s32v234/lpddr2.h create mode 100644 arch/arm/include/asm/arch-s32v234/mc_cgm_regs.h create mode 100644 arch/arm/include/asm/arch-s32v234/mc_me_regs.h create mode 100644 arch/arm/include/asm/arch-s32v234/mc_rgm_regs.h create mode 100644 arch/arm/include/asm/arch-s32v234/mmdc.h create mode 100644 arch/arm/include/asm/arch-s32v234/siul.h create mode 100644 board/freescale/s32v234evb/Kconfig create mode 100644 board/freescale/s32v234evb/MAINTAINERS create mode 100644 board/freescale/s32v234evb/Makefile create mode 100644 board/freescale/s32v234evb/clock.c create mode 100644 board/freescale/s32v234evb/lpddr2.c create mode 100644 board/freescale/s32v234evb/s32v234evb.c create mode 100644 board/freescale/s32v234evb/s32v234evb.cfg create mode 100644 configs/s32v234evb_defconfig create mode 100644 drivers/serial/serial_linflexuart.c create mode 100644 include/configs/s32v234evb.h
Signature · 1 line
2.5.0
PATCH v4 1/2 serial: Introduce linflex uart support
From: Stoica Cosmin-Stefan <[email protected]>
The Linflex module is integrated on some NXP automotive SoCs part of the former Freescale portfolio, like S32V234, an SoC for Advanced Driver Assistance Systems.
---
Notes:
Changes in v2:
Added support for device model. Compatibility with non-DM code is kept for easier synchronization with the code on the vendor branch where the conversion to DM is not done for all boards.
Changes in v3:
Removed non-DM compatibility, as requested.
Changes in v4:
Corrected typo: s/_debUG_uart_init/_debug_uart_init/
drivers/serial/Makefile | 1 + drivers/serial/serial_linflexuart.c | 221 ++++++++++++++++++++++++++++++++++++ 2 files changed, 222 insertions(+) create mode 100644 drivers/serial/serial_linflexuart.c
drivers/serial/Makefile +1 -0
@@ -34,6 +34,7 @@ obj-$(CONFIG_SCIF_CONSOLE) += serial_sh.o obj-$(CONFIG_ZYNQ_SERIAL) += serial_zynq.o obj-$(CONFIG_BFIN_SERIAL) += serial_bfin.o obj-$(CONFIG_FSL_LPUART) += serial_lpuart.o +obj-$(CONFIG_FSL_LINFLEXUART) += serial_linflexuart.o obj-$(CONFIG_ARC_SERIAL) += serial_arc.o obj-$(CONFIG_UNIPHIER_SERIAL) += serial_uniphier.o obj-$(CONFIG_STM32_SERIAL) += serial_stm32.o
drivers/serial/serial_linflexuart.c new file +221 -0
221 lines not on this page · raw message
Signature · 1 line
2.5.0
PATCH v4 2/2 armv8: s32v234: Introduce basic support for s32v234evb
In reply to Eddy PetrișorAdd initial support for NXP's S32V234 SoC and S32V234EVB board.
The S32V230 family is designed to support computation-intensive applications for image processing. The S32V234, as part of the S32V230 family, is a high-performance automotive processor designed to support safe computation-intensive applications in the area of vision and sensor fusion.
Code originally writen by:
---
Notes:
Changes in v2:
- Added support for device model. Compatibility with non-DM code is kept for easier synchronization with the code on the vendor branch where the conversion to DM is not done for all boards.
- remove TODO-s
- remove '#if 0'-ed code
- switched to SPDX headers
- removed uselss guard around 'DECLARE_GLOBAL_DATA_PTR;'
- replaced 'CONFIG_SYS_FSL' with 'S32V234' in defines for MMU bases and sizes
- reset_cpu now says it's not implemented
- moved OF_LIBFDT and BOOTZ config options to Kconfig
Changes in v3:
- Switch s32v234evb to config_distro_defaults.h and config_distro_bootcmd.h
Changes in v4:
- None
arch/arm/Kconfig | 5 + arch/arm/cpu/armv8/Makefile | 1 + arch/arm/cpu/armv8/s32v234/Makefile | 8 + arch/arm/cpu/armv8/s32v234/cpu.c | 97 +++++++ arch/arm/cpu/armv8/s32v234/cpu.h | 8 + arch/arm/cpu/armv8/s32v234/generic.c | 350 ++++++++++++++++++++++++ arch/arm/include/asm/arch-s32v234/clock.h | 34 +++ arch/arm/include/asm/arch-s32v234/ddr.h | 157 +++++++++++ arch/arm/include/asm/arch-s32v234/imx-regs.h | 329 ++++++++++++++++++++++ arch/arm/include/asm/arch-s32v234/lpddr2.h | 75 +++++ arch/arm/include/asm/arch-s32v234/mc_cgm_regs.h | 254 +++++++++++++++++ arch/arm/include/asm/arch-s32v234/mc_me_regs.h | 199 ++++++++++++++ arch/arm/include/asm/arch-s32v234/mc_rgm_regs.h | 31 +++ arch/arm/include/asm/arch-s32v234/mmdc.h | 89 ++++++ arch/arm/include/asm/arch-s32v234/siul.h | 150 ++++++++++ board/freescale/s32v234evb/Kconfig | 23 ++ board/freescale/s32v234evb/MAINTAINERS | 8 + board/freescale/s32v234evb/Makefile | 11 + board/freescale/s32v234evb/clock.c | 344 +++++++++++++++++++++++ board/freescale/s32v234evb/lpddr2.c | 137 ++++++++++ board/freescale/s32v234evb/s32v234evb.c | 183 +++++++++++++ board/freescale/s32v234evb/s32v234evb.cfg | 29 ++ configs/s32v234evb_defconfig | 6 + drivers/mmc/fsl_esdhc.c | 10 +- include/configs/s32v234evb.h | 260 ++++++++++++++++++ 25 files changed, 2793 insertions(+), 5 deletions(-) create mode 100644 arch/arm/cpu/armv8/s32v234/Makefile create mode 100644 arch/arm/cpu/armv8/s32v234/cpu.c create mode 100644 arch/arm/cpu/armv8/s32v234/cpu.h create mode 100644 arch/arm/cpu/armv8/s32v234/generic.c create mode 100644 arch/arm/include/asm/arch-s32v234/clock.h create mode 100644 arch/arm/include/asm/arch-s32v234/ddr.h create mode 100644 arch/arm/include/asm/arch-s32v234/imx-regs.h create mode 100644 arch/arm/include/asm/arch-s32v234/lpddr2.h create mode 100644 arch/arm/include/asm/arch-s32v234/mc_cgm_regs.h create mode 100644 arch/arm/include/asm/arch-s32v234/mc_me_regs.h create mode 100644 arch/arm/include/asm/arch-s32v234/mc_rgm_regs.h create mode 100644 arch/arm/include/asm/arch-s32v234/mmdc.h create mode 100644 arch/arm/include/asm/arch-s32v234/siul.h create mode 100644 board/freescale/s32v234evb/Kconfig create mode 100644 board/freescale/s32v234evb/MAINTAINERS create mode 100644 board/freescale/s32v234evb/Makefile create mode 100644 board/freescale/s32v234evb/clock.c create mode 100644 board/freescale/s32v234evb/lpddr2.c create mode 100644 board/freescale/s32v234evb/s32v234evb.c create mode 100644 board/freescale/s32v234evb/s32v234evb.cfg create mode 100644 configs/s32v234evb_defconfig create mode 100644 include/configs/s32v234evb.h
arch/arm/Kconfig +5 -0
@@ -511,6 +511,10 @@ config RMOBILE bool "Renesas ARM SoCs" select CPU_V7 +config TARGET_S32V234EVB + bool "Support s32v234evb" + select ARM64 + config ARCH_SNAPDRAGON bool "Qualcomm Snapdragon SoCs" select ARM64
@@ -853,6 +857,7 @@ source "board/freescale/mx53ard/Kconfig" source "board/freescale/mx53evk/Kconfig" source "board/freescale/mx53loco/Kconfig" source "board/freescale/mx53smd/Kconfig" +source "board/freescale/s32v234evb/Kconfig" source "board/freescale/vf610twr/Kconfig" source "board/gumstix/pepper/Kconfig" source "board/h2200/Kconfig"
arch/arm/cpu/armv8/Makefile +1 -0
@@ -17,5 +17,6 @@ obj-y += transition.o obj-y += fwcall.o obj-$(CONFIG_FSL_LAYERSCAPE) += fsl-layerscape/ +obj-$(CONFIG_S32V234) += s32v234/ obj-$(CONFIG_ARCH_ZYNQMP) += zynqmp/ obj-$(CONFIG_TARGET_HIKEY) += hisilicon/
arch/arm/cpu/armv8/s32v234/Makefile new file +8 -0
@@ -0,0 +1,8 @@ +# +# (C) Copyright 2013-2016, Freescale Semiconductor, Inc. +# +# SPDX-License-Identifier: GPL-2.0+ +# + +obj-y += generic.o +obj-y += cpu.o
arch/arm/cpu/armv8/s32v234/cpu.c new file +97 -0
97 lines not on this page · raw message
arch/arm/cpu/armv8/s32v234/cpu.h new file +8 -0
@@ -0,0 +1,8 @@ +/* +* (C) Copyright 2014-2016, Freescale Semiconductor, Inc. +* +* SPDX-License-Identifier: GPL-2.0+ +*/ + +u32 cpu_mask (void ); +int cpu_numcores (void );
arch/arm/cpu/armv8/s32v234/generic.c new file +350 -0
350 lines not on this page · raw message
arch/arm/include/asm/arch-s32v234/clock.h new file +34 -0
@@ -0,0 +1,34 @@ +/* +* (C) Copyright 2015-2016, Freescale Semiconductor, Inc. +* +* SPDX-License-Identifier: GPL-2.0+ +*/ + +#ifndef __ASM_ARCH_CLOCK_H +#define __ASM_ARCH_CLOCK_H + +#include <common.h> + +enum mxc_clock { +MXC_ARM_CLK =0 , +MXC_BUS_CLK , +MXC_PERIPHERALS_CLK , +MXC_UART_CLK , +MXC_USDHC_CLK , +MXC_FEC_CLK , +MXC_I2C_CLK , +}; +enum pll_type { +ARM_PLL =0 , +PERIPH_PLL , +ENET_PLL , +DDR_PLL , +VIDEO_PLL , +}; + +unsigned int mxc_get_clock (enum mxc_clock clk); +void clock_init (void ); + +#define imx_get_fecclk () mxc_get_clock(MXC_FEC_CLK) + +#endif /* __ASM_ARCH_CLOCK_H */
arch/arm/include/asm/arch-s32v234/ddr.h new file +157 -0
157 lines not on this page · raw message
arch/arm/include/asm/arch-s32v234/imx-regs.h new file +329 -0
329 lines not on this page · raw message
arch/arm/include/asm/arch-s32v234/lpddr2.h new file +75 -0
75 lines not on this page · raw message
arch/arm/include/asm/arch-s32v234/mc_cgm_regs.h new file +254 -0
254 lines not on this page · raw message
arch/arm/include/asm/arch-s32v234/mc_me_regs.h new file +199 -0
199 lines not on this page · raw message
arch/arm/include/asm/arch-s32v234/mc_rgm_regs.h new file +31 -0
@@ -0,0 +1,31 @@ +/* +* (C) Copyright 2015, Freescale Semiconductor, Inc. +* +* SPDX-License-Identifier: GPL-2.0+ +*/ + +#ifndef __ARCH_ARM_MACH_S32V234_MCRGM_REGS_H__ +#define __ARCH_ARM_MACH_S32V234_MCRGM_REGS_H__ + +#define MC_RGM_DES (MC_RGM_BASE_ADDR) +#define MC_RGM_FES (MC_RGM_BASE_ADDR + 0x300) +#define MC_RGM_FERD (MC_RGM_BASE_ADDR + 0x310) +#define MC_RGM_FBRE (MC_RGM_BASE_ADDR + 0x330) +#define MC_RGM_FESS (MC_RGM_BASE_ADDR + 0x340) +#define MC_RGM_DDR_HE (MC_RGM_BASE_ADDR + 0x350) +#define MC_RGM_DDR_HS (MC_RGM_BASE_ADDR + 0x354) +#define MC_RGM_FRHE (MC_RGM_BASE_ADDR + 0x358) +#define MC_RGM_FREC (MC_RGM_BASE_ADDR + 0x600) +#define MC_RGM_FRET (MC_RGM_BASE_ADDR + 0x607) +#define MC_RGM_DRET (MC_RGM_BASE_ADDR + 0x60B) + +/* function reset sources mask */ +#define F_SWT4 0x8000 +#define F_JTAG 0x400 +#define F_FCCU_SOFT 0x40 +#define F_FCCU_HARD 0x20 +#define F_SOFT_FUNC 0x8 +#define F_ST_DONE 0x4 +#define F_EXT_RST 0x1 + +#endif /* __ARCH_ARM_MACH_S32V234_MCRGM_REGS_H__ */
arch/arm/include/asm/arch-s32v234/mmdc.h new file +89 -0
89 lines not on this page · raw message
arch/arm/include/asm/arch-s32v234/siul.h new file +150 -0
150 lines not on this page · raw message
board/freescale/s32v234evb/Kconfig new file +23 -0
@@ -0,0 +1,23 @@ +if TARGET_S32V234EVB + +config SYS_CPU + string + default "armv8" + +config SYS_BOARD + string + default "s32v234evb" + +config SYS_VENDOR + string + default "freescale" + +config SYS_SOC + string + default "s32v234" + +config SYS_CONFIG_NAME + string + default "s32v234evb" + +endif
board/freescale/s32v234evb/MAINTAINERS new file +8 -0
@@ -0,0 +1,8 @@ +S32V234 Evaluation BOARD +M: Eddy Petri?or <[email protected]> +S: Maintained +F: arch/arm/cpu/armv8/s32v234/ +F: arch/arm/include/asm/arch-s32v234/ +F: board/freescale/s32v234evb/ +F: include/configs/s32v234evb.h +F: configs/s32v234evb_defconfig
board/freescale/s32v234evb/Makefile new file +11 -0
@@ -0,0 +1,11 @@ +# +# (C) Copyright 2013-2015, Freescale Semiconductor, Inc. +# +# SPDX-License-Identifier: GPL-2.0+ +# + +obj-y := clock.o +obj-y += lpddr2.o +obj-y += s32v234evb.o + +#########################################################################
board/freescale/s32v234evb/clock.c new file +344 -0
344 lines not on this page · raw message
board/freescale/s32v234evb/lpddr2.c new file +137 -0
137 lines not on this page · raw message
board/freescale/s32v234evb/s32v234evb.c new file +183 -0
183 lines not on this page · raw message
board/freescale/s32v234evb/s32v234evb.cfg new file +29 -0
@@ -0,0 +1,29 @@ +/* + * (C) Copyright 2013-2015, Freescale Semiconductor, Inc. + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +/* + * Refer docs/README.imxmage for more details about how-to configure + * and create imximage boot image + * + * The syntax is taken as close as possible with the kwbimage + */ +#include <asm/imx-common/imximage.cfg> + +/* image version */ +IMAGE_VERSION 2 +BOOT_FROM sd + + +/* + * Boot Device : one of qspi, sd: + * qspi: flash_offset: 0x1000 + * sd/mmc: flash_offset: 0x1000 + */ + + +#ifdef CONFIG_SECURE_BOOT +SECURE_BOOT +#endif
configs/s32v234evb_defconfig new file +6 -0
@@ -0,0 +1,6 @@ +CONFIG_ARM=y +CONFIG_TARGET_S32V234EVB=y +CONFIG_SYS_MALLOC_F=y +CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/s32v234evb/s32v234evb.cfg" +CONFIG_CMD_BOOTZ=y +CONFIG_OF_LIBFDT=y
drivers/mmc/fsl_esdhc.c +5 -5
@@ -208,7 +208,7 @@ static int esdhc_setup_data(struct mmc *mmc, struct mmc_data *data)int timeout;struct fsl_esdhc_priv *priv = mmc->priv;struct fsl_esdhc *regs = priv->esdhc_regs; -#ifdef CONFIG_FSL_LAYERSCAPE +#if defined(CONFIG_FSL_LAYERSCAPE ) || defined(CONFIG_S32V234 )dma_addr_t addr;#endif uint wml_value;
@@ -221,7 +221,7 @@ static int esdhc_setup_data(struct mmc *mmc, struct mmc_data *data)esdhc_clrsetbits32 (®s->wml,WML_RD_WML_MASK , wml_value);#ifndef CONFIG_SYS_FSL_ESDHC_USE_PIO -#ifdef CONFIG_FSL_LAYERSCAPE +#if defined(CONFIG_FSL_LAYERSCAPE ) || defined(CONFIG_S32V234 ) addr =virt_to_phys ((void *)(data->dest));if (upper_32_bits (addr))printf ("Error found for upper 32 bits\n" );
@@ -247,7 +247,7 @@ static int esdhc_setup_data(struct mmc *mmc, struct mmc_data *data)esdhc_clrsetbits32 (®s->wml,WML_WR_WML_MASK , wml_value <<16 );#ifndef CONFIG_SYS_FSL_ESDHC_USE_PIO -#ifdef CONFIG_FSL_LAYERSCAPE +#if defined(CONFIG_FSL_LAYERSCAPE ) || defined(CONFIG_S32V234 ) addr =virt_to_phys ((void *)(data->src));if (upper_32_bits (addr))printf ("Error found for upper 32 bits\n" );
@@ -308,7 +308,7 @@ static int esdhc_setup_data(struct mmc *mmc, struct mmc_data *data)static void check_and_invalidate_dcache_range (struct mmc_cmd *cmd,struct mmc_data *data) { -#ifdef CONFIG_FSL_LAYERSCAPE +#if defined(CONFIG_FSL_LAYERSCAPE ) || defined(CONFIG_S32V234 )unsigned start =0 ;#else unsigned start = (unsigned )data->dest ;
@@ -316,7 +316,7 @@ static void check_and_invalidate_dcache_rangeunsigned size =roundup (ARCH_DMA_MINALIGN , data->blocks*data->blocksize);unsigned end = start+size ; -#ifdef CONFIG_FSL_LAYERSCAPE +#if defined(CONFIG_FSL_LAYERSCAPE ) || defined(CONFIG_S32V234 )dma_addr_t addr; addr =virt_to_phys ((void *)(data->dest));
include/configs/s32v234evb.h new file +260 -0
260 lines not on this page · raw message
Signature · 1 line
2.5.0
v5 cover Initial support for s32v234
In reply to Eddy PetrișorFifth version of the s32v234evb initial support.
This version adds missing DEBUG_UART_FUNCS statement in linflex driver.
Eddy Petri?or (1):
armv8: s32v234: Introduce basic support for s32v234evb
Stoica Cosmin-Stefan (1):
serial: Introduce linflex uart support
arch/arm/Kconfig | 5 + arch/arm/cpu/armv8/Makefile | 1 + arch/arm/cpu/armv8/s32v234/Makefile | 8 + arch/arm/cpu/armv8/s32v234/cpu.c | 97 +++++++ arch/arm/cpu/armv8/s32v234/cpu.h | 8 + arch/arm/cpu/armv8/s32v234/generic.c | 350 ++++++++++++++++++++++++ arch/arm/include/asm/arch-s32v234/clock.h | 34 +++ arch/arm/include/asm/arch-s32v234/ddr.h | 157 +++++++++++ arch/arm/include/asm/arch-s32v234/imx-regs.h | 329 ++++++++++++++++++++++ arch/arm/include/asm/arch-s32v234/lpddr2.h | 75 +++++ arch/arm/include/asm/arch-s32v234/mc_cgm_regs.h | 254 +++++++++++++++++ arch/arm/include/asm/arch-s32v234/mc_me_regs.h | 199 ++++++++++++++ arch/arm/include/asm/arch-s32v234/mc_rgm_regs.h | 31 +++ arch/arm/include/asm/arch-s32v234/mmdc.h | 89 ++++++ arch/arm/include/asm/arch-s32v234/siul.h | 150 ++++++++++ board/freescale/s32v234evb/Kconfig | 23 ++ board/freescale/s32v234evb/MAINTAINERS | 8 + board/freescale/s32v234evb/Makefile | 11 + board/freescale/s32v234evb/clock.c | 344 +++++++++++++++++++++++ board/freescale/s32v234evb/lpddr2.c | 137 ++++++++++ board/freescale/s32v234evb/s32v234evb.c | 183 +++++++++++++ board/freescale/s32v234evb/s32v234evb.cfg | 29 ++ configs/s32v234evb_defconfig | 6 + drivers/mmc/fsl_esdhc.c | 10 +- drivers/serial/Makefile | 1 + drivers/serial/serial_linflexuart.c | 223 +++++++++++++++ include/configs/s32v234evb.h | 260 ++++++++++++++++++ 27 files changed, 3017 insertions(+), 5 deletions(-) create mode 100644 arch/arm/cpu/armv8/s32v234/Makefile create mode 100644 arch/arm/cpu/armv8/s32v234/cpu.c create mode 100644 arch/arm/cpu/armv8/s32v234/cpu.h create mode 100644 arch/arm/cpu/armv8/s32v234/generic.c create mode 100644 arch/arm/include/asm/arch-s32v234/clock.h create mode 100644 arch/arm/include/asm/arch-s32v234/ddr.h create mode 100644 arch/arm/include/asm/arch-s32v234/imx-regs.h create mode 100644 arch/arm/include/asm/arch-s32v234/lpddr2.h create mode 100644 arch/arm/include/asm/arch-s32v234/mc_cgm_regs.h create mode 100644 arch/arm/include/asm/arch-s32v234/mc_me_regs.h create mode 100644 arch/arm/include/asm/arch-s32v234/mc_rgm_regs.h create mode 100644 arch/arm/include/asm/arch-s32v234/mmdc.h create mode 100644 arch/arm/include/asm/arch-s32v234/siul.h create mode 100644 board/freescale/s32v234evb/Kconfig create mode 100644 board/freescale/s32v234evb/MAINTAINERS create mode 100644 board/freescale/s32v234evb/Makefile create mode 100644 board/freescale/s32v234evb/clock.c create mode 100644 board/freescale/s32v234evb/lpddr2.c create mode 100644 board/freescale/s32v234evb/s32v234evb.c create mode 100644 board/freescale/s32v234evb/s32v234evb.cfg create mode 100644 configs/s32v234evb_defconfig create mode 100644 drivers/serial/serial_linflexuart.c create mode 100644 include/configs/s32v234evb.h
Signature · 1 line
1.9.2.459.g68773ac
PATCH v5 1/2 serial: Introduce linflex uart support
From: Stoica Cosmin-Stefan <[email protected]>
The Linflex module is integrated on some NXP automotive SoCs part of the former Freescale portfolio, like S32V234, an SoC for Advanced Driver Assistance Systems.
---
Notes:
Changes in v2:
Added support for device model. Compatibility with non-DM code is kept for easier synchronization with the code on the vendor branch where the conversion to DM is not done for all boards.
Changes in v3:
Removed non-DM compatibility, as requested.
Changes in v4:
Corrected typo: s/_debUG_uart_init/_debug_uart_init/
Changes in v5:
Enable linflex uart as debug console
drivers/serial/Makefile | 1 + drivers/serial/serial_linflexuart.c | 223 ++++++++++++++++++++++++++++++++++++ 2 files changed, 224 insertions(+) create mode 100644 drivers/serial/serial_linflexuart.c
drivers/serial/Makefile +1 -0
@@ -35,6 +35,7 @@ obj-$(CONFIG_SCIF_CONSOLE) += serial_sh.o obj-$(CONFIG_ZYNQ_SERIAL) += serial_zynq.o obj-$(CONFIG_BFIN_SERIAL) += serial_bfin.o obj-$(CONFIG_FSL_LPUART) += serial_lpuart.o +obj-$(CONFIG_FSL_LINFLEXUART) += serial_linflexuart.o obj-$(CONFIG_ARC_SERIAL) += serial_arc.o obj-$(CONFIG_UNIPHIER_SERIAL) += serial_uniphier.o obj-$(CONFIG_STM32_SERIAL) += serial_stm32.o
drivers/serial/serial_linflexuart.c new file +223 -0
223 lines not on this page · raw message
Signature · 1 line
1.9.2.459.g68773ac
PATCH v5 2/2 armv8: s32v234: Introduce basic support for s32v234evb
In reply to Eddy PetrișorFrom: Eddy Petri?or <[email protected]>
Add initial support for NXP's S32V234 SoC and S32V234EVB board.
The S32V230 family is designed to support computation-intensive applications for image processing. The S32V234, as part of the S32V230 family, is a high-performance automotive processor designed to support safe computation-intensive applications in the area of vision and sensor fusion.
Code originally writen by:
---
Notes:
Changes in v2:
- Added support for device model. Compatibility with non-DM code is kept for easier synchronization with the code on the vendor branch where the conversion to DM is not done for all boards.
- remove TODO-s
- remove '#if 0'-ed code
- switched to SPDX headers
- removed uselss guard around 'DECLARE_GLOBAL_DATA_PTR;'
- replaced 'CONFIG_SYS_FSL' with 'S32V234' in defines for MMU bases and sizes
- reset_cpu now says it's not implemented
- moved OF_LIBFDT and BOOTZ config options to Kconfig
Changes in v3:
- Switch s32v234evb to config_distro_defaults.h and config_distro_bootcmd.h
Changes in v4:
- None
Changes in v5:
- None
arch/arm/Kconfig | 5 + arch/arm/cpu/armv8/Makefile | 1 + arch/arm/cpu/armv8/s32v234/Makefile | 8 + arch/arm/cpu/armv8/s32v234/cpu.c | 97 +++++++ arch/arm/cpu/armv8/s32v234/cpu.h | 8 + arch/arm/cpu/armv8/s32v234/generic.c | 350 ++++++++++++++++++++++++ arch/arm/include/asm/arch-s32v234/clock.h | 34 +++ arch/arm/include/asm/arch-s32v234/ddr.h | 157 +++++++++++ arch/arm/include/asm/arch-s32v234/imx-regs.h | 329 ++++++++++++++++++++++ arch/arm/include/asm/arch-s32v234/lpddr2.h | 75 +++++ arch/arm/include/asm/arch-s32v234/mc_cgm_regs.h | 254 +++++++++++++++++ arch/arm/include/asm/arch-s32v234/mc_me_regs.h | 199 ++++++++++++++ arch/arm/include/asm/arch-s32v234/mc_rgm_regs.h | 31 +++ arch/arm/include/asm/arch-s32v234/mmdc.h | 89 ++++++ arch/arm/include/asm/arch-s32v234/siul.h | 150 ++++++++++ board/freescale/s32v234evb/Kconfig | 23 ++ board/freescale/s32v234evb/MAINTAINERS | 8 + board/freescale/s32v234evb/Makefile | 11 + board/freescale/s32v234evb/clock.c | 344 +++++++++++++++++++++++ board/freescale/s32v234evb/lpddr2.c | 137 ++++++++++ board/freescale/s32v234evb/s32v234evb.c | 183 +++++++++++++ board/freescale/s32v234evb/s32v234evb.cfg | 29 ++ configs/s32v234evb_defconfig | 6 + drivers/mmc/fsl_esdhc.c | 10 +- include/configs/s32v234evb.h | 260 ++++++++++++++++++ 25 files changed, 2793 insertions(+), 5 deletions(-) create mode 100644 arch/arm/cpu/armv8/s32v234/Makefile create mode 100644 arch/arm/cpu/armv8/s32v234/cpu.c create mode 100644 arch/arm/cpu/armv8/s32v234/cpu.h create mode 100644 arch/arm/cpu/armv8/s32v234/generic.c create mode 100644 arch/arm/include/asm/arch-s32v234/clock.h create mode 100644 arch/arm/include/asm/arch-s32v234/ddr.h create mode 100644 arch/arm/include/asm/arch-s32v234/imx-regs.h create mode 100644 arch/arm/include/asm/arch-s32v234/lpddr2.h create mode 100644 arch/arm/include/asm/arch-s32v234/mc_cgm_regs.h create mode 100644 arch/arm/include/asm/arch-s32v234/mc_me_regs.h create mode 100644 arch/arm/include/asm/arch-s32v234/mc_rgm_regs.h create mode 100644 arch/arm/include/asm/arch-s32v234/mmdc.h create mode 100644 arch/arm/include/asm/arch-s32v234/siul.h create mode 100644 board/freescale/s32v234evb/Kconfig create mode 100644 board/freescale/s32v234evb/MAINTAINERS create mode 100644 board/freescale/s32v234evb/Makefile create mode 100644 board/freescale/s32v234evb/clock.c create mode 100644 board/freescale/s32v234evb/lpddr2.c create mode 100644 board/freescale/s32v234evb/s32v234evb.c create mode 100644 board/freescale/s32v234evb/s32v234evb.cfg create mode 100644 configs/s32v234evb_defconfig create mode 100644 include/configs/s32v234evb.h
arch/arm/Kconfig +5 -0
@@ -537,6 +537,10 @@ config RMOBILE bool "Renesas ARM SoCs" select CPU_V7 +config TARGET_S32V234EVB + bool "Support s32v234evb" + select ARM64 + config ARCH_SNAPDRAGON bool "Qualcomm Snapdragon SoCs" select ARM64
@@ -878,6 +882,7 @@ source "board/freescale/mx53ard/Kconfig" source "board/freescale/mx53evk/Kconfig" source "board/freescale/mx53loco/Kconfig" source "board/freescale/mx53smd/Kconfig" +source "board/freescale/s32v234evb/Kconfig" source "board/freescale/vf610twr/Kconfig" source "board/gumstix/pepper/Kconfig" source "board/h2200/Kconfig"
arch/arm/cpu/armv8/Makefile +1 -0
@@ -17,5 +17,6 @@ obj-y += transition.o obj-y += fwcall.o obj-$(CONFIG_FSL_LAYERSCAPE) += fsl-layerscape/ +obj-$(CONFIG_S32V234) += s32v234/ obj-$(CONFIG_ARCH_ZYNQMP) += zynqmp/ obj-$(CONFIG_TARGET_HIKEY) += hisilicon/
arch/arm/cpu/armv8/s32v234/Makefile new file +8 -0
@@ -0,0 +1,8 @@ +# +# (C) Copyright 2013-2016, Freescale Semiconductor, Inc. +# +# SPDX-License-Identifier: GPL-2.0+ +# + +obj-y += generic.o +obj-y += cpu.o
arch/arm/cpu/armv8/s32v234/cpu.c new file +97 -0
97 lines not on this page · raw message
arch/arm/cpu/armv8/s32v234/cpu.h new file +8 -0
@@ -0,0 +1,8 @@ +/* +* (C) Copyright 2014-2016, Freescale Semiconductor, Inc. +* +* SPDX-License-Identifier: GPL-2.0+ +*/ + +u32 cpu_mask (void ); +int cpu_numcores (void );
arch/arm/cpu/armv8/s32v234/generic.c new file +350 -0
350 lines not on this page · raw message
arch/arm/include/asm/arch-s32v234/clock.h new file +34 -0
@@ -0,0 +1,34 @@ +/* +* (C) Copyright 2015-2016, Freescale Semiconductor, Inc. +* +* SPDX-License-Identifier: GPL-2.0+ +*/ + +#ifndef __ASM_ARCH_CLOCK_H +#define __ASM_ARCH_CLOCK_H + +#include <common.h> + +enum mxc_clock { +MXC_ARM_CLK =0 , +MXC_BUS_CLK , +MXC_PERIPHERALS_CLK , +MXC_UART_CLK , +MXC_USDHC_CLK , +MXC_FEC_CLK , +MXC_I2C_CLK , +}; +enum pll_type { +ARM_PLL =0 , +PERIPH_PLL , +ENET_PLL , +DDR_PLL , +VIDEO_PLL , +}; + +unsigned int mxc_get_clock (enum mxc_clock clk); +void clock_init (void ); + +#define imx_get_fecclk () mxc_get_clock(MXC_FEC_CLK) + +#endif /* __ASM_ARCH_CLOCK_H */
arch/arm/include/asm/arch-s32v234/ddr.h new file +157 -0
157 lines not on this page · raw message
arch/arm/include/asm/arch-s32v234/imx-regs.h new file +329 -0
329 lines not on this page · raw message
arch/arm/include/asm/arch-s32v234/lpddr2.h new file +75 -0
75 lines not on this page · raw message
arch/arm/include/asm/arch-s32v234/mc_cgm_regs.h new file +254 -0
254 lines not on this page · raw message
arch/arm/include/asm/arch-s32v234/mc_me_regs.h new file +199 -0
199 lines not on this page · raw message
arch/arm/include/asm/arch-s32v234/mc_rgm_regs.h new file +31 -0
@@ -0,0 +1,31 @@ +/* +* (C) Copyright 2015, Freescale Semiconductor, Inc. +* +* SPDX-License-Identifier: GPL-2.0+ +*/ + +#ifndef __ARCH_ARM_MACH_S32V234_MCRGM_REGS_H__ +#define __ARCH_ARM_MACH_S32V234_MCRGM_REGS_H__ + +#define MC_RGM_DES (MC_RGM_BASE_ADDR) +#define MC_RGM_FES (MC_RGM_BASE_ADDR + 0x300) +#define MC_RGM_FERD (MC_RGM_BASE_ADDR + 0x310) +#define MC_RGM_FBRE (MC_RGM_BASE_ADDR + 0x330) +#define MC_RGM_FESS (MC_RGM_BASE_ADDR + 0x340) +#define MC_RGM_DDR_HE (MC_RGM_BASE_ADDR + 0x350) +#define MC_RGM_DDR_HS (MC_RGM_BASE_ADDR + 0x354) +#define MC_RGM_FRHE (MC_RGM_BASE_ADDR + 0x358) +#define MC_RGM_FREC (MC_RGM_BASE_ADDR + 0x600) +#define MC_RGM_FRET (MC_RGM_BASE_ADDR + 0x607) +#define MC_RGM_DRET (MC_RGM_BASE_ADDR + 0x60B) + +/* function reset sources mask */ +#define F_SWT4 0x8000 +#define F_JTAG 0x400 +#define F_FCCU_SOFT 0x40 +#define F_FCCU_HARD 0x20 +#define F_SOFT_FUNC 0x8 +#define F_ST_DONE 0x4 +#define F_EXT_RST 0x1 + +#endif /* __ARCH_ARM_MACH_S32V234_MCRGM_REGS_H__ */
arch/arm/include/asm/arch-s32v234/mmdc.h new file +89 -0
89 lines not on this page · raw message
arch/arm/include/asm/arch-s32v234/siul.h new file +150 -0
150 lines not on this page · raw message
board/freescale/s32v234evb/Kconfig new file +23 -0
@@ -0,0 +1,23 @@ +if TARGET_S32V234EVB + +config SYS_CPU + string + default "armv8" + +config SYS_BOARD + string + default "s32v234evb" + +config SYS_VENDOR + string + default "freescale" + +config SYS_SOC + string + default "s32v234" + +config SYS_CONFIG_NAME + string + default "s32v234evb" + +endif
board/freescale/s32v234evb/MAINTAINERS new file +8 -0
@@ -0,0 +1,8 @@ +S32V234 Evaluation BOARD +M: Eddy Petri?or <[email protected]> +S: Maintained +F: arch/arm/cpu/armv8/s32v234/ +F: arch/arm/include/asm/arch-s32v234/ +F: board/freescale/s32v234evb/ +F: include/configs/s32v234evb.h +F: configs/s32v234evb_defconfig
board/freescale/s32v234evb/Makefile new file +11 -0
@@ -0,0 +1,11 @@ +# +# (C) Copyright 2013-2015, Freescale Semiconductor, Inc. +# +# SPDX-License-Identifier: GPL-2.0+ +# + +obj-y := clock.o +obj-y += lpddr2.o +obj-y += s32v234evb.o + +#########################################################################
board/freescale/s32v234evb/clock.c new file +344 -0
344 lines not on this page · raw message
board/freescale/s32v234evb/lpddr2.c new file +137 -0
137 lines not on this page · raw message
board/freescale/s32v234evb/s32v234evb.c new file +183 -0
183 lines not on this page · raw message
board/freescale/s32v234evb/s32v234evb.cfg new file +29 -0
@@ -0,0 +1,29 @@ +/* + * (C) Copyright 2013-2015, Freescale Semiconductor, Inc. + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +/* + * Refer docs/README.imxmage for more details about how-to configure + * and create imximage boot image + * + * The syntax is taken as close as possible with the kwbimage + */ +#include <asm/imx-common/imximage.cfg> + +/* image version */ +IMAGE_VERSION 2 +BOOT_FROM sd + + +/* + * Boot Device : one of qspi, sd: + * qspi: flash_offset: 0x1000 + * sd/mmc: flash_offset: 0x1000 + */ + + +#ifdef CONFIG_SECURE_BOOT +SECURE_BOOT +#endif
configs/s32v234evb_defconfig new file +6 -0
@@ -0,0 +1,6 @@ +CONFIG_ARM=y +CONFIG_TARGET_S32V234EVB=y +CONFIG_SYS_MALLOC_F=y +CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/s32v234evb/s32v234evb.cfg" +CONFIG_CMD_BOOTZ=y +CONFIG_OF_LIBFDT=y
drivers/mmc/fsl_esdhc.c +5 -5
@@ -208,7 +208,7 @@ static int esdhc_setup_data(struct mmc *mmc, struct mmc_data *data)int timeout;struct fsl_esdhc_priv *priv = mmc->priv;struct fsl_esdhc *regs = priv->esdhc_regs; -#ifdef CONFIG_FSL_LAYERSCAPE +#if defined(CONFIG_FSL_LAYERSCAPE ) || defined(CONFIG_S32V234 )dma_addr_t addr;#endif uint wml_value;
@@ -221,7 +221,7 @@ static int esdhc_setup_data(struct mmc *mmc, struct mmc_data *data)esdhc_clrsetbits32 (®s->wml,WML_RD_WML_MASK , wml_value);#ifndef CONFIG_SYS_FSL_ESDHC_USE_PIO -#ifdef CONFIG_FSL_LAYERSCAPE +#if defined(CONFIG_FSL_LAYERSCAPE ) || defined(CONFIG_S32V234 ) addr =virt_to_phys ((void *)(data->dest));if (upper_32_bits (addr))printf ("Error found for upper 32 bits\n" );
@@ -247,7 +247,7 @@ static int esdhc_setup_data(struct mmc *mmc, struct mmc_data *data)esdhc_clrsetbits32 (®s->wml,WML_WR_WML_MASK , wml_value <<16 );#ifndef CONFIG_SYS_FSL_ESDHC_USE_PIO -#ifdef CONFIG_FSL_LAYERSCAPE +#if defined(CONFIG_FSL_LAYERSCAPE ) || defined(CONFIG_S32V234 ) addr =virt_to_phys ((void *)(data->src));if (upper_32_bits (addr))printf ("Error found for upper 32 bits\n" );
@@ -308,7 +308,7 @@ static int esdhc_setup_data(struct mmc *mmc, struct mmc_data *data)static void check_and_invalidate_dcache_range (struct mmc_cmd *cmd,struct mmc_data *data) { -#ifdef CONFIG_FSL_LAYERSCAPE +#if defined(CONFIG_FSL_LAYERSCAPE ) || defined(CONFIG_S32V234 )unsigned start =0 ;#else unsigned start = (unsigned )data->dest ;
@@ -316,7 +316,7 @@ static void check_and_invalidate_dcache_rangeunsigned size =roundup (ARCH_DMA_MINALIGN , data->blocks*data->blocksize);unsigned end = start+size ; -#ifdef CONFIG_FSL_LAYERSCAPE +#if defined(CONFIG_FSL_LAYERSCAPE ) || defined(CONFIG_S32V234 )dma_addr_t addr; addr =virt_to_phys ((void *)(data->dest));
include/configs/s32v234evb.h new file +260 -0
260 lines not on this page · raw message
Signature · 1 line
1.9.2.459.g68773ac
Fabio Estevam
reviewerv5 cover Initial support for s32v234
In reply to Eddy PetrișorQuoted 1 line · Eddy Petri?or
board/freescale/s32v234evb/Kconfig | 23 ++
What about placing the files under board/nxp instead?
v5 cover Initial support for s32v234
2016-06-05 1:23 GMT+03:00 Fabio Estevam <[email protected]>:
Quoted 5 lines · Eddy Petri?or
Quoted 2 lines
board/freescale/s32v234evb/Kconfig | 23 ++What about placing the files under board/nxp instead?
The board has been having support in our vendor branch a lot before the Freescale - NXP unification/aquisition. Since the device trees should not be changed, we consider that moving the board under nxp is incompatible with the "don't make destructive changes in DTS" requirement.
Signature · 1 line
Eddy Petri?or
Fabio Estevam
reviewerv5 cover Initial support for s32v234
Quoted 4 lines · Eddy Petri?or
The board has been having support in our vendor branch a lot before the Freescale - NXP unification/aquisition. Since the device trees should not be changed, we consider that moving the board under nxp is incompatible with the "don't make destructive changes in DTS"
I only suggested moving the board directory name in U-boot and didn't mention anything about dts, so really don't understand your comment about breaking dts.
Anyway, that was just a suggestion.
v5 cover Initial support for s32v234
Pe 5 iun. 2016 3:52 a.m., "Fabio Estevam" <[email protected]> a scris:
Quoted 2 lines
On Sat, Jun 4, 2016 at 8:59 PM, Eddy Petri?or <[email protected]>
Quoted 9 lines · wrote:
Quoted 5 lines
The board has been having support in our vendor branch a lot before the Freescale - NXP unification/aquisition. Since the device trees should not be changed, we consider that moving the board under nxp is incompatible with the "don't make destructive changes in DTS"
I only suggested moving the board directory name in U-boot and didn't mention anything about dts, so really don't understand your comment about breaking dts.
I meant that the board is part of the former Freescale portfolio and the DTS entries refer to it as Freescale and we don't plan to change it. I think that if we were to move it, it would lead to confusion since we would put it under nxp, but all internal references would call it freescale.
We have considered this in our vendor branch back in December, but concluded we had no convincing arguments in favour of the move, but a few against it.
Quoted 1 line
Anyway, that was just a suggestion.
Thanks for it, sorry if I seemed abrasive, if was not my intention.
Eddy
v6 cover Initial support for s32v234
In reply to Eddy PetrișorSixth version. It seems I reintroduced the typo ficed in v4 again in v5. I was testing on an unsquashed equivalent branch, so I missed the typo reintroduction.
Sorry for this.
Eddy Petri?or (1):
armv8: s32v234: Introduce basic support for s32v234evb
Stoica Cosmin-Stefan (1):
serial: Introduce linflex uart support
arch/arm/Kconfig | 5 + arch/arm/cpu/armv8/Makefile | 1 + arch/arm/cpu/armv8/s32v234/Makefile | 8 + arch/arm/cpu/armv8/s32v234/cpu.c | 97 +++++++ arch/arm/cpu/armv8/s32v234/cpu.h | 8 + arch/arm/cpu/armv8/s32v234/generic.c | 350 ++++++++++++++++++++++++ arch/arm/include/asm/arch-s32v234/clock.h | 34 +++ arch/arm/include/asm/arch-s32v234/ddr.h | 157 +++++++++++ arch/arm/include/asm/arch-s32v234/imx-regs.h | 329 ++++++++++++++++++++++ arch/arm/include/asm/arch-s32v234/lpddr2.h | 75 +++++ arch/arm/include/asm/arch-s32v234/mc_cgm_regs.h | 254 +++++++++++++++++ arch/arm/include/asm/arch-s32v234/mc_me_regs.h | 199 ++++++++++++++ arch/arm/include/asm/arch-s32v234/mc_rgm_regs.h | 31 +++ arch/arm/include/asm/arch-s32v234/mmdc.h | 89 ++++++ arch/arm/include/asm/arch-s32v234/siul.h | 150 ++++++++++ board/freescale/s32v234evb/Kconfig | 23 ++ board/freescale/s32v234evb/MAINTAINERS | 8 + board/freescale/s32v234evb/Makefile | 11 + board/freescale/s32v234evb/clock.c | 344 +++++++++++++++++++++++ board/freescale/s32v234evb/lpddr2.c | 137 ++++++++++ board/freescale/s32v234evb/s32v234evb.c | 183 +++++++++++++ board/freescale/s32v234evb/s32v234evb.cfg | 29 ++ configs/s32v234evb_defconfig | 6 + drivers/mmc/fsl_esdhc.c | 10 +- drivers/serial/Makefile | 1 + drivers/serial/serial_linflexuart.c | 223 +++++++++++++++ include/configs/s32v234evb.h | 260 ++++++++++++++++++ 27 files changed, 3017 insertions(+), 5 deletions(-) create mode 100644 arch/arm/cpu/armv8/s32v234/Makefile create mode 100644 arch/arm/cpu/armv8/s32v234/cpu.c create mode 100644 arch/arm/cpu/armv8/s32v234/cpu.h create mode 100644 arch/arm/cpu/armv8/s32v234/generic.c create mode 100644 arch/arm/include/asm/arch-s32v234/clock.h create mode 100644 arch/arm/include/asm/arch-s32v234/ddr.h create mode 100644 arch/arm/include/asm/arch-s32v234/imx-regs.h create mode 100644 arch/arm/include/asm/arch-s32v234/lpddr2.h create mode 100644 arch/arm/include/asm/arch-s32v234/mc_cgm_regs.h create mode 100644 arch/arm/include/asm/arch-s32v234/mc_me_regs.h create mode 100644 arch/arm/include/asm/arch-s32v234/mc_rgm_regs.h create mode 100644 arch/arm/include/asm/arch-s32v234/mmdc.h create mode 100644 arch/arm/include/asm/arch-s32v234/siul.h create mode 100644 board/freescale/s32v234evb/Kconfig create mode 100644 board/freescale/s32v234evb/MAINTAINERS create mode 100644 board/freescale/s32v234evb/Makefile create mode 100644 board/freescale/s32v234evb/clock.c create mode 100644 board/freescale/s32v234evb/lpddr2.c create mode 100644 board/freescale/s32v234evb/s32v234evb.c create mode 100644 board/freescale/s32v234evb/s32v234evb.cfg create mode 100644 configs/s32v234evb_defconfig create mode 100644 drivers/serial/serial_linflexuart.c create mode 100644 include/configs/s32v234evb.h
Signature · 1 line
1.9.2.459.g68773ac
PATCH v6 1/2 serial: Introduce linflex uart support
From: Stoica Cosmin-Stefan <[email protected]>
The Linflex module is integrated on some NXP automotive SoCs part of the former Freescale portfolio, like S32V234, an SoC for Advanced Driver Assistance Systems.
---
Notes:
Changes in v2:
Added support for device model. Compatibility with non-DM code is kept for easier synchronization with the code on the vendor branch where the conversion to DM is not done for all boards.
Changes in v3:
Removed non-DM compatibility, as requested.
Changes in v4:
Corrected typo: s/_debUG_uart_init/_debug_uart_init/
Changes in v5:
Enable linflex uart as debug console
Changes in v6:
Corrected again typo: s/_debUG_uart_init/_debug_uart_init/ I missed the reintrodution in v5 becuase execution testing was done on an unsquashed branch. Sorry for this.
drivers/serial/Makefile | 1 + drivers/serial/serial_linflexuart.c | 223 ++++++++++++++++++++++++++++++++++++ 2 files changed, 224 insertions(+) create mode 100644 drivers/serial/serial_linflexuart.c
drivers/serial/Makefile +1 -0
@@ -35,6 +35,7 @@ obj-$(CONFIG_SCIF_CONSOLE) += serial_sh.o obj-$(CONFIG_ZYNQ_SERIAL) += serial_zynq.o obj-$(CONFIG_BFIN_SERIAL) += serial_bfin.o obj-$(CONFIG_FSL_LPUART) += serial_lpuart.o +obj-$(CONFIG_FSL_LINFLEXUART) += serial_linflexuart.o obj-$(CONFIG_ARC_SERIAL) += serial_arc.o obj-$(CONFIG_UNIPHIER_SERIAL) += serial_uniphier.o obj-$(CONFIG_STM32_SERIAL) += serial_stm32.o
drivers/serial/serial_linflexuart.c new file +223 -0
223 lines not on this page · raw message
Signature · 1 line
1.9.2.459.g68773ac
PATCH v6 1/2 serial: Introduce linflex uart support
Quoted 6 lines · Eddy Petrisor
From: Stoica Cosmin-Stefan <[email protected]>
The Linflex module is integrated on some NXP automotive SoCs part of the former Freescale portfolio, like S32V234, an SoC for Advanced Driver Assistance Systems.
Quoted 6 lines
Original-signed-off-by Stoica Cosmin-Stefan <[email protected]>Original-signed-off-by Chircu Bogdan <[email protected]>Original-signed-off-by Depons Eric <[email protected]>Original-signed-off-by Eddy Petri?or <[email protected]>Signed-off-by Eddy Petri?or <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160619/b99853d4/attachment.sig>
PATCH v6 1/2 serial: Introduce linflex uart support
Pe 19 iun. 2016 4:09 p.m., "Tom Rini" <[email protected]> a scris:
Quoted 6 lines · Eddy Petrisor
Quoted 4 lines
From: Stoica Cosmin-Stefan <[email protected]>
The Linflex module is integrated on some NXP automotive SoCs part of
the former
Quoted 3 lines
Quoted 1 line
Signed-off-by Eddy Petri?or <[email protected]>Applied to u-boot/master, thanks!
Thanks, Tom.
Eddy
PATCH v6 2/2 armv8: s32v234: Introduce basic support for s32v234evb
In reply to Eddy PetrișorFrom: Eddy Petri?or <[email protected]>
Add initial support for NXP's S32V234 SoC and S32V234EVB board.
The S32V230 family is designed to support computation-intensive applications for image processing. The S32V234, as part of the S32V230 family, is a high-performance automotive processor designed to support safe computation-intensive applications in the area of vision and sensor fusion.
Code originally writen by:
---
Notes:
Changes in v2:
- Added support for device model. Compatibility with non-DM code is kept for easier synchronization with the code on the vendor branch where the conversion to DM is not done for all boards.
- remove TODO-s
- remove '#if 0'-ed code
- switched to SPDX headers
- removed uselss guard around 'DECLARE_GLOBAL_DATA_PTR;'
- replaced 'CONFIG_SYS_FSL' with 'S32V234' in defines for MMU bases and sizes
- reset_cpu now says it's not implemented
- moved OF_LIBFDT and BOOTZ config options to Kconfig
Changes in v3:
- Switch s32v234evb to config_distro_defaults.h and config_distro_bootcmd.h
Changes in v4:
- None
Changes in v5:
- None
Changes in v6:
- None
arch/arm/Kconfig | 5 + arch/arm/cpu/armv8/Makefile | 1 + arch/arm/cpu/armv8/s32v234/Makefile | 8 + arch/arm/cpu/armv8/s32v234/cpu.c | 97 +++++++ arch/arm/cpu/armv8/s32v234/cpu.h | 8 + arch/arm/cpu/armv8/s32v234/generic.c | 350 ++++++++++++++++++++++++ arch/arm/include/asm/arch-s32v234/clock.h | 34 +++ arch/arm/include/asm/arch-s32v234/ddr.h | 157 +++++++++++ arch/arm/include/asm/arch-s32v234/imx-regs.h | 329 ++++++++++++++++++++++ arch/arm/include/asm/arch-s32v234/lpddr2.h | 75 +++++ arch/arm/include/asm/arch-s32v234/mc_cgm_regs.h | 254 +++++++++++++++++ arch/arm/include/asm/arch-s32v234/mc_me_regs.h | 199 ++++++++++++++ arch/arm/include/asm/arch-s32v234/mc_rgm_regs.h | 31 +++ arch/arm/include/asm/arch-s32v234/mmdc.h | 89 ++++++ arch/arm/include/asm/arch-s32v234/siul.h | 150 ++++++++++ board/freescale/s32v234evb/Kconfig | 23 ++ board/freescale/s32v234evb/MAINTAINERS | 8 + board/freescale/s32v234evb/Makefile | 11 + board/freescale/s32v234evb/clock.c | 344 +++++++++++++++++++++++ board/freescale/s32v234evb/lpddr2.c | 137 ++++++++++ board/freescale/s32v234evb/s32v234evb.c | 183 +++++++++++++ board/freescale/s32v234evb/s32v234evb.cfg | 29 ++ configs/s32v234evb_defconfig | 6 + drivers/mmc/fsl_esdhc.c | 10 +- include/configs/s32v234evb.h | 260 ++++++++++++++++++ 25 files changed, 2793 insertions(+), 5 deletions(-) create mode 100644 arch/arm/cpu/armv8/s32v234/Makefile create mode 100644 arch/arm/cpu/armv8/s32v234/cpu.c create mode 100644 arch/arm/cpu/armv8/s32v234/cpu.h create mode 100644 arch/arm/cpu/armv8/s32v234/generic.c create mode 100644 arch/arm/include/asm/arch-s32v234/clock.h create mode 100644 arch/arm/include/asm/arch-s32v234/ddr.h create mode 100644 arch/arm/include/asm/arch-s32v234/imx-regs.h create mode 100644 arch/arm/include/asm/arch-s32v234/lpddr2.h create mode 100644 arch/arm/include/asm/arch-s32v234/mc_cgm_regs.h create mode 100644 arch/arm/include/asm/arch-s32v234/mc_me_regs.h create mode 100644 arch/arm/include/asm/arch-s32v234/mc_rgm_regs.h create mode 100644 arch/arm/include/asm/arch-s32v234/mmdc.h create mode 100644 arch/arm/include/asm/arch-s32v234/siul.h create mode 100644 board/freescale/s32v234evb/Kconfig create mode 100644 board/freescale/s32v234evb/MAINTAINERS create mode 100644 board/freescale/s32v234evb/Makefile create mode 100644 board/freescale/s32v234evb/clock.c create mode 100644 board/freescale/s32v234evb/lpddr2.c create mode 100644 board/freescale/s32v234evb/s32v234evb.c create mode 100644 board/freescale/s32v234evb/s32v234evb.cfg create mode 100644 configs/s32v234evb_defconfig create mode 100644 include/configs/s32v234evb.h
arch/arm/Kconfig +5 -0
@@ -537,6 +537,10 @@ config RMOBILE bool "Renesas ARM SoCs" select CPU_V7 +config TARGET_S32V234EVB + bool "Support s32v234evb" + select ARM64 + config ARCH_SNAPDRAGON bool "Qualcomm Snapdragon SoCs" select ARM64
@@ -878,6 +882,7 @@ source "board/freescale/mx53ard/Kconfig" source "board/freescale/mx53evk/Kconfig" source "board/freescale/mx53loco/Kconfig" source "board/freescale/mx53smd/Kconfig" +source "board/freescale/s32v234evb/Kconfig" source "board/freescale/vf610twr/Kconfig" source "board/gumstix/pepper/Kconfig" source "board/h2200/Kconfig"
arch/arm/cpu/armv8/Makefile +1 -0
@@ -17,5 +17,6 @@ obj-y += transition.o obj-y += fwcall.o obj-$(CONFIG_FSL_LAYERSCAPE) += fsl-layerscape/ +obj-$(CONFIG_S32V234) += s32v234/ obj-$(CONFIG_ARCH_ZYNQMP) += zynqmp/ obj-$(CONFIG_TARGET_HIKEY) += hisilicon/
arch/arm/cpu/armv8/s32v234/Makefile new file +8 -0
@@ -0,0 +1,8 @@ +# +# (C) Copyright 2013-2016, Freescale Semiconductor, Inc. +# +# SPDX-License-Identifier: GPL-2.0+ +# + +obj-y += generic.o +obj-y += cpu.o
arch/arm/cpu/armv8/s32v234/cpu.c new file +97 -0
97 lines not on this page · raw message
arch/arm/cpu/armv8/s32v234/cpu.h new file +8 -0
@@ -0,0 +1,8 @@ +/* +* (C) Copyright 2014-2016, Freescale Semiconductor, Inc. +* +* SPDX-License-Identifier: GPL-2.0+ +*/ + +u32 cpu_mask (void ); +int cpu_numcores (void );
arch/arm/cpu/armv8/s32v234/generic.c new file +350 -0
350 lines not on this page · raw message
arch/arm/include/asm/arch-s32v234/clock.h new file +34 -0
@@ -0,0 +1,34 @@ +/* +* (C) Copyright 2015-2016, Freescale Semiconductor, Inc. +* +* SPDX-License-Identifier: GPL-2.0+ +*/ + +#ifndef __ASM_ARCH_CLOCK_H +#define __ASM_ARCH_CLOCK_H + +#include <common.h> + +enum mxc_clock { +MXC_ARM_CLK =0 , +MXC_BUS_CLK , +MXC_PERIPHERALS_CLK , +MXC_UART_CLK , +MXC_USDHC_CLK , +MXC_FEC_CLK , +MXC_I2C_CLK , +}; +enum pll_type { +ARM_PLL =0 , +PERIPH_PLL , +ENET_PLL , +DDR_PLL , +VIDEO_PLL , +}; + +unsigned int mxc_get_clock (enum mxc_clock clk); +void clock_init (void ); + +#define imx_get_fecclk () mxc_get_clock(MXC_FEC_CLK) + +#endif /* __ASM_ARCH_CLOCK_H */
arch/arm/include/asm/arch-s32v234/ddr.h new file +157 -0
157 lines not on this page · raw message
arch/arm/include/asm/arch-s32v234/imx-regs.h new file +329 -0
329 lines not on this page · raw message
arch/arm/include/asm/arch-s32v234/lpddr2.h new file +75 -0
75 lines not on this page · raw message
arch/arm/include/asm/arch-s32v234/mc_cgm_regs.h new file +254 -0
254 lines not on this page · raw message
arch/arm/include/asm/arch-s32v234/mc_me_regs.h new file +199 -0
199 lines not on this page · raw message
arch/arm/include/asm/arch-s32v234/mc_rgm_regs.h new file +31 -0
@@ -0,0 +1,31 @@ +/* +* (C) Copyright 2015, Freescale Semiconductor, Inc. +* +* SPDX-License-Identifier: GPL-2.0+ +*/ + +#ifndef __ARCH_ARM_MACH_S32V234_MCRGM_REGS_H__ +#define __ARCH_ARM_MACH_S32V234_MCRGM_REGS_H__ + +#define MC_RGM_DES (MC_RGM_BASE_ADDR) +#define MC_RGM_FES (MC_RGM_BASE_ADDR + 0x300) +#define MC_RGM_FERD (MC_RGM_BASE_ADDR + 0x310) +#define MC_RGM_FBRE (MC_RGM_BASE_ADDR + 0x330) +#define MC_RGM_FESS (MC_RGM_BASE_ADDR + 0x340) +#define MC_RGM_DDR_HE (MC_RGM_BASE_ADDR + 0x350) +#define MC_RGM_DDR_HS (MC_RGM_BASE_ADDR + 0x354) +#define MC_RGM_FRHE (MC_RGM_BASE_ADDR + 0x358) +#define MC_RGM_FREC (MC_RGM_BASE_ADDR + 0x600) +#define MC_RGM_FRET (MC_RGM_BASE_ADDR + 0x607) +#define MC_RGM_DRET (MC_RGM_BASE_ADDR + 0x60B) + +/* function reset sources mask */ +#define F_SWT4 0x8000 +#define F_JTAG 0x400 +#define F_FCCU_SOFT 0x40 +#define F_FCCU_HARD 0x20 +#define F_SOFT_FUNC 0x8 +#define F_ST_DONE 0x4 +#define F_EXT_RST 0x1 + +#endif /* __ARCH_ARM_MACH_S32V234_MCRGM_REGS_H__ */
arch/arm/include/asm/arch-s32v234/mmdc.h new file +89 -0
89 lines not on this page · raw message
arch/arm/include/asm/arch-s32v234/siul.h new file +150 -0
150 lines not on this page · raw message
board/freescale/s32v234evb/Kconfig new file +23 -0
@@ -0,0 +1,23 @@ +if TARGET_S32V234EVB + +config SYS_CPU + string + default "armv8" + +config SYS_BOARD + string + default "s32v234evb" + +config SYS_VENDOR + string + default "freescale" + +config SYS_SOC + string + default "s32v234" + +config SYS_CONFIG_NAME + string + default "s32v234evb" + +endif
board/freescale/s32v234evb/MAINTAINERS new file +8 -0
@@ -0,0 +1,8 @@ +S32V234 Evaluation BOARD +M: Eddy Petri?or <[email protected]> +S: Maintained +F: arch/arm/cpu/armv8/s32v234/ +F: arch/arm/include/asm/arch-s32v234/ +F: board/freescale/s32v234evb/ +F: include/configs/s32v234evb.h +F: configs/s32v234evb_defconfig
board/freescale/s32v234evb/Makefile new file +11 -0
@@ -0,0 +1,11 @@ +# +# (C) Copyright 2013-2015, Freescale Semiconductor, Inc. +# +# SPDX-License-Identifier: GPL-2.0+ +# + +obj-y := clock.o +obj-y += lpddr2.o +obj-y += s32v234evb.o + +#########################################################################
board/freescale/s32v234evb/clock.c new file +344 -0
344 lines not on this page · raw message
board/freescale/s32v234evb/lpddr2.c new file +137 -0
137 lines not on this page · raw message
board/freescale/s32v234evb/s32v234evb.c new file +183 -0
183 lines not on this page · raw message
board/freescale/s32v234evb/s32v234evb.cfg new file +29 -0
@@ -0,0 +1,29 @@ +/* + * (C) Copyright 2013-2015, Freescale Semiconductor, Inc. + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +/* + * Refer docs/README.imxmage for more details about how-to configure + * and create imximage boot image + * + * The syntax is taken as close as possible with the kwbimage + */ +#include <asm/imx-common/imximage.cfg> + +/* image version */ +IMAGE_VERSION 2 +BOOT_FROM sd + + +/* + * Boot Device : one of qspi, sd: + * qspi: flash_offset: 0x1000 + * sd/mmc: flash_offset: 0x1000 + */ + + +#ifdef CONFIG_SECURE_BOOT +SECURE_BOOT +#endif
configs/s32v234evb_defconfig new file +6 -0
@@ -0,0 +1,6 @@ +CONFIG_ARM=y +CONFIG_TARGET_S32V234EVB=y +CONFIG_SYS_MALLOC_F=y +CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/s32v234evb/s32v234evb.cfg" +CONFIG_CMD_BOOTZ=y +CONFIG_OF_LIBFDT=y
drivers/mmc/fsl_esdhc.c +5 -5
@@ -208,7 +208,7 @@ static int esdhc_setup_data(struct mmc *mmc, struct mmc_data *data)int timeout;struct fsl_esdhc_priv *priv = mmc->priv;struct fsl_esdhc *regs = priv->esdhc_regs; -#ifdef CONFIG_FSL_LAYERSCAPE +#if defined(CONFIG_FSL_LAYERSCAPE ) || defined(CONFIG_S32V234 )dma_addr_t addr;#endif uint wml_value;
@@ -221,7 +221,7 @@ static int esdhc_setup_data(struct mmc *mmc, struct mmc_data *data)esdhc_clrsetbits32 (®s->wml,WML_RD_WML_MASK , wml_value);#ifndef CONFIG_SYS_FSL_ESDHC_USE_PIO -#ifdef CONFIG_FSL_LAYERSCAPE +#if defined(CONFIG_FSL_LAYERSCAPE ) || defined(CONFIG_S32V234 ) addr =virt_to_phys ((void *)(data->dest));if (upper_32_bits (addr))printf ("Error found for upper 32 bits\n" );
@@ -247,7 +247,7 @@ static int esdhc_setup_data(struct mmc *mmc, struct mmc_data *data)esdhc_clrsetbits32 (®s->wml,WML_WR_WML_MASK , wml_value <<16 );#ifndef CONFIG_SYS_FSL_ESDHC_USE_PIO -#ifdef CONFIG_FSL_LAYERSCAPE +#if defined(CONFIG_FSL_LAYERSCAPE ) || defined(CONFIG_S32V234 ) addr =virt_to_phys ((void *)(data->src));if (upper_32_bits (addr))printf ("Error found for upper 32 bits\n" );
@@ -308,7 +308,7 @@ static int esdhc_setup_data(struct mmc *mmc, struct mmc_data *data)static void check_and_invalidate_dcache_range (struct mmc_cmd *cmd,struct mmc_data *data) { -#ifdef CONFIG_FSL_LAYERSCAPE +#if defined(CONFIG_FSL_LAYERSCAPE ) || defined(CONFIG_S32V234 )unsigned start =0 ;#else unsigned start = (unsigned )data->dest ;
@@ -316,7 +316,7 @@ static void check_and_invalidate_dcache_rangeunsigned size =roundup (ARCH_DMA_MINALIGN , data->blocks*data->blocksize);unsigned end = start+size ; -#ifdef CONFIG_FSL_LAYERSCAPE +#if defined(CONFIG_FSL_LAYERSCAPE ) || defined(CONFIG_S32V234 )dma_addr_t addr; addr =virt_to_phys ((void *)(data->dest));
include/configs/s32v234evb.h new file +260 -0
260 lines not on this page · raw message
Signature · 1 line
1.9.2.459.g68773ac
PATCH v6 2/2 armv8: s32v234: Introduce basic support for s32v234evb
Quoted 9 lines · Eddy Petrisor
From: Eddy Petri?or <[email protected]>
Add initial support for NXP's S32V234 SoC and S32V234EVB board.
The S32V230 family is designed to support computation-intensive applications for image processing. The S32V234, as part of the S32V230 family, is a high-performance automotive processor designed to support safe computation-intensive applications in the area of vision and sensor fusion.
Quoted 6 lines
Code originally writen by:
Original-signed-off-by Stoica Cosmin-Stefan <[email protected]>Original-signed-off-by Mihaela Martinas <[email protected]>Original-signed-off-by Eddy Petri?or <[email protected]>Signed-off-by Eddy Petri?or <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160619/a2d27788/attachment.sig>
PATCH v6 2/2 armv8: s32v234: Introduce basic support for s32v234evb
Pe 19 iun. 2016 4:09 p.m., "Tom Rini" <[email protected]> a scris:
Quoted 9 lines · Eddy Petrisor
Quoted 5 lines
From: Eddy Petri?or <[email protected]>
Add initial support for NXP's S32V234 SoC and S32V234EVB board.
Applied to u-boot/master, thanks!
Will follow up with more patches for S32V234 after we align our vendor branch with the merged changes.
Thanks.
Quoted 2 lines
--
Tom
Eddy