Skip to contentSkip to conversation

i.MX: Add the i.MX6UL SOC and a reference board.

PATCH Superseded Jean-Christophe Dubois 2 participants 5 messages Jul 30, 2018 Arm i.MX and Layerscape

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

v2 cover i.MX: Add the i.MX6UL SOC and a reference board.

This series adds the i.MX6UL SOC from NXP/Freescale and the reference evaluation board.

This series was tested by booting linux 4.18 (built using imx_v6_v7_defconfig) on the emulated board (with the appropriate device tree).

Jean-Christophe Dubois (3):
i.MX6UL: Add i.MX6UL specific CCM device i.MX6UL: Add i.MX6UL SOC
i.MX6UL: Add Freescale i.MX6 UltraLite 14x14 EVK Board

 default-configs/arm-softmmu.mak |   1 +
 hw/arm/Makefile.objs            |   1 +
 hw/arm/fsl-imx6ul.c             | 618 ++++++++++++++++++++++
 hw/arm/mcimx6ul-evk.c           |  85 +++
 hw/misc/Makefile.objs           |   1 +
 hw/misc/imx6ul_ccm.c            | 890 ++++++++++++++++++++++++++++++++
 hw/misc/trace-events            |   7 +
 include/hw/arm/fsl-imx6ul.h     | 339 ++++++++++++
 include/hw/misc/imx6ul_ccm.h    | 226 ++++++++
 9 files changed, 2168 insertions(+)
 create mode 100644 hw/arm/fsl-imx6ul.c
 create mode 100644 hw/arm/mcimx6ul-evk.c
 create mode 100644 hw/misc/imx6ul_ccm.c
 create mode 100644 include/hw/arm/fsl-imx6ul.h
 create mode 100644 include/hw/misc/imx6ul_ccm.h
Signature · 1 line
2.17.1
#1 lore raw

PATCH v2 1/3 i.MX6UL: Add i.MX6UL specific CCM device

---

Changes in V2:
* move all CCM "debug" to the "trace" framework for i.MX6UL
* remove unecessary breaks
* prevent g_assert_not_reached triggered by guest.
* Add assert to help static analyzer.
* use FIELD_EX32 from hw/registerfields.h instead of defining my own.

 hw/misc/Makefile.objs        |   1 +
 hw/misc/imx6ul_ccm.c         | 890 +++++++++++++++++++++++++++++++++++
 hw/misc/trace-events         |   7 +
 include/hw/misc/imx6ul_ccm.h | 226 +++++++++
 4 files changed, 1124 insertions(+)
 create mode 100644 hw/misc/imx6ul_ccm.c
 create mode 100644 include/hw/misc/imx6ul_ccm.h
hw/misc/Makefile.objs +1 -0
index 9350900845..51d27b3af1 100644
@@ -36,6 +36,7 @@ obj-$(CONFIG_IMX) += imx_ccm.o
 obj-$(CONFIG_IMX) += imx31_ccm.o
 obj-$(CONFIG_IMX) += imx25_ccm.o
 obj-$(CONFIG_IMX) += imx6_ccm.o
+obj-$(CONFIG_IMX) += imx6ul_ccm.o
 obj-$(CONFIG_IMX) += imx6_src.o
 obj-$(CONFIG_IMX) += imx7_ccm.o
 obj-$(CONFIG_IMX) += imx2_wdt.o
hw/misc/imx6ul_ccm.c new file +890 -0

890 lines not on this page · raw message

hw/misc/trace-events +7 -0
index c956e1419b..1341508b33 100644
@@ -109,3 +109,10 @@ iotkit_secctl_s_write(uint32_t offset, uint64_t data, unsigned size) "IoTKit Sec
 iotkit_secctl_ns_read(uint32_t offset, uint64_t data, unsigned size) "IoTKit SecCtl NS regs read: offset 0x%x data 0x%" PRIx64 " size %u"
 iotkit_secctl_ns_write(uint32_t offset, uint64_t data, unsigned size) "IoTKit SecCtl NS regs write: offset 0x%x data 0x%" PRIx64 " size %u"
 iotkit_secctl_reset(void) "IoTKit SecCtl: reset"
+
+# hw/misc/imx6ul_ccm.c
+ccm_entry(void) "\n"
+ccm_freq(uint32_t freq) "freq = %d\n"
+ccm_clock_freq(uint32_t clock, uint32_t freq) "(Clock = %d) = %d\n"
+ccm_read_reg(const char *reg_name, uint32_t value) "reg[%s] <= 0x%" PRIx32 "\n"
+ccm_write_reg(const char *reg_name, uint32_t value) "reg[%s] => 0x%" PRIx32 "\n"
include/hw/misc/imx6ul_ccm.h new file +226 -0

226 lines not on this page · raw message

Signature · 1 line
2.17.1
#2 lore raw

PATCH v2 2/3 i.MX6UL: Add i.MX6UL SOC

In reply to Jean-Christophe Dubois

---

Changes in V2:
* use object_initialize_child instead of several funcions
* use sysbus_init_child_obj instead for several functions

 default-configs/arm-softmmu.mak |   1 +
 hw/arm/Makefile.objs            |   1 +
 hw/arm/fsl-imx6ul.c             | 618 ++++++++++++++++++++++++++++++++
 include/hw/arm/fsl-imx6ul.h     | 339 ++++++++++++++++++
 4 files changed, 959 insertions(+)
 create mode 100644 hw/arm/fsl-imx6ul.c
 create mode 100644 include/hw/arm/fsl-imx6ul.h
default-configs/arm-softmmu.mak +1 -0
index 834d45cfaf..311584fd74 100644
@@ -133,6 +133,7 @@ CONFIG_FSL_IMX6=y
 CONFIG_FSL_IMX31=y
 CONFIG_FSL_IMX25=y
 CONFIG_FSL_IMX7=y
+CONFIG_FSL_IMX6UL=y
 
 CONFIG_IMX_I2C=y
 
hw/arm/Makefile.objs +1 -0
index d51fcecaf2..e419ad040b 100644
@@ -36,3 +36,4 @@ obj-$(CONFIG_MSF2) += msf2-soc.o msf2-som.o
 obj-$(CONFIG_IOTKIT) += iotkit.o
 obj-$(CONFIG_FSL_IMX7) += fsl-imx7.o mcimx7d-sabre.o
 obj-$(CONFIG_ARM_SMMUV3) += smmu-common.o smmuv3.o
+obj-$(CONFIG_FSL_IMX6UL) += fsl-imx6ul.o
hw/arm/fsl-imx6ul.c new file +618 -0

618 lines not on this page · raw message

include/hw/arm/fsl-imx6ul.h new file +339 -0

339 lines not on this page · raw message

Signature · 1 line
2.17.1
#3 lore raw

PATCH v2 3/3 i.MX6UL: Add Freescale i.MX6 UltraLite 14x14 EVK Board

In reply to Jean-Christophe Dubois

Tested by booting linux 4.18 (built using imx_v6_v7_defconfig) on the emulated board.

---

Changes in V2:
* use object_initialize_child instead of several funcions

 hw/arm/Makefile.objs  |  2 +-
 hw/arm/mcimx6ul-evk.c | 85 +++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 86 insertions(+), 1 deletion(-)
 create mode 100644 hw/arm/mcimx6ul-evk.c
hw/arm/Makefile.objs +1 -1
index e419ad040b..2902f47b4c 100644
@@ -36,4 +36,4 @@ obj-$(CONFIG_MSF2) += msf2-soc.o msf2-som.o
 obj-$(CONFIG_IOTKIT) += iotkit.o
 obj-$(CONFIG_FSL_IMX7) += fsl-imx7.o mcimx7d-sabre.o
 obj-$(CONFIG_ARM_SMMUV3) += smmu-common.o smmuv3.o
-obj-$(CONFIG_FSL_IMX6UL) += fsl-imx6ul.o
+obj-$(CONFIG_FSL_IMX6UL) += fsl-imx6ul.o mcimx6ul-evk.o
hw/arm/mcimx6ul-evk.c new file +85 -0

85 lines not on this page · raw message

Signature · 1 line
2.17.1
#4 lore raw
In reply to Jean-Christophe Dubois
This series seems to have some coding style problems. See output below for more information:

Hi,

This series seems to have some coding style problems. See output below for more information:

Type: series
Message-id: [email protected]
Subject: [Qemu-devel] [PATCH v2 0/3] i.MX: Add the i.MX6UL SOC and a reference board.

=== TEST SCRIPT BEGIN ===
#!/bin/bash

BASE=base
n=1
total=$(git log --oneline $BASE.. | wc -l)
failed=0

git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram

commits="$(git log --format=%H --reverse $BASE..)" for c in $commits; do

    echo "Checking PATCH $n/$total: $(git log -n 1 --format=%s $c)..."
    if ! git show $c --format=email | ./scripts/checkpatch.pl --mailback -; then
        failed=1
        echo
    fi
    n=$((n+1))

done

exit $failed
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
From https://github.com/patchew-project/qemu

   6d9dd5fb9d..7aefc14565  master     -> master
 t [tag update]            patchew/[email protected] -> patchew/[email protected]
 * [new tag]               patchew/[email protected] -> patchew/[email protected]

Switched to a new branch 'test'
d305c7d6d0 i.MX6UL: Add Freescale i.MX6 UltraLite 14x14 EVK Board d45a2a8602 i.MX6UL: Add i.MX6UL SOC
07fff3d865 i.MX6UL: Add i.MX6UL specific CCM device

=== OUTPUT BEGIN ===
Checking PATCH 1/3: i.MX6UL: Add i.MX6UL specific CCM device...
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #22:
new file mode 100644

total: 0 errors, 1 warnings, 1133 lines checked

Your patch has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
Checking PATCH 2/3: i.MX6UL: Add i.MX6UL SOC...
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #31:
new file mode 100644

ERROR: suspect code indent for conditional statements (4, 7) #113: FILE: hw/arm/fsl-imx6ul.c:78:
+ for (i = 0; i < FSL_IMX6UL_NUM_GPIOS; i++) {
+ snprintf(name, NAME_SIZE, "gpio%d", i);

ERROR: suspect code indent for conditional statements (4, 7) #122: FILE: hw/arm/fsl-imx6ul.c:87:
+ for (i = 0; i < FSL_IMX6UL_NUM_GPTS; i++) {
+ snprintf(name, NAME_SIZE, "gpt%d", i);

ERROR: suspect code indent for conditional statements (4, 7) #131: FILE: hw/arm/fsl-imx6ul.c:96:
+ for (i = 0; i < FSL_IMX6UL_NUM_EPITS; i++) {
+ snprintf(name, NAME_SIZE, "epit%d", i + 1);

ERROR: suspect code indent for conditional statements (4, 7) #140: FILE: hw/arm/fsl-imx6ul.c:105:
+ for (i = 0; i < FSL_IMX6UL_NUM_ECSPIS; i++) {
+ snprintf(name, NAME_SIZE, "spi%d", i + 1);

ERROR: suspect code indent for conditional statements (4, 7) #149: FILE: hw/arm/fsl-imx6ul.c:114:
+ for (i = 0; i < FSL_IMX6UL_NUM_I2CS; i++) {
+ snprintf(name, NAME_SIZE, "i2c%d", i + 1);

ERROR: suspect code indent for conditional statements (4, 7) #158: FILE: hw/arm/fsl-imx6ul.c:123:
+ for (i = 0; i < FSL_IMX6UL_NUM_UARTS; i++) {
+ snprintf(name, NAME_SIZE, "uart%d", i);

ERROR: suspect code indent for conditional statements (4, 7) #167: FILE: hw/arm/fsl-imx6ul.c:132:
+ for (i = 0; i < FSL_IMX6UL_NUM_ETHS; i++) {
+ snprintf(name, NAME_SIZE, "eth%d", i);

ERROR: suspect code indent for conditional statements (4, 7) #176: FILE: hw/arm/fsl-imx6ul.c:141:
+ for (i = 0; i < FSL_IMX6UL_NUM_USDHCS; i++) {
+ snprintf(name, NAME_SIZE, "usdhc%d", i);

ERROR: suspect code indent for conditional statements (4, 7) #185: FILE: hw/arm/fsl-imx6ul.c:150:
+ for (i = 0; i < FSL_IMX6UL_NUM_WDTS; i++) {
+ snprintf(name, NAME_SIZE, "wdt%d", i);

total: 9 errors, 1 warnings, 968 lines checked

Your patch has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.

Checking PATCH 3/3: i.MX6UL: Add Freescale i.MX6 UltraLite 14x14 EVK Board...
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #23:
new file mode 100644

total: 0 errors, 1 warnings, 90 lines checked

Your patch has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
=== OUTPUT END ===

Test command exited with code: 1

---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to [email protected]