Skip to contentSkip to conversation

ARM: DTS: LogicPD-SOM-LV & Torpedo: Resync DTS with Kernel

PATCH New Adam Ford 2 participants 10 messages Sep 29, 2018 – Oct 7, 2018 Arm (32-bit)

lore
Share & tools
lore

Adam Ford

author
#0 lore raw

PATCH 1/5 ARM: DTS: LogicPD-SOM-LV & Torpedo: Resync DTS with Kernel

The device tree entries are from linux-omap's for-next branch destined to me put into 4.20 (or whatever the version is after 4.19)

arch/arm/dts/logicpd-som-lv-37xx-devkit.dts +15 -0
index 2428373952..2aca9111c6 100644
@@ -15,3 +15,18 @@
 	model = "LogicPD Zoom DM3730 SOM-LV Development Kit";
 	compatible = "logicpd,dm3730-som-lv-devkit", "ti,omap3630", "ti,omap3";
 };
+
+&omap3_pmx_core2 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&hsusb2_2_pins>;
+	hsusb2_2_pins: pinmux_hsusb2_2_pins {
+		pinctrl-single,pins = <
+			OMAP3630_CORE2_IOPAD(0x25f0, PIN_OUTPUT | MUX_MODE3)            /* etk_d10.hsusb2_clk */
+			OMAP3630_CORE2_IOPAD(0x25f2, PIN_OUTPUT | MUX_MODE3)            /* etk_d11.hsusb2_stp */
+			OMAP3630_CORE2_IOPAD(0x25f4, PIN_INPUT_PULLDOWN | MUX_MODE3)    /* etk_d12.hsusb2_dir */
+			OMAP3630_CORE2_IOPAD(0x25f6, PIN_INPUT_PULLDOWN | MUX_MODE3)    /* etk_d13.hsusb2_nxt */
+			OMAP3630_CORE2_IOPAD(0x25f8, PIN_INPUT_PULLDOWN | MUX_MODE3)    /* etk_d14.hsusb2_data0 */
+			OMAP3630_CORE2_IOPAD(0x25fa, PIN_INPUT_PULLDOWN | MUX_MODE3)    /* etk_d15.hsusb2_data1 */
+		>;
+	};
+};
arch/arm/dts/logicpd-som-lv.dtsi +16 -29

69 lines not on this page · raw message

arch/arm/dts/logicpd-torpedo-37xx-devkit.dts +1 -1
index 234afd6d60..9d5d53fbe9 100644
@@ -48,7 +48,7 @@
 		compatible = "ti,wl1283";
 		reg = <2>;
 		interrupt-parent = <&gpio5>;
-		interrupts = <24 IRQ_TYPE_LEVEL_HIGH>; /* gpio 152 */
+		interrupts = <24 IRQ_TYPE_EDGE_RISING>; /* gpio 152 */
 		ref-clock-frequency = <26000000>;
 		tcxo-clock-frequency = <26000000>;
 	};
Signature · 1 line
2.17.1
author
#1 lore raw

PATCH 2/5 ARM: DTS: Remove unnecessary u-boot.dtsi options from omap3/36xx

With the introduction of the omap serial driver, the need for some of these U-Boot specific modifications is gone. This cleans up this unnneeded stuff.

arch/arm/dts/logicpd-torpedo-37xx-devkit-u-boot.dtsi +0 -20
index d584b4a9ab..41ed5d7e17 100644
@@ -4,14 +4,6 @@
  * Logic PD - http://www.logicpd.com
  */
 
-/ {
-	model = "LogicPD Zoom OMAP3 Development Kit";
-
-	chosen {
-		stdout-path = &uart1;
-	};
-};
-
 &i2c1 {
 	clock-frequency = <400000>;
 };
@@ -28,15 +20,3 @@
       status = "disabled";
 };
 
-&uart1 {
-	reg-shift = <2>;
-};
-
-&uart2 {
-	reg-shift = <2>;
-};
-
-&uart3 {
-	reg-shift = <2>;
-};
-
arch/arm/dts/omap3-u-boot.dtsi deleted +0 -18
deleted file mode 100644
index 633153a41e..0000000000
@@ -1,18 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0+
-/*
- * Copyright (C) 2017
- * Logic PD - http://www.logicpd.com
- */
-
-&uart1 {
-	reg-shift = <2>;
-};
-
-&uart2 {
-	reg-shift = <2>;
-};
-
-&uart3 {
-	reg-shift = <2>;
-};
-
arch/arm/dts/omap36xx-u-boot.dtsi deleted +0 -9
deleted file mode 100644
index 374499dcb2..0000000000
@@ -1,9 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0+
-/*
- * Copyright (C) 2017
- * Logic PD - http://www.logicpd.com
- */
-
-&uart4 {
-	reg-shift = <2>;
-};
Signature · 1 line
2.17.1
#2 lore raw

PATCH 2/5 ARM: DTS: Remove unnecessary u-boot.dtsi options from omap3/36xx

arch/arm/dts/logicpd-torpedo-37xx-devkit-u-boot.dtsi

Quoted 8 lines · Adam Ford

With the introduction of the omap serial driver, the need for some of these U-Boot specific modifications is gone. This cleans up this unnneeded stuff.

arch/arm/dts/logicpd-torpedo-37xx-devkit-u-boot.dtsi +0 -0
index d584b4a9ab..41ed5d7e17 100644

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20181006/a6fda96d/attachment.sig>
author
#3 lore raw

PATCH 3/5 ARM: DTS: Add support for Logic PD OMAP35 Torpedo & SOM-LV

In reply to Adam Ford

The baseboards and SOM's are virtually identical to their DM37 counterparts, but OMAP36/37 and OMAP3 have some minor register differences. With the boards being mostly driven by device trees now, this synchronizes their respective device trees with linux-omap for-next branch destined for 4.20 (or whatever the version after 4.19 will be called)

arch/arm/dts/logicpd-som-lv-35xx-devkit.dts new file +32 -0
new file mode 100644
index 0000000000..4cd72b5e61
@@ -0,0 +1,32 @@
+/*
+ * 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.
+ */
+
+/dts-v1/;
+
+#include "omap34xx.dtsi"
+#include "logicpd-som-lv.dtsi"
+#include "logicpd-som-lv-baseboard.dtsi"
+#include "omap-gpmc-smsc9221.dtsi"
+
+/ {
+	model = "LogicPD Zoom OMAP35xx SOM-LV Development Kit";
+	compatible = "logicpd,dm3730-som-lv-devkit", "ti,omap3";
+};
+
+&omap3_pmx_core2 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&hsusb2_2_pins>;
+	hsusb2_2_pins: pinmux_hsusb2_2_pins {
+		pinctrl-single,pins = <
+			OMAP3430_CORE2_IOPAD(0x25f0, PIN_OUTPUT | MUX_MODE3)            /* etk_d10.hsusb2_clk */
+			OMAP3430_CORE2_IOPAD(0x25f2, PIN_OUTPUT | MUX_MODE3)            /* etk_d11.hsusb2_stp */
+			OMAP3430_CORE2_IOPAD(0x25f4, PIN_INPUT_PULLDOWN | MUX_MODE3)    /* etk_d12.hsusb2_dir */
+			OMAP3430_CORE2_IOPAD(0x25f6, PIN_INPUT_PULLDOWN | MUX_MODE3)    /* etk_d13.hsusb2_nxt */
+			OMAP3430_CORE2_IOPAD(0x25f8, PIN_INPUT_PULLDOWN | MUX_MODE3)    /* etk_d14.hsusb2_data0 */
+			OMAP3430_CORE2_IOPAD(0x25fa, PIN_INPUT_PULLDOWN | MUX_MODE3)    /* etk_d15.hsusb2_data1 */
+		>;
+	};
+};
arch/arm/dts/logicpd-torpedo-35xx-devkit.dts new file +17 -0
new file mode 100644
index 0000000000..d7cb659656
@@ -0,0 +1,17 @@
+/*
+ * 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.
+ */
+
+/dts-v1/;
+
+#include "omap34xx.dtsi"
+#include "logicpd-torpedo-som.dtsi"
+#include "logicpd-torpedo-baseboard.dtsi"
+#include "omap-gpmc-smsc9221.dtsi"
+
+/ {
+	model = "LogicPD Zoom OMAP35xx Torpedo Development Kit";
+	compatible = "logicpd,dm3730-torpedo-devkit", "ti,omap3";
+};
Signature · 1 line
2.17.1
#4 lore raw

PATCH 3/5 ARM: DTS: Add support for Logic PD OMAP35 Torpedo & SOM-LV

arch/arm/dts/logicpd-som-lv-35xx-devkit.dts

Quoted 12 lines · Adam Ford

The baseboards and SOM's are virtually identical to their DM37 counterparts, but OMAP36/37 and OMAP3 have some minor register differences. With the boards being mostly driven by device trees now, this synchronizes their respective device trees with linux-omap for-next branch destined for 4.20 (or whatever the version after 4.19 will be called)

arch/arm/dts/logicpd-som-lv-35xx-devkit.dts new file +0 -0
new file mode 100644
index 0000000000..4cd72b5e61

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20181006/3675e5ee/attachment.sig>
author
#5 lore raw

PATCH 4/5 ARM: DTS: Add Logic PD OMAP35/DM37 SOM-LV and OMAP35 Torpedo

In reply to Adam Ford

With the device trees doing most of the work of pin-muxing and DM doing much of the peripheral initialization, this creates new defconfig files for each of the Logic PD variants with proper register settings/pin-muxing.

arch/arm/dts/logicpd-som-lv-35xx-devkit-u-boot.dtsi new file +32 -0
new file mode 100644
index 0000000000..6445048fe0
@@ -0,0 +1,32 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright (C) 2017
+ * Logic PD - http://www.logicpd.com
+ */
+
+/ {
+	chosen {
+		stdout-path = &uart1;
+	};
+};
+
+&i2c1 {
+	clock-frequency = <400000>;
+};
+
+&i2c2 {
+	clock-frequency = <400000>;
+};
+
+&mmc1 {
+	cd-gpios = <&gpio4 14 GPIO_ACTIVE_LOW>;		/* gpio_110 */
+};
+
+&mmc2 {
+      status = "disabled";
+};
+
+&mmc3 {
+      status = "disabled";
+};
+
arch/arm/dts/logicpd-som-lv-37xx-devkit-u-boot.dtsi new file +32 -0
new file mode 100644
index 0000000000..6445048fe0
@@ -0,0 +1,32 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright (C) 2017
+ * Logic PD - http://www.logicpd.com
+ */
+
+/ {
+	chosen {
+		stdout-path = &uart1;
+	};
+};
+
+&i2c1 {
+	clock-frequency = <400000>;
+};
+
+&i2c2 {
+	clock-frequency = <400000>;
+};
+
+&mmc1 {
+	cd-gpios = <&gpio4 14 GPIO_ACTIVE_LOW>;		/* gpio_110 */
+};
+
+&mmc2 {
+      status = "disabled";
+};
+
+&mmc3 {
+      status = "disabled";
+};
+
arch/arm/dts/logicpd-torpedo-35xx-devkit-u-boot.dtsi new file +22 -0
new file mode 100644
index 0000000000..41ed5d7e17
@@ -0,0 +1,22 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright (C) 2017
+ * Logic PD - http://www.logicpd.com
+ */
+
+&i2c1 {
+	clock-frequency = <400000>;
+};
+
+&i2c2 {
+	clock-frequency = <400000>;
+};
+
+&mmc2 {
+      status = "disabled";
+};
+
+&mmc3 {
+      status = "disabled";
+};
+
configs/omap35_logic_defconfig new file +72 -0

72 lines not on this page · raw message

configs/omap35_logic_somlv_defconfig new file +72 -0

72 lines not on this page · raw message

configs/omap3_logic_somlv_defconfig new file +73 -0

73 lines not on this page · raw message

Signature · 1 line
2.17.1
#6 lore raw

PATCH 4/5 ARM: DTS: Add Logic PD OMAP35/DM37 SOM-LV and OMAP35 Torpedo

arch/arm/dts/logicpd-som-lv-35xx-devkit-u-boot.dtsi

Quoted 10 lines · Adam Ford

With the device trees doing most of the work of pin-muxing and DM doing much of the peripheral initialization, this creates new defconfig files for each of the Logic PD variants with proper register settings/pin-muxing.

