Signed-off-by: Tom Rini <trini@konsulko.com> Conflicts: common/Kconfig configs/dms-ba16_defconfigmaster
commit
4f892924d2
@ -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"; |
||||
}; |
File diff suppressed because it is too large
Load Diff
@ -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"; |
||||
}; |
@ -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"; |
||||
}; |
File diff suppressed because it is too large
Load Diff
@ -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"; |
||||
}; |
@ -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 |
||||
>; |
||||
}; |
||||
}; |
File diff suppressed because it is too large
Load Diff
@ -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 |
@ -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 |
@ -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 |
@ -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 |
@ -0,0 +1,6 @@ |
||||
# Copyright (C) 2016 Amarula Solutions B.V.
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0+
|
||||
#
|
||||
|
||||
obj-y := icorem6.o
|
@ -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 |
@ -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 |
@ -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. |
@ -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> |
@ -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 |
@ -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 |
@ -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 |
@ -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 */ |
@ -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 */ |
Loading…
Reference in new issue