dm: Convert TPC70 to use DM and DTS in SPL and u-boot proper
Subsystems (3)
v2 cover dm: Convert TPC70 to use DM and DTS in SPL and u-boot proper
This patch series converts imx6q based tpc70 board to use driver model and device tree description in SPL and u-boot proper.
All the non-DM parts of the code has been removed.
This patch series also uses the Common Clock Framework [CCF] as a base for clock management on imx6q board.
Travis-CI: https://travis-ci.org/lmajewski/u-boot-dfu/builds/565198753
Those patches are applied on top of -master:
SHA1: 75551c8bfc9545e31ec2ce238cac3857904007b8
Lukasz Majewski (11):
imx: tpc70: config: Add script commands to update u-boot and OE's wic
imx: tpc70: config: Update TPC70 config to support eMMC's boot0 SPL
update
imx: tpc70: Add board_boot_order() to distinguish between eMMC and SD
boot
imx: tpc70: DTS: Explicitly add imx6q-kp.dtb to Makefile for DTB
compilation
imx: tpc70: cosmetic: Replace magic numbers when setting ENET clock
imx: tpc70: led: Enable LED default state
imx: tpc70: dts: Add TPC70 board (imx6q based) device tree description
imx: dts: Add u-boot specific set of device tree properties for tpc70
imx: tpc70: Convert TPC70 (imx6q) board to use DM/DTS in SPL and
u-boot
imx: spl: tpc70: Do not remove clock related properties from DTS
imx: config: Update KP's TPC70 config to support SWUpdate
arch/arm/dts/Makefile | 1 + arch/arm/dts/imx6q-kp-u-boot.dtsi | 59 ++++++++ arch/arm/dts/imx6q-kp.dts | 219 ++++++++++++++++++++++++++++++ arch/arm/mach-imx/mx6/Kconfig | 10 ++ board/k+p/kp_imx6q_tpc/kp_imx6q_tpc.c | 172 ++--------------------- board/k+p/kp_imx6q_tpc/kp_imx6q_tpc_spl.c | 137 ++----------------- configs/kp_imx6q_tpc_defconfig | 34 ++++- include/configs/kp_imx6q_tpc.h | 54 ++++---- 8 files changed, 377 insertions(+), 309 deletions(-) create mode 100644 arch/arm/dts/imx6q-kp-u-boot.dtsi create mode 100644 arch/arm/dts/imx6q-kp.dts
Signature · 1 line
2.11.0
PATCH v2 1/11 imx: tpc70: config: Add script commands to update u-boot and OE's wic
---
include/configs/kp_imx6q_tpc.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+)
include/configs/kp_imx6q_tpc.h +21 -0
@@ -83,11 +83,32 @@"rdinit=/sbin/init\0" \"addinitrd=setenv bootargs ${bootargs} rdinit=${rdinit} ${debug} \0" \"fit_config=mx6q_tpc70_conf\0" \ +"uboot_file=u-boot.img\0" \ +"SPL_file=SPL\0" \ +"wic_file=kp-image-kpimx6qtpc.wic\0" \"upd_image=st.4k\0" \"updargs=setenv bootargs console=${console} ${smp}" \"rdinit=${rdinit} ${debug} ${displayargs}\0" \"loadusb=usb start; " \"fatload usb 0 ${loadaddr} ${upd_image}\0" \ +"upd_uboot_sd=" \ +"if tftp ${loadaddr} ${uboot_file}; then " \ +"setexpr blkc ${filesize} / 0x200;" \ +"setexpr blkc ${blkc} + 1;" \ +"mmc write ${loadaddr} 0x8A ${blkc};" \ +"fi;\0" \ +"upd_SPL_sd=" \ +"if tftp ${loadaddr} ${SPL_file}; then " \ +"setexpr blkc ${filesize} / 0x200;" \ +"setexpr blkc ${blkc} + 1;" \ +"mmc write ${loadaddr} 0x2 ${blkc};" \ +"fi;\0" \ +"upd_wic=" \ +"if tftp ${loadaddr} ${wic_file}; then " \ +"setexpr blkc ${filesize} / 0x200;" \ +"setexpr blkc ${blkc} + 1;" \ +"mmc write ${loadaddr} 0x0 ${blkc};" \ +"fi;\0" \"usbupd=echo Booting update from usb ...; " \"setenv bootargs; " \"run updargs; " \
Signature · 1 line
2.11.0
PATCH v2 1/11 imx: tpc70: config: Add script commands to update u-boot and OE's wic
Quoted 36 lines
Subject: [PATCH v2 01/11] imx: tpc70: config: Add script commands to update u-boot and OE's wic
Signed-off-by Lukasz Majewski <[email protected]>---
include/configs/kp_imx6q_tpc.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+)include/configs/kp_imx6q_tpc.h +14
-0@@ -83,11 +83,32 @@"rdinit=/sbin/init\0" \"addinitrd=setenv bootargs ${bootargs} rdinit=${rdinit} ${debug} \0" \"fit_config=mx6q_tpc70_conf\0" \ +"uboot_file=u-boot.img\0" \ +"SPL_file=SPL\0" \ +"wic_file=kp-image-kpimx6qtpc.wic\0" \"upd_image=st.4k\0" \"updargs=setenv bootargs console=${console} ${smp}" \"rdinit=${rdinit} ${debug} ${displayargs}\0" \"loadusb=usb start; " \"fatload usb 0 ${loadaddr} ${upd_image}\0" \ +"upd_uboot_sd=" \ +"if tftp ${loadaddr} ${uboot_file}; then " \ +"setexpr blkc ${filesize} / 0x200;" \ +"setexpr blkc ${blkc} + 1;" \ +"mmc write ${loadaddr} 0x8A ${blkc};" \ +"fi;\0" \ +"upd_SPL_sd=" \ +"if tftp ${loadaddr} ${SPL_file}; then " \ +"setexpr blkc ${filesize} / 0x200;" \ +"setexpr blkc ${blkc} + 1;" \ +"mmc write ${loadaddr} 0x2 ${blkc};" \
include/configs/kp_imx6q_tpc.h line 114
Quoted 10 lines
include/configs/kp_imx6q_tpc.h +7
-0+"fi;\0" \ +"upd_wic=" \ +"if tftp ${loadaddr} ${wic_file}; then " \ +"setexpr blkc ${filesize} / 0x200;" \ +"setexpr blkc ${blkc} + 1;" \ +"mmc write ${loadaddr} 0x0 ${blkc};" \ +"fi;\0" \"usbupd=echo Booting update from usb ...; " \"setenv bootargs; " \"run updargs; " \
Quoted 2 lines
--
2.11.0
PATCH v2 2/11 imx: tpc70: config: Update TPC70 config to support eMMC's boot0 SPL update
In reply to Lukasz MajewskiThe TPC70 can boot from eMMC's boot0. This patch allows it to update this HW partition's SPL.
---
include/configs/kp_imx6q_tpc.h | 5 +++++ 1 file changed, 5 insertions(+)
include/configs/kp_imx6q_tpc.h +5 -0
@@ -43,6 +43,7 @@#define CONFIG_SYS_FSL_ESDHC_ADDR 0#define CONFIG_SYS_FSL_USDHC_NUM 2#define CONFIG_SYS_MMC_ENV_DEV 1/* 0 = SDHC2, 1 = SDHC4 (eMMC) */ +#define CONFIG_SUPPORT_EMMC_BOOT /* UART */ #define CONFIG_MXC_UART
@@ -103,6 +104,10 @@"setexpr blkc ${blkc} + 1;" \"mmc write ${loadaddr} 0x2 ${blkc};" \"fi;\0" \ +"upd_SPL_mmc=mmc dev 1; mmc partconf 1 0 1 1; run upd_SPL_sd\0" \ +"upd_uboot_mmc=mmc dev 1; mmc partconf 1 0 1 1; run upd_uboot_sd\0" \ +"up_mmc=run upd_SPL_mmc; run upd_uboot_mmc\0" \ +"up_sd=run upd_SPL_sd; run upd_uboot_sd\0" \"upd_wic=" \"if tftp ${loadaddr} ${wic_file}; then " \"setexpr blkc ${filesize} / 0x200;" \
Signature · 1 line
2.11.0
PATCH v2 2/11 imx: tpc70: config: Update TPC70 config to support eMMC's boot0 SPL update
Quoted 36 lines
Subject: [PATCH v2 02/11] imx: tpc70: config: Update TPC70 config to support eMMC's boot0 SPL update
The TPC70 can boot from eMMC's boot0. This patch allows it to update this HW partition's SPL.
Signed-off-by Lukasz Majewski <[email protected]>---
include/configs/kp_imx6q_tpc.h | 5 +++++ 1 file changed, 5 insertions(+)include/configs/kp_imx6q_tpc.h +0
-0@@ -43,6 +43,7 @@#define CONFIG_SYS_FSL_ESDHC_ADDR 0#define CONFIG_SYS_FSL_USDHC_NUM 2#define CONFIG_SYS_MMC_ENV_DEV 1/* 0 = SDHC2, 1 = SDHC4 (eMMC) */
include/configs/kp_imx6q_tpc.h +5
-0+#define CONFIG_SUPPORT_EMMC_BOOT /* UART */ #define CONFIG_MXC_UART @@ -103,6 +104,10 @@"setexpr blkc ${blkc} + 1;" \"mmc write ${loadaddr} 0x2 ${blkc};" \"fi;\0" \ +"upd_SPL_mmc=mmc dev 1; mmc partconf 1 0 1 1; run upd_SPL_sd\0" \ +"upd_uboot_mmc=mmc dev 1; mmc partconf 1 0 1 1; run upd_uboot_sd\0" \ +"up_mmc=run upd_SPL_mmc; run upd_uboot_mmc\0" \ +"up_sd=run upd_SPL_sd; run upd_uboot_sd\0" \"upd_wic=" \"if tftp ${loadaddr} ${wic_file}; then " \
Quoted 1 line
"setexpr blkc ${filesize} /
0x200;" \
Quoted 2 lines
--
2.11.0
PATCH v2 3/11 imx: tpc70: Add board_boot_order() to distinguish between eMMC and SD boot
In reply to Lukasz MajewskiThe TPC70 can boot from SD card (debug/development) and eMMC (production). The board_boot_order() function provides a run time check for the device from which one wants to boot (it is selected by GPIO pins setup).
Moreover, a fallback to SD card is provided if the detection is not possible or working properly.
---
board/k+p/kp_imx6q_tpc/kp_imx6q_tpc_spl.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+)
board/k+p/kp_imx6q_tpc/kp_imx6q_tpc_spl.c +20 -0
@@ -308,6 +308,26 @@ int board_mmc_init(bd_t *bd)return fsl_esdhc_initialize (bd, &usdhc_cfg[0 ]); } +void board_boot_order (u32 *spl_boot_list) +{ +u32 boot_device =spl_boot_device (); +u32 reg =imx6_src_get_boot_mode (); + + reg = (reg &IMX6_BMODE_MASK ) >>IMX6_BMODE_SHIFT ; + +debug ("%s: boot device: 0x%x (0x4 SD, 0x6 eMMC)\n" , __func__, reg); +if (boot_device ==BOOT_DEVICE_MMC1 ) +if (reg ==IMX6_BMODE_MMC || reg ==IMX6_BMODE_EMMC ) + boot_device =BOOT_DEVICE_MMC2 ; + + spl_boot_list[0 ] = boot_device; +/* +* Below boot device is a 'fallback' - it shall always be possible to +* boot from SD card +*/ + spl_boot_list[1 ] =BOOT_DEVICE_MMC1 ; +} +void board_init_f (ulong dummy) {/* setup AIPS and disable watchdog */
Signature · 1 line
2.11.0
PATCH v2 3/11 imx: tpc70: Add board_boot_order() to distinguish between eMMC and SD boot
Quoted 38 lines
Subject: [PATCH v2 03/11] imx: tpc70: Add
board_boot_order()to distinguish between eMMC and SD bootThe TPC70 can boot from SD card (debug/development) and eMMC (production).
Theboard_boot_order()function provides a run time check for the device from which one wants to boot (it is selected by GPIO pins setup).Moreover, a fallback to SD card is provided if the detection is not possible or working properly.
Signed-off-by Lukasz Majewski <[email protected]>---
board/k+p/kp_imx6q_tpc/kp_imx6q_tpc_spl.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+)board/k+p/kp_imx6q_tpc/kp_imx6q_tpc_spl.c +12
-0@@ -308,6 +308,26 @@ int board_mmc_init(bd_t *bd)return fsl_esdhc_initialize (bd, &usdhc_cfg[0 ]); } +void board_boot_order (u32 *spl_boot_list) { +u32 boot_device =spl_boot_device (); +u32 reg =imx6_src_get_boot_mode (); + + reg = (reg &IMX6_BMODE_MASK ) >>IMX6_BMODE_SHIFT ; + +debug ("%s: boot device: 0x%x (0x4 SD, 0x6 eMMC)\n" , __func__, reg); +if (boot_device ==BOOT_DEVICE_MMC1 ) +if (reg ==IMX6_BMODE_MMC || reg ==IMX6_BMODE_EMMC ) + boot_device =BOOT_DEVICE_MMC2 ; + + spl_boot_list[0 ] = boot_device;
board/k+p/kp_imx6q_tpc/kp_imx6q_tpc_spl.c int board_mmc_init(bd_t *bd) · line 331
Quoted 10 lines
board/k+p/kp_imx6q_tpc/kp_imx6q_tpc_spl.c +7
-0+/* +* Below boot device is a 'fallback' - it shall always be possible to +* boot from SD card +*/ + spl_boot_list[1 ] =BOOT_DEVICE_MMC1 ; +} +void board_init_f (ulong dummy) {/* setup AIPS and disable watchdog */
Quoted 2 lines
board/k+p/kp_imx6q_tpc/kp_imx6q_tpc_spl.c +0
-1--2.11.0
PATCH v2 4/11 imx: tpc70: DTS: Explicitly add imx6q-kp.dtb to Makefile for DTB compilation
In reply to Lukasz MajewskiThis commit is necessary to fix following error:
Device Tree Source is not correctly specified. Please define 'CONFIG_DEFAULT_DEVICE_TREE' or build with 'DEVICE_TREE=<device_tree>' argument
dts/Makefile:28: recipe for target 'arch/arm/dts/imx6q-kp.dtb' failed
---
arch/arm/dts/Makefile | 1 + 1 file changed, 1 insertion(+)
arch/arm/dts/Makefile +1 -0
@@ -564,6 +564,7 @@ dtb-$(CONFIG_MX6QDL) += \ imx6q-icore.dtb \ imx6q-icore-mipi.dtb \ imx6q-icore-rqs.dtb \ + imx6q-kp.dtb \ imx6q-sabreauto.dtb \ imx6q-sabresd.dtb \ imx6q-wandboard-revb1.dtb \
Signature · 1 line
2.11.0
PATCH v2 4/11 imx: tpc70: DTS: Explicitly add imx6q-kp.dtb to Makefile for DTB compilation
Quoted 22 lines
Subject: [PATCH v2 04/11] imx: tpc70: DTS: Explicitly add imx6q-kp.dtb to
Makefilefor DTB compilationThis commit is necessary to fix following error:
Device Tree Source is not correctly specified. Please define '
CONFIG_DEFAULT_DEVICE_TREE' or build with 'DEVICE_TREE=<device_tree>' argumentdts/Makefile:28: recipe for target '
arch/arm/dts/imx6q-kp.dtb' failedSigned-off-by Lukasz Majewski <[email protected]>---
arch/arm/dts/Makefile | 1 + 1 file changed, 1 insertion(+)arch/arm/dts/Makefile index renamed from arch/arm/dts/Makefile +0
-0
49d1faef32..e7005663a8100644
arch/arm/dts/Makefile dtb-$(CONFIG_MX6QDL) += \ · line 570
Quoted 7 lines
arch/arm/dts/Makefile +1
-0@@ -564,6 +564,7 @@ dtb-$(CONFIG_MX6QDL) += \ imx6q-icore.dtb \ imx6q-icore-mipi.dtb \ imx6q-icore-rqs.dtb \ + imx6q-kp.dtb \ imx6q-sabreauto.dtb \ imx6q-sabresd.dtb \ imx6q-wandboard-revb1.dtb \
Quoted 2 lines
--
2.11.0
PATCH v2 5/11 imx: tpc70: cosmetic: Replace magic numbers when setting ENET clock
In reply to Lukasz MajewskiThis is a cosmetic change, just to use proper define instead of magic numbers.
---
board/k+p/kp_imx6q_tpc/kp_imx6q_tpc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
board/k+p/kp_imx6q_tpc/kp_imx6q_tpc.c +2 -1
@@ -118,7 +118,8 @@ static int setup_fec_clock(void)struct iomuxc *iomuxc_regs = (struct iomuxc *)IOMUXC_BASE_ADDR ;/* set gpr1[21] to select anatop clock */ -clrsetbits_le32 (&iomuxc_regs->gpr[1 ],0x1 <<21 ,0x1 <<21 ); +clrsetbits_le32 (&iomuxc_regs->gpr[1 ],IOMUXC_GPR1_ENET_CLK_SEL_MASK , +IOMUXC_GPR1_ENET_CLK_SEL_MASK );return enable_fec_anatop_clock (0 ,ENET_50MHZ ); }
Signature · 1 line
2.11.0
PATCH v2 5/11 imx: tpc70: cosmetic: Replace magic numbers when setting ENET clock
Quoted 17 lines
Subject: [PATCH v2 05/11] imx: tpc70: cosmetic: Replace magic numbers when setting ENET clock
This is a cosmetic change, just to use proper define instead of magic numbers.
Signed-off-by Lukasz Majewski <[email protected]>---
board/k+p/kp_imx6q_tpc/kp_imx6q_tpc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)board/k+p/kp_imx6q_tpc/kp_imx6q_tpc.c +0
-0
board/k+p/kp_imx6q_tpc/kp_imx6q_tpc.c static int setup_fec_clock(void) · line 123
Quoted 7 lines
board/k+p/kp_imx6q_tpc/kp_imx6q_tpc.c +2
-1@@ -118,7 +118,8 @@ static int setup_fec_clock(void)struct iomuxc *iomuxc_regs = (struct iomuxc *)IOMUXC_BASE_ADDR ;/* set gpr1[21] to select anatop clock */ -clrsetbits_le32 (&iomuxc_regs->gpr[1 ],0x1 <<21 ,0x1 <<21 ); +clrsetbits_le32 (&iomuxc_regs->gpr[1 ],IOMUXC_GPR1_ENET_CLK_SEL_MASK , +IOMUXC_GPR1_ENET_CLK_SEL_MASK );
Would setbits_le32 work here?
Regards,
Peng.
Quoted 4 lines
board/k+p/kp_imx6q_tpc/kp_imx6q_tpc.c +0
-1return enable_fec_anatop_clock (0 ,ENET_50MHZ ); } --2.11.0
PATCH v2 5/11 imx: tpc70: cosmetic: Replace magic numbers when setting ENET clock
Hi Peng,
Quoted 21 lines
Quoted 21 lines
Subject: [PATCH v2 05/11] imx: tpc70: cosmetic: Replace magic numbers when setting ENET clock
This is a cosmetic change, just to use proper define instead of magic numbers.
Signed-off-by Lukasz Majewski <[email protected]>---
board/k+p/kp_imx6q_tpc/kp_imx6q_tpc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)board/k+p/kp_imx6q_tpc/kp_imx6q_tpc.c +0
-0@@ -118,7 +118,8 @@ static int setup_fec_clock(void)struct iomuxc *iomuxc_regs = (struct iomuxc *)IOMUXC_BASE_ADDR ;
Quoted 8 lines
board/k+p/kp_imx6q_tpc/kp_imx6q_tpc.c static int setup_fec_clock(void) · line 125
Quoted 6 lines
board/k+p/kp_imx6q_tpc/kp_imx6q_tpc.c +2
-1/* set gpr1[21] to select anatop clock */ -clrsetbits_le32 (&iomuxc_regs->gpr[1 ],0x1 <<21 ,0x1 << 21); +clrsetbits_le32 (&iomuxc_regs->gpr[1 ],IOMUXC_GPR1_ENET_CLK_SEL_MASK , +IOMUXC_GPR1_ENET_CLK_SEL_MASK );Would
setbits_le32work here?
Good point. It shall be possible to use setbits_le32. I will try to use it.
Quoted 9 lines
Regards,
Peng.Quoted 4 lines
return
enable_fec_anatop_clock(0, ENET_50MHZ); }
--
2.11.0
Best regards,
Lukasz Majewski
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma at denx.de -------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190811/f98c836c/attachment.sig>
PATCH v2 6/11 imx: tpc70: led: Enable LED default state
In reply to Lukasz MajewskiThis change sets the default state of LEDs on TPC70.
---
board/k+p/kp_imx6q_tpc/kp_imx6q_tpc.c | 4 ++++ 1 file changed, 4 insertions(+)
board/k+p/kp_imx6q_tpc/kp_imx6q_tpc.c +4 -0
@@ -27,6 +27,7 @@#include <netdev.h> #include <usb.h> #include <usb/ehci-ci.h> +#include <led.h> DECLARE_GLOBAL_DATA_PTR ;
@@ -290,6 +291,9 @@ int board_late_init(void)add_board_boot_modes (board_boot_modes);#endif +if (IS_ENABLED (CONFIG_LED )) +led_default_state (); +env_set ("boardname" ,"kp-tpc" );env_set ("boardsoc" ,"imx6q" );return 0 ;
Signature · 1 line
2.11.0
PATCH v2 6/11 imx: tpc70: led: Enable LED default state
Quoted 24 lines
Subject: [PATCH v2 06/11] imx: tpc70: led: Enable LED default state
This change sets the default state of LEDs on TPC70.
Signed-off-by Lukasz Majewski <[email protected]>---
board/k+p/kp_imx6q_tpc/kp_imx6q_tpc.c | 4 ++++ 1 file changed, 4 insertions(+)board/k+p/kp_imx6q_tpc/kp_imx6q_tpc.c +1
-0@@ -27,6 +27,7 @@#include <netdev.h> #include <usb.h> #include <usb/ehci-ci.h> +#include <led.h> DECLARE_GLOBAL_DATA_PTR ;
board/k+p/kp_imx6q_tpc/kp_imx6q_tpc.c int board_late_init(void) · line 299
Quoted 9 lines
board/k+p/kp_imx6q_tpc/kp_imx6q_tpc.c +3
-0@@ -290,6 +291,9 @@ int board_late_init(void)add_board_boot_modes (board_boot_modes);#endif +if (IS_ENABLED (CONFIG_LED )) +led_default_state (); +env_set ("boardname" ,"kp-tpc" );env_set ("boardsoc" ,"imx6q" );return 0 ;
Quoted 2 lines
--
2.11.0
PATCH v2 7/11 imx: tpc70: dts: Add TPC70 board (imx6q based) device tree description
In reply to Lukasz MajewskiThis commit defines the TPC70 imx6q board with device tree description.
---
arch/arm/dts/imx6q-kp.dts | 219 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 219 insertions(+) create mode 100644 arch/arm/dts/imx6q-kp.dts
arch/arm/dts/imx6q-kp.dts new file +219 -0
@@ -0,0 +1,219 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright 2018 + * Lukasz Majewski, DENX Software Engineering, lukma at denx.de + * + * SPDX-License-Identifier: GPL-2.0+ or X11 + */ + +/dts-v1/; +#include <dt-bindings/gpio/gpio.h> +#include "imx6q.dtsi" + +/ { + model = "K+P iMX6Q"; + compatible = "kp,imx6-kp", "fsl,imx6"; + + aliases { + mmc0 = &usdhc2; + mmc1 = &usdhc4; + usb1 = &usbh1; + }; + + chosen { + stdout-path = &uart1; + }; + + leds { + compatible = "gpio-leds"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_leds>; + + green { + label = "green"; + gpios = <&gpio3 23 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "gpio"; + default-state = "off"; + }; + + red { + label = "red"; + gpios = <&gpio3 16 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "gpio"; + default-state = "off"; + }; + }; + + memory at 10000000 { + reg = <0x10000000 0x40000000>; + }; + + reg_usb_h1_vbus: regulator-usb_h1_vbus { + compatible = "regulator-fixed"; + regulator-name = "usb_h1_vbus"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + gpio = <&gpio3 31 GPIO_ACTIVE_HIGH>; + enable-active-high; + }; +}; + +&fec { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_enet>; + phy-reset-gpios = <&gpio1 25 GPIO_ACTIVE_LOW>; + phy-reset-duration = <10>; + phy-mode = "rgmii"; + fsl,magic-packet; + fsl,enet-loopback-clk; /* anatop reference clk via PAD loopback */ + fsl,enet-freq = <1>; /* ENET_25MHZ = 0, ENET_50MHZ = 1 */ + /* ENET_100MHZ = 2, ENET_125MHZ = 3 */ + status = "okay"; +}; + +&i2c1 { + clock-frequency = <400000>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_i2c1>; + status = "okay"; +}; + +&i2c2 { + clock-frequency = <400000>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_i2c2>; + status = "okay"; +}; + +&iomuxc { + pinctrl_enet: enetgrp { + fsl,pins = < + MX6QDL_PAD_ENET_MDIO__ENET_MDIO 0x1b0b0 + MX6QDL_PAD_ENET_MDC__ENET_MDC 0x1b0b0 + MX6QDL_PAD_RGMII_TXC__RGMII_TXC 0x1b0b0 + MX6QDL_PAD_RGMII_TD0__RGMII_TD0 0x1b0b0 + MX6QDL_PAD_RGMII_TD1__RGMII_TD1 0x1b0b0 + MX6QDL_PAD_RGMII_TD2__RGMII_TD2 0x1b0b0 + MX6QDL_PAD_RGMII_TD3__RGMII_TD3 0x1b0b0 + MX6QDL_PAD_RGMII_TX_CTL__RGMII_TX_CTL 0x1b0b0 + MX6QDL_PAD_ENET_REF_CLK__ENET_TX_CLK 0x1b0b0 + MX6QDL_PAD_RGMII_RXC__RGMII_RXC 0x1b0b0 + MX6QDL_PAD_RGMII_RD0__RGMII_RD0 0x1b0b0 + MX6QDL_PAD_RGMII_RD1__RGMII_RD1 0x1b0b0 + MX6QDL_PAD_RGMII_RD2__RGMII_RD2 0x1b0b0 + MX6QDL_PAD_RGMII_RD3__RGMII_RD3 0x1b0b0 + MX6QDL_PAD_RGMII_RX_CTL__RGMII_RX_CTL 0x1b0b0 + MX6QDL_PAD_GPIO_16__ENET_REF_CLK 0x4001b0a8 + MX6QDL_PAD_ENET_CRS_DV__GPIO1_IO25 0x1b0b0 + >; + }; + + pinctrl_leds: gpioledsgrp { + fsl,pins = < + MX6QDL_PAD_EIM_D23__GPIO3_IO23 0x4001b0b0 + MX6QDL_PAD_EIM_D16__GPIO3_IO16 0x4001b0b0 + >; + }; + + pinctrl_i2c1: i2c1grp { + fsl,pins = < + MX6QDL_PAD_CSI0_DAT8__I2C1_SDA 0x4001b8b1 + MX6QDL_PAD_CSI0_DAT9__I2C1_SCL 0x4001b8b1 + >; + }; + + pinctrl_i2c2: i2c2grp { + fsl,pins = < + MX6QDL_PAD_KEY_COL3__I2C2_SCL 0x4001b8b1 + MX6QDL_PAD_KEY_ROW3__I2C2_SDA 0x4001b8b1 + >; + }; + + pinctrl_uart1: uart1grp { + fsl,pins = < + MX6QDL_PAD_SD3_DAT7__UART1_TX_DATA 0x1b0b1 + MX6QDL_PAD_SD3_DAT6__UART1_RX_DATA 0x1b0b1 + >; + }; + + pinctrl_uart2: uart2grp { + fsl,pins = < + MX6QDL_PAD_EIM_D26__UART2_TX_DATA 0x1b0b1 + MX6QDL_PAD_EIM_D27__UART2_RX_DATA 0x1b0b1 + MX6QDL_PAD_EIM_D28__UART2_CTS_B 0x1b0b1 + MX6QDL_PAD_EIM_D29__UART2_RTS_B 0x1b0b1 + >; + }; + + pinctrl_usbh1: usbh1grp { + fsl,pins = < + MX6QDL_PAD_EIM_D31__GPIO3_IO31 0x1b0b1 + MX6QDL_PAD_ENET_RX_ER__USB_OTG_ID 0x17059 + >; + }; + + pinctrl_usdhc2: usdhc2grp { + fsl,pins = < + MX6QDL_PAD_SD2_CMD__SD2_CMD 0x17019 + MX6QDL_PAD_SD2_CLK__SD2_CLK 0x10019 + MX6QDL_PAD_SD2_DAT0__SD2_DATA0 0x17019 + MX6QDL_PAD_SD2_DAT1__SD2_DATA1 0x17019 + MX6QDL_PAD_SD2_DAT2__SD2_DATA2 0x17019 + MX6QDL_PAD_SD2_DAT3__SD2_DATA3 0x17019 + MX6QDL_PAD_NANDF_CS3__GPIO6_IO16 0x20000 + MX6QDL_PAD_GPIO_4__GPIO1_IO04 0x20000 + >; + }; + + pinctrl_usdhc4: usdhc4grp { + fsl,pins = < + MX6QDL_PAD_SD4_CMD__SD4_CMD 0x17019 + MX6QDL_PAD_SD4_CLK__SD4_CLK 0x10019 + MX6QDL_PAD_SD4_DAT0__SD4_DATA0 0x17019 + MX6QDL_PAD_SD4_DAT1__SD4_DATA1 0x17019 + MX6QDL_PAD_SD4_DAT2__SD4_DATA2 0x17019 + MX6QDL_PAD_SD4_DAT3__SD4_DATA3 0x17019 + MX6QDL_PAD_SD4_DAT4__SD4_DATA4 0x17019 + MX6QDL_PAD_SD4_DAT5__SD4_DATA5 0x17019 + MX6QDL_PAD_SD4_DAT6__SD4_DATA6 0x17019 + MX6QDL_PAD_SD4_DAT7__SD4_DATA7 0x17019 + >; + }; +}; + +&uart1 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_uart1>; + status = "okay"; +}; + +&uart2 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_uart2>; + uart-has-rtscts; +}; + +&usbh1 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_usbh1>; + vbus-supply = <®_usb_h1_vbus>; + status = "okay"; +}; + +&usdhc2 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_usdhc2>; + bus-width = <4>; + cd-gpios = <&gpio1 4 GPIO_ACTIVE_LOW>; + status = "okay"; +}; + +&usdhc4 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_usdhc4>; + bus-width = <8>; + non-removable; + no-1-8-v; + keep-power-in-suspend; + status = "okay"; +};
Signature · 1 line
2.11.0
PATCH v2 7/11 imx: tpc70: dts: Add TPC70 board (imx6q based) device tree description
Quoted 4 lines
Subject: [PATCH v2 07/11] imx: tpc70: dts: Add TPC70 board (imx6q based) device tree description
This commit defines the TPC70 imx6q board with device tree description.
Is the imx6q-kp.dtsi usable for this board from Linux kernel?
Regards,
Peng.
Quoted 237 lines
Signed-off-by Lukasz Majewski <[email protected]>---
arch/arm/dts/imx6q-kp.dts | 219 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 219 insertions(+) create mode 100644 arch/arm/dts/imx6q-kp.dtsarch/arm/dts/imx6q-kp.dts new file renamed from arch/arm/dts/imx6q-kp.dts +0
-0mode 100644 index 0000000000..12d6db6f80
arch/arm/dts/imx6q-kp.dts new file +113
-0@@ -0,0 +1,219 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright 2018 + * Lukasz Majewski, DENX Software Engineering, lukma at denx.de + * + * SPDX-License-Identifier: GPL-2.0+ or X11 + */ + +/dts-v1/; +#include <dt-bindings/gpio/gpio.h> +#include "imx6q.dtsi" + +/ { + model = "K+P iMX6Q"; + compatible = "kp,imx6-kp", "fsl,imx6"; + + aliases { + mmc0 = &usdhc2; + mmc1 = &usdhc4; + usb1 = &usbh1; + }; + + chosen { + stdout-path = &uart1; + }; + + leds { + compatible = "gpio-leds"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_leds>; + + green { + label = "green"; + gpios = <&gpio3 23 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "gpio"; + default-state = "off"; + }; + + red { + label = "red"; + gpios = <&gpio3 16 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "gpio"; + default-state = "off"; + }; + }; + + memory at 10000000 { + reg = <0x10000000 0x40000000>; + }; + + reg_usb_h1_vbus: regulator-usb_h1_vbus { + compatible = "regulator-fixed"; + regulator-name = "usb_h1_vbus"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + gpio = <&gpio3 31 GPIO_ACTIVE_HIGH>; + enable-active-high; + }; +}; + +&fec { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_enet>; + phy-reset-gpios = <&gpio1 25 GPIO_ACTIVE_LOW>; + phy-reset-duration = <10>; + phy-mode = "rgmii"; + fsl,magic-packet; + fsl,enet-loopback-clk; /* anatop reference clk via PAD loopback */ + fsl,enet-freq = <1>; /* ENET_25MHZ = 0, ENET_50MHZ = 1 */ + /* ENET_100MHZ = 2, ENET_125MHZ = 3 */ + status = "okay"; +}; + +&i2c1 { + clock-frequency = <400000>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_i2c1>; + status = "okay"; +}; + +&i2c2 { + clock-frequency = <400000>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_i2c2>; + status = "okay"; +}; + +&iomuxc { + pinctrl_enet: enetgrp { + fsl,pins = < + MX6QDL_PAD_ENET_MDIO__ENET_MDIO 0x1b0b0 + MX6QDL_PAD_ENET_MDC__ENET_MDC 0x1b0b0 + MX6QDL_PAD_RGMII_TXC__RGMII_TXC 0x1b0b0 + MX6QDL_PAD_RGMII_TD0__RGMII_TD0 0x1b0b0 + MX6QDL_PAD_RGMII_TD1__RGMII_TD1 0x1b0b0 + MX6QDL_PAD_RGMII_TD2__RGMII_TD2 0x1b0b0 + MX6QDL_PAD_RGMII_TD3__RGMII_TD3 0x1b0b0 + MX6QDL_PAD_RGMII_TX_CTL__RGMII_TX_CTL 0x1b0b0 + MX6QDL_PAD_ENET_REF_CLK__ENET_TX_CLK 0x1b0b0 + MX6QDL_PAD_RGMII_RXC__RGMII_RXC 0x1b0b0 + MX6QDL_PAD_RGMII_RD0__RGMII_RD0 0x1b0b0 + MX6QDL_PAD_RGMII_RD1__RGMII_RD1 0x1b0b0 + MX6QDL_PAD_RGMII_RD2__RGMII_RD2 0x1b0b0 + MX6QDL_PAD_RGMII_RD3__RGMII_RD3 0x1b0b0 + MX6QDL_PAD_RGMII_RX_CTL__RGMII_RX_CTL 0x1b0b0 + MX6QDL_PAD_GPIO_16__ENET_REF_CLK 0x4001b0a8 + MX6QDL_PAD_ENET_CRS_DV__GPIO1_IO25 0x1b0b0 + >; + }; + + pinctrl_leds: gpioledsgrp { + fsl,pins = < + MX6QDL_PAD_EIM_D23__GPIO3_IO23
0x4001b0b0arch/arm/dts/imx6q-kp.dts new file +1
-0+ MX6QDL_PAD_EIM_D16__GPIO3_IO16
0x4001b0b0arch/arm/dts/imx6q-kp.dts new file +105
-1+ >; + }; + + pinctrl_i2c1: i2c1grp { + fsl,pins = < + MX6QDL_PAD_CSI0_DAT8__I2C1_SDA 0x4001b8b1 + MX6QDL_PAD_CSI0_DAT9__I2C1_SCL 0x4001b8b1 + >; + }; + + pinctrl_i2c2: i2c2grp { + fsl,pins = < + MX6QDL_PAD_KEY_COL3__I2C2_SCL 0x4001b8b1 + MX6QDL_PAD_KEY_ROW3__I2C2_SDA 0x4001b8b1 + >; + }; + + pinctrl_uart1: uart1grp { + fsl,pins = < + MX6QDL_PAD_SD3_DAT7__UART1_TX_DATA 0x1b0b1 + MX6QDL_PAD_SD3_DAT6__UART1_RX_DATA 0x1b0b1 + >; + }; + + pinctrl_uart2: uart2grp { + fsl,pins = < + MX6QDL_PAD_EIM_D26__UART2_TX_DATA 0x1b0b1 + MX6QDL_PAD_EIM_D27__UART2_RX_DATA 0x1b0b1 + MX6QDL_PAD_EIM_D28__UART2_CTS_B 0x1b0b1 + MX6QDL_PAD_EIM_D29__UART2_RTS_B 0x1b0b1 + >; + }; + + pinctrl_usbh1: usbh1grp { + fsl,pins = < + MX6QDL_PAD_EIM_D31__GPIO3_IO31 0x1b0b1 + MX6QDL_PAD_ENET_RX_ER__USB_OTG_ID 0x17059 + >; + }; + + pinctrl_usdhc2: usdhc2grp { + fsl,pins = < + MX6QDL_PAD_SD2_CMD__SD2_CMD 0x17019 + MX6QDL_PAD_SD2_CLK__SD2_CLK 0x10019 + MX6QDL_PAD_SD2_DAT0__SD2_DATA0 0x17019 + MX6QDL_PAD_SD2_DAT1__SD2_DATA1 0x17019 + MX6QDL_PAD_SD2_DAT2__SD2_DATA2 0x17019 + MX6QDL_PAD_SD2_DAT3__SD2_DATA3 0x17019 + MX6QDL_PAD_NANDF_CS3__GPIO6_IO16 0x20000 + MX6QDL_PAD_GPIO_4__GPIO1_IO04 0x20000 + >; + }; + + pinctrl_usdhc4: usdhc4grp { + fsl,pins = < + MX6QDL_PAD_SD4_CMD__SD4_CMD 0x17019 + MX6QDL_PAD_SD4_CLK__SD4_CLK 0x10019 + MX6QDL_PAD_SD4_DAT0__SD4_DATA0 0x17019 + MX6QDL_PAD_SD4_DAT1__SD4_DATA1 0x17019 + MX6QDL_PAD_SD4_DAT2__SD4_DATA2 0x17019 + MX6QDL_PAD_SD4_DAT3__SD4_DATA3 0x17019 + MX6QDL_PAD_SD4_DAT4__SD4_DATA4 0x17019 + MX6QDL_PAD_SD4_DAT5__SD4_DATA5 0x17019 + MX6QDL_PAD_SD4_DAT6__SD4_DATA6 0x17019 + MX6QDL_PAD_SD4_DAT7__SD4_DATA7 0x17019 + >; + }; +}; + +&uart1 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_uart1>; + status = "okay"; +}; + +&uart2 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_uart2>; + uart-has-rtscts; +}; + +&usbh1 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_usbh1>; + vbus-supply = <®_usb_h1_vbus>; + status = "okay"; +}; + +&usdhc2 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_usdhc2>; + bus-width = <4>; + cd-gpios = <&gpio1 4 GPIO_ACTIVE_LOW>; + status = "okay"; +}; + +&usdhc4 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_usdhc4>; + bus-width = <8>; + non-removable; + no-1-8-v; + keep-power-in-suspend; + status = "okay"; +}; --2.11.0
PATCH v2 7/11 imx: tpc70: dts: Add TPC70 board (imx6q based) device tree description
Hi Peng,
Quoted 8 lines
Quoted 5 lines
Subject: [PATCH v2 07/11] imx: tpc70: dts: Add TPC70 board (imx6q based) device tree description
This commit defines the TPC70 imx6q board with device tree description.
Is the
imx6q-kp.dtsiusable for this board from Linux kernel?
The imx6q-kp.dtsi is defined in the Linux kernel [1].
However, not all features - like backlight, CAN, etc. are needed in U-Boot. To reduce SPL footprint, as the TPC70 is the first board (from i.MX6Q family of SoCs) which uses only DM in SPL and U-Boot proper, only the necessary subset of [1] was added to U-Boot.
Note:
[1] -
https://elixir.bootlin.com/linux/v5.2.8/source/arch/arm/boot/dts/imx6q-kp.dtsi
Quoted 279 lines
Regards,
Peng.Quoted 276 lines
Signed-off-by Lukasz Majewski <[email protected]>---
arch/arm/dts/imx6q-kp.dts | 219 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 219 insertions(+) create mode 100644 arch/arm/dts/imx6q-kp.dtsarch/arm/dts/imx6q-kp.dts new file +68
-0@@ -0,0 +1,219 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright 2018 + * Lukasz Majewski, DENX Software Engineering, lukma at denx.de + * + * SPDX-License-Identifier: GPL-2.0+ or X11 + */ + +/dts-v1/; +#include <dt-bindings/gpio/gpio.h> +#include "imx6q.dtsi" + +/ { + model = "K+P iMX6Q"; + compatible = "kp,imx6-kp", "fsl,imx6"; + + aliases { + mmc0 = &usdhc2; + mmc1 = &usdhc4; + usb1 = &usbh1; + }; + + chosen { + stdout-path = &uart1; + }; + + leds { + compatible = "gpio-leds"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_leds>; + + green { + label = "green"; + gpios = <&gpio3 23 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "gpio"; + default-state = "off"; + }; + + red { + label = "red"; + gpios = <&gpio3 16 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "gpio"; + default-state = "off"; + }; + }; + + memory at 10000000 { + reg = <0x10000000 0x40000000>; + }; + + reg_usb_h1_vbus: regulator-usb_h1_vbus { + compatible = "regulator-fixed"; + regulator-name = "usb_h1_vbus"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + gpio = <&gpio3 31 GPIO_ACTIVE_HIGH>; + enable-active-high; + }; +}; + +&fec { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_enet>; + phy-reset-gpios = <&gpio1 25 GPIO_ACTIVE_LOW>; + phy-reset-duration = <10>; + phy-mode = "rgmii"; + fsl,magic-packet; + fsl,enet-loopback-clk; /* anatop reference clk via PADloopback */
arch/arm/dts/imx6q-kp.dts new file +23
-0+ fsl,enet-freq = <1>; /* ENET_25MHZ = 0, ENET_50MHZ = 1 */ + /* ENET_100MHZ = 2, ENET_125MHZ = 3 */ + status = "okay"; +}; + +&i2c1 { + clock-frequency = <400000>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_i2c1>; + status = "okay"; +}; + +&i2c2 { + clock-frequency = <400000>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_i2c2>; + status = "okay"; +}; + +&iomuxc { + pinctrl_enet: enetgrp { + fsl,pins = < + MX6QDL_PAD_ENET_MDIO__ENET_MDIO
0x1b0b0arch/arm/dts/imx6q-kp.dts new file +1
-0+ MX6QDL_PAD_ENET_MDC__ENET_MDC0x1b0b0arch/arm/dts/imx6q-kp.dts new file +1
-0+ MX6QDL_PAD_RGMII_TXC__RGMII_TXC
0x1b0b0arch/arm/dts/imx6q-kp.dts new file +1
-0+ MX6QDL_PAD_RGMII_TD0__RGMII_TD0
0x1b0b0arch/arm/dts/imx6q-kp.dts new file +1
-0+ MX6QDL_PAD_RGMII_TD1__RGMII_TD1
0x1b0b0arch/arm/dts/imx6q-kp.dts new file +1
-0+ MX6QDL_PAD_RGMII_TD2__RGMII_TD2
0x1b0b0arch/arm/dts/imx6q-kp.dts new file +1
-0+ MX6QDL_PAD_RGMII_TD3__RGMII_TD3
0x1b0b0
+MX6QDL_PAD_RGMII_TX_CTL__RGMII_TX_CTL0x1b0b0
+MX6QDL_PAD_ENET_REF_CLK__ENET_TX_CLK0x1b0b0arch/arm/dts/imx6q-kp.dts new file +1
-0+ MX6QDL_PAD_RGMII_RXC__RGMII_RXC
0x1b0b0arch/arm/dts/imx6q-kp.dts new file +1
-0+ MX6QDL_PAD_RGMII_RD0__RGMII_RD0
0x1b0b0arch/arm/dts/imx6q-kp.dts new file +1
-0+ MX6QDL_PAD_RGMII_RD1__RGMII_RD1
0x1b0b0arch/arm/dts/imx6q-kp.dts new file +1
-0+ MX6QDL_PAD_RGMII_RD2__RGMII_RD2
0x1b0b0arch/arm/dts/imx6q-kp.dts new file +1
-0+ MX6QDL_PAD_RGMII_RD3__RGMII_RD3
0x1b0b0
+MX6QDL_PAD_RGMII_RX_CTL__RGMII_RX_CTL0x1b0b0arch/arm/dts/imx6q-kp.dts new file +2
-0+ MX6QDL_PAD_GPIO_16__ENET_REF_CLK 0x4001b0a8 + MX6QDL_PAD_ENET_CRS_DV__GPIO1_IO25
0x1b0b0arch/arm/dts/imx6q-kp.dts new file +6
-0+ >; + }; + + pinctrl_leds: gpioledsgrp { + fsl,pins = < + MX6QDL_PAD_EIM_D23__GPIO3_IO23
0x4001b0b0arch/arm/dts/imx6q-kp.dts new file +1
-0+ MX6QDL_PAD_EIM_D16__GPIO3_IO16
0x4001b0b0arch/arm/dts/imx6q-kp.dts new file +6
-0+ >; + }; + + pinctrl_i2c1: i2c1grp { + fsl,pins = < + MX6QDL_PAD_CSI0_DAT8__I2C1_SDA
0x4001b8b1arch/arm/dts/imx6q-kp.dts new file +1
-0+ MX6QDL_PAD_CSI0_DAT9__I2C1_SCL
0x4001b8b1arch/arm/dts/imx6q-kp.dts new file +6
-0+ >; + }; + + pinctrl_i2c2: i2c2grp { + fsl,pins = < + MX6QDL_PAD_KEY_COL3__I2C2_SCL
0x4001b8b1arch/arm/dts/imx6q-kp.dts new file +1
-0+ MX6QDL_PAD_KEY_ROW3__I2C2_SDA
0x4001b8b1arch/arm/dts/imx6q-kp.dts new file +6
-0+ >; + }; + + pinctrl_uart1: uart1grp { + fsl,pins = < + MX6QDL_PAD_SD3_DAT7__UART1_TX_DATA
0x1b0b1arch/arm/dts/imx6q-kp.dts new file +1
-0+ MX6QDL_PAD_SD3_DAT6__UART1_RX_DATA
0x1b0b1arch/arm/dts/imx6q-kp.dts new file +6
-0+ >; + }; + + pinctrl_uart2: uart2grp { + fsl,pins = < + MX6QDL_PAD_EIM_D26__UART2_TX_DATA
0x1b0b1arch/arm/dts/imx6q-kp.dts new file +1
-0+ MX6QDL_PAD_EIM_D27__UART2_RX_DATA
0x1b0b1arch/arm/dts/imx6q-kp.dts new file +1
-0+ MX6QDL_PAD_EIM_D28__UART2_CTS_B
0x1b0b1arch/arm/dts/imx6q-kp.dts new file +1
-0+ MX6QDL_PAD_EIM_D29__UART2_RTS_B
0x1b0b1arch/arm/dts/imx6q-kp.dts new file +6
-0+ >; + }; + + pinctrl_usbh1: usbh1grp { + fsl,pins = < + MX6QDL_PAD_EIM_D31__GPIO3_IO31
0x1b0b1arch/arm/dts/imx6q-kp.dts new file +1
-0+ MX6QDL_PAD_ENET_RX_ER__USB_OTG_ID
0x17059arch/arm/dts/imx6q-kp.dts new file +6
-0+ >; + }; + + pinctrl_usdhc2: usdhc2grp { + fsl,pins = < + MX6QDL_PAD_SD2_CMD__SD2_CMD
0x17019arch/arm/dts/imx6q-kp.dts new file +1
-0+ MX6QDL_PAD_SD2_CLK__SD2_CLK
0x10019arch/arm/dts/imx6q-kp.dts new file +1
-0+ MX6QDL_PAD_SD2_DAT0__SD2_DATA00x17019arch/arm/dts/imx6q-kp.dts new file +1
-0+ MX6QDL_PAD_SD2_DAT1__SD2_DATA10x17019arch/arm/dts/imx6q-kp.dts new file +1
-0+ MX6QDL_PAD_SD2_DAT2__SD2_DATA20x17019arch/arm/dts/imx6q-kp.dts new file +1
-0+ MX6QDL_PAD_SD2_DAT3__SD2_DATA30x17019arch/arm/dts/imx6q-kp.dts new file +1
-0+ MX6QDL_PAD_NANDF_CS3__GPIO6_IO16
0x20000arch/arm/dts/imx6q-kp.dts new file +1
-0+ MX6QDL_PAD_GPIO_4__GPIO1_IO04
0x20000arch/arm/dts/imx6q-kp.dts new file +6
-0+ >; + }; + + pinctrl_usdhc4: usdhc4grp { + fsl,pins = < + MX6QDL_PAD_SD4_CMD__SD4_CMD
0x17019arch/arm/dts/imx6q-kp.dts new file +1
-0+ MX6QDL_PAD_SD4_CLK__SD4_CLK
0x10019arch/arm/dts/imx6q-kp.dts new file +1
-0+ MX6QDL_PAD_SD4_DAT0__SD4_DATA00x17019arch/arm/dts/imx6q-kp.dts new file +1
-0+ MX6QDL_PAD_SD4_DAT1__SD4_DATA10x17019arch/arm/dts/imx6q-kp.dts new file +1
-0+ MX6QDL_PAD_SD4_DAT2__SD4_DATA20x17019arch/arm/dts/imx6q-kp.dts new file +1
-0+ MX6QDL_PAD_SD4_DAT3__SD4_DATA30x17019arch/arm/dts/imx6q-kp.dts new file +1
-0+ MX6QDL_PAD_SD4_DAT4__SD4_DATA40x17019arch/arm/dts/imx6q-kp.dts new file +1
-0+ MX6QDL_PAD_SD4_DAT5__SD4_DATA50x17019arch/arm/dts/imx6q-kp.dts new file +1
-0+ MX6QDL_PAD_SD4_DAT6__SD4_DATA60x17019arch/arm/dts/imx6q-kp.dts new file +1
-0+ MX6QDL_PAD_SD4_DAT7__SD4_DATA70x17019arch/arm/dts/imx6q-kp.dts new file +34
-0+ >; + }; +}; + +&uart1 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_uart1>; + status = "okay"; +}; + +&uart2 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_uart2>; + uart-has-rtscts; +}; + +&usbh1 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_usbh1>; + vbus-supply = <®_usb_h1_vbus>; + status = "okay"; +}; + +&usdhc2 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_usdhc2>; + bus-width = <4>; + cd-gpios = <&gpio1 4 GPIO_ACTIVE_LOW>; + status = "okay"; +}; + +&usdhc4 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_usdhc4>;
Quoted 9 lines
Quoted 8 lines
arch/arm/dts/imx6q-kp.dts new file +6
-1+ bus-width = <8>; + non-removable; + no-1-8-v; + keep-power-in-suspend; + status = "okay"; +}; --2.11.0
Best regards,
Lukasz Majewski
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma at denx.de -------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190811/cf78427e/attachment.sig>
PATCH v2 7/11 imx: tpc70: dts: Add TPC70 board (imx6q based) device tree description
Quoted 18 lines · Lukasz Majewski
Hi Peng,
Quoted 8 lines
Quoted 5 lines
Subject: [PATCH v2 07/11] imx: tpc70: dts: Add TPC70 board (imx6q based) device tree description
This commit defines the TPC70 imx6q board with device tree description.
Is the
imx6q-kp.dtsiusable for this board from Linux kernel?The
imx6q-kp.dtsiis defined in the Linux kernel [1].However, not all features - like backlight, CAN, etc. are needed in U-Boot. To reduce SPL footprint, as the TPC70 is the first board (from i.MX6Q family of SoCs) which uses only DM in SPL and U-Boot proper, only the necessary subset of [1] was added to U-Boot.
Quoted 4 lines
Note:
[1] -
https://elixir.bootlin.com/linux/v5.2.8/source/arch/arm/boot/dts/imx6q-kp.dtsi
Right, and that's what we have CONFIG_OF_SPL_REMOVE_PROPS for, yes?
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190811/143ba3bc/attachment.sig>
PATCH v2 7/11 imx: tpc70: dts: Add TPC70 board (imx6q based) device tree description
Hi Tom,
Quoted 19 lines · Lukasz Majewski
Quoted 18 lines
Hi Peng,
Quoted 8 lines
Quoted 5 lines
Subject: [PATCH v2 07/11] imx: tpc70: dts: Add TPC70 board (imx6q based) device tree description
This commit defines the TPC70 imx6q board with device tree description.
Is the
imx6q-kp.dtsiusable for this board from Linux kernel?The
imx6q-kp.dtsiis defined in the Linux kernel [1].However, not all features - like backlight, CAN, etc. are needed in U-Boot. To reduce SPL footprint, as the TPC70 is the first board (from i.MX6Q family of SoCs) which uses only DM in SPL and U-Boot proper, only the necessary subset of [1] was added to U-Boot.
Quoted 8 lines
Quoted 5 lines
Note:
[1] -
https://elixir.bootlin.com/linux/v5.2.8/source/arch/arm/boot/dts/imx6q-kp.dtsiRight, and that's what we have
CONFIG_OF_SPL_REMOVE_PROPSfor, yes?
Not quite. For example I need "clocks" property, which is defined for almost all nodes. This incurs some extra cost in terms of footprint.
To reduce the SPL size (to which dtb file size contributes), I had to not include full DTS from Linux in U-Boot.
I only used a subset of it (only _really_ necessary description to run U-Boot) to reduce size of SPL binary.
Best regards,
Lukasz Majewski
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma at denx.de -------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190812/3f84ecef/attachment.sig>
PATCH v2 7/11 imx: tpc70: dts: Add TPC70 board (imx6q based) device tree description
In reply to Lukasz MajewskiQuoted 6 lines
Subject: [PATCH v2 07/11] imx: tpc70: dts: Add TPC70 board (imx6q based) device tree description
This commit defines the TPC70 imx6q board with device tree description.
Signed-off-by Lukasz Majewski <[email protected]>
Quoted 235 lines
---
arch/arm/dts/imx6q-kp.dts | 219 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 219 insertions(+) create mode 100644 arch/arm/dts/imx6q-kp.dtsarch/arm/dts/imx6q-kp.dts new file renamed from arch/arm/dts/imx6q-kp.dts +0
-0mode 100644 index 0000000000..12d6db6f80
arch/arm/dts/imx6q-kp.dts new file +113
-0@@ -0,0 +1,219 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright 2018 + * Lukasz Majewski, DENX Software Engineering, lukma at denx.de + * + * SPDX-License-Identifier: GPL-2.0+ or X11 + */ + +/dts-v1/; +#include <dt-bindings/gpio/gpio.h> +#include "imx6q.dtsi" + +/ { + model = "K+P iMX6Q"; + compatible = "kp,imx6-kp", "fsl,imx6"; + + aliases { + mmc0 = &usdhc2; + mmc1 = &usdhc4; + usb1 = &usbh1; + }; + + chosen { + stdout-path = &uart1; + }; + + leds { + compatible = "gpio-leds"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_leds>; + + green { + label = "green"; + gpios = <&gpio3 23 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "gpio"; + default-state = "off"; + }; + + red { + label = "red"; + gpios = <&gpio3 16 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "gpio"; + default-state = "off"; + }; + }; + + memory at 10000000 { + reg = <0x10000000 0x40000000>; + }; + + reg_usb_h1_vbus: regulator-usb_h1_vbus { + compatible = "regulator-fixed"; + regulator-name = "usb_h1_vbus"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + gpio = <&gpio3 31 GPIO_ACTIVE_HIGH>; + enable-active-high; + }; +}; + +&fec { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_enet>; + phy-reset-gpios = <&gpio1 25 GPIO_ACTIVE_LOW>; + phy-reset-duration = <10>; + phy-mode = "rgmii"; + fsl,magic-packet; + fsl,enet-loopback-clk; /* anatop reference clk via PAD loopback */ + fsl,enet-freq = <1>; /* ENET_25MHZ = 0, ENET_50MHZ = 1 */ + /* ENET_100MHZ = 2, ENET_125MHZ = 3 */ + status = "okay"; +}; + +&i2c1 { + clock-frequency = <400000>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_i2c1>; + status = "okay"; +}; + +&i2c2 { + clock-frequency = <400000>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_i2c2>; + status = "okay"; +}; + +&iomuxc { + pinctrl_enet: enetgrp { + fsl,pins = < + MX6QDL_PAD_ENET_MDIO__ENET_MDIO 0x1b0b0 + MX6QDL_PAD_ENET_MDC__ENET_MDC 0x1b0b0 + MX6QDL_PAD_RGMII_TXC__RGMII_TXC 0x1b0b0 + MX6QDL_PAD_RGMII_TD0__RGMII_TD0 0x1b0b0 + MX6QDL_PAD_RGMII_TD1__RGMII_TD1 0x1b0b0 + MX6QDL_PAD_RGMII_TD2__RGMII_TD2 0x1b0b0 + MX6QDL_PAD_RGMII_TD3__RGMII_TD3 0x1b0b0 + MX6QDL_PAD_RGMII_TX_CTL__RGMII_TX_CTL 0x1b0b0 + MX6QDL_PAD_ENET_REF_CLK__ENET_TX_CLK 0x1b0b0 + MX6QDL_PAD_RGMII_RXC__RGMII_RXC 0x1b0b0 + MX6QDL_PAD_RGMII_RD0__RGMII_RD0 0x1b0b0 + MX6QDL_PAD_RGMII_RD1__RGMII_RD1 0x1b0b0 + MX6QDL_PAD_RGMII_RD2__RGMII_RD2 0x1b0b0 + MX6QDL_PAD_RGMII_RD3__RGMII_RD3 0x1b0b0 + MX6QDL_PAD_RGMII_RX_CTL__RGMII_RX_CTL 0x1b0b0 + MX6QDL_PAD_GPIO_16__ENET_REF_CLK 0x4001b0a8 + MX6QDL_PAD_ENET_CRS_DV__GPIO1_IO25 0x1b0b0 + >; + }; + + pinctrl_leds: gpioledsgrp { + fsl,pins = < + MX6QDL_PAD_EIM_D23__GPIO3_IO23
0x4001b0b0arch/arm/dts/imx6q-kp.dts new file +1
-0+ MX6QDL_PAD_EIM_D16__GPIO3_IO16
0x4001b0b0arch/arm/dts/imx6q-kp.dts new file +105
-1+ >; + }; + + pinctrl_i2c1: i2c1grp { + fsl,pins = < + MX6QDL_PAD_CSI0_DAT8__I2C1_SDA 0x4001b8b1 + MX6QDL_PAD_CSI0_DAT9__I2C1_SCL 0x4001b8b1 + >; + }; + + pinctrl_i2c2: i2c2grp { + fsl,pins = < + MX6QDL_PAD_KEY_COL3__I2C2_SCL 0x4001b8b1 + MX6QDL_PAD_KEY_ROW3__I2C2_SDA 0x4001b8b1 + >; + }; + + pinctrl_uart1: uart1grp { + fsl,pins = < + MX6QDL_PAD_SD3_DAT7__UART1_TX_DATA 0x1b0b1 + MX6QDL_PAD_SD3_DAT6__UART1_RX_DATA 0x1b0b1 + >; + }; + + pinctrl_uart2: uart2grp { + fsl,pins = < + MX6QDL_PAD_EIM_D26__UART2_TX_DATA 0x1b0b1 + MX6QDL_PAD_EIM_D27__UART2_RX_DATA 0x1b0b1 + MX6QDL_PAD_EIM_D28__UART2_CTS_B 0x1b0b1 + MX6QDL_PAD_EIM_D29__UART2_RTS_B 0x1b0b1 + >; + }; + + pinctrl_usbh1: usbh1grp { + fsl,pins = < + MX6QDL_PAD_EIM_D31__GPIO3_IO31 0x1b0b1 + MX6QDL_PAD_ENET_RX_ER__USB_OTG_ID 0x17059 + >; + }; + + pinctrl_usdhc2: usdhc2grp { + fsl,pins = < + MX6QDL_PAD_SD2_CMD__SD2_CMD 0x17019 + MX6QDL_PAD_SD2_CLK__SD2_CLK 0x10019 + MX6QDL_PAD_SD2_DAT0__SD2_DATA0 0x17019 + MX6QDL_PAD_SD2_DAT1__SD2_DATA1 0x17019 + MX6QDL_PAD_SD2_DAT2__SD2_DATA2 0x17019 + MX6QDL_PAD_SD2_DAT3__SD2_DATA3 0x17019 + MX6QDL_PAD_NANDF_CS3__GPIO6_IO16 0x20000 + MX6QDL_PAD_GPIO_4__GPIO1_IO04 0x20000 + >; + }; + + pinctrl_usdhc4: usdhc4grp { + fsl,pins = < + MX6QDL_PAD_SD4_CMD__SD4_CMD 0x17019 + MX6QDL_PAD_SD4_CLK__SD4_CLK 0x10019 + MX6QDL_PAD_SD4_DAT0__SD4_DATA0 0x17019 + MX6QDL_PAD_SD4_DAT1__SD4_DATA1 0x17019 + MX6QDL_PAD_SD4_DAT2__SD4_DATA2 0x17019 + MX6QDL_PAD_SD4_DAT3__SD4_DATA3 0x17019 + MX6QDL_PAD_SD4_DAT4__SD4_DATA4 0x17019 + MX6QDL_PAD_SD4_DAT5__SD4_DATA5 0x17019 + MX6QDL_PAD_SD4_DAT6__SD4_DATA6 0x17019 + MX6QDL_PAD_SD4_DAT7__SD4_DATA7 0x17019 + >; + }; +}; + +&uart1 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_uart1>; + status = "okay"; +}; + +&uart2 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_uart2>; + uart-has-rtscts; +}; + +&usbh1 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_usbh1>; + vbus-supply = <®_usb_h1_vbus>; + status = "okay"; +}; + +&usdhc2 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_usdhc2>; + bus-width = <4>; + cd-gpios = <&gpio1 4 GPIO_ACTIVE_LOW>; + status = "okay"; +}; + +&usdhc4 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_usdhc4>; + bus-width = <8>; + non-removable; + no-1-8-v; + keep-power-in-suspend; + status = "okay"; +}; --2.11.0
PATCH v2 8/11 imx: dts: Add u-boot specific set of device tree properties for tpc70
In reply to Lukasz MajewskiThis commit adds new file - imx6q-kp-u-boot.dtsi with a set of u-boot specific properties for imx6q KP device.
---
arch/arm/dts/imx6q-kp-u-boot.dtsi | 59 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 arch/arm/dts/imx6q-kp-u-boot.dtsi
arch/arm/dts/imx6q-kp-u-boot.dtsi new file +59 -0
@@ -0,0 +1,59 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright 2019 + * Lukasz Majewski, DENX Software Engineering, lukma at denx.de + * + * SPDX-License-Identifier: GPL-2.0+ or X11 + */ + +#include "imx6qdl-u-boot.dtsi" + +/ { + clocks { + u-boot,dm-spl; + osc { + u-boot,dm-spl; + }; + }; + + wdt-reboot { + compatible = "wdt-reboot"; + wdt = <&wdog1>; + }; +}; + +&clks { + u-boot,dm-pre-reloc; +}; + +&gpio2 { + u-boot,dm-spl; +}; + +&pinctrl_uart1 { + u-boot,dm-spl; +}; + +&pinctrl_usdhc2 { + u-boot,dm-spl; +}; + +&pinctrl_usdhc4 { + u-boot,dm-spl; +}; + +&uart1 { + u-boot,dm-spl; +}; + +&usdhc2 { + u-boot,dm-spl; +}; + +&usdhc4 { + u-boot,dm-spl; +}; + +&wdog1 { + u-boot,dm-spl; +};
Signature · 1 line
2.11.0
PATCH v2 9/11 imx: tpc70: Convert TPC70 (imx6q) board to use DM/DTS in SPL and u-boot
In reply to Lukasz MajewskiThis patch converts the TPC70 to use driver model and device tree description in both SPL and u-boot proper.
Notable changes (DM/DTS conversion):
- PINCTRL{_IMX6}
- DM_I2C
- enable 'regulator' and 'pmic' commands
- DM_MMC and BLK (USDHC)
- DM_ETH
- DM WDT (including SYSRESET)
---
arch/arm/mach-imx/mx6/Kconfig | 10 ++ board/k+p/kp_imx6q_tpc/kp_imx6q_tpc.c | 165 +----------------------------- board/k+p/kp_imx6q_tpc/kp_imx6q_tpc_spl.c | 133 +----------------------- configs/kp_imx6q_tpc_defconfig | 34 +++++- include/configs/kp_imx6q_tpc.h | 21 ---- 5 files changed, 49 insertions(+), 314 deletions(-)
arch/arm/mach-imx/mx6/Kconfig +10 -0
@@ -485,9 +485,19 @@ config TARGET_KP_IMX6Q_TPC select BOARD_EARLY_INIT_F select BOARD_LATE_INIT select DM + select SPL_DM if SPL select DM_THERMAL + select DM_MMC + select DM_ETH + select DM_REGULATOR + select SPL_DM_REGULATOR if SPL + select DM_SERIAL + select DM_I2C + select DM_GPIO + select DM_USB select MX6QDL select SUPPORT_SPL + select SPL_SEPARATE_BSS if SPL imply CMD_DM imply CMD_SPL
board/k+p/kp_imx6q_tpc/kp_imx6q_tpc.c +4 -161
218 lines not on this page · raw message
board/k+p/kp_imx6q_tpc/kp_imx6q_tpc_spl.c +2 -131
167 lines not on this page · raw message
configs/kp_imx6q_tpc_defconfig +33 -1
@@ -4,21 +4,28 @@ CONFIG_SYS_TEXT_BASE=0x17800000 CONFIG_SPL_GPIO_SUPPORT=y CONFIG_SPL_LIBCOMMON_SUPPORT=y CONFIG_SPL_LIBGENERIC_SUPPORT=y +CONFIG_SYS_MALLOC_F_LEN=0x2200 CONFIG_MX6_DDRCAL=y CONFIG_TARGET_KP_IMX6Q_TPC=y CONFIG_SPL_MMC_SUPPORT=y CONFIG_SPL_SERIAL_SUPPORT=y +CONFIG_SPL_DRIVERS_MISC_SUPPORT=y CONFIG_NR_DRAM_BANKS=1 CONFIG_SPL=y CONFIG_DISTRO_DEFAULTS=y +CONFIG_TPL_SYS_MALLOC_F_LEN=0x400 CONFIG_FIT=y CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/mach-imx/spl_sd.cfg" +CONFIG_SD_BOOT=y CONFIG_BOOTDELAY=3 # CONFIG_USE_BOOTCOMMAND is not set CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE=y CONFIG_BOUNCE_BUFFER=y CONFIG_SPL_TEXT_BASE=0x00908000 CONFIG_SPL_RAW_IMAGE_SUPPORT=y +# CONFIG_TPL_BANNER_PRINT is not set +CONFIG_SPL_PAYLOAD="u-boot.img" +CONFIG_SPL_POWER_SUPPORT=y CONFIG_SPL_WATCHDOG_SUPPORT=y CONFIG_AUTOBOOT_KEYED=y CONFIG_AUTOBOOT_STOP_STR="."
@@ -27,19 +34,44 @@ CONFIG_AUTOBOOT_STOP_STR="." CONFIG_CMD_GPIO=y CONFIG_CMD_I2C=y CONFIG_CMD_MMC=y +# CONFIG_CMD_PINMUX is not set CONFIG_CMD_USB=y CONFIG_CMD_CACHE=y CONFIG_CMD_TIME=y CONFIG_CMD_EXT4_WRITE=y # CONFIG_ISO_PARTITION is not set # CONFIG_EFI_PARTITION is not set +CONFIG_OF_CONTROL=y +CONFIG_SPL_OF_CONTROL=y +CONFIG_DEFAULT_DEVICE_TREE="imx6q-kp" +CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents interrupts clocks dmas dma-names" CONFIG_ENV_IS_IN_MMC=y +# CONFIG_BLOCK_CACHE is not set +CONFIG_SPL_CLK_IMX6Q=y +CONFIG_CLK_IMX6Q=y +CONFIG_I2C_SET_DEFAULT_BUS_NUM=y +CONFIG_SYS_I2C_MXC=y +CONFIG_SYS_I2C_MXC_I2C1=y +CONFIG_SYS_I2C_MXC_I2C2=y +CONFIG_LED=y +CONFIG_LED_GPIO=y CONFIG_FSL_ESDHC_IMX=y CONFIG_PHYLIB=y CONFIG_PHY_ATHEROS=y CONFIG_FEC_MXC=y CONFIG_MII=y +CONFIG_PINCTRL=y +CONFIG_SPL_PINCTRL=y +CONFIG_PINCTRL_IMX6=y +CONFIG_DM_REGULATOR_FIXED=y +CONFIG_SPL_DM_REGULATOR_FIXED=y +# CONFIG_REQUIRE_SERIAL_CONSOLE is not set +# CONFIG_TPL_SERIAL_PRESENT is not set +CONFIG_MXC_UART=y +CONFIG_SYSRESET=y +CONFIG_SPL_SYSRESET=y +CONFIG_SYSRESET_WATCHDOG=y CONFIG_IMX_THERMAL=y CONFIG_USB=y +# CONFIG_SPL_DM_USB is not set CONFIG_IMX_WATCHDOG=y -CONFIG_OF_LIBFDT=y
include/configs/kp_imx6q_tpc.h +0 -21
@@ -25,32 +25,11 @@#define CONFIG_SYS_MALLOC_LEN (4 * SZ_1M)/* FEC ethernet */ -#define IMX_FEC_BASE ENET_BASE_ADDR -#define CONFIG_FEC_XCV_TYPE RGMII -#define CONFIG_ETHPRIME "FEC" -#define CONFIG_FEC_MXC_PHYADDR 0#define CONFIG_ARP_TIMEOUT 200UL -/* I2C Configs */ -#define CONFIG_SYS_I2C -#define CONFIG_SYS_I2C_MXC -#define CONFIG_SYS_I2C_MXC_I2C1 /* enable I2C bus 1 */ -#define CONFIG_SYS_I2C_MXC_I2C2 /* enable I2C bus 2 */ -#define CONFIG_SYS_I2C_SPEED 100000 - -/* MMC Configs */ -#define CONFIG_FSL_USDHC -#define CONFIG_SYS_FSL_ESDHC_ADDR 0 -#define CONFIG_SYS_FSL_USDHC_NUM 2#define CONFIG_SYS_MMC_ENV_DEV 1/* 0 = SDHC2, 1 = SDHC4 (eMMC) */ #define CONFIG_SUPPORT_EMMC_BOOT -/* UART */ -#define CONFIG_MXC_UART -#define CONFIG_MXC_UART_BASE UART1_BASE -#define CONFIG_CONS_INDEX 1 -#define CONFIG_BAUDRATE 115200 -/* USB Configs */ #ifdef CONFIG_CMD_USB #define CONFIG_EHCI_HCD_INIT_AFTER_RESET
Signature · 1 line
2.11.0
PATCH v2 10/11 imx: spl: tpc70: Do not remove clock related properties from DTS
In reply to Lukasz MajewskiThose properties will be reused in the SPL to provide proper clock setting.
---
configs/kp_imx6q_tpc_defconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
configs/kp_imx6q_tpc_defconfig +1 -1
@@ -44,7 +44,7 @@ CONFIG_CMD_EXT4_WRITE=y CONFIG_OF_CONTROL=y CONFIG_SPL_OF_CONTROL=y CONFIG_DEFAULT_DEVICE_TREE="imx6q-kp" -CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents interrupts clocks dmas dma-names" +CONFIG_OF_SPL_REMOVE_PROPS="interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents interrupts dmas dma-names" CONFIG_ENV_IS_IN_MMC=y # CONFIG_BLOCK_CACHE is not set CONFIG_SPL_CLK_IMX6Q=y
Signature · 1 line
2.11.0
PATCH v2 10/11 imx: spl: tpc70: Do not remove clock related properties from DTS
Quoted 18 lines
Subject: [PATCH v2 10/11] imx: spl: tpc70: Do not remove clock related properties from DTS
Those properties will be reused in the SPL to provide proper clock setting.
Signed-off-by Lukasz Majewski <[email protected]>---
configs/kp_imx6q_tpc_defconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)configs/kp_imx6q_tpc_defconfig +0
-0@@ -44,7 +44,7 @@ CONFIG_CMD_EXT4_WRITE=y
CONFIG_OF_CONTROL=yCONFIG_SPL_OF_CONTROL=yCONFIG_DEFAULT_DEVICE_TREE="imx6q-kp"
Quoted 8 lines
-CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents interrupts clocks dmas dma-names"
+CONFIG_OF_SPL_REMOVE_PROPS="interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents interrupts dmas dma-names"
CONFIG_ENV_IS_IN_MMC=y
#CONFIG_BLOCK_CACHEis not set
CONFIG_SPL_CLK_IMX6Q=y
Quoted 2 lines
--
2.11.0
PATCH v2 11/11 imx: config: Update KP's TPC70 config to support SWUpdate
In reply to Lukasz MajewskiThis patch updates envs responsible for using USB pendrive as a SWUpdate based tool for recovery and update.
---
include/configs/kp_imx6q_tpc.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
include/configs/kp_imx6q_tpc.h +5 -2
@@ -67,8 +67,9 @@"SPL_file=SPL\0" \"wic_file=kp-image-kpimx6qtpc.wic\0" \"upd_image=st.4k\0" \ -"updargs=setenv bootargs console=${console} ${smp}" \ -"rdinit=${rdinit} ${debug} ${displayargs}\0" \ +"updargs=setenv bootargs console=${console} ${smp} ${displayargs}\0" \ +"initrd_ram_dev=/dev/ram\0" \ +"addswupdate=setenv bootargs ${bootargs} root=${initrd_ram_dev} rw\0" \"loadusb=usb start; " \"fatload usb 0 ${loadaddr} ${upd_image}\0" \"upd_uboot_sd=" \
@@ -96,6 +97,8 @@"usbupd=echo Booting update from usb ...; " \"setenv bootargs; " \"run updargs; " \ +"run addinitrd; " \ +"run addswupdate; " \"run loadusb; " \"bootm ${loadaddr}#${fit_config}\0" \BOOTENV
Signature · 1 line
2.11.0