arch/arm/dts/logicpd-som-lv-35xx-devkit-u-boot.dtsi new file +0 -0
new file mode 100644
index 0000000000..6445048fe0

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20181006/dddc4bc5/attachment.sig>
author
#7 lore raw

PATCH 5/5 ARM: LogicPD: omap3logic: Remove Torpedo/SOM-LV autodection

In reply to Adam Ford

With there now being four device tree files, and 4 separate defconfig files, the code necessary to determine which board is being used is no longer necessary as the corresponding pin-muxing and board names are determined by the device tree.

board/logicpd/omap3som/README +7 -13
index b77b3d63db..5aaf58f0a6 100644
@@ -1,21 +1,15 @@
 Summary
 =======
 
-The source for omap3som encompases the DM3730 SOM-LV and DM3730 Torpedo platforms.
+The source for omap3logic.c encompases the OMAP35 and DM3730 SOM-LV and DM3730 Torpedo platforms, but there are device trees custom taylored to each board.
 
-By default, the Torpedo Device Tree is integrated into U-Boot,but the MMC controller, GPIO and I2C controllers are the same, so for the purposes of loading U-Boot, it should be sufficient.  However this will display the Model as "LogicPD Zoom DM3730 Torpedo + Wireless Development Kit" upon boot.
+omap3_logic_defconfig = DM37 Torpedo / Torpedo + Wireless
+omap35_logic_defconfig = OMAP35 Torpedo
+omap3_logic_somlv_defconfig = DM37 SOM-LV
+omap35_logic_somlv_defconfig = OMAP35 SOM-LV
 
-The actual board remains autodetected and the Board will read "DM37xx SOM LV" when used on the DM37 SOM-LV.  The device tree loaded with Linux is also correct.
-
-Integrating the SOM-LV Device Tree into U-Boot
-==============================================
-
-This step is optional, but should you want to change the default to the SOM-LV, locate the configs/omap3_logic_defconfig file and make the following change.
-
-  CONFIG_DEFAULT_DEVICE_TREE="logicpd-som-lv-37xx-devkit"
-
-  make distclean
-  make omap3_logic_defconfig
+The device tree included with each of the defconfig files will also direct the board as to which dtb file to load when loading the kernel, so it is not
+recomended to mix and match the defconfig files.
 
 Falcon Mode: FAT SD cards
 =========================
board/logicpd/omap3som/omap3logic.c +0 -90

117 lines not on this page · raw message

include/configs/omap3_logic.h +1 -0
index 2cbdbebb26..8644e16830 100644
@@ -116,6 +116,7 @@
 		"ip=${ipaddr}:${tftpserver}:${gatewayip}:${netmask}::eth0:off\0" \
 	"nfsrootpath=/opt/nfs-exports/omap\0" \
 	"autoload=no\0" \
+	"fdtimage=" CONFIG_DEFAULT_DEVICE_TREE ".dtb\0" \
 	"loadfdt=mmc rescan; " \
 		"load mmc ${mmcdev} ${fdtaddr} ${fdtimage}\0" \
 	"mmcbootcommon=echo Booting with DT from mmc${mmcdev} ...; " \
Signature · 1 line
2.17.1
#8 lore raw

PATCH 5/5 ARM: LogicPD: omap3logic: Remove Torpedo/SOM-LV autodection

board/logicpd/omap3som/README

Quoted 9 lines · Adam Ford

With there now being four device tree files, and 4 separate defconfig files, the code necessary to determine which board is being used is no longer necessary as the corresponding pin-muxing and board names are determined by the device tree.

board/logicpd/omap3som/README +0 -0
index b77b3d63db..5aaf58f0a6 100644

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20181006/8d0ff434/attachment.sig>
#9 lore raw

PATCH 1/5 ARM: DTS: LogicPD-SOM-LV & Torpedo: Resync DTS with Kernel

In reply to Adam Ford

arch/arm/dts/logicpd-som-lv-37xx-devkit.dts

Quoted 7 lines · Adam Ford

The device tree entries are from linux-omap's for-next branch destined to me put into 4.20 (or whatever the version is after 4.19)

arch/arm/dts/logicpd-som-lv-37xx-devkit.dts +0 -0
index 2428373952..2aca9111c6 100644

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20181006/709009a5/attachment.sig>