Skip to contentSkip to conversation

arm: dts: da850: Migrate da850-evm DTS files from Linux 4.13-RC5

PATCH Superseded Adam Ford 3 participants 6 messages Aug 26, 2017 – Sep 1, 2017

Subsystems (2)

v1 of 4 Superseded Latest is v4 →

lore
Share & tools
lore

Adam Ford

author
#0 lore raw

PATCH 1/3 arm: dts: da850: Migrate da850-evm DTS files from Linux 4.13-RC5

A few small additional items are needed to support DM_SPI and DM_SERIAL, so those were added to da850-evm-u-boot.dtsi

---
 arch/arm/dts/da850-evm-u-boot.dtsi |  22 ++
 arch/arm/dts/da850-evm.dts         | 304 +++++++++++++++++++
 arch/arm/dts/da850.dtsi            | 581 +++++++++++++++++++++++++++++++++++++
 arch/arm/dts/tps6507x.dtsi         |  47 +++
 4 files changed, 954 insertions(+)
arch/arm/dts/da850-evm-u-boot.dtsi new file +22 -0
new file mode 100644
index 0000000..516bc1d
@@ -0,0 +1,22 @@
+/*
+ * da850-evm U-Boot Additions
+ *
+ * Copyright (C) 2017 Logic PD, Inc.
+ * Copyright (C) Adam Ford
+ *
+ * SPDX-License-Identifier:	GPL-2.0+
+ */
+
+/ {
+	chosen {
+		stdout-path = &serial2;
+	};
+
+	aliases {
+		spi0 = &spi1;
+	};
+};
+
+&flash {
+	compatible = "m25p64", "spi-flash";
+};
arch/arm/dts/da850-evm.dts new file +304 -0

304 lines not on this page · raw message

arch/arm/dts/da850.dtsi new file +581 -0

581 lines not on this page · raw message

arch/arm/dts/tps6507x.dtsi new file +47 -0

47 lines not on this page · raw message

Signature · 1 line
2.7.4
author
#1 lore raw

PATCH 2/3 spi: davinci_spi: Add da830-spi support for DM

The DM support is already in the driver, so add
da830-spi to the compatible list.

---
 drivers/spi/davinci_spi.c | 1 +
 1 file changed, 1 insertion(+)
drivers/spi/davinci_spi.c +1 -0
index 291ef95..eda252d 100644
@@ -563,6 +563,7 @@ static const struct dm_spi_ops davinci_spi_ops = {
 static const struct udevice_id davinci_spi_ids[] = {
 	{ .compatible = "ti,keystone-spi" },
 	{ .compatible = "ti,dm6441-spi" },
+	{ .compatible = "ti,da830-spi" },
 	{ }
 };
 
Signature · 1 line
2.7.4
#2 lore raw

PATCH 2/3 spi: davinci_spi: Add da830-spi support for DM

Quoted 4 lines · Adam Ford

The DM support is already in the driver, so add
da830-spi to the compatible list.

thanks!

Signature · 4 lines
Jagan Teki
Free Software Engineer | www.openedev.com
U-Boot, Linux | Upstream Maintainer
Hyderabad, India.
author
#3 lore raw

PATCH 3/3 arm: da850-evm: Enable DM and device tree support for da850-evm

In reply to Adam Ford

With the device tree ported and DM compatible drivers, enable:
OF_CONTROL, DM_SPI, DM_SPI_FLASH and DM_SERIAL

---
 configs/da850evm_defconfig |  9 +++++++--
 include/configs/da850evm.h | 17 +++++++++++++++--
 2 files changed, 22 insertions(+), 4 deletions(-)
configs/da850evm_defconfig +7 -2
index 0135e7d..652da01 100644
@@ -6,8 +6,8 @@ CONFIG_SPL_LIBGENERIC_SUPPORT=y
 CONFIG_SPL_SERIAL_SUPPORT=y
 CONFIG_SPL_SPI_FLASH_SUPPORT=y
 CONFIG_SPL_SPI_SUPPORT=y
+CONFIG_DEFAULT_DEVICE_TREE="da850-evm"
 CONFIG_SYS_EXTRA_OPTIONS="MAC_ADDR_IN_SPIFLASH"
-CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_BOOTDELAY=3
 CONFIG_USE_BOOTARGS=y
 CONFIG_BOOTARGS="mem=32M console=ttyS2,115200n8 root=/dev/mtdblock2 rw noinitrd ip=dhcp"
@@ -34,8 +34,13 @@ CONFIG_CMD_PING=y
 CONFIG_CMD_EXT2=y
 CONFIG_CMD_FAT=y
 CONFIG_CMD_DIAG=y
+CONFIG_OF_CONTROL=y
+CONFIG_ENV_IS_IN_SPI_FLASH=y
+CONFIG_DM=y
+CONFIG_DM_SPI_FLASH=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SPI_FLASH_WINBOND=y
+CONFIG_DM_SERIAL=y
 CONFIG_SYS_NS16550=y
-CONFIG_OF_LIBFDT=y
+CONFIG_DM_SPI=y
include/configs/da850evm.h +15 -2
index 0736b39..b147bc5 100644
@@ -21,6 +21,15 @@
 #endif
 
 /*
+* Disable DM_* for SPL build and can be re-enabled after adding
+* DM support in SPL
+*/
+#ifdef CONFIG_SPL_BUILD
+#undef CONFIG_DM_SPI
+#undef CONFIG_DM_SPI_FLASH
+#undef CONFIG_DM_I2C
+#endif
+/*
  * SoC Configuration
  */
 #define CONFIG_MACH_DAVINCI_DA850_EVM
@@ -130,18 +139,23 @@
 /*
  * Serial Driver info
  */
+
+#ifdef CONFIG_SPL_BUILD
 #define CONFIG_SYS_NS16550_SERIAL
 #define CONFIG_SYS_NS16550_REG_SIZE	-4	/* NS16550 register size */
 #define CONFIG_SYS_NS16550_COM1	DAVINCI_UART2_BASE /* Base address of UART2 */
+#endif
 #define CONFIG_SYS_NS16550_CLK	clk_get(DAVINCI_UART2_CLKID)
 #define CONFIG_CONS_INDEX	1		/* use UART0 for console */
 
 #define CONFIG_SPI
 #define CONFIG_DAVINCI_SPI
-#define CONFIG_SYS_SPI_BASE		DAVINCI_SPI1_BASE
 #define CONFIG_SYS_SPI_CLK		clk_get(DAVINCI_SPI1_CLKID)
+#ifdef CONFIG_SPL_BUILD
+#define CONFIG_SYS_SPI_BASE		DAVINCI_SPI1_BASE
 #define CONFIG_SF_DEFAULT_SPEED		30000000
 #define CONFIG_ENV_SPI_MAX_HZ	CONFIG_SF_DEFAULT_SPEED
+#endif
 
 #ifdef CONFIG_USE_SPIFLASH
 #define CONFIG_SPL_SPI_LOAD
@@ -152,7 +166,6 @@
 /*
  * I2C Configuration
  */
-#define CONFIG_SYS_I2C
 #define CONFIG_SYS_I2C_DAVINCI
 #define CONFIG_SYS_DAVINCI_I2C_SPEED		25000
 #define CONFIG_SYS_DAVINCI_I2C_SLAVE   10 /* Bogus, master-only in U-Boot */
Signature · 1 line
2.7.4
#4 lore raw

PATCH 1/3 arm: dts: da850: Migrate da850-evm DTS files from Linux 4.13-RC5

In reply to Adam Ford
Quoted 25 lines · Adam Ford

A few small additional items are needed to support DM_SPI and DM_SERIAL, so those were added to da850-evm-u-boot.dtsi

---
 arch/arm/dts/da850-evm-u-boot.dtsi |  22 ++
 arch/arm/dts/da850-evm.dts         | 304 +++++++++++++++++++
 arch/arm/dts/da850.dtsi            | 581 +++++++++++++++++++++++++++++++++++++
 arch/arm/dts/tps6507x.dtsi         |  47 +++
 4 files changed, 954 insertions(+)
arch/arm/dts/da850-evm-u-boot.dtsi new file +8 -0
new file mode 100644
index 0000000..516bc1d
@@ -0,0 +1,22 @@
+/*
+ * da850-evm U-Boot Additions
+ *
+ * Copyright (C) 2017 Logic PD, Inc.
+ * Copyright (C) Adam Ford
+ *
+ * SPDX-License-Identifier:	GPL-2.0+
+ */

arch/arm/dts/da850-evm-u-boot.dtsi line 18

Quoted 10 lines
arch/arm/dts/da850-evm-u-boot.dtsi new file +10 -0
+
+/ {
+	chosen {
+		stdout-path = &serial2;
+	};
+
+	aliases {
+		spi0 = &spi1;
+	};
+};

These look like useful for kernel too, can you please submit patches adding them for kernel too?

Thanks,
Sekhar

author
#5 lore raw

PATCH 1/3 arm: dts: da850: Migrate da850-evm DTS files from Linux 4.13-RC5

Quoted 31 lines · Sekhar Nori
Quoted 30 lines · Adam Ford

A few small additional items are needed to support DM_SPI and DM_SERIAL, so those were added to da850-evm-u-boot.dtsi

---
 arch/arm/dts/da850-evm-u-boot.dtsi |  22 ++
 arch/arm/dts/da850-evm.dts         | 304 +++++++++++++++++++
 arch/arm/dts/da850.dtsi            | 581 +++++++++++++++++++++++++++++++++++++
 arch/arm/dts/tps6507x.dtsi         |  47 +++
 4 files changed, 954 insertions(+)
arch/arm/dts/da850-evm-u-boot.dtsi new file +13 -0
new file mode 100644
index 0000000..516bc1d
@@ -0,0 +1,22 @@
+/*
+ * da850-evm U-Boot Additions
+ *
+ * Copyright (C) 2017 Logic PD, Inc.
+ * Copyright (C) Adam Ford
+ *
+ * SPDX-License-Identifier:  GPL-2.0+
+ */
+
+/ {
+     chosen {
+             stdout-path = &serial2;
+     };
Quoted 8 lines

arch/arm/dts/da850-evm-u-boot.dtsi line 18

Quoted 5 lines
arch/arm/dts/da850-evm-u-boot.dtsi new file +5 -0
+
+     aliases {
+             spi0 = &spi1;
+     };
+};

These look like useful for kernel too, can you please submit patches adding them for kernel too?

I will do that.

Quoted 2 lines

Thanks,

No problem.

Quoted 1 line

Sekhar

adam