colibri-imx6ull device tree enablement and driver model conversion
v3 cover colibri-imx6ull device tree enablement and driver model conversion
This series addresses some shortcomings, enables/introduces device tree support and converts all except video to using the driver model. This is fully tested both running our latest downstream BSP as well as the mainline Linux kernel.
This series is available together with my previous series addressing Apalis and Colibri iMX6 as well as Colibri Vybrid aka VF50/VF61 on our git server [1].
[1] http://git.toradex.com/cgit/u-boot-toradex.git/log/?h=for-next
Changes in v3:
- Fixed issue with host mode as pointed out by Igor.
Changes in v2:
- Added Igor's reviewed-by tag.
Gerard Salvatella (1):
tdx-cfg-block: add support for new colibri iMX6ull skus
Marcel Ziswiler (9):
colibri-imx6ull: fix ethernet phy power on
colibri-imx6ull: configuration clean-up
colibri-imx6ull: migrate pinctrl and regulators to dtb/dm
colibri-imx6ull: migrate mmc to using driver model
colibri-imx6ull: migrate usb to using driver model
colibri-imx6ull: migrate fec to using driver model
ARM: dts: colibri-imx6ull: fix uart-has-rtscts property
ARM: dts: colibri-imx6ull: add osc32k_32k_out pinctrl
ARM: dts: colibri-imx6ull: update device tree
Philippe Schenker (1):
board: imx6ull: Add disable PMIC_STBY_REQ
Stefan Agner (3):
tdx-cfg-block: simplify i.MX 6 module detection
colibri-imx6ull: set module variant depending on config block apalis/colibri_imx6/imx6ull: make sure loadaddr does not collide
arch/arm/dts/imx6ull-colibri.dts | 172 ++++++++----- arch/arm/dts/imx6ull-pinfunc.h | 26 +- .../toradex/colibri-imx6ull/colibri-imx6ull.c | 225 +++--------------- board/toradex/common/tdx-cfg-block.c | 70 ++++-- board/toradex/common/tdx-cfg-block.h | 3 + configs/colibri-imx6ull_defconfig | 18 +- include/configs/apalis_imx6.h | 4 +- include/configs/colibri-imx6ull.h | 14 +- include/configs/colibri_imx6.h | 4 +- 9 files changed, 228 insertions(+), 308 deletions(-)
Signature · 1 line
2.20.1
PATCH v3 1/14 tdx-cfg-block: add support for new colibri iMX6ull skus
From: Gerard Salvatella <[email protected]>
Add support for new Colibri iMX6ULL SKUs.
While at it also checkpatch fix the whole files.
---
Changes in v3: None
Changes in v2:
- Added Igor's reviewed-by.
board/toradex/common/tdx-cfg-block.c | 62 +++++++++++++++++++++------- board/toradex/common/tdx-cfg-block.h | 3 ++ 2 files changed, 50 insertions(+), 15 deletions(-)
board/toradex/common/tdx-cfg-block.c +47 -15
@@ -1,6 +1,6 @@// SPDX-License-Identifier: GPL-2.0+ /* -* Copyright (c) 2016 Toradex, Inc. +* Copyright (c) 2016-2019 Toradex, Inc. */ #include <common.h>
@@ -98,6 +98,9 @@ const char * const toradex_modules[] = { [40] = "Colibri iMX6ULL 512MB Wi-Fi / Bluetooth IT", [41] = "Colibri iMX7 Dual 512MB EPDC", [42] = "Apalis TK1 4GB", + [43] = "Colibri T20 512MB IT SETEK", + [44] = "Colibri iMX6ULL 512MB IT", + [45] = "Colibri iMX6ULL 512MB Wi-Fi / Bluetooth", };#ifdef CONFIG_TDX_CFG_BLOCK_IS_IN_MMC
@@ -299,22 +302,47 @@ static int get_cfgblock_interactive(void) else tdx_hw_tag.prodid = APALIS_IMX6D;#else -if (it =='y' || it =='Y' ) -if (is_cpu_type (MXC_CPU_MX6DL )) +char wb ='n' ; + +if (it =='y' || it =='Y' ) { +if (is_cpu_type (MXC_CPU_MX6DL )) { tdx_hw_tag.prodid =COLIBRI_IMX6DL_IT ; -else + }else if (is_cpu_type (MXC_CPU_MX6SOLO )) { tdx_hw_tag.prodid =COLIBRI_IMX6S_IT ; -else -if (is_cpu_type (MXC_CPU_MX6DL )) + }else { +sprintf (message,"Does the module have WiFi /" \ +" Bluetooth? [y/N] " ); + len =cli_readline (message); + wb = console_buffer[0 ]; +if (wb =='y' || wb =='Y' ) + tdx_hw_tag.prodid = +COLIBRI_IMX6ULL_WIFI_BT_IT ; +else + tdx_hw_tag.prodid =COLIBRI_IMX6ULL_IT ; + } + }else { +if (is_cpu_type (MXC_CPU_MX6DL )) { tdx_hw_tag.prodid =COLIBRI_IMX6DL ; -else + }else if (is_cpu_type (MXC_CPU_MX6SOLO )) { tdx_hw_tag.prodid =COLIBRI_IMX6S ; + }else { +sprintf (message,"Does the module have WiFi /" \ +" Bluetooth? [y/N] " ); + len =cli_readline (message); + wb = console_buffer[0 ]; +if (wb =='y' || wb =='Y' ) + tdx_hw_tag.prodid = +COLIBRI_IMX6ULL_WIFI_BT ; +else + tdx_hw_tag.prodid =COLIBRI_IMX6ULL ; + } + }#endif /* CONFIG_MACH_TYPE */ - }else if (!strcmp ("imx7d" , soc)) { + }else if (!strcmp ("imx7d" , soc)) tdx_hw_tag.prodid =COLIBRI_IMX7D ; - }else if (!strcmp ("imx7s" , soc)) { +else if (!strcmp ("imx7s" , soc)) tdx_hw_tag.prodid =COLIBRI_IMX7S ; - }else if (!strcmp ("tegra20" , soc)) { +else if (!strcmp ("tegra20" , soc)) {if (it =='y' || it =='Y' )if (gd->ram_size ==0x10000000 ) tdx_hw_tag.prodid =COLIBRI_T20_256MB_IT ;
@@ -330,8 +358,9 @@ static int get_cfgblock_interactive(void) tdx_hw_tag.prodid =COLIBRI_PXA270_312MHZ ; else tdx_hw_tag.prodid = COLIBRI_PXA270_520MHZ; + }#ifdef CONFIG_MACH_TYPE - }else if (!strcmp ("tegra30" , soc)) { + else if (!strcmp("tegra30", soc)) {if (CONFIG_MACH_TYPE ==MACH_TYPE_APALIS_T30 ) {if (it =='y' || it =='Y' ) tdx_hw_tag.prodid =APALIS_T30_IT ;
@@ -346,8 +375,9 @@ static int get_cfgblock_interactive(void) else tdx_hw_tag.prodid = COLIBRI_T30; } + }#endif /* CONFIG_MACH_TYPE */ - }else if (!strcmp ("tegra124" , soc)) { + else if (!strcmp("tegra124", soc)) { tdx_hw_tag.prodid =APALIS_TK1_2GB ; } else if (!strcmp("vf500", soc)) {if (it =='y' || it =='Y' )
@@ -373,7 +403,7 @@ static int get_cfgblock_interactive(void) tdx_hw_tag.ver_minor = console_buffer[2 ] -'0' ; tdx_hw_tag.ver_assembly = console_buffer[3 ] -'A' ; -if (cpu_is_pxa27x () && (tdx_hw_tag.ver_major ==1 )) +if (cpu_is_pxa27x () && tdx_hw_tag.ver_major ==1 ) tdx_hw_tag.prodid -= (COLIBRI_PXA270_312MHZ -COLIBRI_PXA270_V1_312MHZ );
@@ -441,7 +471,8 @@ static int do_cfgblock_create(cmd_tbl_t *cmdtp, int flag, int argc,* On NAND devices, recreation is only allowed if the page is * empty (config block invalid...) */ -printf ("NAND erase block %d need to be erased before creating a Toradex config block\n" , +printf ("NAND erase block %d need to be erased before creating" \ +" a Toradex config block\n" ,CONFIG_TDX_CFG_BLOCK_OFFSET /get_nand_dev_by_index (0 )->erasesize); goto out;
@@ -450,7 +481,8 @@ static int do_cfgblock_create(cmd_tbl_t *cmdtp, int flag, int argc,* On NOR devices, recreation is only allowed if the sector is * empty and write protection is off (config block invalid...) */ -printf ("NOR sector at offset 0x%02x need to be erased and unprotected before creating a Toradex config block\n" , +printf ("NOR sector at offset 0x%02x need to be erased and " \ +"unprotected before creating a Toradex config block\n" ,CONFIG_TDX_CFG_BLOCK_OFFSET ); goto out;#else
board/toradex/common/tdx-cfg-block.h +3 -0
@@ -61,6 +61,9 @@ enum {COLIBRI_IMX6ULL_WIFI_BT_IT ,/* 40 */ COLIBRI_IMX7D_EPDC ,APALIS_TK1_4GB , +COLIBRI_T20_512MB_IT_SETEK , +COLIBRI_IMX6ULL_IT , + COLIBRI_IMX6ULL_WIFI_BT, /* 45 */ };extern const char *const toradex_modules[];
Signature · 1 line
2.20.1
PATCH v3 2/14 tdx-cfg-block: simplify i.MX 6 module detection
In reply to Marcel ZiswilerFrom: Stefan Agner <[email protected]>
Use CONFIG_TARGET_... at compile time to differentiate between Apalis iMX6, Colibri iMX6 and Colibri iMX6ULL. Avoid code duplication by moving question about Wi-Fi / Bluetooth before IT/non-IT decision.
---
Changes in v3: None
Changes in v2:
- Added Igor's reviewed-by.
board/toradex/common/tdx-cfg-block.c | 68 ++++++++++++++-------------- 1 file changed, 34 insertions(+), 34 deletions(-)
board/toradex/common/tdx-cfg-block.c +34 -34
@@ -280,6 +280,9 @@ static int get_cfgblock_interactive(void)char it ='n' ;int len; +/* Unknown module by default */ + tdx_hw_tag.prodid =0 ; +if (cpu_is_pxa27x ())sprintf (message,"Is the module the 312 MHz version? [y/N] " );else
@@ -290,54 +293,49 @@ static int get_cfgblock_interactive(void) soc =env_get ("soc" );if (!strcmp ("mx6" , soc)) { -#ifdef CONFIG_MACH_TYPE -if (it =='y' || it =='Y' ) +#ifdef CONFIG_TARGET_APALIS_IMX6 +if (it =='y' || it =='Y' ) {if (is_cpu_type (MXC_CPU_MX6Q )) tdx_hw_tag.prodid =APALIS_IMX6Q_IT ;else tdx_hw_tag.prodid =APALIS_IMX6D_IT ; -else + }else {if (is_cpu_type (MXC_CPU_MX6Q )) tdx_hw_tag.prodid =APALIS_IMX6Q ;else tdx_hw_tag.prodid =APALIS_IMX6D ; -#else -char wb ='n' ; - + } +#elif CONFIG_TARGET_COLIBRI_IMX6 if (it =='y' || it =='Y' ) { -if (is_cpu_type (MXC_CPU_MX6DL )) { +if (is_cpu_type (MXC_CPU_MX6DL )) tdx_hw_tag.prodid =COLIBRI_IMX6DL_IT ; - }else if (is_cpu_type (MXC_CPU_MX6SOLO )) { +else if (is_cpu_type (MXC_CPU_MX6SOLO )) tdx_hw_tag.prodid =COLIBRI_IMX6S_IT ; - }else { -sprintf (message,"Does the module have WiFi /" \ -" Bluetooth? [y/N] " ); - len =cli_readline (message); - wb = console_buffer[0 ]; -if (wb =='y' || wb =='Y' ) - tdx_hw_tag.prodid = -COLIBRI_IMX6ULL_WIFI_BT_IT ; -else - tdx_hw_tag.prodid =COLIBRI_IMX6ULL_IT ; - } }else { -if (is_cpu_type (MXC_CPU_MX6DL )) { +if (is_cpu_type (MXC_CPU_MX6DL )) tdx_hw_tag.prodid =COLIBRI_IMX6DL ; - }else if (is_cpu_type (MXC_CPU_MX6SOLO )) { +else if (is_cpu_type (MXC_CPU_MX6SOLO )) tdx_hw_tag.prodid =COLIBRI_IMX6S ; - }else { -sprintf (message,"Does the module have WiFi /" \ -" Bluetooth? [y/N] " ); - len =cli_readline (message); - wb = console_buffer[0 ]; -if (wb =='y' || wb =='Y' ) - tdx_hw_tag.prodid = -COLIBRI_IMX6ULL_WIFI_BT ; -else - tdx_hw_tag.prodid =COLIBRI_IMX6ULL ; - } } -#endif /* CONFIG_MACH_TYPE */ +#elif CONFIG_TARGET_COLIBRI_IMX6ULL +char wb ='n' ; + +sprintf (message,"Does the module have Wi-Fi / Bluetooth? " \ +"[y/N] " ); + len =cli_readline (message); + wb = console_buffer[0 ]; +if (it =='y' || it =='Y' ) { +if (wb =='y' || wb =='Y' ) + tdx_hw_tag.prodid =COLIBRI_IMX6ULL_WIFI_BT_IT ; +else + tdx_hw_tag.prodid =COLIBRI_IMX6ULL_IT ; + }else { +if (wb =='y' || wb =='Y' ) + tdx_hw_tag.prodid =COLIBRI_IMX6ULL_WIFI_BT ; +else + tdx_hw_tag.prodid =COLIBRI_IMX6ULL ; + } +#endif }else if (!strcmp ("imx7d" , soc)) tdx_hw_tag.prodid =COLIBRI_IMX7D ;else if (!strcmp ("imx7s" , soc))
@@ -389,7 +387,9 @@ static int get_cfgblock_interactive(void) tdx_hw_tag.prodid =COLIBRI_VF61_IT ; else tdx_hw_tag.prodid = COLIBRI_VF61; - }else { + } + +if (!tdx_hw_tag.prodid) {printf ("Module type not detectable due to unknown SoC\n" );return -1 ; }
Signature · 1 line
2.20.1
PATCH v3 3/14 colibri-imx6ull: set module variant depending on config block
In reply to Marcel ZiswilerFrom: Stefan Agner <[email protected]>
Using CPU temperature grading as a discriminator if the Wi-Fi / Bluetooth chip is populated is no longer possible due to upcoming SKUs. Set variant to -wifi only if a valid config block is present and the product id mentions a SKU with Wi-Fi / Bluetooth.
---
Changes in v3: None
Changes in v2:
- Added Igor's reviewed-by.
board/toradex/colibri-imx6ull/colibri-imx6ull.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-)
board/toradex/colibri-imx6ull/colibri-imx6ull.c +9 -3
@@ -29,6 +29,7 @@#include <usb.h> #include <usb/ehci-ci.h> #include "../common/tdx-common.h" +#include "../common/tdx-cfg-block.h" DECLARE_GLOBAL_DATA_PTR ;
@@ -317,10 +318,15 @@ static const struct boot_mode board_boot_modes[] = {int board_late_init (void ) { -int minc, maxc; - -if (get_cpu_temp_grade (&minc, &maxc) !=TEMP_COMMERCIAL ) +#ifdef CONFIG_TDX_CFG_BLOCK +/* +* If we have a valid config block and it says we are a module with +* Wi-Fi/Bluetooth make sure we use the -wifi device tree. +*/ +if (tdx_hw_tag.prodid ==COLIBRI_IMX6ULL_WIFI_BT_IT || + tdx_hw_tag.prodid ==COLIBRI_IMX6ULL_WIFI_BT )env_set ("variant" ,"-wifi" ); +#endif #ifdef CONFIG_CMD_BMODE add_board_boot_modes (board_boot_modes);
Signature · 1 line
2.20.1
PATCH v3 4/14 apalis/colibri_imx6/imx6ull: make sure loadaddr does not collide
In reply to Marcel ZiswilerFrom: Stefan Agner <[email protected]>
Currently $loadaddr and $fdt_addr_r point to the same address. This might be not ideal for some distro boot scripts which make use of $loadaddr after loading the device tree.
Make sure the two variables point to two different addresses. Moving $loadaddr is not entirly trivial since it is defined in mx6_common.h. Move $fdt_addr_r and $ramdisk_addr_r by 1MiB, which should be enough for scripts.
---
Changes in v3: None
Changes in v2:
- Added Igor's reviewed-by.
include/configs/apalis_imx6.h | 4 ++-- include/configs/colibri-imx6ull.h | 4 ++-- include/configs/colibri_imx6.h | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-)
include/configs/apalis_imx6.h +2 -2
@@ -138,12 +138,12 @@#define MEM_LAYOUT_ENV_SETTINGS \ "bootm_size=0x20000000\0" \ - "fdt_addr_r=0x12000000\0" \ + "fdt_addr_r=0x12100000\0" \ "fdt_high=0xffffffff\0" \ "initrd_high=0xffffffff\0" \ "kernel_addr_r=0x11000000\0" \ "pxefile_addr_r=0x17100000\0" \ - "ramdisk_addr_r=0x12100000\0" \ + "ramdisk_addr_r=0x12200000\0" \ "scriptaddr=0x17000000\0"#define NFS_BOOTCMD \
include/configs/colibri-imx6ull.h +2 -2
@@ -48,12 +48,12 @@#define MEM_LAYOUT_ENV_SETTINGS \ "bootm_size=0x10000000\0" \ - "fdt_addr_r=0x82000000\0" \ + "fdt_addr_r=0x82100000\0" \ "fdt_high=0xffffffff\0" \ "initrd_high=0xffffffff\0" \ "kernel_addr_r=0x81000000\0" \ "pxefile_addr_r=0x87100000\0" \ - "ramdisk_addr_r=0x82100000\0" \ + "ramdisk_addr_r=0x82200000\0" \ "scriptaddr=0x87000000\0"#define NFS_BOOTCMD \
include/configs/colibri_imx6.h +2 -2
@@ -128,12 +128,12 @@#define MEM_LAYOUT_ENV_SETTINGS \ "bootm_size=0x10000000\0" \ - "fdt_addr_r=0x12000000\0" \ + "fdt_addr_r=0x12100000\0" \ "fdt_high=0xffffffff\0" \ "initrd_high=0xffffffff\0" \ "kernel_addr_r=0x11000000\0" \ "pxefile_addr_r=0x17100000\0" \ - "ramdisk_addr_r=0x12100000\0" \ + "ramdisk_addr_r=0x12200000\0" \ "scriptaddr=0x17000000\0"#define NFS_BOOTCMD \
Signature · 1 line
2.20.1
PATCH v3 5/14 colibri-imx6ull: fix ethernet phy power on
In reply to Marcel ZiswilerFrom: Marcel Ziswiler <[email protected]>
Just give the new Ethernet PHY power save mode circuitry time to settle.
---
Changes in v3: None
Changes in v2:
- Added Igor's reviewed-by tag.
board/toradex/colibri-imx6ull/colibri-imx6ull.c | 3 +++ 1 file changed, 3 insertions(+)
board/toradex/colibri-imx6ull/colibri-imx6ull.c +3 -0
@@ -263,6 +263,9 @@ static int setup_fec(void)IOMUX_GPR1_FEC2_CLOCK_MUX2_SEL_MASK , IOMUX_GPR1_FEC2_CLOCK_MUX1_SEL_MASK); +/* give new Ethernet PHY power save mode circuitry time to settle */ +mdelay (300 ); +return 0 ; }
Signature · 1 line
2.20.1
PATCH v3 6/14 board: imx6ull: Add disable PMIC_STBY_REQ
In reply to Marcel ZiswilerFrom: Philippe Schenker <[email protected]>
Disable output driver of PAD CCM_PMIC_STBY_REQ. This prevents the SOC to request for a lower voltage during sleep. This is necessary because the voltage is changing too slow for the SOC to wake up properly.
---
Changes in v3: None
Changes in v2:
- Added Igor's reviewed-by.
board/toradex/colibri-imx6ull/colibri-imx6ull.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
board/toradex/colibri-imx6ull/colibri-imx6ull.c +10 -0
@@ -50,6 +50,8 @@ DECLARE_GLOBAL_DATA_PTR;#define LCD_PAD_CTRL (PAD_CTL_HYS | PAD_CTL_PUS_100K_UP | \ PAD_CTL_DSE_48ohm) +#define MX6_PAD_SNVS_PMIC_STBY_REQ_ADDR 0x2290040 +#define NAND_PAD_CTRL (PAD_CTL_DSE_48ohm | PAD_CTL_SRE_SLOW | PAD_CTL_HYS)#define NAND_PAD_READY0_CTRL (PAD_CTL_DSE_48ohm | PAD_CTL_PUS_22K_UP)
@@ -331,6 +333,14 @@ int board_late_init(void)env_set ("variant" ,"-wifi" );#endif +/* +* Disable output driver of PAD CCM_PMIC_STBY_REQ. This prevents the +* SOC to request for a lower voltage during sleep. This is necessary +* because the voltage is changing too slow for the SOC to wake up +* properly. +*/ +__raw_writel (0x8080 ,MX6_PAD_SNVS_PMIC_STBY_REQ_ADDR ); +#ifdef CONFIG_CMD_BMODE add_board_boot_modes (board_boot_modes);#endif
Signature · 1 line
2.20.1
PATCH v3 7/14 colibri-imx6ull: configuration clean-up
In reply to Marcel ZiswilerFrom: Marcel Ziswiler <[email protected]>
Drop disabling SPL_SYS_THUMB_BUILD as we anyway do not use SPL. Enbale CRC32 verify, USB SDP and EFI loader support. Drop CMD_GPT and disabling RANDOM_UUID.
Do savedefconfig which drops USB_FUNCTION_SDP.
---
Changes in v3: None
Changes in v2:
- Added Igor's reviewed-by.
configs/colibri-imx6ull_defconfig | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)
configs/colibri-imx6ull_defconfig +3 -5
@@ -1,6 +1,5 @@ CONFIG_ARM=y CONFIG_SYS_THUMB_BUILD=y -# CONFIG_SPL_SYS_THUMB_BUILD is not set CONFIG_ARCH_MX6=y CONFIG_SYS_TEXT_BASE=0x87800000 CONFIG_TARGET_COLIBRI_IMX6ULL=y
@@ -18,19 +17,20 @@ CONFIG_DISPLAY_BOARDINFO_LATE=y CONFIG_BOUNCE_BUFFER=y CONFIG_BOARD_EARLY_INIT_F=y CONFIG_SYS_PROMPT="Colibri iMX6ULL # " +# CONFIG_CMD_ELF is not set # CONFIG_CMD_IMI is not set # CONFIG_CMD_XIMG is not set CONFIG_CMD_ASKENV=y +CONFIG_CRC32_VERIFY=y CONFIG_CMD_MEMTEST=y CONFIG_CMD_DFU=y CONFIG_CMD_GPIO=y -CONFIG_CMD_GPT=y -# CONFIG_RANDOM_UUID is not set CONFIG_CMD_I2C=y CONFIG_CMD_MMC=y CONFIG_CMD_NAND_TRIMFFS=y CONFIG_CMD_NAND_TORTURE=y CONFIG_CMD_USB=y +CONFIG_CMD_USB_SDP=y CONFIG_CMD_USB_MASS_STORAGE=y CONFIG_CMD_BMP=y CONFIG_CMD_CACHE=y
@@ -73,8 +73,6 @@ CONFIG_USB_GADGET_VENDOR_NUM=0x1b67 CONFIG_USB_GADGET_PRODUCT_NUM=0x4000 CONFIG_CI_UDC=y CONFIG_USB_GADGET_DOWNLOAD=y -CONFIG_USB_FUNCTION_SDP=y CONFIG_VIDEO=y CONFIG_OF_LIBFDT_OVERLAY=y CONFIG_FDT_FIXUP_PARTITIONS=y -# CONFIG_EFI_LOADER is not set
Signature · 1 line
2.20.1
PATCH v3 8/14 colibri-imx6ull: migrate pinctrl and regulators to dtb/dm
In reply to Marcel ZiswilerFrom: Marcel Ziswiler <[email protected]>
Migrate pinctrl and regulators to device tree resp. driver model:
Ethernet, NAND and UART.
Drop BOARD_EARLY_INIT_F as it is anyway no longer used. Enable CMD_DM, CMD_MTD, CMD_REGULATOR and DM_REGULATOR_FIXED. While at it also update copyright period.
---
Changes in v3: None
Changes in v2:
- Added Igor's reviewed-by.
.../toradex/colibri-imx6ull/colibri-imx6ull.c | 82 ++----------------- configs/colibri-imx6ull_defconfig | 5 +- 2 files changed, 10 insertions(+), 77 deletions(-)
board/toradex/colibri-imx6ull/colibri-imx6ull.c +6 -76
@@ -1,8 +1,9 @@// SPDX-License-Identifier: GPL-2.0+ /* -* Copyright (C) 2018 Toradex AG +* Copyright (C) 2018-2019 Toradex AG */ #include <common.h> +#include <asm/arch/clock.h> #include <asm/arch/crm_regs.h> #include <asm/arch/imx-regs.h>
@@ -14,7 +15,6 @@#include <asm/mach-imx/boot_mode.h> #include <asm/mach-imx/iomux-v3.h> #include <asm/io.h> -#include <common.h> #include <dm.h> #include <dm/platform_data/serial_mxc.h> #include <fdt_support.h>
@@ -28,25 +28,16 @@#include <netdev.h> #include <usb.h> #include <usb/ehci-ci.h> +#include "../common/tdx-common.h" #include "../common/tdx-cfg-block.h" DECLARE_GLOBAL_DATA_PTR ; -#define UART_PAD_CTRL (PAD_CTL_PUS_100K_UP | \ - PAD_CTL_SPEED_MED | PAD_CTL_DSE_40ohm | \ - PAD_CTL_SRE_FAST | PAD_CTL_HYS) -#define USDHC_PAD_CTRL (PAD_CTL_PUS_47K_UP | \ PAD_CTL_SPEED_LOW | PAD_CTL_DSE_40ohm | \ PAD_CTL_SRE_FAST | PAD_CTL_HYS) -#define ENET_PAD_CTRL (PAD_CTL_PUS_100K_UP | \ - PAD_CTL_SPEED_MED | PAD_CTL_DSE_40ohm | PAD_CTL_HYS) -#define ENET_PAD_CTRL_MII (PAD_CTL_DSE_40ohm) - -#define ENET_RX_PAD_CTRL (PAD_CTL_PUS_100K_UP | PAD_CTL_DSE_48ohm) -#define LCD_PAD_CTRL (PAD_CTL_HYS | PAD_CTL_PUS_100K_UP | \ PAD_CTL_DSE_48ohm)
@@ -65,13 +56,6 @@ int dram_init(void)return 0 ; } -static iomux_v3_cfg_t const uart1_pads[] = { -MX6_PAD_UART1_TX_DATA__UART1_DTE_RX |MUX_PAD_CTRL (UART_PAD_CTRL ), -MX6_PAD_UART1_RX_DATA__UART1_DTE_TX |MUX_PAD_CTRL (UART_PAD_CTRL ), -MX6_PAD_UART1_RTS_B__UART1_DTE_CTS |MUX_PAD_CTRL (UART_PAD_CTRL ), -MX6_PAD_UART1_CTS_B__UART1_DTE_RTS |MUX_PAD_CTRL (UART_PAD_CTRL ), -}; -#ifdef CONFIG_FSL_ESDHC static iomux_v3_cfg_t const usdhc1_pads[] = { MX6_PAD_SD1_CLK__USDHC1_CLK | MUX_PAD_CTRL(USDHC_PAD_CTRL),
@@ -90,31 +74,12 @@ static iomux_v3_cfg_t const usb_cdet_pads[] = { };#ifdef CONFIG_NAND_MXS -static iomux_v3_cfg_t const gpmi_pads[] = { -MX6_PAD_NAND_DATA00__RAWNAND_DATA00 |MUX_PAD_CTRL (NAND_PAD_CTRL ), -MX6_PAD_NAND_DATA01__RAWNAND_DATA01 |MUX_PAD_CTRL (NAND_PAD_CTRL ), -MX6_PAD_NAND_DATA02__RAWNAND_DATA02 |MUX_PAD_CTRL (NAND_PAD_CTRL ), -MX6_PAD_NAND_DATA03__RAWNAND_DATA03 |MUX_PAD_CTRL (NAND_PAD_CTRL ), -MX6_PAD_NAND_DATA04__RAWNAND_DATA04 |MUX_PAD_CTRL (NAND_PAD_CTRL ), -MX6_PAD_NAND_DATA05__RAWNAND_DATA05 |MUX_PAD_CTRL (NAND_PAD_CTRL ), -MX6_PAD_NAND_DATA06__RAWNAND_DATA06 |MUX_PAD_CTRL (NAND_PAD_CTRL ), -MX6_PAD_NAND_DATA07__RAWNAND_DATA07 |MUX_PAD_CTRL (NAND_PAD_CTRL ), -MX6_PAD_NAND_CLE__RAWNAND_CLE |MUX_PAD_CTRL (NAND_PAD_CTRL ), -MX6_PAD_NAND_ALE__RAWNAND_ALE |MUX_PAD_CTRL (NAND_PAD_CTRL ), -MX6_PAD_NAND_RE_B__RAWNAND_RE_B |MUX_PAD_CTRL (NAND_PAD_CTRL ), -MX6_PAD_NAND_WE_B__RAWNAND_WE_B |MUX_PAD_CTRL (NAND_PAD_CTRL ), -MX6_PAD_NAND_CE0_B__RAWNAND_CE0_B |MUX_PAD_CTRL (NAND_PAD_CTRL ), -MX6_PAD_NAND_READY_B__RAWNAND_READY_B |MUX_PAD_CTRL (NAND_PAD_READY0_CTRL ), -}; -static void setup_gpmi_nand (void ) { -imx_iomux_v3_setup_multiple_pads (gpmi_pads,ARRAY_SIZE (gpmi_pads)); -setup_gpmi_io_clk ((3 <<MXC_CCM_CSCDR1_BCH_PODF_OFFSET ) | (3 <<MXC_CCM_CSCDR1_GPMI_PODF_OFFSET )); } -#endif +#endif /* CONFIG_NAND_MXS */ #ifdef CONFIG_VIDEO_MXS static iomux_v3_cfg_t const lcd_pads[] = {
@@ -170,31 +135,6 @@ static int setup_lcd(void) }#endif -#ifdef CONFIG_FEC_MXC -static iomux_v3_cfg_t const fec2_pads[] = { -MX6_PAD_ENET2_TX_CLK__ENET2_REF_CLK2 |MUX_PAD_CTRL (ENET_PAD_CTRL ) |MUX_MODE_SION , -MX6_PAD_GPIO1_IO06__ENET2_MDIO |MUX_PAD_CTRL (ENET_PAD_CTRL_MII ), -MX6_PAD_GPIO1_IO07__ENET2_MDC |MUX_PAD_CTRL (ENET_PAD_CTRL_MII ), -MX6_PAD_ENET2_RX_DATA0__ENET2_RDATA00 |MUX_PAD_CTRL (ENET_RX_PAD_CTRL ), -MX6_PAD_ENET2_RX_DATA1__ENET2_RDATA01 |MUX_PAD_CTRL (ENET_RX_PAD_CTRL ), -MX6_PAD_ENET2_RX_ER__ENET2_RX_ER |MUX_PAD_CTRL (ENET_RX_PAD_CTRL ), -MX6_PAD_ENET2_RX_EN__ENET2_RX_EN |MUX_PAD_CTRL (ENET_RX_PAD_CTRL ), -MX6_PAD_ENET2_TX_DATA0__ENET2_TDATA00 |MUX_PAD_CTRL (ENET_PAD_CTRL ), -MX6_PAD_ENET2_TX_DATA1__ENET2_TDATA01 |MUX_PAD_CTRL (ENET_PAD_CTRL ), -MX6_PAD_ENET2_TX_EN__ENET2_TX_EN |MUX_PAD_CTRL (ENET_PAD_CTRL ), -}; - -static void setup_iomux_fec (void ) -{ -imx_iomux_v3_setup_multiple_pads (fec2_pads,ARRAY_SIZE (fec2_pads)); -} -#endif - -static void setup_iomux_uart (void ) -{ -imx_iomux_v3_setup_multiple_pads (uart1_pads,ARRAY_SIZE (uart1_pads)); -} -#ifdef CONFIG_FSL_ESDHC #define USDHC1_CD_GPIO IMX_GPIO_NR(5, 0)
@@ -247,20 +187,17 @@ int board_mmc_init(bd_t *bis)#endif #ifdef CONFIG_FEC_MXC -static int setup_fec (void ) {struct iomuxc *iomuxc_regs = (struct iomuxc *)IOMUXC_BASE_ADDR ;int ret; -setup_iomux_fec (); -/* provide the PHY clock from the i.MX 6 */ ret =enable_fec_anatop_clock (1 ,ENET_50MHZ );if (ret)return ret; -/* Use 50M anatop REF_CLK and output it on the ENET2_TX_CLK */ +/* Use 50M anatop REF_CLK and output it on ENET2_TX_CLK */ clrsetbits_le32 (&iomuxc_regs->gpr[1 ],IOMUX_GPR1_FEC2_CLOCK_MUX2_SEL_MASK ,IOMUX_GPR1_FEC2_CLOCK_MUX1_SEL_MASK );
@@ -277,14 +214,7 @@ int board_phy_config(struct phy_device *phydev) phydev->drv->config (phydev); return 0; } -#endif - -int board_early_init_f (void ) -{ -setup_iomux_uart (); - -return 0 ; -} +#endif /* CONFIG_FEC_MXC */ int board_init (void ) {
configs/colibri-imx6ull_defconfig +4 -1
@@ -15,7 +15,6 @@ CONFIG_VERSION_VARIABLE=y # CONFIG_DISPLAY_BOARDINFO is not set CONFIG_DISPLAY_BOARDINFO_LATE=y CONFIG_BOUNCE_BUFFER=y -CONFIG_BOARD_EARLY_INIT_F=y CONFIG_SYS_PROMPT="Colibri iMX6ULL # " # CONFIG_CMD_ELF is not set # CONFIG_CMD_IMI is not set
@@ -24,9 +23,11 @@ CONFIG_CMD_ASKENV=y CONFIG_CRC32_VERIFY=y CONFIG_CMD_MEMTEST=y CONFIG_CMD_DFU=y +CONFIG_CMD_DM=y CONFIG_CMD_GPIO=y CONFIG_CMD_I2C=y CONFIG_CMD_MMC=y +CONFIG_CMD_MTD=y CONFIG_CMD_NAND_TRIMFFS=y CONFIG_CMD_NAND_TORTURE=y CONFIG_CMD_USB=y
@@ -34,6 +35,7 @@ CONFIG_CMD_USB_SDP=y CONFIG_CMD_USB_MASS_STORAGE=y CONFIG_CMD_BMP=y CONFIG_CMD_CACHE=y +CONFIG_CMD_REGULATOR=y CONFIG_CMD_MTDPARTS=y CONFIG_MTDIDS_DEFAULT="nand0=gpmi-nand" CONFIG_MTDPARTS_DEFAULT="mtdparts=gpmi-nand:512k(mx6ull-bcb),1536k(u-boot1)ro,1536k(u-boot2)ro,512k(u-boot-env),-(ubi)"
@@ -63,6 +65,7 @@ CONFIG_MII=y CONFIG_PINCTRL=y CONFIG_PINCTRL_IMX6=y CONFIG_DM_REGULATOR=y +CONFIG_DM_REGULATOR_FIXED=y # CONFIG_SPL_SERIAL_PRESENT is not set CONFIG_DM_SERIAL=y CONFIG_MXC_UART=y
Signature · 1 line
2.20.1
PATCH v3 9/14 colibri-imx6ull: migrate mmc to using driver model
In reply to Marcel ZiswilerFrom: Marcel Ziswiler <[email protected]>
Migrate MMC to using driver model.
Migrate USDHC to using pinctrl.
While at it also add GPIO1_IO03__OSC32K_32K_OUT pin muxing. While at it also update copyright period.
---
Changes in v3: None
Changes in v2:
- Added Igor's reviewed-by.
arch/arm/dts/imx6ull-colibri.dts | 15 +++- .../toradex/colibri-imx6ull/colibri-imx6ull.c | 70 ------------------- configs/colibri-imx6ull_defconfig | 1 + include/configs/colibri-imx6ull.h | 6 +- 4 files changed, 17 insertions(+), 75 deletions(-)
arch/arm/dts/imx6ull-colibri.dts +13 -2
@@ -1,6 +1,6 @@ // SPDX-License-Identifier: (GPL-2.0+ OR MIT) /* - * Copyright 2018 Toradex AG + * Copyright 2018-2019 Toradex AG */ /dts-v1/;
@@ -11,6 +11,10 @@ model = "Toradex Colibri iMX6ULL"; compatible = "toradex,imx6ull-colibri", "fsl,imx6ull"; + aliases { + mmc0 = &usdhc1; + }; + chosen { stdout-path = &uart1; };
@@ -190,10 +194,18 @@ dr_mode = "host"; }; +/* Colibri MMC */ &usdhc1 { assigned-clocks = <&clks IMX6UL_CLK_USDHC1_SEL>, <&clks IMX6UL_CLK_USDHC1>; assigned-clock-parents = <&clks IMX6UL_CLK_PLL2_PFD2>; assigned-clock-rates = <0>, <198000000>; + cd-gpios = <&gpio5 0 GPIO_ACTIVE_LOW>; /* MMC_CD */ + pinctrl-names = "default", "state_100mhz", "state_200mhz"; + pinctrl-0 = <&pinctrl_usdhc1 &pinctrl_snvs_usdhc1_cd>; + pinctrl-1 = <&pinctrl_usdhc1_100mhz>; + pinctrl-2 = <&pinctrl_usdhc1_200mhz>; + vmmc-supply = <®_sd1_vmmc>; + status = "okay"; }; &iomuxc {
@@ -547,4 +559,3 @@ >; }; }; -
board/toradex/colibri-imx6ull/colibri-imx6ull.c +0 -70
97 lines not on this page · raw message
configs/colibri-imx6ull_defconfig +1 -0
@@ -50,6 +50,7 @@ CONFIG_DFU_NAND=y CONFIG_DM_GPIO=y CONFIG_DM_I2C=y CONFIG_SYS_I2C_MXC=y +CONFIG_DM_MMC=y CONFIG_FSL_ESDHC=y CONFIG_MTD=y CONFIG_NAND=y
include/configs/colibri-imx6ull.h +3 -3
@@ -1,6 +1,6 @@/* SPDX-License-Identifier: GPL-2.0+ */ /* -* Copyright 2018 Toradex AG +* Copyright 2018-2019 Toradex AG * * Configuration settings for the Colibri iMX6ULL module. *
@@ -30,7 +30,7 @@/* ENET1 */ #define IMX_FEC_BASE ENET2_BASE_ADDR -/* MMC Config*/ +/* MMC Config */ #define CONFIG_SYS_FSL_ESDHC_ADDR 0#define CONFIG_SYS_FSL_USDHC_NUM 1
@@ -182,4 +182,4 @@#define CONFIG_VIDEO_BMP_LOGO #endif -#endif +#endif /* __COLIBRI_IMX6ULL_CONFIG_H */
Signature · 1 line
2.20.1
PATCH v3 10/14 colibri-imx6ull: migrate usb to using driver model
In reply to Marcel ZiswilerFrom: Marcel Ziswiler <[email protected]>
Migrate USB to using driver model.
Add USBH_PEN GPIO regulator.
While at it also add alias e.g. as required for UMS.
---
Changes in v3:
- Fixed issue with host mode as pointed out by Igor.
Changes in v2:
- Added Igor's reviewed-by.
arch/arm/dts/imx6ull-colibri.dts | 26 +++++++++- .../toradex/colibri-imx6ull/colibri-imx6ull.c | 48 ------------------- configs/colibri-imx6ull_defconfig | 1 + 3 files changed, 26 insertions(+), 49 deletions(-)
arch/arm/dts/imx6ull-colibri.dts +25 -1
@@ -13,6 +13,7 @@ aliases { mmc0 = &usdhc1; + usb0 = &usbotg1; /* required for ums */ }; chosen {
@@ -35,6 +36,13 @@ regulator-max-microvolt = <3300000>; }; + reg_5v0: regulator-5v0 { + compatible = "regulator-fixed"; + regulator-name = "5V"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + }; + reg_sd1_vmmc: regulator-sd1-vmmc { compatible = "regulator-gpio"; gpio = <&gpio5 9 GPIO_ACTIVE_HIGH>;
@@ -47,6 +55,17 @@ states = <1800000 0x1 3300000 0x0>; vin-supply = <®_module_3v3>; }; + + reg_usbh_vbus: regulator-usbh-vbus { + compatible = "regulator-fixed"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_usbh_reg>; + regulator-name = "VCC_USB[1-4]"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + gpio = <&gpio1 2 GPIO_ACTIVE_LOW>; /* USBH_PEN */ + vin-supply = <®_5v0>; + }; }; &adc1 {
@@ -183,15 +202,20 @@ fsl,dte-mode; }; +/* Colibri USBC */ &usbotg1 { - dr_mode = "otg"; + dr_mode = "host"; srp-disable; hnp-disable; adp-disable; + status = "okay"; }; +/* Colibri USBH */ &usbotg2 { dr_mode = "host"; + vbus-supply = <®_usbh_vbus>; + status = "okay"; }; /* Colibri MMC */
board/toradex/colibri-imx6ull/colibri-imx6ull.c +0 -48
78 lines not on this page · raw message
configs/colibri-imx6ull_defconfig +1 -0
@@ -71,6 +71,7 @@ CONFIG_DM_REGULATOR_FIXED=y CONFIG_DM_SERIAL=y CONFIG_MXC_UART=y CONFIG_USB=y +CONFIG_DM_USB=y CONFIG_USB_GADGET=y CONFIG_USB_GADGET_MANUFACTURER="Toradex" CONFIG_USB_GADGET_VENDOR_NUM=0x1b67
Signature · 1 line
2.20.1
PATCH v3 11/14 colibri-imx6ull: migrate fec to using driver model
In reply to Marcel ZiswilerFrom: Marcel Ziswiler <[email protected]>
Migrate Ethernet FEC to using driver model.
Drop PHY_MICREL_KSZ90X1 which slipped in from Apalis iMX6.
---
Changes in v3: None
Changes in v2:
- Added Igor's reviewed-by.
arch/arm/dts/imx6ull-colibri.dts | 31 ++++++++++++++++--------------- configs/colibri-imx6ull_defconfig | 3 +-- include/configs/colibri-imx6ull.h | 4 ---- 3 files changed, 17 insertions(+), 21 deletions(-)
arch/arm/dts/imx6ull-colibri.dts +16 -15
@@ -80,6 +80,7 @@ pinctrl-0 = <&pinctrl_ecspi1 &pinctrl_ecspi1_cs>; }; +/* Ethernet */ &fec2 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_enet2>;
@@ -233,6 +234,21 @@ }; &iomuxc { + pinctrl_enet2: enet2-grp { + fsl,pins = < + MX6UL_PAD_GPIO1_IO06__ENET2_MDIO 0x1b0b0 + MX6UL_PAD_GPIO1_IO07__ENET2_MDC 0x1b0b0 + MX6UL_PAD_ENET2_RX_DATA0__ENET2_RDATA00 0x1b0b0 + MX6UL_PAD_ENET2_RX_DATA1__ENET2_RDATA01 0x1b0b0 + MX6UL_PAD_ENET2_RX_EN__ENET2_RX_EN 0x1b0b0 + MX6UL_PAD_ENET2_RX_ER__ENET2_RX_ER 0x1b0b0 + MX6UL_PAD_ENET2_TX_CLK__ENET2_REF_CLK2 0x4001b031 + MX6UL_PAD_ENET2_TX_DATA0__ENET2_TDATA00 0x1b0b0 + MX6UL_PAD_ENET2_TX_DATA1__ENET2_TDATA01 0x1b0b0 + MX6UL_PAD_ENET2_TX_EN__ENET2_TX_EN 0x1b0b0 + >; + }; + pinctrl_gpio1: gpio1-grp { fsl,pins = < MX6UL_PAD_ENET1_RX_DATA0__GPIO2_IO00 0x74 /* SODIMM 55 */
@@ -295,21 +311,6 @@ >; }; - pinctrl_enet2: enet2-grp { - fsl,pins = < - MX6UL_PAD_GPIO1_IO06__ENET2_MDIO 0x1b0b0 - MX6UL_PAD_GPIO1_IO07__ENET2_MDC 0x1b0b0 - MX6UL_PAD_ENET2_RX_DATA0__ENET2_RDATA00 0x1b0b0 - MX6UL_PAD_ENET2_RX_DATA1__ENET2_RDATA01 0x1b0b0 - MX6UL_PAD_ENET2_RX_EN__ENET2_RX_EN 0x1b0b0 - MX6UL_PAD_ENET2_RX_ER__ENET2_RX_ER 0x1b0b0 - MX6UL_PAD_ENET2_TX_CLK__ENET2_REF_CLK2 0x4001b031 - MX6UL_PAD_ENET2_TX_DATA0__ENET2_TDATA00 0x1b0b0 - MX6UL_PAD_ENET2_TX_DATA1__ENET2_TDATA01 0x1b0b0 - MX6UL_PAD_ENET2_TX_EN__ENET2_TX_EN 0x1b0b0 - >; - }; - pinctrl_ecspi1_cs: ecspi1-cs-grp { fsl,pins = < MX6UL_PAD_LCD_DATA21__GPIO3_IO26 0x000a0
configs/colibri-imx6ull_defconfig +1 -2
@@ -58,9 +58,8 @@ CONFIG_NAND_MXS=y CONFIG_NAND_MXS_DT=y CONFIG_MTD_UBI_FASTMAP=y CONFIG_PHYLIB=y -CONFIG_PHY_ADDR_ENABLE=y CONFIG_PHY_MICREL=y -CONFIG_PHY_MICREL_KSZ90X1=y +CONFIG_DM_ETH=y CONFIG_FEC_MXC=y CONFIG_MII=y CONFIG_PINCTRL=y
include/configs/colibri-imx6ull.h +0 -4
@@ -19,10 +19,6 @@#define CONFIG_SYS_MALLOC_LEN (32 * SZ_1M)/* Network */ -#define CONFIG_FEC_XCV_TYPE RMII -#define CONFIG_ETHPRIME "FEC" -#define CONFIG_FEC_MXC_PHYADDR 0 -#define CONFIG_IP_DEFRAG #define CONFIG_TFTP_BLOCKSIZE 16352#define CONFIG_TFTP_TSIZE
Signature · 1 line
2.20.1
PATCH v3 12/14 ARM: dts: colibri-imx6ull: fix uart-has-rtscts property
In reply to Marcel ZiswilerFrom: Marcel Ziswiler <[email protected]>
Remove vendor pre-fix fsl, from uart-has-rtscts property.
---
Changes in v3: None
Changes in v2:
- Added Igor's reviewed-by.
arch/arm/dts/imx6ull-colibri.dts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
arch/arm/dts/imx6ull-colibri.dts +5 -2
@@ -182,21 +182,24 @@ status = "disabled"; }; +/* Colibri UART_A */ &uart1 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_uart1 &pinctrl_uart1_ctrl1>; - fsl,uart-has-rtscts; + uart-has-rtscts; fsl,dte-mode; status = "okay"; }; +/* Colibri UART_B */ &uart2 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_uart2>; - fsl,uart-has-rtscts; + uart-has-rtscts; fsl,dte-mode; }; +/* Colibri UART_C */ &uart5 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_uart5>;
Signature · 1 line
2.20.1
PATCH v3 13/14 ARM: dts: colibri-imx6ull: add osc32k_32k_out pinctrl
In reply to Marcel ZiswilerFrom: Marcel Ziswiler <[email protected]>
Add GPIO1_IO03__OSC32K_32K_OUT pin muxing. While at it also fix indentation of pinfunc header file.
---
Changes in v3: None
Changes in v2:
- Added Igor's reviewed-by.
arch/arm/dts/imx6ull-colibri.dts | 2 ++ arch/arm/dts/imx6ull-pinfunc.h | 26 ++++++++++++++------------ 2 files changed, 16 insertions(+), 12 deletions(-)
arch/arm/dts/imx6ull-colibri.dts +2 -0
@@ -524,6 +524,8 @@ MX6UL_PAD_CSI_DATA03__USDHC2_DATA3 0x17059 MX6UL_PAD_CSI_HSYNC__USDHC2_CMD 0x17059 MX6UL_PAD_CSI_VSYNC__USDHC2_CLK 0x17059 + + MX6UL_PAD_GPIO1_IO03__OSC32K_32K_OUT 0x14 >; }; };
arch/arm/dts/imx6ull-pinfunc.h +14 -12
@@ -14,6 +14,8 @@* The pin function ID is a tuple of * <mux_reg conf_reg input_reg mux_mode input_val> */ +#define MX6UL_PAD_GPIO1_IO03__OSC32K_32K_OUT 0x0068 0x02f4 0x0000 0x3 0x0 +#define MX6UL_PAD_ENET2_RX_DATA0__EPDC_SDDO08 0x00E4 0x0370 0x0000 0x9 0x0#define MX6UL_PAD_ENET2_RX_DATA1__EPDC_SDDO09 0x00E8 0x0374 0x0000 0x9 0x0#define MX6UL_PAD_ENET2_RX_EN__EPDC_SDDO10 0x00EC 0x0378 0x0000 0x9 0x0
@@ -41,17 +43,17 @@#define MX6UL_PAD_LCD_DATA17__EPDC_GDSP 0x015C 0x03E8 0x0000 0x9 0x0#define MX6UL_PAD_LCD_DATA21__EPDC_SDCE1 0x016C 0x03F8 0x0000 0x9 0x0 -#define MX6UL_PAD_CSI_MCLK__ESAI_TX3_RX2 0x01D4 0x0460 0x0000 0x9 0x0 -#define MX6UL_PAD_CSI_PIXCLK__ESAI_TX2_RX3 0x01D8 0x0464 0x0000 0x9 0x0 -#define MX6UL_PAD_CSI_VSYNC__ESAI_TX4_RX1 0x01DC 0x0468 0x0000 0x9 0x0 -#define MX6UL_PAD_CSI_HSYNC__ESAI_TX1 0x01E0 0x046C 0x0000 0x9 0x0 -#define MX6UL_PAD_CSI_DATA00__ESAI_TX_HF_CLK 0x01E4 0x0470 0x0000 0x9 0x0 -#define MX6UL_PAD_CSI_DATA01__ESAI_RX_HF_CLK 0x01E8 0x0474 0x0000 0x9 0x0 -#define MX6UL_PAD_CSI_DATA02__ESAI_RX_FS 0x01EC 0x0478 0x0000 0x9 0x0 -#define MX6UL_PAD_CSI_DATA03__ESAI_RX_CLK 0x01F0 0x047C 0x0000 0x9 0x0 -#define MX6UL_PAD_CSI_DATA04__ESAI_TX_FS 0x01F4 0x0480 0x0000 0x9 0x0 -#define MX6UL_PAD_CSI_DATA05__ESAI_TX_CLK 0x01F8 0x0484 0x0000 0x9 0x0 -#define MX6UL_PAD_CSI_DATA06__ESAI_TX5_RX0 0x01FC 0x0488 0x0000 0x9 0x0 -#define MX6UL_PAD_CSI_DATA07__ESAI_T0 0x0200 0x048C 0x0000 0x9 0x0 +#define MX6UL_PAD_CSI_MCLK__ESAI_TX3_RX2 0x01D4 0x0460 0x0000 0x9 0x0 +#define MX6UL_PAD_CSI_PIXCLK__ESAI_TX2_RX3 0x01D8 0x0464 0x0000 0x9 0x0 +#define MX6UL_PAD_CSI_VSYNC__ESAI_TX4_RX1 0x01DC 0x0468 0x0000 0x9 0x0 +#define MX6UL_PAD_CSI_HSYNC__ESAI_TX1 0x01E0 0x046C 0x0000 0x9 0x0 +#define MX6UL_PAD_CSI_DATA00__ESAI_TX_HF_CLK 0x01E4 0x0470 0x0000 0x9 0x0 +#define MX6UL_PAD_CSI_DATA01__ESAI_RX_HF_CLK 0x01E8 0x0474 0x0000 0x9 0x0 +#define MX6UL_PAD_CSI_DATA02__ESAI_RX_FS 0x01EC 0x0478 0x0000 0x9 0x0 +#define MX6UL_PAD_CSI_DATA03__ESAI_RX_CLK 0x01F0 0x047C 0x0000 0x9 0x0 +#define MX6UL_PAD_CSI_DATA04__ESAI_TX_FS 0x01F4 0x0480 0x0000 0x9 0x0 +#define MX6UL_PAD_CSI_DATA05__ESAI_TX_CLK 0x01F8 0x0484 0x0000 0x9 0x0 +#define MX6UL_PAD_CSI_DATA06__ESAI_TX5_RX0 0x01FC 0x0488 0x0000 0x9 0x0 +#define MX6UL_PAD_CSI_DATA07__ESAI_T0 0x0200 0x048C 0x0000 0x9 0x0#endif /* __DTS_IMX6ULL_PINFUNC_H */
Signature · 1 line
2.20.1
PATCH v3 13/14 ARM: dts: colibri-imx6ull: add osc32k_32k_out pinctrl
Quoted 5 lines
From: Marcel Ziswiler <[email protected]> Add
GPIO1_IO03__OSC32K_32K_OUTpin muxing. While at it also fix indentation of pinfunc header file.Signed-off-by Marcel Ziswiler <[email protected]>Reviewed-by Igor Opaniuk <[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 v3 14/14 ARM: dts: colibri-imx6ull: update device tree
In reply to Marcel ZiswilerFrom: Marcel Ziswiler <[email protected]>
Fix compatible node to use regular Toradex notation.
Annotate device tree with standard Colibri pin muxing comments. Use open-drain I2C pin muxings.
Alphabetically re-order iomuxc nodes.
Rename snvs-ad7879-int-grp touch interrupt node as per Linux device tree.
---
Changes in v3: None
Changes in v2:
- Added Igor's reviewed-by.
arch/arm/dts/imx6ull-colibri.dts | 91 ++++++++++++++++++-------------- 1 file changed, 52 insertions(+), 39 deletions(-)
arch/arm/dts/imx6ull-colibri.dts +52 -39
@@ -9,7 +9,7 @@ / { model = "Toradex Colibri iMX6ULL"; - compatible = "toradex,imx6ull-colibri", "fsl,imx6ull"; + compatible = "toradex,colibri-imx6ull", "fsl,imx6ull"; aliases { mmc0 = &usdhc1;
@@ -100,6 +100,7 @@ }; }; +/* NAND */ &gpmi { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_gpmi_nand>;
@@ -110,21 +111,28 @@ status = "okay"; }; +/* + * I2C3_SDA/SCL on SODIMM 194/196 (e.g. RTC on carrier board) + */ &i2c1 { pinctrl-names = "default", "gpio"; pinctrl-0 = <&pinctrl_i2c1>; pinctrl-1 = <&pinctrl_i2c1_gpio>; - sda-gpios = <&gpio1 29 GPIO_ACTIVE_LOW>; - scl-gpios = <&gpio1 28 GPIO_ACTIVE_LOW>; + sda-gpios = <&gpio1 29 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; + scl-gpios = <&gpio1 28 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; status = "okay"; }; +/* + * PWR_I2C: power I2C to audio codec, PMIC, temperature sensor and + * touch screen controller + */ &i2c2 { pinctrl-names = "default", "gpio"; pinctrl-0 = <&pinctrl_i2c2>; pinctrl-1 = <&pinctrl_i2c2_gpio>; - sda-gpios = <&gpio1 31 GPIO_ACTIVE_LOW>; - scl-gpios = <&gpio1 30 GPIO_ACTIVE_LOW>; + sda-gpios = <&gpio1 31 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; + scl-gpios = <&gpio1 30 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; status = "okay"; ad7879 at 2c {
@@ -150,24 +158,28 @@ &pinctrl_lcdif_ctrl>; }; +/* PWM <A> */ &pwm4 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_pwm4>; #pwm-cells = <3>; }; +/* PWM <B> */ &pwm5 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_pwm5>; #pwm-cells = <3>; }; +/* PWM <C> */ &pwm6 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_pwm6>; #pwm-cells = <3>; }; +/* PWM <D> */ &pwm7 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_pwm7>;
@@ -237,6 +249,13 @@ }; &iomuxc { + pinctrl_can_int: canint-grp { + fsl,pins = < + /* SODIMM 73 */ + MX6UL_PAD_ENET1_TX_DATA1__GPIO2_IO04 0X14 + >; + }; + pinctrl_enet2: enet2-grp { fsl,pins = < MX6UL_PAD_GPIO1_IO06__ENET2_MDIO 0x1b0b0
@@ -252,6 +271,33 @@ >; }; + pinctrl_ecspi1_cs: ecspi1-cs-grp { + fsl,pins = < + MX6UL_PAD_LCD_DATA21__GPIO3_IO26 0x000a0 + >; + }; + + pinctrl_ecspi1: ecspi1-grp { + fsl,pins = < + MX6UL_PAD_LCD_DATA20__ECSPI1_SCLK 0x000a0 + MX6UL_PAD_LCD_DATA22__ECSPI1_MOSI 0x000a0 + MX6UL_PAD_LCD_DATA23__ECSPI1_MISO 0x100a0 + >; + }; + + pinctrl_flexcan2: flexcan2-grp { + fsl,pins = < + MX6UL_PAD_ENET1_TX_DATA0__FLEXCAN2_RX 0x1b020 + MX6UL_PAD_ENET1_RX_EN__FLEXCAN2_TX 0x1b020 + >; + }; + + pinctrl_gpio_bl_on: gpio-bl-on-grp { + fsl,pins = < + MX6UL_PAD_JTAG_TMS__GPIO1_IO11 0x000a0 + >; + }; + pinctrl_gpio1: gpio1-grp { fsl,pins = < MX6UL_PAD_ENET1_RX_DATA0__GPIO2_IO00 0x74 /* SODIMM 55 */
@@ -308,39 +354,6 @@ >; }; - pinctrl_can_int: canint-grp { - fsl,pins = < - MX6UL_PAD_ENET1_TX_DATA1__GPIO2_IO04 0X14 /* SODIMM 73 */ - >; - }; - - pinctrl_ecspi1_cs: ecspi1-cs-grp { - fsl,pins = < - MX6UL_PAD_LCD_DATA21__GPIO3_IO26 0x000a0 - >; - }; - - pinctrl_ecspi1: ecspi1-grp { - fsl,pins = < - MX6UL_PAD_LCD_DATA20__ECSPI1_SCLK 0x000a0 - MX6UL_PAD_LCD_DATA22__ECSPI1_MOSI 0x000a0 - MX6UL_PAD_LCD_DATA23__ECSPI1_MISO 0x100a0 - >; - }; - - pinctrl_flexcan2: flexcan2-grp { - fsl,pins = < - MX6UL_PAD_ENET1_TX_DATA0__FLEXCAN2_RX 0x1b020 - MX6UL_PAD_ENET1_RX_EN__FLEXCAN2_TX 0x1b020 - >; - }; - - pinctrl_gpio_bl_on: gpio-bl-on-grp { - fsl,pins = < - MX6UL_PAD_JTAG_TMS__GPIO1_IO11 0x000a0 - >; - }; - pinctrl_gpmi_nand: gpmi-nand-grp { fsl,pins = < MX6UL_PAD_NAND_DATA00__RAWNAND_DATA00 0x100a9
@@ -553,7 +566,7 @@ >; }; - pinctrl_snvs_ad7879_int: snvs-ad7879-int { /* TOUCH Interrupt */ + pinctrl_snvs_ad7879_int: snvs-ad7879-int-grp { /* TOUCH Interrupt */ fsl,pins = < MX6ULL_PAD_SNVS_TAMPER7__GPIO5_IO07 0x1b0b0 >;
Signature · 1 line
2.20.1
PATCH v3 14/14 ARM: dts: colibri-imx6ull: update device tree
Quoted 8 lines
From: Marcel Ziswiler <[email protected]>
Fix compatible node to use regular Toradex notation.
Annotate device tree with standard Colibri pin muxing comments. Use open-drain I2C pin muxings.
Alphabetically re-order iomuxc nodes.
Rename snvs-ad7879-int-grp touch interrupt node as per Linux device tree.Signed-off-by Marcel Ziswiler <[email protected]>Reviewed-by Igor Opaniuk <[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 =====================================================================