imx: ventana: convert Gateworks Ventana to dm
Subsystems (6)
cover imx: ventana: convert Gateworks Ventana to dm
This is the first series converting the IMX6 basd Gateworks Ventana boards to driver-model.
This series resolves some issues with NAND SPL (non DM SPL) in order to read the FIT image. Additionally it covers conversions to DM_USB, DM_MMC, DM_MTD, and DM_SPI.
Remaining items are DM_PCI and DM_ETH which I'm still working through.
Tim
Tim Harvey (11):
spl: fit: nand: skip bad block handling if NAND chip not fully defined
spl: fit: nand: allow for non-page-aligned elements
dt-bindings: add tda1997x and bindings
imx: ventana: add Gateworks Ventana dts
arm: dts: imx6qdl-gw*: add dr_mode prop to dt to avoid error
imx: ventana: convert U-Boot to OF_CONTROL using FIT image
imx: ventana: add pinctrl and remove unneeded UART init and config
imx: ventana: enable dm support for USB
imx: ventana: enable dm support for MMC and SATA
imx: ventana: enable dm for MTD and NAND
imx: ventana: enable dm for SPI
arch/arm/dts/Makefile | 28 + arch/arm/dts/imx6dl-gw51xx.dts | 13 + arch/arm/dts/imx6dl-gw52xx.dts | 71 ++ arch/arm/dts/imx6dl-gw53xx.dts | 71 ++ arch/arm/dts/imx6dl-gw54xx.dts | 71 ++ arch/arm/dts/imx6dl-gw551x.dts | 55 ++ arch/arm/dts/imx6dl-gw552x.dts | 14 + arch/arm/dts/imx6dl-gw553x.dts | 55 ++ arch/arm/dts/imx6dl-gw560x.dts | 55 ++ arch/arm/dts/imx6dl-gw5903.dts | 55 ++ arch/arm/dts/imx6dl-gw5904.dts | 55 ++ arch/arm/dts/imx6dl-gw5907.dts | 14 + arch/arm/dts/imx6dl-gw5910.dts | 14 + arch/arm/dts/imx6dl-gw5912.dts | 13 + arch/arm/dts/imx6dl-gw5913.dts | 14 + arch/arm/dts/imx6q-gw51xx.dts | 13 + arch/arm/dts/imx6q-gw52xx.dts | 75 ++ arch/arm/dts/imx6q-gw53xx.dts | 75 ++ arch/arm/dts/imx6q-gw54xx.dts | 177 ++++ arch/arm/dts/imx6q-gw551x.dts | 55 ++ arch/arm/dts/imx6q-gw552x.dts | 18 + arch/arm/dts/imx6q-gw553x.dts | 55 ++ arch/arm/dts/imx6q-gw560x.dts | 59 ++ arch/arm/dts/imx6q-gw5903.dts | 55 ++ arch/arm/dts/imx6q-gw5904.dts | 59 ++ arch/arm/dts/imx6q-gw5907.dts | 14 + arch/arm/dts/imx6q-gw5910.dts | 14 + arch/arm/dts/imx6q-gw5912.dts | 13 + arch/arm/dts/imx6q-gw5913.dts | 14 + arch/arm/dts/imx6qdl-gw51xx.dtsi | 638 +++++++++++++ arch/arm/dts/imx6qdl-gw52xx.dtsi | 782 ++++++++++++++++ arch/arm/dts/imx6qdl-gw53xx.dtsi | 772 ++++++++++++++++ arch/arm/dts/imx6qdl-gw54xx.dtsi | 866 ++++++++++++++++++ arch/arm/dts/imx6qdl-gw551x.dtsi | 698 +++++++++++++++ arch/arm/dts/imx6qdl-gw552x.dtsi | 522 +++++++++++ arch/arm/dts/imx6qdl-gw553x.dtsi | 738 +++++++++++++++ arch/arm/dts/imx6qdl-gw560x.dtsi | 937 ++++++++++++++++++++ arch/arm/dts/imx6qdl-gw5903.dtsi | 796 +++++++++++++++++ arch/arm/dts/imx6qdl-gw5904.dtsi | 814 +++++++++++++++++ arch/arm/dts/imx6qdl-gw5907.dtsi | 539 +++++++++++ arch/arm/dts/imx6qdl-gw5910.dtsi | 668 ++++++++++++++ arch/arm/dts/imx6qdl-gw5912.dtsi | 609 +++++++++++++ arch/arm/dts/imx6qdl-gw5913.dtsi | 501 +++++++++++ board/gateworks/gw_ventana/MAINTAINERS | 48 + board/gateworks/gw_ventana/common.c | 17 - board/gateworks/gw_ventana/common.h | 1 - board/gateworks/gw_ventana/gsc.c | 88 ++ board/gateworks/gw_ventana/gsc.h | 1 + board/gateworks/gw_ventana/gw_ventana.c | 138 +-- board/gateworks/gw_ventana/gw_ventana_spl.c | 10 +- common/spl/spl_nand.c | 24 +- configs/gwventana_emmc_defconfig | 20 +- configs/gwventana_gw5904_defconfig | 20 +- configs/gwventana_nand_defconfig | 22 +- drivers/mtd/nand/raw/mxs_nand_spl.c | 5 + include/configs/gw_ventana.h | 15 +- include/dt-bindings/media/tda1997x.h | 74 ++ 57 files changed, 11501 insertions(+), 156 deletions(-) create mode 100644 arch/arm/dts/imx6dl-gw51xx.dts create mode 100644 arch/arm/dts/imx6dl-gw52xx.dts create mode 100644 arch/arm/dts/imx6dl-gw53xx.dts create mode 100644 arch/arm/dts/imx6dl-gw54xx.dts create mode 100644 arch/arm/dts/imx6dl-gw551x.dts create mode 100644 arch/arm/dts/imx6dl-gw552x.dts create mode 100644 arch/arm/dts/imx6dl-gw553x.dts create mode 100644 arch/arm/dts/imx6dl-gw560x.dts create mode 100644 arch/arm/dts/imx6dl-gw5903.dts create mode 100644 arch/arm/dts/imx6dl-gw5904.dts create mode 100644 arch/arm/dts/imx6dl-gw5907.dts create mode 100644 arch/arm/dts/imx6dl-gw5910.dts create mode 100644 arch/arm/dts/imx6dl-gw5912.dts create mode 100644 arch/arm/dts/imx6dl-gw5913.dts create mode 100644 arch/arm/dts/imx6q-gw51xx.dts create mode 100644 arch/arm/dts/imx6q-gw52xx.dts create mode 100644 arch/arm/dts/imx6q-gw53xx.dts create mode 100644 arch/arm/dts/imx6q-gw54xx.dts create mode 100644 arch/arm/dts/imx6q-gw551x.dts create mode 100644 arch/arm/dts/imx6q-gw552x.dts create mode 100644 arch/arm/dts/imx6q-gw553x.dts create mode 100644 arch/arm/dts/imx6q-gw560x.dts create mode 100644 arch/arm/dts/imx6q-gw5903.dts create mode 100644 arch/arm/dts/imx6q-gw5904.dts create mode 100644 arch/arm/dts/imx6q-gw5907.dts create mode 100644 arch/arm/dts/imx6q-gw5910.dts create mode 100644 arch/arm/dts/imx6q-gw5912.dts create mode 100644 arch/arm/dts/imx6q-gw5913.dts create mode 100644 arch/arm/dts/imx6qdl-gw51xx.dtsi create mode 100644 arch/arm/dts/imx6qdl-gw52xx.dtsi create mode 100644 arch/arm/dts/imx6qdl-gw53xx.dtsi create mode 100644 arch/arm/dts/imx6qdl-gw54xx.dtsi create mode 100644 arch/arm/dts/imx6qdl-gw551x.dtsi create mode 100644 arch/arm/dts/imx6qdl-gw552x.dtsi create mode 100644 arch/arm/dts/imx6qdl-gw553x.dtsi create mode 100644 arch/arm/dts/imx6qdl-gw560x.dtsi create mode 100644 arch/arm/dts/imx6qdl-gw5903.dtsi create mode 100644 arch/arm/dts/imx6qdl-gw5904.dtsi create mode 100644 arch/arm/dts/imx6qdl-gw5907.dtsi create mode 100644 arch/arm/dts/imx6qdl-gw5910.dtsi create mode 100644 arch/arm/dts/imx6qdl-gw5912.dtsi create mode 100644 arch/arm/dts/imx6qdl-gw5913.dtsi create mode 100644 include/dt-bindings/media/tda1997x.h
Signature · 1 line
2.17.1
PATCH 1/11 spl: fit: nand: skip bad block handling if NAND chip not fully defined
commit 9f6a14c47ff9 ("spl: fit: nand: fix fit loading in case of bad blocks") added support for adjusting the image offset to account for bad blocks. However this requires nand_spl_adjust_offset() which requires fully defined specifics of the NAND chip being used may not be avialable.
Allow skipping this support for drivers or configs which don't specify the NAND chip details statically with defines.
--- common/spl/spl_nand.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
common/spl/spl_nand.c +3 -1
@@ -42,11 +42,13 @@ static int spl_nand_load_image(struct spl_image_info *spl_image,static ulong spl_nand_fit_read (struct spl_load_info *load,ulong offs,ulong size,void *dst) { -ulong sector;int err; +#ifdef CONFIG_SYS_NAND_BLOCK_SIZE +ulong sector; sector = *(int *)load->priv; offs = sector +nand_spl_adjust_offset (sector, offs - sector); +#endif err =nand_spl_load_image (offs, size, dst);if (err)return 0 ;
Signature · 1 line
2.17.1
PATCH 1/11 spl: fit: nand: skip bad block handling if NAND chip not fully defined
Quoted 9 lines · Tim Harvey
commit
9f6a14c47ff9("spl: fit: nand: fix fit loading in case of bad blocks") added support for adjusting the image offset to account for bad blocks. However this requiresnand_spl_adjust_offset()which requires fully defined specifics of the NAND chip being used may not be avialable.Allow skipping this support for drivers or configs which don't specify the NAND chip details statically with defines.
Signed-off-by Tim Harvey <[email protected]>
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 659 bytes Desc: not available URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210302/ebb0e5f7/attachment.sig>
PATCH 1/11 spl: fit: nand: skip bad block handling if NAND chip not fully defined
In reply to Tim HarveyQuoted 8 lines
commit
9f6a14c47ff9("spl: fit: nand: fix fit loading in case of bad blocks") added support for adjusting the image offset to account for bad blocks. However this requiresnand_spl_adjust_offset()which requires fully defined specifics of the NAND chip being used may not be avialable.
Allow skipping this support for drivers or configs which don't specify the NAND chip details statically with defines.Signed-off-by Tim Harvey <[email protected]>Reviewed-by Tom Rini <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================
PATCH 2/11 spl: fit: nand: allow for non-page-aligned elements
In reply to Tim HarveyAdd a weak nand_get_mtd function for nand drivers to provide mtd info and use this to set pagesize such that reading of non page-aligned elements can succeed.
The spl_load_simple_fit already handles block block access so all we need to do is provide the nand writesize as the block length.
Further cleanup of the drivers which use nand_spl_loaders.c such as am335x_spl_bch.c, atmel_nand.c, and nand_spl_simple.c could be done using info from mtd_info instead of statically defined details.
--- common/spl/spl_nand.c | 20 +++++++++++++++----- drivers/mtd/nand/raw/mxs_nand_spl.c | 5 +++++ 2 files changed, 20 insertions(+), 5 deletions(-)
common/spl/spl_nand.c +15 -5
@@ -48,17 +48,27 @@ static ulong spl_nand_fit_read(struct spl_load_info *load, ulong offs, sector = *(int *)load->priv; offs = sector +nand_spl_adjust_offset (sector, offs - sector); +#else + offs *= load->bl_len; + size *= load->bl_len;#endif err =nand_spl_load_image (offs, size, dst);if (err)return 0 ; -return size; +return size / load->bl_len; +} + +struct mtd_info *__weak nand_get_mtd (void ) +{ +return NULL ; }static int spl_nand_load_element (struct spl_image_info *spl_image,int offset,struct image_header *header) { +struct mtd_info *mtd =nand_get_mtd (); +int bl_len = mtd ? mtd->writesize :1 ;int err; err =nand_spl_load_image (offset,sizeof (*header), (void *)header);
@@ -73,18 +83,18 @@ static int spl_nand_load_element(struct spl_image_info *spl_image, load.dev =NULL ; load.priv = &offset; load.filename =NULL ; - load.bl_len =1 ; + load.bl_len = bl_len; load.read = spl_nand_fit_read; -return spl_load_simple_fit (spl_image, &load, offset, header); +return spl_load_simple_fit (spl_image, &load, offset / bl_len, header); }else if (IS_ENABLED (CONFIG_SPL_LOAD_IMX_CONTAINER )) {struct spl_load_info load; load.dev =NULL ; load.priv =NULL ; load.filename =NULL ; - load.bl_len =1 ; + load.bl_len = bl_len; load.read = spl_nand_fit_read; -return spl_load_imx_container (spl_image, &load, offset); +return spl_load_imx_container (spl_image, &load, offset / bl_len); }else { err =spl_parse_image_header (spl_image, header);if (err)
drivers/mtd/nand/raw/mxs_nand_spl.c +5 -0
@@ -282,6 +282,11 @@ int nand_spl_load_image(uint32_t offs, unsigned int size, void *buf)return 0 ; } +struct mtd_info *nand_get_mtd (void ) +{ +return mtd; +} +int nand_default_bbt (struct mtd_info *mtd) {return 0 ;
Signature · 1 line
2.17.1
PATCH 2/11 spl: fit: nand: allow for non-page-aligned elements
Quoted 4 lines · Tim Harvey
Add a weak
nand_get_mtdfunction for nand drivers to provide mtd info and use this to set pagesize such that reading of non page-aligned elements can succeed.
Quoted 8 lines
The
spl_load_simple_fitalready handles block block access so all we need to do is provide the nand writesize as the block length.Further cleanup of the drivers which use
nand_spl_loaders.csuch asam335x_spl_bch.c,atmel_nand.c, andnand_spl_simple.ccould be done using info frommtd_infoinstead of statically defined details.Signed-off-by Tim Harvey <[email protected]>
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 659 bytes Desc: not available URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210302/033995c0/attachment.sig>
PATCH 2/11 spl: fit: nand: allow for non-page-aligned elements
In reply to Tim HarveyQuoted 10 lines
Add a weak
nand_get_mtdfunction for nand drivers to provide mtd info and use this to set pagesize such that reading of non page-aligned elements can succeed.
Thespl_load_simple_fitalready handles block block access so all we need to do is provide the nand writesize as the block length. Further cleanup of the drivers which usenand_spl_loaders.csuch asam335x_spl_bch.c,atmel_nand.c, andnand_spl_simple.ccould be done using info frommtd_infoinstead of statically defined details.Signed-off-by Tim Harvey <[email protected]>Reviewed-by Tom Rini <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================
PATCH 3/11 dt-bindings: add tda1997x and bindings
In reply to Tim HarveyAdd td1997x header from Linux to be included by dts files.
--- include/dt-bindings/media/tda1997x.h | 74 ++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 include/dt-bindings/media/tda1997x.h
include/dt-bindings/media/tda1997x.h new file +74 -0
@@ -0,0 +1,74 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* +* Copyright (C) 2017 Gateworks Corporation +*/ +#ifndef _DT_BINDINGS_MEDIA_TDA1997X_H +#define _DT_BINDINGS_MEDIA_TDA1997X_H + +/* TDA19973 36bit Video Port control registers */ +#define TDA1997X_VP36_35_32 0 +#define TDA1997X_VP36_31_28 1 +#define TDA1997X_VP36_27_24 2 +#define TDA1997X_VP36_23_20 3 +#define TDA1997X_VP36_19_16 4 +#define TDA1997X_VP36_15_12 5 +#define TDA1997X_VP36_11_08 6 +#define TDA1997X_VP36_07_04 7 +#define TDA1997X_VP36_03_00 8 + +/* TDA19971 24bit Video Port control registers */ +#define TDA1997X_VP24_V23_20 0 +#define TDA1997X_VP24_V19_16 1 +#define TDA1997X_VP24_V15_12 3 +#define TDA1997X_VP24_V11_08 4 +#define TDA1997X_VP24_V07_04 6 +#define TDA1997X_VP24_V03_00 7 + +/* Pin groups */ +#define TDA1997X_VP_OUT_EN 0x80/* enable output group */ +#define TDA1997X_VP_HIZ 0x40/* hi-Z output group when not used */ +#define TDA1997X_VP_SWP 0x10/* pin-swap output group */ +#define TDA1997X_R_CR_CBCR_3_0 (0 | TDA1997X_VP_OUT_EN | TDA1997X_VP_HIZ) +#define TDA1997X_R_CR_CBCR_7_4 (1 | TDA1997X_VP_OUT_EN | TDA1997X_VP_HIZ) +#define TDA1997X_R_CR_CBCR_11_8 (2 | TDA1997X_VP_OUT_EN | TDA1997X_VP_HIZ) +#define TDA1997X_B_CB_3_0 (3 | TDA1997X_VP_OUT_EN | TDA1997X_VP_HIZ) +#define TDA1997X_B_CB_7_4 (4 | TDA1997X_VP_OUT_EN | TDA1997X_VP_HIZ) +#define TDA1997X_B_CB_11_8 (5 | TDA1997X_VP_OUT_EN | TDA1997X_VP_HIZ) +#define TDA1997X_G_Y_3_0 (6 | TDA1997X_VP_OUT_EN | TDA1997X_VP_HIZ) +#define TDA1997X_G_Y_7_4 (7 | TDA1997X_VP_OUT_EN | TDA1997X_VP_HIZ) +#define TDA1997X_G_Y_11_8 (8 | TDA1997X_VP_OUT_EN | TDA1997X_VP_HIZ) +/* pinswapped groups */ +#define TDA1997X_R_CR_CBCR_3_0_S (TDA1997X_R_CR_CBCR_3_0 | TDA1997X_VP_SWAP) +#define TDA1997X_R_CR_CBCR_7_4_S (TDA1997X_R_CR_CBCR_7_4 | TDA1997X_VP_SWAP) +#define TDA1997X_R_CR_CBCR_11_8_S (TDA1997X_R_CR_CBCR_11_8 | TDA1997X_VP_SWAP) +#define TDA1997X_B_CB_3_0_S (TDA1997X_B_CB_3_0 | TDA1997X_VP_SWAP) +#define TDA1997X_B_CB_7_4_S (TDA1997X_B_CB_7_4 | TDA1997X_VP_SWAP) +#define TDA1997X_B_CB_11_8_S (TDA1997X_B_CB_11_8 | TDA1997X_VP_SWAP) +#define TDA1997X_G_Y_3_0_S (TDA1997X_G_Y_3_0 | TDA1997X_VP_SWAP) +#define TDA1997X_G_Y_7_4_S (TDA1997X_G_Y_7_4 | TDA1997X_VP_SWAP) +#define TDA1997X_G_Y_11_8_S (TDA1997X_G_Y_11_8 | TDA1997X_VP_SWAP) + +/* Audio bus DAI format */ +#define TDA1997X_I2S16 1/* I2S 16bit */ +#define TDA1997X_I2S32 2/* I2S 32bit */ +#define TDA1997X_SPDIF 3/* SPDIF */ +#define TDA1997X_OBA 4/* One Bit Audio */ +#define TDA1997X_DST 5/* Direct Stream Transfer */ +#define TDA1997X_I2S16_HBR 6/* HBR straight in I2S 16bit mode */ +#define TDA1997X_I2S16_HBR_DEMUX 7/* HBR demux in I2S 16bit mode */ +#define TDA1997X_I2S32_HBR_DEMUX 8/* HBR demux in I2S 32bit mode */ +#define TDA1997X_SPDIF_HBR_DEMUX 9/* HBR demux in SPDIF mode */ + +/* Audio bus channel layout */ +#define TDA1997X_LAYOUT0 0/* 2-channel */ +#define TDA1997X_LAYOUT1 1/* 8-channel */ + +/* Audio bus clock */ +#define TDA1997X_ACLK_16FS 0 +#define TDA1997X_ACLK_32FS 1 +#define TDA1997X_ACLK_64FS 2 +#define TDA1997X_ACLK_128FS 3 +#define TDA1997X_ACLK_256FS 4 +#define TDA1997X_ACLK_512FS 5 + +#endif /* _DT_BINDINGS_MEDIA_TDA1997X_H */
Signature · 1 line
2.17.1
PATCH 3/11 dt-bindings: add tda1997x and bindings
Quoted 1 line · Tim Harvey
Add td1997x header from Linux to be included by dts files.
You need to say what kernel release it's from.
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 659 bytes Desc: not available URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210302/82f247a8/attachment.sig>
PATCH 3/11 dt-bindings: add tda1997x and bindings
In reply to Tim HarveyQuoted 2 lines
Add td1997x header from Linux to be included by dts files.
Signed-off-by Tim Harvey <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================
PATCH 4/11 imx: ventana: add Gateworks Ventana dts
In reply to Tim HarveyAdd Gateworks Ventana dts/dtsi files from Linux 5.11 in preparation for conversion to driver-model.
--- arch/arm/dts/Makefile | 28 + arch/arm/dts/imx6dl-gw51xx.dts | 13 + arch/arm/dts/imx6dl-gw52xx.dts | 71 ++ arch/arm/dts/imx6dl-gw53xx.dts | 71 ++ arch/arm/dts/imx6dl-gw54xx.dts | 71 ++ arch/arm/dts/imx6dl-gw551x.dts | 55 ++ arch/arm/dts/imx6dl-gw552x.dts | 14 + arch/arm/dts/imx6dl-gw553x.dts | 55 ++ arch/arm/dts/imx6dl-gw560x.dts | 55 ++ arch/arm/dts/imx6dl-gw5903.dts | 55 ++ arch/arm/dts/imx6dl-gw5904.dts | 55 ++ arch/arm/dts/imx6dl-gw5907.dts | 14 + arch/arm/dts/imx6dl-gw5910.dts | 14 + arch/arm/dts/imx6dl-gw5912.dts | 13 + arch/arm/dts/imx6dl-gw5913.dts | 14 + arch/arm/dts/imx6q-gw51xx.dts | 13 + arch/arm/dts/imx6q-gw52xx.dts | 75 ++ arch/arm/dts/imx6q-gw53xx.dts | 75 ++ arch/arm/dts/imx6q-gw54xx.dts | 177 +++++ arch/arm/dts/imx6q-gw551x.dts | 55 ++ arch/arm/dts/imx6q-gw552x.dts | 18 + arch/arm/dts/imx6q-gw553x.dts | 55 ++ arch/arm/dts/imx6q-gw560x.dts | 59 ++ arch/arm/dts/imx6q-gw5903.dts | 55 ++ arch/arm/dts/imx6q-gw5904.dts | 59 ++ arch/arm/dts/imx6q-gw5907.dts | 14 + arch/arm/dts/imx6q-gw5910.dts | 14 + arch/arm/dts/imx6q-gw5912.dts | 13 + arch/arm/dts/imx6q-gw5913.dts | 14 + arch/arm/dts/imx6qdl-gw51xx.dtsi | 637 +++++++++++++++++ arch/arm/dts/imx6qdl-gw52xx.dtsi | 780 +++++++++++++++++++++ arch/arm/dts/imx6qdl-gw53xx.dtsi | 770 ++++++++++++++++++++ arch/arm/dts/imx6qdl-gw54xx.dtsi | 864 +++++++++++++++++++++++ arch/arm/dts/imx6qdl-gw551x.dtsi | 697 ++++++++++++++++++ arch/arm/dts/imx6qdl-gw552x.dtsi | 521 ++++++++++++++ arch/arm/dts/imx6qdl-gw553x.dtsi | 737 +++++++++++++++++++ arch/arm/dts/imx6qdl-gw560x.dtsi | 934 +++++++++++++++++++++++++ arch/arm/dts/imx6qdl-gw5903.dtsi | 795 +++++++++++++++++++++ arch/arm/dts/imx6qdl-gw5904.dtsi | 812 +++++++++++++++++++++ arch/arm/dts/imx6qdl-gw5907.dtsi | 538 ++++++++++++++ arch/arm/dts/imx6qdl-gw5910.dtsi | 666 ++++++++++++++++++ arch/arm/dts/imx6qdl-gw5912.dtsi | 608 ++++++++++++++++ arch/arm/dts/imx6qdl-gw5913.dtsi | 500 +++++++++++++ board/gateworks/gw_ventana/MAINTAINERS | 48 ++ 44 files changed, 11201 insertions(+) create mode 100644 arch/arm/dts/imx6dl-gw51xx.dts create mode 100644 arch/arm/dts/imx6dl-gw52xx.dts create mode 100644 arch/arm/dts/imx6dl-gw53xx.dts create mode 100644 arch/arm/dts/imx6dl-gw54xx.dts create mode 100644 arch/arm/dts/imx6dl-gw551x.dts create mode 100644 arch/arm/dts/imx6dl-gw552x.dts create mode 100644 arch/arm/dts/imx6dl-gw553x.dts create mode 100644 arch/arm/dts/imx6dl-gw560x.dts create mode 100644 arch/arm/dts/imx6dl-gw5903.dts create mode 100644 arch/arm/dts/imx6dl-gw5904.dts create mode 100644 arch/arm/dts/imx6dl-gw5907.dts create mode 100644 arch/arm/dts/imx6dl-gw5910.dts create mode 100644 arch/arm/dts/imx6dl-gw5912.dts create mode 100644 arch/arm/dts/imx6dl-gw5913.dts create mode 100644 arch/arm/dts/imx6q-gw51xx.dts create mode 100644 arch/arm/dts/imx6q-gw52xx.dts create mode 100644 arch/arm/dts/imx6q-gw53xx.dts create mode 100644 arch/arm/dts/imx6q-gw54xx.dts create mode 100644 arch/arm/dts/imx6q-gw551x.dts create mode 100644 arch/arm/dts/imx6q-gw552x.dts create mode 100644 arch/arm/dts/imx6q-gw553x.dts create mode 100644 arch/arm/dts/imx6q-gw560x.dts create mode 100644 arch/arm/dts/imx6q-gw5903.dts create mode 100644 arch/arm/dts/imx6q-gw5904.dts create mode 100644 arch/arm/dts/imx6q-gw5907.dts create mode 100644 arch/arm/dts/imx6q-gw5910.dts create mode 100644 arch/arm/dts/imx6q-gw5912.dts create mode 100644 arch/arm/dts/imx6q-gw5913.dts create mode 100644 arch/arm/dts/imx6qdl-gw51xx.dtsi create mode 100644 arch/arm/dts/imx6qdl-gw52xx.dtsi create mode 100644 arch/arm/dts/imx6qdl-gw53xx.dtsi create mode 100644 arch/arm/dts/imx6qdl-gw54xx.dtsi create mode 100644 arch/arm/dts/imx6qdl-gw551x.dtsi create mode 100644 arch/arm/dts/imx6qdl-gw552x.dtsi create mode 100644 arch/arm/dts/imx6qdl-gw553x.dtsi create mode 100644 arch/arm/dts/imx6qdl-gw560x.dtsi create mode 100644 arch/arm/dts/imx6qdl-gw5903.dtsi create mode 100644 arch/arm/dts/imx6qdl-gw5904.dtsi create mode 100644 arch/arm/dts/imx6qdl-gw5907.dtsi create mode 100644 arch/arm/dts/imx6qdl-gw5910.dtsi create mode 100644 arch/arm/dts/imx6qdl-gw5912.dtsi create mode 100644 arch/arm/dts/imx6qdl-gw5913.dtsi
arch/arm/dts/Makefile +28 -0
@@ -653,6 +653,20 @@ dtb-y += \ imx6dl-cubox-i-emmc-som-v15.dtb \ imx6dl-cubox-i-som-v15.dtb \ imx6dl-dhcom-pdk2.dtb \ + imx6dl-gw51xx.dtb \ + imx6dl-gw52xx.dtb \ + imx6dl-gw53xx.dtb \ + imx6dl-gw54xx.dtb \ + imx6dl-gw551x.dtb \ + imx6dl-gw552x.dtb \ + imx6dl-gw553x.dtb \ + imx6dl-gw560x.dtb \ + imx6dl-gw5903.dtb \ + imx6dl-gw5904.dtb \ + imx6dl-gw5907.dtb \ + imx6dl-gw5910.dtb \ + imx6dl-gw5912.dtb \ + imx6dl-gw5913.dtb \ imx6dl-hummingboard2.dtb \ imx6dl-hummingboard2-emmc-som-v15.dtb \ imx6dl-hummingboard2-som-v15.dtb \
@@ -682,6 +696,20 @@ dtb-y += \ imx6q-cubox-i-som-v15.dtb \ imx6q-dhcom-pdk2.dtb \ imx6q-display5.dtb \ + imx6q-gw51xx.dtb \ + imx6q-gw52xx.dtb \ + imx6q-gw53xx.dtb \ + imx6q-gw54xx.dtb \ + imx6q-gw551x.dtb \ + imx6q-gw552x.dtb \ + imx6q-gw553x.dtb \ + imx6q-gw560x.dtb \ + imx6q-gw5903.dtb \ + imx6q-gw5904.dtb \ + imx6q-gw5907.dtb \ + imx6q-gw5910.dtb \ + imx6q-gw5912.dtb \ + imx6q-gw5913.dtb \ imx6q-hummingboard2.dtb \ imx6q-hummingboard2-emmc-som-v15.dtb \ imx6q-hummingboard2-som-v15.dtb \
arch/arm/dts/imx6dl-gw51xx.dts new file +13 -0
@@ -0,0 +1,13 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* + * Copyright 2013 Gateworks Corporation + */ + +/dts-v1/; +#include "imx6dl.dtsi" +#include "imx6qdl-gw51xx.dtsi" + +/ { + model = "Gateworks Ventana i.MX6 DualLite/Solo GW51XX"; + compatible = "gw,imx6dl-gw51xx", "gw,ventana", "fsl,imx6dl"; +};
arch/arm/dts/imx6dl-gw52xx.dts new file +71 -0
71 lines not on this page · raw message
arch/arm/dts/imx6dl-gw53xx.dts new file +71 -0
71 lines not on this page · raw message
arch/arm/dts/imx6dl-gw54xx.dts new file +71 -0
71 lines not on this page · raw message
arch/arm/dts/imx6dl-gw551x.dts new file +55 -0
55 lines not on this page · raw message
arch/arm/dts/imx6dl-gw552x.dts new file +14 -0
@@ -0,0 +1,14 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* + * Copyright 2014 Gateworks Corporation + */ + +/dts-v1/; + +#include "imx6dl.dtsi" +#include "imx6qdl-gw552x.dtsi" + +/ { + model = "Gateworks Ventana i.MX6 DualLite/Solo GW552X"; + compatible = "gw,imx6dl-gw552x", "gw,ventana", "fsl,imx6dl"; +};
arch/arm/dts/imx6dl-gw553x.dts new file +55 -0
55 lines not on this page · raw message
arch/arm/dts/imx6dl-gw560x.dts new file +55 -0
55 lines not on this page · raw message
arch/arm/dts/imx6dl-gw5903.dts new file +55 -0
55 lines not on this page · raw message
arch/arm/dts/imx6dl-gw5904.dts new file +55 -0
55 lines not on this page · raw message
arch/arm/dts/imx6dl-gw5907.dts new file +14 -0
@@ -0,0 +1,14 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright 2019 Gateworks Corporation + */ + +/dts-v1/; + +#include "imx6dl.dtsi" +#include "imx6qdl-gw5907.dtsi" + +/ { + model = "Gateworks Ventana i.MX6 DualLite/Solo GW5907"; + compatible = "gw,imx6dl-gw5907", "gw,ventana", "fsl,imx6dl"; +};
arch/arm/dts/imx6dl-gw5910.dts new file +14 -0
@@ -0,0 +1,14 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright 2019 Gateworks Corporation + */ + +/dts-v1/; + +#include "imx6dl.dtsi" +#include "imx6qdl-gw5910.dtsi" + +/ { + model = "Gateworks Ventana i.MX6 DualLite/Solo GW5910"; + compatible = "gw,imx6dl-gw5910", "gw,ventana", "fsl,imx6dl"; +};
arch/arm/dts/imx6dl-gw5912.dts new file +13 -0
@@ -0,0 +1,13 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright 2019 Gateworks Corporation + */ + +/dts-v1/; +#include "imx6dl.dtsi" +#include "imx6qdl-gw5912.dtsi" + +/ { + model = "Gateworks Ventana i.MX6 DualLite/Solo GW5912"; + compatible = "gw,imx6dl-gw5912", "gw,ventana", "fsl,imx6dl"; +};
arch/arm/dts/imx6dl-gw5913.dts new file +14 -0
@@ -0,0 +1,14 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright 2019 Gateworks Corporation + */ + +/dts-v1/; + +#include "imx6dl.dtsi" +#include "imx6qdl-gw5913.dtsi" + +/ { + model = "Gateworks Ventana i.MX6 DualLite/Solo GW5913"; + compatible = "gw,imx6dl-gw5913", "gw,ventana", "fsl,imx6dl"; +};
arch/arm/dts/imx6q-gw51xx.dts new file +13 -0
@@ -0,0 +1,13 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* + * Copyright 2013 Gateworks Corporation + */ + +/dts-v1/; +#include "imx6q.dtsi" +#include "imx6qdl-gw51xx.dtsi" + +/ { + model = "Gateworks Ventana i.MX6 Dual/Quad GW51XX"; + compatible = "gw,imx6q-gw51xx", "gw,ventana", "fsl,imx6q"; +};
arch/arm/dts/imx6q-gw52xx.dts new file +75 -0
75 lines not on this page · raw message
arch/arm/dts/imx6q-gw53xx.dts new file +75 -0
75 lines not on this page · raw message
arch/arm/dts/imx6q-gw54xx.dts new file +177 -0
177 lines not on this page · raw message
arch/arm/dts/imx6q-gw551x.dts new file +55 -0
55 lines not on this page · raw message
arch/arm/dts/imx6q-gw552x.dts new file +18 -0
@@ -0,0 +1,18 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* + * Copyright 2014 Gateworks Corporation + */ + +/dts-v1/; + +#include "imx6q.dtsi" +#include "imx6qdl-gw552x.dtsi" + +/ { + model = "Gateworks Ventana i.MX6 Dual/Quad GW552X"; + compatible = "gw,imx6q-gw552x", "gw,ventana", "fsl,imx6q"; +}; + +&sata { + status = "okay"; +};
arch/arm/dts/imx6q-gw553x.dts new file +55 -0
55 lines not on this page · raw message
arch/arm/dts/imx6q-gw560x.dts new file +59 -0
59 lines not on this page · raw message
arch/arm/dts/imx6q-gw5903.dts new file +55 -0
55 lines not on this page · raw message
arch/arm/dts/imx6q-gw5904.dts new file +59 -0
59 lines not on this page · raw message
arch/arm/dts/imx6q-gw5907.dts new file +14 -0
@@ -0,0 +1,14 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright 2019 Gateworks Corporation + */ + +/dts-v1/; + +#include "imx6q.dtsi" +#include "imx6qdl-gw5907.dtsi" + +/ { + model = "Gateworks Ventana i.MX6 Dual/Quad GW5907"; + compatible = "gw,imx6q-gw5907", "gw,ventana", "fsl,imx6q"; +};
arch/arm/dts/imx6q-gw5910.dts new file +14 -0
@@ -0,0 +1,14 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright 2019 Gateworks Corporation + */ + +/dts-v1/; + +#include "imx6q.dtsi" +#include "imx6qdl-gw5910.dtsi" + +/ { + model = "Gateworks Ventana i.MX6 Dual/Quad GW5910"; + compatible = "gw,imx6q-gw5910", "gw,ventana", "fsl,imx6q"; +};
arch/arm/dts/imx6q-gw5912.dts new file +13 -0
@@ -0,0 +1,13 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright 2019 Gateworks Corporation + */ + +/dts-v1/; +#include "imx6q.dtsi" +#include "imx6qdl-gw5912.dtsi" + +/ { + model = "Gateworks Ventana i.MX6 Dual/Quad GW5912"; + compatible = "gw,imx6q-gw5912", "gw,ventana", "fsl,imx6q"; +};
arch/arm/dts/imx6q-gw5913.dts new file +14 -0
@@ -0,0 +1,14 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright 2019 Gateworks Corporation + */ + +/dts-v1/; + +#include "imx6q.dtsi" +#include "imx6qdl-gw5913.dtsi" + +/ { + model = "Gateworks Ventana i.MX6 Dual/Quad GW5913"; + compatible = "gw,imx6q-gw5913", "gw,ventana", "fsl,imx6q"; +};
arch/arm/dts/imx6qdl-gw51xx.dtsi new file +637 -0
637 lines not on this page · raw message
arch/arm/dts/imx6qdl-gw52xx.dtsi new file +780 -0
780 lines not on this page · raw message
arch/arm/dts/imx6qdl-gw53xx.dtsi new file +770 -0
277 lines not on this page · raw message
arch/arm/dts/imx6qdl-gw54xx.dtsi new file +864 -0
864 lines not on this page · raw message
arch/arm/dts/imx6qdl-gw551x.dtsi new file +697 -0
697 lines not on this page · raw message
arch/arm/dts/imx6qdl-gw552x.dtsi new file +521 -0
521 lines not on this page · raw message
arch/arm/dts/imx6qdl-gw553x.dtsi new file +737 -0
737 lines not on this page · raw message
arch/arm/dts/imx6qdl-gw560x.dtsi new file +934 -0
934 lines not on this page · raw message
arch/arm/dts/imx6qdl-gw5903.dtsi new file +795 -0
795 lines not on this page · raw message
arch/arm/dts/imx6qdl-gw5904.dtsi new file +812 -0
812 lines not on this page · raw message
arch/arm/dts/imx6qdl-gw5907.dtsi new file +538 -0
538 lines not on this page · raw message
arch/arm/dts/imx6qdl-gw5910.dtsi new file +666 -0
666 lines not on this page · raw message
arch/arm/dts/imx6qdl-gw5912.dtsi new file +608 -0
608 lines not on this page · raw message
arch/arm/dts/imx6qdl-gw5913.dtsi new file +500 -0
500 lines not on this page · raw message
board/gateworks/gw_ventana/MAINTAINERS +48 -0
48 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.17.1
Part of the diff is not shown here. View the raw message.
PATCH 4/11 imx: ventana: add Gateworks Ventana dts
Quoted 3 lines
Add Gateworks Ventana dts/dtsi files from Linux 5.11 in preparation for conversion to driver-model.
Signed-off-by Tim Harvey <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================
PATCH 5/11 arm: dts: imx6qdl-gw*: add dr_mode prop to dt to avoid error
In reply to Tim HarveyThe fsl-usb dt bindings in Linux default dr_mode to 'host' for backward compatibility however U-Boot prints an error if this property does not exist. Declare it in the Gateworks Ventana device-trees to avoid the error.
--- arch/arm/dts/imx6qdl-gw51xx.dtsi | 1 + arch/arm/dts/imx6qdl-gw52xx.dtsi | 1 + arch/arm/dts/imx6qdl-gw53xx.dtsi | 1 + arch/arm/dts/imx6qdl-gw54xx.dtsi | 1 + arch/arm/dts/imx6qdl-gw551x.dtsi | 1 + arch/arm/dts/imx6qdl-gw552x.dtsi | 1 + arch/arm/dts/imx6qdl-gw553x.dtsi | 1 + arch/arm/dts/imx6qdl-gw560x.dtsi | 1 + arch/arm/dts/imx6qdl-gw5903.dtsi | 1 + arch/arm/dts/imx6qdl-gw5904.dtsi | 1 + arch/arm/dts/imx6qdl-gw5907.dtsi | 1 + arch/arm/dts/imx6qdl-gw5910.dtsi | 1 + arch/arm/dts/imx6qdl-gw5913.dtsi | 1 + 13 files changed, 13 insertions(+)
arch/arm/dts/imx6qdl-gw51xx.dtsi +1 -0
@@ -450,6 +450,7 @@ pinctrl-names = "default"; pinctrl-0 = <&pinctrl_usbotg>; disable-over-current; + dr_mode = "otg"; status = "okay"; };
arch/arm/dts/imx6qdl-gw52xx.dtsi +1 -0
@@ -544,6 +544,7 @@ pinctrl-names = "default"; pinctrl-0 = <&pinctrl_usbotg>; disable-over-current; + dr_mode = "otg"; status = "okay"; };
arch/arm/dts/imx6qdl-gw53xx.dtsi +1 -0
@@ -541,6 +541,7 @@ pinctrl-names = "default"; pinctrl-0 = <&pinctrl_usbotg>; disable-over-current; + dr_mode = "otg"; status = "okay"; };
arch/arm/dts/imx6qdl-gw54xx.dtsi +1 -0
@@ -611,6 +611,7 @@ pinctrl-names = "default"; pinctrl-0 = <&pinctrl_usbotg>; disable-over-current; + dr_mode = "otg"; status = "okay"; };
arch/arm/dts/imx6qdl-gw551x.dtsi +1 -0
@@ -536,6 +536,7 @@ pinctrl-names = "default"; pinctrl-0 = <&pinctrl_usbotg>; disable-over-current; + dr_mode = "otg"; status = "okay"; };
arch/arm/dts/imx6qdl-gw552x.dtsi +1 -0
@@ -402,6 +402,7 @@ pinctrl-names = "default"; pinctrl-0 = <&pinctrl_usbotg>; disable-over-current; + dr_mode = "otg"; status = "okay"; };
arch/arm/dts/imx6qdl-gw553x.dtsi +1 -0
@@ -509,6 +509,7 @@ pinctrl-names = "default"; pinctrl-0 = <&pinctrl_usbotg>; disable-over-current; + dr_mode = "otg"; status = "okay"; };
arch/arm/dts/imx6qdl-gw560x.dtsi +1 -0
@@ -656,6 +656,7 @@ pinctrl-names = "default"; pinctrl-0 = <&pinctrl_usbotg>; disable-over-current; + dr_mode = "otg"; status = "okay"; };
arch/arm/dts/imx6qdl-gw5903.dtsi +1 -0
@@ -531,6 +531,7 @@ pinctrl-names = "default"; pinctrl-0 = <&pinctrl_usbotg>; disable-over-current; + dr_mode = "host"; status = "okay"; };
arch/arm/dts/imx6qdl-gw5904.dtsi +1 -0
@@ -583,6 +583,7 @@ pinctrl-names = "default"; pinctrl-0 = <&pinctrl_usbotg>; disable-over-current; + dr_mode = "otg"; status = "okay"; };
arch/arm/dts/imx6qdl-gw5907.dtsi +1 -0
@@ -378,6 +378,7 @@ pinctrl-names = "default"; pinctrl-0 = <&pinctrl_usbotg>; disable-over-current; + dr_mode = "otg"; status = "okay"; };
arch/arm/dts/imx6qdl-gw5910.dtsi +1 -0
@@ -398,6 +398,7 @@ pinctrl-names = "default"; pinctrl-0 = <&pinctrl_usbotg>; disable-over-current; + dr_mode = "host"; status = "okay"; };
arch/arm/dts/imx6qdl-gw5913.dtsi +1 -0
@@ -343,6 +343,7 @@ pinctrl-names = "default"; pinctrl-0 = <&pinctrl_usbotg>; disable-over-current; + dr_mode = "host"; status = "okay"; };
Signature · 1 line
2.17.1
PATCH 5/11 arm: dts: imx6qdl-gw*: add dr_mode prop to dt to avoid error
Quoted 5 lines · Tim Harvey
The fsl-usb dt bindings in Linux default
dr_modeto 'host' for backward compatibility however U-Boot prints an error if this property does not exist. Declare it in the Gateworks Ventana device-trees to avoid the error.
Is there any reason not to fix the driver not to error if this property is missing rather than working around it like this?
Quoted 176 lines
Signed-off-by Tim Harvey <[email protected]>--- arch/arm/dts/imx6qdl-gw51xx.dtsi | 1 + arch/arm/dts/imx6qdl-gw52xx.dtsi | 1 + arch/arm/dts/imx6qdl-gw53xx.dtsi | 1 + arch/arm/dts/imx6qdl-gw54xx.dtsi | 1 + arch/arm/dts/imx6qdl-gw551x.dtsi | 1 + arch/arm/dts/imx6qdl-gw552x.dtsi | 1 + arch/arm/dts/imx6qdl-gw553x.dtsi | 1 + arch/arm/dts/imx6qdl-gw560x.dtsi | 1 + arch/arm/dts/imx6qdl-gw5903.dtsi | 1 + arch/arm/dts/imx6qdl-gw5904.dtsi | 1 + arch/arm/dts/imx6qdl-gw5907.dtsi | 1 + arch/arm/dts/imx6qdl-gw5910.dtsi | 1 + arch/arm/dts/imx6qdl-gw5913.dtsi | 1 + 13 files changed, 13 insertions(+)arch/arm/dts/imx6qdl-gw51xx.dtsi +1
-0@@ -450,6 +450,7 @@ pinctrl-names = "default"; pinctrl-0 = <&pinctrl_usbotg>; disable-over-current; + dr_mode = "otg"; status = "okay"; };arch/arm/dts/imx6qdl-gw52xx.dtsi +1
-0@@ -544,6 +544,7 @@ pinctrl-names = "default"; pinctrl-0 = <&pinctrl_usbotg>; disable-over-current; + dr_mode = "otg"; status = "okay"; };arch/arm/dts/imx6qdl-gw53xx.dtsi +1
-0@@ -541,6 +541,7 @@ pinctrl-names = "default"; pinctrl-0 = <&pinctrl_usbotg>; disable-over-current; + dr_mode = "otg"; status = "okay"; };arch/arm/dts/imx6qdl-gw54xx.dtsi +1
-0@@ -611,6 +611,7 @@ pinctrl-names = "default"; pinctrl-0 = <&pinctrl_usbotg>; disable-over-current; + dr_mode = "otg"; status = "okay"; };arch/arm/dts/imx6qdl-gw551x.dtsi +1
-0@@ -536,6 +536,7 @@ pinctrl-names = "default"; pinctrl-0 = <&pinctrl_usbotg>; disable-over-current; + dr_mode = "otg"; status = "okay"; };arch/arm/dts/imx6qdl-gw552x.dtsi +1
-0@@ -402,6 +402,7 @@ pinctrl-names = "default"; pinctrl-0 = <&pinctrl_usbotg>; disable-over-current; + dr_mode = "otg"; status = "okay"; };arch/arm/dts/imx6qdl-gw553x.dtsi +1
-0@@ -509,6 +509,7 @@ pinctrl-names = "default"; pinctrl-0 = <&pinctrl_usbotg>; disable-over-current; + dr_mode = "otg"; status = "okay"; };arch/arm/dts/imx6qdl-gw560x.dtsi +1
-0@@ -656,6 +656,7 @@ pinctrl-names = "default"; pinctrl-0 = <&pinctrl_usbotg>; disable-over-current; + dr_mode = "otg"; status = "okay"; };arch/arm/dts/imx6qdl-gw5903.dtsi +1
-0@@ -531,6 +531,7 @@ pinctrl-names = "default"; pinctrl-0 = <&pinctrl_usbotg>; disable-over-current; + dr_mode = "host"; status = "okay"; };arch/arm/dts/imx6qdl-gw5904.dtsi +1
-0@@ -583,6 +583,7 @@ pinctrl-names = "default"; pinctrl-0 = <&pinctrl_usbotg>; disable-over-current; + dr_mode = "otg"; status = "okay"; };arch/arm/dts/imx6qdl-gw5907.dtsi +1
-0@@ -378,6 +378,7 @@ pinctrl-names = "default"; pinctrl-0 = <&pinctrl_usbotg>; disable-over-current; + dr_mode = "otg"; status = "okay"; };arch/arm/dts/imx6qdl-gw5910.dtsi +1
-0@@ -398,6 +398,7 @@ pinctrl-names = "default"; pinctrl-0 = <&pinctrl_usbotg>; disable-over-current; + dr_mode = "host"; status = "okay"; };arch/arm/dts/imx6qdl-gw5913.dtsi +1
-1@@ -343,6 +343,7 @@ pinctrl-names = "default"; pinctrl-0 = <&pinctrl_usbotg>; disable-over-current; + dr_mode = "host"; status = "okay"; }; --2.17.1
PATCH 5/11 arm: dts: imx6qdl-gw*: add dr_mode prop to dt to avoid error
Quoted 11 lines · Peter Robinson
Quoted 5 lines · Tim Harvey
The fsl-usb dt bindings in Linux default
dr_modeto 'host' for backward compatibility however U-Boot prints an error if this property does not exist. Declare it in the Gateworks Ventana device-trees to avoid the error.Is there any reason not to fix the driver not to error if this property is missing rather than working around it like this?
Peter,
The usb_get_dr_mode function that produces the error is used by a number of drivers that are not all going to have the same default. I think it's best to augment the device-tree anyway (which I will likely do in Linux as well).
Tim
PATCH 5/11 arm: dts: imx6qdl-gw*: add dr_mode prop to dt to avoid error
In reply to Tim HarveyQuoted 5 lines
The fsl-usb dt bindings in Linux default
dr_modeto 'host' for backward compatibility however U-Boot prints an error if this property does not exist. Declare it in the Gateworks Ventana device-trees to avoid the error.Signed-off-by Tim Harvey <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================
PATCH 6/11 imx: ventana: convert U-Boot to OF_CONTROL using FIT image
In reply to Tim HarveyIn preparation for dm conversion convert to OF_CONTROL by adding FIT image support and multi dtb.
Add a board_fit_config_name_match to match the dtb based off of EEPROM model.
--- board/gateworks/gw_ventana/gsc.c | 88 +++++++++++++++++++++ board/gateworks/gw_ventana/gsc.h | 1 + board/gateworks/gw_ventana/gw_ventana.c | 20 ++++- board/gateworks/gw_ventana/gw_ventana_spl.c | 10 ++- configs/gwventana_emmc_defconfig | 10 ++- configs/gwventana_gw5904_defconfig | 10 ++- configs/gwventana_nand_defconfig | 10 ++- 7 files changed, 144 insertions(+), 5 deletions(-)
board/gateworks/gw_ventana/gsc.c +88 -0
@@ -14,6 +14,8 @@#include <i2c.h> #include <linux/ctype.h> +#include <asm/arch/sys_proto.h> +#include "ventana_eeprom.h" #include "gsc.h"
@@ -179,6 +181,92 @@ int gsc_boot_wd_disable(void)return 1 ; } +/* determine BOM revision from model */ +int get_bom_rev (const char *str) +{ +int rev_bom =0 ; +int i; + +for (i =strlen (str) -1 ; i >0 ; i--) { +if (str[i] =='-' ) +break ; +if (str[i] >='1' && str[i] <='9' ) { + rev_bom = str[i] -'0' ; +break ; + } + } +return rev_bom; +} + +/* determine PCB revision from model */ +char get_pcb_rev (const char *str) +{ +char rev_pcb ='A' ; +int i; + +for (i =strlen (str) -1 ; i >0 ; i--) { +if (str[i] =='-' ) +break ; +if (str[i] >='A' ) { + rev_pcb = str[i]; +break ; + } + } +return rev_pcb; +} + +/* +* get dt name based on model and detail level: +*/ +const char *gsc_get_dtb_name (int level,char *buf,int sz) +{ +const char *model = (const char *)ventana_info.model; +const char *pre =is_mx6dq () ?"imx6q-" :"imx6dl-" ; +int modelno, rev_pcb, rev_bom; + +/* a few board models are dt equivalents to other models */ +if (strncasecmp (model,"gw5906" ,6 ) ==0 ) + model ="gw552x-d" ; +else if (strncasecmp (model,"gw5908" ,6 ) ==0 ) + model ="gw53xx-f" ; +else if (strncasecmp (model,"gw5905" ,6 ) ==0 ) + model ="gw5904-a" ; + + modelno = ((model[2 ] -'0' ) *1000 ) + + ((model[3 ] -'0' ) *100 ) + + ((model[4 ] -'0' ) *10 ) + + (model[5 ] -'0' ); + rev_pcb =tolower (get_pcb_rev (model)); + rev_bom =get_bom_rev (model); + +/* compare model/rev/bom in order of most specific to least */ +snprintf (buf, sz,"%s%04d" , pre, modelno); +switch (level) { +case 0 :/* full model first (ie gw5400-a1) */ +if (rev_bom) { +snprintf (buf, sz,"%sgw%04d-%c%d" , pre, modelno, rev_pcb, rev_bom); +break ; + } + fallthrough; +case 1 :/* don't care about bom rev (ie gw5400-a) */ +snprintf (buf, sz,"%sgw%04d-%c" , pre, modelno, rev_pcb); +break ; +case 2 :/* don't care about the pcb rev (ie gw5400) */ +snprintf (buf, sz,"%sgw%04d" , pre, modelno); +break ; +case 3 :/* look for generic model (ie gw540x) */ +snprintf (buf, sz,"%sgw%03dx" , pre, modelno /10 ); +break ; +case 4 :/* look for more generic model (ie gw54xx) */ +snprintf (buf, sz,"%sgw%02dxx" , pre, modelno /100 ); +break ; +default :/* give up */ +return NULL ; + } + +return buf; +} +#if defined(CONFIG_CMD_GSC ) && !defined(CONFIG_SPL_BUILD )static int do_gsc_sleep (struct cmd_tbl *cmdtp,int flag,int argc,char *const argv[])
board/gateworks/gw_ventana/gsc.h +1 -0
@@ -67,5 +67,6 @@ int gsc_i2c_read(uchar chip, uint addr, int alen, uchar *buf, int len);int gsc_i2c_write (uchar chip,uint addr,int alen,uchar *buf,int len);int gsc_info (int verbose);int gsc_boot_wd_disable (void ); +const char *gsc_get_dtb_name (int level,char *buf,int sz);#endif
board/gateworks/gw_ventana/gw_ventana.c +19 -1
@@ -55,7 +55,6 @@ DECLARE_GLOBAL_DATA_PTR;* read it once. */ struct ventana_board_info ventana_info; -static int board_type;/* ENET */
@@ -676,6 +675,25 @@ int board_init(void)return 0 ; } +int board_fit_config_name_match (const char *name) +{ +static char init; +const char *dtb; +char buf[32 ]; +int i =0 ; + +do { + dtb =gsc_get_dtb_name (i++, buf,sizeof (buf)); +if (dtb && !strcmp (dtb, name)) { +if (!init++) +printf ("DTB: %s\n" , name); +return 0 ; + } + }while (dtb); + +return -1 ; +} +#if defined(CONFIG_DISPLAY_BOARDINFO_LATE )/* * called during late init (after relocation and after board_init())
board/gateworks/gw_ventana/gw_ventana_spl.c +9 -1
@@ -731,8 +731,16 @@ void board_boot_order(u32 *spl_boot_list)/* its our chance to print info about boot device */ void spl_board_init (void ) { +u32 boot_device; +int board_type; +/* determine boot device from SRC_SBMR1 (BOOT_CFG[4:1]) or SRC_GPR9 */ -u32 boot_device =spl_boot_device (); + boot_device =spl_boot_device (); + +/* read eeprom again now that we have gd */ + board_type =read_eeprom (CONFIG_I2C_GSC , &ventana_info); +if (board_type ==GW_UNKNOWN ) +hang ();switch (boot_device) {case BOOT_DEVICE_MMC1 :
configs/gwventana_emmc_defconfig +9 -1
@@ -18,8 +18,12 @@ CONFIG_SPL_STACK_R_ADDR=0x18000000 CONFIG_SPL=y CONFIG_ENV_OFFSET_REDUND=0xD1400 CONFIG_CMD_HDMIDETECT=y +CONFIG_DEFAULT_DEVICE_TREE="imx6q-gw54xx" CONFIG_FIT=y CONFIG_FIT_VERBOSE=y +CONFIG_SPL_LOAD_FIT=y +# CONFIG_USE_SPL_FIT_GENERATOR is not set +# CONFIG_LEGACY_IMAGE_FORMAT is not set CONFIG_SUPPORT_RAW_INITRD=y CONFIG_OF_BOARD_SETUP=y CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/mach-imx/spl_sd.cfg"
@@ -31,6 +35,7 @@ CONFIG_BOARD_EARLY_INIT_F=y CONFIG_MISC_INIT_R=y CONFIG_SPL_BOARD_INIT=y CONFIG_SPL_STACK_R=y +CONFIG_SPL_FIT_IMAGE_TINY=y CONFIG_SPL_DMA=y CONFIG_SPL_I2C_SUPPORT=y CONFIG_SPL_OS_BOOT=y
@@ -62,6 +67,9 @@ CONFIG_CMD_MTDPARTS=y CONFIG_MTDIDS_DEFAULT="nand0=nand" CONFIG_MTDPARTS_DEFAULT="mtdparts=nand:16m(uboot),1m(env),-(rootfs)" CONFIG_CMD_UBI=y +CONFIG_OF_CONTROL=y +CONFIG_OF_LIST="imx6q-gw51xx imx6dl-gw51xx imx6q-gw52xx imx6dl-gw52xx imx6q-gw53xx imx6dl-gw53xx imx6q-gw54xx imx6dl-gw54xx imx6q-gw551x imx6dl-gw551x imx6q-gw552x imx6dl-gw552x imx6q-gw553x imx6dl-gw553x imx6q-gw560x imx6dl-gw560x imx6q-gw5903 imx6dl-gw5903 imx6q-gw5904 imx6dl-gw5904 imx6q-gw5907 imx6dl-gw5907 imx6q-gw5910 imx6dl-gw5910 imx6q-gw5912 imx6dl-gw5912 imx6q-gw5913 imx6dl-gw5913" +CONFIG_MULTI_DTB_FIT=y CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_MMC=y CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
@@ -79,6 +87,7 @@ CONFIG_PHYLIB=y CONFIG_E1000=y CONFIG_MII=y CONFIG_PCI=y +CONFIG_CONS_INDEX=2 CONFIG_DM_SERIAL=y CONFIG_MXC_UART=y CONFIG_DM_THERMAL=y
@@ -107,5 +116,4 @@ CONFIG_DM_VIDEO=y CONFIG_SYS_WHITE_ON_BLACK=y # CONFIG_PANEL is not set CONFIG_VIDEO_IPUV3=y -CONFIG_OF_LIBFDT=y CONFIG_FDT_FIXUP_PARTITIONS=y
configs/gwventana_gw5904_defconfig +9 -1
@@ -18,8 +18,12 @@ CONFIG_SPL_STACK_R_ADDR=0x18000000 CONFIG_SPL=y CONFIG_ENV_OFFSET_REDUND=0xD1400 CONFIG_CMD_HDMIDETECT=y +CONFIG_DEFAULT_DEVICE_TREE="imx6q-gw54xx" CONFIG_FIT=y CONFIG_FIT_VERBOSE=y +CONFIG_SPL_LOAD_FIT=y +# CONFIG_USE_SPL_FIT_GENERATOR is not set +# CONFIG_LEGACY_IMAGE_FORMAT is not set CONFIG_SUPPORT_RAW_INITRD=y CONFIG_OF_BOARD_SETUP=y CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/mach-imx/spl_sd.cfg"
@@ -31,6 +35,7 @@ CONFIG_BOARD_EARLY_INIT_F=y CONFIG_MISC_INIT_R=y CONFIG_SPL_BOARD_INIT=y CONFIG_SPL_STACK_R=y +CONFIG_SPL_FIT_IMAGE_TINY=y CONFIG_SPL_DMA=y CONFIG_SPL_I2C_SUPPORT=y CONFIG_SPL_OS_BOOT=y
@@ -62,6 +67,9 @@ CONFIG_CMD_MTDPARTS=y CONFIG_MTDIDS_DEFAULT="nand0=nand" CONFIG_MTDPARTS_DEFAULT="mtdparts=nand:16m(uboot),1m(env),-(rootfs)" CONFIG_CMD_UBI=y +CONFIG_OF_CONTROL=y +CONFIG_OF_LIST="imx6q-gw51xx imx6dl-gw51xx imx6q-gw52xx imx6dl-gw52xx imx6q-gw53xx imx6dl-gw53xx imx6q-gw54xx imx6dl-gw54xx imx6q-gw551x imx6dl-gw551x imx6q-gw552x imx6dl-gw552x imx6q-gw553x imx6dl-gw553x imx6q-gw560x imx6dl-gw560x imx6q-gw5903 imx6dl-gw5903 imx6q-gw5904 imx6dl-gw5904 imx6q-gw5907 imx6dl-gw5907 imx6q-gw5910 imx6dl-gw5910 imx6q-gw5912 imx6dl-gw5912 imx6q-gw5913 imx6dl-gw5913" +CONFIG_MULTI_DTB_FIT=y CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_MMC=y CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
@@ -83,6 +91,7 @@ CONFIG_MV88E61XX_FIXED_PORTS=0x0 CONFIG_E1000=y CONFIG_MII=y CONFIG_PCI=y +CONFIG_CONS_INDEX=2 CONFIG_DM_SERIAL=y CONFIG_MXC_UART=y CONFIG_DM_THERMAL=y
@@ -111,5 +120,4 @@ CONFIG_DM_VIDEO=y CONFIG_SYS_WHITE_ON_BLACK=y # CONFIG_PANEL is not set CONFIG_VIDEO_IPUV3=y -CONFIG_OF_LIBFDT=y CONFIG_FDT_FIXUP_PARTITIONS=y
configs/gwventana_nand_defconfig +9 -1
@@ -18,8 +18,12 @@ CONFIG_SPL_STACK_R_ADDR=0x18000000 CONFIG_SPL=y CONFIG_ENV_OFFSET_REDUND=0x1080000 CONFIG_CMD_HDMIDETECT=y +CONFIG_DEFAULT_DEVICE_TREE="imx6q-gw54xx" CONFIG_FIT=y CONFIG_FIT_VERBOSE=y +CONFIG_SPL_LOAD_FIT=y +# CONFIG_USE_SPL_FIT_GENERATOR is not set +# CONFIG_LEGACY_IMAGE_FORMAT is not set CONFIG_SUPPORT_RAW_INITRD=y CONFIG_OF_BOARD_SETUP=y CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/mach-imx/spl_sd.cfg"
@@ -31,6 +35,7 @@ CONFIG_BOARD_EARLY_INIT_F=y CONFIG_MISC_INIT_R=y CONFIG_SPL_BOARD_INIT=y CONFIG_SPL_STACK_R=y +CONFIG_SPL_FIT_IMAGE_TINY=y CONFIG_SPL_DMA=y CONFIG_SPL_I2C_SUPPORT=y CONFIG_SPL_NAND_SUPPORT=y
@@ -65,6 +70,9 @@ CONFIG_CMD_MTDPARTS=y CONFIG_MTDIDS_DEFAULT="nand0=nand" CONFIG_MTDPARTS_DEFAULT="mtdparts=nand:16m(uboot),1m(env),-(rootfs)" CONFIG_CMD_UBI=y +CONFIG_OF_CONTROL=y +CONFIG_OF_LIST="imx6q-gw51xx imx6dl-gw51xx imx6q-gw52xx imx6dl-gw52xx imx6q-gw53xx imx6dl-gw53xx imx6q-gw54xx imx6dl-gw54xx imx6q-gw551x imx6dl-gw551x imx6q-gw552x imx6dl-gw552x imx6q-gw553x imx6dl-gw553x imx6q-gw560x imx6dl-gw560x imx6q-gw5903 imx6dl-gw5903 imx6q-gw5904 imx6dl-gw5904 imx6q-gw5907 imx6dl-gw5907 imx6q-gw5910 imx6dl-gw5910 imx6q-gw5912 imx6dl-gw5912 imx6q-gw5913 imx6dl-gw5913" +CONFIG_MULTI_DTB_FIT=y CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_NAND=y CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
@@ -83,6 +91,7 @@ CONFIG_PHYLIB=y CONFIG_E1000=y CONFIG_MII=y CONFIG_PCI=y +CONFIG_CONS_INDEX=2 CONFIG_DM_SERIAL=y CONFIG_MXC_UART=y CONFIG_DM_THERMAL=y
@@ -111,5 +120,4 @@ CONFIG_DM_VIDEO=y CONFIG_SYS_WHITE_ON_BLACK=y # CONFIG_PANEL is not set CONFIG_VIDEO_IPUV3=y -CONFIG_OF_LIBFDT=y CONFIG_FDT_FIXUP_PARTITIONS=y
Signature · 1 line
2.17.1
PATCH 6/11 imx: ventana: convert U-Boot to OF_CONTROL using FIT image
Quoted 5 lines
In preparation for dm conversion convert to
OF_CONTROLby adding FIT image support and multi dtb.
Add aboard_fit_config_name_matchto match the dtb based off of EEPROM model.Signed-off-by Tim Harvey <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 6/11 imx: ventana: convert U-Boot to OF_CONTROL using FIT image
Quoted 11 lines · On Thu, Apr 8, 2021 at 1:57 PM <[email protected]> wrote:
Quoted 6 lines
In preparation for dm conversion convert to
OF_CONTROLby adding FIT image support and multi dtb.
Add aboard_fit_config_name_matchto match the dtb based off of EEPROM model.Signed-off-by Tim Harvey <[email protected]>Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Stefano,
Something broke apparently between the branch I had my patches on top of and u-boot-imx/master that these got merged in. My board is hanging at dram_init_banksize - did something change recently that you are aware of that may require some changes on my end?
Thanks,
Tim
PATCH 6/11 imx: ventana: convert U-Boot to OF_CONTROL using FIT image
Hi Tim,
Quoted 13 lines · Tim Harvey
Quoted 11 lines · On Thu, Apr 8, 2021 at 1:57 PM <[email protected]> wrote:
Quoted 6 lines
In preparation for dm conversion convert to
OF_CONTROLby adding FIT image support and multi dtb.
Add aboard_fit_config_name_matchto match the dtb based off of EEPROM model.Signed-off-by Tim Harvey <[email protected]>Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Quoted 7 lines
Stefano,
Something broke apparently between the branch I had my patches on top of and u-boot-imx/master that these got merged in. My board is hanging at
dram_init_banksize- did something change recently that you are aware of that may require some changes on my end?
There are a lot of changes, but they are related to i.MX8. I have not merged something for i.MX6 that can justify this behavior. So I do not know - have you compared the two branches, at least for Ventana boards ?
Stefano
Quoted 4 lines
Thanks,
Tim
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================
PATCH 6/11 imx: ventana: convert U-Boot to OF_CONTROL using FIT image
Quoted 25 lines · Stefano Babic
Hi Tim,
Quoted 13 lines · Tim Harvey
Quoted 11 lines · On Thu, Apr 8, 2021 at 1:57 PM <[email protected]> wrote:
Quoted 6 lines
In preparation for dm conversion convert to
OF_CONTROLby adding FIT image support and multi dtb.
Add aboard_fit_config_name_matchto match the dtb based off of EEPROM model.Signed-off-by Tim Harvey <[email protected]>Applied to u-boot-imx, master, thanks !
Best regards,
Stefano BabicQuoted 7 lines
Stefano,
Something broke apparently between the branch I had my patches on top of and u-boot-imx/master that these got merged in. My board is hanging at
dram_init_banksize- did something change recently that you are aware of that may require some changes on my end?
Quoted 4 lines
There are a lot of changes, but they are related to i.MX8. I have not merged something for i.MX6 that can justify this behavior. So I do not know - have you compared the two branches, at least for Ventana boards ?
It's hanging at arch/arm/mach-imx/spl.c:dram_init_banksize on 'gd->bd->bi_dram[0].start = CONFIG_SYS_SDRAM_BASE' so I suppose something is wrong with gd.
I'll have to compare branches as you suggest.
Tim
PATCH 6/11 imx: ventana: convert U-Boot to OF_CONTROL using FIT image
Quoted 27 lines · Tim Harvey
Quoted 25 lines · Stefano Babic
Hi Tim,
Quoted 20 lines · Tim Harvey
Quoted 11 lines · On Thu, Apr 8, 2021 at 1:57 PM <[email protected]> wrote:
Quoted 6 lines
In preparation for dm conversion convert to
OF_CONTROLby adding FIT image support and multi dtb.
Add aboard_fit_config_name_matchto match the dtb based off of EEPROM model.Signed-off-by Tim Harvey <[email protected]>Applied to u-boot-imx, master, thanks !
Best regards,
Stefano BabicStefano,
Something broke apparently between the branch I had my patches on top of and u-boot-imx/master that these got merged in. My board is hanging at
dram_init_banksize- did something change recently that you are aware of that may require some changes on my end?
Quoted 8 lines
Quoted 4 lines
There are a lot of changes, but they are related to i.MX8. I have not merged something for i.MX6 that can justify this behavior. So I do not know - have you compared the two branches, at least for Ventana boards ?
It's hanging at arch/arm/mach-imx/spl.c:dram_init_banksize on 'gd->bd->bi_dram[0].start =
CONFIG_SYS_SDRAM_BASE' so I suppose something is wrong with gd.
specifically gd->bd is NULL. I'll have to track down how that gets setup.
Tim
PATCH 6/11 imx: ventana: convert U-Boot to OF_CONTROL using FIT image
Quoted 34 lines · Tim Harvey
Quoted 32 lines · Tim Harvey
Quoted 29 lines · Stefano Babic
Hi Tim,
Quoted 13 lines · Tim Harvey
Quoted 11 lines · On Thu, Apr 8, 2021 at 1:57 PM <[email protected]> wrote:
Quoted 6 lines
In preparation for dm conversion convert to
OF_CONTROLby adding FIT image support and multi dtb.
Add aboard_fit_config_name_matchto match the dtb based off of EEPROM model.Signed-off-by Tim Harvey <[email protected]>Applied to u-boot-imx, master, thanks !
Best regards,
Stefano BabicQuoted 7 lines
Stefano,
Something broke apparently between the branch I had my patches on top of and u-boot-imx/master that these got merged in. My board is hanging at
dram_init_banksize- did something change recently that you are aware of that may require some changes on my end?There are a lot of changes, but they are related to i.MX8. I have not merged something for i.MX6 that can justify this behavior. So I do not know - have you compared the two branches, at least for Ventana boards ?
Quoted 6 lines
Quoted 3 lines
It's hanging at arch/arm/mach-imx/spl.c:dram_init_banksize on 'gd->bd->bi_dram[0].start =
CONFIG_SYS_SDRAM_BASE' so I suppose something is wrong with gd.specifically
gd->bdis NULL. I'll have to track down how that gets setup.
Stefano,
commit 38d6b7ebdaee ("spl: Drop bd_info in the data section") is the culprit which breaks IMX boards using SPL that don't define SPL_ALLOC_BD. There is another thread regarding if that commit should be reverted or if instead it can be fixed (ie by defining SPL_ALLOC_BD) so probably not worth discussing in this thread anymore.
Best regards,
Tim
PATCH 7/11 imx: ventana: add pinctrl and remove unneeded UART init and config
In reply to Tim HarveyOnce the IMX6 pinctrl driver is added UART is fully using driver mode so we no longer need to config and initialize it.
--- board/gateworks/gw_ventana/gw_ventana.c | 12 ------------ configs/gwventana_emmc_defconfig | 2 ++ configs/gwventana_gw5904_defconfig | 2 ++ configs/gwventana_nand_defconfig | 2 ++ 4 files changed, 6 insertions(+), 12 deletions(-)
board/gateworks/gw_ventana/gw_ventana.c +0 -12
@@ -23,7 +23,6 @@#include <asm/io.h> #include <asm/setup.h> #include <dm.h> -#include <dm/platform_data/serial_mxc.h> #include <env.h> #include <hwconfig.h> #include <i2c.h>
@@ -627,8 +626,6 @@ void get_board_serial(struct tag_serialnr *serialnr)int board_early_init_f (void ) { -setup_iomux_uart (); -#if defined(CONFIG_VIDEO_IPUV3 )setup_display ();#endif
@@ -1388,12 +1385,3 @@ int ft_board_setup(void *blob, struct bd_info *bd) return 0; }#endif /* CONFIG_OF_BOARD_SETUP */ - -static struct mxc_serial_platdata ventana_mxc_serial_plat = { - .reg = (struct mxc_uart *)UART2_BASE , -}; - -U_BOOT_DEVICE (ventana_serial) = { - .name ="serial_mxc" , - .platdata = &ventana_mxc_serial_plat, -};
configs/gwventana_emmc_defconfig +2 -0
@@ -87,6 +87,8 @@ CONFIG_PHYLIB=y CONFIG_E1000=y CONFIG_MII=y CONFIG_PCI=y +CONFIG_PINCTRL=y +CONFIG_PINCTRL_IMX6=y CONFIG_CONS_INDEX=2 CONFIG_DM_SERIAL=y CONFIG_MXC_UART=y
configs/gwventana_gw5904_defconfig +2 -0
@@ -91,6 +91,8 @@ CONFIG_MV88E61XX_FIXED_PORTS=0x0 CONFIG_E1000=y CONFIG_MII=y CONFIG_PCI=y +CONFIG_PINCTRL=y +CONFIG_PINCTRL_IMX6=y CONFIG_CONS_INDEX=2 CONFIG_DM_SERIAL=y CONFIG_MXC_UART=y
configs/gwventana_nand_defconfig +2 -0
@@ -91,6 +91,8 @@ CONFIG_PHYLIB=y CONFIG_E1000=y CONFIG_MII=y CONFIG_PCI=y +CONFIG_PINCTRL=y +CONFIG_PINCTRL_IMX6=y CONFIG_CONS_INDEX=2 CONFIG_DM_SERIAL=y CONFIG_MXC_UART=y
Signature · 1 line
2.17.1
PATCH 7/11 imx: ventana: add pinctrl and remove unneeded UART init and config
Quoted 3 lines
Once the IMX6 pinctrl driver is added UART is fully using driver mode so we no longer need to config and initialize it.
Signed-off-by Tim Harvey <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================
PATCH 8/11 imx: ventana: enable dm support for USB
In reply to Tim HarveyEnable dm support for USB (which also requires dm support for fixed regulators used for vbus enable) and remove usb iomux which is no longer needed.
We can remove the handling of otgpwr_en gpio as this is defined in dt as usbotg vbus-supply but we need to keep the handling of USB_HUB_RST# for boards that have a USB HUB as that isn't defined in the dt's currently.
--- board/gateworks/gw_ventana/common.c | 17 ----------------- board/gateworks/gw_ventana/common.h | 1 - board/gateworks/gw_ventana/gw_ventana.c | 22 ++++------------------ configs/gwventana_emmc_defconfig | 3 +++ configs/gwventana_gw5904_defconfig | 3 +++ configs/gwventana_nand_defconfig | 3 +++ include/configs/gw_ventana.h | 1 - 7 files changed, 13 insertions(+), 37 deletions(-)
board/gateworks/gw_ventana/common.c +0 -17
@@ -970,7 +970,6 @@ struct ventana gpio_cfg[GW_UNKNOWN] = { .rs485en = IMX_GPIO_NR(3, 24), .dioi2c_en = IMX_GPIO_NR(4, 5), .pcie_sson = IMX_GPIO_NR(1, 20), - .otgpwr_en = IMX_GPIO_NR(3, 22), .mmc_cd = IMX_GPIO_NR(7, 0), },
@@ -990,7 +989,6 @@ struct ventana gpio_cfg[GW_UNKNOWN] = { .gps_shdn = IMX_GPIO_NR(1, 2), .vidin_en = IMX_GPIO_NR(5, 20), .wdis = IMX_GPIO_NR(7, 12), - .otgpwr_en = IMX_GPIO_NR(3, 22), .nand = true, },
@@ -1014,7 +1012,6 @@ struct ventana gpio_cfg[GW_UNKNOWN] = { .wdis = IMX_GPIO_NR(7, 12), .msata_en = GP_MSATA_SEL, .rs232_en = GP_RS232_EN, - .otgpwr_en = IMX_GPIO_NR(3, 22), .vsel_pin = IMX_GPIO_NR(6, 14), .mmc_cd = IMX_GPIO_NR(7, 0), .nand = true,
@@ -1039,7 +1036,6 @@ struct ventana gpio_cfg[GW_UNKNOWN] = { .wdis = IMX_GPIO_NR(7, 12), .msata_en = GP_MSATA_SEL, .rs232_en = GP_RS232_EN, - .otgpwr_en = IMX_GPIO_NR(3, 22), .vsel_pin = IMX_GPIO_NR(6, 14), .mmc_cd = IMX_GPIO_NR(7, 0), .nand = true,
@@ -1066,7 +1062,6 @@ struct ventana gpio_cfg[GW_UNKNOWN] = { .wdis = IMX_GPIO_NR(5, 17), .msata_en = GP_MSATA_SEL, .rs232_en = GP_RS232_EN, - .otgpwr_en = IMX_GPIO_NR(3, 22), .vsel_pin = IMX_GPIO_NR(6, 14), .mmc_cd = IMX_GPIO_NR(7, 0), .nand = true,
@@ -1117,7 +1112,6 @@ struct ventana gpio_cfg[GW_UNKNOWN] = { .pcie_rst = IMX_GPIO_NR(1, 0), .vidin_en = IMX_GPIO_NR(5, 20), .wdis = IMX_GPIO_NR(7, 12), - .otgpwr_en = IMX_GPIO_NR(3, 22), .vsel_pin = IMX_GPIO_NR(6, 14), .mmc_cd = IMX_GPIO_NR(7, 0), .nand = true,
@@ -1140,7 +1134,6 @@ struct ventana gpio_cfg[GW_UNKNOWN] = { .rs232_en = GP_RS232_EN, .vidin_en = IMX_GPIO_NR(3, 31), .wdis = IMX_GPIO_NR(7, 12), - .otgpwr_en = IMX_GPIO_NR(4, 15), .mmc_cd = IMX_GPIO_NR(7, 0), },
@@ -1166,7 +1159,6 @@ struct ventana gpio_cfg[GW_UNKNOWN] = { }, .pcie_rst = IMX_GPIO_NR(1, 0), .rs232_en = GP_RS232_EN, - .otgpwr_en = IMX_GPIO_NR(3, 23), .nand = true, },
@@ -1179,7 +1171,6 @@ struct ventana gpio_cfg[GW_UNKNOWN] = { .leds = { IMX_GPIO_NR(6, 14), }, - .otgpwr_en = IMX_GPIO_NR(4, 15), .mmc_cd = IMX_GPIO_NR(6, 11), },
@@ -1197,7 +1188,6 @@ struct ventana gpio_cfg[GW_UNKNOWN] = { .pcie_rst = IMX_GPIO_NR(1, 0), .mezz_pwren = IMX_GPIO_NR(2, 19), .mezz_irq = IMX_GPIO_NR(2, 18), - .otgpwr_en = IMX_GPIO_NR(3, 22), },/* GW5905 */
@@ -1279,7 +1269,6 @@ struct ventana gpio_cfg[GW_UNKNOWN] = { .pcie_rst = IMX_GPIO_NR(1, 0), .mezz_pwren = IMX_GPIO_NR(2, 19), .mezz_irq = IMX_GPIO_NR(2, 18), - .otgpwr_en = IMX_GPIO_NR(3, 22), }, };
@@ -1382,12 +1371,6 @@ void setup_iomux_gpio(int board, struct ventana_board_info *info)gpio_direction_output (gpio_cfg[board].wdis,1 ); } -/* OTG power off */ -if (gpio_cfg[board].otgpwr_en) { -gpio_request (gpio_cfg[board].otgpwr_en,"usbotg_pwr" ); -gpio_direction_output (gpio_cfg[board].otgpwr_en,0 ); - } -/* sense vselect pin to see if we support uhs-i */ if (gpio_cfg[board].vsel_pin) {gpio_request (gpio_cfg[board].vsel_pin,"sd3_vselect" );
board/gateworks/gw_ventana/common.h +0 -1
@@ -75,7 +75,6 @@ struct ventana {int wdis;int msata_en;int rs232_en; -int otgpwr_en;int vsel_pin;int mmc_cd;/* various features */
board/gateworks/gw_ventana/gw_ventana.c +4 -18
@@ -141,18 +141,14 @@ static void setup_iomux_enet(int gpio) }#ifdef CONFIG_USB_EHCI_MX6 -static iomux_v3_cfg_t const usb_pads[] = { -IOMUX_PADS (PAD_GPIO_1__USB_OTG_ID |DIO_PAD_CFG ), -IOMUX_PADS (PAD_KEY_COL4__USB_OTG_OC |DIO_PAD_CFG ), -/* OTG PWR */ -IOMUX_PADS (PAD_EIM_D22__GPIO3_IO22 |DIO_PAD_CFG ), -}; - +/* toggle USB_HUB_RST# for boards that have it; it is not defined in dt */ int board_ehci_hcd_init (int port) {int gpio; -SETUP_IOMUX_PADS (usb_pads); +/* USB HUB is always on P1 */ +if (port ==0 ) +return 0 ;/* Reset USB HUB */ switch (board_type) {
@@ -177,16 +173,6 @@ int board_ehci_hcd_init(int port) return 0; } - -int board_ehci_power (int port,int on) -{ -/* enable OTG VBUS */ -if (!port && board_type <GW_UNKNOWN ) { -if (gpio_cfg[board_type].otgpwr_en) -gpio_set_value (gpio_cfg[board_type].otgpwr_en, on); - } -return 0 ; -}#endif /* CONFIG_USB_EHCI_MX6 */ #ifdef CONFIG_MXC_SPI
configs/gwventana_emmc_defconfig +3 -0
@@ -89,12 +89,15 @@ CONFIG_MII=y CONFIG_PCI=y CONFIG_PINCTRL=y CONFIG_PINCTRL_IMX6=y +CONFIG_DM_REGULATOR=y +CONFIG_DM_REGULATOR_FIXED=y CONFIG_CONS_INDEX=2 CONFIG_DM_SERIAL=y CONFIG_MXC_UART=y CONFIG_DM_THERMAL=y CONFIG_IMX_THERMAL=y CONFIG_USB=y +CONFIG_DM_USB=y CONFIG_USB_STORAGE=y CONFIG_USB_KEYBOARD=y CONFIG_SYS_USB_EVENT_POLL_VIA_CONTROL_EP=y
configs/gwventana_gw5904_defconfig +3 -0
@@ -93,12 +93,15 @@ CONFIG_MII=y CONFIG_PCI=y CONFIG_PINCTRL=y CONFIG_PINCTRL_IMX6=y +CONFIG_DM_REGULATOR=y +CONFIG_DM_REGULATOR_FIXED=y CONFIG_CONS_INDEX=2 CONFIG_DM_SERIAL=y CONFIG_MXC_UART=y CONFIG_DM_THERMAL=y CONFIG_IMX_THERMAL=y CONFIG_USB=y +CONFIG_DM_USB=y CONFIG_USB_STORAGE=y CONFIG_USB_KEYBOARD=y CONFIG_SYS_USB_EVENT_POLL_VIA_CONTROL_EP=y
configs/gwventana_nand_defconfig +3 -0
@@ -93,12 +93,15 @@ CONFIG_MII=y CONFIG_PCI=y CONFIG_PINCTRL=y CONFIG_PINCTRL_IMX6=y +CONFIG_DM_REGULATOR=y +CONFIG_DM_REGULATOR_FIXED=y CONFIG_CONS_INDEX=2 CONFIG_DM_SERIAL=y CONFIG_MXC_UART=y CONFIG_DM_THERMAL=y CONFIG_IMX_THERMAL=y CONFIG_USB=y +CONFIG_DM_USB=y CONFIG_USB_STORAGE=y CONFIG_USB_KEYBOARD=y CONFIG_SYS_USB_EVENT_POLL_VIA_CONTROL_EP=y
include/configs/gw_ventana.h +0 -1
@@ -100,7 +100,6 @@#define CONFIG_ARP_TIMEOUT 200UL/* USB Configs */ -#define CONFIG_USB_MAX_CONTROLLER_COUNT 2#define CONFIG_EHCI_HCD_INIT_AFTER_RESET /* For OTG port */ #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW)#define CONFIG_MXC_USB_FLAGS 0
Signature · 1 line
2.17.1
PATCH 8/11 imx: ventana: enable dm support for USB
Quoted 8 lines
Enable dm support for USB (which also requires dm support for fixed regulators used for vbus enable) and remove usb iomux which is no longer needed.
We can remove the handling ofotgpwr_engpio as this is defined in dt as usbotg vbus-supply but we need to keep the handling of USB_HUB_RST# for boards that have a USB HUB as that isn't defined in the dt's currently.Signed-off-by Tim Harvey <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================
PATCH 9/11 imx: ventana: enable dm support for MMC and SATA
In reply to Tim HarveyEnable driver model support for MMC and SATA.
Note that DM_MMC requires aliases for your mmc devices so they are added to the dts. Linux does not support enumerating mmc devices by alias so these are not present in the Linux dts.
Note that we still need board_mmc_init() and board_mmc_getcd() for not DM SPL to support MMC.
--- arch/arm/dts/imx6qdl-gw52xx.dtsi | 1 + arch/arm/dts/imx6qdl-gw53xx.dtsi | 1 + arch/arm/dts/imx6qdl-gw54xx.dtsi | 1 + arch/arm/dts/imx6qdl-gw560x.dtsi | 2 ++ arch/arm/dts/imx6qdl-gw5904.dtsi | 1 + arch/arm/dts/imx6qdl-gw5910.dtsi | 1 + arch/arm/dts/imx6qdl-gw5912.dtsi | 1 + board/gateworks/gw_ventana/gw_ventana.c | 5 ----- configs/gwventana_emmc_defconfig | 2 ++ configs/gwventana_gw5904_defconfig | 2 ++ configs/gwventana_nand_defconfig | 2 ++ 11 files changed, 14 insertions(+), 5 deletions(-)
arch/arm/dts/imx6qdl-gw52xx.dtsi +1 -0
@@ -13,6 +13,7 @@ led0 = &led0; led1 = &led1; led2 = &led2; + mmc0 = &usdhc3; nand = &gpmi; ssi0 = &ssi1; usb0 = &usbh1;
arch/arm/dts/imx6qdl-gw53xx.dtsi +1 -0
@@ -13,6 +13,7 @@ led0 = &led0; led1 = &led1; led2 = &led2; + mmc0 = &usdhc3; nand = &gpmi; ssi0 = &ssi1; usb0 = &usbh1;
arch/arm/dts/imx6qdl-gw54xx.dtsi +1 -0
@@ -14,6 +14,7 @@ led0 = &led0; led1 = &led1; led2 = &led2; + mmc0 = &usdhc3; nand = &gpmi; ssi0 = &ssi1; usb0 = &usbh1;
arch/arm/dts/imx6qdl-gw560x.dtsi +2 -0
@@ -55,6 +55,8 @@ led0 = &led0; led1 = &led1; led2 = &led2; + mmc0 = &usdhc2; + mmc1 = &usdhc3; ssi0 = &ssi1; usb0 = &usbh1; usb1 = &usbotg;
arch/arm/dts/imx6qdl-gw5904.dtsi +1 -0
@@ -55,6 +55,7 @@ led0 = &led0; led1 = &led1; led2 = &led2; + mmc0 = &usdhc3; usb0 = &usbh1; usb1 = &usbotg; };
arch/arm/dts/imx6qdl-gw5910.dtsi +1 -0
@@ -13,6 +13,7 @@ led0 = &led0; led1 = &led1; led2 = &led2; + mmc0 = &usdhc3; }; chosen {
arch/arm/dts/imx6qdl-gw5912.dtsi +1 -0
@@ -13,6 +13,7 @@ led0 = &led0; led1 = &led1; led2 = &led2; + mmc0 = &usdhc3; nand = &gpmi; usb0 = &usbh1; usb1 = &usbotg;
board/gateworks/gw_ventana/gw_ventana.c +0 -5
@@ -27,7 +27,6 @@#include <hwconfig.h> #include <i2c.h> #include <fdt_support.h> -#include <fsl_esdhc_imx.h> #include <jffs2/load_kernel.h> #include <linux/ctype.h> #include <miiphy.h>
@@ -649,10 +648,6 @@ int board_init(void)setup_ventana_i2c (1 );setup_ventana_i2c (2 ); -#ifdef CONFIG_SATA -setup_sata (); -#endif -setup_iomux_gpio (board_type, &ventana_info);return 0 ;
configs/gwventana_emmc_defconfig +2 -0
@@ -19,6 +19,7 @@ CONFIG_SPL=y CONFIG_ENV_OFFSET_REDUND=0xD1400 CONFIG_CMD_HDMIDETECT=y CONFIG_DEFAULT_DEVICE_TREE="imx6q-gw54xx" +CONFIG_AHCI=y CONFIG_FIT=y CONFIG_FIT_VERBOSE=y CONFIG_SPL_LOAD_FIT=y
@@ -79,6 +80,7 @@ CONFIG_NETCONSOLE=y CONFIG_DM=y CONFIG_BOUNCE_BUFFER=y CONFIG_DWC_AHSATA=y +CONFIG_DM_MMC=y CONFIG_SUPPORT_EMMC_RPMB=y CONFIG_SUPPORT_EMMC_BOOT=y CONFIG_FSL_USDHC=y
configs/gwventana_gw5904_defconfig +2 -0
@@ -19,6 +19,7 @@ CONFIG_SPL=y CONFIG_ENV_OFFSET_REDUND=0xD1400 CONFIG_CMD_HDMIDETECT=y CONFIG_DEFAULT_DEVICE_TREE="imx6q-gw54xx" +CONFIG_AHCI=y CONFIG_FIT=y CONFIG_FIT_VERBOSE=y CONFIG_SPL_LOAD_FIT=y
@@ -79,6 +80,7 @@ CONFIG_NETCONSOLE=y CONFIG_DM=y CONFIG_BOUNCE_BUFFER=y CONFIG_DWC_AHSATA=y +CONFIG_DM_MMC=y CONFIG_SUPPORT_EMMC_RPMB=y CONFIG_SUPPORT_EMMC_BOOT=y CONFIG_FSL_USDHC=y
configs/gwventana_nand_defconfig +2 -0
@@ -19,6 +19,7 @@ CONFIG_SPL=y CONFIG_ENV_OFFSET_REDUND=0x1080000 CONFIG_CMD_HDMIDETECT=y CONFIG_DEFAULT_DEVICE_TREE="imx6q-gw54xx" +CONFIG_AHCI=y CONFIG_FIT=y CONFIG_FIT_VERBOSE=y CONFIG_SPL_LOAD_FIT=y
@@ -81,6 +82,7 @@ CONFIG_NETCONSOLE=y CONFIG_DM=y CONFIG_BOUNCE_BUFFER=y CONFIG_DWC_AHSATA=y +CONFIG_DM_MMC=y CONFIG_SUPPORT_EMMC_RPMB=y CONFIG_SUPPORT_EMMC_BOOT=y CONFIG_FSL_USDHC=y
Signature · 1 line
2.17.1
PATCH 9/11 imx: ventana: enable dm support for MMC and SATA
Quoted 6 lines · Tim Harvey
Enable driver model support for MMC and SATA.
Note that
DM_MMCrequires aliases for your mmc devices so they are added to the dts. Linux does not support enumerating mmc devices by alias so these are not present in the Linux dts.
I'm not sure that's entirely true, they may be a new addition, or just not previously documented as working, they're added for the rockchip devices in Linux and they're documented in the bindings as working now:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=1796164fac7e348f74a0f1f1cae995b22d002315
Quoted 189 lines
Note that we still need
board_mmc_init()andboard_mmc_getcd()for not DM SPL to support MMC.Signed-off-by Tim Harvey <[email protected]>--- arch/arm/dts/imx6qdl-gw52xx.dtsi | 1 + arch/arm/dts/imx6qdl-gw53xx.dtsi | 1 + arch/arm/dts/imx6qdl-gw54xx.dtsi | 1 + arch/arm/dts/imx6qdl-gw560x.dtsi | 2 ++ arch/arm/dts/imx6qdl-gw5904.dtsi | 1 + arch/arm/dts/imx6qdl-gw5910.dtsi | 1 + arch/arm/dts/imx6qdl-gw5912.dtsi | 1 + board/gateworks/gw_ventana/gw_ventana.c | 5 ----- configs/gwventana_emmc_defconfig | 2 ++ configs/gwventana_gw5904_defconfig | 2 ++ configs/gwventana_nand_defconfig | 2 ++ 11 files changed, 14 insertions(+), 5 deletions(-)arch/arm/dts/imx6qdl-gw52xx.dtsi +1
-0@@ -13,6 +13,7 @@ led0 = &led0; led1 = &led1; led2 = &led2; + mmc0 = &usdhc3; nand = &gpmi; ssi0 = &ssi1; usb0 = &usbh1;arch/arm/dts/imx6qdl-gw53xx.dtsi +1
-0@@ -13,6 +13,7 @@ led0 = &led0; led1 = &led1; led2 = &led2; + mmc0 = &usdhc3; nand = &gpmi; ssi0 = &ssi1; usb0 = &usbh1;arch/arm/dts/imx6qdl-gw54xx.dtsi +1
-0@@ -14,6 +14,7 @@ led0 = &led0; led1 = &led1; led2 = &led2; + mmc0 = &usdhc3; nand = &gpmi; ssi0 = &ssi1; usb0 = &usbh1;arch/arm/dts/imx6qdl-gw560x.dtsi +2
-0@@ -55,6 +55,8 @@ led0 = &led0; led1 = &led1; led2 = &led2; + mmc0 = &usdhc2; + mmc1 = &usdhc3; ssi0 = &ssi1; usb0 = &usbh1; usb1 = &usbotg;arch/arm/dts/imx6qdl-gw5904.dtsi +1
-0@@ -55,6 +55,7 @@ led0 = &led0; led1 = &led1; led2 = &led2; + mmc0 = &usdhc3; usb0 = &usbh1; usb1 = &usbotg; };arch/arm/dts/imx6qdl-gw5910.dtsi +1
-0@@ -13,6 +13,7 @@ led0 = &led0; led1 = &led1; led2 = &led2; + mmc0 = &usdhc3; }; chosen {arch/arm/dts/imx6qdl-gw5912.dtsi +1
-0@@ -13,6 +13,7 @@ led0 = &led0; led1 = &led1; led2 = &led2; + mmc0 = &usdhc3; nand = &gpmi; usb0 = &usbh1; usb1 = &usbotg;board/gateworks/gw_ventana/gw_ventana.c +0
-5@@ -27,7 +27,6 @@#include <hwconfig.h> #include <i2c.h> #include <fdt_support.h> -#include <fsl_esdhc_imx.h> #include <jffs2/load_kernel.h> #include <linux/ctype.h> #include <miiphy.h> @@ -649,10 +648,6 @@ int board_init(void)setup_ventana_i2c (1 );setup_ventana_i2c (2 ); -#ifdef CONFIG_SATA -setup_sata (); -#endif -setup_iomux_gpio (board_type, &ventana_info);return 0 ;configs/gwventana_emmc_defconfig +2
-0@@ -19,6 +19,7 @@ CONFIG_SPL=y CONFIG_ENV_OFFSET_REDUND=0xD1400 CONFIG_CMD_HDMIDETECT=y CONFIG_DEFAULT_DEVICE_TREE="imx6q-gw54xx" +CONFIG_AHCI=y CONFIG_FIT=y CONFIG_FIT_VERBOSE=y CONFIG_SPL_LOAD_FIT=y@@ -79,6 +80,7 @@ CONFIG_NETCONSOLE=y CONFIG_DM=y CONFIG_BOUNCE_BUFFER=y CONFIG_DWC_AHSATA=y +CONFIG_DM_MMC=y CONFIG_SUPPORT_EMMC_RPMB=y CONFIG_SUPPORT_EMMC_BOOT=y CONFIG_FSL_USDHC=yconfigs/gwventana_gw5904_defconfig +2
-0@@ -19,6 +19,7 @@ CONFIG_SPL=y CONFIG_ENV_OFFSET_REDUND=0xD1400 CONFIG_CMD_HDMIDETECT=y CONFIG_DEFAULT_DEVICE_TREE="imx6q-gw54xx" +CONFIG_AHCI=y CONFIG_FIT=y CONFIG_FIT_VERBOSE=y CONFIG_SPL_LOAD_FIT=y@@ -79,6 +80,7 @@ CONFIG_NETCONSOLE=y CONFIG_DM=y CONFIG_BOUNCE_BUFFER=y CONFIG_DWC_AHSATA=y +CONFIG_DM_MMC=y CONFIG_SUPPORT_EMMC_RPMB=y CONFIG_SUPPORT_EMMC_BOOT=y CONFIG_FSL_USDHC=yconfigs/gwventana_nand_defconfig +2
-1@@ -19,6 +19,7 @@ CONFIG_SPL=y CONFIG_ENV_OFFSET_REDUND=0x1080000 CONFIG_CMD_HDMIDETECT=y CONFIG_DEFAULT_DEVICE_TREE="imx6q-gw54xx" +CONFIG_AHCI=y CONFIG_FIT=y CONFIG_FIT_VERBOSE=y CONFIG_SPL_LOAD_FIT=y@@ -81,6 +82,7 @@ CONFIG_NETCONSOLE=y CONFIG_DM=y CONFIG_BOUNCE_BUFFER=y CONFIG_DWC_AHSATA=y +CONFIG_DM_MMC=y CONFIG_SUPPORT_EMMC_RPMB=y CONFIG_SUPPORT_EMMC_BOOT=y CONFIG_FSL_USDHC=y --2.17.1
Fabio Estevam
reviewerPATCH 9/11 imx: ventana: enable dm support for MMC and SATA
Hi Peter,
Quoted 5 lines · Peter Robinson
I'm not sure that's entirely true, they may be a new addition, or just not previously documented as working, they're added for the rockchip devices in Linux and they're documented in the bindings as working now:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=1796164fac7e348f74a0f1f1cae995b22d002315
mmc alias support has been added in kernel 5.10 with the following commit:fa2d0aa96941 ("mmc: core: Allow setting slot index via device tree alias")
PATCH 9/11 imx: ventana: enable dm support for MMC and SATA
Quoted 5 lines · Fabio Estevam
Hi Peter,
On Mon, Mar 1, 2021 at 7:48 PM Peter Robinson <[email protected]> wrote:
Quoted 8 lines
Quoted 5 lines
I'm not sure that's entirely true, they may be a new addition, or just not previously documented as working, they're added for the rockchip devices in Linux and they're documented in the bindings as working now:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=1796164fac7e348f74a0f1f1cae995b22d002315mmc alias support has been added in kernel 5.10 with the following commit:
fa2d0aa96941("mmc: core: Allow setting slot index via device tree alias")
Great to know that finally made it in! I feel like the idea was shot down for years.
So I suppose this particular patch is ok but I can update the commit message to indicate that this is supported by Linux now and reference the patch. I will also make a note to submit those dt changes to Linux.
Best regards,
Tim
PATCH 9/11 imx: ventana: enable dm support for MMC and SATA
Quoted 15 lines · Tim Harvey
Quoted 5 lines · Fabio Estevam
Hi Peter,
On Mon, Mar 1, 2021 at 7:48 PM Peter Robinson <[email protected]> wrote:
Quoted 8 lines
Quoted 5 lines
I'm not sure that's entirely true, they may be a new addition, or just not previously documented as working, they're added for the rockchip devices in Linux and they're documented in the bindings as working now:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=1796164fac7e348f74a0f1f1cae995b22d002315mmc alias support has been added in kernel 5.10 with the following commit:
fa2d0aa96941("mmc: core: Allow setting slot index via device tree alias")
Quoted 7 lines
Great to know that finally made it in! I feel like the idea was shot down for years.
So I suppose this particular patch is ok but I can update the commit message to indicate that this is supported by Linux now and reference the patch. I will also make a note to submit those dt changes to Linux.
Works for me, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 659 bytes Desc: not available URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210302/caeae0cc/attachment.sig>
PATCH 9/11 imx: ventana: enable dm support for MMC and SATA
In reply to Peter RobinsonQuoted 11 lines · Peter Robinson
Quoted 5 lines · Tim Harvey
Enable driver model support for MMC and SATA.
Note that
DM_MMCrequires aliases for your mmc devices so they are added to the dts. Linux does not support enumerating mmc devices by alias so these are not present in the Linux dts.I'm not sure that's entirely true, they may be a new addition, or just not previously documented as working, they're added for the rockchip devices in Linux and they're documented in the bindings as working now:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=1796164fac7e348f74a0f1f1cae995b22d002315
Yes, kernel have add mmc alias for different rockchip socs, seems like we got a new problem,
we always use mmc alias in U-Boot for next stage firmware detect, and the alias sequence in U-Boot and
kernel are different now :(
Thanks,
- Kever
Quoted 191 lines
Quoted 190 lines
Note that we still need
board_mmc_init()andboard_mmc_getcd()for not DM SPL to support MMC.Signed-off-by Tim Harvey <[email protected]>--- arch/arm/dts/imx6qdl-gw52xx.dtsi | 1 + arch/arm/dts/imx6qdl-gw53xx.dtsi | 1 + arch/arm/dts/imx6qdl-gw54xx.dtsi | 1 + arch/arm/dts/imx6qdl-gw560x.dtsi | 2 ++ arch/arm/dts/imx6qdl-gw5904.dtsi | 1 + arch/arm/dts/imx6qdl-gw5910.dtsi | 1 + arch/arm/dts/imx6qdl-gw5912.dtsi | 1 + board/gateworks/gw_ventana/gw_ventana.c | 5 ----- configs/gwventana_emmc_defconfig | 2 ++ configs/gwventana_gw5904_defconfig | 2 ++ configs/gwventana_nand_defconfig | 2 ++ 11 files changed, 14 insertions(+), 5 deletions(-)arch/arm/dts/imx6qdl-gw52xx.dtsi +1
-0@@ -13,6 +13,7 @@ led0 = &led0; led1 = &led1; led2 = &led2; + mmc0 = &usdhc3; nand = &gpmi; ssi0 = &ssi1; usb0 = &usbh1;arch/arm/dts/imx6qdl-gw53xx.dtsi +1
-0@@ -13,6 +13,7 @@ led0 = &led0; led1 = &led1; led2 = &led2; + mmc0 = &usdhc3; nand = &gpmi; ssi0 = &ssi1; usb0 = &usbh1;arch/arm/dts/imx6qdl-gw54xx.dtsi +1
-0@@ -14,6 +14,7 @@ led0 = &led0; led1 = &led1; led2 = &led2; + mmc0 = &usdhc3; nand = &gpmi; ssi0 = &ssi1; usb0 = &usbh1;arch/arm/dts/imx6qdl-gw560x.dtsi +2
-0@@ -55,6 +55,8 @@ led0 = &led0; led1 = &led1; led2 = &led2; + mmc0 = &usdhc2; + mmc1 = &usdhc3; ssi0 = &ssi1; usb0 = &usbh1; usb1 = &usbotg;arch/arm/dts/imx6qdl-gw5904.dtsi +1
-0@@ -55,6 +55,7 @@ led0 = &led0; led1 = &led1; led2 = &led2; + mmc0 = &usdhc3; usb0 = &usbh1; usb1 = &usbotg; };arch/arm/dts/imx6qdl-gw5910.dtsi +1
-0@@ -13,6 +13,7 @@ led0 = &led0; led1 = &led1; led2 = &led2; + mmc0 = &usdhc3; }; chosen {arch/arm/dts/imx6qdl-gw5912.dtsi +1
-0@@ -13,6 +13,7 @@ led0 = &led0; led1 = &led1; led2 = &led2; + mmc0 = &usdhc3; nand = &gpmi; usb0 = &usbh1; usb1 = &usbotg;board/gateworks/gw_ventana/gw_ventana.c +0
-5@@ -27,7 +27,6 @@#include <hwconfig.h> #include <i2c.h> #include <fdt_support.h> -#include <fsl_esdhc_imx.h> #include <jffs2/load_kernel.h> #include <linux/ctype.h> #include <miiphy.h> @@ -649,10 +648,6 @@ int board_init(void)setup_ventana_i2c (1 );setup_ventana_i2c (2 ); -#ifdef CONFIG_SATA -setup_sata (); -#endif -setup_iomux_gpio (board_type, &ventana_info);return 0 ;configs/gwventana_emmc_defconfig +2
-0@@ -19,6 +19,7 @@ CONFIG_SPL=y CONFIG_ENV_OFFSET_REDUND=0xD1400 CONFIG_CMD_HDMIDETECT=y CONFIG_DEFAULT_DEVICE_TREE="imx6q-gw54xx" +CONFIG_AHCI=y CONFIG_FIT=y CONFIG_FIT_VERBOSE=y CONFIG_SPL_LOAD_FIT=y@@ -79,6 +80,7 @@ CONFIG_NETCONSOLE=y CONFIG_DM=y CONFIG_BOUNCE_BUFFER=y CONFIG_DWC_AHSATA=y +CONFIG_DM_MMC=y CONFIG_SUPPORT_EMMC_RPMB=y CONFIG_SUPPORT_EMMC_BOOT=y CONFIG_FSL_USDHC=yconfigs/gwventana_gw5904_defconfig +2
-0@@ -19,6 +19,7 @@ CONFIG_SPL=y CONFIG_ENV_OFFSET_REDUND=0xD1400 CONFIG_CMD_HDMIDETECT=y CONFIG_DEFAULT_DEVICE_TREE="imx6q-gw54xx" +CONFIG_AHCI=y CONFIG_FIT=y CONFIG_FIT_VERBOSE=y CONFIG_SPL_LOAD_FIT=y@@ -79,6 +80,7 @@ CONFIG_NETCONSOLE=y CONFIG_DM=y CONFIG_BOUNCE_BUFFER=y CONFIG_DWC_AHSATA=y +CONFIG_DM_MMC=y CONFIG_SUPPORT_EMMC_RPMB=y CONFIG_SUPPORT_EMMC_BOOT=y CONFIG_FSL_USDHC=yconfigs/gwventana_nand_defconfig +2
-1@@ -19,6 +19,7 @@ CONFIG_SPL=y CONFIG_ENV_OFFSET_REDUND=0x1080000 CONFIG_CMD_HDMIDETECT=y CONFIG_DEFAULT_DEVICE_TREE="imx6q-gw54xx" +CONFIG_AHCI=y CONFIG_FIT=y CONFIG_FIT_VERBOSE=y CONFIG_SPL_LOAD_FIT=y@@ -81,6 +82,7 @@ CONFIG_NETCONSOLE=y CONFIG_DM=y CONFIG_BOUNCE_BUFFER=y CONFIG_DWC_AHSATA=y +CONFIG_DM_MMC=y CONFIG_SUPPORT_EMMC_RPMB=y CONFIG_SUPPORT_EMMC_BOOT=y CONFIG_FSL_USDHC=y --2.17.1
PATCH 9/11 imx: ventana: enable dm support for MMC and SATA
In reply to Tim HarveyQuoted 7 lines
Enable driver model support for MMC and SATA.
Note thatDM_MMCrequires aliases for your mmc devices so they are added to the dts. Linux does not support enumerating mmc devices by alias so these are not present in the Linux dts. Note that we still needboard_mmc_init()andboard_mmc_getcd()for not DM SPL to support MMC.Signed-off-by Tim Harvey <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================
PATCH 10/11 imx: ventana: enable dm for MTD and NAND
In reply to Tim HarveyEnable driver model for MTD and NAND support allowing us to remove the iomux, init, and most of the static configuration.
--- board/gateworks/gw_ventana/gw_ventana.c | 52 ------------------------- configs/gwventana_nand_defconfig | 2 + include/configs/gw_ventana.h | 14 +------ 3 files changed, 4 insertions(+), 64 deletions(-)
board/gateworks/gw_ventana/gw_ventana.c +0 -52
@@ -79,54 +79,6 @@ static iomux_v3_cfg_t const enet_pads[] = { IOMUX_PADS(PAD_ENET_TXD0__GPIO1_IO30 | DIO_PAD_CFG), }; -#ifdef CONFIG_CMD_NAND -static iomux_v3_cfg_t const nfc_pads[] = { -IOMUX_PADS (PAD_NANDF_CLE__NAND_CLE |MUX_PAD_CTRL (NO_PAD_CTRL )), -IOMUX_PADS (PAD_NANDF_ALE__NAND_ALE |MUX_PAD_CTRL (NO_PAD_CTRL )), -IOMUX_PADS (PAD_NANDF_WP_B__NAND_WP_B |MUX_PAD_CTRL (NO_PAD_CTRL )), -IOMUX_PADS (PAD_NANDF_RB0__NAND_READY_B |MUX_PAD_CTRL (NO_PAD_CTRL )), -IOMUX_PADS (PAD_NANDF_CS0__NAND_CE0_B |MUX_PAD_CTRL (NO_PAD_CTRL )), -IOMUX_PADS (PAD_SD4_CMD__NAND_RE_B |MUX_PAD_CTRL (NO_PAD_CTRL )), -IOMUX_PADS (PAD_SD4_CLK__NAND_WE_B |MUX_PAD_CTRL (NO_PAD_CTRL )), -IOMUX_PADS (PAD_NANDF_D0__NAND_DATA00 |MUX_PAD_CTRL (NO_PAD_CTRL )), -IOMUX_PADS (PAD_NANDF_D1__NAND_DATA01 |MUX_PAD_CTRL (NO_PAD_CTRL )), -IOMUX_PADS (PAD_NANDF_D2__NAND_DATA02 |MUX_PAD_CTRL (NO_PAD_CTRL )), -IOMUX_PADS (PAD_NANDF_D3__NAND_DATA03 |MUX_PAD_CTRL (NO_PAD_CTRL )), -IOMUX_PADS (PAD_NANDF_D4__NAND_DATA04 |MUX_PAD_CTRL (NO_PAD_CTRL )), -IOMUX_PADS (PAD_NANDF_D5__NAND_DATA05 |MUX_PAD_CTRL (NO_PAD_CTRL )), -IOMUX_PADS (PAD_NANDF_D6__NAND_DATA06 |MUX_PAD_CTRL (NO_PAD_CTRL )), -IOMUX_PADS (PAD_NANDF_D7__NAND_DATA07 |MUX_PAD_CTRL (NO_PAD_CTRL )), -}; - -static void setup_gpmi_nand (void ) -{ -struct mxc_ccm_reg *mxc_ccm = (struct mxc_ccm_reg *)CCM_BASE_ADDR ; - -/* config gpmi nand iomux */ -SETUP_IOMUX_PADS (nfc_pads); - -/* config gpmi and bch clock to 100 MHz */ -clrsetbits_le32 (&mxc_ccm->cs2cdr, -MXC_CCM_CS2CDR_ENFC_CLK_PODF_MASK | -MXC_CCM_CS2CDR_ENFC_CLK_PRED_MASK | -MXC_CCM_CS2CDR_ENFC_CLK_SEL_MASK , -MXC_CCM_CS2CDR_ENFC_CLK_PODF (0 ) | -MXC_CCM_CS2CDR_ENFC_CLK_PRED (3 ) | -MXC_CCM_CS2CDR_ENFC_CLK_SEL (3 )); - -/* enable gpmi and bch clock gating */ -setbits_le32 (&mxc_ccm->CCGR4, -MXC_CCM_CCGR4_RAWNAND_U_BCH_INPUT_APB_MASK | -MXC_CCM_CCGR4_RAWNAND_U_GPMI_BCH_INPUT_BCH_MASK | -MXC_CCM_CCGR4_RAWNAND_U_GPMI_BCH_INPUT_GPMI_IO_MASK | -MXC_CCM_CCGR4_RAWNAND_U_GPMI_INPUT_APB_MASK | -MXC_CCM_CCGR4_PL301_MX6QPER1_BCH_OFFSET ); - -/* enable apbh clock gating */ -setbits_le32 (&mxc_ccm->CCGR0,MXC_CCM_CCGR0_APBHDMA_MASK ); -} -#endif -static void setup_iomux_enet (int gpio) {SETUP_IOMUX_PADS (enet_pads);
@@ -638,10 +590,6 @@ int board_init(void)setup_ventana_i2c (0 ); board_type =read_eeprom (CONFIG_I2C_GSC , &ventana_info); -#ifdef CONFIG_CMD_NAND -if (gpio_cfg[board_type].nand) -setup_gpmi_nand (); -#endif #ifdef CONFIG_MXC_SPI setup_spi ();#endif
configs/gwventana_nand_defconfig +2 -0
@@ -87,8 +87,10 @@ CONFIG_SUPPORT_EMMC_RPMB=y CONFIG_SUPPORT_EMMC_BOOT=y CONFIG_FSL_USDHC=y CONFIG_MTD=y +CONFIG_DM_MTD=y CONFIG_MTD_RAW_NAND=y CONFIG_NAND_MXS=y +CONFIG_NAND_MXS_DT=y CONFIG_PHYLIB=y CONFIG_E1000=y CONFIG_MII=y
include/configs/gw_ventana.h +2 -12
@@ -35,18 +35,8 @@/* Serial */ #define CONFIG_MXC_UART_BASE UART2_BASE -#if !defined(CONFIG_SPI_FLASH ) && defined(CONFIG_SPL_NAND_SUPPORT ) -/* Enable NAND support */ -#ifdef CONFIG_CMD_NAND -#define CONFIG_SYS_MAX_NAND_DEVICE 1 -#define CONFIG_SYS_NAND_BASE 0x40000000 -#define CONFIG_SYS_NAND_5_ADDR_CYCLE -#define CONFIG_SYS_NAND_ONFI_DETECTION - -/* DMA stuff, needed for GPMI/MXS NAND support */ -#endif - -#endif /* CONFIG_SPI_FLASH */ +/* NAND */ +#define CONFIG_SYS_MAX_NAND_DEVICE 1/* I2C Configs */ #define CONFIG_SYS_I2C
Signature · 1 line
2.17.1
PATCH 10/11 imx: ventana: enable dm for MTD and NAND
Quoted 3 lines
Enable driver model for MTD and NAND support allowing us to remove the iomux, init, and most of the static configuration.
Signed-off-by Tim Harvey <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================
PATCH 11/11 imx: ventana: enable dm for SPI
In reply to Tim HarveyEnable driver model for SPI which allows us to remove the iomux and init.
--- board/gateworks/gw_ventana/gw_ventana.c | 27 ------------------------- configs/gwventana_emmc_defconfig | 3 +++ configs/gwventana_gw5904_defconfig | 3 +++ configs/gwventana_nand_defconfig | 3 +++ 4 files changed, 9 insertions(+), 27 deletions(-)
board/gateworks/gw_ventana/gw_ventana.c +0 -27
@@ -18,7 +18,6 @@#include <asm/gpio.h> #include <asm/mach-imx/boot_mode.h> #include <asm/mach-imx/sata.h> -#include <asm/mach-imx/spi.h> #include <asm/mach-imx/video.h> #include <asm/io.h> #include <asm/setup.h>
@@ -40,7 +39,6 @@#include <power/pfuze100_pmic.h> #include <fdt_support.h> #include <jffs2/load_kernel.h> -#include <spi_flash.h> #include "gsc.h" #include "common.h"
@@ -126,28 +124,6 @@ int board_ehci_hcd_init(int port) }#endif /* CONFIG_USB_EHCI_MX6 */ -#ifdef CONFIG_MXC_SPI -iomux_v3_cfg_t const ecspi1_pads[] = { -/* SS1 */ -IOMUX_PADS (PAD_EIM_D19__GPIO3_IO19 |MUX_PAD_CTRL (SPI_PAD_CTRL )), -IOMUX_PADS (PAD_EIM_D17__ECSPI1_MISO |MUX_PAD_CTRL (SPI_PAD_CTRL )), -IOMUX_PADS (PAD_EIM_D18__ECSPI1_MOSI |MUX_PAD_CTRL (SPI_PAD_CTRL )), -IOMUX_PADS (PAD_EIM_D16__ECSPI1_SCLK |MUX_PAD_CTRL (SPI_PAD_CTRL )), -}; - -int board_spi_cs_gpio (unsigned bus,unsigned cs) -{ -return (bus ==0 && cs ==0 ) ? (IMX_GPIO_NR (3 ,19 )) :-1 ; -} - -static void setup_spi (void ) -{ -gpio_request (IMX_GPIO_NR (3 ,19 ),"spi_cs" ); -gpio_direction_output (IMX_GPIO_NR (3 ,19 ),1 ); -SETUP_IOMUX_PADS (ecspi1_pads); -} -#endif -/* configure eth0 PHY board-specific LED behavior */ int board_phy_config (struct phy_device *phydev) {
@@ -590,9 +566,6 @@ int board_init(void)setup_ventana_i2c (0 ); board_type =read_eeprom (CONFIG_I2C_GSC , &ventana_info); -#ifdef CONFIG_MXC_SPI -setup_spi (); -#endif setup_ventana_i2c (1 );setup_ventana_i2c (2 );
configs/gwventana_emmc_defconfig +3 -0
@@ -96,6 +96,9 @@ CONFIG_DM_REGULATOR_FIXED=y CONFIG_CONS_INDEX=2 CONFIG_DM_SERIAL=y CONFIG_MXC_UART=y +CONFIG_SPI=y +CONFIG_DM_SPI=y +CONFIG_MXC_SPI=y CONFIG_DM_THERMAL=y CONFIG_IMX_THERMAL=y CONFIG_USB=y
configs/gwventana_gw5904_defconfig +3 -0
@@ -100,6 +100,9 @@ CONFIG_DM_REGULATOR_FIXED=y CONFIG_CONS_INDEX=2 CONFIG_DM_SERIAL=y CONFIG_MXC_UART=y +CONFIG_SPI=y +CONFIG_DM_SPI=y +CONFIG_MXC_SPI=y CONFIG_DM_THERMAL=y CONFIG_IMX_THERMAL=y CONFIG_USB=y
configs/gwventana_nand_defconfig +3 -0
@@ -102,6 +102,9 @@ CONFIG_DM_REGULATOR_FIXED=y CONFIG_CONS_INDEX=2 CONFIG_DM_SERIAL=y CONFIG_MXC_UART=y +CONFIG_SPI=y +CONFIG_DM_SPI=y +CONFIG_MXC_SPI=y CONFIG_DM_THERMAL=y CONFIG_IMX_THERMAL=y CONFIG_USB=y
Signature · 1 line
2.17.1
PATCH 11/11 imx: ventana: enable dm for SPI
Quoted 3 lines
Enable driver model for SPI which allows us to remove the iomux and init.
Signed-off-by Tim Harvey <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================
cover imx: ventana: convert Gateworks Ventana to dm
In reply to Tim HarveyQuoted 12 lines · Tim Harvey
This is the first series converting the IMX6 basd Gateworks Ventana boards to driver-model.
This series resolves some issues with NAND SPL (non DM SPL) in order to read the FIT image. Additionally it covers conversions to
DM_USB,DM_MMC,DM_MTD, andDM_SPI.Remaining items are
DM_PCIandDM_ETHwhich I'm still working through.Tim
Quoted 13 lines
Tim Harvey (11):
spl: fit: nand: skip bad block handling if NAND chip not fully defined
spl: fit: nand: allow for non-page-aligned elements
dt-bindings: add tda1997x and bindings
imx: ventana: add Gateworks Ventana dts
arm: dts: imx6qdl-gw*: adddr_modeprop to dt to avoid error
imx: ventana: convert U-Boot toOF_CONTROLusing FIT image
imx: ventana: add pinctrl and remove unneeded UART init and config
imx: ventana: enable dm support for USB
imx: ventana: enable dm support for MMC and SATA
imx: ventana: enable dm for MTD and NAND
imx: ventana: enable dm for SPI
Stefano,
I'm ready to send a v2 of this patch series. Have you had a chance to review these yet? Tom reviewed the first three and I have an update to the commit log pending to state what Linux kernel the tda1997x bindings come from but I have not had any comments on the rest of the series.
There may have been an issue with my mail server when I sent them so they may have got missed.
Best Regards,
Tim