Re: [U-Boot] [PATCH] ARM: tegra: Add support for norrin board

2014-07-01 Thread Allen Martin
On Mon, Jun 30, 2014 at 02:32:20PM -0700, Stephen Warren wrote:
 On 06/30/2014 02:53 PM, Allen Martin wrote:
  Norrin (PM370) is a Tegra124 clamshell board that is very similar to
  venice2, but it has a different panel, the sdcard cd sense is flipped,
  and it has a different revision of the AS3722 PMIC.  Reuse the venice2
  config with a norrin dtb.  This board is also refered to as nyan in
  the ChromeOS trees.
 
 Isn't the pinmux different too? I think this patch should contain
 board/nvidia/norrin/pinmux-config-norrin.h shouldn't it? That in turn
 would mean adding Norrin support to tegra-pinmux-scripts. Of course, if
 they really do have 100% identical pinmux, then there's no issue. I'm
 skeptical though.

AFAIK they really do have identical pinmux, I'll double check the
pinmux spreadsheet to make sure.

There's another unintended side effect of reusing the venice2 board
this way that I discovered after posting this.  It causes
CONFIG_SYS_BOARD to be set to venice2 still, which causes the
board_name environment variable to be set to venice2, which causes
boot.scr to look for a venice2 dtb.

It may be cleaner to make norrin a proper board, and just have it
#include the vencie2 pinmux.

-Allen

nvpublic
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] ARM: tegra: Add support for norrin board

2014-06-30 Thread Allen Martin
Norrin (PM370) is a Tegra124 clamshell board that is very similar to
venice2, but it has a different panel, the sdcard cd sense is flipped,
and it has a different revision of the AS3722 PMIC.  Reuse the venice2
config with a norrin dtb.  This board is also refered to as nyan in
the ChromeOS trees.

Signed-off-by: Allen Martin amar...@nvidia.com
---
 arch/arm/dts/Makefile  |  3 +-
 arch/arm/dts/tegra124-norrin.dts   | 91 ++
 board/nvidia/venice2/as3722_init.h |  2 +-
 boards.cfg |  1 +
 include/configs/venice2.h  |  9 
 5 files changed, 104 insertions(+), 2 deletions(-)
 create mode 100644 arch/arm/dts/tegra124-norrin.dts

diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index 55546152b94b..414f206cb6f0 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -23,7 +23,8 @@ dtb-$(CONFIG_TEGRA) += tegra20-harmony.dtb \
tegra30-tec-ng.dtb \
tegra114-dalmore.dtb \
tegra124-jetson-tk1.dtb \
-   tegra124-venice2.dtb
+   tegra124-venice2.dtb \
+   tegra124-norrin.dtb
 dtb-$(CONFIG_ZYNQ) += zynq-zc702.dtb \
