Skip to contentSkip to conversation

omap5 uevm: convert to device model

PATCH Superseded Tero Kristo 1 participant 3 messages Jun 2, 2020

Subsystems (3)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

cover omap5 uevm: convert to device model

Hi,

Following the omap4 panda conversion series, this converts the omap5-uevm board to device model. Some semi nasty hacks were needed in the omap5-u-boot.dtsi files as this is common to both dra7xx and omap5, due to overloading of dra7xx architecture on top of omap5. Fixing that requires some more patching, so I just did a simple #ifdef within the u-boot specific dtsi file for now.

-Tero

--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

#1 lore raw

PATCH 1/2 omap5: Copy device tree from linux 5.7.y

Copy all the device tree files required for omap5 uevm support from mainline Linux.

---
 arch/arm/dts/Makefile                |    3 +
 arch/arm/dts/omap5-board-common.dtsi |  762 ++++++++
 arch/arm/dts/omap5-l4-abe.dtsi       |  450 +++++
 arch/arm/dts/omap5-l4.dtsi           | 2438 ++++++++++++++++++++++++++
 arch/arm/dts/omap5-uevm.dts          |  200 +++
 arch/arm/dts/omap5.dtsi              |  583 ++++++
 arch/arm/dts/omap54xx-clocks.dtsi    | 1208 +++++++++++++
 include/dt-bindings/clock/omap5.h    |  129 ++
 8 files changed, 5773 insertions(+)
 create mode 100644 arch/arm/dts/omap5-board-common.dtsi
 create mode 100644 arch/arm/dts/omap5-l4-abe.dtsi
 create mode 100644 arch/arm/dts/omap5-l4.dtsi
 create mode 100644 arch/arm/dts/omap5-uevm.dts
 create mode 100644 arch/arm/dts/omap5.dtsi
 create mode 100644 arch/arm/dts/omap54xx-clocks.dtsi
 create mode 100644 include/dt-bindings/clock/omap5.h
arch/arm/dts/Makefile +3 -0
index dd574f57fa..f804d00cc2 100644
@@ -852,6 +852,9 @@ dtb-$(CONFIG_TARGET_OMAP4_PANDA) += \
 	omap4-panda.dtb \
 	omap4-panda-es.dtb
 
+dtb-$(CONFIG_TARGET_OMAP5_UEVM) += \
+	omap5-uevm.dtb
+
 dtb-$(CONFIG_TARGET_SAMA5D2_PTC_EK) += \
 	at91-sama5d2_ptc_ek.dtb
 
arch/arm/dts/omap5-board-common.dtsi new file +762 -0

762 lines not on this page · raw message

arch/arm/dts/omap5-l4-abe.dtsi new file +450 -0

450 lines not on this page · raw message

arch/arm/dts/omap5-l4.dtsi new file +2438 -0

1,779 lines not on this page · raw message

arch/arm/dts/omap5-uevm.dts new file +200 -0

200 lines not on this page · raw message

arch/arm/dts/omap5.dtsi new file +583 -0

583 lines not on this page · raw message

arch/arm/dts/omap54xx-clocks.dtsi new file +1208 -0

1,208 lines not on this page · raw message

include/dt-bindings/clock/omap5.h new file +129 -0

129 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Signature · 4 lines
2.17.1

--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

Part of the diff is not shown here. View the raw message.

#2 lore raw

PATCH 2/2 omap5: uevm: convert to device model

In reply to Tero Kristo

Convert omap5 uevm board to device model.

---
 arch/arm/dts/omap5-u-boot.dtsi | 42 ++++++++++++++++++
 board/ti/omap5_uevm/evm.c      | 78 +++++-----------------------------
 configs/omap5_uevm_defconfig   |  9 ++++
 3 files changed, 61 insertions(+), 68 deletions(-)
arch/arm/dts/omap5-u-boot.dtsi +42 -0
index 39071e223d..5a1c7bc9fe 100644
@@ -7,6 +7,7 @@
  * Based on "dra7.dtsi"
  */
 
+#ifdef CONFIG_DRA7XX
 /{
 	chosen {
 		tick-timer = &timer2;
@@ -105,3 +106,44 @@
 &i2c1 {
 	u-boot,dm-spl;
 };
+
+#else /* OMAP54XX */
+&l4_cfg {
+	segment at 0 {
+		/* SCM Core */
+		target-module at 2000 {
+			compatible = "simple-bus";
+		};
+
+		/* USB HS */
+		target-module at 64000 {
+			compatible = "simple-bus";
+		};
+	};
+};
+
+&l4_per {
+	segment at 0 {
+		/* UART3 */
+		target-module at 20000 {
+			compatible = "simple-bus";
+		};
+
+		/* I2C1 */
+		target-module at 70000 {
+			compatible = "simple-bus";
+		};
+
+		/* MMC1 */
+		target-module at 9c000 {
+			compatible = "simple-bus";
+		};
+
+		/* MMC2 */
+		target-module at b4000 {
+			compatible = "simple-bus";
+		};
+	};
+};
+
+#endif
board/ti/omap5_uevm/evm.c +10 -68

108 lines not on this page · raw message

configs/omap5_uevm_defconfig +9 -0
index 487f7f305c..1b208b10c3 100644
@@ -2,6 +2,7 @@ CONFIG_ARM=y
 CONFIG_ARCH_OMAP2PLUS=y
 CONFIG_OMAP54XX=y
 CONFIG_TARGET_OMAP5_UEVM=y
+CONFIG_DEFAULT_DEVICE_TREE="omap5-uevm"
 CONFIG_OMAP_PLATFORM_RESET_TIME_MAX_USEC=16296
 CONFIG_SPL=y
 CONFIG_ENV_OFFSET_REDUND=0x280000
@@ -10,6 +11,7 @@ CONFIG_SPL_TEXT_BASE=0x40300000
 CONFIG_DISTRO_DEFAULTS=y
 # CONFIG_USE_BOOTCOMMAND is not set
 CONFIG_SYS_CONSOLE_INFO_QUIET=y
+CONFIG_DEFAULT_FDT_FILE="omap5-uevm.dtb"
 CONFIG_VERSION_VARIABLE=y
 # CONFIG_SPL_NAND_SUPPORT is not set
 CONFIG_SPL_OS_BOOT=y
@@ -24,10 +26,14 @@ CONFIG_CMD_SPI=y
 CONFIG_CMD_USB=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_EXT4_WRITE=y
+CONFIG_OF_CONTROL=y
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
+CONFIG_DM=y
+CONFIG_DM_MMC=y
+CONFIG_AHCI=y
 CONFIG_SCSI_AHCI=y
 CONFIG_DFU_MMC=y
 CONFIG_DFU_RAM=y
@@ -40,6 +46,7 @@ CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_OMAP3_SPI=y
 CONFIG_USB=y
+CONFIG_DM_USB=y
 CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_DWC3=y
 CONFIG_USB_DWC3_OMAP=y
@@ -53,3 +60,5 @@ CONFIG_USB_HOST_ETHER=y
 CONFIG_USB_ETHER_SMSC95XX=y
 CONFIG_FAT_WRITE=y
 CONFIG_OF_LIBFDT=y
+CONFIG_SYS_MALLOC_F_LEN=0x4000
+CONFIG_DM_ETH=y
Signature · 4 lines
2.17.1

--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki