All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] Support for Variscite OM44 modules and boards
@ 2014-04-18 15:10 ` Joachim Eastwood
  0 siblings, 0 replies; 24+ messages in thread
From: Joachim Eastwood @ 2014-04-18 15:10 UTC (permalink / raw)
  To: tony, bcousson
  Cc: linux-arm-kernel, tomi.valkeinen, linux-omap, Joachim Eastwood

Hello,

This patch set adds support for Variscite OM44 series of system on modules and boards.

Patch 1: Add support for the SoM itself and the reference carrier board. Together these make the VAR-STK-OM44 dev kit.

Patch 2: Add support for VAR-DVK-OM44 which is just the STK with a LCD display.

Last two patches add support for the WLAN/BT version of the SoM. If DT bindings for wl12xx gets ready for 3.16 the last patch, adding quirks, can be dropped.

Note that patch 1 relies upon a patch from Tomi Valkeinen add hpd-gpio (hotplug detect) to the "hdmi-connector".
See: http://marc.info/?l=linux-omap&m=139771947508021&w=2

Patch 2 also relies upon a patch from Tomi that adds DT support to panel-dpi.
See: http://marc.info/?l=devicetree&m=139030201815380&w=2

If it makes it easier to merge this patch set without the two dependencies above I can move the display stuff the separate patches.
This patch set replace the patch posted eariler here: http://marc.info/?l=linux-omap&m=139732809411445&w=2

Joachim Eastwood (4):
  ARM: dts: Add support for OMAP4 Variscite OM44 family
  ARM: dts: Add support for OMAP4 VAR-DVK-OM44
  ARM: dts: Add VAR-SOM-OM44 WLAN nodes
  ARM: OMAP2+: Use pdata quirks for wl12xx on VAR-STK/DVK-OM44

 .../devicetree/bindings/arm/omap/omap.txt          |   6 +
 .../devicetree/bindings/vendor-prefixes.txt        |   1 +
 arch/arm/boot/dts/Makefile                         |   3 +-
 arch/arm/boot/dts/omap4-var-dvk-om44.dts           |  71 +++++
 arch/arm/boot/dts/omap4-var-om44customboard.dtsi   | 235 ++++++++++++++
 arch/arm/boot/dts/omap4-var-som-om44-wlan.dtsi     |  68 ++++
 arch/arm/boot/dts/omap4-var-som-om44.dtsi          | 343 +++++++++++++++++++++
 arch/arm/boot/dts/omap4-var-som.dts                |  96 ------
 arch/arm/boot/dts/omap4-var-stk-om44.dts           |  17 +
 arch/arm/mach-omap2/pdata-quirks.c                 |   7 +
 10 files changed, 750 insertions(+), 97 deletions(-)
 create mode 100644 arch/arm/boot/dts/omap4-var-dvk-om44.dts
 create mode 100644 arch/arm/boot/dts/omap4-var-om44customboard.dtsi
 create mode 100644 arch/arm/boot/dts/omap4-var-som-om44-wlan.dtsi
 create mode 100644 arch/arm/boot/dts/omap4-var-som-om44.dtsi
 delete mode 100644 arch/arm/boot/dts/omap4-var-som.dts
 create mode 100644 arch/arm/boot/dts/omap4-var-stk-om44.dts

-- 
1.8.0


^ permalink raw reply	[flat|nested] 24+ messages in thread

* [PATCH 0/4] Support for Variscite OM44 modules and boards
@ 2014-04-18 15:10 ` Joachim Eastwood
  0 siblings, 0 replies; 24+ messages in thread
From: Joachim Eastwood @ 2014-04-18 15:10 UTC (permalink / raw)
  To: linux-arm-kernel

Hello,

This patch set adds support for Variscite OM44 series of system on modules and boards.

Patch 1: Add support for the SoM itself and the reference carrier board. Together these make the VAR-STK-OM44 dev kit.

Patch 2: Add support for VAR-DVK-OM44 which is just the STK with a LCD display.

Last two patches add support for the WLAN/BT version of the SoM. If DT bindings for wl12xx gets ready for 3.16 the last patch, adding quirks, can be dropped.

Note that patch 1 relies upon a patch from Tomi Valkeinen add hpd-gpio (hotplug detect) to the "hdmi-connector".
See: http://marc.info/?l=linux-omap&m=139771947508021&w=2

Patch 2 also relies upon a patch from Tomi that adds DT support to panel-dpi.
See: http://marc.info/?l=devicetree&m=139030201815380&w=2

If it makes it easier to merge this patch set without the two dependencies above I can move the display stuff the separate patches.
This patch set replace the patch posted eariler here: http://marc.info/?l=linux-omap&m=139732809411445&w=2

Joachim Eastwood (4):
  ARM: dts: Add support for OMAP4 Variscite OM44 family
  ARM: dts: Add support for OMAP4 VAR-DVK-OM44
  ARM: dts: Add VAR-SOM-OM44 WLAN nodes
  ARM: OMAP2+: Use pdata quirks for wl12xx on VAR-STK/DVK-OM44

 .../devicetree/bindings/arm/omap/omap.txt          |   6 +
 .../devicetree/bindings/vendor-prefixes.txt        |   1 +
 arch/arm/boot/dts/Makefile                         |   3 +-
 arch/arm/boot/dts/omap4-var-dvk-om44.dts           |  71 +++++
 arch/arm/boot/dts/omap4-var-om44customboard.dtsi   | 235 ++++++++++++++
 arch/arm/boot/dts/omap4-var-som-om44-wlan.dtsi     |  68 ++++
 arch/arm/boot/dts/omap4-var-som-om44.dtsi          | 343 +++++++++++++++++++++
 arch/arm/boot/dts/omap4-var-som.dts                |  96 ------
 arch/arm/boot/dts/omap4-var-stk-om44.dts           |  17 +
 arch/arm/mach-omap2/pdata-quirks.c                 |   7 +
 10 files changed, 750 insertions(+), 97 deletions(-)
 create mode 100644 arch/arm/boot/dts/omap4-var-dvk-om44.dts
 create mode 100644 arch/arm/boot/dts/omap4-var-om44customboard.dtsi
 create mode 100644 arch/arm/boot/dts/omap4-var-som-om44-wlan.dtsi
 create mode 100644 arch/arm/boot/dts/omap4-var-som-om44.dtsi
 delete mode 100644 arch/arm/boot/dts/omap4-var-som.dts
 create mode 100644 arch/arm/boot/dts/omap4-var-stk-om44.dts

-- 
1.8.0

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [PATCH 1/4] ARM: dts: Add support for OMAP4 Variscite OM44 family
  2014-04-18 15:10 ` Joachim Eastwood
@ 2014-04-18 15:10   ` Joachim Eastwood
  -1 siblings, 0 replies; 24+ messages in thread
From: Joachim Eastwood @ 2014-04-18 15:10 UTC (permalink / raw)
  To: tony, bcousson
  Cc: linux-arm-kernel, tomi.valkeinen, linux-omap, Joachim Eastwood

Add support for VAR-SOM-OM44[1] SODIMM system on module from Variscite. SoM
features a OMAP4460, 1GB RAM, Gigabit Ethernet (LAN7500) and optional WLAN/BT.

Also add support for VAR-STK-OM44 development board from Variscite. This kit
features a VAR-SOM-OM44 and the carrier board VAR-OM44CustomBoard[2]. The
VAR-STK-OM44 is the same as VAR-DVK-OM44 but without the LCD display.

omap4-var-stk-om44.dts replace the old and very limited omap4-var-som.dts.

[1] http://www.variscite.com/products/system-on-module-som/cortex-a9/var-som-om44-cpu-ti-omap-4-omap4460
[2] http://www.variscite.com/products/single-board-computers/var-om44customboard

Signed-off-by: Joachim Eastwood <manabian@gmail.com>
---
 .../devicetree/bindings/arm/omap/omap.txt          |   3 +
 .../devicetree/bindings/vendor-prefixes.txt        |   1 +
 arch/arm/boot/dts/Makefile                         |   2 +-
 arch/arm/boot/dts/omap4-var-om44customboard.dtsi   | 235 ++++++++++++++
 arch/arm/boot/dts/omap4-var-som-om44.dtsi          | 343 +++++++++++++++++++++
 arch/arm/boot/dts/omap4-var-som.dts                |  96 ------
 arch/arm/boot/dts/omap4-var-stk-om44.dts           |  16 +
 7 files changed, 599 insertions(+), 97 deletions(-)
 create mode 100644 arch/arm/boot/dts/omap4-var-om44customboard.dtsi
 create mode 100644 arch/arm/boot/dts/omap4-var-som-om44.dtsi
 delete mode 100644 arch/arm/boot/dts/omap4-var-som.dts
 create mode 100644 arch/arm/boot/dts/omap4-var-stk-om44.dts

diff --git a/Documentation/devicetree/bindings/arm/omap/omap.txt b/Documentation/devicetree/bindings/arm/omap/omap.txt
index 36ede19a1630..7db69ac46188 100644
--- a/Documentation/devicetree/bindings/arm/omap/omap.txt
+++ b/Documentation/devicetree/bindings/arm/omap/omap.txt
@@ -102,6 +102,9 @@ Boards:
 - OMAP4 DuoVero with Parlor : Commercial expansion board with daughter board
   compatible = "gumstix,omap4-duovero-parlor", "gumstix,omap4-duovero", "ti,omap4430", "ti,omap4";
 
+- OMAP4 VAR-STK-OM44 : Commercial dev kit with VAR-OM44CustomBoard and VAR-SOM-OM44 w/WLAN
+  compatible = "variscite,var-stk-om44", "variscite,var-som-om44", "ti,omap4430", "ti,omap4";
+
 - OMAP3 EVM : Software Development Board for OMAP35x, AM/DM37x
   compatible = "ti,omap3-evm", "ti,omap3"
 
diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt
index 0f01c9bf19c8..8a149a4b07de 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.txt
+++ b/Documentation/devicetree/bindings/vendor-prefixes.txt
@@ -112,6 +112,7 @@ tlm	Trusted Logic Mobility
 toshiba	Toshiba Corporation
 toumaz	Toumaz
 v3	V3 Semiconductor
+variscite	Variscite Ltd.
 via	VIA Technologies, Inc.
 voipac	Voipac Technologies s.r.o.
 winbond Winbond Electronics corp.
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index 35c146f31e46..f443ade8ae3c 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -273,7 +273,7 @@ dtb-$(CONFIG_ARCH_OMAP2PLUS) += omap2420-h4.dtb \
 	omap4-panda.dtb \
 	omap4-panda-a4.dtb \
 	omap4-panda-es.dtb \
-	omap4-var-som.dtb \
+	omap4-var-stk-om44.dtb \
 	omap4-sdp.dtb \
 	omap4-sdp-es23plus.dtb \
 	omap5-uevm.dtb \
diff --git a/arch/arm/boot/dts/omap4-var-om44customboard.dtsi b/arch/arm/boot/dts/omap4-var-om44customboard.dtsi
new file mode 100644
index 000000000000..7c8e383b2cd0
--- /dev/null
+++ b/arch/arm/boot/dts/omap4-var-om44customboard.dtsi
@@ -0,0 +1,235 @@
+/*
+ * Copyright (C) 2014 Joachim Eastwood <manabian@gmail.com>
+ *
+ * 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.
+ */
+
+#include <dt-bindings/input/input.h>
+
+/ {
+	aliases {
+		display0 = &hdmi0;
+	};
+
+	leds {
+		compatible = "gpio-leds";
+		pinctrl-names = "default";
+		pinctrl-0 = <&gpio_led_pins>;
+
+		led0 {
+			label = "var:green:led0";
+			gpios = <&gpio6 13 GPIO_ACTIVE_HIGH>; /* gpio 173 */
+			linux,default-trigger = "heartbeat";
+		};
+
+		led1 {
+			label = "var:green:led1";
+			gpios = <&gpio6 12 GPIO_ACTIVE_HIGH>; /* gpio 172 */
+		};
+	};
+
+	gpio-keys {
+		compatible = "gpio-keys";
+		pinctrl-names = "default";
+		pinctrl-0 = <&gpio_key_pins>;
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		user-key@184 {
+			label = "user";
+			gpios = <&gpio6 24 GPIO_ACTIVE_HIGH>; /* gpio 184 */
+			linux,code = <BTN_EXTRA>;
+			gpio-key,wakeup;
+		};
+	};
+
+	hdmi0: connector@0 {
+		compatible = "hdmi-connector";
+		pinctrl-names = "default";
+		pinctrl-0 = <&hdmi_hpd_pins>;
+		label = "hdmi";
+		type = "a";
+
+		hpd-gpios = <&gpio2 31 GPIO_ACTIVE_HIGH>; /* gpio_63 */
+
+		port {
+			hdmi_connector_in: endpoint {
+				remote-endpoint = <&hdmi_out>;
+			};
+		};
+	};
+};
+
+&omap4_pmx_core {
+	uart1_pins: pinmux_uart1_pins {
+		pinctrl-single,pins = <
+			0xfc (PIN_INPUT_PULLUP | MUX_MODE1)	/* mcspi1_cs2.uart1_cts */
+			0xfe (PIN_OUTPUT | MUX_MODE1)		/* mcspi1_cs3.uart1_rts */
+			0xe6 (PIN_INPUT_PULLUP | MUX_MODE1)	/* i2c2_scl.uart1_rx */
+			0xe8 (PIN_OUTPUT | MUX_MODE1)		/* i2c2_sda.uart1_tx */
+		>;
+	};
+
+	mcspi1_pins: pinmux_mcspi1_pins {
+		pinctrl-single,pins = <
+			0xf2 (PIN_INPUT | MUX_MODE0)		/*  mcspi1_clk.mcspi1_clk */
+			0xf4 (PIN_INPUT | MUX_MODE0)		/*  mcspi1_somi.mcspi1_somi */
+			0xf6 (PIN_INPUT | MUX_MODE0)		/*  mcspi1_simo.mcspi1_simo */
+			0xf8 (PIN_INPUT | MUX_MODE0)		/*  mcspi1_cs0.mcspi1_cs0 */
+		>;
+	};
+
+	mcasp_pins: pinmux_mcsasp_pins {
+		pinctrl-single,pins = <
+			0xb8 (PIN_OUTPUT | MUX_MODE2)		/*  mcbsp2_dr.abe_mcasp_axr */
+		>;
+	};
+
+	dss_dpi_pins: pinmux_dss_dpi_pins {
+		pinctrl-single,pins = <
+			0x122 (PIN_OUTPUT | MUX_MODE5)		/* dispc2_data23 */
+			0x124 (PIN_OUTPUT | MUX_MODE5) 		/* dispc2_data22 */
+			0x126 (PIN_OUTPUT | MUX_MODE5)		/* dispc2_data21 */
+			0x128 (PIN_OUTPUT | MUX_MODE5)		/* dispc2_data20 */
+			0x12a (PIN_OUTPUT | MUX_MODE5)		/* dispc2_data19 */
+			0x12c (PIN_OUTPUT | MUX_MODE5)		/* dispc2_data18 */
+			0x12e (PIN_OUTPUT | MUX_MODE5)		/* dispc2_data15 */
+			0x130 (PIN_OUTPUT | MUX_MODE5)		/* dispc2_data14 */
+			0x132 (PIN_OUTPUT | MUX_MODE5)		/* dispc2_data13 */
+			0x134 (PIN_OUTPUT | MUX_MODE5)		/* dispc2_data12 */
+			0x136 (PIN_OUTPUT | MUX_MODE5)		/* dispc2_data11 */
+			0x174 (PIN_OUTPUT | MUX_MODE5)		/* dispc2_data10 */
+			0x176 (PIN_OUTPUT | MUX_MODE5)		/* dispc2_data9 */
+			0x178 (PIN_OUTPUT | MUX_MODE5)		/* dispc2_data16 */
+			0x17a (PIN_OUTPUT | MUX_MODE5)		/* dispc2_data17 */
+			0x17c (PIN_OUTPUT | MUX_MODE5)		/* dispc2_hsync */
+			0x17e (PIN_OUTPUT | MUX_MODE5)		/* dispc2_pclk */
+			0x180 (PIN_OUTPUT | MUX_MODE5)		/* dispc2_vsync */
+			0x182 (PIN_OUTPUT | MUX_MODE5)		/* dispc2_de */
+			0x184 (PIN_OUTPUT | MUX_MODE5)		/* dispc2_data8 */
+			0x186 (PIN_OUTPUT | MUX_MODE5)		/* dispc2_data7 */
+			0x188 (PIN_OUTPUT | MUX_MODE5)		/* dispc2_data6 */
+			0x18a (PIN_OUTPUT | MUX_MODE5)		/* dispc2_data5 */
+			0x18c (PIN_OUTPUT | MUX_MODE5)		/* dispc2_data4 */
+			0x18e (PIN_OUTPUT | MUX_MODE5)		/* dispc2_data3 */
+			0x190 (PIN_OUTPUT | MUX_MODE5)		/* dispc2_data2 */
+			0x192 (PIN_OUTPUT | MUX_MODE5)		/* dispc2_data1 */
+			0x194 (PIN_OUTPUT | MUX_MODE5)		/* dispc2_data0 */
+		>;
+	};
+
+	dss_hdmi_pins: pinmux_dss_hdmi_pins {
+		pinctrl-single,pins = <
+			0x5a (PIN_INPUT_PULLUP | MUX_MODE0)	/* hdmi_cec.hdmi_cec */
+			0x5c (PIN_INPUT_PULLUP | MUX_MODE0)	/* hdmi_scl.hdmi_scl */
+			0x5e (PIN_INPUT_PULLUP | MUX_MODE0)	/* hdmi_sda.hdmi_sda */
+		>;
+	};
+
+	i2c4_pins: pinmux_i2c4_pins {
+		pinctrl-single,pins = <
+			0xee (PIN_INPUT_PULLUP | MUX_MODE0)	/* i2c4_scl */
+			0xf0 (PIN_INPUT_PULLUP | MUX_MODE0)	/* i2c4_sda */
+		>;
+	};
+
+	mmc5_pins: pinmux_mmc5_pins {
+		pinctrl-single,pins = <
+			0x0b6 (PIN_INPUT | MUX_MODE3)		/* abe_mcbsp2_clkx.gpio_110 */
+			0x108 (PIN_INPUT_PULLUP | MUX_MODE0)	/* sdmmc5_clk.sdmmc5_clk */
+			0x10a (PIN_INPUT_PULLUP | MUX_MODE0)	/* sdmmc5_cmd.sdmmc5_cmd */
+			0x10c (PIN_INPUT_PULLUP | MUX_MODE0)	/* sdmmc5_dat0.sdmmc5_dat0 */
+			0x10e (PIN_INPUT_PULLUP | MUX_MODE0)	/* sdmmc5_dat1.sdmmc5_dat1 */
+			0x110 (PIN_INPUT_PULLUP | MUX_MODE0)	/* sdmmc5_dat2.sdmmc5_dat2 */
+			0x112 (PIN_INPUT_PULLUP | MUX_MODE0)	/* sdmmc5_dat3.sdmmc5_dat3 */
+		>;
+	};
+
+	gpio_led_pins: pinmux_gpio_led_pins {
+		pinctrl-single,pins = <
+			0x13e (PIN_OUTPUT | MUX_MODE3)		/* kpd_col4.gpio_172 */
+			0x140 (PIN_OUTPUT | MUX_MODE3)		/* kpd_col5.gpio_173 */
+		>;
+	};
+
+	gpio_key_pins: pinmux_gpio_key_pins {
+		pinctrl-single,pins = <
+			0x162 (PIN_INPUT | MUX_MODE3)		/* sys_boot0.gpio_184 */
+		>;
+	};
+
+	ks8851_irq_pins: pinmux_ks8851_irq_pins {
+		pinctrl-single,pins = <
+			0x13c (PIN_INPUT_PULLUP | MUX_MODE3)	/* kpd_col3.gpio_171 */
+		>;
+	};
+
+	hdmi_hpd_pins: pinmux_hdmi_hpd_pins {
+		pinctrl-single,pins = <
+			0x58 (PIN_INPUT_PULLDOWN | MUX_MODE3)	/* hdmi_hpd.gpio_63 */
+		>;
+	};
+
+	backlight_pins: pinmux_backlight_pins {
+		pinctrl-single,pins = <
+			0xd6 (PIN_OUTPUT | MUX_MODE3)		/* abe_dmic_din3.gpio_122 */
+		>;
+	};
+};
+
+&i2c4 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2c4_pins>;
+	clock-frequency = <400000>;
+	status = "okay";
+};
+
+&uart1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&uart1_pins>;
+	status = "okay";
+};
+
+&mcspi1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&mcspi1_pins>;
+	status = "okay";
+
+	eth@0 {
+		compatible = "ks8851";
+		pinctrl-names = "default";
+		pinctrl-0 = <&ks8851_irq_pins>;
+		spi-max-frequency = <24000000>;
+		reg = <0>;
+		interrupt-parent = <&gpio6>;
+		interrupts = <11 IRQ_TYPE_LEVEL_LOW>; /* gpio 171 */
+	};
+};
+
+&mmc5 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&mmc5_pins>;
+	vmmc-supply = <&vbat>;
+	bus-width = <4>;
+	cd-gpios = <&gpio4 14 GPIO_ACTIVE_HIGH>; /* gpio 110 */
+	status = "okay";
+};
+
+&dss {
+	status = "okay";
+};
+
+&hdmi {
+	status = "okay";
+	pinctrl-names = "default";
+	pinctrl-0 = <&dss_hdmi_pins>;
+	vdda-supply = <&vdac>;
+
+	port {
+		hdmi_out: endpoint {
+			remote-endpoint = <&hdmi_connector_in>;
+		};
+	};
+};
diff --git a/arch/arm/boot/dts/omap4-var-som-om44.dtsi b/arch/arm/boot/dts/omap4-var-som-om44.dtsi
new file mode 100644
index 000000000000..3ae70479ae26
--- /dev/null
+++ b/arch/arm/boot/dts/omap4-var-som-om44.dtsi
@@ -0,0 +1,343 @@
+/*
+ * Copyright (C) 2014 Joachim Eastwood <manabian@gmail.com>
+ * Copyright (C) 2012 Variscite Ltd. - http://www.variscite.com
+ *
+ * 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.
+ */
+#include "omap4460.dtsi"
+
+/ {
+	model = "Variscite VAR-SOM-OM44";
+	compatible = "variscite,var-som-om44", "ti,omap4430", "ti,omap4";
+
+	memory {
+		device_type = "memory";
+		reg = <0x80000000 0x40000000>; /* 1 GB */
+	};
+
+	sound: sound {
+		compatible = "ti,abe-twl6040";
+		ti,model = "VAR-SOM-OM44";
+
+		ti,mclk-freq = <38400000>;
+		ti,mcpdm = <&mcpdm>;
+		ti,twl6040 = <&twl6040>;
+
+		/* Audio routing */
+		ti,audio-routing =
+			"Headset Stereophone", "HSOL",
+			"Headset Stereophone", "HSOR",
+			"AFML", "Line In",
+			"AFMR", "Line In";
+	};
+
+	/* HS USB Host PHY on PORT 1 */
+	hsusb1_phy: hsusb1_phy {
+		compatible = "usb-nop-xceiv";
+		pinctrl-names = "default";
+		pinctrl-0 = <
+			&hsusbb1_phy_clk_pins
+			&hsusbb1_phy_rst_pins
+		>;
+
+		reset-gpios = <&gpio6 17 GPIO_ACTIVE_LOW>; /* gpio 177 */
+		vcc-supply = <&vbat>;
+
+		clocks = <&auxclk3_ck>;
+		clock-names = "main_clk";
+		clock-frequency = <19200000>;
+	};
+
+	vbat: fixedregulator-vbat {
+		compatible = "regulator-fixed";
+		regulator-name = "VBAT";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+		regulator-always-on;
+		regulator-boot-on;
+	};
+};
+
+&omap4_pmx_core {
+	pinctrl-names = "default";
+	pinctrl-0 = <
+			&hsusbb1_pins
+	>;
+
+	twl6040_pins: pinmux_twl6040_pins {
+		pinctrl-single,pins = <
+			0x15c (PIN_OUTPUT | MUX_MODE3)		/* fref_clk2_out.gpio_182 */
+			0x160 (PIN_INPUT | MUX_MODE0)		/* sys_nirq2.sys_nirq2 */
+		>;
+	};
+
+	mcpdm_pins: pinmux_mcpdm_pins {
+		pinctrl-single,pins = <
+			0xc6 (PIN_INPUT_PULLDOWN | MUX_MODE0)	/* abe_pdm_ul_data.abe_pdm_ul_data */
+			0xc8 (PIN_INPUT_PULLDOWN | MUX_MODE0)	/* abe_pdm_dl_data.abe_pdm_dl_data */
+			0xca (PIN_INPUT_PULLUP | MUX_MODE0)	/* abe_pdm_frame.abe_pdm_frame */
+			0xcc (PIN_INPUT_PULLDOWN | MUX_MODE0)	/* abe_pdm_lb_clk.abe_pdm_lb_clk */
+			0xce (PIN_INPUT_PULLDOWN | MUX_MODE0)	/* abe_clks.abe_clks */
+		>;
+	};
+
+	tsc2004_pins: pinmux_tsc2004_pins {
+		pinctrl-single,pins = <
+			0x50 (PIN_INPUT | MUX_MODE3)		/* gpmc_ncs4.gpio_101 (irq) */
+			0x52 (PIN_OUTPUT | MUX_MODE3)		/* gpmc_ncs5.gpio_102 (rst) */
+		>;
+	};
+
+	uart3_pins: pinmux_uart3_pins {
+		pinctrl-single,pins = <
+			0x100 (PIN_INPUT_PULLUP | MUX_MODE0)	/* uart3_cts_rctx.uart3_cts_rctx */
+			0x102 (PIN_OUTPUT | MUX_MODE0)		/* uart3_rts_sd.uart3_rts_sd */
+			0x104 (PIN_INPUT | MUX_MODE0)		/* uart3_rx_irrx.uart3_rx_irrx */
+			0x106 (PIN_OUTPUT | MUX_MODE0)		/* uart3_tx_irtx.uart3_tx_irtx */
+		>;
+	};
+
+	hsusbb1_pins: pinmux_hsusbb1_pins {
+		pinctrl-single,pins = <
+			0x82 (PIN_INPUT_PULLDOWN | MUX_MODE4)	/* usbb1_ulpitll_clk.usbb1_ulpiphy_clk */
+			0x84 (PIN_OUTPUT | MUX_MODE4)		/* usbb1_ulpitll_stp.usbb1_ulpiphy_stp */
+			0x86 (PIN_INPUT_PULLDOWN | MUX_MODE4)	/* usbb1_ulpitll_dir.usbb1_ulpiphy_dir */
+			0x88 (PIN_INPUT_PULLDOWN | MUX_MODE4)	/* usbb1_ulpitll_nxt.usbb1_ulpiphy_nxt */
+			0x8a (PIN_INPUT_PULLDOWN | MUX_MODE4)	/* usbb1_ulpitll_dat0.usbb1_ulpiphy_dat0 */
+			0x8c (PIN_INPUT_PULLDOWN | MUX_MODE4)	/* usbb1_ulpitll_dat1.usbb1_ulpiphy_dat1 */
+			0x8e (PIN_INPUT_PULLDOWN | MUX_MODE4)	/* usbb1_ulpitll_dat2.usbb1_ulpiphy_dat2 */
+			0x90 (PIN_INPUT_PULLDOWN | MUX_MODE4)	/* usbb1_ulpitll_dat3.usbb1_ulpiphy_dat3 */
+			0x92 (PIN_INPUT_PULLDOWN | MUX_MODE4)	/* usbb1_ulpitll_dat4.usbb1_ulpiphy_dat4 */
+			0x94 (PIN_INPUT_PULLDOWN | MUX_MODE4)	/* usbb1_ulpitll_dat5.usbb1_ulpiphy_dat5 */
+			0x96 (PIN_INPUT_PULLDOWN | MUX_MODE4)	/* usbb1_ulpitll_dat6.usbb1_ulpiphy_dat6 */
+			0x98 (PIN_INPUT_PULLDOWN | MUX_MODE4)	/* usbb1_ulpitll_dat7.usbb1_ulpiphy_dat7 */
+		>;
+	};
+
+	hsusbb1_phy_rst_pins: pinmux_hsusbb1_phy_rst_pins {
+		pinctrl-single,pins = <
+			0x14c (PIN_OUTPUT | MUX_MODE3)		/* kpd_row2.gpio_177 */
+		>;
+	};
+
+	i2c1_pins: pinmux_i2c1_pins {
+		pinctrl-single,pins = <
+			0xe2 (PIN_INPUT_PULLUP | MUX_MODE0)	/* i2c1_scl */
+			0xe4 (PIN_INPUT_PULLUP | MUX_MODE0)	/* i2c1_sda */
+		>;
+	};
+
+	i2c3_pins: pinmux_i2c3_pins {
+		pinctrl-single,pins = <
+			0xea (PIN_INPUT_PULLUP | MUX_MODE0)	/* i2c3_scl */
+			0xec (PIN_INPUT_PULLUP | MUX_MODE0)	/* i2c3_sda */
+		>;
+	};
+
+	mmc1_pins: pinmux_mmc1_pins {
+		pinctrl-single,pins = <
+			0xa2 (PIN_INPUT_PULLUP | MUX_MODE0)	/* sdmmc1_clk.sdmmc1_clk */
+			0xa4 (PIN_INPUT_PULLUP | MUX_MODE0)	/* sdmmc1_cmd.sdmmc1_cmd */
+			0xa6 (PIN_INPUT_PULLUP | MUX_MODE0)	/* sdmmc1_dat0.sdmmc1_dat0 */
+			0xa8 (PIN_INPUT_PULLUP | MUX_MODE0)	/* sdmmc1_dat1.sdmmc1_dat1 */
+			0xaa (PIN_INPUT_PULLUP | MUX_MODE0)	/* sdmmc1_dat2.sdmmc1_dat2 */
+			0xac (PIN_INPUT_PULLUP | MUX_MODE0)	/* sdmmc1_dat3.sdmmc1_dat3 */
+		>;
+	};
+};
+
+&omap4_pmx_wkup {
+	pinctrl-names = "default";
+	pinctrl-0 = <
+		&hsusbb1_hub_rst_pins
+		&lan7500_rst_pins
+	>;
+
+	hsusbb1_phy_clk_pins: pinmux_hsusbb1_phy_clk_pins {
+		pinctrl-single,pins = <
+			0x18 (PIN_OUTPUT | MUX_MODE0)	/* fref_clk3_out */
+		>;
+	};
+
+	hsusbb1_hub_rst_pins: pinmux_hsusbb1_hub_rst_pins {
+		pinctrl-single,pins = <
+			0x2 (PIN_OUTPUT | MUX_MODE3)	/* gpio_wk1 */
+		>;
+	};
+
+	lan7500_rst_pins: pinmux_lan7500_rst_pins {
+		pinctrl-single,pins = <
+			0x0 (PIN_OUTPUT | MUX_MODE3)	/* gpio_wk0 */
+		>;
+	};
+};
+
+&i2c1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2c1_pins>;
+	status = "okay";
+
+	clock-frequency = <400000>;
+
+	twl: twl@48 {
+		reg = <0x48>;
+		/* SPI = 0, IRQ# = 7, 4 = active high level-sensitive */
+		interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>; /* IRQ_SYS_1N cascaded to gic */
+		interrupt-parent = <&gic>;
+	};
+
+	twl6040: twl@4b {
+		compatible = "ti,twl6040";
+		reg = <0x4b>;
+
+		pinctrl-names = "default";
+		pinctrl-0 = <&twl6040_pins>;
+
+		/* SPI = 0, IRQ# = 119, 4 = active high level-sensitive */
+		interrupts = <GIC_SPI 119 IRQ_TYPE_LEVEL_HIGH>; /* IRQ_SYS_2N cascaded to gic */
+		interrupt-parent = <&gic>;
+		ti,audpwron-gpio = <&gpio6 22 0>; /* gpio 182 */
+
+		vio-supply = <&v1v8>;
+		v2v1-supply = <&v2v1>;
+		enable-active-high;
+	};
+};
+
+#include "twl6030.dtsi"
+#include "twl6030_omap4.dtsi"
+
+&vusim {
+	regulator-min-microvolt = <3000000>;
+	regulator-max-microvolt = <3000000>;
+	regulator-always-on;
+};
+
+&i2c2 {
+	status = "disabled";
+};
+
+&i2c3 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2c3_pins>;
+	status = "okay";
+
+	clock-frequency = <400000>;
+
+	tsc2004@48 {
+		compatible = "ti,tsc2004";
+		pinctrl-names = "default";
+		pinctrl-0 = <&tsc2004_pins>;
+		reg = <0x48>;
+		interrupt-parent = <&gpio4>;
+		interrupts = <5 IRQ_TYPE_LEVEL_LOW>; /* gpio 101 */
+		status = "disabled";
+	};
+
+	tmp105@49 {
+		compatible = "ti,tmp105";
+		reg = <0x49>;
+	};
+
+	eeprom@50 {
+		compatible = "microchip,24c32";
+		reg = <0x50>;
+	};
+};
+
+&i2c4 {
+	status = "disabled";
+};
+
+&mcpdm {
+	pinctrl-names = "default";
+	pinctrl-0 = <&mcpdm_pins>;
+	status = "okay";
+};
+
+&gpmc {
+	status = "disabled";
+};
+
+&mcspi1 {
+	status = "disabled";
+};
+
+&mcspi2 {
+	status = "disabled";
+};
+
+&mcspi3 {
+	status = "disabled";
+};
+
+&mcspi4 {
+	status = "disabled";
+};
+
+&mmc1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&mmc1_pins>;
+	vmmc-supply = <&vmmc>;
+	bus-width = <4>;
+	ti,non-removable;
+	status = "okay";
+};
+
+&mmc2 {
+	status = "disabled";
+};
+
+&mmc3 {
+	status = "disabled";
+};
+
+&mmc4 {
+	status = "disabled";
+};
+
+&mmc5 {
+	status = "disabled";
+};
+
+&uart1 {
+	status = "disabled";
+};
+
+&uart2 {
+	status = "disabled";
+};
+
+&uart3 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&uart3_pins>;
+	status = "okay";
+};
+
+&uart4 {
+	status = "disabled";
+};
+
+&keypad {
+	status = "disabled";
+};
+
+&twl_usb_comparator {
+	usb-supply = <&vusb>;
+};
+
+&usb_otg_hs {
+	interface-type = <1>;
+	mode = <3>;
+	power = <50>;
+};
+
+&usbhshost {
+	port1-mode = "ehci-phy";
+};
+
+&usbhsehci {
+	phys = <&hsusb1_phy>;
+};
diff --git a/arch/arm/boot/dts/omap4-var-som.dts b/arch/arm/boot/dts/omap4-var-som.dts
deleted file mode 100644
index b41269e871dd..000000000000
--- a/arch/arm/boot/dts/omap4-var-som.dts
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * Copyright (C) 2012 Variscite Ltd. - http://www.variscite.com
- *
- * 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 "omap443x.dtsi"
-
-/ {
-	model = "Variscite OMAP4 SOM";
-	compatible = "var,omap4-var_som", "ti,omap4430", "ti,omap4";
-
-	memory {
-		device_type = "memory";
-		reg = <0x80000000 0x40000000>; /* 1 GB */
-	};
-
-	vdd_eth: fixedregulator@0 {
-		compatible = "regulator-fixed";
-		regulator-name = "VDD_ETH";
-		regulator-min-microvolt = <3300000>;
-		regulator-max-microvolt = <3300000>;
-		enable-active-high;
-		regulator-boot-on;
-	};
-};
-
-&i2c1 {
-	clock-frequency = <400000>;
-
-	twl: twl@48 {
-		reg = <0x48>;
-		/* SPI = 0, IRQ# = 7, 4 = active high level-sensitive */
-		interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>; /* IRQ_SYS_1N cascaded to gic */
-		interrupt-parent = <&gic>;
-	};
-};
-
-#include "twl6030.dtsi"
-
-&i2c2 {
-	clock-frequency = <400000>;
-};
-
-&i2c3 {
-	clock-frequency = <400000>;
-
-	/*
-	 * Temperature Sensor
-	 * http://www.ti.com/lit/ds/symlink/tmp105.pdf
-	 */
-	tmp105@49 {
-		compatible = "ti,tmp105";
-		reg = <0x49>;
-	};
-};
-
-&i2c4 {
-	clock-frequency = <400000>;
-};
-
-&mcspi1 {
-	eth@0 {
-		compatible = "ks8851";
-		spi-max-frequency = <24000000>;
-		reg = <0>;
-		interrupt-parent = <&gpio6>;
-		interrupts = <11 IRQ_TYPE_LEVEL_LOW>; /* gpio line 171 */
-		vdd-supply = <&vdd_eth>;
-	};
-};
-
-&mmc1 {
-	vmmc-supply = <&vmmc>;
-	ti,bus-width = <8>;
-	ti,non-removable;
-};
-
-&mmc2 {
-	status = "disabled";
-};
-
-&mmc3 {
-	status = "disabled";
-};
-
-&mmc4 {
-	status = "disabled";
-};
-
-&mmc5 {
-	ti,bus-width = <4>;
-};
diff --git a/arch/arm/boot/dts/omap4-var-stk-om44.dts b/arch/arm/boot/dts/omap4-var-stk-om44.dts
new file mode 100644
index 000000000000..35e2364374f7
--- /dev/null
+++ b/arch/arm/boot/dts/omap4-var-stk-om44.dts
@@ -0,0 +1,16 @@
+/*
+ * Copyright (C) 2014 Joachim Eastwood <manabian@gmail.com>
+ *
+ * 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 "omap4-var-som-om44.dtsi"
+#include "omap4-var-om44customboard.dtsi"
+
+/ {
+	model = "Variscite VAR-STK-OM44";
+	compatible = "variscite,var-stk-om44", "variscite,var-som-om44", "ti,omap4430", "ti,omap4";
+};
-- 
1.8.0


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH 1/4] ARM: dts: Add support for OMAP4 Variscite OM44 family
@ 2014-04-18 15:10   ` Joachim Eastwood
  0 siblings, 0 replies; 24+ messages in thread
From: Joachim Eastwood @ 2014-04-18 15:10 UTC (permalink / raw)
  To: linux-arm-kernel

Add support for VAR-SOM-OM44[1] SODIMM system on module from Variscite. SoM
features a OMAP4460, 1GB RAM, Gigabit Ethernet (LAN7500) and optional WLAN/BT.

Also add support for VAR-STK-OM44 development board from Variscite. This kit
features a VAR-SOM-OM44 and the carrier board VAR-OM44CustomBoard[2]. The
VAR-STK-OM44 is the same as VAR-DVK-OM44 but without the LCD display.

omap4-var-stk-om44.dts replace the old and very limited omap4-var-som.dts.

[1] http://www.variscite.com/products/system-on-module-som/cortex-a9/var-som-om44-cpu-ti-omap-4-omap4460
[2] http://www.variscite.com/products/single-board-computers/var-om44customboard

Signed-off-by: Joachim Eastwood <manabian@gmail.com>
---
 .../devicetree/bindings/arm/omap/omap.txt          |   3 +
 .../devicetree/bindings/vendor-prefixes.txt        |   1 +
 arch/arm/boot/dts/Makefile                         |   2 +-
 arch/arm/boot/dts/omap4-var-om44customboard.dtsi   | 235 ++++++++++++++
 arch/arm/boot/dts/omap4-var-som-om44.dtsi          | 343 +++++++++++++++++++++
 arch/arm/boot/dts/omap4-var-som.dts                |  96 ------
 arch/arm/boot/dts/omap4-var-stk-om44.dts           |  16 +
 7 files changed, 599 insertions(+), 97 deletions(-)
 create mode 100644 arch/arm/boot/dts/omap4-var-om44customboard.dtsi
 create mode 100644 arch/arm/boot/dts/omap4-var-som-om44.dtsi
 delete mode 100644 arch/arm/boot/dts/omap4-var-som.dts
 create mode 100644 arch/arm/boot/dts/omap4-var-stk-om44.dts

diff --git a/Documentation/devicetree/bindings/arm/omap/omap.txt b/Documentation/devicetree/bindings/arm/omap/omap.txt
index 36ede19a1630..7db69ac46188 100644
--- a/Documentation/devicetree/bindings/arm/omap/omap.txt
+++ b/Documentation/devicetree/bindings/arm/omap/omap.txt
@@ -102,6 +102,9 @@ Boards:
 - OMAP4 DuoVero with Parlor : Commercial expansion board with daughter board
   compatible = "gumstix,omap4-duovero-parlor", "gumstix,omap4-duovero", "ti,omap4430", "ti,omap4";
 
+- OMAP4 VAR-STK-OM44 : Commercial dev kit with VAR-OM44CustomBoard and VAR-SOM-OM44 w/WLAN
+  compatible = "variscite,var-stk-om44", "variscite,var-som-om44", "ti,omap4430", "ti,omap4";
+
 - OMAP3 EVM : Software Development Board for OMAP35x, AM/DM37x
   compatible = "ti,omap3-evm", "ti,omap3"
 
diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt
index 0f01c9bf19c8..8a149a4b07de 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.txt
+++ b/Documentation/devicetree/bindings/vendor-prefixes.txt
@@ -112,6 +112,7 @@ tlm	Trusted Logic Mobility
 toshiba	Toshiba Corporation
 toumaz	Toumaz
 v3	V3 Semiconductor
+variscite	Variscite Ltd.
 via	VIA Technologies, Inc.
 voipac	Voipac Technologies s.r.o.
 winbond Winbond Electronics corp.
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index 35c146f31e46..f443ade8ae3c 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -273,7 +273,7 @@ dtb-$(CONFIG_ARCH_OMAP2PLUS) += omap2420-h4.dtb \
 	omap4-panda.dtb \
 	omap4-panda-a4.dtb \
 	omap4-panda-es.dtb \
-	omap4-var-som.dtb \
+	omap4-var-stk-om44.dtb \
 	omap4-sdp.dtb \
 	omap4-sdp-es23plus.dtb \
 	omap5-uevm.dtb \
diff --git a/arch/arm/boot/dts/omap4-var-om44customboard.dtsi b/arch/arm/boot/dts/omap4-var-om44customboard.dtsi
new file mode 100644
index 000000000000..7c8e383b2cd0
--- /dev/null
+++ b/arch/arm/boot/dts/omap4-var-om44customboard.dtsi
@@ -0,0 +1,235 @@
+/*
+ * Copyright (C) 2014 Joachim Eastwood <manabian@gmail.com>
+ *
+ * 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.
+ */
+
+#include <dt-bindings/input/input.h>
+
+/ {
+	aliases {
+		display0 = &hdmi0;
+	};
+
+	leds {
+		compatible = "gpio-leds";
+		pinctrl-names = "default";
+		pinctrl-0 = <&gpio_led_pins>;
+
+		led0 {
+			label = "var:green:led0";
+			gpios = <&gpio6 13 GPIO_ACTIVE_HIGH>; /* gpio 173 */
+			linux,default-trigger = "heartbeat";
+		};
+
+		led1 {
+			label = "var:green:led1";
+			gpios = <&gpio6 12 GPIO_ACTIVE_HIGH>; /* gpio 172 */
+		};
+	};
+
+	gpio-keys {
+		compatible = "gpio-keys";
+		pinctrl-names = "default";
+		pinctrl-0 = <&gpio_key_pins>;
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		user-key at 184 {
+			label = "user";
+			gpios = <&gpio6 24 GPIO_ACTIVE_HIGH>; /* gpio 184 */
+			linux,code = <BTN_EXTRA>;
+			gpio-key,wakeup;
+		};
+	};
+
+	hdmi0: connector at 0 {
+		compatible = "hdmi-connector";
+		pinctrl-names = "default";
+		pinctrl-0 = <&hdmi_hpd_pins>;
+		label = "hdmi";
+		type = "a";
+
+		hpd-gpios = <&gpio2 31 GPIO_ACTIVE_HIGH>; /* gpio_63 */
+
+		port {
+			hdmi_connector_in: endpoint {
+				remote-endpoint = <&hdmi_out>;
+			};
+		};
+	};
+};
+
+&omap4_pmx_core {
+	uart1_pins: pinmux_uart1_pins {
+		pinctrl-single,pins = <
+			0xfc (PIN_INPUT_PULLUP | MUX_MODE1)	/* mcspi1_cs2.uart1_cts */
+			0xfe (PIN_OUTPUT | MUX_MODE1)		/* mcspi1_cs3.uart1_rts */
+			0xe6 (PIN_INPUT_PULLUP | MUX_MODE1)	/* i2c2_scl.uart1_rx */
+			0xe8 (PIN_OUTPUT | MUX_MODE1)		/* i2c2_sda.uart1_tx */
+		>;
+	};
+
+	mcspi1_pins: pinmux_mcspi1_pins {
+		pinctrl-single,pins = <
+			0xf2 (PIN_INPUT | MUX_MODE0)		/*  mcspi1_clk.mcspi1_clk */
+			0xf4 (PIN_INPUT | MUX_MODE0)		/*  mcspi1_somi.mcspi1_somi */
+			0xf6 (PIN_INPUT | MUX_MODE0)		/*  mcspi1_simo.mcspi1_simo */
+			0xf8 (PIN_INPUT | MUX_MODE0)		/*  mcspi1_cs0.mcspi1_cs0 */
+		>;
+	};
+
+	mcasp_pins: pinmux_mcsasp_pins {
+		pinctrl-single,pins = <
+			0xb8 (PIN_OUTPUT | MUX_MODE2)		/*  mcbsp2_dr.abe_mcasp_axr */
+		>;
+	};
+
+	dss_dpi_pins: pinmux_dss_dpi_pins {
+		pinctrl-single,pins = <
+			0x122 (PIN_OUTPUT | MUX_MODE5)		/* dispc2_data23 */
+			0x124 (PIN_OUTPUT | MUX_MODE5) 		/* dispc2_data22 */
+			0x126 (PIN_OUTPUT | MUX_MODE5)		/* dispc2_data21 */
+			0x128 (PIN_OUTPUT | MUX_MODE5)		/* dispc2_data20 */
+			0x12a (PIN_OUTPUT | MUX_MODE5)		/* dispc2_data19 */
+			0x12c (PIN_OUTPUT | MUX_MODE5)		/* dispc2_data18 */
+			0x12e (PIN_OUTPUT | MUX_MODE5)		/* dispc2_data15 */
+			0x130 (PIN_OUTPUT | MUX_MODE5)		/* dispc2_data14 */
+			0x132 (PIN_OUTPUT | MUX_MODE5)		/* dispc2_data13 */
+			0x134 (PIN_OUTPUT | MUX_MODE5)		/* dispc2_data12 */
+			0x136 (PIN_OUTPUT | MUX_MODE5)		/* dispc2_data11 */
+			0x174 (PIN_OUTPUT | MUX_MODE5)		/* dispc2_data10 */
+			0x176 (PIN_OUTPUT | MUX_MODE5)		/* dispc2_data9 */
+			0x178 (PIN_OUTPUT | MUX_MODE5)		/* dispc2_data16 */
+			0x17a (PIN_OUTPUT | MUX_MODE5)		/* dispc2_data17 */
+			0x17c (PIN_OUTPUT | MUX_MODE5)		/* dispc2_hsync */
+			0x17e (PIN_OUTPUT | MUX_MODE5)		/* dispc2_pclk */
+			0x180 (PIN_OUTPUT | MUX_MODE5)		/* dispc2_vsync */
+			0x182 (PIN_OUTPUT | MUX_MODE5)		/* dispc2_de */
+			0x184 (PIN_OUTPUT | MUX_MODE5)		/* dispc2_data8 */
+			0x186 (PIN_OUTPUT | MUX_MODE5)		/* dispc2_data7 */
+			0x188 (PIN_OUTPUT | MUX_MODE5)		/* dispc2_data6 */
+			0x18a (PIN_OUTPUT | MUX_MODE5)		/* dispc2_data5 */
+			0x18c (PIN_OUTPUT | MUX_MODE5)		/* dispc2_data4 */
+			0x18e (PIN_OUTPUT | MUX_MODE5)		/* dispc2_data3 */
+			0x190 (PIN_OUTPUT | MUX_MODE5)		/* dispc2_data2 */
+			0x192 (PIN_OUTPUT | MUX_MODE5)		/* dispc2_data1 */
+			0x194 (PIN_OUTPUT | MUX_MODE5)		/* dispc2_data0 */
+		>;
+	};
+
+	dss_hdmi_pins: pinmux_dss_hdmi_pins {
+		pinctrl-single,pins = <
+			0x5a (PIN_INPUT_PULLUP | MUX_MODE0)	/* hdmi_cec.hdmi_cec */
+			0x5c (PIN_INPUT_PULLUP | MUX_MODE0)	/* hdmi_scl.hdmi_scl */
+			0x5e (PIN_INPUT_PULLUP | MUX_MODE0)	/* hdmi_sda.hdmi_sda */
+		>;
+	};
+
+	i2c4_pins: pinmux_i2c4_pins {
+		pinctrl-single,pins = <
+			0xee (PIN_INPUT_PULLUP | MUX_MODE0)	/* i2c4_scl */
+			0xf0 (PIN_INPUT_PULLUP | MUX_MODE0)	/* i2c4_sda */
+		>;
+	};
+
+	mmc5_pins: pinmux_mmc5_pins {
+		pinctrl-single,pins = <
+			0x0b6 (PIN_INPUT | MUX_MODE3)		/* abe_mcbsp2_clkx.gpio_110 */
+			0x108 (PIN_INPUT_PULLUP | MUX_MODE0)	/* sdmmc5_clk.sdmmc5_clk */
+			0x10a (PIN_INPUT_PULLUP | MUX_MODE0)	/* sdmmc5_cmd.sdmmc5_cmd */
+			0x10c (PIN_INPUT_PULLUP | MUX_MODE0)	/* sdmmc5_dat0.sdmmc5_dat0 */
+			0x10e (PIN_INPUT_PULLUP | MUX_MODE0)	/* sdmmc5_dat1.sdmmc5_dat1 */
+			0x110 (PIN_INPUT_PULLUP | MUX_MODE0)	/* sdmmc5_dat2.sdmmc5_dat2 */
+			0x112 (PIN_INPUT_PULLUP | MUX_MODE0)	/* sdmmc5_dat3.sdmmc5_dat3 */
+		>;
+	};
+
+	gpio_led_pins: pinmux_gpio_led_pins {
+		pinctrl-single,pins = <
+			0x13e (PIN_OUTPUT | MUX_MODE3)		/* kpd_col4.gpio_172 */
+			0x140 (PIN_OUTPUT | MUX_MODE3)		/* kpd_col5.gpio_173 */
+		>;
+	};
+
+	gpio_key_pins: pinmux_gpio_key_pins {
+		pinctrl-single,pins = <
+			0x162 (PIN_INPUT | MUX_MODE3)		/* sys_boot0.gpio_184 */
+		>;
+	};
+
+	ks8851_irq_pins: pinmux_ks8851_irq_pins {
+		pinctrl-single,pins = <
+			0x13c (PIN_INPUT_PULLUP | MUX_MODE3)	/* kpd_col3.gpio_171 */
+		>;
+	};
+
+	hdmi_hpd_pins: pinmux_hdmi_hpd_pins {
+		pinctrl-single,pins = <
+			0x58 (PIN_INPUT_PULLDOWN | MUX_MODE3)	/* hdmi_hpd.gpio_63 */
+		>;
+	};
+
+	backlight_pins: pinmux_backlight_pins {
+		pinctrl-single,pins = <
+			0xd6 (PIN_OUTPUT | MUX_MODE3)		/* abe_dmic_din3.gpio_122 */
+		>;
+	};
+};
+
+&i2c4 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2c4_pins>;
+	clock-frequency = <400000>;
+	status = "okay";
+};
+
+&uart1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&uart1_pins>;
+	status = "okay";
+};
+
+&mcspi1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&mcspi1_pins>;
+	status = "okay";
+
+	eth at 0 {
+		compatible = "ks8851";
+		pinctrl-names = "default";
+		pinctrl-0 = <&ks8851_irq_pins>;
+		spi-max-frequency = <24000000>;
+		reg = <0>;
+		interrupt-parent = <&gpio6>;
+		interrupts = <11 IRQ_TYPE_LEVEL_LOW>; /* gpio 171 */
+	};
+};
+
+&mmc5 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&mmc5_pins>;
+	vmmc-supply = <&vbat>;
+	bus-width = <4>;
+	cd-gpios = <&gpio4 14 GPIO_ACTIVE_HIGH>; /* gpio 110 */
+	status = "okay";
+};
+
+&dss {
+	status = "okay";
+};
+
+&hdmi {
+	status = "okay";
+	pinctrl-names = "default";
+	pinctrl-0 = <&dss_hdmi_pins>;
+	vdda-supply = <&vdac>;
+
+	port {
+		hdmi_out: endpoint {
+			remote-endpoint = <&hdmi_connector_in>;
+		};
+	};
+};
diff --git a/arch/arm/boot/dts/omap4-var-som-om44.dtsi b/arch/arm/boot/dts/omap4-var-som-om44.dtsi
new file mode 100644
index 000000000000..3ae70479ae26
--- /dev/null
+++ b/arch/arm/boot/dts/omap4-var-som-om44.dtsi
@@ -0,0 +1,343 @@
+/*
+ * Copyright (C) 2014 Joachim Eastwood <manabian@gmail.com>
+ * Copyright (C) 2012 Variscite Ltd. - http://www.variscite.com
+ *
+ * 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.
+ */
+#include "omap4460.dtsi"
+
+/ {
+	model = "Variscite VAR-SOM-OM44";
+	compatible = "variscite,var-som-om44", "ti,omap4430", "ti,omap4";
+
+	memory {
+		device_type = "memory";
+		reg = <0x80000000 0x40000000>; /* 1 GB */
+	};
+
+	sound: sound {
+		compatible = "ti,abe-twl6040";
+		ti,model = "VAR-SOM-OM44";
+
+		ti,mclk-freq = <38400000>;
+		ti,mcpdm = <&mcpdm>;
+		ti,twl6040 = <&twl6040>;
+
+		/* Audio routing */
+		ti,audio-routing =
+			"Headset Stereophone", "HSOL",
+			"Headset Stereophone", "HSOR",
+			"AFML", "Line In",
+			"AFMR", "Line In";
+	};
+
+	/* HS USB Host PHY on PORT 1 */
+	hsusb1_phy: hsusb1_phy {
+		compatible = "usb-nop-xceiv";
+		pinctrl-names = "default";
+		pinctrl-0 = <
+			&hsusbb1_phy_clk_pins
+			&hsusbb1_phy_rst_pins
+		>;
+
+		reset-gpios = <&gpio6 17 GPIO_ACTIVE_LOW>; /* gpio 177 */
+		vcc-supply = <&vbat>;
+
+		clocks = <&auxclk3_ck>;
+		clock-names = "main_clk";
+		clock-frequency = <19200000>;
+	};
+
+	vbat: fixedregulator-vbat {
+		compatible = "regulator-fixed";
+		regulator-name = "VBAT";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+		regulator-always-on;
+		regulator-boot-on;
+	};
+};
+
+&omap4_pmx_core {
+	pinctrl-names = "default";
+	pinctrl-0 = <
+			&hsusbb1_pins
+	>;
+
+	twl6040_pins: pinmux_twl6040_pins {
+		pinctrl-single,pins = <
+			0x15c (PIN_OUTPUT | MUX_MODE3)		/* fref_clk2_out.gpio_182 */
+			0x160 (PIN_INPUT | MUX_MODE0)		/* sys_nirq2.sys_nirq2 */
+		>;
+	};
+
+	mcpdm_pins: pinmux_mcpdm_pins {
+		pinctrl-single,pins = <
+			0xc6 (PIN_INPUT_PULLDOWN | MUX_MODE0)	/* abe_pdm_ul_data.abe_pdm_ul_data */
+			0xc8 (PIN_INPUT_PULLDOWN | MUX_MODE0)	/* abe_pdm_dl_data.abe_pdm_dl_data */
+			0xca (PIN_INPUT_PULLUP | MUX_MODE0)	/* abe_pdm_frame.abe_pdm_frame */
+			0xcc (PIN_INPUT_PULLDOWN | MUX_MODE0)	/* abe_pdm_lb_clk.abe_pdm_lb_clk */
+			0xce (PIN_INPUT_PULLDOWN | MUX_MODE0)	/* abe_clks.abe_clks */
+		>;
+	};
+
+	tsc2004_pins: pinmux_tsc2004_pins {
+		pinctrl-single,pins = <
+			0x50 (PIN_INPUT | MUX_MODE3)		/* gpmc_ncs4.gpio_101 (irq) */
+			0x52 (PIN_OUTPUT | MUX_MODE3)		/* gpmc_ncs5.gpio_102 (rst) */
+		>;
+	};
+
+	uart3_pins: pinmux_uart3_pins {
+		pinctrl-single,pins = <
+			0x100 (PIN_INPUT_PULLUP | MUX_MODE0)	/* uart3_cts_rctx.uart3_cts_rctx */
+			0x102 (PIN_OUTPUT | MUX_MODE0)		/* uart3_rts_sd.uart3_rts_sd */
+			0x104 (PIN_INPUT | MUX_MODE0)		/* uart3_rx_irrx.uart3_rx_irrx */
+			0x106 (PIN_OUTPUT | MUX_MODE0)		/* uart3_tx_irtx.uart3_tx_irtx */
+		>;
+	};
+
+	hsusbb1_pins: pinmux_hsusbb1_pins {
+		pinctrl-single,pins = <
+			0x82 (PIN_INPUT_PULLDOWN | MUX_MODE4)	/* usbb1_ulpitll_clk.usbb1_ulpiphy_clk */
+			0x84 (PIN_OUTPUT | MUX_MODE4)		/* usbb1_ulpitll_stp.usbb1_ulpiphy_stp */
+			0x86 (PIN_INPUT_PULLDOWN | MUX_MODE4)	/* usbb1_ulpitll_dir.usbb1_ulpiphy_dir */
+			0x88 (PIN_INPUT_PULLDOWN | MUX_MODE4)	/* usbb1_ulpitll_nxt.usbb1_ulpiphy_nxt */
+			0x8a (PIN_INPUT_PULLDOWN | MUX_MODE4)	/* usbb1_ulpitll_dat0.usbb1_ulpiphy_dat0 */
+			0x8c (PIN_INPUT_PULLDOWN | MUX_MODE4)	/* usbb1_ulpitll_dat1.usbb1_ulpiphy_dat1 */
+			0x8e (PIN_INPUT_PULLDOWN | MUX_MODE4)	/* usbb1_ulpitll_dat2.usbb1_ulpiphy_dat2 */
+			0x90 (PIN_INPUT_PULLDOWN | MUX_MODE4)	/* usbb1_ulpitll_dat3.usbb1_ulpiphy_dat3 */
+			0x92 (PIN_INPUT_PULLDOWN | MUX_MODE4)	/* usbb1_ulpitll_dat4.usbb1_ulpiphy_dat4 */
+			0x94 (PIN_INPUT_PULLDOWN | MUX_MODE4)	/* usbb1_ulpitll_dat5.usbb1_ulpiphy_dat5 */
+			0x96 (PIN_INPUT_PULLDOWN | MUX_MODE4)	/* usbb1_ulpitll_dat6.usbb1_ulpiphy_dat6 */
+			0x98 (PIN_INPUT_PULLDOWN | MUX_MODE4)	/* usbb1_ulpitll_dat7.usbb1_ulpiphy_dat7 */
+		>;
+	};
+
+	hsusbb1_phy_rst_pins: pinmux_hsusbb1_phy_rst_pins {
+		pinctrl-single,pins = <
+			0x14c (PIN_OUTPUT | MUX_MODE3)		/* kpd_row2.gpio_177 */
+		>;
+	};
+
+	i2c1_pins: pinmux_i2c1_pins {
+		pinctrl-single,pins = <
+			0xe2 (PIN_INPUT_PULLUP | MUX_MODE0)	/* i2c1_scl */
+			0xe4 (PIN_INPUT_PULLUP | MUX_MODE0)	/* i2c1_sda */
+		>;
+	};
+
+	i2c3_pins: pinmux_i2c3_pins {
+		pinctrl-single,pins = <
+			0xea (PIN_INPUT_PULLUP | MUX_MODE0)	/* i2c3_scl */
+			0xec (PIN_INPUT_PULLUP | MUX_MODE0)	/* i2c3_sda */
+		>;
+	};
+
+	mmc1_pins: pinmux_mmc1_pins {
+		pinctrl-single,pins = <
+			0xa2 (PIN_INPUT_PULLUP | MUX_MODE0)	/* sdmmc1_clk.sdmmc1_clk */
+			0xa4 (PIN_INPUT_PULLUP | MUX_MODE0)	/* sdmmc1_cmd.sdmmc1_cmd */
+			0xa6 (PIN_INPUT_PULLUP | MUX_MODE0)	/* sdmmc1_dat0.sdmmc1_dat0 */
+			0xa8 (PIN_INPUT_PULLUP | MUX_MODE0)	/* sdmmc1_dat1.sdmmc1_dat1 */
+			0xaa (PIN_INPUT_PULLUP | MUX_MODE0)	/* sdmmc1_dat2.sdmmc1_dat2 */
+			0xac (PIN_INPUT_PULLUP | MUX_MODE0)	/* sdmmc1_dat3.sdmmc1_dat3 */
+		>;
+	};
+};
+
+&omap4_pmx_wkup {
+	pinctrl-names = "default";
+	pinctrl-0 = <
+		&hsusbb1_hub_rst_pins
+		&lan7500_rst_pins
+	>;
+
+	hsusbb1_phy_clk_pins: pinmux_hsusbb1_phy_clk_pins {
+		pinctrl-single,pins = <
+			0x18 (PIN_OUTPUT | MUX_MODE0)	/* fref_clk3_out */
+		>;
+	};
+
+	hsusbb1_hub_rst_pins: pinmux_hsusbb1_hub_rst_pins {
+		pinctrl-single,pins = <
+			0x2 (PIN_OUTPUT | MUX_MODE3)	/* gpio_wk1 */
+		>;
+	};
+
+	lan7500_rst_pins: pinmux_lan7500_rst_pins {
+		pinctrl-single,pins = <
+			0x0 (PIN_OUTPUT | MUX_MODE3)	/* gpio_wk0 */
+		>;
+	};
+};
+
+&i2c1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2c1_pins>;
+	status = "okay";
+
+	clock-frequency = <400000>;
+
+	twl: twl at 48 {
+		reg = <0x48>;
+		/* SPI = 0, IRQ# = 7, 4 = active high level-sensitive */
+		interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>; /* IRQ_SYS_1N cascaded to gic */
+		interrupt-parent = <&gic>;
+	};
+
+	twl6040: twl at 4b {
+		compatible = "ti,twl6040";
+		reg = <0x4b>;
+
+		pinctrl-names = "default";
+		pinctrl-0 = <&twl6040_pins>;
+
+		/* SPI = 0, IRQ# = 119, 4 = active high level-sensitive */
+		interrupts = <GIC_SPI 119 IRQ_TYPE_LEVEL_HIGH>; /* IRQ_SYS_2N cascaded to gic */
+		interrupt-parent = <&gic>;
+		ti,audpwron-gpio = <&gpio6 22 0>; /* gpio 182 */
+
+		vio-supply = <&v1v8>;
+		v2v1-supply = <&v2v1>;
+		enable-active-high;
+	};
+};
+
+#include "twl6030.dtsi"
+#include "twl6030_omap4.dtsi"
+
+&vusim {
+	regulator-min-microvolt = <3000000>;
+	regulator-max-microvolt = <3000000>;
+	regulator-always-on;
+};
+
+&i2c2 {
+	status = "disabled";
+};
+
+&i2c3 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2c3_pins>;
+	status = "okay";
+
+	clock-frequency = <400000>;
+
+	tsc2004 at 48 {
+		compatible = "ti,tsc2004";
+		pinctrl-names = "default";
+		pinctrl-0 = <&tsc2004_pins>;
+		reg = <0x48>;
+		interrupt-parent = <&gpio4>;
+		interrupts = <5 IRQ_TYPE_LEVEL_LOW>; /* gpio 101 */
+		status = "disabled";
+	};
+
+	tmp105 at 49 {
+		compatible = "ti,tmp105";
+		reg = <0x49>;
+	};
+
+	eeprom at 50 {
+		compatible = "microchip,24c32";
+		reg = <0x50>;
+	};
+};
+
+&i2c4 {
+	status = "disabled";
+};
+
+&mcpdm {
+	pinctrl-names = "default";
+	pinctrl-0 = <&mcpdm_pins>;
+	status = "okay";
+};
+
+&gpmc {
+	status = "disabled";
+};
+
+&mcspi1 {
+	status = "disabled";
+};
+
+&mcspi2 {
+	status = "disabled";
+};
+
+&mcspi3 {
+	status = "disabled";
+};
+
+&mcspi4 {
+	status = "disabled";
+};
+
+&mmc1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&mmc1_pins>;
+	vmmc-supply = <&vmmc>;
+	bus-width = <4>;
+	ti,non-removable;
+	status = "okay";
+};
+
+&mmc2 {
+	status = "disabled";
+};
+
+&mmc3 {
+	status = "disabled";
+};
+
+&mmc4 {
+	status = "disabled";
+};
+
+&mmc5 {
+	status = "disabled";
+};
+
+&uart1 {
+	status = "disabled";
+};
+
+&uart2 {
+	status = "disabled";
+};
+
+&uart3 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&uart3_pins>;
+	status = "okay";
+};
+
+&uart4 {
+	status = "disabled";
+};
+
+&keypad {
+	status = "disabled";
+};
+
+&twl_usb_comparator {
+	usb-supply = <&vusb>;
+};
+
+&usb_otg_hs {
+	interface-type = <1>;
+	mode = <3>;
+	power = <50>;
+};
+
+&usbhshost {
+	port1-mode = "ehci-phy";
+};
+
+&usbhsehci {
+	phys = <&hsusb1_phy>;
+};
diff --git a/arch/arm/boot/dts/omap4-var-som.dts b/arch/arm/boot/dts/omap4-var-som.dts
deleted file mode 100644
index b41269e871dd..000000000000
--- a/arch/arm/boot/dts/omap4-var-som.dts
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * Copyright (C) 2012 Variscite Ltd. - http://www.variscite.com
- *
- * 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 "omap443x.dtsi"
-
-/ {
-	model = "Variscite OMAP4 SOM";
-	compatible = "var,omap4-var_som", "ti,omap4430", "ti,omap4";
-
-	memory {
-		device_type = "memory";
-		reg = <0x80000000 0x40000000>; /* 1 GB */
-	};
-
-	vdd_eth: fixedregulator at 0 {
-		compatible = "regulator-fixed";
-		regulator-name = "VDD_ETH";
-		regulator-min-microvolt = <3300000>;
-		regulator-max-microvolt = <3300000>;
-		enable-active-high;
-		regulator-boot-on;
-	};
-};
-
-&i2c1 {
-	clock-frequency = <400000>;
-
-	twl: twl at 48 {
-		reg = <0x48>;
-		/* SPI = 0, IRQ# = 7, 4 = active high level-sensitive */
-		interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>; /* IRQ_SYS_1N cascaded to gic */
-		interrupt-parent = <&gic>;
-	};
-};
-
-#include "twl6030.dtsi"
-
-&i2c2 {
-	clock-frequency = <400000>;
-};
-
-&i2c3 {
-	clock-frequency = <400000>;
-
-	/*
-	 * Temperature Sensor
-	 * http://www.ti.com/lit/ds/symlink/tmp105.pdf
-	 */
-	tmp105 at 49 {
-		compatible = "ti,tmp105";
-		reg = <0x49>;
-	};
-};
-
-&i2c4 {
-	clock-frequency = <400000>;
-};
-
-&mcspi1 {
-	eth at 0 {
-		compatible = "ks8851";
-		spi-max-frequency = <24000000>;
-		reg = <0>;
-		interrupt-parent = <&gpio6>;
-		interrupts = <11 IRQ_TYPE_LEVEL_LOW>; /* gpio line 171 */
-		vdd-supply = <&vdd_eth>;
-	};
-};
-
-&mmc1 {
-	vmmc-supply = <&vmmc>;
-	ti,bus-width = <8>;
-	ti,non-removable;
-};
-
-&mmc2 {
-	status = "disabled";
-};
-
-&mmc3 {
-	status = "disabled";
-};
-
-&mmc4 {
-	status = "disabled";
-};
-
-&mmc5 {
-	ti,bus-width = <4>;
-};
diff --git a/arch/arm/boot/dts/omap4-var-stk-om44.dts b/arch/arm/boot/dts/omap4-var-stk-om44.dts
new file mode 100644
index 000000000000..35e2364374f7
--- /dev/null
+++ b/arch/arm/boot/dts/omap4-var-stk-om44.dts
@@ -0,0 +1,16 @@
+/*
+ * Copyright (C) 2014 Joachim Eastwood <manabian@gmail.com>
+ *
+ * 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 "omap4-var-som-om44.dtsi"
+#include "omap4-var-om44customboard.dtsi"
+
+/ {
+	model = "Variscite VAR-STK-OM44";
+	compatible = "variscite,var-stk-om44", "variscite,var-som-om44", "ti,omap4430", "ti,omap4";
+};
-- 
1.8.0

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH 2/4] ARM: dts: Add support for OMAP4 VAR-DVK-OM44
  2014-04-18 15:10 ` Joachim Eastwood
@ 2014-04-18 15:10   ` Joachim Eastwood
  -1 siblings, 0 replies; 24+ messages in thread
From: Joachim Eastwood @ 2014-04-18 15:10 UTC (permalink / raw)
  To: tony, bcousson
  Cc: linux-arm-kernel, tomi.valkeinen, linux-omap, Joachim Eastwood

Signed-off-by: Joachim Eastwood <manabian@gmail.com>
---
 .../devicetree/bindings/arm/omap/omap.txt          |  3 +
 arch/arm/boot/dts/Makefile                         |  1 +
 arch/arm/boot/dts/omap4-var-dvk-om44.dts           | 70 ++++++++++++++++++++++
 3 files changed, 74 insertions(+)
 create mode 100644 arch/arm/boot/dts/omap4-var-dvk-om44.dts

diff --git a/Documentation/devicetree/bindings/arm/omap/omap.txt b/Documentation/devicetree/bindings/arm/omap/omap.txt
index 7db69ac46188..62df0244114e 100644
--- a/Documentation/devicetree/bindings/arm/omap/omap.txt
+++ b/Documentation/devicetree/bindings/arm/omap/omap.txt
@@ -105,6 +105,9 @@ Boards:
 - OMAP4 VAR-STK-OM44 : Commercial dev kit with VAR-OM44CustomBoard and VAR-SOM-OM44 w/WLAN
   compatible = "variscite,var-stk-om44", "variscite,var-som-om44", "ti,omap4430", "ti,omap4";
 
+- OMAP4 VAR-DVK-OM44 : Commercial dev kit with VAR-OM44CustomBoard, VAR-SOM-OM44 w/WLAN and LCD touchscreen
+  compatible = "variscite,var-dvk-om44", "variscite,var-som-om44", "ti,omap4430", "ti,omap4";
+
 - OMAP3 EVM : Software Development Board for OMAP35x, AM/DM37x
   compatible = "ti,omap3-evm", "ti,omap3"
 
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index f443ade8ae3c..2cc120cf6bbf 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -273,6 +273,7 @@ dtb-$(CONFIG_ARCH_OMAP2PLUS) += omap2420-h4.dtb \
 	omap4-panda.dtb \
 	omap4-panda-a4.dtb \
 	omap4-panda-es.dtb \
+	omap4-var-dvk-om44.dtb \
 	omap4-var-stk-om44.dtb \
 	omap4-sdp.dtb \
 	omap4-sdp-es23plus.dtb \
diff --git a/arch/arm/boot/dts/omap4-var-dvk-om44.dts b/arch/arm/boot/dts/omap4-var-dvk-om44.dts
new file mode 100644
index 000000000000..9471bbd8cb33
--- /dev/null
+++ b/arch/arm/boot/dts/omap4-var-dvk-om44.dts
@@ -0,0 +1,70 @@
+/*
+ * Copyright (C) 2014 Joachim Eastwood <manabian@gmail.com>
+ *
+ * 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 "omap4-var-som-om44.dtsi"
+#include "omap4-var-om44customboard.dtsi"
+
+/ {
+	model = "Variscite VAR-DVK-OM44";
+	compatible = "variscite,var-dvk-om44", "variscite,var-som-om44", "ti,omap4430", "ti,omap4";
+
+	aliases {
+		display0 = &lcd0;
+		display1 = &hdmi0;
+	};
+
+	lcd0: display {
+		compatible = "innolux,at070tn83", "panel-dpi";
+		label = "lcd";
+		panel-timing {
+			clock-frequency = <33333333>;
+
+			hback-porch = <40>;
+			hactive = <800>;
+			hfront-porch = <40>;
+			hsync-len = <48>;
+
+			vback-porch = <29>;
+			vactive = <480>;
+			vfront-porch = <13>;
+			vsync-len = <3>;
+		};
+
+		port {
+			lcd_in: endpoint {
+				remote-endpoint = <&dpi_out>;
+			};
+		};
+	};
+
+	backlight {
+		compatible = "gpio-backlight";
+		pinctrl-names = "default";
+		pinctrl-0 = <&backlight_pins>;
+
+		gpios = <&gpio4 26 GPIO_ACTIVE_HIGH>; /* gpio 122 */
+	};
+};
+
+&dss {
+	pinctrl-names = "default";
+	pinctrl-0 = <&dss_dpi_pins>;
+
+	port {
+		dpi_out: endpoint {
+			remote-endpoint = <&lcd_in>;
+			data-lines = <24>;
+		};
+	};
+};
+
+&dsi2 {
+	status = "okay";
+	vdd-supply = <&vcxio>;
+};
-- 
1.8.0


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH 2/4] ARM: dts: Add support for OMAP4 VAR-DVK-OM44
@ 2014-04-18 15:10   ` Joachim Eastwood
  0 siblings, 0 replies; 24+ messages in thread
From: Joachim Eastwood @ 2014-04-18 15:10 UTC (permalink / raw)
  To: linux-arm-kernel

Signed-off-by: Joachim Eastwood <manabian@gmail.com>
---
 .../devicetree/bindings/arm/omap/omap.txt          |  3 +
 arch/arm/boot/dts/Makefile                         |  1 +
 arch/arm/boot/dts/omap4-var-dvk-om44.dts           | 70 ++++++++++++++++++++++
 3 files changed, 74 insertions(+)
 create mode 100644 arch/arm/boot/dts/omap4-var-dvk-om44.dts

diff --git a/Documentation/devicetree/bindings/arm/omap/omap.txt b/Documentation/devicetree/bindings/arm/omap/omap.txt
index 7db69ac46188..62df0244114e 100644
--- a/Documentation/devicetree/bindings/arm/omap/omap.txt
+++ b/Documentation/devicetree/bindings/arm/omap/omap.txt
@@ -105,6 +105,9 @@ Boards:
 - OMAP4 VAR-STK-OM44 : Commercial dev kit with VAR-OM44CustomBoard and VAR-SOM-OM44 w/WLAN
   compatible = "variscite,var-stk-om44", "variscite,var-som-om44", "ti,omap4430", "ti,omap4";
 
+- OMAP4 VAR-DVK-OM44 : Commercial dev kit with VAR-OM44CustomBoard, VAR-SOM-OM44 w/WLAN and LCD touchscreen
+  compatible = "variscite,var-dvk-om44", "variscite,var-som-om44", "ti,omap4430", "ti,omap4";
+
 - OMAP3 EVM : Software Development Board for OMAP35x, AM/DM37x
   compatible = "ti,omap3-evm", "ti,omap3"
 
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index f443ade8ae3c..2cc120cf6bbf 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -273,6 +273,7 @@ dtb-$(CONFIG_ARCH_OMAP2PLUS) += omap2420-h4.dtb \
 	omap4-panda.dtb \
 	omap4-panda-a4.dtb \
 	omap4-panda-es.dtb \
+	omap4-var-dvk-om44.dtb \
 	omap4-var-stk-om44.dtb \
 	omap4-sdp.dtb \
 	omap4-sdp-es23plus.dtb \
diff --git a/arch/arm/boot/dts/omap4-var-dvk-om44.dts b/arch/arm/boot/dts/omap4-var-dvk-om44.dts
new file mode 100644
index 000000000000..9471bbd8cb33
--- /dev/null
+++ b/arch/arm/boot/dts/omap4-var-dvk-om44.dts
@@ -0,0 +1,70 @@
+/*
+ * Copyright (C) 2014 Joachim Eastwood <manabian@gmail.com>
+ *
+ * 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 "omap4-var-som-om44.dtsi"
+#include "omap4-var-om44customboard.dtsi"
+
+/ {
+	model = "Variscite VAR-DVK-OM44";
+	compatible = "variscite,var-dvk-om44", "variscite,var-som-om44", "ti,omap4430", "ti,omap4";
+
+	aliases {
+		display0 = &lcd0;
+		display1 = &hdmi0;
+	};
+
+	lcd0: display {
+		compatible = "innolux,at070tn83", "panel-dpi";
+		label = "lcd";
+		panel-timing {
+			clock-frequency = <33333333>;
+
+			hback-porch = <40>;
+			hactive = <800>;
+			hfront-porch = <40>;
+			hsync-len = <48>;
+
+			vback-porch = <29>;
+			vactive = <480>;
+			vfront-porch = <13>;
+			vsync-len = <3>;
+		};
+
+		port {
+			lcd_in: endpoint {
+				remote-endpoint = <&dpi_out>;
+			};
+		};
+	};
+
+	backlight {
+		compatible = "gpio-backlight";
+		pinctrl-names = "default";
+		pinctrl-0 = <&backlight_pins>;
+
+		gpios = <&gpio4 26 GPIO_ACTIVE_HIGH>; /* gpio 122 */
+	};
+};
+
+&dss {
+	pinctrl-names = "default";
+	pinctrl-0 = <&dss_dpi_pins>;
+
+	port {
+		dpi_out: endpoint {
+			remote-endpoint = <&lcd_in>;
+			data-lines = <24>;
+		};
+	};
+};
+
+&dsi2 {
+	status = "okay";
+	vdd-supply = <&vcxio>;
+};
-- 
1.8.0

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH 3/4] ARM: dts: Add VAR-SOM-OM44 WLAN nodes
  2014-04-18 15:10 ` Joachim Eastwood
@ 2014-04-18 15:10   ` Joachim Eastwood
  -1 siblings, 0 replies; 24+ messages in thread
From: Joachim Eastwood @ 2014-04-18 15:10 UTC (permalink / raw)
  To: tony, bcousson
  Cc: linux-arm-kernel, tomi.valkeinen, linux-omap, Joachim Eastwood

Both the VAR-STK-OM44 and VAR-DVK-OM44 boards comes with the WLAN/BT version of
the system on module VAR-SOM-OM44.

Signed-off-by: Joachim Eastwood <manabian@gmail.com>
---
 arch/arm/boot/dts/omap4-var-dvk-om44.dts       |  1 +
 arch/arm/boot/dts/omap4-var-som-om44-wlan.dtsi | 68 ++++++++++++++++++++++++++
 arch/arm/boot/dts/omap4-var-stk-om44.dts       |  1 +
 3 files changed, 70 insertions(+)
 create mode 100644 arch/arm/boot/dts/omap4-var-som-om44-wlan.dtsi

diff --git a/arch/arm/boot/dts/omap4-var-dvk-om44.dts b/arch/arm/boot/dts/omap4-var-dvk-om44.dts
index 9471bbd8cb33..4ac91e693205 100644
--- a/arch/arm/boot/dts/omap4-var-dvk-om44.dts
+++ b/arch/arm/boot/dts/omap4-var-dvk-om44.dts
@@ -8,6 +8,7 @@
 /dts-v1/;
 
 #include "omap4-var-som-om44.dtsi"
+#include "omap4-var-som-om44-wlan.dtsi"
 #include "omap4-var-om44customboard.dtsi"
 
 / {
diff --git a/arch/arm/boot/dts/omap4-var-som-om44-wlan.dtsi b/arch/arm/boot/dts/omap4-var-som-om44-wlan.dtsi
new file mode 100644
index 000000000000..9487988d15db
--- /dev/null
+++ b/arch/arm/boot/dts/omap4-var-som-om44-wlan.dtsi
@@ -0,0 +1,68 @@
+/*
+ * Copyright (C) 2014 Joachim Eastwood <manabian@gmail.com>
+ *
+ * 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.
+ */
+
+/ {
+	/* regulator for wl12xx on sdio4 */
+	wl12xx_vmmc: wl12xx_vmmc {
+		pinctrl-names = "default";
+		pinctrl-0 = <&wl12xx_ctrl_pins>;
+		compatible = "regulator-fixed";
+		regulator-name = "vwl1271";
+		regulator-min-microvolt = <1800000>;
+		regulator-max-microvolt = <1800000>;
+		gpio = <&gpio2 11 0>;	/* gpio 43 */
+		startup-delay-us = <70000>;
+		enable-active-high;
+	};
+};
+
+&omap4_pmx_core {
+	uart2_pins: pinmux_uart2_pins {
+		pinctrl-single,pins = <
+			0xd8 (PIN_INPUT_PULLUP | MUX_MODE0)	/* uart2_cts.uart2_cts */
+			0xda (PIN_OUTPUT | MUX_MODE0)		/* uart2_rts.uart2_rts */
+			0xdc (PIN_INPUT_PULLUP | MUX_MODE0)	/* uart2_rx.uart2_rx */
+			0xde (PIN_OUTPUT | MUX_MODE0)		/* uart2_tx.uart2_tx */
+		>;
+	};
+
+	wl12xx_ctrl_pins: pinmux_wl12xx_ctrl_pins {
+		pinctrl-single,pins = <
+			0x22 (PIN_INPUT_PULLUP | MUX_MODE3)	/* gpmc_a17.gpio_41 (WLAN_IRQ) */
+			0x24 (PIN_OUTPUT | MUX_MODE3)		/* gpmc_a18.gpio_42 (BT_EN) */
+			0x26 (PIN_OUTPUT | MUX_MODE3)		/* gpmc_a19.gpio_43 (WLAN_EN) */
+		>;
+	};
+
+	mmc4_pins: pinmux_mmc4_pins {
+		pinctrl-single,pins = <
+			0x114 (PIN_INPUT_PULLUP | MUX_MODE1)	/* mcspi4_clk.sdmmc4_clk */
+			0x116 (PIN_INPUT_PULLUP | MUX_MODE1)	/* mcspi4_simo.sdmmc4_cmd */
+			0x118 (PIN_INPUT_PULLUP | MUX_MODE1)	/* mcspi4_somi.sdmmc4_dat0 */
+			0x11e (PIN_INPUT_PULLUP | MUX_MODE1)	/* uart4_tx.sdmmc4_dat1 */
+			0x11c (PIN_INPUT_PULLUP | MUX_MODE1)	/* uart4_rx.sdmmc4_dat2 */
+			0x11a (PIN_INPUT_PULLUP | MUX_MODE1)	/* mcspi4_cs0.sdmmc4_dat3 */
+		>;
+	};
+};
+
+&uart2 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&uart2_pins>;
+	status = "okay";
+};
+
+&mmc4 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&mmc4_pins>;
+	vmmc-supply = <&wl12xx_vmmc>;
+	non-removable;
+	bus-width = <4>;
+	cap-power-off-card;
+	status = "okay";
+};
diff --git a/arch/arm/boot/dts/omap4-var-stk-om44.dts b/arch/arm/boot/dts/omap4-var-stk-om44.dts
index 35e2364374f7..140349bea8dd 100644
--- a/arch/arm/boot/dts/omap4-var-stk-om44.dts
+++ b/arch/arm/boot/dts/omap4-var-stk-om44.dts
@@ -8,6 +8,7 @@
 /dts-v1/;
 
 #include "omap4-var-som-om44.dtsi"
+#include "omap4-var-som-om44-wlan.dtsi"
 #include "omap4-var-om44customboard.dtsi"
 
 / {
-- 
1.8.0


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH 3/4] ARM: dts: Add VAR-SOM-OM44 WLAN nodes
@ 2014-04-18 15:10   ` Joachim Eastwood
  0 siblings, 0 replies; 24+ messages in thread
From: Joachim Eastwood @ 2014-04-18 15:10 UTC (permalink / raw)
  To: linux-arm-kernel

Both the VAR-STK-OM44 and VAR-DVK-OM44 boards comes with the WLAN/BT version of
the system on module VAR-SOM-OM44.

Signed-off-by: Joachim Eastwood <manabian@gmail.com>
---
 arch/arm/boot/dts/omap4-var-dvk-om44.dts       |  1 +
 arch/arm/boot/dts/omap4-var-som-om44-wlan.dtsi | 68 ++++++++++++++++++++++++++
 arch/arm/boot/dts/omap4-var-stk-om44.dts       |  1 +
 3 files changed, 70 insertions(+)
 create mode 100644 arch/arm/boot/dts/omap4-var-som-om44-wlan.dtsi

diff --git a/arch/arm/boot/dts/omap4-var-dvk-om44.dts b/arch/arm/boot/dts/omap4-var-dvk-om44.dts
index 9471bbd8cb33..4ac91e693205 100644
--- a/arch/arm/boot/dts/omap4-var-dvk-om44.dts
+++ b/arch/arm/boot/dts/omap4-var-dvk-om44.dts
@@ -8,6 +8,7 @@
 /dts-v1/;
 
 #include "omap4-var-som-om44.dtsi"
+#include "omap4-var-som-om44-wlan.dtsi"
 #include "omap4-var-om44customboard.dtsi"
 
 / {
diff --git a/arch/arm/boot/dts/omap4-var-som-om44-wlan.dtsi b/arch/arm/boot/dts/omap4-var-som-om44-wlan.dtsi
new file mode 100644
index 000000000000..9487988d15db
--- /dev/null
+++ b/arch/arm/boot/dts/omap4-var-som-om44-wlan.dtsi
@@ -0,0 +1,68 @@
+/*
+ * Copyright (C) 2014 Joachim Eastwood <manabian@gmail.com>
+ *
+ * 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.
+ */
+
+/ {
+	/* regulator for wl12xx on sdio4 */
+	wl12xx_vmmc: wl12xx_vmmc {
+		pinctrl-names = "default";
+		pinctrl-0 = <&wl12xx_ctrl_pins>;
+		compatible = "regulator-fixed";
+		regulator-name = "vwl1271";
+		regulator-min-microvolt = <1800000>;
+		regulator-max-microvolt = <1800000>;
+		gpio = <&gpio2 11 0>;	/* gpio 43 */
+		startup-delay-us = <70000>;
+		enable-active-high;
+	};
+};
+
+&omap4_pmx_core {
+	uart2_pins: pinmux_uart2_pins {
+		pinctrl-single,pins = <
+			0xd8 (PIN_INPUT_PULLUP | MUX_MODE0)	/* uart2_cts.uart2_cts */
+			0xda (PIN_OUTPUT | MUX_MODE0)		/* uart2_rts.uart2_rts */
+			0xdc (PIN_INPUT_PULLUP | MUX_MODE0)	/* uart2_rx.uart2_rx */
+			0xde (PIN_OUTPUT | MUX_MODE0)		/* uart2_tx.uart2_tx */
+		>;
+	};
+
+	wl12xx_ctrl_pins: pinmux_wl12xx_ctrl_pins {
+		pinctrl-single,pins = <
+			0x22 (PIN_INPUT_PULLUP | MUX_MODE3)	/* gpmc_a17.gpio_41 (WLAN_IRQ) */
+			0x24 (PIN_OUTPUT | MUX_MODE3)		/* gpmc_a18.gpio_42 (BT_EN) */
+			0x26 (PIN_OUTPUT | MUX_MODE3)		/* gpmc_a19.gpio_43 (WLAN_EN) */
+		>;
+	};
+
+	mmc4_pins: pinmux_mmc4_pins {
+		pinctrl-single,pins = <
+			0x114 (PIN_INPUT_PULLUP | MUX_MODE1)	/* mcspi4_clk.sdmmc4_clk */
+			0x116 (PIN_INPUT_PULLUP | MUX_MODE1)	/* mcspi4_simo.sdmmc4_cmd */
+			0x118 (PIN_INPUT_PULLUP | MUX_MODE1)	/* mcspi4_somi.sdmmc4_dat0 */
+			0x11e (PIN_INPUT_PULLUP | MUX_MODE1)	/* uart4_tx.sdmmc4_dat1 */
+			0x11c (PIN_INPUT_PULLUP | MUX_MODE1)	/* uart4_rx.sdmmc4_dat2 */
+			0x11a (PIN_INPUT_PULLUP | MUX_MODE1)	/* mcspi4_cs0.sdmmc4_dat3 */
+		>;
+	};
+};
+
+&uart2 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&uart2_pins>;
+	status = "okay";
+};
+
+&mmc4 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&mmc4_pins>;
+	vmmc-supply = <&wl12xx_vmmc>;
+	non-removable;
+	bus-width = <4>;
+	cap-power-off-card;
+	status = "okay";
+};
diff --git a/arch/arm/boot/dts/omap4-var-stk-om44.dts b/arch/arm/boot/dts/omap4-var-stk-om44.dts
index 35e2364374f7..140349bea8dd 100644
--- a/arch/arm/boot/dts/omap4-var-stk-om44.dts
+++ b/arch/arm/boot/dts/omap4-var-stk-om44.dts
@@ -8,6 +8,7 @@
 /dts-v1/;
 
 #include "omap4-var-som-om44.dtsi"
+#include "omap4-var-som-om44-wlan.dtsi"
 #include "omap4-var-om44customboard.dtsi"
 
 / {
-- 
1.8.0

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH 4/4] ARM: OMAP2+: Use pdata quirks for wl12xx on VAR-STK/DVK-OM44
  2014-04-18 15:10 ` Joachim Eastwood
@ 2014-04-18 15:10   ` Joachim Eastwood
  -1 siblings, 0 replies; 24+ messages in thread
From: Joachim Eastwood @ 2014-04-18 15:10 UTC (permalink / raw)
  To: tony, bcousson
  Cc: linux-arm-kernel, tomi.valkeinen, linux-omap, Joachim Eastwood

Signed-off-by: Joachim Eastwood <manabian@gmail.com>
---
 arch/arm/mach-omap2/pdata-quirks.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/arch/arm/mach-omap2/pdata-quirks.c b/arch/arm/mach-omap2/pdata-quirks.c
index c3b73351cb7a..ab94f3a87c32 100644
--- a/arch/arm/mach-omap2/pdata-quirks.c
+++ b/arch/arm/mach-omap2/pdata-quirks.c
@@ -254,6 +254,11 @@ static void __init omap4_panda_legacy_init(void)
 {
 	legacy_init_wl12xx(WL12XX_REFCLOCK_38, 0, 53);
 }
+
+static void __init var_som_om44_legacy_init(void)
+{
+	legacy_init_wl12xx(WL12XX_REFCLOCK_38, 0, 41);
+}
 #endif
 
 #if defined(CONFIG_ARCH_OMAP4) || defined(CONFIG_SOC_OMAP5)
@@ -364,6 +369,8 @@ static struct pdata_init pdata_quirks[] __initdata = {
 #ifdef CONFIG_ARCH_OMAP4
 	{ "ti,omap4-sdp", omap4_sdp_legacy_init, },
 	{ "ti,omap4-panda", omap4_panda_legacy_init, },
+	{ "variscite,var-dvk-om44", var_som_om44_legacy_init, },
+	{ "variscite,var-stk-om44", var_som_om44_legacy_init, },
 #endif
 #ifdef CONFIG_SOC_AM33XX
 	{ "ti,am335x-evmsk", am335x_evmsk_legacy_init, },
-- 
1.8.0


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH 4/4] ARM: OMAP2+: Use pdata quirks for wl12xx on VAR-STK/DVK-OM44
@ 2014-04-18 15:10   ` Joachim Eastwood
  0 siblings, 0 replies; 24+ messages in thread
From: Joachim Eastwood @ 2014-04-18 15:10 UTC (permalink / raw)
  To: linux-arm-kernel

Signed-off-by: Joachim Eastwood <manabian@gmail.com>
---
 arch/arm/mach-omap2/pdata-quirks.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/arch/arm/mach-omap2/pdata-quirks.c b/arch/arm/mach-omap2/pdata-quirks.c
index c3b73351cb7a..ab94f3a87c32 100644
--- a/arch/arm/mach-omap2/pdata-quirks.c
+++ b/arch/arm/mach-omap2/pdata-quirks.c
@@ -254,6 +254,11 @@ static void __init omap4_panda_legacy_init(void)
 {
 	legacy_init_wl12xx(WL12XX_REFCLOCK_38, 0, 53);
 }
+
+static void __init var_som_om44_legacy_init(void)
+{
+	legacy_init_wl12xx(WL12XX_REFCLOCK_38, 0, 41);
+}
 #endif
 
 #if defined(CONFIG_ARCH_OMAP4) || defined(CONFIG_SOC_OMAP5)
@@ -364,6 +369,8 @@ static struct pdata_init pdata_quirks[] __initdata = {
 #ifdef CONFIG_ARCH_OMAP4
 	{ "ti,omap4-sdp", omap4_sdp_legacy_init, },
 	{ "ti,omap4-panda", omap4_panda_legacy_init, },
+	{ "variscite,var-dvk-om44", var_som_om44_legacy_init, },
+	{ "variscite,var-stk-om44", var_som_om44_legacy_init, },
 #endif
 #ifdef CONFIG_SOC_AM33XX
 	{ "ti,am335x-evmsk", am335x_evmsk_legacy_init, },
-- 
1.8.0

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* Re: [PATCH 1/4] ARM: dts: Add support for OMAP4 Variscite OM44 family
  2014-04-18 15:10   ` Joachim Eastwood
@ 2014-04-18 15:57     ` Tony Lindgren
  -1 siblings, 0 replies; 24+ messages in thread
From: Tony Lindgren @ 2014-04-18 15:57 UTC (permalink / raw)
  To: Joachim Eastwood; +Cc: bcousson, linux-arm-kernel, tomi.valkeinen, linux-omap

* Joachim Eastwood <manabian@gmail.com> [140418 08:11]:
> Add support for VAR-SOM-OM44[1] SODIMM system on module from Variscite. SoM
> features a OMAP4460, 1GB RAM, Gigabit Ethernet (LAN7500) and optional WLAN/BT.
> 
> Also add support for VAR-STK-OM44 development board from Variscite. This kit
> features a VAR-SOM-OM44 and the carrier board VAR-OM44CustomBoard[2]. The
> VAR-STK-OM44 is the same as VAR-DVK-OM44 but without the LCD display.
> 
> omap4-var-stk-om44.dts replace the old and very limited omap4-var-som.dts.
> 
> [1] http://www.variscite.com/products/system-on-module-som/cortex-a9/var-som-om44-cpu-ti-omap-4-omap4460
> [2] http://www.variscite.com/products/single-board-computers/var-om44customboard
> 
> Signed-off-by: Joachim Eastwood <manabian@gmail.com>
> ---
>  .../devicetree/bindings/arm/omap/omap.txt          |   3 +
>  .../devicetree/bindings/vendor-prefixes.txt        |   1 +
>  arch/arm/boot/dts/Makefile                         |   2 +-
>  arch/arm/boot/dts/omap4-var-om44customboard.dtsi   | 235 ++++++++++++++
>  arch/arm/boot/dts/omap4-var-som-om44.dtsi          | 343 +++++++++++++++++++++
>  arch/arm/boot/dts/omap4-var-som.dts                |  96 ------
>  arch/arm/boot/dts/omap4-var-stk-om44.dts           |  16 +
>  7 files changed, 599 insertions(+), 97 deletions(-)
>  create mode 100644 arch/arm/boot/dts/omap4-var-om44customboard.dtsi
>  create mode 100644 arch/arm/boot/dts/omap4-var-som-om44.dtsi
>  delete mode 100644 arch/arm/boot/dts/omap4-var-som.dts
>  create mode 100644 arch/arm/boot/dts/omap4-var-stk-om44.dts

Hmm don't you still need to keep omap4-var-som.dts to build just the
core SoC module without any add-on boards?

Also, you might want to use the OMAP4_CORE_IOPAD and OMAP4_WKUP_IOPAD
macros in include/dt-bindings/pinctrl/omap.h to be able to check the
registers against the TRM easier as you can use the physical register
offset listed in the TRM.

Regards,

Tony 

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [PATCH 1/4] ARM: dts: Add support for OMAP4 Variscite OM44 family
@ 2014-04-18 15:57     ` Tony Lindgren
  0 siblings, 0 replies; 24+ messages in thread
From: Tony Lindgren @ 2014-04-18 15:57 UTC (permalink / raw)
  To: linux-arm-kernel

* Joachim Eastwood <manabian@gmail.com> [140418 08:11]:
> Add support for VAR-SOM-OM44[1] SODIMM system on module from Variscite. SoM
> features a OMAP4460, 1GB RAM, Gigabit Ethernet (LAN7500) and optional WLAN/BT.
> 
> Also add support for VAR-STK-OM44 development board from Variscite. This kit
> features a VAR-SOM-OM44 and the carrier board VAR-OM44CustomBoard[2]. The
> VAR-STK-OM44 is the same as VAR-DVK-OM44 but without the LCD display.
> 
> omap4-var-stk-om44.dts replace the old and very limited omap4-var-som.dts.
> 
> [1] http://www.variscite.com/products/system-on-module-som/cortex-a9/var-som-om44-cpu-ti-omap-4-omap4460
> [2] http://www.variscite.com/products/single-board-computers/var-om44customboard
> 
> Signed-off-by: Joachim Eastwood <manabian@gmail.com>
> ---
>  .../devicetree/bindings/arm/omap/omap.txt          |   3 +
>  .../devicetree/bindings/vendor-prefixes.txt        |   1 +
>  arch/arm/boot/dts/Makefile                         |   2 +-
>  arch/arm/boot/dts/omap4-var-om44customboard.dtsi   | 235 ++++++++++++++
>  arch/arm/boot/dts/omap4-var-som-om44.dtsi          | 343 +++++++++++++++++++++
>  arch/arm/boot/dts/omap4-var-som.dts                |  96 ------
>  arch/arm/boot/dts/omap4-var-stk-om44.dts           |  16 +
>  7 files changed, 599 insertions(+), 97 deletions(-)
>  create mode 100644 arch/arm/boot/dts/omap4-var-om44customboard.dtsi
>  create mode 100644 arch/arm/boot/dts/omap4-var-som-om44.dtsi
>  delete mode 100644 arch/arm/boot/dts/omap4-var-som.dts
>  create mode 100644 arch/arm/boot/dts/omap4-var-stk-om44.dts

Hmm don't you still need to keep omap4-var-som.dts to build just the
core SoC module without any add-on boards?

Also, you might want to use the OMAP4_CORE_IOPAD and OMAP4_WKUP_IOPAD
macros in include/dt-bindings/pinctrl/omap.h to be able to check the
registers against the TRM easier as you can use the physical register
offset listed in the TRM.

Regards,

Tony 

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 1/4] ARM: dts: Add support for OMAP4 Variscite OM44 family
  2014-04-18 15:57     ` Tony Lindgren
@ 2014-04-18 16:17       ` Joachim Eastwood
  -1 siblings, 0 replies; 24+ messages in thread
From: Joachim Eastwood @ 2014-04-18 16:17 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Benoit Cousson, linux-arm-kernel, Tomi Valkeinen, linux-omap

On 18 April 2014 17:57, Tony Lindgren <tony@atomide.com> wrote:
> * Joachim Eastwood <manabian@gmail.com> [140418 08:11]:
>> Add support for VAR-SOM-OM44[1] SODIMM system on module from Variscite. SoM
>> features a OMAP4460, 1GB RAM, Gigabit Ethernet (LAN7500) and optional WLAN/BT.
>>
>> Also add support for VAR-STK-OM44 development board from Variscite. This kit
>> features a VAR-SOM-OM44 and the carrier board VAR-OM44CustomBoard[2]. The
>> VAR-STK-OM44 is the same as VAR-DVK-OM44 but without the LCD display.
>>
>> omap4-var-stk-om44.dts replace the old and very limited omap4-var-som.dts.
>>
>> [1] http://www.variscite.com/products/system-on-module-som/cortex-a9/var-som-om44-cpu-ti-omap-4-omap4460
>> [2] http://www.variscite.com/products/single-board-computers/var-om44customboard
>>
>> Signed-off-by: Joachim Eastwood <manabian@gmail.com>
>> ---
>>  .../devicetree/bindings/arm/omap/omap.txt          |   3 +
>>  .../devicetree/bindings/vendor-prefixes.txt        |   1 +
>>  arch/arm/boot/dts/Makefile                         |   2 +-
>>  arch/arm/boot/dts/omap4-var-om44customboard.dtsi   | 235 ++++++++++++++
>>  arch/arm/boot/dts/omap4-var-som-om44.dtsi          | 343 +++++++++++++++++++++
>>  arch/arm/boot/dts/omap4-var-som.dts                |  96 ------
>>  arch/arm/boot/dts/omap4-var-stk-om44.dts           |  16 +
>>  7 files changed, 599 insertions(+), 97 deletions(-)
>>  create mode 100644 arch/arm/boot/dts/omap4-var-om44customboard.dtsi
>>  create mode 100644 arch/arm/boot/dts/omap4-var-som-om44.dtsi
>>  delete mode 100644 arch/arm/boot/dts/omap4-var-som.dts
>>  create mode 100644 arch/arm/boot/dts/omap4-var-stk-om44.dts
>
> Hmm don't you still need to keep omap4-var-som.dts to build just the
> core SoC module without any add-on boards?

Since VAR-SOM-OM44 is a SODIMM module it is not possible to use
without a carrier board. Variscite's carrier board is called
OM44CustomBoard and I am in process of creating my own application
specific one so the omap4-var-som-om44 should be a dtsi-file.

> Also, you might want to use the OMAP4_CORE_IOPAD and OMAP4_WKUP_IOPAD
> macros in include/dt-bindings/pinctrl/omap.h to be able to check the
> registers against the TRM easier as you can use the physical register
> offset listed in the TRM.

I don't see any other OMAP4 using these macros. Is there a plan for a
mass conversion?
It's really a job for an automated script. But the macro are indeed
nice. That offset has bothered me more than once.

regards
Joachim Eastwood

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [PATCH 1/4] ARM: dts: Add support for OMAP4 Variscite OM44 family
@ 2014-04-18 16:17       ` Joachim Eastwood
  0 siblings, 0 replies; 24+ messages in thread
From: Joachim Eastwood @ 2014-04-18 16:17 UTC (permalink / raw)
  To: linux-arm-kernel

On 18 April 2014 17:57, Tony Lindgren <tony@atomide.com> wrote:
> * Joachim Eastwood <manabian@gmail.com> [140418 08:11]:
>> Add support for VAR-SOM-OM44[1] SODIMM system on module from Variscite. SoM
>> features a OMAP4460, 1GB RAM, Gigabit Ethernet (LAN7500) and optional WLAN/BT.
>>
>> Also add support for VAR-STK-OM44 development board from Variscite. This kit
>> features a VAR-SOM-OM44 and the carrier board VAR-OM44CustomBoard[2]. The
>> VAR-STK-OM44 is the same as VAR-DVK-OM44 but without the LCD display.
>>
>> omap4-var-stk-om44.dts replace the old and very limited omap4-var-som.dts.
>>
>> [1] http://www.variscite.com/products/system-on-module-som/cortex-a9/var-som-om44-cpu-ti-omap-4-omap4460
>> [2] http://www.variscite.com/products/single-board-computers/var-om44customboard
>>
>> Signed-off-by: Joachim Eastwood <manabian@gmail.com>
>> ---
>>  .../devicetree/bindings/arm/omap/omap.txt          |   3 +
>>  .../devicetree/bindings/vendor-prefixes.txt        |   1 +
>>  arch/arm/boot/dts/Makefile                         |   2 +-
>>  arch/arm/boot/dts/omap4-var-om44customboard.dtsi   | 235 ++++++++++++++
>>  arch/arm/boot/dts/omap4-var-som-om44.dtsi          | 343 +++++++++++++++++++++
>>  arch/arm/boot/dts/omap4-var-som.dts                |  96 ------
>>  arch/arm/boot/dts/omap4-var-stk-om44.dts           |  16 +
>>  7 files changed, 599 insertions(+), 97 deletions(-)
>>  create mode 100644 arch/arm/boot/dts/omap4-var-om44customboard.dtsi
>>  create mode 100644 arch/arm/boot/dts/omap4-var-som-om44.dtsi
>>  delete mode 100644 arch/arm/boot/dts/omap4-var-som.dts
>>  create mode 100644 arch/arm/boot/dts/omap4-var-stk-om44.dts
>
> Hmm don't you still need to keep omap4-var-som.dts to build just the
> core SoC module without any add-on boards?

Since VAR-SOM-OM44 is a SODIMM module it is not possible to use
without a carrier board. Variscite's carrier board is called
OM44CustomBoard and I am in process of creating my own application
specific one so the omap4-var-som-om44 should be a dtsi-file.

> Also, you might want to use the OMAP4_CORE_IOPAD and OMAP4_WKUP_IOPAD
> macros in include/dt-bindings/pinctrl/omap.h to be able to check the
> registers against the TRM easier as you can use the physical register
> offset listed in the TRM.

I don't see any other OMAP4 using these macros. Is there a plan for a
mass conversion?
It's really a job for an automated script. But the macro are indeed
nice. That offset has bothered me more than once.

regards
Joachim Eastwood

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 1/4] ARM: dts: Add support for OMAP4 Variscite OM44 family
  2014-04-18 16:17       ` Joachim Eastwood
@ 2014-04-18 17:29         ` Tony Lindgren
  -1 siblings, 0 replies; 24+ messages in thread
From: Tony Lindgren @ 2014-04-18 17:29 UTC (permalink / raw)
  To: Joachim Eastwood
  Cc: Benoit Cousson, linux-arm-kernel, Tomi Valkeinen, linux-omap

* Joachim Eastwood <manabian@gmail.com> [140418 09:18]:
> On 18 April 2014 17:57, Tony Lindgren <tony@atomide.com> wrote:
> > * Joachim Eastwood <manabian@gmail.com> [140418 08:11]:
> >> Add support for VAR-SOM-OM44[1] SODIMM system on module from Variscite. SoM
> >> features a OMAP4460, 1GB RAM, Gigabit Ethernet (LAN7500) and optional WLAN/BT.
> >>
> >> Also add support for VAR-STK-OM44 development board from Variscite. This kit
> >> features a VAR-SOM-OM44 and the carrier board VAR-OM44CustomBoard[2]. The
> >> VAR-STK-OM44 is the same as VAR-DVK-OM44 but without the LCD display.
> >>
> >> omap4-var-stk-om44.dts replace the old and very limited omap4-var-som.dts.
> >>
> >> [1] http://www.variscite.com/products/system-on-module-som/cortex-a9/var-som-om44-cpu-ti-omap-4-omap4460
> >> [2] http://www.variscite.com/products/single-board-computers/var-om44customboard
> >>
> >> Signed-off-by: Joachim Eastwood <manabian@gmail.com>
> >> ---
> >>  .../devicetree/bindings/arm/omap/omap.txt          |   3 +
> >>  .../devicetree/bindings/vendor-prefixes.txt        |   1 +
> >>  arch/arm/boot/dts/Makefile                         |   2 +-
> >>  arch/arm/boot/dts/omap4-var-om44customboard.dtsi   | 235 ++++++++++++++
> >>  arch/arm/boot/dts/omap4-var-som-om44.dtsi          | 343 +++++++++++++++++++++
> >>  arch/arm/boot/dts/omap4-var-som.dts                |  96 ------
> >>  arch/arm/boot/dts/omap4-var-stk-om44.dts           |  16 +
> >>  7 files changed, 599 insertions(+), 97 deletions(-)
> >>  create mode 100644 arch/arm/boot/dts/omap4-var-om44customboard.dtsi
> >>  create mode 100644 arch/arm/boot/dts/omap4-var-som-om44.dtsi
> >>  delete mode 100644 arch/arm/boot/dts/omap4-var-som.dts
> >>  create mode 100644 arch/arm/boot/dts/omap4-var-stk-om44.dts
> >
> > Hmm don't you still need to keep omap4-var-som.dts to build just the
> > core SoC module without any add-on boards?
> 
> Since VAR-SOM-OM44 is a SODIMM module it is not possible to use
> without a carrier board. Variscite's carrier board is called
> OM44CustomBoard and I am in process of creating my own application
> specific one so the omap4-var-som-om44 should be a dtsi-file.

OK, thanks for clarifying that.
 
> > Also, you might want to use the OMAP4_CORE_IOPAD and OMAP4_WKUP_IOPAD
> > macros in include/dt-bindings/pinctrl/omap.h to be able to check the
> > registers against the TRM easier as you can use the physical register
> > offset listed in the TRM.
> 
> I don't see any other OMAP4 using these macros. Is there a plan for a
> mass conversion?

Makes sense to do while doing other clean-up to avoid extra churn,
but no mass conversion planned so far.

> It's really a job for an automated script. But the macro are indeed
> nice. That offset has bothered me more than once.

Yeah and we can also add some range checking to the OMAP_IOPAD_OFFSET
macro eventually :)

I did a check script when we split omap3 pinctrl core instance into
two separate instance to deal with the large hole in the register
space. Some parts of that might be usable for a generic conversion
script too. The script I used is below for reference.

Regards,

Tony

8< --------------
#!/usr/bin/perl
use strict;


# usage: grep omap3_pmx_core *.dts* | pinctrl-check-offsets

sub check_soc($) {
	my($file) = @_;
	my $revision = 0;

	my @includes;

	open(IN, "<$file") or die("Could not read $file\n");
	while (<IN>) {
		if (!/\#include/) {
			next;
		}

		if (/\#include \"/) {
			if (!/skeleton.dtsi/ && !/omap34xx.dtsi/ && !/omap36xx.dtsi/) {
				my ($junk, $include) = split(" ", $_);
				$include =~ s/\"//g;
				push(@includes, $include);
			}
		}

		if (/omap34xx.dtsi/) {
			$revision = 3430;
			last;
		};

		if (/omap36xx.dtsi/) {
			$revision = 3630;
			last;
		};
	}
	close(IN);

	if (!$revision) {
		foreach my $include (@includes) {
			$revision = check_soc($include);
			if ($revision) {
				last;
			}
		}
	}

	return $revision;
}

sub check_file($ $) {
	my ($revision, $file) = @_;

	my $line = 0;
	my $check = 0;
	my $core2_base = 0;
	my $base_offset = 0;

	if ($revision == 3430) {
		$core2_base = 0x25d8;
	} elsif ($revision = 3630) {
		$core2_base = 0x25a0;
	}
	$base_offset = $core2_base - 0x2030;

	open(IN, "$file") or die("Could not open file $file\n");
	while(<IN>) {
		$line++;

		if (/omap3_pmx_core {/) {
			$check = 1;
		}

		if (/omap3_pmx_core2/ || /omap3_pmx_wkup/) {
			$check = 0;
		}

		if ($check && / \(PIN_/) {
			my ($offset, $rest) = split(" \\(PIN_", $_);
			$offset =~ s/\t+//g;
			$offset =~ s/ +//g;
			$offset = hex($offset);
			$rest = "PIN_".$rest;
			$rest =~ s/\)/\);/;
			$rest =~ s/\n//;

			if ($offset >= $base_offset) {
				my $fixed;
				my $val = $offset + 0x2030;

				if ($revision == 3430) {
					$fixed = sprintf("OMAP3430_CORE2_IOPAD(0x%04x, %s",
							  $val, $rest);
				} elsif ($revision = 3630) {
					$fixed = sprintf("OMAP3630_CORE2_IOPAD(0x%04x, %s",
							  $val, $rest);
				}

				printf("%s:%i: 0x%04x should be %s\n",
				       $file, $line, $offset, $fixed);
			}
		}

	}
	close(IN);
}

while (<STDIN>) {
	my($file, $junk) = split(":", $_);

	if ($file =~ /omap3.dtsi/) {
		next;
	}

	my $revision = check_soc($file);
	if (!$revision) {
		printf("WARNING: unknown revision for %s\n", $file);
	}
	check_file($revision, $file);
}

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [PATCH 1/4] ARM: dts: Add support for OMAP4 Variscite OM44 family
@ 2014-04-18 17:29         ` Tony Lindgren
  0 siblings, 0 replies; 24+ messages in thread
From: Tony Lindgren @ 2014-04-18 17:29 UTC (permalink / raw)
  To: linux-arm-kernel

* Joachim Eastwood <manabian@gmail.com> [140418 09:18]:
> On 18 April 2014 17:57, Tony Lindgren <tony@atomide.com> wrote:
> > * Joachim Eastwood <manabian@gmail.com> [140418 08:11]:
> >> Add support for VAR-SOM-OM44[1] SODIMM system on module from Variscite. SoM
> >> features a OMAP4460, 1GB RAM, Gigabit Ethernet (LAN7500) and optional WLAN/BT.
> >>
> >> Also add support for VAR-STK-OM44 development board from Variscite. This kit
> >> features a VAR-SOM-OM44 and the carrier board VAR-OM44CustomBoard[2]. The
> >> VAR-STK-OM44 is the same as VAR-DVK-OM44 but without the LCD display.
> >>
> >> omap4-var-stk-om44.dts replace the old and very limited omap4-var-som.dts.
> >>
> >> [1] http://www.variscite.com/products/system-on-module-som/cortex-a9/var-som-om44-cpu-ti-omap-4-omap4460
> >> [2] http://www.variscite.com/products/single-board-computers/var-om44customboard
> >>
> >> Signed-off-by: Joachim Eastwood <manabian@gmail.com>
> >> ---
> >>  .../devicetree/bindings/arm/omap/omap.txt          |   3 +
> >>  .../devicetree/bindings/vendor-prefixes.txt        |   1 +
> >>  arch/arm/boot/dts/Makefile                         |   2 +-
> >>  arch/arm/boot/dts/omap4-var-om44customboard.dtsi   | 235 ++++++++++++++
> >>  arch/arm/boot/dts/omap4-var-som-om44.dtsi          | 343 +++++++++++++++++++++
> >>  arch/arm/boot/dts/omap4-var-som.dts                |  96 ------
> >>  arch/arm/boot/dts/omap4-var-stk-om44.dts           |  16 +
> >>  7 files changed, 599 insertions(+), 97 deletions(-)
> >>  create mode 100644 arch/arm/boot/dts/omap4-var-om44customboard.dtsi
> >>  create mode 100644 arch/arm/boot/dts/omap4-var-som-om44.dtsi
> >>  delete mode 100644 arch/arm/boot/dts/omap4-var-som.dts
> >>  create mode 100644 arch/arm/boot/dts/omap4-var-stk-om44.dts
> >
> > Hmm don't you still need to keep omap4-var-som.dts to build just the
> > core SoC module without any add-on boards?
> 
> Since VAR-SOM-OM44 is a SODIMM module it is not possible to use
> without a carrier board. Variscite's carrier board is called
> OM44CustomBoard and I am in process of creating my own application
> specific one so the omap4-var-som-om44 should be a dtsi-file.

OK, thanks for clarifying that.
 
> > Also, you might want to use the OMAP4_CORE_IOPAD and OMAP4_WKUP_IOPAD
> > macros in include/dt-bindings/pinctrl/omap.h to be able to check the
> > registers against the TRM easier as you can use the physical register
> > offset listed in the TRM.
> 
> I don't see any other OMAP4 using these macros. Is there a plan for a
> mass conversion?

Makes sense to do while doing other clean-up to avoid extra churn,
but no mass conversion planned so far.

> It's really a job for an automated script. But the macro are indeed
> nice. That offset has bothered me more than once.

Yeah and we can also add some range checking to the OMAP_IOPAD_OFFSET
macro eventually :)

I did a check script when we split omap3 pinctrl core instance into
two separate instance to deal with the large hole in the register
space. Some parts of that might be usable for a generic conversion
script too. The script I used is below for reference.

Regards,

Tony

8< --------------
#!/usr/bin/perl
use strict;


# usage: grep omap3_pmx_core *.dts* | pinctrl-check-offsets

sub check_soc($) {
	my($file) = @_;
	my $revision = 0;

	my @includes;

	open(IN, "<$file") or die("Could not read $file\n");
	while (<IN>) {
		if (!/\#include/) {
			next;
		}

		if (/\#include \"/) {
			if (!/skeleton.dtsi/ && !/omap34xx.dtsi/ && !/omap36xx.dtsi/) {
				my ($junk, $include) = split(" ", $_);
				$include =~ s/\"//g;
				push(@includes, $include);
			}
		}

		if (/omap34xx.dtsi/) {
			$revision = 3430;
			last;
		};

		if (/omap36xx.dtsi/) {
			$revision = 3630;
			last;
		};
	}
	close(IN);

	if (!$revision) {
		foreach my $include (@includes) {
			$revision = check_soc($include);
			if ($revision) {
				last;
			}
		}
	}

	return $revision;
}

sub check_file($ $) {
	my ($revision, $file) = @_;

	my $line = 0;
	my $check = 0;
	my $core2_base = 0;
	my $base_offset = 0;

	if ($revision == 3430) {
		$core2_base = 0x25d8;
	} elsif ($revision = 3630) {
		$core2_base = 0x25a0;
	}
	$base_offset = $core2_base - 0x2030;

	open(IN, "$file") or die("Could not open file $file\n");
	while(<IN>) {
		$line++;

		if (/omap3_pmx_core {/) {
			$check = 1;
		}

		if (/omap3_pmx_core2/ || /omap3_pmx_wkup/) {
			$check = 0;
		}

		if ($check && / \(PIN_/) {
			my ($offset, $rest) = split(" \\(PIN_", $_);
			$offset =~ s/\t+//g;
			$offset =~ s/ +//g;
			$offset = hex($offset);
			$rest = "PIN_".$rest;
			$rest =~ s/\)/\);/;
			$rest =~ s/\n//;

			if ($offset >= $base_offset) {
				my $fixed;
				my $val = $offset + 0x2030;

				if ($revision == 3430) {
					$fixed = sprintf("OMAP3430_CORE2_IOPAD(0x%04x, %s",
							  $val, $rest);
				} elsif ($revision = 3630) {
					$fixed = sprintf("OMAP3630_CORE2_IOPAD(0x%04x, %s",
							  $val, $rest);
				}

				printf("%s:%i: 0x%04x should be %s\n",
				       $file, $line, $offset, $fixed);
			}
		}

	}
	close(IN);
}

while (<STDIN>) {
	my($file, $junk) = split(":", $_);

	if ($file =~ /omap3.dtsi/) {
		next;
	}

	my $revision = check_soc($file);
	if (!$revision) {
		printf("WARNING: unknown revision for %s\n", $file);
	}
	check_file($revision, $file);
}

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 1/4] ARM: dts: Add support for OMAP4 Variscite OM44 family
  2014-04-18 17:29         ` Tony Lindgren
@ 2014-04-18 18:03           ` Joachim Eastwood
  -1 siblings, 0 replies; 24+ messages in thread
From: Joachim Eastwood @ 2014-04-18 18:03 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Benoit Cousson, linux-arm-kernel, Tomi Valkeinen, linux-omap

On 18 April 2014 19:29, Tony Lindgren <tony@atomide.com> wrote:
> * Joachim Eastwood <manabian@gmail.com> [140418 09:18]:
>> On 18 April 2014 17:57, Tony Lindgren <tony@atomide.com> wrote:
>> > * Joachim Eastwood <manabian@gmail.com> [140418 08:11]:
>> >> Add support for VAR-SOM-OM44[1] SODIMM system on module from Variscite. SoM
>> >> features a OMAP4460, 1GB RAM, Gigabit Ethernet (LAN7500) and optional WLAN/BT.
>> >>
>> >> Also add support for VAR-STK-OM44 development board from Variscite. This kit
>> >> features a VAR-SOM-OM44 and the carrier board VAR-OM44CustomBoard[2]. The
>> >> VAR-STK-OM44 is the same as VAR-DVK-OM44 but without the LCD display.
>> >>
>> >> omap4-var-stk-om44.dts replace the old and very limited omap4-var-som.dts.
>> >>
>> >> [1] http://www.variscite.com/products/system-on-module-som/cortex-a9/var-som-om44-cpu-ti-omap-4-omap4460
>> >> [2] http://www.variscite.com/products/single-board-computers/var-om44customboard
>> >>
>> >> Signed-off-by: Joachim Eastwood <manabian@gmail.com>
>> >> ---
>> >>  .../devicetree/bindings/arm/omap/omap.txt          |   3 +
>> >>  .../devicetree/bindings/vendor-prefixes.txt        |   1 +
>> >>  arch/arm/boot/dts/Makefile                         |   2 +-
>> >>  arch/arm/boot/dts/omap4-var-om44customboard.dtsi   | 235 ++++++++++++++
>> >>  arch/arm/boot/dts/omap4-var-som-om44.dtsi          | 343 +++++++++++++++++++++
>> >>  arch/arm/boot/dts/omap4-var-som.dts                |  96 ------
>> >>  arch/arm/boot/dts/omap4-var-stk-om44.dts           |  16 +
>> >>  7 files changed, 599 insertions(+), 97 deletions(-)
>> >>  create mode 100644 arch/arm/boot/dts/omap4-var-om44customboard.dtsi
>> >>  create mode 100644 arch/arm/boot/dts/omap4-var-som-om44.dtsi
>> >>  delete mode 100644 arch/arm/boot/dts/omap4-var-som.dts
>> >>  create mode 100644 arch/arm/boot/dts/omap4-var-stk-om44.dts
>> >
>> > Hmm don't you still need to keep omap4-var-som.dts to build just the
>> > core SoC module without any add-on boards?
>>
>> Since VAR-SOM-OM44 is a SODIMM module it is not possible to use
>> without a carrier board. Variscite's carrier board is called
>> OM44CustomBoard and I am in process of creating my own application
>> specific one so the omap4-var-som-om44 should be a dtsi-file.
>
> OK, thanks for clarifying that.
>
>> > Also, you might want to use the OMAP4_CORE_IOPAD and OMAP4_WKUP_IOPAD
>> > macros in include/dt-bindings/pinctrl/omap.h to be able to check the
>> > registers against the TRM easier as you can use the physical register
>> > offset listed in the TRM.
>>
>> I don't see any other OMAP4 using these macros. Is there a plan for a
>> mass conversion?
>
> Makes sense to do while doing other clean-up to avoid extra churn,
> but no mass conversion planned so far.
>
>> It's really a job for an automated script. But the macro are indeed
>> nice. That offset has bothered me more than once.
>
> Yeah and we can also add some range checking to the OMAP_IOPAD_OFFSET
> macro eventually :)

I see.

> I did a check script when we split omap3 pinctrl core instance into
> two separate instance to deal with the large hole in the register
> space. Some parts of that might be usable for a generic conversion
> script too. The script I used is below for reference.

I hacked up a short awk-script for the job. So I'll change to IOPAD
macro's in the next version.

My script for reference :)
#!/bin/gawk -f
/omap4_pmx_core/ { pmx = "CORE" }
/omap4_pmx_wkup/ { pmx = "WKUP" }
/0x[0-9a-f]{1,3} \(PIN/ {
offset = sprintf("OMAP4_%s_IOPAD(0x%03x, ", pmx, strtonum($1) + 64)
sub(/0x[0-9a-f]{1,3} \(/, offset, $0)
print $0
next
}
{ print $0 }

I'll wait a bit with v2 to see if there are any other comments. Would
be nice to get clarification on the display bindings also.

regards
Joachim Eastwood

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [PATCH 1/4] ARM: dts: Add support for OMAP4 Variscite OM44 family
@ 2014-04-18 18:03           ` Joachim Eastwood
  0 siblings, 0 replies; 24+ messages in thread
From: Joachim Eastwood @ 2014-04-18 18:03 UTC (permalink / raw)
  To: linux-arm-kernel

On 18 April 2014 19:29, Tony Lindgren <tony@atomide.com> wrote:
> * Joachim Eastwood <manabian@gmail.com> [140418 09:18]:
>> On 18 April 2014 17:57, Tony Lindgren <tony@atomide.com> wrote:
>> > * Joachim Eastwood <manabian@gmail.com> [140418 08:11]:
>> >> Add support for VAR-SOM-OM44[1] SODIMM system on module from Variscite. SoM
>> >> features a OMAP4460, 1GB RAM, Gigabit Ethernet (LAN7500) and optional WLAN/BT.
>> >>
>> >> Also add support for VAR-STK-OM44 development board from Variscite. This kit
>> >> features a VAR-SOM-OM44 and the carrier board VAR-OM44CustomBoard[2]. The
>> >> VAR-STK-OM44 is the same as VAR-DVK-OM44 but without the LCD display.
>> >>
>> >> omap4-var-stk-om44.dts replace the old and very limited omap4-var-som.dts.
>> >>
>> >> [1] http://www.variscite.com/products/system-on-module-som/cortex-a9/var-som-om44-cpu-ti-omap-4-omap4460
>> >> [2] http://www.variscite.com/products/single-board-computers/var-om44customboard
>> >>
>> >> Signed-off-by: Joachim Eastwood <manabian@gmail.com>
>> >> ---
>> >>  .../devicetree/bindings/arm/omap/omap.txt          |   3 +
>> >>  .../devicetree/bindings/vendor-prefixes.txt        |   1 +
>> >>  arch/arm/boot/dts/Makefile                         |   2 +-
>> >>  arch/arm/boot/dts/omap4-var-om44customboard.dtsi   | 235 ++++++++++++++
>> >>  arch/arm/boot/dts/omap4-var-som-om44.dtsi          | 343 +++++++++++++++++++++
>> >>  arch/arm/boot/dts/omap4-var-som.dts                |  96 ------
>> >>  arch/arm/boot/dts/omap4-var-stk-om44.dts           |  16 +
>> >>  7 files changed, 599 insertions(+), 97 deletions(-)
>> >>  create mode 100644 arch/arm/boot/dts/omap4-var-om44customboard.dtsi
>> >>  create mode 100644 arch/arm/boot/dts/omap4-var-som-om44.dtsi
>> >>  delete mode 100644 arch/arm/boot/dts/omap4-var-som.dts
>> >>  create mode 100644 arch/arm/boot/dts/omap4-var-stk-om44.dts
>> >
>> > Hmm don't you still need to keep omap4-var-som.dts to build just the
>> > core SoC module without any add-on boards?
>>
>> Since VAR-SOM-OM44 is a SODIMM module it is not possible to use
>> without a carrier board. Variscite's carrier board is called
>> OM44CustomBoard and I am in process of creating my own application
>> specific one so the omap4-var-som-om44 should be a dtsi-file.
>
> OK, thanks for clarifying that.
>
>> > Also, you might want to use the OMAP4_CORE_IOPAD and OMAP4_WKUP_IOPAD
>> > macros in include/dt-bindings/pinctrl/omap.h to be able to check the
>> > registers against the TRM easier as you can use the physical register
>> > offset listed in the TRM.
>>
>> I don't see any other OMAP4 using these macros. Is there a plan for a
>> mass conversion?
>
> Makes sense to do while doing other clean-up to avoid extra churn,
> but no mass conversion planned so far.
>
>> It's really a job for an automated script. But the macro are indeed
>> nice. That offset has bothered me more than once.
>
> Yeah and we can also add some range checking to the OMAP_IOPAD_OFFSET
> macro eventually :)

I see.

> I did a check script when we split omap3 pinctrl core instance into
> two separate instance to deal with the large hole in the register
> space. Some parts of that might be usable for a generic conversion
> script too. The script I used is below for reference.

I hacked up a short awk-script for the job. So I'll change to IOPAD
macro's in the next version.

My script for reference :)
#!/bin/gawk -f
/omap4_pmx_core/ { pmx = "CORE" }
/omap4_pmx_wkup/ { pmx = "WKUP" }
/0x[0-9a-f]{1,3} \(PIN/ {
offset = sprintf("OMAP4_%s_IOPAD(0x%03x, ", pmx, strtonum($1) + 64)
sub(/0x[0-9a-f]{1,3} \(/, offset, $0)
print $0
next
}
{ print $0 }

I'll wait a bit with v2 to see if there are any other comments. Would
be nice to get clarification on the display bindings also.

regards
Joachim Eastwood

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 1/4] ARM: dts: Add support for OMAP4 Variscite OM44 family
  2014-04-18 18:03           ` Joachim Eastwood
@ 2014-04-18 22:44             ` Tony Lindgren
  -1 siblings, 0 replies; 24+ messages in thread
From: Tony Lindgren @ 2014-04-18 22:44 UTC (permalink / raw)
  To: Joachim Eastwood
  Cc: Benoit Cousson, linux-arm-kernel, Tomi Valkeinen, linux-omap

* Joachim Eastwood <manabian@gmail.com> [140418 11:04]:
> 
> > I did a check script when we split omap3 pinctrl core instance into
> > two separate instance to deal with the large hole in the register
> > space. Some parts of that might be usable for a generic conversion
> > script too. The script I used is below for reference.
> 
> I hacked up a short awk-script for the job. So I'll change to IOPAD
> macro's in the next version.
> 
> My script for reference :)
> #!/bin/gawk -f
> /omap4_pmx_core/ { pmx = "CORE" }
> /omap4_pmx_wkup/ { pmx = "WKUP" }
> /0x[0-9a-f]{1,3} \(PIN/ {
> offset = sprintf("OMAP4_%s_IOPAD(0x%03x, ", pmx, strtonum($1) + 64)
> sub(/0x[0-9a-f]{1,3} \(/, offset, $0)
> print $0
> next
> }
> { print $0 }

Cool script :)

Tony

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [PATCH 1/4] ARM: dts: Add support for OMAP4 Variscite OM44 family
@ 2014-04-18 22:44             ` Tony Lindgren
  0 siblings, 0 replies; 24+ messages in thread
From: Tony Lindgren @ 2014-04-18 22:44 UTC (permalink / raw)
  To: linux-arm-kernel

* Joachim Eastwood <manabian@gmail.com> [140418 11:04]:
> 
> > I did a check script when we split omap3 pinctrl core instance into
> > two separate instance to deal with the large hole in the register
> > space. Some parts of that might be usable for a generic conversion
> > script too. The script I used is below for reference.
> 
> I hacked up a short awk-script for the job. So I'll change to IOPAD
> macro's in the next version.
> 
> My script for reference :)
> #!/bin/gawk -f
> /omap4_pmx_core/ { pmx = "CORE" }
> /omap4_pmx_wkup/ { pmx = "WKUP" }
> /0x[0-9a-f]{1,3} \(PIN/ {
> offset = sprintf("OMAP4_%s_IOPAD(0x%03x, ", pmx, strtonum($1) + 64)
> sub(/0x[0-9a-f]{1,3} \(/, offset, $0)
> print $0
> next
> }
> { print $0 }

Cool script :)

Tony

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 1/4] ARM: dts: Add support for OMAP4 Variscite OM44 family
  2014-04-18 15:10   ` Joachim Eastwood
@ 2014-04-30  1:24     ` Joachim Eastwood
  -1 siblings, 0 replies; 24+ messages in thread
From: Joachim Eastwood @ 2014-04-30  1:24 UTC (permalink / raw)
  To: Tomi Valkeinen
  Cc: linux-arm-kernel, linux-omap, Joachim Eastwood, Tony Lindgren,
	Benoit Cousson

On 18 April 2014 17:10, Joachim Eastwood <manabian@gmail.com> wrote:
> Add support for VAR-SOM-OM44[1] SODIMM system on module from Variscite. SoM
> features a OMAP4460, 1GB RAM, Gigabit Ethernet (LAN7500) and optional WLAN/BT.
>
> Also add support for VAR-STK-OM44 development board from Variscite. This kit
> features a VAR-SOM-OM44 and the carrier board VAR-OM44CustomBoard[2]. The
> VAR-STK-OM44 is the same as VAR-DVK-OM44 but without the LCD display.
>
> omap4-var-stk-om44.dts replace the old and very limited omap4-var-som.dts.
>
> [1] http://www.variscite.com/products/system-on-module-som/cortex-a9/var-som-om44-cpu-ti-omap-4-omap4460
> [2] http://www.variscite.com/products/single-board-computers/var-om44customboard
>
> Signed-off-by: Joachim Eastwood <manabian@gmail.com>
> ---

Tomi,

Do you plan to push the patch that add hpd-gpios to the
"hdmi-connector" for 3.16? (nodes for my board below)
https://patchwork.kernel.org/patch/4006021/

Also in the patch set I am using your DT bindings for "panel-dpi". See
patch [2 of 4] for nodes.
https://patchwork.kernel.org/patch/4047241/

Will this patch be upstream in 3.16?

As I am about to send out a new version of this patch set it would be
nice to know if I need to split out the display stuff, for later
inclusion, or if it can go in as it is.

regards
Joachim Eastwood

> +       hdmi0: connector@0 {
> +               compatible = "hdmi-connector";
> +               pinctrl-names = "default";
> +               pinctrl-0 = <&hdmi_hpd_pins>;
> +               label = "hdmi";
> +               type = "a";
> +
> +               hpd-gpios = <&gpio2 31 GPIO_ACTIVE_HIGH>; /* gpio_63 */
> +
> +               port {
> +                       hdmi_connector_in: endpoint {
> +                               remote-endpoint = <&hdmi_out>;
> +                       };
> +               };
> +       };
> +};

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [PATCH 1/4] ARM: dts: Add support for OMAP4 Variscite OM44 family
@ 2014-04-30  1:24     ` Joachim Eastwood
  0 siblings, 0 replies; 24+ messages in thread
From: Joachim Eastwood @ 2014-04-30  1:24 UTC (permalink / raw)
  To: linux-arm-kernel

On 18 April 2014 17:10, Joachim Eastwood <manabian@gmail.com> wrote:
> Add support for VAR-SOM-OM44[1] SODIMM system on module from Variscite. SoM
> features a OMAP4460, 1GB RAM, Gigabit Ethernet (LAN7500) and optional WLAN/BT.
>
> Also add support for VAR-STK-OM44 development board from Variscite. This kit
> features a VAR-SOM-OM44 and the carrier board VAR-OM44CustomBoard[2]. The
> VAR-STK-OM44 is the same as VAR-DVK-OM44 but without the LCD display.
>
> omap4-var-stk-om44.dts replace the old and very limited omap4-var-som.dts.
>
> [1] http://www.variscite.com/products/system-on-module-som/cortex-a9/var-som-om44-cpu-ti-omap-4-omap4460
> [2] http://www.variscite.com/products/single-board-computers/var-om44customboard
>
> Signed-off-by: Joachim Eastwood <manabian@gmail.com>
> ---

Tomi,

Do you plan to push the patch that add hpd-gpios to the
"hdmi-connector" for 3.16? (nodes for my board below)
https://patchwork.kernel.org/patch/4006021/

Also in the patch set I am using your DT bindings for "panel-dpi". See
patch [2 of 4] for nodes.
https://patchwork.kernel.org/patch/4047241/

Will this patch be upstream in 3.16?

As I am about to send out a new version of this patch set it would be
nice to know if I need to split out the display stuff, for later
inclusion, or if it can go in as it is.

regards
Joachim Eastwood

> +       hdmi0: connector at 0 {
> +               compatible = "hdmi-connector";
> +               pinctrl-names = "default";
> +               pinctrl-0 = <&hdmi_hpd_pins>;
> +               label = "hdmi";
> +               type = "a";
> +
> +               hpd-gpios = <&gpio2 31 GPIO_ACTIVE_HIGH>; /* gpio_63 */
> +
> +               port {
> +                       hdmi_connector_in: endpoint {
> +                               remote-endpoint = <&hdmi_out>;
> +                       };
> +               };
> +       };
> +};

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 1/4] ARM: dts: Add support for OMAP4 Variscite OM44 family
  2014-04-30  1:24     ` Joachim Eastwood
@ 2014-04-30  6:19       ` Tomi Valkeinen
  -1 siblings, 0 replies; 24+ messages in thread
From: Tomi Valkeinen @ 2014-04-30  6:19 UTC (permalink / raw)
  To: Joachim Eastwood
  Cc: linux-arm-kernel, linux-omap, Tony Lindgren, Benoit Cousson

[-- Attachment #1: Type: text/plain, Size: 508 bytes --]

On 30/04/14 04:24, Joachim Eastwood wrote:

> Do you plan to push the patch that add hpd-gpios to the
> "hdmi-connector" for 3.16? (nodes for my board below)
> https://patchwork.kernel.org/patch/4006021/
> 
> Also in the patch set I am using your DT bindings for "panel-dpi". See
> patch [2 of 4] for nodes.
> https://patchwork.kernel.org/patch/4047241/
> 
> Will this patch be upstream in 3.16?

Yes, they are both planned to be in 3.16. The patches are still under
work, though.

 Tomi



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [PATCH 1/4] ARM: dts: Add support for OMAP4 Variscite OM44 family
@ 2014-04-30  6:19       ` Tomi Valkeinen
  0 siblings, 0 replies; 24+ messages in thread
From: Tomi Valkeinen @ 2014-04-30  6:19 UTC (permalink / raw)
  To: linux-arm-kernel

On 30/04/14 04:24, Joachim Eastwood wrote:

> Do you plan to push the patch that add hpd-gpios to the
> "hdmi-connector" for 3.16? (nodes for my board below)
> https://patchwork.kernel.org/patch/4006021/
> 
> Also in the patch set I am using your DT bindings for "panel-dpi". See
> patch [2 of 4] for nodes.
> https://patchwork.kernel.org/patch/4047241/
> 
> Will this patch be upstream in 3.16?

Yes, they are both planned to be in 3.16. The patches are still under
work, though.

 Tomi


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140430/bbd25bfc/attachment.sig>

^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2014-04-30  6:20 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-18 15:10 [PATCH 0/4] Support for Variscite OM44 modules and boards Joachim Eastwood
2014-04-18 15:10 ` Joachim Eastwood
2014-04-18 15:10 ` [PATCH 1/4] ARM: dts: Add support for OMAP4 Variscite OM44 family Joachim Eastwood
2014-04-18 15:10   ` Joachim Eastwood
2014-04-18 15:57   ` Tony Lindgren
2014-04-18 15:57     ` Tony Lindgren
2014-04-18 16:17     ` Joachim Eastwood
2014-04-18 16:17       ` Joachim Eastwood
2014-04-18 17:29       ` Tony Lindgren
2014-04-18 17:29         ` Tony Lindgren
2014-04-18 18:03         ` Joachim Eastwood
2014-04-18 18:03           ` Joachim Eastwood
2014-04-18 22:44           ` Tony Lindgren
2014-04-18 22:44             ` Tony Lindgren
2014-04-30  1:24   ` Joachim Eastwood
2014-04-30  1:24     ` Joachim Eastwood
2014-04-30  6:19     ` Tomi Valkeinen
2014-04-30  6:19       ` Tomi Valkeinen
2014-04-18 15:10 ` [PATCH 2/4] ARM: dts: Add support for OMAP4 VAR-DVK-OM44 Joachim Eastwood
2014-04-18 15:10   ` Joachim Eastwood
2014-04-18 15:10 ` [PATCH 3/4] ARM: dts: Add VAR-SOM-OM44 WLAN nodes Joachim Eastwood
2014-04-18 15:10   ` Joachim Eastwood
2014-04-18 15:10 ` [PATCH 4/4] ARM: OMAP2+: Use pdata quirks for wl12xx on VAR-STK/DVK-OM44 Joachim Eastwood
2014-04-18 15:10   ` Joachim Eastwood

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.