mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-24 21:54:01 +00:00
Merge branch 'master' of git://www.denx.de/git/u-boot-imx
Signed-off-by: Tom Rini <trini@konsulko.com> Conflicts: common/Kconfig configs/dms-ba16_defconfig
This commit is contained in:
commit
4f892924d2
86 changed files with 6262 additions and 113 deletions
|
@ -95,6 +95,16 @@ config TARGET_MX6CUBOXI
|
|||
config TARGET_MX6QARM2
|
||||
bool "mx6qarm2"
|
||||
|
||||
config TARGET_MX6Q_ICORE
|
||||
bool "Support Engicam i.Core"
|
||||
select MX6QDL
|
||||
select OF_CONTROL
|
||||
select DM
|
||||
select DM_GPIO
|
||||
select DM_MMC
|
||||
select DM_THERMAL
|
||||
select SUPPORT_SPL
|
||||
|
||||
config TARGET_MX6QSABREAUTO
|
||||
bool "mx6qsabreauto"
|
||||
select DM
|
||||
|
@ -225,6 +235,7 @@ source "board/compulab/cm_fx6/Kconfig"
|
|||
source "board/congatec/cgtqmx6eval/Kconfig"
|
||||
source "board/el/el6x/Kconfig"
|
||||
source "board/embest/mx6boards/Kconfig"
|
||||
source "board/engicam/icorem6/Kconfig"
|
||||
source "board/freescale/mx6qarm2/Kconfig"
|
||||
source "board/freescale/mx6qsabreauto/Kconfig"
|
||||
source "board/freescale/mx6sabresd/Kconfig"
|
||||
|
|
|
@ -282,7 +282,9 @@ dtb-$(CONFIG_VF610) += vf500-colibri.dtb \
|
|||
pcm052.dtb \
|
||||
bk4r1.dtb
|
||||
|
||||
dtb-$(CONFIG_MX6) += imx6ull-14x14-evk.dtb
|
||||
dtb-$(CONFIG_MX6) += imx6ull-14x14-evk.dtb \
|
||||
imx6dl-icore.dtb \
|
||||
imx6q-icore.dtb
|
||||
|
||||
dtb-$(CONFIG_MX7) += imx7-colibri.dtb
|
||||
|
||||
|
|
59
arch/arm/dts/imx6dl-icore.dts
Normal file
59
arch/arm/dts/imx6dl-icore.dts
Normal file
|
@ -0,0 +1,59 @@
|
|||
/*
|
||||
* Copyright (C) 2016 Amarula Solutions B.V.
|
||||
* Copyright (C) 2016 Engicam S.r.l.
|
||||
*
|
||||
* This file is dual-licensed: you can use it either under the terms
|
||||
* of the GPL or the X11 license, at your option. Note that this dual
|
||||
* licensing only applies to this file, and not this project as a
|
||||
* whole.
|
||||
*
|
||||
* a) This file is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* version 2 as published by the Free Software Foundation.
|
||||
*
|
||||
* This file is distributed in the hope that it will be useful
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* Or, alternatively
|
||||
*
|
||||
* b) Permission is hereby granted, free of charge, to any person
|
||||
* obtaining a copy of this software and associated documentation
|
||||
* files (the "Software"), to deal in the Software without
|
||||
* restriction, including without limitation the rights to use
|
||||
* copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
* sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following
|
||||
* conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be
|
||||
* included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED , WITHOUT WARRANTY OF ANY KIND
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
* OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
|
||||
#include "imx6dl.dtsi"
|
||||
#include "imx6qdl-icore.dtsi"
|
||||
|
||||
/ {
|
||||
model = "Engicam i.CoreM6 DualLite/Solo Starter Kit";
|
||||
compatible = "engicam,imx6-icore", "fsl,imx6dl";
|
||||
};
|
||||
|
||||
&can1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&can2 {
|
||||
status = "okay";
|
||||
};
|
1091
arch/arm/dts/imx6dl-pinfunc.h
Normal file
1091
arch/arm/dts/imx6dl-pinfunc.h
Normal file
File diff suppressed because it is too large
Load diff
133
arch/arm/dts/imx6dl.dtsi
Normal file
133
arch/arm/dts/imx6dl.dtsi
Normal file
|
@ -0,0 +1,133 @@
|
|||
|
||||
/*
|
||||
* Copyright 2013 Freescale Semiconductor, Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <dt-bindings/interrupt-controller/irq.h>
|
||||
#include "imx6dl-pinfunc.h"
|
||||
#include "imx6qdl.dtsi"
|
||||
|
||||
/ {
|
||||
aliases {
|
||||
i2c3 = &i2c4;
|
||||
};
|
||||
|
||||
cpus {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
cpu@0 {
|
||||
compatible = "arm,cortex-a9";
|
||||
device_type = "cpu";
|
||||
reg = <0>;
|
||||
next-level-cache = <&L2>;
|
||||
operating-points = <
|
||||
/* kHz uV */
|
||||
996000 1250000
|
||||
792000 1175000
|
||||
396000 1150000
|
||||
>;
|
||||
fsl,soc-operating-points = <
|
||||
/* ARM kHz SOC-PU uV */
|
||||
996000 1175000
|
||||
792000 1175000
|
||||
396000 1175000
|
||||
>;
|
||||
clock-latency = <61036>; /* two CLK32 periods */
|
||||
clocks = <&clks IMX6QDL_CLK_ARM>,
|
||||
<&clks IMX6QDL_CLK_PLL2_PFD2_396M>,
|
||||
<&clks IMX6QDL_CLK_STEP>,
|
||||
<&clks IMX6QDL_CLK_PLL1_SW>,
|
||||
<&clks IMX6QDL_CLK_PLL1_SYS>;
|
||||
clock-names = "arm", "pll2_pfd2_396m", "step",
|
||||
"pll1_sw", "pll1_sys";
|
||||
arm-supply = <®_arm>;
|
||||
pu-supply = <®_pu>;
|
||||
soc-supply = <®_soc>;
|
||||
};
|
||||
|
||||
cpu@1 {
|
||||
compatible = "arm,cortex-a9";
|
||||
device_type = "cpu";
|
||||
reg = <1>;
|
||||
next-level-cache = <&L2>;
|
||||
};
|
||||
};
|
||||
|
||||
soc {
|
||||
ocram: sram@00900000 {
|
||||
compatible = "mmio-sram";
|
||||
reg = <0x00900000 0x20000>;
|
||||
clocks = <&clks IMX6QDL_CLK_OCRAM>;
|
||||
};
|
||||
|
||||
aips1: aips-bus@02000000 {
|
||||
iomuxc: iomuxc@020e0000 {
|
||||
compatible = "fsl,imx6dl-iomuxc";
|
||||
};
|
||||
|
||||
pxp: pxp@020f0000 {
|
||||
reg = <0x020f0000 0x4000>;
|
||||
interrupts = <0 98 IRQ_TYPE_LEVEL_HIGH>;
|
||||
};
|
||||
|
||||
epdc: epdc@020f4000 {
|
||||
reg = <0x020f4000 0x4000>;
|
||||
interrupts = <0 97 IRQ_TYPE_LEVEL_HIGH>;
|
||||
};
|
||||
|
||||
lcdif: lcdif@020f8000 {
|
||||
reg = <0x020f8000 0x4000>;
|
||||
interrupts = <0 39 IRQ_TYPE_LEVEL_HIGH>;
|
||||
};
|
||||
};
|
||||
|
||||
aips2: aips-bus@02100000 {
|
||||
i2c4: i2c@021f8000 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
compatible = "fsl,imx6q-i2c", "fsl,imx21-i2c";
|
||||
reg = <0x021f8000 0x4000>;
|
||||
interrupts = <0 35 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&clks IMX6DL_CLK_I2C4>;
|
||||
status = "disabled";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
display-subsystem {
|
||||
compatible = "fsl,imx-display-subsystem";
|
||||
ports = <&ipu1_di0>, <&ipu1_di1>;
|
||||
};
|
||||
|
||||
gpu-subsystem {
|
||||
compatible = "fsl,imx-gpu-subsystem";
|
||||
cores = <&gpu_2d>, <&gpu_3d>;
|
||||
};
|
||||
};
|
||||
|
||||
&gpt {
|
||||
compatible = "fsl,imx6dl-gpt";
|
||||
};
|
||||
|
||||
&hdmi {
|
||||
compatible = "fsl,imx6dl-hdmi";
|
||||
};
|
||||
|
||||
&ldb {
|
||||
clocks = <&clks IMX6QDL_CLK_LDB_DI0_SEL>, <&clks IMX6QDL_CLK_LDB_DI1_SEL>,
|
||||
<&clks IMX6QDL_CLK_IPU1_DI0_SEL>, <&clks IMX6QDL_CLK_IPU1_DI1_SEL>,
|
||||
<&clks IMX6QDL_CLK_LDB_DI0>, <&clks IMX6QDL_CLK_LDB_DI1>;
|
||||
clock-names = "di0_pll", "di1_pll",
|
||||
"di0_sel", "di1_sel",
|
||||
"di0", "di1";
|
||||
};
|
||||
|
||||
&vpu {
|
||||
compatible = "fsl,imx6dl-vpu", "cnm,coda960";
|
||||
};
|
59
arch/arm/dts/imx6q-icore.dts
Normal file
59
arch/arm/dts/imx6q-icore.dts
Normal file
|
@ -0,0 +1,59 @@
|
|||
/*
|
||||
* Copyright (C) 2016 Amarula Solutions B.V.
|
||||
* Copyright (C) 2016 Engicam S.r.l.
|
||||
*
|
||||
* This file is dual-licensed: you can use it either under the terms
|
||||
* of the GPL or the X11 license, at your option. Note that this dual
|
||||
* licensing only applies to this file, and not this project as a
|
||||
* whole.
|
||||
*
|
||||
* a) This file is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* version 2 as published by the Free Software Foundation.
|
||||
*
|
||||
* This file is distributed in the hope that it will be useful
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* Or, alternatively
|
||||
*
|
||||
* b) Permission is hereby granted, free of charge, to any person
|
||||
* obtaining a copy of this software and associated documentation
|
||||
* files (the "Software"), to deal in the Software without
|
||||
* restriction, including without limitation the rights to use
|
||||
* copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
* sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following
|
||||
* conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be
|
||||
* included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED , WITHOUT WARRANTY OF ANY KIND
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
* OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
|
||||
#include "imx6q.dtsi"
|
||||
#include "imx6qdl-icore.dtsi"
|
||||
|
||||
/ {
|
||||
model = "Engicam i.CoreM6 Quad/Dual Starter Kit";
|
||||
compatible = "engicam,imx6-icore", "fsl,imx6q";
|
||||
};
|
||||
|
||||
&can1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&can2 {
|
||||
status = "okay";
|
||||
};
|
1047
arch/arm/dts/imx6q-pinfunc.h
Normal file
1047
arch/arm/dts/imx6q-pinfunc.h
Normal file
File diff suppressed because it is too large
Load diff
300
arch/arm/dts/imx6q.dtsi
Normal file
300
arch/arm/dts/imx6q.dtsi
Normal file
|
@ -0,0 +1,300 @@
|
|||
|
||||
/*
|
||||
* Copyright 2013 Freescale Semiconductor, Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <dt-bindings/interrupt-controller/irq.h>
|
||||
#include "imx6q-pinfunc.h"
|
||||
#include "imx6qdl.dtsi"
|
||||
|
||||
/ {
|
||||
aliases {
|
||||
ipu1 = &ipu2;
|
||||
spi4 = &ecspi5;
|
||||
};
|
||||
|
||||
cpus {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
cpu0: cpu@0 {
|
||||
compatible = "arm,cortex-a9";
|
||||
device_type = "cpu";
|
||||
reg = <0>;
|
||||
next-level-cache = <&L2>;
|
||||
operating-points = <
|
||||
/* kHz uV */
|
||||
1200000 1275000
|
||||
996000 1250000
|
||||
852000 1250000
|
||||
792000 1175000
|
||||
396000 975000
|
||||
>;
|
||||
fsl,soc-operating-points = <
|
||||
/* ARM kHz SOC-PU uV */
|
||||
1200000 1275000
|
||||
996000 1250000
|
||||
852000 1250000
|
||||
792000 1175000
|
||||
396000 1175000
|
||||
>;
|
||||
clock-latency = <61036>; /* two CLK32 periods */
|
||||
clocks = <&clks IMX6QDL_CLK_ARM>,
|
||||
<&clks IMX6QDL_CLK_PLL2_PFD2_396M>,
|
||||
<&clks IMX6QDL_CLK_STEP>,
|
||||
<&clks IMX6QDL_CLK_PLL1_SW>,
|
||||
<&clks IMX6QDL_CLK_PLL1_SYS>;
|
||||
clock-names = "arm", "pll2_pfd2_396m", "step",
|
||||
"pll1_sw", "pll1_sys";
|
||||
arm-supply = <®_arm>;
|
||||
pu-supply = <®_pu>;
|
||||
soc-supply = <®_soc>;
|
||||
};
|
||||
|
||||
cpu@1 {
|
||||
compatible = "arm,cortex-a9";
|
||||
device_type = "cpu";
|
||||
reg = <1>;
|
||||
next-level-cache = <&L2>;
|
||||
};
|
||||
|
||||
cpu@2 {
|
||||
compatible = "arm,cortex-a9";
|
||||
device_type = "cpu";
|
||||
reg = <2>;
|
||||
next-level-cache = <&L2>;
|
||||
};
|
||||
|
||||
cpu@3 {
|
||||
compatible = "arm,cortex-a9";
|
||||
device_type = "cpu";
|
||||
reg = <3>;
|
||||
next-level-cache = <&L2>;
|
||||
};
|
||||
};
|
||||
|
||||
soc {
|
||||
ocram: sram@00900000 {
|
||||
compatible = "mmio-sram";
|
||||
reg = <0x00900000 0x40000>;
|
||||
clocks = <&clks IMX6QDL_CLK_OCRAM>;
|
||||
};
|
||||
|
||||
aips-bus@02000000 { /* AIPS1 */
|
||||
spba-bus@02000000 {
|
||||
ecspi5: ecspi@02018000 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
compatible = "fsl,imx6q-ecspi", "fsl,imx51-ecspi";
|
||||
reg = <0x02018000 0x4000>;
|
||||
interrupts = <0 35 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&clks IMX6Q_CLK_ECSPI5>,
|
||||
<&clks IMX6Q_CLK_ECSPI5>;
|
||||
clock-names = "ipg", "per";
|
||||
dmas = <&sdma 11 7 1>, <&sdma 12 7 2>;
|
||||
dma-names = "rx", "tx";
|
||||
status = "disabled";
|
||||
};
|
||||
};
|
||||
|
||||
iomuxc: iomuxc@020e0000 {
|
||||
compatible = "fsl,imx6q-iomuxc";
|
||||
};
|
||||
};
|
||||
|
||||
sata: sata@02200000 {
|
||||
compatible = "fsl,imx6q-ahci";
|
||||
reg = <0x02200000 0x4000>;
|
||||
interrupts = <0 39 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&clks IMX6QDL_CLK_SATA>,
|
||||
<&clks IMX6QDL_CLK_SATA_REF_100M>,
|
||||
<&clks IMX6QDL_CLK_AHB>;
|
||||
clock-names = "sata", "sata_ref", "ahb";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
gpu_vg: gpu@02204000 {
|
||||
compatible = "vivante,gc";
|
||||
reg = <0x02204000 0x4000>;
|
||||
interrupts = <0 11 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&clks IMX6QDL_CLK_OPENVG_AXI>,
|
||||
<&clks IMX6QDL_CLK_GPU2D_CORE>;
|
||||
clock-names = "bus", "core";
|
||||
power-domains = <&gpc 1>;
|
||||
};
|
||||
|
||||
ipu2: ipu@02800000 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
compatible = "fsl,imx6q-ipu";
|
||||
reg = <0x02800000 0x400000>;
|
||||
interrupts = <0 8 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<0 7 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&clks IMX6QDL_CLK_IPU2>,
|
||||
<&clks IMX6QDL_CLK_IPU2_DI0>,
|
||||
<&clks IMX6QDL_CLK_IPU2_DI1>;
|
||||
clock-names = "bus", "di0", "di1";
|
||||
resets = <&src 4>;
|
||||
|
||||
ipu2_csi0: port@0 {
|
||||
reg = <0>;
|
||||
};
|
||||
|
||||
ipu2_csi1: port@1 {
|
||||
reg = <1>;
|
||||
};
|
||||
|
||||
ipu2_di0: port@2 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
reg = <2>;
|
||||
|
||||
ipu2_di0_disp0: disp0-endpoint {
|
||||
};
|
||||
|
||||
ipu2_di0_hdmi: hdmi-endpoint {
|
||||
remote-endpoint = <&hdmi_mux_2>;
|
||||
};
|
||||
|
||||
ipu2_di0_mipi: mipi-endpoint {
|
||||
remote-endpoint = <&mipi_mux_2>;
|
||||
};
|
||||
|
||||
ipu2_di0_lvds0: lvds0-endpoint {
|
||||
remote-endpoint = <&lvds0_mux_2>;
|
||||
};
|
||||
|
||||
ipu2_di0_lvds1: lvds1-endpoint {
|
||||
remote-endpoint = <&lvds1_mux_2>;
|
||||
};
|
||||
};
|
||||
|
||||
ipu2_di1: port@3 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
reg = <3>;
|
||||
|
||||
ipu2_di1_hdmi: hdmi-endpoint {
|
||||
remote-endpoint = <&hdmi_mux_3>;
|
||||
};
|
||||
|
||||
ipu2_di1_mipi: mipi-endpoint {
|
||||
remote-endpoint = <&mipi_mux_3>;
|
||||
};
|
||||
|
||||
ipu2_di1_lvds0: lvds0-endpoint {
|
||||
remote-endpoint = <&lvds0_mux_3>;
|
||||
};
|
||||
|
||||
ipu2_di1_lvds1: lvds1-endpoint {
|
||||
remote-endpoint = <&lvds1_mux_3>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
display-subsystem {
|
||||
compatible = "fsl,imx-display-subsystem";
|
||||
ports = <&ipu1_di0>, <&ipu1_di1>, <&ipu2_di0>, <&ipu2_di1>;
|
||||
};
|
||||
|
||||
gpu-subsystem {
|
||||
compatible = "fsl,imx-gpu-subsystem";
|
||||
cores = <&gpu_2d>, <&gpu_3d>, <&gpu_vg>;
|
||||
};
|
||||
};
|
||||
|
||||
&hdmi {
|
||||
compatible = "fsl,imx6q-hdmi";
|
||||
|
||||
port@2 {
|
||||
reg = <2>;
|
||||
|
||||
hdmi_mux_2: endpoint {
|
||||
remote-endpoint = <&ipu2_di0_hdmi>;
|
||||
};
|
||||
};
|
||||
|
||||
port@3 {
|
||||
reg = <3>;
|
||||
|
||||
hdmi_mux_3: endpoint {
|
||||
remote-endpoint = <&ipu2_di1_hdmi>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&ldb {
|
||||
clocks = <&clks IMX6QDL_CLK_LDB_DI0_SEL>, <&clks IMX6QDL_CLK_LDB_DI1_SEL>,
|
||||
<&clks IMX6QDL_CLK_IPU1_DI0_SEL>, <&clks IMX6QDL_CLK_IPU1_DI1_SEL>,
|
||||
<&clks IMX6QDL_CLK_IPU2_DI0_SEL>, <&clks IMX6QDL_CLK_IPU2_DI1_SEL>,
|
||||
<&clks IMX6QDL_CLK_LDB_DI0>, <&clks IMX6QDL_CLK_LDB_DI1>;
|
||||
clock-names = "di0_pll", "di1_pll",
|
||||
"di0_sel", "di1_sel", "di2_sel", "di3_sel",
|
||||
"di0", "di1";
|
||||
|
||||
lvds-channel@0 {
|
||||
port@2 {
|
||||
reg = <2>;
|
||||
|
||||
lvds0_mux_2: endpoint {
|
||||
remote-endpoint = <&ipu2_di0_lvds0>;
|
||||
};
|
||||
};
|
||||
|
||||
port@3 {
|
||||
reg = <3>;
|
||||
|
||||
lvds0_mux_3: endpoint {
|
||||
remote-endpoint = <&ipu2_di1_lvds0>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
lvds-channel@1 {
|
||||
port@2 {
|
||||
reg = <2>;
|
||||
|
||||
lvds1_mux_2: endpoint {
|
||||
remote-endpoint = <&ipu2_di0_lvds1>;
|
||||
};
|
||||
};
|
||||
|
||||
port@3 {
|
||||
reg = <3>;
|
||||
|
||||
lvds1_mux_3: endpoint {
|
||||
remote-endpoint = <&ipu2_di1_lvds1>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&mipi_dsi {
|
||||
ports {
|
||||
port@2 {
|
||||
reg = <2>;
|
||||
|
||||
mipi_mux_2: endpoint {
|
||||
remote-endpoint = <&ipu2_di0_mipi>;
|
||||
};
|
||||
};
|
||||
|
||||
port@3 {
|
||||
reg = <3>;
|
||||
|
||||
mipi_mux_3: endpoint {
|
||||
remote-endpoint = <&ipu2_di1_mipi>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&vpu {
|
||||
compatible = "fsl,imx6q-vpu", "cnm,coda960";
|
||||
};
|
196
arch/arm/dts/imx6qdl-icore.dtsi
Normal file
196
arch/arm/dts/imx6qdl-icore.dtsi
Normal file
|
@ -0,0 +1,196 @@
|
|||
/*
|
||||
* Copyright (C) 2016 Amarula Solutions B.V.
|
||||
* Copyright (C) 2016 Engicam S.r.l.
|
||||
*
|
||||
* This file is dual-licensed: you can use it either under the terms
|
||||
* of the GPL or the X11 license, at your option. Note that this dual
|
||||
* licensing only applies to this file, and not this project as a
|
||||
* whole.
|
||||
*
|
||||
* a) This file is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* version 2 as published by the Free Software Foundation.
|
||||
*
|
||||
* This file is distributed in the hope that it will be useful
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* Or, alternatively
|
||||
*
|
||||
* b) Permission is hereby granted, free of charge, to any person
|
||||
* obtaining a copy of this software and associated documentation
|
||||
* files (the "Software"), to deal in the Software without
|
||||
* restriction, including without limitation the rights to use
|
||||
* copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
* sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following
|
||||
* conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be
|
||||
* included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED , WITHOUT WARRANTY OF ANY KIND
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
* OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/input/input.h>
|
||||
|
||||
/ {
|
||||
memory {
|
||||
reg = <0x10000000 0x80000000>;
|
||||
};
|
||||
|
||||
reg_3p3v: regulator-3p3v {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "3P3V";
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
regulator-boot-on;
|
||||
regulator-always-on;
|
||||
};
|
||||
};
|
||||
|
||||
&can1 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_flexcan1>;
|
||||
xceiver-supply = <®_3p3v>;
|
||||
};
|
||||
|
||||
&can2 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_flexcan2>;
|
||||
xceiver-supply = <®_3p3v>;
|
||||
};
|
||||
|
||||
&clks {
|
||||
assigned-clocks = <&clks IMX6QDL_CLK_LVDS2_SEL>;
|
||||
assigned-clock-parents = <&clks IMX6QDL_CLK_OSC>;
|
||||
};
|
||||
|
||||
&gpmi {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_gpmi_nand>;
|
||||
nand-on-flash-bbt;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&i2c1 {
|
||||
clock-frequency = <100000>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_i2c1>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&i2c2 {
|
||||
clock-frequency = <100000>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_i2c2>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&i2c3 {
|
||||
clock-frequency = <100000>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_i2c3>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&uart4 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_uart4>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usdhc1 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_usdhc1>;
|
||||
cd-gpios = <&gpio1 1 GPIO_ACTIVE_LOW>;
|
||||
no-1-8-v;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&iomuxc {
|
||||
pinctrl_flexcan1: flexcan1grp {
|
||||
fsl,pins = <
|
||||
MX6QDL_PAD_KEY_ROW2__FLEXCAN1_RX 0x1b020
|
||||
MX6QDL_PAD_KEY_COL2__FLEXCAN1_TX 0x1b020
|
||||
>;
|
||||
};
|
||||
|
||||
pinctrl_flexcan2: flexcan2grp {
|
||||
fsl,pins = <
|
||||
MX6QDL_PAD_KEY_COL4__FLEXCAN2_TX 0x1b020
|
||||
MX6QDL_PAD_KEY_ROW4__FLEXCAN2_RX 0x1b020
|
||||
>;
|
||||
};
|
||||
|
||||
pinctrl_gpmi_nand: gpmi-nand {
|
||||
fsl,pins = <
|
||||
MX6QDL_PAD_NANDF_CLE__NAND_CLE 0xb0b1
|
||||
MX6QDL_PAD_NANDF_ALE__NAND_ALE 0xb0b1
|
||||
MX6QDL_PAD_NANDF_WP_B__NAND_WP_B 0xb0b1
|
||||
MX6QDL_PAD_NANDF_RB0__NAND_READY_B 0xb000
|
||||
MX6QDL_PAD_NANDF_CS0__NAND_CE0_B 0xb0b1
|
||||
MX6QDL_PAD_NANDF_CS1__NAND_CE1_B 0xb0b1
|
||||
MX6QDL_PAD_SD4_CMD__NAND_RE_B 0xb0b1
|
||||
MX6QDL_PAD_SD4_CLK__NAND_WE_B 0xb0b1
|
||||
MX6QDL_PAD_NANDF_D0__NAND_DATA00 0xb0b1
|
||||
MX6QDL_PAD_NANDF_D1__NAND_DATA01 0xb0b1
|
||||
MX6QDL_PAD_NANDF_D2__NAND_DATA02 0xb0b1
|
||||
MX6QDL_PAD_NANDF_D3__NAND_DATA03 0xb0b1
|
||||
MX6QDL_PAD_NANDF_D4__NAND_DATA04 0xb0b1
|
||||
MX6QDL_PAD_NANDF_D5__NAND_DATA05 0xb0b1
|
||||
MX6QDL_PAD_NANDF_D6__NAND_DATA06 0xb0b1
|
||||
MX6QDL_PAD_NANDF_D7__NAND_DATA07 0xb0b1
|
||||
MX6QDL_PAD_SD4_DAT0__NAND_DQS 0x00b1
|
||||
>;
|
||||
};
|
||||
|
||||
pinctrl_i2c1: i2c1grp {
|
||||
fsl,pins = <
|
||||
MX6QDL_PAD_EIM_D21__I2C1_SCL 0x4001b8b1
|
||||
MX6QDL_PAD_EIM_D28__I2C1_SDA 0x4001b8b1
|
||||
>;
|
||||
};
|
||||
|
||||
pinctrl_i2c2: i2c2grp {
|
||||
fsl,pins = <
|
||||
MX6QDL_PAD_EIM_EB2__I2C2_SCL 0x4001b8b1
|
||||
MX6QDL_PAD_KEY_ROW3__I2C2_SDA 0x4001b8b1
|
||||
>;
|
||||
};
|
||||
|
||||
pinctrl_i2c3: i2c3grp {
|
||||
fsl,pins = <
|
||||
MX6QDL_PAD_GPIO_5__I2C3_SCL 0x4001b8b1
|
||||
MX6QDL_PAD_EIM_D18__I2C3_SDA 0x4001b8b1
|
||||
MX6QDL_PAD_GPIO_0__CCM_CLKO1 0x130b0
|
||||
>;
|
||||
};
|
||||
|
||||
pinctrl_uart4: uart4grp {
|
||||
fsl,pins = <
|
||||
MX6QDL_PAD_KEY_COL0__UART4_TX_DATA 0x1b0b1
|
||||
MX6QDL_PAD_KEY_ROW0__UART4_RX_DATA 0x1b0b1
|
||||
>;
|
||||
};
|
||||
|
||||
pinctrl_usdhc1: usdhc1grp {
|
||||
fsl,pins = <
|
||||
MX6QDL_PAD_SD1_CMD__SD1_CMD 0x17070
|
||||
MX6QDL_PAD_SD1_CLK__SD1_CLK 0x10070
|
||||
MX6QDL_PAD_SD1_DAT0__SD1_DATA0 0x17070
|
||||
MX6QDL_PAD_SD1_DAT1__SD1_DATA1 0x17070
|
||||
MX6QDL_PAD_SD1_DAT2__SD1_DATA2 0x17070
|
||||
MX6QDL_PAD_SD1_DAT3__SD1_DATA3 0x17070
|
||||
>;
|
||||
};
|
||||
};
|
1281
arch/arm/dts/imx6qdl.dtsi
Normal file
1281
arch/arm/dts/imx6qdl.dtsi
Normal file
File diff suppressed because it is too large
Load diff
|
@ -17,3 +17,17 @@ config IMX_BOOTAUX
|
|||
depends on ARCH_MX7 || ARCH_MX6
|
||||
help
|
||||
bootaux [addr] to boot auxiliary core.
|
||||
|
||||
config USE_IMXIMG_PLUGIN
|
||||
bool "Use imximage plugin code"
|
||||
depends on ARCH_MX7 || ARCH_MX6
|
||||
help
|
||||
i.MX6/7 supports DCD and Plugin. Enable this configuration
|
||||
to use Plugin, otherwise DCD will be used.
|
||||
|
||||
config SECURE_BOOT
|
||||
bool "Support i.MX HAB features"
|
||||
depends on ARCH_MX7 || ARCH_MX6 || ARCH_MX5
|
||||
help
|
||||
This option enables the support for secure boot (HAB).
|
||||
See doc/README.mxc_hab for more details.
|
||||
|
|
|
@ -38,6 +38,23 @@ obj-$(CONFIG_CMD_BMODE) += cmd_bmode.o
|
|||
obj-$(CONFIG_CMD_HDMIDETECT) += cmd_hdmidet.o
|
||||
obj-$(CONFIG_CMD_DEKBLOB) += cmd_dek.o
|
||||
|
||||
PLUGIN = board/$(BOARDDIR)/plugin
|
||||
|
||||
ifeq ($(CONFIG_USE_IMXIMG_PLUGIN),y)
|
||||
|
||||
$(PLUGIN).o: $(PLUGIN).S FORCE
|
||||
$(Q)mkdir -p $(dir $@)
|
||||
$(call if_changed_dep,as_o_S)
|
||||
|
||||
$(PLUGIN).bin: $(PLUGIN).o FORCE
|
||||
$(Q)mkdir -p $(dir $@)
|
||||
$(OBJCOPY) -O binary --gap-fill 0xff $< $@
|
||||
else
|
||||
|
||||
$(PLUGIN).bin:
|
||||
|
||||
endif
|
||||
|
||||
quiet_cmd_cpp_cfg = CFGS $@
|
||||
cmd_cpp_cfg = $(CPP) $(cpp_flags) -x c -o $@ $<
|
||||
|
||||
|
@ -47,24 +64,24 @@ $(IMX_CONFIG): %.cfgtmp: % FORCE
|
|||
$(Q)mkdir -p $(dir $@)
|
||||
$(call if_changed_dep,cpp_cfg)
|
||||
|
||||
MKIMAGEFLAGS_u-boot.imx = -n $(filter-out $< $(PHONY),$^) -T imximage \
|
||||
MKIMAGEFLAGS_u-boot.imx = -n $(filter-out $(PLUGIN).bin $< $(PHONY),$^) -T imximage \
|
||||
-e $(CONFIG_SYS_TEXT_BASE)
|
||||
|
||||
u-boot.imx: u-boot.bin $(IMX_CONFIG) FORCE
|
||||
u-boot.imx: u-boot.bin $(IMX_CONFIG) $(PLUGIN).bin FORCE
|
||||
$(call if_changed,mkimage)
|
||||
|
||||
ifeq ($(CONFIG_OF_SEPARATE),y)
|
||||
MKIMAGEFLAGS_u-boot-dtb.imx = -n $(filter-out $< $(PHONY),$^) -T imximage \
|
||||
MKIMAGEFLAGS_u-boot-dtb.imx = -n $(filter-out $(PLUGIN).bin $< $(PHONY),$^) -T imximage \
|
||||
-e $(CONFIG_SYS_TEXT_BASE)
|
||||
|
||||
u-boot-dtb.imx: u-boot-dtb.bin $(IMX_CONFIG) FORCE
|
||||
u-boot-dtb.imx: u-boot-dtb.bin $(IMX_CONFIG) $(PLUGIN).bin FORCE
|
||||
$(call if_changed,mkimage)
|
||||
endif
|
||||
|
||||
MKIMAGEFLAGS_SPL = -n $(filter-out $< $(PHONY),$^) -T imximage \
|
||||
MKIMAGEFLAGS_SPL = -n $(filter-out $(PLUGIN).bin $< $(PHONY),$^) -T imximage \
|
||||
-e $(CONFIG_SPL_TEXT_BASE)
|
||||
|
||||
SPL: spl/u-boot-spl.bin $(IMX_CONFIG) FORCE
|
||||
SPL: spl/u-boot-spl.bin $(IMX_CONFIG) $(PLUGIN).bin FORCE
|
||||
$(call if_changed,mkimage)
|
||||
|
||||
MKIMAGEFLAGS_u-boot.uim = -A arm -O U-Boot -a $(CONFIG_SYS_TEXT_BASE) \
|
||||
|
|
|
@ -120,3 +120,19 @@ ulong get_tbclk(void)
|
|||
{
|
||||
return gpt_get_clk();
|
||||
}
|
||||
|
||||
/*
|
||||
* This function is intended for SHORT delays only.
|
||||
* It will overflow at around 10 seconds @ 400MHz,
|
||||
* or 20 seconds @ 200MHz.
|
||||
*/
|
||||
unsigned long usec2ticks(unsigned long _usec)
|
||||
{
|
||||
unsigned long long usec = _usec;
|
||||
|
||||
usec *= get_tbclk();
|
||||
usec += 999999;
|
||||
do_div(usec, 1000000);
|
||||
|
||||
return usec;
|
||||
}
|
||||
|
|
159
arch/arm/include/asm/arch-mx6/mx6_plugin.S
Normal file
159
arch/arm/include/asm/arch-mx6/mx6_plugin.S
Normal file
|
@ -0,0 +1,159 @@
|
|||
/*
|
||||
* Copyright (C) 2016 Freescale Semiconductor, Inc.
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0+
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#ifdef CONFIG_ROM_UNIFIED_SECTIONS
|
||||
#define ROM_API_TABLE_BASE_ADDR_LEGACY 0x180
|
||||
#define ROM_VERSION_OFFSET 0x80
|
||||
#else
|
||||
#define ROM_API_TABLE_BASE_ADDR_LEGACY 0xC0
|
||||
#define ROM_VERSION_OFFSET 0x48
|
||||
#endif
|
||||
#define ROM_API_TABLE_BASE_ADDR_MX6DQ_TO15 0xC4
|
||||
#define ROM_API_TABLE_BASE_ADDR_MX6DL_TO12 0xC4
|
||||
#define ROM_API_HWCNFG_SETUP_OFFSET 0x08
|
||||
#define ROM_VERSION_TO10 0x10
|
||||
#define ROM_VERSION_TO12 0x12
|
||||
#define ROM_VERSION_TO15 0x15
|
||||
|
||||
plugin_start:
|
||||
|
||||
push {r0-r4, lr}
|
||||
|
||||
imx6_ddr_setting
|
||||
imx6_clock_gating
|
||||
imx6_qos_setting
|
||||
|
||||
/*
|
||||
* The following is to fill in those arguments for this ROM function
|
||||
* pu_irom_hwcnfg_setup(void **start, size_t *bytes, const void *boot_data)
|
||||
* This function is used to copy data from the storage media into DDR.
|
||||
* start - Initial (possibly partial) image load address on entry.
|
||||
* Final image load address on exit.
|
||||
* bytes - Initial (possibly partial) image size on entry.
|
||||
* Final image size on exit.
|
||||
* boot_data - Initial @ref ivt Boot Data load address.
|
||||
*/
|
||||
adr r0, boot_data2
|
||||
adr r1, image_len2
|
||||
adr r2, boot_data2
|
||||
|
||||
#ifdef CONFIG_NOR_BOOT
|
||||
#ifdef CONFIG_MX6SX
|
||||
ldr r3, =ROM_VERSION_OFFSET
|
||||
ldr r4, [r3]
|
||||
cmp r4, #ROM_VERSION_TO10
|
||||
bgt before_calling_rom___pu_irom_hwcnfg_setup
|
||||
ldr r3, =0x00900b00
|
||||
ldr r4, =0x50000000
|
||||
str r4, [r3, #0x5c]
|
||||
#else
|
||||
ldr r3, =0x00900800
|
||||
ldr r4, =0x08000000
|
||||
str r4, [r3, #0xc0]
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
* check the _pu_irom_api_table for the address
|
||||
*/
|
||||
before_calling_rom___pu_irom_hwcnfg_setup:
|
||||
ldr r3, =ROM_VERSION_OFFSET
|
||||
ldr r4, [r3]
|
||||
#if defined(CONFIG_MX6SOLO) || defined(CONFIG_MX6DL)
|
||||
ldr r3, =ROM_VERSION_TO12
|
||||
cmp r4, r3
|
||||
ldrge r3, =ROM_API_TABLE_BASE_ADDR_MX6DL_TO12
|
||||
ldrlt r3, =ROM_API_TABLE_BASE_ADDR_LEGACY
|
||||
#elif defined(CONFIG_MX6Q)
|
||||
ldr r3, =ROM_VERSION_TO15
|
||||
cmp r4, r3
|
||||
ldrge r3, =ROM_API_TABLE_BASE_ADDR_MX6DQ_TO15
|
||||
ldrlt r3, =ROM_API_TABLE_BASE_ADDR_LEGACY
|
||||
#else
|
||||
ldr r3, =ROM_API_TABLE_BASE_ADDR_LEGACY
|
||||
#endif
|
||||
ldr r4, [r3, #ROM_API_HWCNFG_SETUP_OFFSET]
|
||||
blx r4
|
||||
after_calling_rom___pu_irom_hwcnfg_setup:
|
||||
|
||||
/*
|
||||
* ROM_API_HWCNFG_SETUP function enables MMU & Caches.
|
||||
* Thus disable MMU & Caches.
|
||||
*/
|
||||
|
||||
mrc p15, 0, r0, c1, c0, 0 /* read CP15 register 1 into r0*/
|
||||
ands r0, r0, #0x1 /* check if MMU is enabled */
|
||||
beq mmu_disable_notreq /* exit if MMU is already disabled */
|
||||
|
||||
/* Disable caches, MMU */
|
||||
mrc p15, 0, r0, c1, c0, 0 /* read CP15 register 1 into r0 */
|
||||
bic r0, r0, #(1 << 2) /* disable D Cache */
|
||||
bic r0, r0, #0x1 /* clear bit 0 ; MMU off */
|
||||
|
||||
bic r0, r0, #(0x1 << 11) /* disable Z, branch prediction */
|
||||
bic r0, r0, #(0x1 << 1) /* disable A, Strict alignment */
|
||||
/* check enabled. */
|
||||
mcr p15, 0, r0, c1, c0, 0 /* write CP15 register 1 */
|
||||
mov r0, r0
|
||||
mov r0, r0
|
||||
mov r0, r0
|
||||
mov r0, r0
|
||||
|
||||
mmu_disable_notreq:
|
||||
NOP
|
||||
|
||||
/* To return to ROM from plugin, we need to fill in these argument.
|
||||
* Here is what need to do:
|
||||
* Need to construct the paramters for this function before return to ROM:
|
||||
* plugin_download(void **start, size_t *bytes, UINT32 *ivt_offset)
|
||||
*/
|
||||
pop {r0-r4, lr}
|
||||
push {r5}
|
||||
ldr r5, boot_data2
|
||||
str r5, [r0]
|
||||
ldr r5, image_len2
|
||||
str r5, [r1]
|
||||
ldr r5, second_ivt_offset
|
||||
str r5, [r2]
|
||||
mov r0, #1
|
||||
pop {r5}
|
||||
|
||||
/* return back to ROM code */
|
||||
bx lr
|
||||
|
||||
/* make the following data right in the end of the output*/
|
||||
.ltorg
|
||||
|
||||
#if (defined(CONFIG_NOR_BOOT) || defined(CONFIG_QSPI_BOOT))
|
||||
#define FLASH_OFFSET 0x1000
|
||||
#else
|
||||
#define FLASH_OFFSET 0x400
|
||||
#endif
|
||||
|
||||
/*
|
||||
* second_ivt_offset is the offset from the "second_ivt_header" to
|
||||
* "image_copy_start", which involves FLASH_OFFSET, plus the first
|
||||
* ivt_header, the plugin code size itself recorded by "ivt2_header"
|
||||
*/
|
||||
|
||||
second_ivt_offset: .long (ivt2_header + 0x2C + FLASH_OFFSET)
|
||||
|
||||
/*
|
||||
* The following is the second IVT header plus the second boot data
|
||||
*/
|
||||
ivt2_header: .long 0x0
|
||||
app2_code_jump_v: .long 0x0
|
||||
reserv3: .long 0x0
|
||||
dcd2_ptr: .long 0x0
|
||||
boot_data2_ptr: .long 0x0
|
||||
self_ptr2: .long 0x0
|
||||
app_code_csf2: .long 0x0
|
||||
reserv4: .long 0x0
|
||||
boot_data2: .long 0x0
|
||||
image_len2: .long 0x0
|
||||
plugin2: .long 0x0
|
111
arch/arm/include/asm/arch-mx7/mx7_plugin.S
Normal file
111
arch/arm/include/asm/arch-mx7/mx7_plugin.S
Normal file
|
@ -0,0 +1,111 @@
|
|||
/*
|
||||
* Copyright (C) 2016 Freescale Semiconductor, Inc.
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0+
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#define ROM_API_TABLE_BASE_ADDR_LEGACY 0x180
|
||||
#define ROM_VERSION_OFFSET 0x80
|
||||
#define ROM_API_HWCNFG_SETUP_OFFSET 0x08
|
||||
|
||||
plugin_start:
|
||||
|
||||
push {r0-r4, lr}
|
||||
|
||||
imx7_ddr_setting
|
||||
imx7_clock_gating
|
||||
imx7_qos_setting
|
||||
|
||||
/*
|
||||
* Check if we are in USB serial download mode and immediately return to ROM
|
||||
* Need to check USB CTRL clock firstly, then check the USBx_nASYNCLISTADDR
|
||||
*/
|
||||
ldr r0, =0x30384680
|
||||
ldr r1, [r0]
|
||||
cmp r1, #0
|
||||
beq normal_boot
|
||||
|
||||
ldr r0, =0x30B10158
|
||||
ldr r1, [r0]
|
||||
cmp r1, #0
|
||||
beq normal_boot
|
||||
|
||||
pop {r0-r4, lr}
|
||||
bx lr
|
||||
|
||||
normal_boot:
|
||||
|
||||
/*
|
||||
* The following is to fill in those arguments for this ROM function
|
||||
* pu_irom_hwcnfg_setup(void **start, size_t *bytes, const void *boot_data)
|
||||
* This function is used to copy data from the storage media into DDR.
|
||||
* start - Initial (possibly partial) image load address on entry.
|
||||
* Final image load address on exit.
|
||||
* bytes - Initial (possibly partial) image size on entry.
|
||||
* Final image size on exit.
|
||||
* boot_data - Initial @ref ivt Boot Data load address.
|
||||
*/
|
||||
adr r0, boot_data2
|
||||
adr r1, image_len2
|
||||
adr r2, boot_data2
|
||||
|
||||
/*
|
||||
* check the _pu_irom_api_table for the address
|
||||
*/
|
||||
before_calling_rom___pu_irom_hwcnfg_setup:
|
||||
ldr r3, =ROM_VERSION_OFFSET
|
||||
ldr r4, [r3]
|
||||
ldr r3, =ROM_API_TABLE_BASE_ADDR_LEGACY
|
||||
ldr r4, [r3, #ROM_API_HWCNFG_SETUP_OFFSET]
|
||||
blx r4
|
||||
after_calling_rom___pu_irom_hwcnfg_setup:
|
||||
|
||||
|
||||
/* To return to ROM from plugin, we need to fill in these argument.
|
||||
* Here is what need to do:
|
||||
* Need to construct the paramters for this function before return to ROM:
|
||||
* plugin_download(void **start, size_t *bytes, UINT32 *ivt_offset)
|
||||
*/
|
||||
pop {r0-r4, lr}
|
||||
push {r5}
|
||||
ldr r5, boot_data2
|
||||
str r5, [r0]
|
||||
ldr r5, image_len2
|
||||
str r5, [r1]
|
||||
ldr r5, second_ivt_offset
|
||||
str r5, [r2]
|
||||
mov r0, #1
|
||||
pop {r5}
|
||||
|
||||
/* return back to ROM code */
|
||||
bx lr
|
||||
|
||||
/* make the following data right in the end of the output*/
|
||||
.ltorg
|
||||
|
||||
#define FLASH_OFFSET 0x400
|
||||
|
||||
/*
|
||||
* second_ivt_offset is the offset from the "second_ivt_header" to
|
||||
* "image_copy_start", which involves FLASH_OFFSET, plus the first
|
||||
* ivt_header, the plugin code size itself recorded by "ivt2_header"
|
||||
*/
|
||||
|
||||
second_ivt_offset: .long (ivt2_header + 0x2C + FLASH_OFFSET)
|
||||
|
||||
/*
|
||||
* The following is the second IVT header plus the second boot data
|
||||
*/
|
||||
ivt2_header: .long 0x0
|
||||
app2_code_jump_v: .long 0x0
|
||||
reserv3: .long 0x0
|
||||
dcd2_ptr: .long 0x0
|
||||
boot_data2_ptr: .long 0x0
|
||||
self_ptr2: .long 0x0
|
||||
app_code_csf2: .long 0x0
|
||||
reserv4: .long 0x0
|
||||
boot_data2: .long 0x0
|
||||
image_len2: .long 0x0
|
||||
plugin2: .long 0x0
|
|
@ -30,8 +30,10 @@
|
|||
#define is_mx6dqp() (is_cpu_type(MXC_CPU_MX6QP) || is_cpu_type(MXC_CPU_MX6DP))
|
||||
#define is_mx6dq() (is_cpu_type(MXC_CPU_MX6Q) || is_cpu_type(MXC_CPU_MX6D))
|
||||
#define is_mx6sdl() (is_cpu_type(MXC_CPU_MX6SOLO) || is_cpu_type(MXC_CPU_MX6DL))
|
||||
#define is_mx6dl() (is_cpu_type(MXC_CPU_MX6DL))
|
||||
#define is_mx6sx() (is_cpu_type(MXC_CPU_MX6SX))
|
||||
#define is_mx6sl() (is_cpu_type(MXC_CPU_MX6SL))
|
||||
#define is_mx6solo() (is_cpu_type(MXC_CPU_MX6SOLO))
|
||||
#define is_mx6ul() (is_cpu_type(MXC_CPU_MX6UL))
|
||||
#define is_mx6ull() (is_cpu_type(MXC_CPU_MX6ULL))
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*
|
||||
* SPDX-License-Identifier: GPL-2.0+
|
||||
*
|
||||
* Refer docs/README.imxmage for more details about how-to configure
|
||||
* Refer doc/README.imximage for more details about how-to configure
|
||||
* and create imximage boot image
|
||||
*
|
||||
* The syntax is taken as close as possible with the kwbimage
|
||||
|
|
|
@ -20,6 +20,9 @@ BOOT_FROM spi
|
|||
|
||||
#define __ASSEMBLY__
|
||||
#include <config.h>
|
||||
#ifdef CONFIG_SECURE_BOOT
|
||||
CSF CONFIG_CSF_SIZE
|
||||
#endif
|
||||
#include "asm/arch/mx6-ddr.h"
|
||||
#include "asm/arch/iomux.h"
|
||||
#include "asm/arch/crm_regs.h"
|
||||
|
|
|
@ -20,6 +20,9 @@ BOOT_FROM spi
|
|||
|
||||
#define __ASSEMBLY__
|
||||
#include <config.h>
|
||||
#ifdef CONFIG_SECURE_BOOT
|
||||
CSF CONFIG_CSF_SIZE
|
||||
#endif
|
||||
#include "asm/arch/mx6-ddr.h"
|
||||
#include "asm/arch/iomux.h"
|
||||
#include "asm/arch/crm_regs.h"
|
||||
|
|
|
@ -20,6 +20,9 @@ BOOT_FROM spi
|
|||
|
||||
#define __ASSEMBLY__
|
||||
#include <config.h>
|
||||
#ifdef CONFIG_SECURE_BOOT
|
||||
CSF CONFIG_CSF_SIZE
|
||||
#endif
|
||||
#include "asm/arch/mx6-ddr.h"
|
||||
#include "asm/arch/iomux.h"
|
||||
#include "asm/arch/crm_regs.h"
|
||||
|
|
|
@ -20,6 +20,9 @@ BOOT_FROM spi
|
|||
|
||||
#define __ASSEMBLY__
|
||||
#include <config.h>
|
||||
#ifdef CONFIG_SECURE_BOOT
|
||||
CSF CONFIG_CSF_SIZE
|
||||
#endif
|
||||
#include "asm/arch/mx6-ddr.h"
|
||||
#include "asm/arch/iomux.h"
|
||||
#include "asm/arch/crm_regs.h"
|
||||
|
|
|
@ -20,6 +20,9 @@ BOOT_FROM spi
|
|||
|
||||
#define __ASSEMBLY__
|
||||
#include <config.h>
|
||||
#ifdef CONFIG_SECURE_BOOT
|
||||
CSF CONFIG_CSF_SIZE
|
||||
#endif
|
||||
#include "asm/arch/mx6-ddr.h"
|
||||
#include "asm/arch/iomux.h"
|
||||
#include "asm/arch/crm_regs.h"
|
||||
|
|
|
@ -20,6 +20,9 @@ BOOT_FROM spi
|
|||
|
||||
#define __ASSEMBLY__
|
||||
#include <config.h>
|
||||
#ifdef CONFIG_SECURE_BOOT
|
||||
CSF CONFIG_CSF_SIZE
|
||||
#endif
|
||||
#include "asm/arch/mx6-ddr.h"
|
||||
#include "asm/arch/iomux.h"
|
||||
#include "asm/arch/crm_regs.h"
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* SPDX-License-Identifier: GPL-2.0+
|
||||
*
|
||||
* Refer docs/README.imxmage for more details about how-to configure
|
||||
* Refer doc/README.imximage for more details about how-to configure
|
||||
* and create imximage boot image
|
||||
*
|
||||
* The syntax is taken as close as possible with the kwbimage
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* SPDX-License-Identifier: GPL-2.0+
|
||||
*
|
||||
* Refer docs/README.imxmage for more details about how-to configure
|
||||
* Refer doc/README.imximage for more details about how-to configure
|
||||
* and create imximage boot image
|
||||
*
|
||||
* The syntax is taken as close as possible with the kwbimage
|
||||
|
|
12
board/engicam/icorem6/Kconfig
Normal file
12
board/engicam/icorem6/Kconfig
Normal file
|
@ -0,0 +1,12 @@
|
|||
if TARGET_MX6Q_ICORE
|
||||
|
||||
config SYS_BOARD
|
||||
default "icorem6"
|
||||
|
||||
config SYS_VENDOR
|
||||
default "engicam"
|
||||
|
||||
config SYS_CONFIG_NAME
|
||||
default "imx6qdl_icore"
|
||||
|
||||
endif
|
6
board/engicam/icorem6/MAINTAINERS
Normal file
6
board/engicam/icorem6/MAINTAINERS
Normal file
|
@ -0,0 +1,6 @@
|
|||
ICOREM6QDL BOARD
|
||||
M: Jagan Teki <jagan@amarulasolutions.com>
|
||||
S: Maintained
|
||||
F: board/engicam/icorem6
|
||||
F: include/configs/icorem6qdl.h
|
||||
F: configs/icorem6qdl_defconfig
|
6
board/engicam/icorem6/Makefile
Normal file
6
board/engicam/icorem6/Makefile
Normal file
|
@ -0,0 +1,6 @@
|
|||
# Copyright (C) 2016 Amarula Solutions B.V.
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0+
|
||||
#
|
||||
|
||||
obj-y := icorem6.o
|
38
board/engicam/icorem6/README
Normal file
38
board/engicam/icorem6/README
Normal file
|
@ -0,0 +1,38 @@
|
|||
How to use U-Boot on Engicam i.CoreM6 DualLite/Solo and Quad/Dual Starter Kit:
|
||||
-----------------------------------------------------------------------------
|
||||
|
||||
- Configure U-Boot for Engicam i.CoreM6 QDL:
|
||||
|
||||
$ make mrproper
|
||||
$ make icorem6qdl_mmc_defconfig
|
||||
|
||||
- Build for i.CoreM6 DualLite/Solo
|
||||
|
||||
$ make
|
||||
|
||||
- Build for i.CoreM6 Quad/Dual
|
||||
|
||||
$ make DEVICE_TREE=imx6q-icore
|
||||
|
||||
This will generate the SPL image called SPL and the u-boot-dtb.img.
|
||||
|
||||
- Flash the SPL image into the micro SD card:
|
||||
|
||||
sudo dd if=SPL of=/dev/mmcblk0 bs=1k seek=1; sync
|
||||
|
||||
- Flash the u-boot-dtb.img image into the micro SD card:
|
||||
|
||||
sudo dd if=u-boot-dtb.img of=/dev/mmcblk0 bs=1k seek=69; sync
|
||||
|
||||
- Jumper settings:
|
||||
|
||||
MMC Boot: JM3 Closed
|
||||
|
||||
- Connect the Serial cable between the Starter Kit and the PC for the console.
|
||||
(J28 is the Linux Serial console connector)
|
||||
|
||||
- Insert the micro SD card in the board, power it up and U-Boot messages should
|
||||
come up.
|
||||
|
||||
- Note: For loading Linux on Quad/Dual modules set the dtb as
|
||||
icorem6qdl> setenv fdt_file imx6q-icore.dtb
|
537
board/engicam/icorem6/icorem6.c
Normal file
537
board/engicam/icorem6/icorem6.c
Normal file
|
@ -0,0 +1,537 @@
|
|||
/*
|
||||
* Copyright (C) 2016 Amarula Solutions B.V.
|
||||
* Copyright (C) 2016 Engicam S.r.l.
|
||||
* Author: Jagan Teki <jagan@amarulasolutions.com>
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0+
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <miiphy.h>
|
||||
#include <netdev.h>
|
||||
|
||||
#include <asm/io.h>
|
||||
#include <asm/gpio.h>
|
||||
#include <linux/sizes.h>
|
||||
|
||||
#include <asm/arch/clock.h>
|
||||
#include <asm/arch/crm_regs.h>
|
||||
#include <asm/arch/iomux.h>
|
||||
#include <asm/arch/mx6-pins.h>
|
||||
#include <asm/arch/sys_proto.h>
|
||||
#include <asm/imx-common/iomux-v3.h>
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
#define UART_PAD_CTRL (PAD_CTL_PKE | PAD_CTL_PUE | \
|
||||
PAD_CTL_PUS_100K_UP | PAD_CTL_SPEED_MED | \
|
||||
PAD_CTL_DSE_40ohm | PAD_CTL_SRE_FAST | PAD_CTL_HYS)
|
||||
|
||||
#define ENET_PAD_CTRL (PAD_CTL_PKE | PAD_CTL_PUE | \
|
||||
PAD_CTL_PUS_100K_UP | PAD_CTL_SPEED_MED | \
|
||||
PAD_CTL_DSE_40ohm | PAD_CTL_HYS)
|
||||
|
||||
static iomux_v3_cfg_t const uart4_pads[] = {
|
||||
IOMUX_PADS(PAD_KEY_COL0__UART4_TX_DATA | MUX_PAD_CTRL(UART_PAD_CTRL)),
|
||||
IOMUX_PADS(PAD_KEY_ROW0__UART4_RX_DATA | MUX_PAD_CTRL(UART_PAD_CTRL)),
|
||||
};
|
||||
|
||||
static iomux_v3_cfg_t const enet_pads[] = {
|
||||
IOMUX_PADS(PAD_ENET_CRS_DV__ENET_RX_EN | MUX_PAD_CTRL(ENET_PAD_CTRL)),
|
||||
IOMUX_PADS(PAD_GPIO_16__ENET_REF_CLK | MUX_PAD_CTRL(ENET_PAD_CTRL | PAD_CTL_SRE_FAST)),
|
||||
IOMUX_PADS(PAD_ENET_TX_EN__ENET_TX_EN | MUX_PAD_CTRL(ENET_PAD_CTRL)),
|
||||
IOMUX_PADS(PAD_ENET_RXD1__ENET_RX_DATA1 | MUX_PAD_CTRL(ENET_PAD_CTRL)),
|
||||
IOMUX_PADS(PAD_ENET_RXD0__ENET_RX_DATA0 | MUX_PAD_CTRL(ENET_PAD_CTRL)),
|
||||
IOMUX_PADS(PAD_ENET_TXD1__ENET_TX_DATA1 | MUX_PAD_CTRL(ENET_PAD_CTRL)),
|
||||
IOMUX_PADS(PAD_ENET_TXD0__ENET_TX_DATA0 | MUX_PAD_CTRL(ENET_PAD_CTRL)),
|
||||
IOMUX_PADS(PAD_ENET_MDC__ENET_MDC | MUX_PAD_CTRL(ENET_PAD_CTRL)),
|
||||
IOMUX_PADS(PAD_ENET_MDIO__ENET_MDIO | MUX_PAD_CTRL(ENET_PAD_CTRL)),
|
||||
IOMUX_PADS(PAD_GPIO_17__GPIO7_IO12 | MUX_PAD_CTRL(NO_PAD_CTRL)),
|
||||
};
|
||||
|
||||
#ifdef CONFIG_FEC_MXC
|
||||
#define ENET_PHY_RST IMX_GPIO_NR(7, 12)
|
||||
static int setup_fec(void)
|
||||
{
|
||||
struct mxc_ccm_reg *ccm = (struct mxc_ccm_reg *)CCM_BASE_ADDR;
|
||||
struct anatop_regs *anatop = (struct anatop_regs *)ANATOP_BASE_ADDR;
|
||||
s32 timeout = 100000;
|
||||
u32 reg = 0;
|
||||
int ret;
|
||||
|
||||
/* Enable fec clock */
|
||||
setbits_le32(&ccm->CCGR1, MXC_CCM_CCGR1_ENET_MASK);
|
||||
|
||||
/* use 50MHz */
|
||||
ret = enable_fec_anatop_clock(0, ENET_50MHZ);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
/* Enable PLLs */
|
||||
reg = readl(&anatop->pll_enet);
|
||||
reg &= ~BM_ANADIG_PLL_SYS_POWERDOWN;
|
||||
writel(reg, &anatop->pll_enet);
|
||||
reg = readl(&anatop->pll_enet);
|
||||
reg |= BM_ANADIG_PLL_SYS_ENABLE;
|
||||
while (timeout--) {
|
||||
if (readl(&anatop->pll_enet) & BM_ANADIG_PLL_SYS_LOCK)
|
||||
break;
|
||||
}
|
||||
if (timeout <= 0)
|
||||
return -EIO;
|
||||
reg &= ~BM_ANADIG_PLL_SYS_BYPASS;
|
||||
writel(reg, &anatop->pll_enet);
|
||||
|
||||
/* reset the phy */
|
||||
gpio_direction_output(ENET_PHY_RST, 0);
|
||||
udelay(10000);
|
||||
gpio_set_value(ENET_PHY_RST, 1);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int board_eth_init(bd_t *bis)
|
||||
{
|
||||
int ret;
|
||||
|
||||
SETUP_IOMUX_PADS(enet_pads);
|
||||
setup_fec();
|
||||
|
||||
return ret = cpu_eth_init(bis);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_NAND_MXS
|
||||
|
||||
#define GPMI_PAD_CTRL0 (PAD_CTL_PKE | PAD_CTL_PUE | PAD_CTL_PUS_100K_UP)
|
||||
#define GPMI_PAD_CTRL1 (PAD_CTL_DSE_40ohm | PAD_CTL_SPEED_MED | \
|
||||
PAD_CTL_SRE_FAST)
|
||||
#define GPMI_PAD_CTRL2 (GPMI_PAD_CTRL0 | GPMI_PAD_CTRL1)
|
||||
|
||||
iomux_v3_cfg_t gpmi_pads[] = {
|
||||
IOMUX_PADS(PAD_NANDF_CLE__NAND_CLE | MUX_PAD_CTRL(GPMI_PAD_CTRL2)),
|
||||
IOMUX_PADS(PAD_NANDF_ALE__NAND_ALE | MUX_PAD_CTRL(GPMI_PAD_CTRL2)),
|
||||
IOMUX_PADS(PAD_NANDF_WP_B__NAND_WP_B | MUX_PAD_CTRL(GPMI_PAD_CTRL2)),
|
||||
IOMUX_PADS(PAD_NANDF_RB0__NAND_READY_B | MUX_PAD_CTRL(GPMI_PAD_CTRL0)),
|
||||
IOMUX_PADS(PAD_NANDF_CS0__NAND_CE0_B | MUX_PAD_CTRL(GPMI_PAD_CTRL2)),
|
||||
IOMUX_PADS(PAD_SD4_CMD__NAND_RE_B | MUX_PAD_CTRL(GPMI_PAD_CTRL2)),
|
||||
IOMUX_PADS(PAD_SD4_CLK__NAND_WE_B | MUX_PAD_CTRL(GPMI_PAD_CTRL2)),
|
||||
IOMUX_PADS(PAD_NANDF_D0__NAND_DATA00 | MUX_PAD_CTRL(GPMI_PAD_CTRL2)),
|
||||
IOMUX_PADS(PAD_NANDF_D1__NAND_DATA01 | MUX_PAD_CTRL(GPMI_PAD_CTRL2)),
|
||||
IOMUX_PADS(PAD_NANDF_D2__NAND_DATA02 | MUX_PAD_CTRL(GPMI_PAD_CTRL2)),
|
||||
IOMUX_PADS(PAD_NANDF_D3__NAND_DATA03 | MUX_PAD_CTRL(GPMI_PAD_CTRL2)),
|
||||
IOMUX_PADS(PAD_NANDF_D4__NAND_DATA04 | MUX_PAD_CTRL(GPMI_PAD_CTRL2)),
|
||||
IOMUX_PADS(PAD_NANDF_D5__NAND_DATA05 | MUX_PAD_CTRL(GPMI_PAD_CTRL2)),
|
||||
IOMUX_PADS(PAD_NANDF_D6__NAND_DATA06 | MUX_PAD_CTRL(GPMI_PAD_CTRL2)),
|
||||
IOMUX_PADS(PAD_NANDF_D7__NAND_DATA07 | MUX_PAD_CTRL(GPMI_PAD_CTRL2)),
|
||||
};
|
||||
|
||||
static void setup_gpmi_nand(void)
|
||||
{
|
||||
struct mxc_ccm_reg *mxc_ccm = (struct mxc_ccm_reg *)CCM_BASE_ADDR;
|
||||
|
||||
/* config gpmi nand iomux */
|
||||
SETUP_IOMUX_PADS(gpmi_pads);
|
||||
|
||||
/* gate ENFC_CLK_ROOT clock first,before clk source switch */
|
||||
clrbits_le32(&mxc_ccm->CCGR2, MXC_CCM_CCGR2_IOMUX_IPT_CLK_IO_MASK);
|
||||
|
||||
/* config gpmi and bch clock to 100 MHz */
|
||||
clrsetbits_le32(&mxc_ccm->cs2cdr,
|
||||
MXC_CCM_CS2CDR_ENFC_CLK_PODF_MASK |
|
||||
MXC_CCM_CS2CDR_ENFC_CLK_PRED_MASK |
|
||||
MXC_CCM_CS2CDR_ENFC_CLK_SEL_MASK,
|
||||
MXC_CCM_CS2CDR_ENFC_CLK_PODF(0) |
|
||||
MXC_CCM_CS2CDR_ENFC_CLK_PRED(3) |
|
||||
MXC_CCM_CS2CDR_ENFC_CLK_SEL(3));
|
||||
|
||||
/* enable ENFC_CLK_ROOT clock */
|
||||
setbits_le32(&mxc_ccm->CCGR2, MXC_CCM_CCGR2_IOMUX_IPT_CLK_IO_MASK);
|
||||
|
||||
/* enable gpmi and bch clock gating */
|
||||
setbits_le32(&mxc_ccm->CCGR4,
|
||||
MXC_CCM_CCGR4_RAWNAND_U_BCH_INPUT_APB_MASK |
|
||||
MXC_CCM_CCGR4_RAWNAND_U_GPMI_BCH_INPUT_BCH_MASK |
|
||||
MXC_CCM_CCGR4_RAWNAND_U_GPMI_BCH_INPUT_GPMI_IO_MASK |
|
||||
MXC_CCM_CCGR4_RAWNAND_U_GPMI_INPUT_APB_MASK |
|
||||
MXC_CCM_CCGR4_PL301_MX6QPER1_BCH_OFFSET);
|
||||
|
||||
/* enable apbh clock gating */
|
||||
setbits_le32(&mxc_ccm->CCGR0, MXC_CCM_CCGR0_APBHDMA_MASK);
|
||||
}
|
||||
#endif
|
||||
|
||||
int board_early_init_f(void)
|
||||
{
|
||||
SETUP_IOMUX_PADS(uart4_pads);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int board_init(void)
|
||||
{
|
||||
/* Address of boot parameters */
|
||||
gd->bd->bi_boot_params = PHYS_SDRAM + 0x100;
|
||||
|
||||
#ifdef CONFIG_NAND_MXS
|
||||
setup_gpmi_nand();
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
int dram_init(void)
|
||||
{
|
||||
gd->ram_size = imx_ddr_size();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SPL_BUILD
|
||||
#include <libfdt.h>
|
||||
#include <spl.h>
|
||||
|
||||
#include <asm/arch/crm_regs.h>
|
||||
#include <asm/arch/mx6-ddr.h>
|
||||
|
||||
/* MMC board initialization is needed till adding DM support in SPL */
|
||||
#if defined(CONFIG_FSL_ESDHC) && !defined(CONFIG_DM_MMC)
|
||||
#include <mmc.h>
|
||||
#include <fsl_esdhc.h>
|
||||
|
||||
#define USDHC_PAD_CTRL (PAD_CTL_PKE | PAD_CTL_PUE | \
|
||||
PAD_CTL_PUS_22K_UP | PAD_CTL_SPEED_LOW | \
|
||||
PAD_CTL_DSE_80ohm | PAD_CTL_SRE_FAST | PAD_CTL_HYS)
|
||||
|
||||
static iomux_v3_cfg_t const usdhc1_pads[] = {
|
||||
IOMUX_PADS(PAD_SD1_CLK__SD1_CLK | MUX_PAD_CTRL(USDHC_PAD_CTRL)),
|
||||
IOMUX_PADS(PAD_SD1_CMD__SD1_CMD | MUX_PAD_CTRL(USDHC_PAD_CTRL)),
|
||||
IOMUX_PADS(PAD_SD1_DAT0__SD1_DATA0 | MUX_PAD_CTRL(USDHC_PAD_CTRL)),
|
||||
IOMUX_PADS(PAD_SD1_DAT1__SD1_DATA1 | MUX_PAD_CTRL(USDHC_PAD_CTRL)),
|
||||
IOMUX_PADS(PAD_SD1_DAT2__SD1_DATA2 | MUX_PAD_CTRL(USDHC_PAD_CTRL)),
|
||||
IOMUX_PADS(PAD_SD1_DAT3__SD1_DATA3 | MUX_PAD_CTRL(USDHC_PAD_CTRL)),
|
||||
IOMUX_PADS(PAD_GPIO_1__GPIO1_IO01 | MUX_PAD_CTRL(NO_PAD_CTRL)),/* CD */
|
||||
};
|
||||
|
||||
#define USDHC1_CD_GPIO IMX_GPIO_NR(1, 1)
|
||||
|
||||
struct fsl_esdhc_cfg usdhc_cfg[1] = {
|
||||
{USDHC1_BASE_ADDR, 0, 4},
|
||||
};
|
||||
|
||||
int board_mmc_getcd(struct mmc *mmc)
|
||||
{
|
||||
struct fsl_esdhc_cfg *cfg = (struct fsl_esdhc_cfg *)mmc->priv;
|
||||
int ret = 0;
|
||||
|
||||
switch (cfg->esdhc_base) {
|
||||
case USDHC1_BASE_ADDR:
|
||||
ret = !gpio_get_value(USDHC1_CD_GPIO);
|
||||
break;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int board_mmc_init(bd_t *bis)
|
||||
{
|
||||
int i, ret;
|
||||
|
||||
/*
|
||||
* According to the board_mmc_init() the following map is done:
|
||||
* (U-boot device node) (Physical Port)
|
||||
* mmc0 USDHC1
|
||||
*/
|
||||
for (i = 0; i < CONFIG_SYS_FSL_USDHC_NUM; i++) {
|
||||
switch (i) {
|
||||
case 0:
|
||||
SETUP_IOMUX_PADS(usdhc1_pads);
|
||||
gpio_direction_input(USDHC1_CD_GPIO);
|
||||
usdhc_cfg[0].sdhc_clk = mxc_get_clock(MXC_ESDHC_CLK);
|
||||
break;
|
||||
default:
|
||||
printf("Warning - USDHC%d controller not supporting\n",
|
||||
i + 1);
|
||||
return 0;
|
||||
}
|
||||
|
||||
ret = fsl_esdhc_initialize(bis, &usdhc_cfg[i]);
|
||||
if (ret) {
|
||||
printf("Warning: failed to initialize mmc dev %d\n", i);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Driving strength:
|
||||
* 0x30 == 40 Ohm
|
||||
* 0x28 == 48 Ohm
|
||||
*/
|
||||
|
||||
#define IMX6DQ_DRIVE_STRENGTH 0x30
|
||||
#define IMX6SDL_DRIVE_STRENGTH 0x28
|
||||
|
||||
/* configure MX6Q/DUAL mmdc DDR io registers */
|
||||
static struct mx6dq_iomux_ddr_regs mx6dq_ddr_ioregs = {
|
||||
.dram_sdqs0 = 0x28,
|
||||
.dram_sdqs1 = 0x28,
|
||||
.dram_sdqs2 = 0x28,
|
||||
.dram_sdqs3 = 0x28,
|
||||
.dram_sdqs4 = 0x28,
|
||||
.dram_sdqs5 = 0x28,
|
||||
.dram_sdqs6 = 0x28,
|
||||
.dram_sdqs7 = 0x28,
|
||||
.dram_dqm0 = 0x28,
|
||||
.dram_dqm1 = 0x28,
|
||||
.dram_dqm2 = 0x28,
|
||||
.dram_dqm3 = 0x28,
|
||||
.dram_dqm4 = 0x28,
|
||||
.dram_dqm5 = 0x28,
|
||||
.dram_dqm6 = 0x28,
|
||||
.dram_dqm7 = 0x28,
|
||||
.dram_cas = 0x30,
|
||||
.dram_ras = 0x30,
|
||||
.dram_sdclk_0 = 0x30,
|
||||
.dram_sdclk_1 = 0x30,
|
||||
.dram_reset = 0x30,
|
||||
.dram_sdcke0 = 0x3000,
|
||||
.dram_sdcke1 = 0x3000,
|
||||
.dram_sdba2 = 0x00000000,
|
||||
.dram_sdodt0 = 0x30,
|
||||
.dram_sdodt1 = 0x30,
|
||||
};
|
||||
|
||||
/* configure MX6Q/DUAL mmdc GRP io registers */
|
||||
static struct mx6dq_iomux_grp_regs mx6dq_grp_ioregs = {
|
||||
.grp_b0ds = 0x30,
|
||||
.grp_b1ds = 0x30,
|
||||
.grp_b2ds = 0x30,
|
||||
.grp_b3ds = 0x30,
|
||||
.grp_b4ds = 0x30,
|
||||
.grp_b5ds = 0x30,
|
||||
.grp_b6ds = 0x30,
|
||||
.grp_b7ds = 0x30,
|
||||
.grp_addds = 0x30,
|
||||
.grp_ddrmode_ctl = 0x00020000,
|
||||
.grp_ddrpke = 0x00000000,
|
||||
.grp_ddrmode = 0x00020000,
|
||||
.grp_ctlds = 0x30,
|
||||
.grp_ddr_type = 0x000c0000,
|
||||
};
|
||||
|
||||
/* configure MX6SOLO/DUALLITE mmdc DDR io registers */
|
||||
struct mx6sdl_iomux_ddr_regs mx6sdl_ddr_ioregs = {
|
||||
.dram_sdclk_0 = 0x30,
|
||||
.dram_sdclk_1 = 0x30,
|
||||
.dram_cas = 0x30,
|
||||
.dram_ras = 0x30,
|
||||
.dram_reset = 0x30,
|
||||
.dram_sdcke0 = 0x30,
|
||||
.dram_sdcke1 = 0x30,
|
||||
.dram_sdba2 = 0x00000000,
|
||||
.dram_sdodt0 = 0x30,
|
||||
.dram_sdodt1 = 0x30,
|
||||
.dram_sdqs0 = 0x28,
|
||||
.dram_sdqs1 = 0x28,
|
||||
.dram_sdqs2 = 0x28,
|
||||
.dram_sdqs3 = 0x28,
|
||||
.dram_sdqs4 = 0x28,
|
||||
.dram_sdqs5 = 0x28,
|
||||
.dram_sdqs6 = 0x28,
|
||||
.dram_sdqs7 = 0x28,
|
||||
.dram_dqm0 = 0x28,
|
||||
.dram_dqm1 = 0x28,
|
||||
.dram_dqm2 = 0x28,
|
||||
.dram_dqm3 = 0x28,
|
||||
.dram_dqm4 = 0x28,
|
||||
.dram_dqm5 = 0x28,
|
||||
.dram_dqm6 = 0x28,
|
||||
.dram_dqm7 = 0x28,
|
||||
};
|
||||
|
||||
/* configure MX6SOLO/DUALLITE mmdc GRP io registers */
|
||||
struct mx6sdl_iomux_grp_regs mx6sdl_grp_ioregs = {
|
||||
.grp_ddr_type = 0x000c0000,
|
||||
.grp_ddrmode_ctl = 0x00020000,
|
||||
.grp_ddrpke = 0x00000000,
|
||||
.grp_addds = 0x30,
|
||||
.grp_ctlds = 0x30,
|
||||
.grp_ddrmode = 0x00020000,
|
||||
.grp_b0ds = 0x28,
|
||||
.grp_b1ds = 0x28,
|
||||
.grp_b2ds = 0x28,
|
||||
.grp_b3ds = 0x28,
|
||||
.grp_b4ds = 0x28,
|
||||
.grp_b5ds = 0x28,
|
||||
.grp_b6ds = 0x28,
|
||||
.grp_b7ds = 0x28,
|
||||
};
|
||||
|
||||
/* mt41j256 */
|
||||
static struct mx6_ddr3_cfg mt41j256 = {
|
||||
.mem_speed = 1066,
|
||||
.density = 2,
|
||||
.width = 16,
|
||||
.banks = 8,
|
||||
.rowaddr = 13,
|
||||
.coladdr = 10,
|
||||
.pagesz = 2,
|
||||
.trcd = 1375,
|
||||
.trcmin = 4875,
|
||||
.trasmin = 3500,
|
||||
.SRT = 0,
|
||||
};
|
||||
|
||||
static struct mx6_mmdc_calibration mx6dq_mmdc_calib = {
|
||||
.p0_mpwldectrl0 = 0x000E0009,
|
||||
.p0_mpwldectrl1 = 0x0018000E,
|
||||
.p1_mpwldectrl0 = 0x00000007,
|
||||
.p1_mpwldectrl1 = 0x00000000,
|
||||
.p0_mpdgctrl0 = 0x43280334,
|
||||
.p0_mpdgctrl1 = 0x031C0314,
|
||||
.p1_mpdgctrl0 = 0x4318031C,
|
||||
.p1_mpdgctrl1 = 0x030C0258,
|
||||
.p0_mprddlctl = 0x3E343A40,
|
||||
.p1_mprddlctl = 0x383C3844,
|
||||
.p0_mpwrdlctl = 0x40404440,
|
||||
.p1_mpwrdlctl = 0x4C3E4446,
|
||||
};
|
||||
|
||||
/* DDR 64bit */
|
||||
static struct mx6_ddr_sysinfo mem_q = {
|
||||
.ddr_type = DDR_TYPE_DDR3,
|
||||
.dsize = 2,
|
||||
.cs1_mirror = 0,
|
||||
/* config for full 4GB range so that get_mem_size() works */
|
||||
.cs_density = 32,
|
||||
.ncs = 1,
|
||||
.bi_on = 1,
|
||||
.rtt_nom = 2,
|
||||
.rtt_wr = 2,
|
||||
.ralat = 5,
|
||||
.walat = 0,
|
||||
.mif3_mode = 3,
|
||||
.rst_to_cke = 0x23,
|
||||
.sde_to_rst = 0x10,
|
||||
};
|
||||
|
||||
static struct mx6_mmdc_calibration mx6dl_mmdc_calib = {
|
||||
.p0_mpwldectrl0 = 0x001F0024,
|
||||
.p0_mpwldectrl1 = 0x00110018,
|
||||
.p1_mpwldectrl0 = 0x001F0024,
|
||||
.p1_mpwldectrl1 = 0x00110018,
|
||||
.p0_mpdgctrl0 = 0x4230022C,
|
||||
.p0_mpdgctrl1 = 0x02180220,
|
||||
.p1_mpdgctrl0 = 0x42440248,
|
||||
.p1_mpdgctrl1 = 0x02300238,
|
||||
.p0_mprddlctl = 0x44444A48,
|
||||
.p1_mprddlctl = 0x46484A42,
|
||||
.p0_mpwrdlctl = 0x38383234,
|
||||
.p1_mpwrdlctl = 0x3C34362E,
|
||||
};
|
||||
|
||||
/* DDR 64bit 1GB */
|
||||
static struct mx6_ddr_sysinfo mem_dl = {
|
||||
.dsize = 2,
|
||||
.cs1_mirror = 0,
|
||||
/* config for full 4GB range so that get_mem_size() works */
|
||||
.cs_density = 32,
|
||||
.ncs = 1,
|
||||
.bi_on = 1,
|
||||
.rtt_nom = 1,
|
||||
.rtt_wr = 1,
|
||||
.ralat = 5,
|
||||
.walat = 0,
|
||||
.mif3_mode = 3,
|
||||
.rst_to_cke = 0x23,
|
||||
.sde_to_rst = 0x10,
|
||||
};
|
||||
|
||||
/* DDR 32bit 512MB */
|
||||
static struct mx6_ddr_sysinfo mem_s = {
|
||||
.dsize = 1,
|
||||
.cs1_mirror = 0,
|
||||
/* config for full 4GB range so that get_mem_size() works */
|
||||
.cs_density = 32,
|
||||
.ncs = 1,
|
||||
.bi_on = 1,
|
||||
.rtt_nom = 1,
|
||||
.rtt_wr = 1,
|
||||
.ralat = 5,
|
||||
.walat = 0,
|
||||
.mif3_mode = 3,
|
||||
.rst_to_cke = 0x23,
|
||||
.sde_to_rst = 0x10,
|
||||
};
|
||||
|
||||
static void ccgr_init(void)
|
||||
{
|
||||
struct mxc_ccm_reg *ccm = (struct mxc_ccm_reg *)CCM_BASE_ADDR;
|
||||
|
||||
writel(0x00003F3F, &ccm->CCGR0);
|
||||
writel(0x0030FC00, &ccm->CCGR1);
|
||||
writel(0x000FC000, &ccm->CCGR2);
|
||||
writel(0x3F300000, &ccm->CCGR3);
|
||||
writel(0xFF00F300, &ccm->CCGR4);
|
||||
writel(0x0F0000C3, &ccm->CCGR5);
|
||||
writel(0x000003CC, &ccm->CCGR6);
|
||||
}
|
||||
|
||||
static void gpr_init(void)
|
||||
{
|
||||
struct iomuxc *iomux = (struct iomuxc *)IOMUXC_BASE_ADDR;
|
||||
|
||||
/* enable AXI cache for VDOA/VPU/IPU */
|
||||
writel(0xF00000CF, &iomux->gpr[4]);
|
||||
/* set IPU AXI-id0 Qos=0xf(bypass) AXI-id1 Qos=0x7 */
|
||||
writel(0x007F007F, &iomux->gpr[6]);
|
||||
writel(0x007F007F, &iomux->gpr[7]);
|
||||
}
|
||||
|
||||
static void spl_dram_init(void)
|
||||
{
|
||||
if (is_mx6solo()) {
|
||||
mx6sdl_dram_iocfg(32, &mx6sdl_ddr_ioregs, &mx6sdl_grp_ioregs);
|
||||
mx6_dram_cfg(&mem_s, &mx6dl_mmdc_calib, &mt41j256);
|
||||
} else if (is_mx6dl()) {
|
||||
mx6sdl_dram_iocfg(64, &mx6sdl_ddr_ioregs, &mx6sdl_grp_ioregs);
|
||||
mx6_dram_cfg(&mem_dl, &mx6dl_mmdc_calib, &mt41j256);
|
||||
} else if (is_mx6dq()) {
|
||||
mx6dq_dram_iocfg(64, &mx6dq_ddr_ioregs, &mx6dq_grp_ioregs);
|
||||
mx6_dram_cfg(&mem_q, &mx6dq_mmdc_calib, &mt41j256);
|
||||
}
|
||||
|
||||
udelay(100);
|
||||
}
|
||||
|
||||
void board_init_f(ulong dummy)
|
||||
{
|
||||
ccgr_init();
|
||||
|
||||
/* setup AIPS and disable watchdog */
|
||||
arch_cpu_init();
|
||||
|
||||
gpr_init();
|
||||
|
||||
/* iomux */
|
||||
board_early_init_f();
|
||||
|
||||
/* setup GP timer */
|
||||
timer_init();
|
||||
|
||||
/* UART clocks enabled and gd valid - init serial console */
|
||||
preloader_console_init();
|
||||
|
||||
/* DDR initialization */
|
||||
spl_dram_init();
|
||||
|
||||
/* Clear the BSS. */
|
||||
memset(__bss_start, 0, __bss_end - __bss_start);
|
||||
|
||||
/* load/boot image from boot device */
|
||||
board_init_r(NULL, 0);
|
||||
}
|
||||
#endif
|
103
board/freescale/mx6sabresd/README
Normal file
103
board/freescale/mx6sabresd/README
Normal file
|
@ -0,0 +1,103 @@
|
|||
How to use and build U-Boot on mx6sabresd:
|
||||
----------------------------------
|
||||
|
||||
Currently there are three methods for booting mx6sabresd boards:
|
||||
|
||||
1. Booting via Normal U-Boot (u-boot.imx)
|
||||
|
||||
2. Booting via SPL (SPL and u-boot.img)
|
||||
|
||||
3. Booting via Falcon mode (SPL launches the kernel directly)
|
||||
|
||||
|
||||
1. Booting via Normal U-Boot
|
||||
----------------------------
|
||||
|
||||
$ make mx6qsabresd_defconfig (If you want to build for mx6qsabresd)
|
||||
|
||||
or
|
||||
|
||||
$ make mx6dlsabresd_defconfig (If you want to build for mx6dlsabresd)
|
||||
|
||||
$ make
|
||||
|
||||
This will generate the image called u-boot.imx.
|
||||
|
||||
- Flash the u-boot.imx binary into the SD card:
|
||||
|
||||
$ sudo dd if=u-boot.imx of=/dev/sdb bs=1K seek=1 && sync
|
||||
|
||||
|
||||
2. Booting via SPL
|
||||
------------------
|
||||
|
||||
Other method for building U-Boot on mx6qsabresd and mx6qpsabresd is
|
||||
through SPL. In order to do so:
|
||||
|
||||
$ make mx6sabresd_spl_defconfig
|
||||
$ make
|
||||
|
||||
This will generate the SPL image called SPL and the u-boot.img.
|
||||
|
||||
- Flash the SPL image into the SD card:
|
||||
|
||||
$ sudo dd if=SPL of=/dev/sdb bs=1K seek=1 && sync
|
||||
|
||||
- Flash the u-boot.img image into the SD card:
|
||||
|
||||
$ sudo dd if=u-boot.img of=/dev/sdbbs=1K seek=69 && sync
|
||||
|
||||
|
||||
3. Booting via Falcon mode
|
||||
--------------------------
|
||||
|
||||
$ make mx6sabresd_spl_defconfig
|
||||
$ make
|
||||
|
||||
This will generate the SPL image called SPL and the u-boot.img.
|
||||
|
||||
- Flash the SPL image into the SD card:
|
||||
|
||||
$ sudo dd if=SPL of=/dev/sdb bs=1K seek=1 oflag=sync status=none && sync
|
||||
|
||||
- Flash the u-boot.img image into the SD card:
|
||||
|
||||
$ sudo dd if=u-boot.img of=/dev/sdbbs=1K seek=69 oflag=sync status=none && sync
|
||||
|
||||
Create a partition for root file system and extract it there:
|
||||
|
||||
$ sudo tar xvf rootfs.tar.gz -C /media/root
|
||||
|
||||
The SD card must have enough space for raw "args" and "kernel".
|
||||
To configure Falcon mode for the first time, on U-Boot do the following commands:
|
||||
|
||||
- Setup the IP server:
|
||||
|
||||
# setenv serverip <server_ip_address>
|
||||
|
||||
- Download dtb file:
|
||||
|
||||
# dhcp ${fdt_addr} imx6q-sabresd.dtb
|
||||
|
||||
- Download kernel image:
|
||||
|
||||
# dhcp ${loadaddr} uImage
|
||||
|
||||
- Write kernel at 2MB offset:
|
||||
|
||||
# mmc write ${loadaddr} 0x1000 0x4000
|
||||
|
||||
- Setup kernel bootargs:
|
||||
|
||||
# setenv bootargs "console=ttymxc0,115200 root=/dev/mmcblk1p1 rootfstype=ext4 rootwait quiet rw"
|
||||
|
||||
- Prepare args:
|
||||
|
||||
# spl export fdt ${loadaddr} - ${fdt_addr}
|
||||
|
||||
- Write args 1MB data (0x800 sectors) to 1MB offset (0x800 sectors)
|
||||
|
||||
# mmc write 18000000 0x800 0x800
|
||||
|
||||
- Press KEY_VOL_UP key, power up the board and then SPL binary will
|
||||
launch the kernel directly.
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* SPDX-License-Identifier: GPL-2.0+
|
||||
*
|
||||
* Refer docs/README.imxmage for more details about how-to configure
|
||||
* Refer doc/README.imximage for more details about how-to configure
|
||||
* and create imximage boot image
|
||||
*
|
||||
* The syntax is taken as close as possible with the kwbimage
|
||||
|
|
|
@ -57,6 +57,8 @@ DECLARE_GLOBAL_DATA_PTR;
|
|||
|
||||
#define DISP0_PWR_EN IMX_GPIO_NR(1, 21)
|
||||
|
||||
#define KEY_VOL_UP IMX_GPIO_NR(1, 4)
|
||||
|
||||
int dram_init(void)
|
||||
{
|
||||
gd->ram_size = imx_ddr_size();
|
||||
|
@ -682,6 +684,16 @@ int checkboard(void)
|
|||
#include <spl.h>
|
||||
#include <libfdt.h>
|
||||
|
||||
#ifdef CONFIG_SPL_OS_BOOT
|
||||
int spl_start_uboot(void)
|
||||
{
|
||||
gpio_direction_input(KEY_VOL_UP);
|
||||
|
||||
/* Only enter in Falcon mode if KEY_VOL_UP is pressed */
|
||||
return gpio_get_value(KEY_VOL_UP);
|
||||
}
|
||||
#endif
|
||||
|
||||
static void ccgr_init(void)
|
||||
{
|
||||
struct mxc_ccm_reg *ccm = (struct mxc_ccm_reg *)CCM_BASE_ADDR;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* SPDX-License-Identifier: GPL-2.0+
|
||||
*
|
||||
* Refer docs/README.imxmage for more details about how-to configure
|
||||
* Refer doc/README.imximage for more details about how-to configure
|
||||
* and create imximage boot image
|
||||
*
|
||||
* The syntax is taken as close as possible with the kwbimage
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* SPDX-License-Identifier: GPL-2.0+
|
||||
*
|
||||
* Refer docs/README.imxmage for more details about how-to configure
|
||||
* Refer doc/README.imximage for more details about how-to configure
|
||||
* and create imximage boot image
|
||||
*
|
||||
* The syntax is taken as close as possible with the kwbimage
|
||||
|
@ -21,15 +21,15 @@ IMAGE_VERSION 2
|
|||
* spi/sd/nand/onenand, qspi/nor
|
||||
*/
|
||||
|
||||
#ifdef CONFIG_SYS_BOOT_QSPI
|
||||
#ifdef CONFIG_QSPI_BOOT
|
||||
BOOT_FROM qspi
|
||||
#elif defined(CONFIG_SYS_BOOT_EIMNOR)
|
||||
#elif defined(CONFIG_NOR_BOOT)
|
||||
BOOT_FROM nor
|
||||
#else
|
||||
BOOT_FROM sd
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_USE_PLUGIN
|
||||
#ifdef CONFIG_USE_IMXIMG_PLUGIN
|
||||
/*PLUGIN plugin-binary-file IRAM_FREE_START_ADDR*/
|
||||
PLUGIN board/freescale/mx6ullevk/plugin.bin 0x00907000
|
||||
#else
|
||||
|
|
139
board/freescale/mx6ullevk/plugin.S
Normal file
139
board/freescale/mx6ullevk/plugin.S
Normal file
|
@ -0,0 +1,139 @@
|
|||
/*
|
||||
* Copyright (C) 2016 Freescale Semiconductor, Inc.
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0+
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
|
||||
/* DDR script */
|
||||
.macro imx6ull_ddr3_evk_setting
|
||||
ldr r0, =IOMUXC_BASE_ADDR
|
||||
ldr r1, =0x000C0000
|
||||
str r1, [r0, #0x4B4]
|
||||
ldr r1, =0x00000000
|
||||
str r1, [r0, #0x4AC]
|
||||
ldr r1, =0x00000030
|
||||
str r1, [r0, #0x27C]
|
||||
ldr r1, =0x00000030
|
||||
str r1, [r0, #0x250]
|
||||
str r1, [r0, #0x24C]
|
||||
str r1, [r0, #0x490]
|
||||
ldr r1, =0x000C0030
|
||||
str r1, [r0, #0x288]
|
||||
|
||||
ldr r1, =0x00000000
|
||||
str r1, [r0, #0x270]
|
||||
|
||||
ldr r1, =0x00000030
|
||||
str r1, [r0, #0x260]
|
||||
str r1, [r0, #0x264]
|
||||
str r1, [r0, #0x4A0]
|
||||
|
||||
ldr r1, =0x00020000
|
||||
str r1, [r0, #0x494]
|
||||
|
||||
ldr r1, =0x00000030
|
||||
str r1, [r0, #0x280]
|
||||
ldr r1, =0x00000030
|
||||
str r1, [r0, #0x284]
|
||||
|
||||
ldr r1, =0x00020000
|
||||
str r1, [r0, #0x4B0]
|
||||
|
||||
ldr r1, =0x00000030
|
||||
str r1, [r0, #0x498]
|
||||
str r1, [r0, #0x4A4]
|
||||
str r1, [r0, #0x244]
|
||||
str r1, [r0, #0x248]
|
||||
|
||||
ldr r0, =MMDC_P0_BASE_ADDR
|
||||
ldr r1, =0x00008000
|
||||
str r1, [r0, #0x1C]
|
||||
ldr r1, =0xA1390003
|
||||
str r1, [r0, #0x800]
|
||||
ldr r1, =0x00000004
|
||||
str r1, [r0, #0x80C]
|
||||
ldr r1, =0x41640158
|
||||
str r1, [r0, #0x83C]
|
||||
ldr r1, =0x40403237
|
||||
str r1, [r0, #0x848]
|
||||
ldr r1, =0x40403C33
|
||||
str r1, [r0, #0x850]
|
||||
ldr r1, =0x33333333
|
||||
str r1, [r0, #0x81C]
|
||||
str r1, [r0, #0x820]
|
||||
ldr r1, =0xF3333333
|
||||
str r1, [r0, #0x82C]
|
||||
str r1, [r0, #0x830]
|
||||
ldr r1, =0x00944009
|
||||
str r1, [r0, #0x8C0]
|
||||
ldr r1, =0x00000800
|
||||
str r1, [r0, #0x8B8]
|
||||
ldr r1, =0x0002002D
|
||||
str r1, [r0, #0x004]
|
||||
ldr r1, =0x1B333030
|
||||
str r1, [r0, #0x008]
|
||||
ldr r1, =0x676B52F3
|
||||
str r1, [r0, #0x00C]
|
||||
ldr r1, =0xB66D0B63
|
||||
str r1, [r0, #0x010]
|
||||
ldr r1, =0x01FF00DB
|
||||
str r1, [r0, #0x014]
|
||||
ldr r1, =0x00201740
|
||||
str r1, [r0, #0x018]
|
||||
ldr r1, =0x00008000
|
||||
str r1, [r0, #0x01C]
|
||||
ldr r1, =0x000026D2
|
||||
str r1, [r0, #0x02C]
|
||||
ldr r1, =0x006B1023
|
||||
str r1, [r0, #0x030]
|
||||
ldr r1, =0x0000004F
|
||||
str r1, [r0, #0x040]
|
||||
ldr r1, =0x84180000
|
||||
str r1, [r0, #0x000]
|
||||
ldr r1, =0x00400000
|
||||
str r1, [r0, #0x890]
|
||||
ldr r1, =0x02008032
|
||||
str r1, [r0, #0x01C]
|
||||
ldr r1, =0x00008033
|
||||
str r1, [r0, #0x01C]
|
||||
ldr r1, =0x00048031
|
||||
str r1, [r0, #0x01C]
|
||||
ldr r1, =0x15208030
|
||||
str r1, [r0, #0x01C]
|
||||
ldr r1, =0x04008040
|
||||
str r1, [r0, #0x01C]
|
||||
ldr r1, =0x00000800
|
||||
str r1, [r0, #0x020]
|
||||
ldr r1, =0x00000227
|
||||
str r1, [r0, #0x818]
|
||||
ldr r1, =0x0002552D
|
||||
str r1, [r0, #0x004]
|
||||
ldr r1, =0x00011006
|
||||
str r1, [r0, #0x404]
|
||||
ldr r1, =0x00000000
|
||||
str r1, [r0, #0x01C]
|
||||
.endm
|
||||
|
||||
.macro imx6_clock_gating
|
||||
ldr r0, =CCM_BASE_ADDR
|
||||
ldr r1, =0xFFFFFFFF
|
||||
str r1, [r0, #0x68]
|
||||
str r1, [r0, #0x6C]
|
||||
str r1, [r0, #0x70]
|
||||
str r1, [r0, #0x74]
|
||||
str r1, [r0, #0x78]
|
||||
str r1, [r0, #0x7C]
|
||||
str r1, [r0, #0x80]
|
||||
.endm
|
||||
|
||||
.macro imx6_qos_setting
|
||||
.endm
|
||||
|
||||
.macro imx6_ddr_setting
|
||||
imx6ull_ddr3_evk_setting
|
||||
.endm
|
||||
|
||||
/* include the common plugin code here */
|
||||
#include <asm/arch/mx6_plugin.S>
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* SPDX-License-Identifier: GPL-2.0+
|
||||
*
|
||||
* Refer docs/README.imxmage for more details about how-to configure
|
||||
* Refer doc/README.imximage for more details about how-to configure
|
||||
* and create imximage boot image
|
||||
*
|
||||
* The syntax is taken as close as possible with the kwbimage
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*/
|
||||
|
||||
/*
|
||||
* Refer docs/README.imxmage for more details about how-to configure
|
||||
* Refer doc/README.imximage for more details about how-to configure
|
||||
* and create imximage boot image
|
||||
*
|
||||
* The syntax is taken as close as possible with the kwbimage
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* SPDX-License-Identifier: GPL-2.0+
|
||||
*
|
||||
* Refer docs/README.imxmage for more details about how-to configure
|
||||
* Refer doc/README.imximage for more details about how-to configure
|
||||
* and create imximage boot image
|
||||
*
|
||||
* The syntax is taken as close as possible with the kwbimage
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* SPDX-License-Identifier: GPL-2.0+
|
||||
*
|
||||
* Refer docs/README.imxmage for more details about how-to configure
|
||||
* Refer doc/README.imximage for more details about how-to configure
|
||||
* and create imximage boot image
|
||||
*
|
||||
* The syntax is taken as close as possible with the kwbimage
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* SPDX-License-Identifier: GPL-2.0+
|
||||
*
|
||||
* Refer docs/README.imxmage for more details about how-to configure
|
||||
* Refer doc/README.imximage for more details about how-to configure
|
||||
* and create imximage boot image
|
||||
*
|
||||
* The syntax is taken as close as possible with the kwbimage
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* SPDX-License-Identifier: GPL-2.0+
|
||||
*
|
||||
* Refer docs/README.imxmage for more details about how-to configure
|
||||
* Refer doc/README.imximage for more details about how-to configure
|
||||
* and create imximage boot image
|
||||
*
|
||||
* The syntax is taken as close as possible with the kwbimage
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* SPDX-License-Identifier: GPL-2.0+
|
||||
*
|
||||
* Refer docs/README.imxmage for more details about how-to configure
|
||||
* Refer doc/README.imximage for more details about how-to configure
|
||||
* and create imximage boot image
|
||||
*
|
||||
* The syntax is taken as close as possible with the kwbimage
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* SPDX-License-Identifier: GPL-2.0+
|
||||
*
|
||||
* Refer docs/README.imxmage for more details about how-to configure
|
||||
* Refer doc/README.imximage for more details about how-to configure
|
||||
* and create imximage boot image
|
||||
*
|
||||
* The syntax is taken as close as possible with the kwbimage
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* SPDX-License-Identifier: GPL-2.0
|
||||
*
|
||||
* Refer docs/README.imxmage for more details about how-to configure
|
||||
* Refer doc/README.imximage for more details about how-to configure
|
||||
* and create imximage boot image
|
||||
*
|
||||
* The syntax is taken as close as possible with the kwbimage
|
||||
|
|
|
@ -346,6 +346,11 @@ config SYS_STDIO_DEREGISTER
|
|||
|
||||
endmenu
|
||||
|
||||
config DEFAULT_FDT_FILE
|
||||
string "Default fdt file"
|
||||
help
|
||||
This option is used to set the default fdt file to boot OS.
|
||||
|
||||
config SYS_NO_FLASH
|
||||
bool "Disable support for parallel NOR flash"
|
||||
default n
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
CONFIG_ARM=y
|
||||
CONFIG_ARCH_MX6=y
|
||||
CONFIG_TARGET_ADVANTECH_DMS_BA16=y
|
||||
CONFIG_DEFAULT_FDT_FILE="imx6q-dms-ba16.dtb"
|
||||
CONFIG_SYS_DDR_1G=y
|
||||
CONFIG_VIDEO=y
|
||||
CONFIG_BOOTDELAY=1
|
||||
|
|
|
@ -2,6 +2,7 @@ CONFIG_ARM=y
|
|||
CONFIG_ARCH_MX6=y
|
||||
CONFIG_TARGET_ADVANTECH_DMS_BA16=y
|
||||
CONFIG_VIDEO=y
|
||||
CONFIG_DEFAULT_FDT_FILE="imx6q-dms-ba16.dtb"
|
||||
CONFIG_BOOTDELAY=1
|
||||
# CONFIG_CONSOLE_MUX is not set
|
||||
CONFIG_SYS_CONSOLE_IS_IN_ENV=y
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
CONFIG_ARM=y
|
||||
CONFIG_ARCH_MX6=y
|
||||
CONFIG_TARGET_GE_B450V3=y
|
||||
CONFIG_DEFAULT_FDT_FILE="/boot/imx6q-b450v3.dtb"
|
||||
# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
|
||||
CONFIG_BOOTDELAY=1
|
||||
CONFIG_SYS_CONSOLE_IS_IN_ENV=y
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
CONFIG_ARM=y
|
||||
CONFIG_ARCH_MX6=y
|
||||
CONFIG_TARGET_GE_B650V3=y
|
||||
CONFIG_DEFAULT_FDT_FILE="/boot/imx6q-b650v3.dtb"
|
||||
# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
|
||||
CONFIG_BOOTDELAY=1
|
||||
CONFIG_SYS_CONSOLE_IS_IN_ENV=y
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
CONFIG_ARM=y
|
||||
CONFIG_ARCH_MX6=y
|
||||
CONFIG_TARGET_GE_B850V3=y
|
||||
CONFIG_DEFAULT_FDT_FILE="/boot/imx6q-b850v3.dtb"
|
||||
# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
|
||||
CONFIG_BOOTDELAY=1
|
||||
CONFIG_SYS_CONSOLE_IS_IN_ENV=y
|
||||
|
|
44
configs/imx6qdl_icore_mmc_defconfig
Normal file
44
configs/imx6qdl_icore_mmc_defconfig
Normal file
|
@ -0,0 +1,44 @@
|
|||
CONFIG_ARM=y
|
||||
CONFIG_ARCH_MX6=y
|
||||
CONFIG_TARGET_MX6Q_ICORE=y
|
||||
CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/imx-common/spl_sd.cfg,ENV_IS_IN_MMC"
|
||||
CONFIG_DEFAULT_FDT_FILE="imx6dl-icore.dtb"
|
||||
CONFIG_DEFAULT_DEVICE_TREE="imx6dl-icore"
|
||||
CONFIG_SYS_PROMPT="icorem6qdl> "
|
||||
CONFIG_SPL=y
|
||||
CONFIG_BOOTDELAY=3
|
||||
CONFIG_BOARD_EARLY_INIT_F=y
|
||||
CONFIG_DISPLAY_CPUINFO=y
|
||||
CONFIG_HUSH_PARSER=y
|
||||
CONFIG_AUTO_COMPLETE=y
|
||||
CONFIG_SYS_MAXARGS=32
|
||||
# CONFIG_CMD_IMLS is not set
|
||||
# CONFIG_BLK is not set
|
||||
# CONFIG_DM_MMC_OPS is not set
|
||||
CONFIG_CMD_BOOTZ=y
|
||||
CONFIG_CMD_GPIO=y
|
||||
CONFIG_CMD_MII=y
|
||||
CONFIG_CMD_PING=y
|
||||
CONFIG_CMD_MEMTEST=y
|
||||
CONFIG_CMD_MMC=y
|
||||
CONFIG_CMD_CACHE=y
|
||||
CONFIG_CMD_EXT2=y
|
||||
CONFIG_CMD_EXT4=y
|
||||
CONFIG_CMD_EXT4_WRITE=y
|
||||
CONFIG_CMD_FAT=y
|
||||
CONFIG_CMD_FS_GENERIC=y
|
||||
CONFIG_OF_LIBFDT=y
|
||||
CONFIG_FEC_MXC=y
|
||||
CONFIG_MXC_UART=y
|
||||
CONFIG_NETDEVICES=y
|
||||
CONFIG_IMX_THERMAL=y
|
||||
CONFIG_PINCTRL=y
|
||||
CONFIG_PINCTRL_IMX6=y
|
||||
CONFIG_SPL_LIBDISK_SUPPORT=y
|
||||
CONFIG_SPL_LIBCOMMON_SUPPORT=y
|
||||
CONFIG_SPL_LIBGENERIC_SUPPORT=y
|
||||
CONFIG_SPL_SERIAL_SUPPORT=y
|
||||
CONFIG_SPL_I2C_SUPPORT=y
|
||||
CONFIG_SPL_GPIO_SUPPORT=y
|
||||
CONFIG_SPL_WATCHDOG_SUPPORT=y
|
||||
CONFIG_SPL_EXT_SUPPORT=y
|
39
configs/imx6qdl_icore_nand_defconfig
Normal file
39
configs/imx6qdl_icore_nand_defconfig
Normal file
|
@ -0,0 +1,39 @@
|
|||
CONFIG_ARM=y
|
||||
CONFIG_ARCH_MX6=y
|
||||
CONFIG_TARGET_MX6Q_ICORE=y
|
||||
CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/imx-common/spl_sd.cfg,ENV_IS_IN_NAND"
|
||||
CONFIG_DEFAULT_FDT_FILE="imx6dl-icore.dtb"
|
||||
CONFIG_DEFAULT_DEVICE_TREE="imx6dl-icore"
|
||||
CONFIG_SYS_PROMPT="icorem6qdl> "
|
||||
CONFIG_SPL=y
|
||||
CONFIG_BOOTDELAY=3
|
||||
CONFIG_BOARD_EARLY_INIT_F=y
|
||||
CONFIG_DISPLAY_CPUINFO=y
|
||||
CONFIG_HUSH_PARSER=y
|
||||
CONFIG_AUTO_COMPLETE=y
|
||||
CONFIG_SYS_MAXARGS=32
|
||||
# CONFIG_CMD_IMLS is not set
|
||||
CONFIG_CMD_BOOTZ=y
|
||||
CONFIG_CMD_GPIO=y
|
||||
CONFIG_CMD_MII=y
|
||||
CONFIG_CMD_PING=y
|
||||
CONFIG_CMD_MEMTEST=y
|
||||
CONFIG_CMD_NAND=y
|
||||
CONFIG_CMD_CACHE=y
|
||||
CONFIG_OF_LIBFDT=y
|
||||
CONFIG_FEC_MXC=y
|
||||
CONFIG_MXC_UART=y
|
||||
CONFIG_NAND_MXS=y
|
||||
CONFIG_NETDEVICES=y
|
||||
CONFIG_IMX_THERMAL=y
|
||||
# CONFIG_BLK is not set
|
||||
# CONFIG_DM_MMC_OPS is not set
|
||||
CONFIG_PINCTRL=y
|
||||
CONFIG_PINCTRL_IMX6=y
|
||||
CONFIG_SPL_LIBCOMMON_SUPPORT=y
|
||||
CONFIG_SPL_LIBGENERIC_SUPPORT=y
|
||||
CONFIG_SPL_SERIAL_SUPPORT=y
|
||||
CONFIG_SPL_I2C_SUPPORT=y
|
||||
CONFIG_SPL_GPIO_SUPPORT=y
|
||||
CONFIG_SPL_WATCHDOG_SUPPORT=y
|
||||
CONFIG_SPL_DMA_SUPPORT=y
|
|
@ -1,6 +1,7 @@
|
|||
CONFIG_ARM=y
|
||||
CONFIG_TARGET_MX25PDK=y
|
||||
CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/mx25pdk/imximage.cfg"
|
||||
CONFIG_DEFAULT_FDT_FILE="imx25-pdk.dtb"
|
||||
CONFIG_BOOTDELAY=1
|
||||
CONFIG_HUSH_PARSER=y
|
||||
CONFIG_CMD_BOOTZ=y
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
CONFIG_ARM=y
|
||||
CONFIG_TARGET_MX53ARD=y
|
||||
CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/mx53ard/imximage_dd3.cfg"
|
||||
CONFIG_DEFAULT_FDT_FILE="imx53-ard.dtb"
|
||||
CONFIG_BOOTDELAY=3
|
||||
CONFIG_HUSH_PARSER=y
|
||||
CONFIG_CMD_BOOTZ=y
|
||||
|
|
33
configs/mx6ull_14x14_evk_plugin_defconfig
Normal file
33
configs/mx6ull_14x14_evk_plugin_defconfig
Normal file
|
@ -0,0 +1,33 @@
|
|||
CONFIG_ARM=y
|
||||
CONFIG_ARCH_MX6=y
|
||||
CONFIG_TARGET_MX6ULL_14X14_EVK=y
|
||||
CONFIG_USE_IMXIMG_PLUGIN=y
|
||||
CONFIG_DEFAULT_DEVICE_TREE="imx6ull-14x14-evk"
|
||||
CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/mx6ullevk/imximage.cfg"
|
||||
CONFIG_BOOTDELAY=3
|
||||
CONFIG_HUSH_PARSER=y
|
||||
CONFIG_CMD_BOOTZ=y
|
||||
# CONFIG_CMD_IMLS is not set
|
||||
CONFIG_CMD_MEMTEST=y
|
||||
CONFIG_CMD_MMC=y
|
||||
CONFIG_CMD_I2C=y
|
||||
CONFIG_CMD_GPIO=y
|
||||
CONFIG_CMD_DHCP=y
|
||||
CONFIG_CMD_PING=y
|
||||
CONFIG_CMD_CACHE=y
|
||||
CONFIG_CMD_EXT2=y
|
||||
CONFIG_CMD_EXT4=y
|
||||
CONFIG_CMD_EXT4_WRITE=y
|
||||
CONFIG_CMD_FAT=y
|
||||
CONFIG_CMD_FS_GENERIC=y
|
||||
CONFIG_OF_CONTROL=y
|
||||
CONFIG_DM_GPIO=y
|
||||
CONFIG_DM_74X164=y
|
||||
CONFIG_DM_I2C=y
|
||||
CONFIG_DM_MMC=y
|
||||
# CONFIG_BLK is not set
|
||||
# CONFIG_DM_MMC_OPS is not set
|
||||
CONFIG_PINCTRL=y
|
||||
CONFIG_PINCTRL_IMX6=y
|
||||
CONFIG_DM_REGULATOR=y
|
||||
CONFIG_DM_SPI=y
|
|
@ -2,6 +2,7 @@ CONFIG_ARM=y
|
|||
CONFIG_ARCH_MX6=y
|
||||
CONFIG_TARGET_PICO_IMX6UL=y
|
||||
CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/technexion/pico-imx6ul/imximage.cfg"
|
||||
CONFIG_DEFAULT_FDT_FILE="imx6ul-pico-hobbit.dtb"
|
||||
CONFIG_BOOTDELAY=3
|
||||
CONFIG_HUSH_PARSER=y
|
||||
CONFIG_CMD_BOOTZ=y
|
||||
|
|
|
@ -4,6 +4,7 @@ CONFIG_TARGET_TQMA6=y
|
|||
CONFIG_FIT=y
|
||||
CONFIG_FIT_VERBOSE=y
|
||||
CONFIG_OF_BOARD_SETUP=y
|
||||
CONFIG_DEFAULT_FDT_FILE="imx6q-mba6x.dtb"
|
||||
CONFIG_BOOTDELAY=3
|
||||
CONFIG_HUSH_PARSER=y
|
||||
CONFIG_CMD_BOOTZ=y
|
||||
|
|
|
@ -5,6 +5,7 @@ CONFIG_TQMA6X_SPI_BOOT=y
|
|||
CONFIG_FIT=y
|
||||
CONFIG_FIT_VERBOSE=y
|
||||
CONFIG_OF_BOARD_SETUP=y
|
||||
CONFIG_DEFAULT_FDT_FILE="imx6q-mba6x.dtb"
|
||||
CONFIG_BOOTDELAY=3
|
||||
CONFIG_HUSH_PARSER=y
|
||||
CONFIG_CMD_BOOTZ=y
|
||||
|
|
|
@ -5,6 +5,7 @@ CONFIG_TQMA6S=y
|
|||
CONFIG_FIT=y
|
||||
CONFIG_FIT_VERBOSE=y
|
||||
CONFIG_OF_BOARD_SETUP=y
|
||||
CONFIG_DEFAULT_FDT_FILE="imx6dl-mba6x.dtb"
|
||||
CONFIG_BOOTDELAY=3
|
||||
CONFIG_HUSH_PARSER=y
|
||||
CONFIG_CMD_BOOTZ=y
|
||||
|
|
|
@ -6,6 +6,7 @@ CONFIG_TQMA6X_SPI_BOOT=y
|
|||
CONFIG_FIT=y
|
||||
CONFIG_FIT_VERBOSE=y
|
||||
CONFIG_OF_BOARD_SETUP=y
|
||||
CONFIG_DEFAULT_FDT_FILE="imx6dl-mba6x.dtb"
|
||||
CONFIG_BOOTDELAY=3
|
||||
CONFIG_HUSH_PARSER=y
|
||||
CONFIG_CMD_BOOTZ=y
|
||||
|
|
|
@ -12,6 +12,7 @@ CONFIG_AUTOBOOT_KEYED=y
|
|||
CONFIG_AUTOBOOT_PROMPT="Enter password in %d seconds to stop autoboot\n"
|
||||
CONFIG_AUTOBOOT_ENCRYPTION=y
|
||||
CONFIG_AUTOBOOT_STOP_STR_SHA256="36a9e7f1c95b82ffb99743e0c5c4ce95d83c9a430aac59f84ef3cbfab6145068"
|
||||
CONFIG_DEFAULT_FDT_FILE="imx6s-wru4.dtb"
|
||||
CONFIG_CMD_BOOTZ=y
|
||||
# CONFIG_CMD_IMLS is not set
|
||||
CONFIG_CMD_MMC=y
|
||||
|
|
|
@ -13,6 +13,7 @@ CONFIG_SPL_SPI_FLASH_SUPPORT=y
|
|||
CONFIG_SPL_SPI_SUPPORT=y
|
||||
CONFIG_SPL_WATCHDOG_SUPPORT=y
|
||||
CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/imx-common/spl_sd.cfg,MX6Q"
|
||||
CONFIG_DEFAULT_FDT_FILE="imx6q-zc5202.dtb"
|
||||
CONFIG_BOOTDELAY=3
|
||||
CONFIG_SPL=y
|
||||
CONFIG_CMD_MMC=y
|
||||
|
|
|
@ -13,6 +13,7 @@ CONFIG_SPL_SPI_FLASH_SUPPORT=y
|
|||
CONFIG_SPL_SPI_SUPPORT=y
|
||||
CONFIG_SPL_WATCHDOG_SUPPORT=y
|
||||
CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/imx-common/spl_sd.cfg,MX6Q"
|
||||
CONFIG_DEFAULT_FDT_FILE="imx6q-zc5601.dtb"
|
||||
CONFIG_BOOTDELAY=3
|
||||
CONFIG_SPL=y
|
||||
CONFIG_CMD_MMC=y
|
||||
|
|
|
@ -80,6 +80,13 @@ config NAND_ARASAN
|
|||
controller. This uses the hardware ECC for read and
|
||||
write operations.
|
||||
|
||||
config NAND_MXS
|
||||
bool "MXS NAND support"
|
||||
depends on MX6
|
||||
help
|
||||
This enables NAND driver for the NAND flash controller on the
|
||||
MXS processors.
|
||||
|
||||
comment "Generic NAND options"
|
||||
|
||||
# Enhance depends when converting drivers to Kconfig which use this config
|
||||
|
|
|
@ -129,6 +129,13 @@ config ETHOC
|
|||
help
|
||||
This MAC is present in OpenRISC and Xtensa XTFPGA boards.
|
||||
|
||||
config FEC_MXC
|
||||
bool "FEC Ethernet controller"
|
||||
depends on MX6
|
||||
help
|
||||
This driver supports the 10/100 Fast Ethernet controller for
|
||||
NXP i.MX processors.
|
||||
|
||||
config MVPP2
|
||||
bool "Marvell Armada 375 network interface support"
|
||||
depends on ARMADA_375
|
||||
|
|
|
@ -309,6 +309,13 @@ config MVEBU_A3700_UART
|
|||
Choose this option to add support for UART driver on the Marvell
|
||||
Armada 3700 SoC. The base address is configured via DT.
|
||||
|
||||
config MXC_UART
|
||||
bool "IMX serial port support"
|
||||
depends on MX6
|
||||
help
|
||||
If you have a machine based on a Motorola IMX CPU you
|
||||
can enable its onboard serial port by enabling this option.
|
||||
|
||||
config PIC32_SERIAL
|
||||
bool "Support for Microchip PIC32 on-chip UART"
|
||||
depends on DM_SERIAL && MACH_PIC32
|
||||
|
|
|
@ -5,3 +5,16 @@ config DM_THERMAL
|
|||
temperature sensors to permit warnings, speed throttling or even
|
||||
automatic power-off when the temperature gets too high or low. Other
|
||||
devices may be discrete but connected on a suitable bus.
|
||||
|
||||
if DM_THERMAL
|
||||
|
||||
config IMX_THERMAL
|
||||
bool "Temperature sensor driver for Freescale i.MX SoCs"
|
||||
depends on MX6
|
||||
help
|
||||
Support for Temperature Monitor (TEMPMON) found on Freescale i.MX SoCs.
|
||||
It supports one critical trip point and one passive trip point. The
|
||||
cpufreq is used as the cooling device to throttle CPUs when the
|
||||
passive trip is crossed.
|
||||
|
||||
endif # if DM_THERMAL
|
||||
|
|
|
@ -13,7 +13,6 @@
|
|||
#include <asm/imx-common/gpio.h>
|
||||
|
||||
#define CONFIG_BOARD_NAME "Advantech DMS-BA16"
|
||||
#define CONFIG_DEFAULT_FDT_FILE "imx6q-dms-ba16.dtb"
|
||||
|
||||
#define CONFIG_MXC_UART_BASE UART4_BASE
|
||||
#define CONSOLE_DEV "ttymxc3"
|
||||
|
|
|
@ -29,10 +29,6 @@
|
|||
/* Size of malloc() pool */
|
||||
#define CONFIG_SYS_MALLOC_LEN (32 * SZ_1M)
|
||||
|
||||
/* Uncomment to enable secure boot support */
|
||||
/* #define CONFIG_SECURE_BOOT */
|
||||
#define CONFIG_CSF_SIZE 0x4000
|
||||
|
||||
#define CONFIG_CMD_BMODE
|
||||
|
||||
/* Network */
|
||||
|
|
|
@ -18,19 +18,15 @@
|
|||
#define BX50V3_BOOTARGS_EXTRA
|
||||
#if defined(CONFIG_TARGET_GE_B450V3)
|
||||
#define CONFIG_BOARD_NAME "General Electric B450v3"
|
||||
#define CONFIG_DEFAULT_FDT_FILE "/boot/imx6q-b450v3.dtb"
|
||||
#elif defined(CONFIG_TARGET_GE_B650V3)
|
||||
#define CONFIG_BOARD_NAME "General Electric B650v3"
|
||||
#define CONFIG_DEFAULT_FDT_FILE "/boot/imx6q-b650v3.dtb"
|
||||
#elif defined(CONFIG_TARGET_GE_B850V3)
|
||||
#define CONFIG_BOARD_NAME "General Electric B850v3"
|
||||
#define CONFIG_DEFAULT_FDT_FILE "/boot/imx6q-b850v3.dtb"
|
||||
#undef BX50V3_BOOTARGS_EXTRA
|
||||
#define BX50V3_BOOTARGS_EXTRA "video=DP-1:1024x768@60 " \
|
||||
"video=HDMI-A-1:1024x768@60 "
|
||||
#else
|
||||
#define CONFIG_BOARD_NAME "General Electric BA16 Generic"
|
||||
#define CONFIG_DEFAULT_FDT_FILE "/boot/imx6q-ba16.dtb"
|
||||
#endif
|
||||
|
||||
#define CONFIG_MXC_UART_BASE UART3_BASE
|
||||
|
|
167
include/configs/imx6qdl_icore.h
Normal file
167
include/configs/imx6qdl_icore.h
Normal file
|
@ -0,0 +1,167 @@
|
|||
/*
|
||||
* Copyright (C) 2016 Amarula Solutions B.V.
|
||||
* Copyright (C) 2016 Engicam S.r.l.
|
||||
*
|
||||
* Configuration settings for the Engicam i.CoreM6 QDL Starter Kits.
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0+
|
||||
*/
|
||||
|
||||
#ifndef __IMX6QLD_ICORE_CONFIG_H
|
||||
#define __IMX6QLD_ICORE_CONFIG_H
|
||||
|
||||
#include <linux/sizes.h>
|
||||
#include "mx6_common.h"
|
||||
|
||||
/* Size of malloc() pool */
|
||||
#define CONFIG_SYS_MALLOC_LEN (16 * SZ_1M)
|
||||
|
||||
/* Total Size of Environment Sector */
|
||||
#define CONFIG_ENV_SIZE SZ_128K
|
||||
|
||||
/* Allow to overwrite serial and ethaddr */
|
||||
#define CONFIG_ENV_OVERWRITE
|
||||
|
||||
/* Environment */
|
||||
#ifndef CONFIG_ENV_IS_NOWHERE
|
||||
/* Environment in MMC */
|
||||
# if defined(CONFIG_ENV_IS_IN_MMC)
|
||||
# define CONFIG_ENV_OFFSET 0x100000
|
||||
/* Environment in NAND */
|
||||
# elif defined(CONFIG_ENV_IS_IN_NAND)
|
||||
# define CONFIG_ENV_OFFSET 0x400000
|
||||
# define CONFIG_ENV_SECT_SIZE CONFIG_ENV_SIZE
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Default environment */
|
||||
#define CONFIG_EXTRA_ENV_SETTINGS \
|
||||
"script=boot.scr\0" \
|
||||
"image=zImage\0" \
|
||||
"console=ttymxc3\0" \
|
||||
"fdt_high=0xffffffff\0" \
|
||||
"fdt_file=" CONFIG_DEFAULT_FDT_FILE "\0" \
|
||||
"fdt_addr=0x18000000\0" \
|
||||
"boot_fdt=try\0" \
|
||||
"mmcdev=0\0" \
|
||||
"mmcpart=1\0" \
|
||||
"mmcroot=/dev/mmcblk0p2 rootwait rw\0" \
|
||||
"mmcautodetect=yes\0" \
|
||||
"mmcargs=setenv bootargs console=${console},${baudrate} " \
|
||||
"root=${mmcroot}\0" \
|
||||
"loadbootscript=" \
|
||||
"fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
|
||||
"bootscript=echo Running bootscript from mmc ...; " \
|
||||
"source\0" \
|
||||
"loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
|
||||
"loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
|
||||
"mmcboot=echo Booting from mmc ...; " \
|
||||
"run mmcargs; " \
|
||||
"if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
|
||||
"if run loadfdt; then " \
|
||||
"bootz ${loadaddr} - ${fdt_addr}; " \
|
||||
"else " \
|
||||
"if test ${boot_fdt} = try; then " \
|
||||
"bootz; " \
|
||||
"else " \
|
||||
"echo WARN: Cannot load the DT; " \
|
||||
"fi; " \
|
||||
"fi; " \
|
||||
"else " \
|
||||
"bootz; " \
|
||||
"fi\0"
|
||||
|
||||
#define CONFIG_BOOTCOMMAND \
|
||||
"mmc dev ${mmcdev};" \
|
||||
"mmc dev ${mmcdev}; if mmc rescan; then " \
|
||||
"if run loadbootscript; then " \
|
||||
"run bootscript; " \
|
||||
"else " \
|
||||
"if run loadimage; then " \
|
||||
"run mmcboot; " \
|
||||
"fi; " \
|
||||
"fi; " \
|
||||
"fi"
|
||||
|
||||
/* Miscellaneous configurable options */
|
||||
#define CONFIG_SYS_MEMTEST_START 0x80000000
|
||||
#define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MEMTEST_START + 0x8000000)
|
||||
|
||||
#define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
|
||||
#define CONFIG_SYS_HZ 1000
|
||||
|
||||
/* Physical Memory Map */
|
||||
#define CONFIG_NR_DRAM_BANKS 1
|
||||
#define PHYS_SDRAM MMDC0_ARB_BASE_ADDR
|
||||
|
||||
#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM
|
||||
#define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
|
||||
#define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE
|
||||
|
||||
#define CONFIG_SYS_INIT_SP_OFFSET (CONFIG_SYS_INIT_RAM_SIZE - \
|
||||
GENERATED_GBL_DATA_SIZE)
|
||||
#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_INIT_RAM_ADDR + \
|
||||
CONFIG_SYS_INIT_SP_OFFSET)
|
||||
|
||||
/* UART */
|
||||
#ifdef CONFIG_MXC_UART
|
||||
# define CONFIG_MXC_UART_BASE UART4_BASE
|
||||
#endif
|
||||
|
||||
/* MMC */
|
||||
#ifdef CONFIG_FSL_USDHC
|
||||
# define CONFIG_SYS_MMC_ENV_DEV 0
|
||||
# define CONFIG_SYS_FSL_USDHC_NUM 1
|
||||
# define CONFIG_SYS_FSL_ESDHC_ADDR USDHC2_BASE_ADDR
|
||||
#endif
|
||||
|
||||
/* NAND */
|
||||
#ifdef CONFIG_NAND_MXS
|
||||
# define CONFIG_SYS_MAX_NAND_DEVICE 1
|
||||
# define CONFIG_SYS_NAND_BASE 0x40000000
|
||||
# define CONFIG_SYS_NAND_5_ADDR_CYCLE
|
||||
# define CONFIG_SYS_NAND_ONFI_DETECTION
|
||||
# define CONFIG_SYS_NAND_U_BOOT_START CONFIG_SYS_TEXT_BASE
|
||||
# define CONFIG_SYS_NAND_U_BOOT_OFFS 0x200000
|
||||
|
||||
/* MTD device */
|
||||
# define CONFIG_MTD_DEVICE
|
||||
# define CONFIG_CMD_MTDPARTS
|
||||
# define CONFIG_MTD_PARTITIONS
|
||||
# define MTDIDS_DEFAULT "nand0=nand"
|
||||
# define MTDPARTS_DEFAULT "mtdparts=nand:2m(spl),2m(uboot)," \
|
||||
"1m(env),4m(kernel),1m(dtb),-(rootfs)"
|
||||
|
||||
# define CONFIG_APBH_DMA
|
||||
# define CONFIG_APBH_DMA_BURST
|
||||
# define CONFIG_APBH_DMA_BURST8
|
||||
#endif
|
||||
|
||||
/* Ethernet */
|
||||
#ifdef CONFIG_FEC_MXC
|
||||
# define IMX_FEC_BASE ENET_BASE_ADDR
|
||||
# define CONFIG_FEC_MXC_PHYADDR 0
|
||||
# define CONFIG_FEC_XCV_TYPE RMII
|
||||
# define CONFIG_ETHPRIME "FEC"
|
||||
|
||||
# define CONFIG_MII
|
||||
# define CONFIG_PHYLIB
|
||||
# define CONFIG_PHY_SMSC
|
||||
#endif
|
||||
|
||||
/* SPL */
|
||||
#ifdef CONFIG_SPL
|
||||
# ifdef CONFIG_NAND_MXS
|
||||
# define CONFIG_SPL_NAND_SUPPORT
|
||||
# else
|
||||
# define CONFIG_SPL_MMC_SUPPORT
|
||||
# endif
|
||||
|
||||
# include "imx6_spl.h"
|
||||
# ifdef CONFIG_SPL_BUILD
|
||||
# undef CONFIG_DM_GPIO
|
||||
# undef CONFIG_DM_MMC
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#endif /* __IMX6QLD_ICORE_CONFIG_H */
|
|
@ -118,8 +118,6 @@
|
|||
#define CONFIG_LOADADDR 0x81000000 /* loadaddr env var */
|
||||
#define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
|
||||
|
||||
#define CONFIG_DEFAULT_FDT_FILE "imx25-pdk.dtb"
|
||||
|
||||
#define CONFIG_EXTRA_ENV_SETTINGS \
|
||||
"script=boot.scr\0" \
|
||||
"image=zImage\0" \
|
||||
|
|
|
@ -78,8 +78,6 @@
|
|||
#define CONFIG_LOADADDR 0x72000000 /* loadaddr env var */
|
||||
#define CONFIG_SYS_TEXT_BASE 0x77800000
|
||||
|
||||
#define CONFIG_DEFAULT_FDT_FILE "imx53-ard.dtb"
|
||||
|
||||
#define CONFIG_EXTRA_ENV_SETTINGS \
|
||||
"script=boot.scr\0" \
|
||||
"uimage=zImage\0" \
|
||||
|
|
|
@ -91,4 +91,13 @@
|
|||
#define CONFIG_CMD_FUSE
|
||||
#define CONFIG_MXC_OCOTP
|
||||
|
||||
/* Secure boot (HAB) support */
|
||||
#ifdef CONFIG_SECURE_BOOT
|
||||
#define CONFIG_CSF_SIZE 0x2000
|
||||
#define CONFIG_SYS_FSL_SEC_COMPAT 4
|
||||
#define CONFIG_FSL_CAAM
|
||||
#define CONFIG_CMD_DEKBLOB
|
||||
#define CONFIG_SYS_FSL_SEC_LE
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
|
||||
#ifdef CONFIG_SPL
|
||||
#include "imx6_spl.h"
|
||||
#undef CONFIG_SPL_EXT_SUPPORT
|
||||
#endif
|
||||
|
||||
#define CONFIG_MACH_TYPE 3980
|
||||
|
@ -22,6 +23,17 @@
|
|||
|
||||
#include "mx6sabre_common.h"
|
||||
|
||||
/* Falcon Mode */
|
||||
#define CONFIG_CMD_SPL
|
||||
#define CONFIG_SPL_OS_BOOT
|
||||
#define CONFIG_SYS_SPL_ARGS_ADDR 0x18000000
|
||||
#define CONFIG_CMD_SPL_WRITE_SIZE (128 * SZ_1K)
|
||||
|
||||
/* Falcon Mode - MMC support: args@1MB kernel@2MB */
|
||||
#define CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTOR 0x800 /* 1MB */
|
||||
#define CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTORS (CONFIG_CMD_SPL_WRITE_SIZE / 512)
|
||||
#define CONFIG_SYS_MMCSD_RAW_MODE_KERNEL_SECTOR 0x1000 /* 2MB */
|
||||
|
||||
#define CONFIG_SYS_FSL_USDHC_NUM 3
|
||||
#if defined(CONFIG_ENV_IS_IN_MMC)
|
||||
#define CONFIG_SYS_MMC_ENV_DEV 1 /* SDHC3 */
|
||||
|
|
|
@ -72,4 +72,13 @@
|
|||
|
||||
#define CONFIG_ARMV7_SECURE_BASE 0x00900000
|
||||
|
||||
/* Secure boot (HAB) support */
|
||||
#ifdef CONFIG_SECURE_BOOT
|
||||
#define CONFIG_CSF_SIZE 0x2000
|
||||
#define CONFIG_SYS_FSL_SEC_COMPAT 4
|
||||
#define CONFIG_FSL_CAAM
|
||||
#define CONFIG_CMD_DEKBLOB
|
||||
#define CONFIG_SYS_FSL_SEC_LE
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
@ -22,10 +22,6 @@
|
|||
#define CONFIG_BOARD_EARLY_INIT_F
|
||||
#define CONFIG_BOARD_LATE_INIT
|
||||
|
||||
/* Uncomment to enable secure boot support */
|
||||
/* #define CONFIG_SECURE_BOOT */
|
||||
#define CONFIG_CSF_SIZE 0x4000
|
||||
|
||||
/* Network */
|
||||
#define CONFIG_FEC_MXC
|
||||
#define CONFIG_MII
|
||||
|
|
|
@ -58,8 +58,6 @@
|
|||
#define CONFIG_SYS_DFU_DATA_BUF_SIZE SZ_16M
|
||||
#define DFU_DEFAULT_POLL_TIMEOUT 300
|
||||
|
||||
#define CONFIG_DEFAULT_FDT_FILE "imx6ul-pico-hobbit.dtb"
|
||||
|
||||
#define CONFIG_SYS_MMC_IMG_LOAD_PART 1
|
||||
|
||||
#define CONFIG_EXTRA_ENV_SETTINGS \
|
||||
|
|
|
@ -9,12 +9,6 @@
|
|||
#ifndef __CONFIG_TQMA6_MBA6_H
|
||||
#define __CONFIG_TQMA6_MBA6_H
|
||||
|
||||
#if defined(CONFIG_MX6DL) || defined(CONFIG_MX6S)
|
||||
#define CONFIG_DEFAULT_FDT_FILE "imx6dl-mba6x.dtb"
|
||||
#elif defined(CONFIG_MX6Q) || defined(CONFIG_MX6D)
|
||||
#define CONFIG_DEFAULT_FDT_FILE "imx6q-mba6x.dtb"
|
||||
#endif
|
||||
|
||||
#define CONFIG_DTT_SENSORS { 0, 1 }
|
||||
|
||||
#define CONFIG_FEC_XCV_TYPE RGMII
|
||||
|
|
|
@ -7,8 +7,6 @@
|
|||
#ifndef __CONFIG_TQMA6_WRU4_H
|
||||
#define __CONFIG_TQMA6_WRU4_H
|
||||
|
||||
#define CONFIG_DEFAULT_FDT_FILE "imx6s-wru4.dtb"
|
||||
|
||||
/* DTT sensors */
|
||||
#define CONFIG_DTT_SENSORS { 0, 1 }
|
||||
#define CONFIG_SYS_DTT_BUS_NUM 2
|
||||
|
|
|
@ -13,8 +13,6 @@
|
|||
#define CONSOLE_DEV "ttymxc1"
|
||||
#define CONFIG_MMCROOT "/dev/mmcblk0p2"
|
||||
|
||||
#define CONFIG_DEFAULT_FDT_FILE "imx6q-zc5202.dtb"
|
||||
|
||||
#define CONFIG_SUPPORT_EMMC_BOOT /* eMMC specific */
|
||||
|
||||
#include "el6x_common.h"
|
||||
|
|
|
@ -14,8 +14,6 @@
|
|||
#define CONSOLE_DEV "ttymxc1"
|
||||
#define CONFIG_MMCROOT "/dev/mmcblk0p1"
|
||||
|
||||
#define CONFIG_DEFAULT_FDT_FILE "imx6q-zc5601.dtb"
|
||||
|
||||
#define CONFIG_SUPPORT_EMMC_BOOT /* eMMC specific */
|
||||
|
||||
#include "el6x_common.h"
|
||||
|
|
274
include/dt-bindings/clock/imx6qdl-clock.h
Normal file
274
include/dt-bindings/clock/imx6qdl-clock.h
Normal file
|
@ -0,0 +1,274 @@
|
|||
/*
|
||||
* Copyright 2014 Freescale Semiconductor, Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*/
|
||||
|
||||
#ifndef __DT_BINDINGS_CLOCK_IMX6QDL_H
|
||||
#define __DT_BINDINGS_CLOCK_IMX6QDL_H
|
||||
|
||||
#define IMX6QDL_CLK_DUMMY 0
|
||||
#define IMX6QDL_CLK_CKIL 1
|
||||
#define IMX6QDL_CLK_CKIH 2
|
||||
#define IMX6QDL_CLK_OSC 3
|
||||
#define IMX6QDL_CLK_PLL2_PFD0_352M 4
|
||||
#define IMX6QDL_CLK_PLL2_PFD1_594M 5
|
||||
#define IMX6QDL_CLK_PLL2_PFD2_396M 6
|
||||
#define IMX6QDL_CLK_PLL3_PFD0_720M 7
|
||||
#define IMX6QDL_CLK_PLL3_PFD1_540M 8
|
||||
#define IMX6QDL_CLK_PLL3_PFD2_508M 9
|
||||
#define IMX6QDL_CLK_PLL3_PFD3_454M 10
|
||||
#define IMX6QDL_CLK_PLL2_198M 11
|
||||
#define IMX6QDL_CLK_PLL3_120M 12
|
||||
#define IMX6QDL_CLK_PLL3_80M 13
|
||||
#define IMX6QDL_CLK_PLL3_60M 14
|
||||
#define IMX6QDL_CLK_TWD 15
|
||||
#define IMX6QDL_CLK_STEP 16
|
||||
#define IMX6QDL_CLK_PLL1_SW 17
|
||||
#define IMX6QDL_CLK_PERIPH_PRE 18
|
||||
#define IMX6QDL_CLK_PERIPH2_PRE 19
|
||||
#define IMX6QDL_CLK_PERIPH_CLK2_SEL 20
|
||||
#define IMX6QDL_CLK_PERIPH2_CLK2_SEL 21
|
||||
#define IMX6QDL_CLK_AXI_SEL 22
|
||||
#define IMX6QDL_CLK_ESAI_SEL 23
|
||||
#define IMX6QDL_CLK_ASRC_SEL 24
|
||||
#define IMX6QDL_CLK_SPDIF_SEL 25
|
||||
#define IMX6QDL_CLK_GPU2D_AXI 26
|
||||
#define IMX6QDL_CLK_GPU3D_AXI 27
|
||||
#define IMX6QDL_CLK_GPU2D_CORE_SEL 28
|
||||
#define IMX6QDL_CLK_GPU3D_CORE_SEL 29
|
||||
#define IMX6QDL_CLK_GPU3D_SHADER_SEL 30
|
||||
#define IMX6QDL_CLK_IPU1_SEL 31
|
||||
#define IMX6QDL_CLK_IPU2_SEL 32
|
||||
#define IMX6QDL_CLK_LDB_DI0_SEL 33
|
||||
#define IMX6QDL_CLK_LDB_DI1_SEL 34
|
||||
#define IMX6QDL_CLK_IPU1_DI0_PRE_SEL 35
|
||||
#define IMX6QDL_CLK_IPU1_DI1_PRE_SEL 36
|
||||
#define IMX6QDL_CLK_IPU2_DI0_PRE_SEL 37
|
||||
#define IMX6QDL_CLK_IPU2_DI1_PRE_SEL 38
|
||||
#define IMX6QDL_CLK_IPU1_DI0_SEL 39
|
||||
#define IMX6QDL_CLK_IPU1_DI1_SEL 40
|
||||
#define IMX6QDL_CLK_IPU2_DI0_SEL 41
|
||||
#define IMX6QDL_CLK_IPU2_DI1_SEL 42
|
||||
#define IMX6QDL_CLK_HSI_TX_SEL 43
|
||||
#define IMX6QDL_CLK_PCIE_AXI_SEL 44
|
||||
#define IMX6QDL_CLK_SSI1_SEL 45
|
||||
#define IMX6QDL_CLK_SSI2_SEL 46
|
||||
#define IMX6QDL_CLK_SSI3_SEL 47
|
||||
#define IMX6QDL_CLK_USDHC1_SEL 48
|
||||
#define IMX6QDL_CLK_USDHC2_SEL 49
|
||||
#define IMX6QDL_CLK_USDHC3_SEL 50
|
||||
#define IMX6QDL_CLK_USDHC4_SEL 51
|
||||
#define IMX6QDL_CLK_ENFC_SEL 52
|
||||
#define IMX6QDL_CLK_EIM_SEL 53
|
||||
#define IMX6QDL_CLK_EIM_SLOW_SEL 54
|
||||
#define IMX6QDL_CLK_VDO_AXI_SEL 55
|
||||
#define IMX6QDL_CLK_VPU_AXI_SEL 56
|
||||
#define IMX6QDL_CLK_CKO1_SEL 57
|
||||
#define IMX6QDL_CLK_PERIPH 58
|
||||
#define IMX6QDL_CLK_PERIPH2 59
|
||||
#define IMX6QDL_CLK_PERIPH_CLK2 60
|
||||
#define IMX6QDL_CLK_PERIPH2_CLK2 61
|
||||
#define IMX6QDL_CLK_IPG 62
|
||||
#define IMX6QDL_CLK_IPG_PER 63
|
||||
#define IMX6QDL_CLK_ESAI_PRED 64
|
||||
#define IMX6QDL_CLK_ESAI_PODF 65
|
||||
#define IMX6QDL_CLK_ASRC_PRED 66
|
||||
#define IMX6QDL_CLK_ASRC_PODF 67
|
||||
#define IMX6QDL_CLK_SPDIF_PRED 68
|
||||
#define IMX6QDL_CLK_SPDIF_PODF 69
|
||||
#define IMX6QDL_CLK_CAN_ROOT 70
|
||||
#define IMX6QDL_CLK_ECSPI_ROOT 71
|
||||
#define IMX6QDL_CLK_GPU2D_CORE_PODF 72
|
||||
#define IMX6QDL_CLK_GPU3D_CORE_PODF 73
|
||||
#define IMX6QDL_CLK_GPU3D_SHADER 74
|
||||
#define IMX6QDL_CLK_IPU1_PODF 75
|
||||
#define IMX6QDL_CLK_IPU2_PODF 76
|
||||
#define IMX6QDL_CLK_LDB_DI0_PODF 77
|
||||
#define IMX6QDL_CLK_LDB_DI1_PODF 78
|
||||
#define IMX6QDL_CLK_IPU1_DI0_PRE 79
|
||||
#define IMX6QDL_CLK_IPU1_DI1_PRE 80
|
||||
#define IMX6QDL_CLK_IPU2_DI0_PRE 81
|
||||
#define IMX6QDL_CLK_IPU2_DI1_PRE 82
|
||||
#define IMX6QDL_CLK_HSI_TX_PODF 83
|
||||
#define IMX6QDL_CLK_SSI1_PRED 84
|
||||
#define IMX6QDL_CLK_SSI1_PODF 85
|
||||
#define IMX6QDL_CLK_SSI2_PRED 86
|
||||
#define IMX6QDL_CLK_SSI2_PODF 87
|
||||
#define IMX6QDL_CLK_SSI3_PRED 88
|
||||
#define IMX6QDL_CLK_SSI3_PODF 89
|
||||
#define IMX6QDL_CLK_UART_SERIAL_PODF 90
|
||||
#define IMX6QDL_CLK_USDHC1_PODF 91
|
||||
#define IMX6QDL_CLK_USDHC2_PODF 92
|
||||
#define IMX6QDL_CLK_USDHC3_PODF 93
|
||||
#define IMX6QDL_CLK_USDHC4_PODF 94
|
||||
#define IMX6QDL_CLK_ENFC_PRED 95
|
||||
#define IMX6QDL_CLK_ENFC_PODF 96
|
||||
#define IMX6QDL_CLK_EIM_PODF 97
|
||||
#define IMX6QDL_CLK_EIM_SLOW_PODF 98
|
||||
#define IMX6QDL_CLK_VPU_AXI_PODF 99
|
||||
#define IMX6QDL_CLK_CKO1_PODF 100
|
||||
#define IMX6QDL_CLK_AXI 101
|
||||
#define IMX6QDL_CLK_MMDC_CH0_AXI_PODF 102
|
||||
#define IMX6QDL_CLK_MMDC_CH1_AXI_PODF 103
|
||||
#define IMX6QDL_CLK_ARM 104
|
||||
#define IMX6QDL_CLK_AHB 105
|
||||
#define IMX6QDL_CLK_APBH_DMA 106
|
||||
#define IMX6QDL_CLK_ASRC 107
|
||||
#define IMX6QDL_CLK_CAN1_IPG 108
|
||||
#define IMX6QDL_CLK_CAN1_SERIAL 109
|
||||
#define IMX6QDL_CLK_CAN2_IPG 110
|
||||
#define IMX6QDL_CLK_CAN2_SERIAL 111
|
||||
#define IMX6QDL_CLK_ECSPI1 112
|
||||
#define IMX6QDL_CLK_ECSPI2 113
|
||||
#define IMX6QDL_CLK_ECSPI3 114
|
||||
#define IMX6QDL_CLK_ECSPI4 115
|
||||
#define IMX6Q_CLK_ECSPI5 116
|
||||
#define IMX6DL_CLK_I2C4 116
|
||||
#define IMX6QDL_CLK_ENET 117
|
||||
#define IMX6QDL_CLK_ESAI_EXTAL 118
|
||||
#define IMX6QDL_CLK_GPT_IPG 119
|
||||
#define IMX6QDL_CLK_GPT_IPG_PER 120
|
||||
#define IMX6QDL_CLK_GPU2D_CORE 121
|
||||
#define IMX6QDL_CLK_GPU3D_CORE 122
|
||||
#define IMX6QDL_CLK_HDMI_IAHB 123
|
||||
#define IMX6QDL_CLK_HDMI_ISFR 124
|
||||
#define IMX6QDL_CLK_I2C1 125
|
||||
#define IMX6QDL_CLK_I2C2 126
|
||||
#define IMX6QDL_CLK_I2C3 127
|
||||
#define IMX6QDL_CLK_IIM 128
|
||||
#define IMX6QDL_CLK_ENFC 129
|
||||
#define IMX6QDL_CLK_IPU1 130
|
||||
#define IMX6QDL_CLK_IPU1_DI0 131
|
||||
#define IMX6QDL_CLK_IPU1_DI1 132
|
||||
#define IMX6QDL_CLK_IPU2 133
|
||||
#define IMX6QDL_CLK_IPU2_DI0 134
|
||||
#define IMX6QDL_CLK_LDB_DI0 135
|
||||
#define IMX6QDL_CLK_LDB_DI1 136
|
||||
#define IMX6QDL_CLK_IPU2_DI1 137
|
||||
#define IMX6QDL_CLK_HSI_TX 138
|
||||
#define IMX6QDL_CLK_MLB 139
|
||||
#define IMX6QDL_CLK_MMDC_CH0_AXI 140
|
||||
#define IMX6QDL_CLK_MMDC_CH1_AXI 141
|
||||
#define IMX6QDL_CLK_OCRAM 142
|
||||
#define IMX6QDL_CLK_OPENVG_AXI 143
|
||||
#define IMX6QDL_CLK_PCIE_AXI 144
|
||||
#define IMX6QDL_CLK_PWM1 145
|
||||
#define IMX6QDL_CLK_PWM2 146
|
||||
#define IMX6QDL_CLK_PWM3 147
|
||||
#define IMX6QDL_CLK_PWM4 148
|
||||
#define IMX6QDL_CLK_PER1_BCH 149
|
||||
#define IMX6QDL_CLK_GPMI_BCH_APB 150
|
||||
#define IMX6QDL_CLK_GPMI_BCH 151
|
||||
#define IMX6QDL_CLK_GPMI_IO 152
|
||||
#define IMX6QDL_CLK_GPMI_APB 153
|
||||
#define IMX6QDL_CLK_SATA 154
|
||||
#define IMX6QDL_CLK_SDMA 155
|
||||
#define IMX6QDL_CLK_SPBA 156
|
||||
#define IMX6QDL_CLK_SSI1 157
|
||||
#define IMX6QDL_CLK_SSI2 158
|
||||
#define IMX6QDL_CLK_SSI3 159
|
||||
#define IMX6QDL_CLK_UART_IPG 160
|
||||
#define IMX6QDL_CLK_UART_SERIAL 161
|
||||
#define IMX6QDL_CLK_USBOH3 162
|
||||
#define IMX6QDL_CLK_USDHC1 163
|
||||
#define IMX6QDL_CLK_USDHC2 164
|
||||
#define IMX6QDL_CLK_USDHC3 165
|
||||
#define IMX6QDL_CLK_USDHC4 166
|
||||
#define IMX6QDL_CLK_VDO_AXI 167
|
||||
#define IMX6QDL_CLK_VPU_AXI 168
|
||||
#define IMX6QDL_CLK_CKO1 169
|
||||
#define IMX6QDL_CLK_PLL1_SYS 170
|
||||
#define IMX6QDL_CLK_PLL2_BUS 171
|
||||
#define IMX6QDL_CLK_PLL3_USB_OTG 172
|
||||
#define IMX6QDL_CLK_PLL4_AUDIO 173
|
||||
#define IMX6QDL_CLK_PLL5_VIDEO 174
|
||||
#define IMX6QDL_CLK_PLL8_MLB 175
|
||||
#define IMX6QDL_CLK_PLL7_USB_HOST 176
|
||||
#define IMX6QDL_CLK_PLL6_ENET 177
|
||||
#define IMX6QDL_CLK_SSI1_IPG 178
|
||||
#define IMX6QDL_CLK_SSI2_IPG 179
|
||||
#define IMX6QDL_CLK_SSI3_IPG 180
|
||||
#define IMX6QDL_CLK_ROM 181
|
||||
#define IMX6QDL_CLK_USBPHY1 182
|
||||
#define IMX6QDL_CLK_USBPHY2 183
|
||||
#define IMX6QDL_CLK_LDB_DI0_DIV_3_5 184
|
||||
#define IMX6QDL_CLK_LDB_DI1_DIV_3_5 185
|
||||
#define IMX6QDL_CLK_SATA_REF 186
|
||||
#define IMX6QDL_CLK_SATA_REF_100M 187
|
||||
#define IMX6QDL_CLK_PCIE_REF 188
|
||||
#define IMX6QDL_CLK_PCIE_REF_125M 189
|
||||
#define IMX6QDL_CLK_ENET_REF 190
|
||||
#define IMX6QDL_CLK_USBPHY1_GATE 191
|
||||
#define IMX6QDL_CLK_USBPHY2_GATE 192
|
||||
#define IMX6QDL_CLK_PLL4_POST_DIV 193
|
||||
#define IMX6QDL_CLK_PLL5_POST_DIV 194
|
||||
#define IMX6QDL_CLK_PLL5_VIDEO_DIV 195
|
||||
#define IMX6QDL_CLK_EIM_SLOW 196
|
||||
#define IMX6QDL_CLK_SPDIF 197
|
||||
#define IMX6QDL_CLK_CKO2_SEL 198
|
||||
#define IMX6QDL_CLK_CKO2_PODF 199
|
||||
#define IMX6QDL_CLK_CKO2 200
|
||||
#define IMX6QDL_CLK_CKO 201
|
||||
#define IMX6QDL_CLK_VDOA 202
|
||||
#define IMX6QDL_CLK_PLL4_AUDIO_DIV 203
|
||||
#define IMX6QDL_CLK_LVDS1_SEL 204
|
||||
#define IMX6QDL_CLK_LVDS2_SEL 205
|
||||
#define IMX6QDL_CLK_LVDS1_GATE 206
|
||||
#define IMX6QDL_CLK_LVDS2_GATE 207
|
||||
#define IMX6QDL_CLK_ESAI_IPG 208
|
||||
#define IMX6QDL_CLK_ESAI_MEM 209
|
||||
#define IMX6QDL_CLK_ASRC_IPG 210
|
||||
#define IMX6QDL_CLK_ASRC_MEM 211
|
||||
#define IMX6QDL_CLK_LVDS1_IN 212
|
||||
#define IMX6QDL_CLK_LVDS2_IN 213
|
||||
#define IMX6QDL_CLK_ANACLK1 214
|
||||
#define IMX6QDL_CLK_ANACLK2 215
|
||||
#define IMX6QDL_PLL1_BYPASS_SRC 216
|
||||
#define IMX6QDL_PLL2_BYPASS_SRC 217
|
||||
#define IMX6QDL_PLL3_BYPASS_SRC 218
|
||||
#define IMX6QDL_PLL4_BYPASS_SRC 219
|
||||
#define IMX6QDL_PLL5_BYPASS_SRC 220
|
||||
#define IMX6QDL_PLL6_BYPASS_SRC 221
|
||||
#define IMX6QDL_PLL7_BYPASS_SRC 222
|
||||
#define IMX6QDL_CLK_PLL1 223
|
||||
#define IMX6QDL_CLK_PLL2 224
|
||||
#define IMX6QDL_CLK_PLL3 225
|
||||
#define IMX6QDL_CLK_PLL4 226
|
||||
#define IMX6QDL_CLK_PLL5 227
|
||||
#define IMX6QDL_CLK_PLL6 228
|
||||
#define IMX6QDL_CLK_PLL7 229
|
||||
#define IMX6QDL_PLL1_BYPASS 230
|
||||
#define IMX6QDL_PLL2_BYPASS 231
|
||||
#define IMX6QDL_PLL3_BYPASS 232
|
||||
#define IMX6QDL_PLL4_BYPASS 233
|
||||
#define IMX6QDL_PLL5_BYPASS 234
|
||||
#define IMX6QDL_PLL6_BYPASS 235
|
||||
#define IMX6QDL_PLL7_BYPASS 236
|
||||
#define IMX6QDL_CLK_GPT_3M 237
|
||||
#define IMX6QDL_CLK_VIDEO_27M 238
|
||||
#define IMX6QDL_CLK_MIPI_CORE_CFG 239
|
||||
#define IMX6QDL_CLK_MIPI_IPG 240
|
||||
#define IMX6QDL_CLK_CAAM_MEM 241
|
||||
#define IMX6QDL_CLK_CAAM_ACLK 242
|
||||
#define IMX6QDL_CLK_CAAM_IPG 243
|
||||
#define IMX6QDL_CLK_SPDIF_GCLK 244
|
||||
#define IMX6QDL_CLK_UART_SEL 245
|
||||
#define IMX6QDL_CLK_IPG_PER_SEL 246
|
||||
#define IMX6QDL_CLK_ECSPI_SEL 247
|
||||
#define IMX6QDL_CLK_CAN_SEL 248
|
||||
#define IMX6QDL_CLK_MMDC_CH1_AXI_CG 249
|
||||
#define IMX6QDL_CLK_PRE0 250
|
||||
#define IMX6QDL_CLK_PRE1 251
|
||||
#define IMX6QDL_CLK_PRE2 252
|
||||
#define IMX6QDL_CLK_PRE3 253
|
||||
#define IMX6QDL_CLK_PRG0_AXI 254
|
||||
#define IMX6QDL_CLK_PRG1_AXI 255
|
||||
#define IMX6QDL_CLK_PRG0_APB 256
|
||||
#define IMX6QDL_CLK_PRG1_APB 257
|
||||
#define IMX6QDL_CLK_PRE_AXI 258
|
||||
#define IMX6QDL_CLK_END 259
|
||||
|
||||
#endif /* __DT_BINDINGS_CLOCK_IMX6QDL_H */
|
199
tools/imximage.c
199
tools/imximage.c
|
@ -27,6 +27,7 @@ static table_entry_t imximage_cmds[] = {
|
|||
{CMD_CHECK_BITS_CLR, "CHECK_BITS_CLR", "Reg Check bits clr", },
|
||||
{CMD_CSF, "CSF", "Command Sequence File", },
|
||||
{CMD_IMAGE_VERSION, "IMAGE_VERSION", "image version", },
|
||||
{CMD_PLUGIN, "PLUGIN", "file plugin_addr", },
|
||||
{-1, "", "", },
|
||||
};
|
||||
|
||||
|
@ -80,6 +81,9 @@ static uint32_t imximage_ivt_offset = UNDEFINED;
|
|||
static uint32_t imximage_csf_size = UNDEFINED;
|
||||
/* Initial Load Region Size */
|
||||
static uint32_t imximage_init_loadsize;
|
||||
static uint32_t imximage_iram_free_start;
|
||||
static uint32_t imximage_plugin_size;
|
||||
static uint32_t plugin_image;
|
||||
|
||||
static set_dcd_val_t set_dcd_val;
|
||||
static set_dcd_param_t set_dcd_param;
|
||||
|
@ -118,7 +122,11 @@ static uint32_t detect_imximage_version(struct imx_header *imx_hdr)
|
|||
|
||||
/* Try to detect V2 */
|
||||
if ((fhdr_v2->header.tag == IVT_HEADER_TAG) &&
|
||||
(hdr_v2->dcd_table.header.tag == DCD_HEADER_TAG))
|
||||
(hdr_v2->data.dcd_table.header.tag == DCD_HEADER_TAG))
|
||||
return IMXIMAGE_V2;
|
||||
|
||||
if ((fhdr_v2->header.tag == IVT_HEADER_TAG) &&
|
||||
hdr_v2->boot_data.plugin)
|
||||
return IMXIMAGE_V2;
|
||||
|
||||
return IMXIMAGE_VER_INVALID;
|
||||
|
@ -165,7 +173,7 @@ static struct dcd_v2_cmd *gd_last_cmd;
|
|||
static void set_dcd_param_v2(struct imx_header *imxhdr, uint32_t dcd_len,
|
||||
int32_t cmd)
|
||||
{
|
||||
dcd_v2_t *dcd_v2 = &imxhdr->header.hdr_v2.dcd_table;
|
||||
dcd_v2_t *dcd_v2 = &imxhdr->header.hdr_v2.data.dcd_table;
|
||||
struct dcd_v2_cmd *d = gd_last_cmd;
|
||||
struct dcd_v2_cmd *d2;
|
||||
int len;
|
||||
|
@ -261,7 +269,8 @@ static void set_dcd_rst_v1(struct imx_header *imxhdr, uint32_t dcd_len,
|
|||
static void set_dcd_rst_v2(struct imx_header *imxhdr, uint32_t dcd_len,
|
||||
char *name, int lineno)
|
||||
{
|
||||
dcd_v2_t *dcd_v2 = &imxhdr->header.hdr_v2.dcd_table;
|
||||
if (!imxhdr->header.hdr_v2.boot_data.plugin) {
|
||||
dcd_v2_t *dcd_v2 = &imxhdr->header.hdr_v2.data.dcd_table;
|
||||
struct dcd_v2_cmd *d = gd_last_cmd;
|
||||
int len;
|
||||
|
||||
|
@ -277,6 +286,7 @@ static void set_dcd_rst_v2(struct imx_header *imxhdr, uint32_t dcd_len,
|
|||
dcd_v2->header.length = cpu_to_be16(len);
|
||||
dcd_v2->header.version = DCD_VERSION;
|
||||
}
|
||||
}
|
||||
|
||||
static void set_imx_hdr_v1(struct imx_header *imxhdr, uint32_t dcd_len,
|
||||
uint32_t entry_point, uint32_t flash_offset)
|
||||
|
@ -317,14 +327,16 @@ static void set_imx_hdr_v2(struct imx_header *imxhdr, uint32_t dcd_len,
|
|||
fhdr_v2->header.length = cpu_to_be16(sizeof(flash_header_v2_t));
|
||||
fhdr_v2->header.version = IVT_VERSION; /* 0x40 */
|
||||
|
||||
if (!hdr_v2->boot_data.plugin) {
|
||||
fhdr_v2->entry = entry_point;
|
||||
fhdr_v2->reserved1 = fhdr_v2->reserved2 = 0;
|
||||
fhdr_v2->reserved1 = 0;
|
||||
fhdr_v2->reserved1 = 0;
|
||||
hdr_base = entry_point - imximage_init_loadsize +
|
||||
flash_offset;
|
||||
fhdr_v2->self = hdr_base;
|
||||
if (dcd_len > 0)
|
||||
fhdr_v2->dcd_ptr = hdr_base
|
||||
+ offsetof(imx_header_v2_t, dcd_table);
|
||||
fhdr_v2->dcd_ptr = hdr_base +
|
||||
offsetof(imx_header_v2_t, data);
|
||||
else
|
||||
fhdr_v2->dcd_ptr = 0;
|
||||
fhdr_v2->boot_data_ptr = hdr_base
|
||||
|
@ -335,6 +347,74 @@ static void set_imx_hdr_v2(struct imx_header *imxhdr, uint32_t dcd_len,
|
|||
|
||||
header_size_ptr = &hdr_v2->boot_data.size;
|
||||
csf_ptr = &fhdr_v2->csf;
|
||||
} else {
|
||||
imx_header_v2_t *next_hdr_v2;
|
||||
flash_header_v2_t *next_fhdr_v2;
|
||||
|
||||
if (imximage_csf_size != 0) {
|
||||
fprintf(stderr, "Error: Header v2: SECURE_BOOT is only supported in DCD mode!");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
fhdr_v2->entry = imximage_iram_free_start +
|
||||
flash_offset + sizeof(flash_header_v2_t) +
|
||||
sizeof(boot_data_t);
|
||||
|
||||
fhdr_v2->reserved1 = 0;
|
||||
fhdr_v2->reserved2 = 0;
|
||||
fhdr_v2->self = imximage_iram_free_start + flash_offset;
|
||||
|
||||
fhdr_v2->dcd_ptr = 0;
|
||||
|
||||
fhdr_v2->boot_data_ptr = fhdr_v2->self +
|
||||
offsetof(imx_header_v2_t, boot_data);
|
||||
|
||||
hdr_v2->boot_data.start = imximage_iram_free_start;
|
||||
/*
|
||||
* The actural size of plugin image is "imximage_plugin_size +
|
||||
* sizeof(flash_header_v2_t) + sizeof(boot_data_t)", plus the
|
||||
* flash_offset space.The ROM code only need to copy this size
|
||||
* to run the plugin code. However, later when copy the whole
|
||||
* U-Boot image to DDR, the ROM code use memcpy to copy the
|
||||
* first part of the image, and use the storage read function
|
||||
* to get the remaining part. This requires the dividing point
|
||||
* must be multiple of storage sector size. Here we set the
|
||||
* first section to be MAX_PLUGIN_CODE_SIZE(64KB) for this
|
||||
* purpose.
|
||||
*/
|
||||
hdr_v2->boot_data.size = MAX_PLUGIN_CODE_SIZE;
|
||||
|
||||
/* Security feature are not supported */
|
||||
fhdr_v2->csf = 0;
|
||||
|
||||
next_hdr_v2 = (imx_header_v2_t *)((char *)hdr_v2 +
|
||||
imximage_plugin_size);
|
||||
|
||||
next_fhdr_v2 = &next_hdr_v2->fhdr;
|
||||
|
||||
next_fhdr_v2->header.tag = IVT_HEADER_TAG; /* 0xD1 */
|
||||
next_fhdr_v2->header.length =
|
||||
cpu_to_be16(sizeof(flash_header_v2_t));
|
||||
next_fhdr_v2->header.version = IVT_VERSION; /* 0x40 */
|
||||
|
||||
next_fhdr_v2->entry = entry_point;
|
||||
hdr_base = entry_point - sizeof(struct imx_header);
|
||||
next_fhdr_v2->reserved1 = 0;
|
||||
next_fhdr_v2->reserved2 = 0;
|
||||
next_fhdr_v2->self = hdr_base + imximage_plugin_size;
|
||||
|
||||
next_fhdr_v2->dcd_ptr = 0;
|
||||
next_fhdr_v2->boot_data_ptr = next_fhdr_v2->self +
|
||||
offsetof(imx_header_v2_t, boot_data);
|
||||
|
||||
next_hdr_v2->boot_data.start = hdr_base - flash_offset;
|
||||
|
||||
header_size_ptr = &next_hdr_v2->boot_data.size;
|
||||
|
||||
next_hdr_v2->boot_data.plugin = 0;
|
||||
|
||||
next_fhdr_v2->csf = 0;
|
||||
}
|
||||
}
|
||||
|
||||
static void set_hdr_func(void)
|
||||
|
@ -393,23 +473,28 @@ static void print_hdr_v2(struct imx_header *imx_hdr)
|
|||
{
|
||||
imx_header_v2_t *hdr_v2 = &imx_hdr->header.hdr_v2;
|
||||
flash_header_v2_t *fhdr_v2 = &hdr_v2->fhdr;
|
||||
dcd_v2_t *dcd_v2 = &hdr_v2->dcd_table;
|
||||
uint32_t size, version;
|
||||
dcd_v2_t *dcd_v2 = &hdr_v2->data.dcd_table;
|
||||
uint32_t size, version, plugin;
|
||||
|
||||
plugin = hdr_v2->boot_data.plugin;
|
||||
if (!plugin) {
|
||||
size = be16_to_cpu(dcd_v2->header.length);
|
||||
if (size > (MAX_HW_CFG_SIZE_V2 * sizeof(dcd_addr_data_t)) + 8) {
|
||||
if (size > (MAX_HW_CFG_SIZE_V2 * sizeof(dcd_addr_data_t))) {
|
||||
fprintf(stderr,
|
||||
"Error: Image corrupt DCD size %d exceed maximum %d\n",
|
||||
(uint32_t)(size / sizeof(dcd_addr_data_t)),
|
||||
MAX_HW_CFG_SIZE_V2);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
|
||||
version = detect_imximage_version(imx_hdr);
|
||||
|
||||
printf("Image Type: Freescale IMX Boot Image\n");
|
||||
printf("Image Ver: %x", version);
|
||||
printf("%s\n", get_table_entry_name(imximage_versions, NULL, version));
|
||||
printf("Mode: %s\n", plugin ? "PLUGIN" : "DCD");
|
||||
if (!plugin) {
|
||||
printf("Data Size: ");
|
||||
genimg_print_size(hdr_v2->boot_data.size);
|
||||
printf("Load Address: %08x\n", (uint32_t)fhdr_v2->boot_data_ptr);
|
||||
|
@ -421,6 +506,66 @@ static void print_hdr_v2(struct imx_header *imx_hdr)
|
|||
hdr_v2->boot_data.size - imximage_ivt_offset -
|
||||
imximage_csf_size);
|
||||
}
|
||||
} else {
|
||||
imx_header_v2_t *next_hdr_v2;
|
||||
flash_header_v2_t *next_fhdr_v2;
|
||||
|
||||
/*First Header*/
|
||||
printf("Plugin Data Size: ");
|
||||
genimg_print_size(hdr_v2->boot_data.size);
|
||||
printf("Plugin Code Size: ");
|
||||
genimg_print_size(imximage_plugin_size);
|
||||
printf("Plugin Load Address: %08x\n", hdr_v2->boot_data.start);
|
||||
printf("Plugin Entry Point: %08x\n", (uint32_t)fhdr_v2->entry);
|
||||
|
||||
/*Second Header*/
|
||||
next_hdr_v2 = (imx_header_v2_t *)((char *)hdr_v2 +
|
||||
imximage_plugin_size);
|
||||
next_fhdr_v2 = &next_hdr_v2->fhdr;
|
||||
printf("U-Boot Data Size: ");
|
||||
genimg_print_size(next_hdr_v2->boot_data.size);
|
||||
printf("U-Boot Load Address: %08x\n",
|
||||
next_hdr_v2->boot_data.start);
|
||||
printf("U-Boot Entry Point: %08x\n",
|
||||
(uint32_t)next_fhdr_v2->entry);
|
||||
}
|
||||
}
|
||||
|
||||
static void copy_plugin_code(struct imx_header *imxhdr, char *plugin_file)
|
||||
{
|
||||
int ifd = -1;
|
||||
struct stat sbuf;
|
||||
char *plugin_buf = imxhdr->header.hdr_v2.data.plugin_code;
|
||||
char *ptr;
|
||||
|
||||
ifd = open(plugin_file, O_RDONLY|O_BINARY);
|
||||
if (fstat(ifd, &sbuf) < 0) {
|
||||
fprintf(stderr, "Can't stat %s: %s\n",
|
||||
plugin_file,
|
||||
strerror(errno));
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
ptr = mmap(0, sbuf.st_size, PROT_READ, MAP_SHARED, ifd, 0);
|
||||
if (ptr == MAP_FAILED) {
|
||||
fprintf(stderr, "Can't read %s: %s\n",
|
||||
plugin_file,
|
||||
strerror(errno));
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
if (sbuf.st_size > MAX_PLUGIN_CODE_SIZE) {
|
||||
printf("plugin binary size too large\n");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
memcpy(plugin_buf, ptr, sbuf.st_size);
|
||||
imximage_plugin_size = sbuf.st_size;
|
||||
|
||||
(void) munmap((void *)ptr, sbuf.st_size);
|
||||
(void) close(ifd);
|
||||
|
||||
imxhdr->header.hdr_v2.boot_data.plugin = 1;
|
||||
}
|
||||
|
||||
static void parse_cfg_cmd(struct imx_header *imxhdr, int32_t cmd, char *token,
|
||||
|
@ -497,6 +642,10 @@ static void parse_cfg_cmd(struct imx_header *imxhdr, int32_t cmd, char *token,
|
|||
if (unlikely(cmd_ver_first != 1))
|
||||
cmd_ver_first = 0;
|
||||
break;
|
||||
case CMD_PLUGIN:
|
||||
plugin_image = 1;
|
||||
copy_plugin_code(imxhdr, token);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -542,6 +691,10 @@ static void parse_cfg_fld(struct imx_header *imxhdr, int32_t *cmd,
|
|||
}
|
||||
}
|
||||
break;
|
||||
case CMD_PLUGIN:
|
||||
value = get_cfg_value(token, name, lineno);
|
||||
imximage_iram_free_start = value;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -649,6 +802,7 @@ static void imximage_set_header(void *ptr, struct stat *sbuf, int ifd,
|
|||
{
|
||||
struct imx_header *imxhdr = (struct imx_header *)ptr;
|
||||
uint32_t dcd_len;
|
||||
uint32_t header_size;
|
||||
|
||||
/*
|
||||
* In order to not change the old imx cfg file
|
||||
|
@ -665,10 +819,15 @@ static void imximage_set_header(void *ptr, struct stat *sbuf, int ifd,
|
|||
dcd_len = parse_cfg_file(imxhdr, params->imagename);
|
||||
|
||||
if (imximage_version == IMXIMAGE_V2) {
|
||||
if (imximage_init_loadsize < imximage_ivt_offset +
|
||||
sizeof(imx_header_v2_t))
|
||||
header_size = sizeof(flash_header_v2_t) + sizeof(boot_data_t);
|
||||
if (!plugin_image)
|
||||
header_size += sizeof(dcd_v2_t);
|
||||
else
|
||||
header_size += MAX_PLUGIN_CODE_SIZE;
|
||||
|
||||
if (imximage_init_loadsize < imximage_ivt_offset + header_size)
|
||||
imximage_init_loadsize = imximage_ivt_offset +
|
||||
sizeof(imx_header_v2_t);
|
||||
header_size;
|
||||
}
|
||||
|
||||
/* Set the imx header */
|
||||
|
@ -721,7 +880,7 @@ static int imximage_generate(struct image_tool_params *params,
|
|||
size_t alloc_len;
|
||||
struct stat sbuf;
|
||||
char *datafile = params->datafile;
|
||||
uint32_t pad_len;
|
||||
uint32_t pad_len, header_size;
|
||||
|
||||
memset(&imximage_header, 0, sizeof(imximage_header));
|
||||
|
||||
|
@ -742,15 +901,21 @@ static int imximage_generate(struct image_tool_params *params,
|
|||
/* TODO: check i.MX image V1 handling, for now use 'old' style */
|
||||
if (imximage_version == IMXIMAGE_V1) {
|
||||
alloc_len = 4096;
|
||||
header_size = 4096;
|
||||
} else {
|
||||
if (imximage_init_loadsize < imximage_ivt_offset +
|
||||
sizeof(imx_header_v2_t))
|
||||
header_size = sizeof(flash_header_v2_t) + sizeof(boot_data_t);
|
||||
if (!plugin_image)
|
||||
header_size += sizeof(dcd_v2_t);
|
||||
else
|
||||
header_size += MAX_PLUGIN_CODE_SIZE;
|
||||
|
||||
if (imximage_init_loadsize < imximage_ivt_offset + header_size)
|
||||
imximage_init_loadsize = imximage_ivt_offset +
|
||||
sizeof(imx_header_v2_t);
|
||||
header_size;
|
||||
alloc_len = imximage_init_loadsize - imximage_ivt_offset;
|
||||
}
|
||||
|
||||
if (alloc_len < sizeof(struct imx_header)) {
|
||||
if (alloc_len < header_size) {
|
||||
fprintf(stderr, "%s: header error\n",
|
||||
params->cmdname);
|
||||
exit(EXIT_FAILURE);
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#define _IMXIMAGE_H_
|
||||
|
||||
#define MAX_HW_CFG_SIZE_V2 220 /* Max number of registers imx can set for v2 */
|
||||
#define MAX_PLUGIN_CODE_SIZE (64 * 1024)
|
||||
#define MAX_HW_CFG_SIZE_V1 60 /* Max number of registers imx can set for v1 */
|
||||
#define APP_CODE_BARKER 0xB1
|
||||
#define DCD_BARKER 0xB17219E9
|
||||
|
@ -64,6 +65,7 @@ enum imximage_cmd {
|
|||
CMD_CHECK_BITS_SET,
|
||||
CMD_CHECK_BITS_CLR,
|
||||
CMD_CSF,
|
||||
CMD_PLUGIN,
|
||||
};
|
||||
|
||||
enum imximage_fld_types {
|
||||
|
@ -164,7 +166,10 @@ typedef struct {
|
|||
typedef struct {
|
||||
flash_header_v2_t fhdr;
|
||||
boot_data_t boot_data;
|
||||
union {
|
||||
dcd_v2_t dcd_table;
|
||||
char plugin_code[MAX_PLUGIN_CODE_SIZE];
|
||||
} data;
|
||||
} imx_header_v2_t;
|
||||
|
||||
/* The header must be aligned to 4k on MX53 for NAND boot */
|
||||
|
|
Loading…
Reference in a new issue