diff mbox

[RFC] ARM: dts: igep: Add omap34xx board variant

Message ID 20171023202407.degszcfbzdemuu34@lenoch (mailing list archive)
State New, archived
Headers show

Commit Message

Ladislav Michl Oct. 23, 2017, 8:24 p.m. UTC
Some IGEPv2 boards were shipped with OMAP3530. Refactor includes
to make different processor support easier.

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
---
 Notes:
 ======
 As you might noted, this is just a RFC. Intended use is with modified
 u-boot, which will provide $soc_family variable to distinguish between
 OMAP3530 and DM3730 (OMAP3630) (and AM35XX) for completenes:

 From: Ladislav Michl <ladis@linux-mips.org>
 Subject: [PATCH] igep00x0: Add soc_family env variable

 ---
  board/isee/igep00x0/igep00x0.c | 21 +++++++++++++++++++++
  1 file changed, 21 insertions(+)

 diff --git a/board/isee/igep00x0/igep00x0.c b/board/isee/igep00x0/igep00x0.c
 index 5c7f256711..5f04d7485e 100644
 --- a/board/isee/igep00x0/igep00x0.c
 +++ b/board/isee/igep00x0/igep00x0.c
 @@ -203,6 +203,25 @@ void set_boardname(void)
  	env_set("board_name", i < 2 ? "igep0020" : "igep0030");
  }
  
 +static void set_soc_family(void)
 +{
 +	const char *s;
 +
 +	switch (get_cpu_family()) {
 +	case CPU_OMAP36XX:
 +		s = "omap36xx";
 +		break;
 +	case CPU_AM35XX:
 +		s = "am35xx";
 +		break;
 +	default:
 +		s = "omap34xx";
 +		break;
 +	}
 +
 +	env_set("soc_family", s);
 +}
 +
  /*
   * Routine: misc_init_r
   * Description: Configure board specific parts
 @@ -238,6 +257,8 @@ int misc_init_r(void)
  
  	set_boardname();
  
 +	set_soc_family();
 +
  	return 0;
  }

 Then we could simply write:
 setenv fdtfile "${soc_family}-${board_name}.dtb"
 to get correct DT.

 Of course it would be nice to rename DTs according board
 revision too, so we'll get:
 setenv fdtfile "${soc_family}-${board_name}-rev-${board_rev}.dtb"
 or something like that.

 Any other ideas how to support different CPUs are welcome and appreciated.

 Once we agree on solution, I'll sent patch for u-boot eventually.

 Thank you,
 	ladis

 arch/arm/boot/dts/omap3-igep.dtsi               |  3 --
 arch/arm/boot/dts/omap3-igep0020-common.dtsi    | 38 -----------------------
 arch/arm/boot/dts/omap3-igep0020-rev-f.dts      |  3 +-
 arch/arm/boot/dts/omap3-igep0020.dts            |  3 +-
 arch/arm/boot/dts/omap3-igep0030-common.dtsi    |  1 +
 arch/arm/boot/dts/omap3-igep0030-rev-g.dts      |  1 +
 arch/arm/boot/dts/omap3-igep0030.dts            |  1 +
 arch/arm/boot/dts/omap34xx-igep0020-common.dtsi | 40 +++++++++++++++++++++++++
 arch/arm/boot/dts/omap36xx-igep0020-common.dtsi | 40 +++++++++++++++++++++++++
 9 files changed, 87 insertions(+), 43 deletions(-)
 create mode 100644 arch/arm/boot/dts/omap34xx-igep0020-common.dtsi
 create mode 100644 arch/arm/boot/dts/omap36xx-igep0020-common.dtsi

Comments

Tony Lindgren Dec. 11, 2017, 4:58 p.m. UTC | #1
* Ladislav Michl <ladis@linux-mips.org> [171023 20:25]:
> Some IGEPv2 boards were shipped with OMAP3530. Refactor includes
> to make different processor support easier.
> 
> Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
> ---
>  Notes:
>  ======
>  As you might noted, this is just a RFC. Intended use is with modified
>  u-boot, which will provide $soc_family variable to distinguish between
>  OMAP3530 and DM3730 (OMAP3630) (and AM35XX) for completenes:
> 
>  From: Ladislav Michl <ladis@linux-mips.org>
>  Subject: [PATCH] igep00x0: Add soc_family env variable

FYI, I'm assuming you'll resend the kernel changes without RFC when
the dependencies have been agreed on.

Regards,

Tony
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Ladislav Michl Dec. 11, 2017, 5:31 p.m. UTC | #2
On Mon, Dec 11, 2017 at 08:58:07AM -0800, Tony Lindgren wrote:
> * Ladislav Michl <ladis@linux-mips.org> [171023 20:25]:
> > Some IGEPv2 boards were shipped with OMAP3530. Refactor includes
> > to make different processor support easier.
> > 
> > Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
> > ---
> >  Notes:
> >  ======
> >  As you might noted, this is just a RFC. Intended use is with modified
> >  u-boot, which will provide $soc_family variable to distinguish between
> >  OMAP3530 and DM3730 (OMAP3630) (and AM35XX) for completenes:
> > 
> >  From: Ladislav Michl <ladis@linux-mips.org>
> >  Subject: [PATCH] igep00x0: Add soc_family env variable
> 
> FYI, I'm assuming you'll resend the kernel changes without RFC when
> the dependencies have been agreed on.

For sure! I wanted at add board revision as well, but it turned out
that current U-Boot code cannot distinguish rev B. and rev F.
I asked Jose Miguel to look at this as I do not have informations
needed to verify that code:
http://git.denx.de/?p=u-boot.git;a=blob;f=board/isee/igep00x0/igep00x0.c;h=01bb99fbb8fcdb15c02157c99be4d8dbc089e0b9;hb=HEAD#l42
I hope that will be eventually sorted out on the U-Boot's list.

	ladis
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/arch/arm/boot/dts/omap3-igep.dtsi b/arch/arm/boot/dts/omap3-igep.dtsi
index 8dc829faec6a..21e093a45f05 100644
--- a/arch/arm/boot/dts/omap3-igep.dtsi
+++ b/arch/arm/boot/dts/omap3-igep.dtsi
@@ -8,9 +8,6 @@ 
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
  */
-/dts-v1/;
-
-#include "omap36xx.dtsi"
 
 / {
 	memory@80000000 {
diff --git a/arch/arm/boot/dts/omap3-igep0020-common.dtsi b/arch/arm/boot/dts/omap3-igep0020-common.dtsi
index 667f96245729..3fe62648c734 100644
--- a/arch/arm/boot/dts/omap3-igep0020-common.dtsi
+++ b/arch/arm/boot/dts/omap3-igep0020-common.dtsi
@@ -164,44 +164,6 @@ 
 	};
 };
 
-&omap3_pmx_core2 {
-	pinctrl-names = "default";
-	pinctrl-0 = <
-		&hsusbb1_pins
-	>;
-
-	hsusbb1_pins: pinmux_hsusbb1_pins {
-		pinctrl-single,pins = <
-			OMAP3630_CORE2_IOPAD(0x25da, PIN_OUTPUT | MUX_MODE3)		/* etk_ctl.hsusb1_clk */
-			OMAP3630_CORE2_IOPAD(0x25d8, PIN_OUTPUT | MUX_MODE3)		/* etk_clk.hsusb1_stp */
-			OMAP3630_CORE2_IOPAD(0x25ec, PIN_INPUT_PULLDOWN | MUX_MODE3)	/* etk_d8.hsusb1_dir */
-			OMAP3630_CORE2_IOPAD(0x25ee, PIN_INPUT_PULLDOWN | MUX_MODE3)	/* etk_d9.hsusb1_nxt */
-			OMAP3630_CORE2_IOPAD(0x25dc, PIN_INPUT_PULLDOWN | MUX_MODE3)	/* etk_d0.hsusb1_data0 */
-			OMAP3630_CORE2_IOPAD(0x25de, PIN_INPUT_PULLDOWN | MUX_MODE3)	/* etk_d1.hsusb1_data1 */
-			OMAP3630_CORE2_IOPAD(0x25e0, PIN_INPUT_PULLDOWN | MUX_MODE3)	/* etk_d2.hsusb1_data2 */
-			OMAP3630_CORE2_IOPAD(0x25e2, PIN_INPUT_PULLDOWN | MUX_MODE3)	/* etk_d3.hsusb1_data7 */
-			OMAP3630_CORE2_IOPAD(0x25e4, PIN_INPUT_PULLDOWN | MUX_MODE3)	/* etk_d4.hsusb1_data4 */
-			OMAP3630_CORE2_IOPAD(0x25e6, PIN_INPUT_PULLDOWN | MUX_MODE3)	/* etk_d5.hsusb1_data5 */
-			OMAP3630_CORE2_IOPAD(0x25e8, PIN_INPUT_PULLDOWN | MUX_MODE3)	/* etk_d6.hsusb1_data6 */
-			OMAP3630_CORE2_IOPAD(0x25ea, PIN_INPUT_PULLDOWN | MUX_MODE3)	/* etk_d7.hsusb1_data3 */
-		>;
-	};
-
-	leds_pins: pinmux_leds_pins {
-		pinctrl-single,pins = <
-			OMAP3630_CORE2_IOPAD(0x25f4, PIN_OUTPUT | MUX_MODE4) /* etk_d12.gpio_26 */
-			OMAP3630_CORE2_IOPAD(0x25f6, PIN_OUTPUT | MUX_MODE4) /* etk_d13.gpio_27 */
-			OMAP3630_CORE2_IOPAD(0x25f8, PIN_OUTPUT | MUX_MODE4) /* etk_d14.gpio_28 */
-		>;
-	};
-
-	mmc1_wp_pins: pinmux_mmc1_cd_pins {
-		pinctrl-single,pins = <
-			OMAP3630_CORE2_IOPAD(0x25fa, PIN_INPUT | MUX_MODE4)   /* etk_d15.gpio_29 */
-		>;
-	};
-};
-
 &i2c3 {
 	clock-frequency = <100000>;
 
diff --git a/arch/arm/boot/dts/omap3-igep0020-rev-f.dts b/arch/arm/boot/dts/omap3-igep0020-rev-f.dts
index 321c2b7a4e9f..d58f9a663061 100644
--- a/arch/arm/boot/dts/omap3-igep0020-rev-f.dts
+++ b/arch/arm/boot/dts/omap3-igep0020-rev-f.dts
@@ -8,8 +8,9 @@ 
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
  */
+/dts-v1/;
 
-#include "omap3-igep0020-common.dtsi"
+#include "omap36xx-igep0020-common.dtsi"
 
 / {
 	model = "IGEPv2 Rev. F (TI OMAP AM/DM37x)";
diff --git a/arch/arm/boot/dts/omap3-igep0020.dts b/arch/arm/boot/dts/omap3-igep0020.dts
index 33d6b4ead092..3f442f3fe7aa 100644
--- a/arch/arm/boot/dts/omap3-igep0020.dts
+++ b/arch/arm/boot/dts/omap3-igep0020.dts
@@ -8,8 +8,9 @@ 
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
  */
+/dts-v1/;
 
-#include "omap3-igep0020-common.dtsi"
+#include "omap36xx-igep0020-common.dtsi"
 
 / {
 	model = "IGEPv2 Rev. C (TI OMAP AM/DM37x)";
diff --git a/arch/arm/boot/dts/omap3-igep0030-common.dtsi b/arch/arm/boot/dts/omap3-igep0030-common.dtsi
index e94d9427450c..4702510b330c 100644
--- a/arch/arm/boot/dts/omap3-igep0030-common.dtsi
+++ b/arch/arm/boot/dts/omap3-igep0030-common.dtsi
@@ -9,6 +9,7 @@ 
  * published by the Free Software Foundation.
  */
 
+#include "omap36xx.dtsi"
 #include "omap3-igep.dtsi"
 
 / {
diff --git a/arch/arm/boot/dts/omap3-igep0030-rev-g.dts b/arch/arm/boot/dts/omap3-igep0030-rev-g.dts
index 76dc08868bfb..33b471871921 100644
--- a/arch/arm/boot/dts/omap3-igep0030-rev-g.dts
+++ b/arch/arm/boot/dts/omap3-igep0030-rev-g.dts
@@ -8,6 +8,7 @@ 
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
  */
+/dts-v1/;
 
 #include "omap3-igep0030-common.dtsi"
 
diff --git a/arch/arm/boot/dts/omap3-igep0030.dts b/arch/arm/boot/dts/omap3-igep0030.dts
index 55b0cc4f5ee5..c3dee1d92a6c 100644
--- a/arch/arm/boot/dts/omap3-igep0030.dts
+++ b/arch/arm/boot/dts/omap3-igep0030.dts
@@ -8,6 +8,7 @@ 
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
  */
+/dts-v1/;
 
 #include "omap3-igep0030-common.dtsi"
 
diff --git a/arch/arm/boot/dts/omap34xx-igep0020-common.dtsi b/arch/arm/boot/dts/omap34xx-igep0020-common.dtsi
new file mode 100644
index 000000000000..31b3e01ce9ee
--- /dev/null
+++ b/arch/arm/boot/dts/omap34xx-igep0020-common.dtsi
@@ -0,0 +1,40 @@ 
+#include "omap34xx.dtsi"
+#include "omap3-igep0020-common.dtsi"
+
+&omap3_pmx_core2 {
+	pinctrl-names = "default";
+	pinctrl-0 = <
+		&hsusbb1_pins
+	>;
+
+	hsusbb1_pins: pinmux_hsusbb1_pins {
+		pinctrl-single,pins = <
+			OMAP3430_CORE2_IOPAD(0x25da, PIN_OUTPUT | MUX_MODE3)		/* etk_ctl.hsusb1_clk */
+			OMAP3430_CORE2_IOPAD(0x25d8, PIN_OUTPUT | MUX_MODE3)		/* etk_clk.hsusb1_stp */
+			OMAP3430_CORE2_IOPAD(0x25ec, PIN_INPUT_PULLDOWN | MUX_MODE3)	/* etk_d8.hsusb1_dir */
+			OMAP3430_CORE2_IOPAD(0x25ee, PIN_INPUT_PULLDOWN | MUX_MODE3)	/* etk_d9.hsusb1_nxt */
+			OMAP3430_CORE2_IOPAD(0x25dc, PIN_INPUT_PULLDOWN | MUX_MODE3)	/* etk_d0.hsusb1_data0 */
+			OMAP3430_CORE2_IOPAD(0x25de, PIN_INPUT_PULLDOWN | MUX_MODE3)	/* etk_d1.hsusb1_data1 */
+			OMAP3430_CORE2_IOPAD(0x25e0, PIN_INPUT_PULLDOWN | MUX_MODE3)	/* etk_d2.hsusb1_data2 */
+			OMAP3430_CORE2_IOPAD(0x25e2, PIN_INPUT_PULLDOWN | MUX_MODE3)	/* etk_d3.hsusb1_data7 */
+			OMAP3430_CORE2_IOPAD(0x25e4, PIN_INPUT_PULLDOWN | MUX_MODE3)	/* etk_d4.hsusb1_data4 */
+			OMAP3430_CORE2_IOPAD(0x25e6, PIN_INPUT_PULLDOWN | MUX_MODE3)	/* etk_d5.hsusb1_data5 */
+			OMAP3430_CORE2_IOPAD(0x25e8, PIN_INPUT_PULLDOWN | MUX_MODE3)	/* etk_d6.hsusb1_data6 */
+			OMAP3430_CORE2_IOPAD(0x25ea, PIN_INPUT_PULLDOWN | MUX_MODE3)	/* etk_d7.hsusb1_data3 */
+		>;
+	};
+
+	leds_pins: pinmux_leds_pins {
+		pinctrl-single,pins = <
+			OMAP3430_CORE2_IOPAD(0x25f4, PIN_OUTPUT | MUX_MODE4) /* etk_d12.gpio_26 */
+			OMAP3430_CORE2_IOPAD(0x25f6, PIN_OUTPUT | MUX_MODE4) /* etk_d13.gpio_27 */
+			OMAP3430_CORE2_IOPAD(0x25f8, PIN_OUTPUT | MUX_MODE4) /* etk_d14.gpio_28 */
+		>;
+	};
+
+	mmc1_wp_pins: pinmux_mmc1_cd_pins {
+		pinctrl-single,pins = <
+			OMAP3430_CORE2_IOPAD(0x25fa, PIN_INPUT | MUX_MODE4)   /* etk_d15.gpio_29 */
+		>;
+	};
+};
diff --git a/arch/arm/boot/dts/omap36xx-igep0020-common.dtsi b/arch/arm/boot/dts/omap36xx-igep0020-common.dtsi
new file mode 100644
index 000000000000..70c198f42095
--- /dev/null
+++ b/arch/arm/boot/dts/omap36xx-igep0020-common.dtsi
@@ -0,0 +1,40 @@ 
+#include "omap36xx.dtsi"
+#include "omap3-igep0020-common.dtsi"
+
+&omap3_pmx_core2 {
+	pinctrl-names = "default";
+	pinctrl-0 = <
+		&hsusbb1_pins
+	>;
+
+	hsusbb1_pins: pinmux_hsusbb1_pins {
+		pinctrl-single,pins = <
+			OMAP3630_CORE2_IOPAD(0x25da, PIN_OUTPUT | MUX_MODE3)		/* etk_ctl.hsusb1_clk */
+			OMAP3630_CORE2_IOPAD(0x25d8, PIN_OUTPUT | MUX_MODE3)		/* etk_clk.hsusb1_stp */
+			OMAP3630_CORE2_IOPAD(0x25ec, PIN_INPUT_PULLDOWN | MUX_MODE3)	/* etk_d8.hsusb1_dir */
+			OMAP3630_CORE2_IOPAD(0x25ee, PIN_INPUT_PULLDOWN | MUX_MODE3)	/* etk_d9.hsusb1_nxt */
+			OMAP3630_CORE2_IOPAD(0x25dc, PIN_INPUT_PULLDOWN | MUX_MODE3)	/* etk_d0.hsusb1_data0 */
+			OMAP3630_CORE2_IOPAD(0x25de, PIN_INPUT_PULLDOWN | MUX_MODE3)	/* etk_d1.hsusb1_data1 */
+			OMAP3630_CORE2_IOPAD(0x25e0, PIN_INPUT_PULLDOWN | MUX_MODE3)	/* etk_d2.hsusb1_data2 */
+			OMAP3630_CORE2_IOPAD(0x25e2, PIN_INPUT_PULLDOWN | MUX_MODE3)	/* etk_d3.hsusb1_data7 */
+			OMAP3630_CORE2_IOPAD(0x25e4, PIN_INPUT_PULLDOWN | MUX_MODE3)	/* etk_d4.hsusb1_data4 */
+			OMAP3630_CORE2_IOPAD(0x25e6, PIN_INPUT_PULLDOWN | MUX_MODE3)	/* etk_d5.hsusb1_data5 */
+			OMAP3630_CORE2_IOPAD(0x25e8, PIN_INPUT_PULLDOWN | MUX_MODE3)	/* etk_d6.hsusb1_data6 */
+			OMAP3630_CORE2_IOPAD(0x25ea, PIN_INPUT_PULLDOWN | MUX_MODE3)	/* etk_d7.hsusb1_data3 */
+		>;
+	};
+
+	leds_pins: pinmux_leds_pins {
+		pinctrl-single,pins = <
+			OMAP3630_CORE2_IOPAD(0x25f4, PIN_OUTPUT | MUX_MODE4) /* etk_d12.gpio_26 */
+			OMAP3630_CORE2_IOPAD(0x25f6, PIN_OUTPUT | MUX_MODE4) /* etk_d13.gpio_27 */
+			OMAP3630_CORE2_IOPAD(0x25f8, PIN_OUTPUT | MUX_MODE4) /* etk_d14.gpio_28 */
+		>;
+	};
+
+	mmc1_wp_pins: pinmux_mmc1_cd_pins {
+		pinctrl-single,pins = <
+			OMAP3630_CORE2_IOPAD(0x25fa, PIN_INPUT | MUX_MODE4)   /* etk_d15.gpio_29 */
+		>;
+	};
+};