Re: [PATCH 1/4] ARM: dts: Add support for OMAP4 Variscite OM44 family

2014-04-30 Thread Tomi Valkeinen
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




signature.asc
Description: OpenPGP digital signature


Re: [PATCH 1/4] ARM: dts: Add support for OMAP4 Variscite OM44 family

2014-04-29 Thread Joachim Eastwood
On 18 April 2014 17:10, Joachim Eastwood manab...@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 manab...@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;
 +   };
 +   };
 +   };
 +};
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 1/4] ARM: dts: Add support for OMAP4 Variscite OM44 family

2014-04-18 Thread 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 manab...@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
 toshibaToshiba Corporation
 toumaz Toumaz
 v3 V3 Semiconductor
+variscite  Variscite Ltd.
 viaVIA 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 ..7c8e383b2cd0
--- /dev/null
+++ b/arch/arm/boot/dts/omap4-var-om44customboard.dtsi
@@ -0,0 +1,235 @@
+/*
+ * Copyright (C) 2014 Joachim Eastwood manab...@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;

Re: [PATCH 1/4] ARM: dts: Add support for OMAP4 Variscite OM44 family

2014-04-18 Thread Tony Lindgren
* Joachim Eastwood manab...@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 manab...@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 
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 1/4] ARM: dts: Add support for OMAP4 Variscite OM44 family

2014-04-18 Thread Joachim Eastwood
On 18 April 2014 17:57, Tony Lindgren t...@atomide.com wrote:
 * Joachim Eastwood manab...@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 manab...@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
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 1/4] ARM: dts: Add support for OMAP4 Variscite OM44 family

2014-04-18 Thread Tony Lindgren
* Joachim Eastwood manab...@gmail.com [140418 09:18]:
 On 18 April 2014 17:57, Tony Lindgren t...@atomide.com wrote:
  * Joachim Eastwood manab...@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 manab...@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;
  

Re: [PATCH 1/4] ARM: dts: Add support for OMAP4 Variscite OM44 family

2014-04-18 Thread Joachim Eastwood
On 18 April 2014 19:29, Tony Lindgren t...@atomide.com wrote:
 * Joachim Eastwood manab...@gmail.com [140418 09:18]:
 On 18 April 2014 17:57, Tony Lindgren t...@atomide.com wrote:
  * Joachim Eastwood manab...@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 manab...@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
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html