imx: Extend PCL063 support for phyCORE-i.MX6ULL SOM
Subsystems (3)
PATCH 1/1 imx: Extend PCL063 support for phyCORE-i.MX6ULL SOM
Extend PHYTEC phyBOARD-i.MX6UL for phyCORE-i.MX6UL SoM (PCL063) with eMMC on SoM.
CPU: Freescale i.MX6ULL rev1.0 792 MHz (running at 396 MHz) CPU: Industrial temperature grade (-40C to 105C) at 38C Reset cause: POR Model: Phytec phyBOARD-i.MX6ULL-Segin SBC Board: PHYTEC phyCORE-i.MX6ULL DRAM: 256 MiB MMC: FSL_SDHC: 0, FSL_SDHC: 1 In: serial at 02020000 Out: serial at 02020000 Err: serial at 02020000 Net: FEC0
Working:
- Eth0
- i2C
- MMC/SD
- eMMC
- UART (1 & 5)
- USB (host & otg)
---
arch/arm/dts/Makefile | 1 +
arch/arm/dts/imx6ul-phycore-segin.dts | 3 +-
arch/arm/dts/imx6ull-phycore-segin.dts | 81 ++++++++++++
...{imx6ul-pcl063.dtsi => pcl063-common.dtsi} | 31 ++++-
arch/arm/mach-imx/mx6/Kconfig | 12 ++
board/phytec/pcl063/Kconfig | 13 ++
board/phytec/pcl063/MAINTAINERS | 6 +-
board/phytec/pcl063/pcl063.c | 5 +-
board/phytec/pcl063/spl.c | 76 +++++++++++-
configs/phycore_pcl063_ull_defconfig | 54 ++++++++
include/configs/pcl063_ull.h | 117 ++++++++++++++++++
11 files changed, 388 insertions(+), 11 deletions(-)
create mode 100644 arch/arm/dts/imx6ull-phycore-segin.dts
rename arch/arm/dts/{imx6ul-pcl063.dtsi => pcl063-common.dtsi} (84%)
create mode 100644 configs/phycore_pcl063_ull_defconfig
create mode 100644 include/configs/pcl063_ull.harch/arm/dts/Makefile +1 -0
@@ -539,6 +539,7 @@ dtb-$(CONFIG_MX6UL) += \ dtb-$(CONFIG_MX6ULL) += \ imx6ull-14x14-evk.dtb \ imx6ull-colibri.dtb \ + imx6ull-phycore-segin.dtb dtb-$(CONFIG_MX7) += imx7d-sdb.dtb \ imx7d-sdb-qspi.dtb \
arch/arm/dts/imx6ul-phycore-segin.dts +2 -1
@@ -16,7 +16,8 @@ /dts-v1/; -#include "imx6ul-pcl063.dtsi" +#include "imx6ul.dtsi" +#include "pcl063-common.dtsi" / { model = "Phytec phyBOARD-i.MX6UL-Segin SBC";
arch/arm/dts/imx6ull-phycore-segin.dts new file +81 -0
81 lines not on this page · raw message
arch/arm/dts/pcl063-common.dtsi renamed from arch/arm/dts/imx6ul-pcl063.dtsi +27 -4
@@ -7,10 +7,6 @@ * Author: Christian Hemp <[email protected]> */ -/dts-v1/; - -#include "imx6ul.dtsi" - / { model = "Phytec phyCORE-i.MX6 Ultra Lite SOM"; compatible = "phytec,imx6ul-pcl063", "fsl,imx6ul";
@@ -99,6 +95,18 @@ status = "okay"; }; +&usdhc2 { + u-boot,dm-spl; + u-boot,dm-pre-reloc; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_usdhc2>; + bus-width = <8>; + no-1-8-v; + non-removable; + keep-power-in-suspend; + status = "disabled"; +}; + &iomuxc { pinctrl-names = "default";
@@ -170,4 +178,19 @@ >; }; + + pinctrl_usdhc2: usdhc2grp { + fsl,pins = < + MX6UL_PAD_NAND_WE_B__USDHC2_CMD 0x170f9 + MX6UL_PAD_NAND_RE_B__USDHC2_CLK 0x100f9 + MX6UL_PAD_NAND_DATA00__USDHC2_DATA0 0x170f9 + MX6UL_PAD_NAND_DATA01__USDHC2_DATA1 0x170f9 + MX6UL_PAD_NAND_DATA02__USDHC2_DATA2 0x170f9 + MX6UL_PAD_NAND_DATA03__USDHC2_DATA3 0x170f9 + MX6UL_PAD_NAND_DATA04__USDHC2_DATA4 0x170f9 + MX6UL_PAD_NAND_DATA05__USDHC2_DATA5 0x170f9 + MX6UL_PAD_NAND_DATA06__USDHC2_DATA6 0x170f9 + MX6UL_PAD_NAND_DATA07__USDHC2_DATA7 0x170f9 + >; + }; };
arch/arm/mach-imx/mx6/Kconfig +12 -0
@@ -443,6 +443,18 @@ config TARGET_PCL063 select DM_THERMAL select SUPPORT_SPL +config TARGET_PCL063_ULL + bool "PHYTEC PCL063 (phyCORE-i.MX6ULL)" + select MX6ULL + select DM + select DM_ETH + select DM_GPIO + select DM_I2C + select DM_MMC + select DM_SERIAL + select DM_THERMAL + select SUPPORT_SPL + config TARGET_SECOMX6 bool "secomx6 boards"
board/phytec/pcl063/Kconfig +13 -0
@@ -10,3 +10,16 @@ config SYS_CONFIG_NAME default "pcl063" endif + +if TARGET_PCL063_ULL + +config SYS_BOARD + default "pcl063" + +config SYS_VENDOR + default "phytec" + +config SYS_CONFIG_NAME + default "pcl063_ull" + +endif
board/phytec/pcl063/MAINTAINERS +5 -1
@@ -1,8 +1,12 @@ PCL063 BOARD M: Martyn Welch <[email protected]> +M: Parthiban Nallathambi <[email protected]> S: Maintained -F: arch/arm/dts/imx6ul-pcl063.dtsi F: arch/arm/dts/imx6ul-phycore-segin.dts +F: arch/arm/dts/imx6ull-phycore-segin.dts +F: arch/arm/dts/pcl063-common.dtsi F: board/phytec/pcl063/ F: configs/phycore_pcl063_defconfig +F: configs/phycore_pcl063_ull_defconfig F: include/configs/pcl063.h +F: include/configs/pcl063_ull.h
board/phytec/pcl063/pcl063.c +4 -1
@@ -200,7 +200,10 @@ int board_init(void)int checkboard (void ) { -puts ("Board: PHYTEC phyCORE-i.MX6UL\n" ); +u32 cpurev =get_cpu_rev (); + +printf ("Board: PHYTEC phyCORE-i.MX%s\n" , +get_imx_type ((cpurev &0xFF000 ) >>12 ));return 0 ; }
board/phytec/pcl063/spl.c +72 -4
101 lines not on this page · raw message
configs/phycore_pcl063_ull_defconfig new file +54 -0
54 lines not on this page · raw message
include/configs/pcl063_ull.h new file +117 -0
117 lines not on this page · raw message
Signature · 1 line
2.17.2
PATCH 1/1 imx: Extend PCL063 support for phyCORE-i.MX6ULL SOM
Quoted 40 lines · Parthiban Nallathambi
board/phytec/pcl063/spl.c +1
-0@@ -13,6 +13,7 @@#include <asm/arch/mx6-ddr.h> #include <asm/arch/mx6-pins.h> #include <asm/arch/crm_regs.h> +#include <asm/arch/sys_proto.h> #include <fsl_esdhc.h> /* Configuration for Micron MT41K256M16TW-107 IT:P, 32M x 16 x 8 -> 256MiB */
board/phytec/pcl063/spl.c +10
-0@@ -117,11 +118,32 @@ static iomux_v3_cfg_t const usdhc1_pads[] = { MX6_PAD_UART1_RTS_B__USDHC1_CD_B | MUX_PAD_CTRL(USDHC_PAD_CTRL), }; +#ifndef CONFIG_NAND_MXS +static iomux_v3_cfg_t const usdhc2_pads[] = { + MX6_PAD_NAND_RE_B__USDHC2_CLK | MUX_PAD_CTRL(USDHC_PAD_CTRL), + MX6_PAD_NAND_WE_B__USDHC2_CMD | MUX_PAD_CTRL(USDHC_PAD_CTRL), + MX6_PAD_NAND_DATA00__USDHC2_DATA0 | MUX_PAD_CTRL(USDHC_PAD_CTRL), + MX6_PAD_NAND_DATA01__USDHC2_DATA1 | MUX_PAD_CTRL(USDHC_PAD_CTRL), + MX6_PAD_NAND_DATA02__USDHC2_DATA2 | MUX_PAD_CTRL(USDHC_PAD_CTRL), + MX6_PAD_NAND_DATA03__USDHC2_DATA3 | MUX_PAD_CTRL(USDHC_PAD_CTRL), + MX6_PAD_NAND_DATA04__USDHC2_DATA4 | MUX_PAD_CTRL(USDHC_PAD_CTRL), + MX6_PAD_NAND_DATA05__USDHC2_DATA5 |
MUX_PAD_CTRL(USDHC_PAD_CTRL),board/phytec/pcl063/spl.c +1
-0+ MX6_PAD_NAND_DATA06__USDHC2_DATA6 |
MUX_PAD_CTRL(USDHC_PAD_CTRL),board/phytec/pcl063/spl.c +1
-0+ MX6_PAD_NAND_DATA07__USDHC2_DATA7 |
MUX_PAD_CTRL(USDHC_PAD_CTRL),
board/phytec/pcl063/spl.c static iomux_v3_cfg_t const usdhc1_pads[] = { · line 135
Quoted 3 lines
board/phytec/pcl063/spl.c +3
-0+}; +#endif +
Umm, these pins are already used a few lines up for the NAND, via gpmi:
pinctrl_gpmi_nand: gpminandgrp {
fsl,pins = <
MX6UL_PAD_NAND_CLE__RAWNAND_CLE 0x0b0b1
MX6UL_PAD_NAND_ALE__RAWNAND_ALE 0x0b0b1
MX6UL_PAD_NAND_WP_B__RAWNAND_WP_B 0x0b0b1
MX6UL_PAD_NAND_READY_B__RAWNAND_READY_B 0x0b000
MX6UL_PAD_NAND_CE0_B__RAWNAND_CE0_B 0x0b0b1
MX6UL_PAD_NAND_RE_B__RAWNAND_RE_B 0x0b0b1
MX6UL_PAD_NAND_WE_B__RAWNAND_WE_B 0x0b0b1
MX6UL_PAD_NAND_DATA00__RAWNAND_DATA00 0x0b0b1
MX6UL_PAD_NAND_DATA01__RAWNAND_DATA01 0x0b0b1
MX6UL_PAD_NAND_DATA02__RAWNAND_DATA02 0x0b0b1
MX6UL_PAD_NAND_DATA03__RAWNAND_DATA03 0x0b0b1
MX6UL_PAD_NAND_DATA04__RAWNAND_DATA04 0x0b0b1
MX6UL_PAD_NAND_DATA05__RAWNAND_DATA05 0x0b0b1
MX6UL_PAD_NAND_DATA06__RAWNAND_DATA06 0x0b0b1
MX6UL_PAD_NAND_DATA07__RAWNAND_DATA07 0x0b0b1
>;
};Quoted 16 lines
static struct
fsl_esdhc_cfgusdhc_cfg[] = {board/phytec/pcl063/spl.c +6
-0{ .esdhc_base = USDHC1_BASE_ADDR, .max_bus_width = 4, }, +#ifndef CONFIG_NAND_MXS + { + .esdhc_base = USDHC2_BASE_ADDR, + .max_bus_width = 8, + }, +#endif }; int board_mmc_getcd(struct mmc *mmc)@@ -131,12 +153,58 @@ int board_mmc_getcd(struct mmc *mmc)
board/phytec/pcl063/spl.c int board_mmc_getcd(struct mmc *mmc) · line 159
Quoted 10 lines
board/phytec/pcl063/spl.c +3
-4int board_mmc_init (bd_t *bis) { -imx_iomux_v3_setup_multiple_pads (usdhc1_pads, ARRAY_SIZE(usdhc1_pads)); - usdhc_cfg[0 ].sdhc_clk =mxc_get_clock (MXC_ESDHC_CLK ); - -return fsl_esdhc_initialize (bis, &usdhc_cfg[0 ]); +int i, ret; + +for (i =0 ; i <CONFIG_SYS_FSL_USDHC_NUM ; i++) {
This breaks for the existing phycore_pcl063_defconfig:
board/phytec/pcl063/spl.c: In function ‘board_mmc_init’:board/phytec/pcl063/spl.c:158:18: error: ‘CONFIG_SYS_FSL_USDHC_NUM’ undeclared (first use in this function); did you mean ‘CONFIG_SYS_FSL_ESDHC_ADDR’?
for (i = 0; i < CONFIG_SYS_FSL_USDHC_NUM; i++) {
^~~~~~~~~~~~~~~~~~~~~~~~Martyn
PATCH 1/1 imx: Extend PCL063 support for phyCORE-i.MX6ULL SOM
Hello Martyn,
Quoted 38 lines · Martyn Welch
Quoted 37 lines · Parthiban Nallathambi
board/phytec/pcl063/spl.c +1
-0@@ -13,6 +13,7 @@#include <asm/arch/mx6-ddr.h> #include <asm/arch/mx6-pins.h> #include <asm/arch/crm_regs.h> +#include <asm/arch/sys_proto.h> #include <fsl_esdhc.h> /* Configuration for Micron MT41K256M16TW-107 IT:P, 32M x 16 x 8 -> 256MiB */
board/phytec/pcl063/spl.c +10
-0@@ -117,11 +118,32 @@ static iomux_v3_cfg_t const usdhc1_pads[] = { MX6_PAD_UART1_RTS_B__USDHC1_CD_B | MUX_PAD_CTRL(USDHC_PAD_CTRL), }; +#ifndef CONFIG_NAND_MXS +static iomux_v3_cfg_t const usdhc2_pads[] = { + MX6_PAD_NAND_RE_B__USDHC2_CLK | MUX_PAD_CTRL(USDHC_PAD_CTRL), + MX6_PAD_NAND_WE_B__USDHC2_CMD | MUX_PAD_CTRL(USDHC_PAD_CTRL), + MX6_PAD_NAND_DATA00__USDHC2_DATA0 | MUX_PAD_CTRL(USDHC_PAD_CTRL), + MX6_PAD_NAND_DATA01__USDHC2_DATA1 | MUX_PAD_CTRL(USDHC_PAD_CTRL), + MX6_PAD_NAND_DATA02__USDHC2_DATA2 | MUX_PAD_CTRL(USDHC_PAD_CTRL), + MX6_PAD_NAND_DATA03__USDHC2_DATA3 | MUX_PAD_CTRL(USDHC_PAD_CTRL), + MX6_PAD_NAND_DATA04__USDHC2_DATA4 | MUX_PAD_CTRL(USDHC_PAD_CTRL), + MX6_PAD_NAND_DATA05__USDHC2_DATA5 |
MUX_PAD_CTRL(USDHC_PAD_CTRL),board/phytec/pcl063/spl.c +1
-0+ MX6_PAD_NAND_DATA06__USDHC2_DATA6 |
Quoted 8 lines
board/phytec/pcl063/spl.c static iomux_v3_cfg_t const usdhc1_pads[] = { · line 135
Quoted 6 lines
MUX_PAD_CTRL(USDHC_PAD_CTRL),board/phytec/pcl063/spl.c +1
-0+ MX6_PAD_NAND_DATA07__USDHC2_DATA7 |
MUX_PAD_CTRL(USDHC_PAD_CTRL),board/phytec/pcl063/spl.c +3
-0+}; +#endif +Umm, these pins are already used a few lines up for the NAND, via gpmi:
I understand. But pcl063 can't co-exit with NAND and eMMC together. I comes either with eMMC or NAND.
Quoted 37 lines
pinctrl_gpmi_nand: gpminandgrp { fsl,pins = < MX6UL_PAD_NAND_CLE__RAWNAND_CLE 0x0b0b1 MX6UL_PAD_NAND_ALE__RAWNAND_ALE 0x0b0b1 MX6UL_PAD_NAND_WP_B__RAWNAND_WP_B 0x0b0b1 MX6UL_PAD_NAND_READY_B__RAWNAND_READY_B 0x0b000 MX6UL_PAD_NAND_CE0_B__RAWNAND_CE0_B 0x0b0b1 MX6UL_PAD_NAND_RE_B__RAWNAND_RE_B 0x0b0b1 MX6UL_PAD_NAND_WE_B__RAWNAND_WE_B 0x0b0b1 MX6UL_PAD_NAND_DATA00__RAWNAND_DATA00 0x0b0b1 MX6UL_PAD_NAND_DATA01__RAWNAND_DATA01 0x0b0b1 MX6UL_PAD_NAND_DATA02__RAWNAND_DATA02 0x0b0b1 MX6UL_PAD_NAND_DATA03__RAWNAND_DATA03 0x0b0b1 MX6UL_PAD_NAND_DATA04__RAWNAND_DATA04 0x0b0b1 MX6UL_PAD_NAND_DATA05__RAWNAND_DATA05 0x0b0b1 MX6UL_PAD_NAND_DATA06__RAWNAND_DATA06 0x0b0b1 MX6UL_PAD_NAND_DATA07__RAWNAND_DATA07 0x0b0b1 >; };Quoted 16 lines
static struct
fsl_esdhc_cfgusdhc_cfg[] = {board/phytec/pcl063/spl.c +6
-0{ .esdhc_base = USDHC1_BASE_ADDR, .max_bus_width = 4, }, +#ifndef CONFIG_NAND_MXS + { + .esdhc_base = USDHC2_BASE_ADDR, + .max_bus_width = 8, + }, +#endif }; int board_mmc_getcd(struct mmc *mmc)@@ -131,12 +153,58 @@ int board_mmc_getcd(struct mmc *mmc)
Quoted 12 lines
board/phytec/pcl063/spl.c int board_mmc_getcd(struct mmc *mmc) · line 158
Quoted 10 lines
board/phytec/pcl063/spl.c +3
-4int board_mmc_init (bd_t *bis) { -imx_iomux_v3_setup_multiple_pads (usdhc1_pads, ARRAY_SIZE(usdhc1_pads)); - usdhc_cfg[0 ].sdhc_clk =mxc_get_clock (MXC_ESDHC_CLK ); - -return fsl_esdhc_initialize (bis, &usdhc_cfg[0 ]); +int i, ret; + +for (i =0 ; i <CONFIG_SYS_FSL_USDHC_NUM ; i++) {This breaks for the existing
phycore_pcl063_defconfig:
Ah, I missed it. I will add CONFIG_SYS_FSL_USDHC_NUM to 1 in phycore_pcl063_defconfig.
Thanks,
Parthiban N
Quoted 11 lines
board/phytec/pcl063/spl.c: In function ‘board_mmc_init’:board/phytec/pcl063/spl.c:158:18: error: ‘CONFIG_SYS_FSL_USDHC_NUM’ undeclared (first use in this function); did you mean ‘CONFIG_SYS_FSL_ESDHC_ADDR’?for (i = 0; i < CONFIG_SYS_FSL_USDHC_NUM; i++) { ^~~~~~~~~~~~~~~~~~~~~~~~Martyn
PATCH 1/1 imx: Extend PCL063 support for phyCORE-i.MX6ULL SOM
Quoted 54 lines · Parthiban
Hello Martyn,
Quoted 42 lines · Martyn Welch
Quoted 41 lines · Parthiban Nallathambi
board/phytec/pcl063/spl.c +1
-1@@ -13,6 +13,7 @@#include <asm/arch/mx6-ddr.h> #include <asm/arch/mx6-pins.h> #include <asm/arch/crm_regs.h> +#include <asm/arch/sys_proto.h> #include <fsl_esdhc.h> /* Configuration for Micron MT41K256M16TW-107 IT:P, 32M x 16 x 8 -> 256MiB */
board/phytec/pcl063/spl.c +9
-0@@ -117,11 +118,32 @@ static iomux_v3_cfg_t const usdhc1_pads[] = { MX6_PAD_UART1_RTS_B__USDHC1_CD_B | MUX_PAD_CTRL(USDHC_PAD_CTRL), }; +#ifndef CONFIG_NAND_MXS +static iomux_v3_cfg_t const usdhc2_pads[] = { + MX6_PAD_NAND_RE_B__USDHC2_CLK | MUX_PAD_CTRL(USDHC_PAD_CTRL), + MX6_PAD_NAND_WE_B__USDHC2_CMD | MUX_PAD_CTRL(USDHC_PAD_CTRL), + MX6_PAD_NAND_DATA00__USDHC2_DATA0 | MUX_PAD_CTRL(USDHC_PAD_CTRL), + MX6_PAD_NAND_DATA01__USDHC2_DATA1 | MUX_PAD_CTRL(USDHC_PAD_CTRL), + MX6_PAD_NAND_DATA02__USDHC2_DATA2 | MUX_PAD_CTRL(USDHC_PAD_CTRL), + MX6_PAD_NAND_DATA03__USDHC2_DATA3 | MUX_PAD_CTRL(USDHC_PAD_CTRL), + MX6_PAD_NAND_DATA04__USDHC2_DATA4 |
MUX_PAD_CTRL(USDHC_PAD_CTRL),board/phytec/pcl063/spl.c +1
-0+ MX6_PAD_NAND_DATA05__USDHC2_DATA5 |
MUX_PAD_CTRL(USDHC_PAD_CTRL),board/phytec/pcl063/spl.c +1
-0+ MX6_PAD_NAND_DATA06__USDHC2_DATA6 |
MUX_PAD_CTRL(USDHC_PAD_CTRL),Quoted 8 lines
board/phytec/pcl063/spl.c static iomux_v3_cfg_t const usdhc1_pads[] = { · line 135
Quoted 5 lines
board/phytec/pcl063/spl.c +1
-0+ MX6_PAD_NAND_DATA07__USDHC2_DATA7 |
MUX_PAD_CTRL(USDHC_PAD_CTRL),board/phytec/pcl063/spl.c +3
-0+}; +#endif +Umm, these pins are already used a few lines up for the NAND, via gpmi:
Quoted 3 lines
I understand. But pcl063 can't co-exit with NAND and eMMC together. I comes
either with eMMC or NAND.
Opps, sorry, just realised that I added this comment in the wrong place. This is in relation to the following being added to pcl063-common.dtsi:
+
+ pinctrl_usdhc2: usdhc2grp {
+ fsl,pins = <
+ MX6UL_PAD_NAND_WE_B__USDHC2_CMD 0x170f9 + MX6UL_PAD_NAND_RE_B__USDHC2_CLK 0x100f9 + MX6UL_PAD_NAND_DATA00__USDHC2_DATA0 0x170f9 + MX6UL_PAD_NAND_DATA01__USDHC2_DATA1 0x170f9 + MX6UL_PAD_NAND_DATA02__USDHC2_DATA2 0x170f9 + MX6UL_PAD_NAND_DATA03__USDHC2_DATA3 0x170f9 + MX6UL_PAD_NAND_DATA04__USDHC2_DATA4 0x170f9 + MX6UL_PAD_NAND_DATA05__USDHC2_DATA5 0x170f9 + MX6UL_PAD_NAND_DATA06__USDHC2_DATA6 0x170f9 + MX6UL_PAD_NAND_DATA07__USDHC2_DATA7 0x170f9
+ >;
+ };
If there exists pcl063 modules that have eMMC and others that have NAND using the same pins, then this configuration is not common and therefore shouldn't be in pcl063-common.dtsi. Is it dependent on the flavour of i.MX used? If so I'd suggest the gpmi config needs to be pulled out into imx6ul-phycore-segin.dts and the usdhc2 config needs to be in imx6ull-phycore-segin.dts.
Quoted 85 lines
Quoted 52 lines
pinctrl_gpmi_nand: gpminandgrp { fsl,pins = < MX6UL_PAD_NAND_CLE__RAWNAND_CLE 0x0 b0b1 MX6UL_PAD_NAND_ALE__RAWNAND_ALE 0x0 b0b1 MX6UL_PAD_NAND_WP_B__RAWNAND_WP_B 0x0 b0b1 MX6UL_PAD_NAND_READY_B__RAWNAND_READY_B 0x0b000 MX6UL_PAD_NAND_CE0_B__RAWNAND_CE0_B 0x0 b0b1 MX6UL_PAD_NAND_RE_B__RAWNAND_RE_B 0x0 b0b1 MX6UL_PAD_NAND_WE_B__RAWNAND_WE_B 0x0 b0b1 MX6UL_PAD_NAND_DATA00__RAWNAND_DATA00 0x0 b0b1 MX6UL_PAD_NAND_DATA01__RAWNAND_DATA01 0x0 b0b1 MX6UL_PAD_NAND_DATA02__RAWNAND_DATA02 0x0 b0b1 MX6UL_PAD_NAND_DATA03__RAWNAND_DATA03 0x0 b0b1 MX6UL_PAD_NAND_DATA04__RAWNAND_DATA04 0x0 b0b1 MX6UL_PAD_NAND_DATA05__RAWNAND_DATA05 0x0 b0b1 MX6UL_PAD_NAND_DATA06__RAWNAND_DATA06 0x0 b0b1 MX6UL_PAD_NAND_DATA07__RAWNAND_DATA07 0x0 b0b1 >; };Quoted 16 lines
static struct
fsl_esdhc_cfgusdhc_cfg[] = {board/phytec/pcl063/spl.c +6
-0{ .esdhc_base = USDHC1_BASE_ADDR, .max_bus_width = 4, }, +#ifndef CONFIG_NAND_MXS + { + .esdhc_base = USDHC2_BASE_ADDR, + .max_bus_width = 8, + }, +#endif }; int board_mmc_getcd(struct mmc *mmc)@@ -131,12 +153,58 @@ int board_mmc_getcd(struct mmc *mmc)Quoted 12 lines
board/phytec/pcl063/spl.c int board_mmc_getcd(struct mmc *mmc) · line 158
Quoted 10 lines
board/phytec/pcl063/spl.c +3
-4int board_mmc_init (bd_t *bis) { -imx_iomux_v3_setup_multiple_pads (usdhc1_pads, ARRAY_SIZE(usdhc1_pads)); - usdhc_cfg[0 ].sdhc_clk =mxc_get_clock (MXC_ESDHC_CLK ); - -return fsl_esdhc_initialize (bis, &usdhc_cfg[0 ]); +int i, ret; + +for (i =0 ; i <CONFIG_SYS_FSL_USDHC_NUM ; i++) {This breaks for the existing
phycore_pcl063_defconfig:Ah, I missed it. I will add
CONFIG_SYS_FSL_USDHC_NUMto 1 inphycore_pcl063_defconfig.Thanks,
Parthiban NQuoted 10 lines
board/phytec/pcl063/spl.c: In function ‘board_mmc_init’:board/phytec/pcl063/spl.c:158:18: error: ‘CONFIG_SYS_FSL_USDHC_NUM’ undeclared (first use in this function); did you mean ‘CONFIG_SYS_FSL_ESDHC_ADDR’?for (i = 0; i < CONFIG_SYS_FSL_USDHC_NUM; i++) { ^~~~~~~~~~~~~~~~~~~~~~~~Martyn
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
https://lists.denx.de/listinfo/u-boot
PATCH 1/1 imx: Extend PCL063 support for phyCORE-i.MX6ULL SOM
Hello Martyn,
Quoted 79 lines · Martyn Welch
Quoted 54 lines · Parthiban
Hello Martyn,
Quoted 42 lines · Martyn Welch
Quoted 41 lines · Parthiban Nallathambi
board/phytec/pcl063/spl.c +1
-1@@ -13,6 +13,7 @@#include <asm/arch/mx6-ddr.h> #include <asm/arch/mx6-pins.h> #include <asm/arch/crm_regs.h> +#include <asm/arch/sys_proto.h> #include <fsl_esdhc.h> /* Configuration for Micron MT41K256M16TW-107 IT:P, 32M x 16 x 8 -> 256MiB */
board/phytec/pcl063/spl.c +9
-0@@ -117,11 +118,32 @@ static iomux_v3_cfg_t const usdhc1_pads[] = { MX6_PAD_UART1_RTS_B__USDHC1_CD_B | MUX_PAD_CTRL(USDHC_PAD_CTRL), }; +#ifndef CONFIG_NAND_MXS +static iomux_v3_cfg_t const usdhc2_pads[] = { + MX6_PAD_NAND_RE_B__USDHC2_CLK | MUX_PAD_CTRL(USDHC_PAD_CTRL), + MX6_PAD_NAND_WE_B__USDHC2_CMD | MUX_PAD_CTRL(USDHC_PAD_CTRL), + MX6_PAD_NAND_DATA00__USDHC2_DATA0 | MUX_PAD_CTRL(USDHC_PAD_CTRL), + MX6_PAD_NAND_DATA01__USDHC2_DATA1 | MUX_PAD_CTRL(USDHC_PAD_CTRL), + MX6_PAD_NAND_DATA02__USDHC2_DATA2 | MUX_PAD_CTRL(USDHC_PAD_CTRL), + MX6_PAD_NAND_DATA03__USDHC2_DATA3 | MUX_PAD_CTRL(USDHC_PAD_CTRL), + MX6_PAD_NAND_DATA04__USDHC2_DATA4 |
MUX_PAD_CTRL(USDHC_PAD_CTRL),board/phytec/pcl063/spl.c +1
-0+ MX6_PAD_NAND_DATA05__USDHC2_DATA5 |
MUX_PAD_CTRL(USDHC_PAD_CTRL),board/phytec/pcl063/spl.c +1
-0+ MX6_PAD_NAND_DATA06__USDHC2_DATA6 |
MUX_PAD_CTRL(USDHC_PAD_CTRL),Quoted 8 lines
board/phytec/pcl063/spl.c static iomux_v3_cfg_t const usdhc1_pads[] = { · line 135
Quoted 5 lines
board/phytec/pcl063/spl.c +1
-0+ MX6_PAD_NAND_DATA07__USDHC2_DATA7 |
MUX_PAD_CTRL(USDHC_PAD_CTRL),board/phytec/pcl063/spl.c +3
-0+}; +#endif +Umm, these pins are already used a few lines up for the NAND, via gpmi:
Quoted 3 lines
I understand. But pcl063 can't co-exit with NAND and eMMC together. I comes
either with eMMC or NAND.Opps, sorry, just realised that I added this comment in the wrong place. This is in relation to the following being added to
pcl063-common.dtsi:arch/arm/dts/pcl063-common.dtsi renamed from arch/arm/dts/imx6ul-pcl063.dtsi +15
-0+ + pinctrl_usdhc2: usdhc2grp { + fsl,pins = < + MX6UL_PAD_NAND_WE_B__USDHC2_CMD 0x170f9 + MX6UL_PAD_NAND_RE_B__USDHC2_CLK 0x100f9 + MX6UL_PAD_NAND_DATA00__USDHC2_DATA0 0x170f9 + MX6UL_PAD_NAND_DATA01__USDHC2_DATA1 0x170f9 + MX6UL_PAD_NAND_DATA02__USDHC2_DATA2 0x170f9 + MX6UL_PAD_NAND_DATA03__USDHC2_DATA3 0x170f9 + MX6UL_PAD_NAND_DATA04__USDHC2_DATA4 0x170f9 + MX6UL_PAD_NAND_DATA05__USDHC2_DATA5 0x170f9 + MX6UL_PAD_NAND_DATA06__USDHC2_DATA6 0x170f9 + MX6UL_PAD_NAND_DATA07__USDHC2_DATA7 0x170f9 + >; + };
Quoted 6 lines
If there exists pcl063 modules that have eMMC and others that have NAND using the same pins, then this configuration is not common and therefore shouldn't be in
pcl063-common.dtsi. Is it dependent on the flavour of i.MX used? If so I'd suggest the gpmi config needs to be pulled out intoimx6ul-phycore-segin.dtsand the usdhc2 config needs to be inimx6ull-phycore-segin.dts.
From phytec I understand that pcl063 SoM is a common platform for imx6UL
and imx6ULL. This can either be shipped with eMMC or NAND, but not both.
So there exist a possibility that phytec can provide imx6UL with eMMC as well. IMO, both pinmux detailing for NAND and eMMC should still reside in common.dtsi.
Creating multiple common.dtsi based on these variants is not friendly. So I suggest to keep these changes in common.dtsi as such and decide in board dts whether to enable or disable usdhc1, usdhc2 explicitly.
Quoted 87 lines
Quoted 86 lines
Quoted 53 lines
pinctrl_gpmi_nand: gpminandgrp { fsl,pins = < MX6UL_PAD_NAND_CLE__RAWNAND_CLE 0x0 b0b1 MX6UL_PAD_NAND_ALE__RAWNAND_ALE 0x0 b0b1 MX6UL_PAD_NAND_WP_B__RAWNAND_WP_B 0x0 b0b1 MX6UL_PAD_NAND_READY_B__RAWNAND_READY_B 0x0b000 MX6UL_PAD_NAND_CE0_B__RAWNAND_CE0_B 0x0 b0b1 MX6UL_PAD_NAND_RE_B__RAWNAND_RE_B 0x0 b0b1 MX6UL_PAD_NAND_WE_B__RAWNAND_WE_B 0x0 b0b1 MX6UL_PAD_NAND_DATA00__RAWNAND_DATA00 0x0 b0b1 MX6UL_PAD_NAND_DATA01__RAWNAND_DATA01 0x0 b0b1 MX6UL_PAD_NAND_DATA02__RAWNAND_DATA02 0x0 b0b1 MX6UL_PAD_NAND_DATA03__RAWNAND_DATA03 0x0 b0b1 MX6UL_PAD_NAND_DATA04__RAWNAND_DATA04 0x0 b0b1 MX6UL_PAD_NAND_DATA05__RAWNAND_DATA05 0x0 b0b1 MX6UL_PAD_NAND_DATA06__RAWNAND_DATA06 0x0 b0b1 MX6UL_PAD_NAND_DATA07__RAWNAND_DATA07 0x0 b0b1 >; };Quoted 16 lines
static struct fsl_esdhc_cfg usdhc_cfg[] = { { .esdhc_base = USDHC1_BASE_ADDR, .max_bus_width = 4, },board/phytec/pcl063/spl.c +6
-0+#ifndef CONFIG_NAND_MXS + { + .esdhc_base = USDHC2_BASE_ADDR, + .max_bus_width = 8, + }, +#endif };int board_mmc_getcd (struct mmc *mmc)@@ -131,12 +153,58 @@ int board_mmc_getcd(struct mmc *mmc)Quoted 12 lines
board/phytec/pcl063/spl.c int board_mmc_getcd(struct mmc *mmc) · line 158
Quoted 10 lines
board/phytec/pcl063/spl.c +3
-4int board_mmc_init (bd_t *bis) { -imx_iomux_v3_setup_multiple_pads (usdhc1_pads, ARRAY_SIZE(usdhc1_pads)); - usdhc_cfg[0 ].sdhc_clk =mxc_get_clock (MXC_ESDHC_CLK ); - -return fsl_esdhc_initialize (bis, &usdhc_cfg[0 ]); +int i, ret; + +for (i =0 ; i <CONFIG_SYS_FSL_USDHC_NUM ; i++) {This breaks for the existing
phycore_pcl063_defconfig:Ah, I missed it. I will add
CONFIG_SYS_FSL_USDHC_NUMto 1 inphycore_pcl063_defconfig.Thanks,
Parthiban NQuoted 10 lines
board/phytec/pcl063/spl.c: In function ‘board_mmc_init’:board/phytec/pcl063/spl.c:158:18: error: ‘CONFIG_SYS_FSL_USDHC_NUM’ undeclared (first use in this function); did you mean ‘CONFIG_SYS_FSL_ESDHC_ADDR’?for (i = 0; i < CONFIG_SYS_FSL_USDHC_NUM; i++) { ^~~~~~~~~~~~~~~~~~~~~~~~Martyn
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
https://lists.denx.de/listinfo/u-boot
PATCH 1/1 imx: Extend PCL063 support for phyCORE-i.MX6ULL SOM
Quoted 106 lines · Parthiban Nallathambi
Hello Martyn,
Quoted 93 lines · Martyn Welch
Quoted 57 lines · Parthiban
Hello Martyn,
Quoted 45 lines · Martyn Welch
Quoted 44 lines · Parthiban Nallathambi
board/phytec/pcl063/spl.c +1
-0@@ -13,6 +13,7 @@#include <asm/arch/mx6-ddr.h> #include <asm/arch/mx6-pins.h> #include <asm/arch/crm_regs.h> +#include <asm/arch/sys_proto.h> #include <fsl_esdhc.h> /* Configuration for Micron MT41K256M16TW-107 IT:P, 32M x 16 x 8
->
256MiB */board/phytec/pcl063/spl.c +0
-0@@ -117,11 +118,32 @@ static iomux_v3_cfg_t constusdhc1_pads[] =
{
MX6_PAD_UART1_RTS_B__USDHC1_CD_B|MUX_PAD_CTRL(USDHC_PAD_CTRL),
};board/phytec/pcl063/spl.c +3
-0+#ifndef CONFIG_NAND_MXS +static iomux_v3_cfg_t const usdhc2_pads[] = { + MX6_PAD_NAND_RE_B__USDHC2_CLK |
MUX_PAD_CTRL(USDHC_PAD_CTRL),board/phytec/pcl063/spl.c +1
-0+ MX6_PAD_NAND_WE_B__USDHC2_CMD |
MUX_PAD_CTRL(USDHC_PAD_CTRL),board/phytec/pcl063/spl.c +1
-0+ MX6_PAD_NAND_DATA00__USDHC2_DATA0 |
MUX_PAD_CTRL(USDHC_PAD_CTRL),board/phytec/pcl063/spl.c +1
-0+ MX6_PAD_NAND_DATA01__USDHC2_DATA1 |
MUX_PAD_CTRL(USDHC_PAD_CTRL),board/phytec/pcl063/spl.c +1
-0+ MX6_PAD_NAND_DATA02__USDHC2_DATA2 |
MUX_PAD_CTRL(USDHC_PAD_CTRL),board/phytec/pcl063/spl.c +1
-0+ MX6_PAD_NAND_DATA03__USDHC2_DATA3 |
MUX_PAD_CTRL(USDHC_PAD_CTRL),board/phytec/pcl063/spl.c +1
-0+ MX6_PAD_NAND_DATA04__USDHC2_DATA4 |
MUX_PAD_CTRL(USDHC_PAD_CTRL),board/phytec/pcl063/spl.c +1
-0+ MX6_PAD_NAND_DATA05__USDHC2_DATA5 |
MUX_PAD_CTRL(USDHC_PAD_CTRL),board/phytec/pcl063/spl.c +1
-0+ MX6_PAD_NAND_DATA06__USDHC2_DATA6 |
MUX_PAD_CTRL(USDHC_PAD_CTRL),board/phytec/pcl063/spl.c +1
-0+ MX6_PAD_NAND_DATA07__USDHC2_DATA7 |Quoted 8 lines
board/phytec/pcl063/spl.c static iomux_v3_cfg_t const usdhc1_pads[] = { · line 135
Quoted 4 lines
MUX_PAD_CTRL(USDHC_PAD_CTRL),board/phytec/pcl063/spl.c +3
-0+}; +#endif +Umm, these pins are already used a few lines up for the NAND, via
gpmi:Quoted 4 lines
I understand. But pcl063 can't co-exit with NAND and eMMC together. I
comes
either with eMMC or NAND.Opps, sorry, just realised that I added this comment in the wrong place. This is in relation to the following being added to
pcl063-common.dtsi:arch/arm/dts/pcl063-common.dtsi renamed from arch/arm/dts/imx6ul-pcl063.dtsi +4
-0+ + pinctrl_usdhc2: usdhc2grp { + fsl,pins = < + MX6UL_PAD_NAND_WE_B__USDHC2_CMD 0x170f9
+MX6UL_PAD_NAND_RE_B__USDHC2_CLK0x1
00f9
+MX6UL_PAD_NAND_DATA00__USDHC2_DATA00x1
70f9
+MX6UL_PAD_NAND_DATA01__USDHC2_DATA10x1
70f9
+MX6UL_PAD_NAND_DATA02__USDHC2_DATA20x1
70f9
+MX6UL_PAD_NAND_DATA03__USDHC2_DATA30x1
70f9
+MX6UL_PAD_NAND_DATA04__USDHC2_DATA40x1
70f9
+MX6UL_PAD_NAND_DATA05__USDHC2_DATA50x1
70f9
+MX6UL_PAD_NAND_DATA06__USDHC2_DATA60x1
70f9
+MX6UL_PAD_NAND_DATA07__USDHC2_DATA70x1
70f9(quoted diff) +2
-0+ >; + };Quoted 9 lines
If there exists pcl063 modules that have eMMC and others that have NAND
using the same pins, then this configuration is not common and therefore shouldn't be inpcl063-common.dtsi. Is it dependent on the
flavour of i.MX used? If so I'd suggest the gpmi config needs to be pulled out intoimx6ul-phycore-segin.dtsand the usdhc2 config needs to
be inimx6ull-phycore-segin.dts.
Quoted 5 lines
From phytec I understand that pcl063 SoM is a common platform for
imx6UL
and imx6ULL. This can either be shipped with eMMC or NAND, but not both.
Looking a bit deeper, this seems a little odd as the product description suggests that NAND is provided onboard and 2 SD/SDIO/MMC connections are provided to the edge connector of the pcl063 for expansion.
The schematic suggests the only way they could achieve eMMC onboard would be with an eMMC that is pin compatible with the NAND they use.
Additionally, looking at the DTBs for this board in Phytec's own kernel tree, the only use of usdhc2 that I can see is for their WLAN expansion board[1] and I would have expected their tree to have supported such an option if it was available (they seem to have gone to some length to support a lot of configurations there).
Are you sure that the eMMC is provided on the pcl063 and not off board?
(CCing Wadim who might be able to shed some light on this)
Quoted 6 lines
So there exist a possibility that phytec can provide imx6UL with eMMC as
well. IMO, both pinmux detailing for NAND and eMMC should still reside
incommon.dtsi.
Assuming Phytec do in fact sell a pcl0063 with eMMC on board, the DTB describes the hardware. You've said Phytec provide the board either with eMMC *or* NAND. The device tree, as used on a specific board, should show either the existence of NAND or eMMC.
I suspect having both options in the common file is going to lead to issues with the pinmuxing for one or the other option. The pins can't be muxed for both simultaneously, hence these need to be described in separate files.
Quoted 5 lines
Creating multiple
common.dtsibased on these variants is not friendly.
So I suggest to keep these changes incommon.dtsias such and decide in
board dts whether to enable or disable usdhc1, usdhc2 explicitly.
This isn't about the selection of usdhc1 or usdhc2, it's whether gpmi or usdhc2 is using the pins of the SOC.
Martyn
Quoted 50 lines
Quoted 50 lines
Quoted 50 lines
Quoted 50 lines
pinctrl_gpmi_nand: gpminandgrp {
fsl,pins = <
MX6UL_PAD_NAND_CLE__RAWNAND_CLE
0x0
b0b1
MX6UL_PAD_NAND_ALE__RAWNAND_ALE
0x0
b0b1MX6UL_PAD_NAND_WP_B__RAWNAND_WP_B
0x0
b0b1
MX6UL_PAD_NAND_READY_B__RAWNAND_READY_
B0x0b000MX6UL_PAD_NAND_CE0_B__RAWNAND_CE0_B 0x0 b0b1 MX6UL_PAD_NAND_RE_B__RAWNAND_RE_B 0x0 b0b1 MX6UL_PAD_NAND_WE_B__RAWNAND_WE_B 0x0 b0b1 MX6UL_PAD_NAND_DATA00__RAWNAND_DATA00 0x0 b0b1 MX6UL_PAD_NAND_DATA01__RAWNAND_DATA01 0x0 b0b1 MX6UL_PAD_NAND_DATA02__RAWNAND_DATA02 0x0 b0b1 MX6UL_PAD_NAND_DATA03__RAWNAND_DATA03 0x0 b0b1 MX6UL_PAD_NAND_DATA04__RAWNAND_DATA04 0x0 b0b1 MX6UL_PAD_NAND_DATA05__RAWNAND_DATA05 0x0 b0b1 MX6UL_PAD_NAND_DATA06__RAWNAND_DATA06 0x0 b0b1 MX6UL_PAD_NAND_DATA07__RAWNAND_DATA07 0x0 b0b1 >; };
PATCH 1/1 imx: Extend PCL063 support for phyCORE-i.MX6ULL SOM
Hello Martyn,
Quoted 121 lines · Martyn Welch
Quoted 106 lines · Parthiban Nallathambi
Hello Martyn,
Quoted 93 lines · Martyn Welch
Quoted 57 lines · Parthiban
Hello Martyn,
Quoted 45 lines · Martyn Welch
Quoted 44 lines · Parthiban Nallathambi
board/phytec/pcl063/spl.c +1
-0@@ -13,6 +13,7 @@#include <asm/arch/mx6-ddr.h> #include <asm/arch/mx6-pins.h> #include <asm/arch/crm_regs.h> +#include <asm/arch/sys_proto.h> #include <fsl_esdhc.h> /* Configuration for Micron MT41K256M16TW-107 IT:P, 32M x 16 x 8
->
256MiB */board/phytec/pcl063/spl.c +0
-0@@ -117,11 +118,32 @@ static iomux_v3_cfg_t constusdhc1_pads[] =
{ MX6_PAD_UART1_RTS_B__USDHC1_CD_B |
MUX_PAD_CTRL(USDHC_PAD_CTRL),
};board/phytec/pcl063/spl.c +3
-0+#ifndef CONFIG_NAND_MXS +static iomux_v3_cfg_t const usdhc2_pads[] = { + MX6_PAD_NAND_RE_B__USDHC2_CLK |
MUX_PAD_CTRL(USDHC_PAD_CTRL),board/phytec/pcl063/spl.c +1
-0+ MX6_PAD_NAND_WE_B__USDHC2_CMD |
MUX_PAD_CTRL(USDHC_PAD_CTRL),board/phytec/pcl063/spl.c +1
-0+ MX6_PAD_NAND_DATA00__USDHC2_DATA0 |
MUX_PAD_CTRL(USDHC_PAD_CTRL),board/phytec/pcl063/spl.c +1
-0+ MX6_PAD_NAND_DATA01__USDHC2_DATA1 |
MUX_PAD_CTRL(USDHC_PAD_CTRL),board/phytec/pcl063/spl.c +1
-0+ MX6_PAD_NAND_DATA02__USDHC2_DATA2 |
MUX_PAD_CTRL(USDHC_PAD_CTRL),board/phytec/pcl063/spl.c +1
-0+ MX6_PAD_NAND_DATA03__USDHC2_DATA3 |
MUX_PAD_CTRL(USDHC_PAD_CTRL),board/phytec/pcl063/spl.c +1
-0+ MX6_PAD_NAND_DATA04__USDHC2_DATA4 |
MUX_PAD_CTRL(USDHC_PAD_CTRL),board/phytec/pcl063/spl.c +1
-0+ MX6_PAD_NAND_DATA05__USDHC2_DATA5 |
MUX_PAD_CTRL(USDHC_PAD_CTRL),board/phytec/pcl063/spl.c +1
-0+ MX6_PAD_NAND_DATA06__USDHC2_DATA6 |
MUX_PAD_CTRL(USDHC_PAD_CTRL),board/phytec/pcl063/spl.c +1
-0+ MX6_PAD_NAND_DATA07__USDHC2_DATA7 |Quoted 8 lines
board/phytec/pcl063/spl.c static iomux_v3_cfg_t const usdhc1_pads[] = { · line 135
Quoted 4 lines
MUX_PAD_CTRL(USDHC_PAD_CTRL),board/phytec/pcl063/spl.c +3
-0+}; +#endif +Umm, these pins are already used a few lines up for the NAND, via
gpmi:Quoted 4 lines
I understand. But pcl063 can't co-exit with NAND and eMMC together. I
comes
either with eMMC or NAND.Opps, sorry, just realised that I added this comment in the wrong place. This is in relation to the following being added to
pcl063-common.dtsi:arch/arm/dts/pcl063-common.dtsi renamed from arch/arm/dts/imx6ul-pcl063.dtsi +4
-0+ + pinctrl_usdhc2: usdhc2grp { + fsl,pins = < + MX6UL_PAD_NAND_WE_B__USDHC2_CMD 0x170f9
+MX6UL_PAD_NAND_RE_B__USDHC2_CLK0x1
00f9
+MX6UL_PAD_NAND_DATA00__USDHC2_DATA00x1
70f9
+MX6UL_PAD_NAND_DATA01__USDHC2_DATA10x1
70f9
+MX6UL_PAD_NAND_DATA02__USDHC2_DATA20x1
70f9
+MX6UL_PAD_NAND_DATA03__USDHC2_DATA30x1
70f9
+MX6UL_PAD_NAND_DATA04__USDHC2_DATA40x1
70f9
+MX6UL_PAD_NAND_DATA05__USDHC2_DATA50x1
70f9
+MX6UL_PAD_NAND_DATA06__USDHC2_DATA60x1
70f9
+MX6UL_PAD_NAND_DATA07__USDHC2_DATA70x1
70f9(quoted diff) +2
-0+ >; + };Quoted 9 lines
If there exists pcl063 modules that have eMMC and others that have NAND
using the same pins, then this configuration is not common and therefore shouldn't be inpcl063-common.dtsi. Is it dependent on the
flavour of i.MX used? If so I'd suggest the gpmi config needs to be pulled out intoimx6ul-phycore-segin.dtsand the usdhc2 config needs to
be inimx6ull-phycore-segin.dts.Quoted 5 lines
From phytec I understand that pcl063 SoM is a common platform for
imx6UL
and imx6ULL. This can either be shipped with eMMC or NAND, but not both.Looking a bit deeper, this seems a little odd as the product description suggests that NAND is provided onboard and 2 SD/SDIO/MMC connections are provided to the edge connector of the pcl063 for expansion.
The schematic suggests the only way they could achieve eMMC onboard would be with an eMMC that is pin compatible with the NAND they use.
Quoted 7 lines
Additionally, looking at the DTBs for this board in Phytec's own kernel tree, the only use of usdhc2 that I can see is for their WLAN expansion board[1] and I would have expected their tree to have supported such an option if it was available (they seem to have gone to some length to support a lot of configurations there).
Are you sure that the eMMC is provided on the pcl063 and not off board?
Yes, I have this SoM with me and the changes are tested in it already. Pinmuxing details are based on phytec's barebox which is yet to be in mainline [1].
Phytec already published the booting from eMMC option and configurations which are needed in the hardware level here [2].
Quoted 15 lines
(CCing Wadim who might be able to shed some light on this)
Quoted 6 lines
So there exist a possibility that phytec can provide imx6UL with eMMC as
well. IMO, both pinmux detailing for NAND and eMMC should still reside
incommon.dtsi.Assuming Phytec do in fact sell a pcl0063 with eMMC on board, the DTB describes the hardware. You've said Phytec provide the board either with eMMC *or* NAND. The device tree, as used on a specific board, should show either the existence of NAND or eMMC.
Quoted 4 lines
I suspect having both options in the common file is going to lead to issues with the pinmuxing for one or the other option. The pins can't be muxed for both simultaneously, hence these need to be described in separate files.
I understand, does it makes sense to move the NAND to ul.dts and eMMC to ull.dts? But consider that there will be UL board with eMMC, which results in duplication of same pinmux details in all the board files.
pcl063-common should address the details about the SoM alone. So should we create another dtsi which can be included based on the SoM?
Quoted 9 lines
Quoted 6 lines
Creating multiple
common.dtsibased on these variants is not friendly.
So I suggest to keep these changes incommon.dtsias such and decide in
board dts whether to enable or disable usdhc1, usdhc2 explicitly.This isn't about the selection of usdhc1 or usdhc2, it's whether gpmi or usdhc2 is using the pins of the SOC.
Typo, selection between gpmi and usdhc2 is what I meant. So the board dts imx6ul-phycore-segin.dts with gpmi enabled + usdhc2 disabled and imx6ull-phycore-segin.dts with gpmi disabled + usdhc2 enabled.
Thanks,
Parthiban N
[1]
https://git.phytec.de/barebox/tree/arch/arm/dts/imx6ul-phytec-phycore-som.dtsi?h=v2019.01.0-phy#n224
[2]
https://www.phytec.de/fileadmin/user_upload/images/content/1.Products/SOMs/phyCORE-i.MX_6UL/LAN-084e.A0.pdf
Quoted 58 lines
Martyn
Quoted 50 lines
Quoted 50 lines
Quoted 50 lines
Quoted 50 lines
pinctrl_gpmi_nand: gpminandgrp {
fsl,pins = <
MX6UL_PAD_NAND_CLE__RAWNAND_CLE
0x0
b0b1
MX6UL_PAD_NAND_ALE__RAWNAND_ALE
0x0
b0b1MX6UL_PAD_NAND_WP_B__RAWNAND_WP_B
0x0
b0b1
MX6UL_PAD_NAND_READY_B__RAWNAND_READY_
B0x0b000MX6UL_PAD_NAND_CE0_B__RAWNAND_CE0_B 0x0 b0b1 MX6UL_PAD_NAND_RE_B__RAWNAND_RE_B 0x0 b0b1 MX6UL_PAD_NAND_WE_B__RAWNAND_WE_B 0x0 b0b1 MX6UL_PAD_NAND_DATA00__RAWNAND_DATA00 0x0 b0b1 MX6UL_PAD_NAND_DATA01__RAWNAND_DATA01 0x0 b0b1 MX6UL_PAD_NAND_DATA02__RAWNAND_DATA02 0x0 b0b1 MX6UL_PAD_NAND_DATA03__RAWNAND_DATA03 0x0 b0b1 MX6UL_PAD_NAND_DATA04__RAWNAND_DATA04 0x0 b0b1 MX6UL_PAD_NAND_DATA05__RAWNAND_DATA05 0x0 b0b1 MX6UL_PAD_NAND_DATA06__RAWNAND_DATA06 0x0 b0b1 MX6UL_PAD_NAND_DATA07__RAWNAND_DATA07 0x0 b0b1 >; };
PATCH 1/1 imx: Extend PCL063 support for phyCORE-i.MX6ULL SOM
In reply to Martyn WelchMartyn,
Quoted 103 lines · Martyn Welch
Quoted 102 lines · Parthiban Nallathambi
Hello Martyn,
Quoted 99 lines · Martyn Welch
Quoted 55 lines · Parthiban
Hello Martyn,
Quoted 44 lines · Martyn Welch
Quoted 43 lines · Parthiban Nallathambi
board/phytec/pcl063/spl.c +1
-0@@ -13,6 +13,7 @@#include <asm/arch/mx6-ddr.h> #include <asm/arch/mx6-pins.h> #include <asm/arch/crm_regs.h> +#include <asm/arch/sys_proto.h> #include <fsl_esdhc.h> /* Configuration for Micron MT41K256M16TW-107 IT:P, 32M x 16 x 8
->
256MiB */board/phytec/pcl063/spl.c +0
-0@@ -117,11 +118,32 @@ static iomux_v3_cfg_t constusdhc1_pads[] =
{
MX6_PAD_UART1_RTS_B__USDHC1_CD_B|MUX_PAD_CTRL(USDHC_PAD_CTRL),
};board/phytec/pcl063/spl.c +3
-0+#ifndef CONFIG_NAND_MXS +static iomux_v3_cfg_t const usdhc2_pads[] = { + MX6_PAD_NAND_RE_B__USDHC2_CLK |
MUX_PAD_CTRL(USDHC_PAD_CTRL),board/phytec/pcl063/spl.c +1
-0+ MX6_PAD_NAND_WE_B__USDHC2_CMD |
MUX_PAD_CTRL(USDHC_PAD_CTRL),board/phytec/pcl063/spl.c +1
-0+ MX6_PAD_NAND_DATA00__USDHC2_DATA0 |
MUX_PAD_CTRL(USDHC_PAD_CTRL),board/phytec/pcl063/spl.c +1
-0+ MX6_PAD_NAND_DATA01__USDHC2_DATA1 |
MUX_PAD_CTRL(USDHC_PAD_CTRL),board/phytec/pcl063/spl.c +1
-0+ MX6_PAD_NAND_DATA02__USDHC2_DATA2 |
MUX_PAD_CTRL(USDHC_PAD_CTRL),board/phytec/pcl063/spl.c +1
-0+ MX6_PAD_NAND_DATA03__USDHC2_DATA3 |
MUX_PAD_CTRL(USDHC_PAD_CTRL),board/phytec/pcl063/spl.c +1
-0+ MX6_PAD_NAND_DATA04__USDHC2_DATA4 |
MUX_PAD_CTRL(USDHC_PAD_CTRL),board/phytec/pcl063/spl.c +1
-0+ MX6_PAD_NAND_DATA05__USDHC2_DATA5 |
MUX_PAD_CTRL(USDHC_PAD_CTRL),board/phytec/pcl063/spl.c +1
-0+ MX6_PAD_NAND_DATA06__USDHC2_DATA6 |
MUX_PAD_CTRL(USDHC_PAD_CTRL),Quoted 8 lines
board/phytec/pcl063/spl.c static iomux_v3_cfg_t const usdhc1_pads[] = { · line 135
Quoted 5 lines
board/phytec/pcl063/spl.c +1
-0+ MX6_PAD_NAND_DATA07__USDHC2_DATA7 |
MUX_PAD_CTRL(USDHC_PAD_CTRL),board/phytec/pcl063/spl.c +3
-0+}; +#endif +Umm, these pins are already used a few lines up for the NAND, via
gpmi:Quoted 4 lines
I understand. But pcl063 can't co-exit with NAND and eMMC together. I
comes
either with eMMC or NAND.Opps, sorry, just realised that I added this comment in the wrong place. This is in relation to the following being added to
pcl063-common.dtsi:arch/arm/dts/pcl063-common.dtsi renamed from arch/arm/dts/imx6ul-pcl063.dtsi +4
-0+ + pinctrl_usdhc2: usdhc2grp { + fsl,pins = < + MX6UL_PAD_NAND_WE_B__USDHC2_CMD 0x170f9
+MX6UL_PAD_NAND_RE_B__USDHC2_CLK0x1
00f9
+MX6UL_PAD_NAND_DATA00__USDHC2_DATA00x1
70f9
+MX6UL_PAD_NAND_DATA01__USDHC2_DATA10x1
70f9
+MX6UL_PAD_NAND_DATA02__USDHC2_DATA20x1
70f9
+MX6UL_PAD_NAND_DATA03__USDHC2_DATA30x1
70f9
+MX6UL_PAD_NAND_DATA04__USDHC2_DATA40x1
70f9
+MX6UL_PAD_NAND_DATA05__USDHC2_DATA50x1
70f9
+MX6UL_PAD_NAND_DATA06__USDHC2_DATA60x1
70f9
+MX6UL_PAD_NAND_DATA07__USDHC2_DATA70x1
70f9(quoted diff) +2
-0+ >; + };If there exists pcl063 modules that have eMMC and others that have NAND
using the same pins, then this configuration is not common and therefore shouldn't be inpcl063-common.dtsi. Is it dependent on the
flavour of i.MX used? If so I'd suggest the gpmi config needs to be pulled out intoimx6ul-phycore-segin.dtsand the usdhc2 config needs to
be inimx6ull-phycore-segin.dts.
Quoted 4 lines
Quoted 4 lines
From phytec I understand that pcl063 SoM is a common platform for
imx6UL
and imx6ULL. This can either be shipped with eMMC or NAND, but not both.
This is correct. There are PCL-063 SOMs with eMMC or NAND. And each PCL-063 can be a 6UL or 6ULL.
Quoted 8 lines
Quoted 1 line
Looking a bit deeper, this seems a little odd as the product description suggests that NAND is provided onboard and 2 SD/SDIO/MMC connections are provided to the edge connector of the pcl063 for expansion.
The schematic suggests the only way they could achieve eMMC onboard would be with an eMMC that is pin compatible with the NAND they use.
eMMC is connected via usdhc2. The usdhc2 pins conflict with the gpmi pins.
Quoted 8 lines
Additionally, looking at the DTBs for this board in Phytec's own kernel tree, the only use of usdhc2 that I can see is for their WLAN expansion board[1] and I would have expected their tree to have supported such an option if it was available (they seem to have gone to some length to support a lot of configurations there).
Are you sure that the eMMC is provided on the pcl063 and not off board?
eMMC is on the PCL-063 and not on a carrier board.
Quoted 9 lines
(CCing Wadim who might be able to shed some light on this)
Quoted 6 lines
So there exist a possibility that phytec can provide imx6UL with eMMC as
well. IMO, both pinmux detailing for NAND and eMMC should still reside
incommon.dtsi.
Quoted 4 lines
Assuming Phytec do in fact sell a pcl0063 with eMMC on board, the DTB describes the hardware. You've said Phytec provide the board either with eMMC *or* NAND. The device tree, as used on a specific board, should show either the existence of NAND or eMMC.
AFAIK, the idea was to put the muxing for both flash devices in the pcl063-som.dtsi and keep them disabled. eMMC or NAND will be then enabled in a higher level carrier board dts file. The handling of the SOM variant is designed by the carrier board dts file name, e.g. imx6ul-phytec-segin-ff-rdk-nand.dts and in theory a imx6ul-phytec-segin-ff-rdk-emmc.dts (Right now there is no 6UL eMMC SOM variant, so you can not find it in our kernel repository).
I agree, that this does not describe the SOM hardware. This is just the way we handle the SOM variants.
It seems the upstream situation for kernel and u-boot differs to what we did quite a lot at the moment. I am just curious how you want to handle this now. Unfortunately, we did no had the time to bring our 6UL boards upstream and clarify the situation. But we can talk about it now and find out a way to handle the variants properly.
CC'ed Stefan who is maintaining the imx6 boards at Phytec.
I hope this helps :)
Regards,
Wadim
Quoted 70 lines
I suspect having both options in the common file is going to lead to issues with the pinmuxing for one or the other option. The pins can't be muxed for both simultaneously, hence these need to be described in separate files.
Quoted 5 lines
Creating multiple
common.dtsibased on these variants is not friendly.
So I suggest to keep these changes incommon.dtsias such and decide in
board dts whether to enable or disable usdhc1, usdhc2 explicitly.This isn't about the selection of usdhc1 or usdhc2, it's whether gpmi or usdhc2 is using the pins of the SOC.
Martyn
Quoted 50 lines
Quoted 50 lines
Quoted 50 lines
Quoted 50 lines
pinctrl_gpmi_nand: gpminandgrp {
fsl,pins = <
MX6UL_PAD_NAND_CLE__RAWNAND_CLE
0x0
b0b1
MX6UL_PAD_NAND_ALE__RAWNAND_ALE
0x0
b0b1MX6UL_PAD_NAND_WP_B__RAWNAND_WP_B
0x0
b0b1
MX6UL_PAD_NAND_READY_B__RAWNAND_READY_
B0x0b000MX6UL_PAD_NAND_CE0_B__RAWNAND_CE0_B 0x0 b0b1 MX6UL_PAD_NAND_RE_B__RAWNAND_RE_B 0x0 b0b1 MX6UL_PAD_NAND_WE_B__RAWNAND_WE_B 0x0 b0b1 MX6UL_PAD_NAND_DATA00__RAWNAND_DATA00 0x0 b0b1 MX6UL_PAD_NAND_DATA01__RAWNAND_DATA01 0x0 b0b1 MX6UL_PAD_NAND_DATA02__RAWNAND_DATA02 0x0 b0b1 MX6UL_PAD_NAND_DATA03__RAWNAND_DATA03 0x0 b0b1 MX6UL_PAD_NAND_DATA04__RAWNAND_DATA04 0x0 b0b1 MX6UL_PAD_NAND_DATA05__RAWNAND_DATA05 0x0 b0b1 MX6UL_PAD_NAND_DATA06__RAWNAND_DATA06 0x0 b0b1 MX6UL_PAD_NAND_DATA07__RAWNAND_DATA07 0x0 b0b1 >; };
PATCH 1/1 imx: Extend PCL063 support for phyCORE-i.MX6ULL SOM
Hello Wadim,
Thanks for sharing the details.
Quoted 153 lines · Wadim Egorov
Martyn,
Quoted 103 lines · Martyn Welch
Quoted 102 lines · Parthiban Nallathambi
Hello Martyn,
Quoted 99 lines · Martyn Welch
Quoted 55 lines · Parthiban
Hello Martyn,
Quoted 44 lines · Martyn Welch
Quoted 43 lines · Parthiban Nallathambi
board/phytec/pcl063/spl.c +1
-0@@ -13,6 +13,7 @@#include <asm/arch/mx6-ddr.h> #include <asm/arch/mx6-pins.h> #include <asm/arch/crm_regs.h> +#include <asm/arch/sys_proto.h> #include <fsl_esdhc.h> /* Configuration for Micron MT41K256M16TW-107 IT:P, 32M x 16 x 8
->
256MiB */board/phytec/pcl063/spl.c +0
-0@@ -117,11 +118,32 @@ static iomux_v3_cfg_t constusdhc1_pads[] =
{ MX6_PAD_UART1_RTS_B__USDHC1_CD_B |
MUX_PAD_CTRL(USDHC_PAD_CTRL),
};board/phytec/pcl063/spl.c +3
-0+#ifndef CONFIG_NAND_MXS +static iomux_v3_cfg_t const usdhc2_pads[] = { + MX6_PAD_NAND_RE_B__USDHC2_CLK |
MUX_PAD_CTRL(USDHC_PAD_CTRL),board/phytec/pcl063/spl.c +1
-0+ MX6_PAD_NAND_WE_B__USDHC2_CMD |
MUX_PAD_CTRL(USDHC_PAD_CTRL),board/phytec/pcl063/spl.c +1
-0+ MX6_PAD_NAND_DATA00__USDHC2_DATA0 |
MUX_PAD_CTRL(USDHC_PAD_CTRL),board/phytec/pcl063/spl.c +1
-0+ MX6_PAD_NAND_DATA01__USDHC2_DATA1 |
MUX_PAD_CTRL(USDHC_PAD_CTRL),board/phytec/pcl063/spl.c +1
-0+ MX6_PAD_NAND_DATA02__USDHC2_DATA2 |
MUX_PAD_CTRL(USDHC_PAD_CTRL),board/phytec/pcl063/spl.c +1
-0+ MX6_PAD_NAND_DATA03__USDHC2_DATA3 |
MUX_PAD_CTRL(USDHC_PAD_CTRL),board/phytec/pcl063/spl.c +1
-0+ MX6_PAD_NAND_DATA04__USDHC2_DATA4 |
MUX_PAD_CTRL(USDHC_PAD_CTRL),board/phytec/pcl063/spl.c +1
-0+ MX6_PAD_NAND_DATA05__USDHC2_DATA5 |
MUX_PAD_CTRL(USDHC_PAD_CTRL),board/phytec/pcl063/spl.c +1
-0+ MX6_PAD_NAND_DATA06__USDHC2_DATA6 |
MUX_PAD_CTRL(USDHC_PAD_CTRL),Quoted 8 lines
board/phytec/pcl063/spl.c
Quoted 5 lines
board/phytec/pcl063/spl.c +1
-0+ MX6_PAD_NAND_DATA07__USDHC2_DATA7 |
MUX_PAD_CTRL(USDHC_PAD_CTRL),board/phytec/pcl063/spl.c +3
-0+}; +#endif +Umm, these pins are already used a few lines up for the NAND, via
gpmi:Quoted 4 lines
I understand. But pcl063 can't co-exit with NAND and eMMC together. I
comes
either with eMMC or NAND.Opps, sorry, just realised that I added this comment in the wrong place. This is in relation to the following being added to
pcl063-common.dtsi:(quoted diff) +4
-0+ + pinctrl_usdhc2: usdhc2grp { + fsl,pins = < + MX6UL_PAD_NAND_WE_B__USDHC2_CMD 0x170f9
+MX6UL_PAD_NAND_RE_B__USDHC2_CLK0x1
00f9
+MX6UL_PAD_NAND_DATA00__USDHC2_DATA00x1
70f9
+MX6UL_PAD_NAND_DATA01__USDHC2_DATA10x1
70f9
+MX6UL_PAD_NAND_DATA02__USDHC2_DATA20x1
70f9
+MX6UL_PAD_NAND_DATA03__USDHC2_DATA30x1
70f9
+MX6UL_PAD_NAND_DATA04__USDHC2_DATA40x1
70f9
+MX6UL_PAD_NAND_DATA05__USDHC2_DATA50x1
70f9
+MX6UL_PAD_NAND_DATA06__USDHC2_DATA60x1
70f9
+MX6UL_PAD_NAND_DATA07__USDHC2_DATA70x1
70f9(quoted diff) +2
-0+ >; + };If there exists pcl063 modules that have eMMC and others that have NAND
using the same pins, then this configuration is not common and therefore shouldn't be inpcl063-common.dtsi. Is it dependent on the
flavour of i.MX used? If so I'd suggest the gpmi config needs to be pulled out intoimx6ul-phycore-segin.dtsand the usdhc2 config needs to
be inimx6ull-phycore-segin.dts.Quoted 4 lines
Quoted 4 lines
From phytec I understand that pcl063 SoM is a common platform for
imx6UL
and imx6ULL. This can either be shipped with eMMC or NAND, but not both.This is correct. There are PCL-063 SOMs with eMMC or NAND. And each PCL-063 can be a 6UL or 6ULL.
Quoted 8 lines
Quoted 1 line
Looking a bit deeper, this seems a little odd as the product description suggests that NAND is provided onboard and 2 SD/SDIO/MMC connections are provided to the edge connector of the pcl063 for expansion.
The schematic suggests the only way they could achieve eMMC onboard would be with an eMMC that is pin compatible with the NAND they use.
eMMC is connected via usdhc2. The usdhc2 pins conflict with the gpmi pins.
Quoted 8 lines
Additionally, looking at the DTBs for this board in Phytec's own kernel tree, the only use of usdhc2 that I can see is for their WLAN expansion board[1] and I would have expected their tree to have supported such an option if it was available (they seem to have gone to some length to support a lot of configurations there).
Are you sure that the eMMC is provided on the pcl063 and not off board?
eMMC is on the PCL-063 and not on a carrier board.
Quoted 9 lines
(CCing Wadim who might be able to shed some light on this)
Quoted 6 lines
So there exist a possibility that phytec can provide imx6UL with eMMC as
well. IMO, both pinmux detailing for NAND and eMMC should still reside
incommon.dtsi.Quoted 4 lines
Assuming Phytec do in fact sell a pcl0063 with eMMC on board, the DTB describes the hardware. You've said Phytec provide the board either with eMMC *or* NAND. The device tree, as used on a specific board, should show either the existence of NAND or eMMC.
Quoted 7 lines
AFAIK, the idea was to put the muxing for both flash devices in the
pcl063-som.dtsiand keep them disabled. eMMC or NAND will be then enabled in a higher level carrier board dts file. The handling of the SOM variant is designed by the carrier board dts file name, e.g.imx6ul-phytec-segin-ff-rdk-nand.dtsand in theory aimx6ul-phytec-segin-ff-rdk-emmc.dts(Right now there is no 6UL eMMC SOM variant, so you can not find it in our kernel repository).
I agree to place both gpmi and eMMC pinmux details in common.dtsi with default "disabled" and enable them only in board dts.
@Martyn, please advise.
Thanks,
Parthiban N
Quoted 87 lines
I agree, that this does not describe the SOM hardware. This is just the way we handle the SOM variants.
It seems the upstream situation for kernel and u-boot differs to what we did quite a lot at the moment. I am just curious how you want to handle this now. Unfortunately, we did no had the time to bring our 6UL boards upstream and clarify the situation. But we can talk about it now and find out a way to handle the variants properly.
CC'ed Stefan who is maintaining the imx6 boards at Phytec.
I hope this helps :)
Regards,
WadimQuoted 70 lines
I suspect having both options in the common file is going to lead to issues with the pinmuxing for one or the other option. The pins can't be muxed for both simultaneously, hence these need to be described in separate files.
Quoted 5 lines
Creating multiple
common.dtsibased on these variants is not friendly.
So I suggest to keep these changes incommon.dtsias such and decide in
board dts whether to enable or disable usdhc1, usdhc2 explicitly.This isn't about the selection of usdhc1 or usdhc2, it's whether gpmi or usdhc2 is using the pins of the SOC.
Martyn
Quoted 50 lines
Quoted 50 lines
Quoted 50 lines
Quoted 50 lines
pinctrl_gpmi_nand: gpminandgrp {
fsl,pins = <
MX6UL_PAD_NAND_CLE__RAWNAND_CLE
0x0
b0b1
MX6UL_PAD_NAND_ALE__RAWNAND_ALE
0x0
b0b1MX6UL_PAD_NAND_WP_B__RAWNAND_WP_B
0x0
b0b1
MX6UL_PAD_NAND_READY_B__RAWNAND_READY_
B0x0b000MX6UL_PAD_NAND_CE0_B__RAWNAND_CE0_B 0x0 b0b1 MX6UL_PAD_NAND_RE_B__RAWNAND_RE_B 0x0 b0b1 MX6UL_PAD_NAND_WE_B__RAWNAND_WE_B 0x0 b0b1 MX6UL_PAD_NAND_DATA00__RAWNAND_DATA00 0x0 b0b1 MX6UL_PAD_NAND_DATA01__RAWNAND_DATA01 0x0 b0b1 MX6UL_PAD_NAND_DATA02__RAWNAND_DATA02 0x0 b0b1 MX6UL_PAD_NAND_DATA03__RAWNAND_DATA03 0x0 b0b1 MX6UL_PAD_NAND_DATA04__RAWNAND_DATA04 0x0 b0b1 MX6UL_PAD_NAND_DATA05__RAWNAND_DATA05 0x0 b0b1 MX6UL_PAD_NAND_DATA06__RAWNAND_DATA06 0x0 b0b1 MX6UL_PAD_NAND_DATA07__RAWNAND_DATA07 0x0 b0b1 >; };
PATCH 1/1 imx: Extend PCL063 support for phyCORE-i.MX6ULL SOM
Quoted 198 lines · Parthiban Nallathambi
Hello Wadim,
Thanks for sharing the details.
Quoted 183 lines · Wadim Egorov
Martyn,
Quoted 122 lines · Martyn Welch
Quoted 121 lines · Parthiban Nallathambi
Hello Martyn,
Quoted 118 lines · Martyn Welch
Quoted 58 lines · Parthiban
Hello Martyn,
Quoted 47 lines · Martyn Welch
Quoted 45 lines · Parthiban Nallathambi
board/phytec/pcl063/spl.c +1
-0@@ -13,6 +13,7 @@#include <asm/arch/mx6-ddr.h> #include <asm/arch/mx6-pins.h> #include <asm/arch/crm_regs.h> +#include <asm/arch/sys_proto.h> #include <fsl_esdhc.h> /* Configuration for Micron MT41K256M16TW-107 IT:P, 32M x
16 x 8
->
256MiB */board/phytec/pcl063/spl.c +0
-0@@ -117,11 +118,32 @@ static iomux_v3_cfg_t constusdhc1_pads[] =
{ MX6_PAD_UART1_RTS_B__USDHC1_CD_B |
MUX_PAD_CTRL(USDHC_PAD_CTRL),
};board/phytec/pcl063/spl.c +3
-0+#ifndef CONFIG_NAND_MXS +static iomux_v3_cfg_t const usdhc2_pads[] = { + MX6_PAD_NAND_RE_B__USDHC2_CLK |
MUX_PAD_CTRL(USDHC_PAD_CTRL),board/phytec/pcl063/spl.c +1
-0+ MX6_PAD_NAND_WE_B__USDHC2_CMD |
MUX_PAD_CTRL(USDHC_PAD_CTRL),board/phytec/pcl063/spl.c +1
-0+ MX6_PAD_NAND_DATA00__USDHC2_DATA0 |
MUX_PAD_CTRL(USDHC_PAD_CTRL),board/phytec/pcl063/spl.c +1
-0+ MX6_PAD_NAND_DATA01__USDHC2_DATA1 |
MUX_PAD_CTRL(USDHC_PAD_CTRL),board/phytec/pcl063/spl.c +1
-0+ MX6_PAD_NAND_DATA02__USDHC2_DATA2 |
MUX_PAD_CTRL(USDHC_PAD_CTRL),board/phytec/pcl063/spl.c +1
-0+ MX6_PAD_NAND_DATA03__USDHC2_DATA3 |
MUX_PAD_CTRL(USDHC_PAD_CTRL),board/phytec/pcl063/spl.c +1
-0+ MX6_PAD_NAND_DATA04__USDHC2_DATA4 |
MUX_PAD_CTRL(USDHC_PAD_CTRL),board/phytec/pcl063/spl.c +1
-0+ MX6_PAD_NAND_DATA05__USDHC2_DATA5 |
MUX_PAD_CTRL(USDHC_PAD_CTRL),board/phytec/pcl063/spl.c +1
-0+ MX6_PAD_NAND_DATA06__USDHC2_DATA6 |
MUX_PAD_CTRL(USDHC_PAD_CTRL),board/phytec/pcl063/spl.c +1
-0+ MX6_PAD_NAND_DATA07__USDHC2_DATA7 |Quoted 8 lines
board/phytec/pcl063/spl.c
Quoted 4 lines
MUX_PAD_CTRL(USDHC_PAD_CTRL),board/phytec/pcl063/spl.c +3
-0+}; +#endif +Umm, these pins are already used a few lines up for the NAND,
via
gpmi:Quoted 4 lines
I understand. But pcl063 can't co-exit with NAND and eMMC together. I
comes
either with eMMC or NAND.Opps, sorry, just realised that I added this comment in the wrong
place. This is in relation to the following being added topcl063-common.dtsi:(quoted diff) +4
-0+ + pinctrl_usdhc2: usdhc2grp { + fsl,pins = < + MX6UL_PAD_NAND_WE_B__USDHC2_CMD 0x170f9
+MX6UL_PAD_NAND_RE_B__USDHC2_CLK
0x1
00f9
+MX6UL_PAD_NAND_DATA00__USDHC2_DATA0
0x1
70f9
+MX6UL_PAD_NAND_DATA01__USDHC2_DATA1
0x1
70f9
+MX6UL_PAD_NAND_DATA02__USDHC2_DATA2
0x1
70f9
+MX6UL_PAD_NAND_DATA03__USDHC2_DATA3
0x1
70f9
+MX6UL_PAD_NAND_DATA04__USDHC2_DATA4
0x1
70f9
+MX6UL_PAD_NAND_DATA05__USDHC2_DATA5
0x1
70f9
+MX6UL_PAD_NAND_DATA06__USDHC2_DATA6
0x1
70f9
+MX6UL_PAD_NAND_DATA07__USDHC2_DATA7
0x1
70f9(quoted diff) +2
-0+ >; + };If there exists pcl063 modules that have eMMC and others that have
NAND
using the same pins, then this configuration is not common and
therefore shouldn't be inpcl063-common.dtsi. Is it dependent on
the
flavour of i.MX used? If so I'd suggest the gpmi config needs to be
pulled out intoimx6ul-phycore-segin.dtsand the usdhc2 config
needs to
be inimx6ull-phycore-segin.dts.Quoted 6 lines
Quoted 6 lines
From phytec I understand that pcl063 SoM is a common platform
for
imx6UL
and imx6ULL. This can either be shipped with eMMC or NAND, but not
both.This is correct. There are PCL-063 SOMs with eMMC or NAND. And each PCL-063 can be a 6UL or 6ULL.
Quoted 10 lines
Looking a bit deeper, this seems a little odd as the product description suggests that NAND is provided onboard and 2 SD/SDIO/MMC
connections are provided to the edge connector of the pcl063 for expansion.The schematic suggests the only way they could achieve eMMC onboard
would be with an eMMC that is pin compatible with the NAND they use.eMMC is connected via usdhc2. The usdhc2 pins conflict with the gpmi pins.
Quoted 10 lines
Additionally, looking at the DTBs for this board in Phytec's own kernel
tree, the only use of usdhc2 that I can see is for their WLAN expansion
board[1] and I would have expected their tree to have supported such an
option if it was available (they seem to have gone to some length to
support a lot of configurations there).Quoted 2 lines
Are you sure that the eMMC is provided on the pcl063 and not off board?
eMMC is on the PCL-063 and not on a carrier board.
Quoted 9 lines
(CCing Wadim who might be able to shed some light on this)
Quoted 7 lines
So there exist a possibility that phytec can provide imx6UL with eMMC
as
well. IMO, both pinmux detailing for NAND and eMMC should still reside
incommon.dtsi.Quoted 6 lines
Assuming Phytec do in fact sell a pcl0063 with eMMC on board, the DTB
describes the hardware. You've said Phytec provide the board either with eMMC *or* NAND. The device tree, as used on a specific
board, should show either the existence of NAND or eMMC.Quoted 9 lines
AFAIK, the idea was to put the muxing for both flash devices in the
pcl063-som.dtsiand keep them disabled. eMMC or NAND will be then enabled in a higher level carrier board dts file. The handling of the
SOM variant is designed by the carrier board dts file name, e.g.imx6ul-phytec-segin-ff-rdk-nand.dtsand in theory aimx6ul-phytec-segin-ff-rdk-emmc.dts(Right now there is no 6UL eMMC SOM
variant, so you can not find it in our kernel repository).
Quoted 6 lines
I agree to place both gpmi and eMMC pinmux details in
common.dtsiwith
default "disabled" and enable them only in board dts.@Martyn, please advise.
Yes, that seems sensible.
Martyn
Quoted 112 lines
Thanks,
Parthiban NQuoted 109 lines
I agree, that this does not describe the SOM hardware. This is just the
way we handle the SOM variants.It seems the upstream situation for kernel and u-boot differs to what we
did quite a lot at the moment. I am just curious how you want to handle
this now. Unfortunately, we did no had the time to bring our 6UL boards
upstream and clarify the situation. But we can talk about it now and
find out a way to handle the variants properly.CC'ed Stefan who is maintaining the imx6 boards at Phytec.
I hope this helps :)
Regards,
WadimQuoted 88 lines
I suspect having both options in the common file is going to lead to
issues with the pinmuxing for one or the other option. The pins can't
be muxed for both simultaneously, hence these need to be described in
separate files.Quoted 7 lines
Creating multiple
common.dtsibased on these variants is not friendly.
So I suggest to keep these changes incommon.dtsias such and decide
in
board dts whether to enable or disable usdhc1, usdhc2 explicitly.This isn't about the selection of usdhc1 or usdhc2, it's whether gpmi
or usdhc2 is using the pins of the SOC.Martyn
Quoted 63 lines
Quoted 63 lines
Quoted 63 lines
Quoted 63 lines
pinctrl_gpmi_nand: gpminandgrp {
fsl,pins = <
MX6UL_PAD_NAND_CLE__RAWNAND_CLE
0x0
b0b1
MX6UL_PAD_NAND_ALE__RAWNAND_ALE
0x0
b0b1MX6UL_PAD_NAND_WP_B__RAWNAND_WP_B
0x0
b0b1
MX6UL_PAD_NAND_READY_B__RAWNAND
_READY_
B0x0b000MX6UL_PAD_NAND_CE0_B__RAWNAND_C E0_B 0x0 b0b1 MX6UL_PAD_NAND_RE_B__RAWNAND_RE _B 0x0 b0b1 MX6UL_PAD_NAND_WE_B__RAWNAND_WE _B 0x0 b0b1 MX6UL_PAD_NAND_DATA00__RAWNAND_ DATA00 0x0 b0b1 MX6UL_PAD_NAND_DATA01__RAWNAND_ DATA01 0x0 b0b1 MX6UL_PAD_NAND_DATA02__RAWNAND_ DATA02 0x0 b0b1 MX6UL_PAD_NAND_DATA03__RAWNAND_ DATA03 0x0 b0b1 MX6UL_PAD_NAND_DATA04__RAWNAND_ DATA04 0x0 b0b1 MX6UL_PAD_NAND_DATA05__RAWNAND_ DATA05 0x0 b0b1 MX6UL_PAD_NAND_DATA06__RAWNAND_ DATA06 0x0 b0b1 MX6UL_PAD_NAND_DATA07__RAWNAND_ DATA07 0x0 b0b1 >; };