diff --git a/config/sources/cubox.conf b/config/sources/cubox.conf index d9387cd71b..50bd646a86 100644 --- a/config/sources/cubox.conf +++ b/config/sources/cubox.conf @@ -24,15 +24,16 @@ case $BRANCH in ;; dev) - # mainline u-boot + # mainline u-boot BOOTSOURCE=$MAINLINE_UBOOT_SOURCE BOOTDIR=$MAINLINE_UBOOT_DIR - BOOTBRANCH='tag:v2017.11' + BOOTBRANCH='tag:v2018.03' BOOTCONFIG="mx6cuboxi_defconfig" BOOTPATCHDIR='u-boot-cubox-next' KERNELSOURCE=$MAINLINE_KERNEL_SOURCE KERNELBRANCH='branch:linux-4.16.y' KERNELDIR=$MAINLINE_KERNEL_DIR + UBOOT_USE_GCC='> 7.0' KERNEL_USE_GCC='> 7.0' ;; esac @@ -43,7 +44,7 @@ GOVERNOR=interactive SERIALCON=ttymxc0 -if [[ "$BRANCH" == "next" ]]; then +if [[ "$BRANCH" == "dev" ]]; then write_uboot_platform() { dd if=$1/SPL of=$2 bs=1K seek=1 status=noxfer > /dev/null 2>&1 diff --git a/patch/u-boot/u-boot-cubox-next/U-Boot-mx6cuboxi-add-support-for-detecting-Revision-1.5-SoMs.patch b/patch/u-boot/u-boot-cubox-next/U-Boot-mx6cuboxi-add-support-for-detecting-Revision-1.5-SoMs.patch new file mode 100755 index 0000000000..db67301a77 --- /dev/null +++ b/patch/u-boot/u-boot-cubox-next/U-Boot-mx6cuboxi-add-support-for-detecting-Revision-1.5-SoMs.patch @@ -0,0 +1,111 @@ +From patchwork Sun Mar 4 13:36:19 2018 +Content-Type: text/plain; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit +Subject: [U-Boot] mx6cuboxi: add support for detecting Revision 1.5 SoMs +X-Patchwork-Submitter: Peter Robinson +X-Patchwork-Id: 881181 +X-Patchwork-Delegate: sbabic@denx.de +Message-Id: <20180304133619.28035-1-pbrobinson@gmail.com> +To: fabio.estevam@nxp.com, + u-boot@lists.denx.de +Date: Sun, 4 Mar 2018 13:36:19 +0000 +From: Peter Robinson +List-Id: U-Boot discussion + +Solid Run have a rev 1.5 SoM with different a different WiFi/BT module and some +other changes. Their downstream commit 99e18b7f14 adds support for detecting +this new SoM revision. This adds that support and sets up the new +device tree naming that landed in the linux 4.16 kernel. + +Tested on a Hummingboard2 Gate. + +Signed-off-by: Peter Robinson +--- + board/solidrun/mx6cuboxi/mx6cuboxi.c | 30 +++++++++++++++++++++++++++--- + include/configs/mx6cuboxi.h | 12 ++++++------ + 2 files changed, 33 insertions(+), 9 deletions(-) + +diff --git a/board/solidrun/mx6cuboxi/mx6cuboxi.c b/board/solidrun/mx6cuboxi/mx6cuboxi.c +index ee9e4f7c01..bea6275b78 100644 +--- a/board/solidrun/mx6cuboxi/mx6cuboxi.c ++++ b/board/solidrun/mx6cuboxi/mx6cuboxi.c +@@ -79,9 +79,11 @@ static iomux_v3_cfg_t const usdhc2_pads[] = { + }; + + static iomux_v3_cfg_t const hb_cbi_sense[] = { +- /* These pins are for sensing if it is a CuBox-i or a HummingBoard */ +- IOMUX_PADS(PAD_KEY_ROW1__GPIO4_IO09 | MUX_PAD_CTRL(UART_PAD_CTRL)), +- IOMUX_PADS(PAD_EIM_DA4__GPIO3_IO04 | MUX_PAD_CTRL(UART_PAD_CTRL)), ++ /* These pins are for sensing if it is a CuBox-i, HummingBoard(2) and SoM rev */ ++ IOMUX_PADS(PAD_KEY_ROW1__GPIO4_IO09 | MUX_PAD_CTRL(UART_PAD_CTRL)), ++ IOMUX_PADS(PAD_EIM_DA4__GPIO3_IO04 | MUX_PAD_CTRL(UART_PAD_CTRL)), ++ IOMUX_PADS(PAD_CSI0_DAT14__GPIO6_IO00 | MUX_PAD_CTRL(UART_PAD_CTRL)), ++ IOMUX_PADS(PAD_CSI0_DAT18__GPIO6_IO04 | MUX_PAD_CTRL(UART_PAD_CTRL)), + }; + + static iomux_v3_cfg_t const usb_pads[] = { +@@ -390,6 +392,25 @@ static bool is_hummingboard2(void) + return false; + } + ++static bool is_som_rev15(void) ++{ ++ int val1; ++ int val2; ++ ++ SETUP_IOMUX_PADS(hb_cbi_sense); ++ ++ gpio_direction_input(IMX_GPIO_NR(6, 0)); ++ gpio_direction_input(IMX_GPIO_NR(6, 4)); ++ ++ val1 = gpio_get_value(IMX_GPIO_NR(6, 0)); ++ val2 = gpio_get_value(IMX_GPIO_NR(6, 4)); ++ ++ if (val1 == 1 && val2 == 0) ++ return true; ++ else ++ return false; ++} ++ + int checkboard(void) + { + if (is_hummingboard2()) +@@ -412,6 +433,9 @@ int board_late_init(void) + else + env_set("board_name", "CUBOXI"); + ++ if (is_som_rev15()) ++ env_set("som_rev", "-som-v15"); ++ + if (is_mx6dq()) + env_set("board_rev", "MX6Q"); + else +diff --git a/include/configs/mx6cuboxi.h b/include/configs/mx6cuboxi.h +index 0e1d18cad8..076fd2c40e 100644 +--- a/include/configs/mx6cuboxi.h ++++ b/include/configs/mx6cuboxi.h +@@ -104,17 +104,17 @@ + "fi\0" \ + "findfdt="\ + "if test $board_name = HUMMINGBOARD2 && test $board_rev = MX6Q ; then " \ +- "setenv fdtfile imx6q-hummingboard2.dtb; fi; " \ ++ "setenv fdtfile imx6q-hummingboard2${som_rev}.dtb; fi; " \ + "if test $board_name = HUMMINGBOARD2 && test $board_rev = MX6DL ; then " \ +- "setenv fdtfile imx6dl-hummingboard2.dtb; fi; " \ ++ "setenv fdtfile imx6dl-hummingboard2${som_rev}.dtb; fi; " \ + "if test $board_name = HUMMINGBOARD && test $board_rev = MX6Q ; then " \ +- "setenv fdtfile imx6q-hummingboard.dtb; fi; " \ ++ "setenv fdtfile imx6q-hummingboard${som_rev}.dtb; fi; " \ + "if test $board_name = HUMMINGBOARD && test $board_rev = MX6DL ; then " \ +- "setenv fdtfile imx6dl-hummingboard.dtb; fi; " \ ++ "setenv fdtfile imx6dl-hummingboard${som_rev}.dtb; fi; " \ + "if test $board_name = CUBOXI && test $board_rev = MX6Q ; then " \ +- "setenv fdtfile imx6q-cubox-i.dtb; fi; " \ ++ "setenv fdtfile imx6q-cubox-i${som_rev}.dtb; fi; " \ + "if test $board_name = CUBOXI && test $board_rev = MX6DL ; then " \ +- "setenv fdtfile imx6dl-cubox-i.dtb; fi; " \ ++ "setenv fdtfile imx6dl-cubox-i${som_rev}.dtb; fi; " \ + "if test $fdtfile = undefined; then " \ + "echo WARNING: Could not determine dtb to use; fi; \0" \ + BOOTENV