zynq-zc706.dtb \
zynq-zed.dtb \
diff --git a/arch/arm/dts/tegra124-norrin.dts b/arch/arm/dts/tegra124-norrin.dts
new file mode 100644
index ..fdf000cf75ec
--- /dev/null
+++ b/arch/arm/dts/tegra124-norrin.dts
@@ -0,0 +1,91 @@
+/dts-v1/;
+
+#include tegra124.dtsi
+
+/ {
+   model = NVIDIA Norrin;
+   compatible = nvidia,norrin, nvidia,tegra124;
+
+   aliases {
+   i2c0 = /i2c@7000d000;
+   i2c1 = /i2c@7000c000;
+   i2c2 = /i2c@7000c400;
+   i2c3 = /i2c@7000c500;
+   i2c4 = /i2c@7000c700;
+   i2c5 = /i2c@7000d100;
+   sdhci0 = /sdhci@700b0600;
+   sdhci1 = /sdhci@700b0400;
+   spi0 = /spi@7000d400;
+   spi1 = /spi@7000da00;
+   usb0 = /usb@7d00;
+   usb1 = /usb@7d008000;
+   };
+
+   memory {
+   device_type = memory;
+   reg = 0x8000 0x8000;
+   };
+
+   i2c@7000c000 {
+   status = okay;
+   clock-frequency = 10;
+   };
+
+   i2c@7000c400 {
+   status = okay;
+   clock-frequency = 10;
+   };
+
+   i2c@7000c500 {
+   status = okay;
+   clock-frequency = 10;
+   };
+
+   i2c@7000c700 {
+   status = okay;
+   clock-frequency = 10;
+   };
+
+   i2c@7000d000 {
+   status = okay;
+   clock-frequency = 40;
+   };
+
+   i2c@7000d100 {
+   status = okay;
+   clock-frequency = 40;
+   };
+
+   spi@7000d400 {
+   status = okay;
+   spi-max-frequency = 2500;
+   };
+
+   spi@7000da00 {
+   status = okay;
+   spi-max-frequency = 2500;
+   };
+
+   sdhci@700b0400 {
+   status = okay;
+   cd-gpios = gpio 170 1; /* gpio PV2 */
+   power-gpios = gpio 136 0; /* gpio PR0 */
+   bus-width = 4;
+   };
+
+   sdhci@700b0600 {
+   status = okay;
+   bus-width = 8;
+   };
+
+   usb@7d00 {
+   status = okay;
+   dr_mode = otg;
+   nvidia,vbus-gpio = gpio 108 0; /* gpio PN4, USB_VBUS_EN0 */
+   };
+
+   usb@7d008000 {
+   status = okay;
+   nvidia,vbus-gpio = gpio 109 0; /* gpio PN5, USB_VBUS_EN1 */
+   };
+};
diff --git a/board/nvidia/venice2/as3722_init.h 
b/board/nvidia/venice2/as3722_init.h
index a7b24039f6aa..7c80ef09387b 100644
--- a/board/nvidia/venice2/as3722_init.h
+++ b/board/nvidia/venice2/as3722_init.h
@@ -18,7 +18,7 @@
 #define AS3722_LDO6VOLTAGE_REG 0x16/* VDD_SDMMC */
 #define AS3722_LDCONTROL_REG   0x4E
 
-#ifdef CONFIG_BOARD_JETSON_TK1
+#if defined(CONFIG_BOARD_JETSON_TK1) || defined(CONFIG_BOARD_NORRIN)
 #define AS3722_SD0VOLTAGE_DATA (0x3C00 | AS3722_SD0VOLTAGE_REG)
 #else
 #define AS3722_SD0VOLTAGE_DATA (0x2800 | AS3722_SD0VOLTAGE_REG)
diff --git a/boards.cfg b/boards.cfg
index 5a85fad48095..3950688ba30b 100644
--- a/boards.cfg
+++ b/boards.cfg
@@ -395,6 +395,7 @@ Active  arm armv7  zynqxilinx   
   zynq
 Active  arm armv7:arm720t  tegra114nvidia  dalmore 
dalmore   - 

Tom Warren twar...@nvidia.com
 Active  arm armv7:arm720t  tegra124nvidia  jetson-tk1  
jetson-tk1jetson-tk1:BOARD_JETSON_TK1=  

Stephen Warren swar...@nvidia.com
 Active  

Re: [U-Boot] [PATCH] ARM: tegra: Add support for norrin board

2014-06-30 Thread Stephen Warren
On 06/30/2014 02:53 PM, Allen Martin wrote:
 Norrin (PM370) is a Tegra124 clamshell board that is very similar to
 venice2, but it has a different panel, the sdcard cd sense is flipped,
 and it has a different revision of the AS3722 PMIC.  Reuse the venice2
 config with a norrin dtb.  This board is also refered to as nyan in
 the ChromeOS trees.

Isn't the pinmux different too? I think this patch should contain
board/nvidia/norrin/pinmux-config-norrin.h shouldn't it? That in turn
would mean adding Norrin support to tegra-pinmux-scripts. Of course, if
they really do have 100% identical pinmux, then there's no issue. I'm
skeptical though.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot