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

2014-08-05 Thread Stephen Warren

On 08/04/2014 03:57 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 and wp sense are
flipped, and it has a different revision of the AS3722 PMIC.  This
board is also refered to as nyan in the ChromeOS trees.



diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index e385eda94cdf..f4e0f5a42c14 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -716,6 +716,9 @@ config TARGET_DALMORE
  config TARGET_JETSON_TK1
bool Support jetson-tk1

+config TARGET_NORRIN
+   bool Support norrin
+


Note that this patch is going to conflict with:
http://patchwork.ozlabs.org/patch/376287/
tegra: kconfig: move board select menu and common settings

... since that moves all the Tegra board options into sub-menus. At some 
point, this or that patch will need to be rebased on the other, or 
merged with each-other



@@ -912,6 +915,7 @@ source board/nvidia/cardhu/Kconfig
  source board/nvidia/dalmore/Kconfig
  source board/nvidia/harmony/Kconfig
  source board/nvidia/jetson-tk1/Kconfig
+source board/nvidia/norrin/Kconfig


Indentation looks wrong there.


diff --git a/board/nvidia/venice2/as3722_init.h 
b/board/nvidia/venice2/as3722_init.h



-#ifdef CONFIG_BOARD_JETSON_TK1
+#if defined(CONFIG_BOARD_JETSON_TK1) || defined(CONFIG_BOARD_NORRIN)


Let's use CONFIG_TARGET_NORRIN directly here. This is the variable 
that's set up by Kconfig. It means that norrin_defconfig won't have to 
set up the extra/custom CONFIG_BOARD_NORRIN.


I've already sent a patch to fix this same issue for Jetson TK1:

http://patchwork.ozlabs.org/patch/375467/
ARM: tegra: remove custom define for Jetson TK1


diff --git a/configs/norrin_defconfig b/configs/norrin_defconfig



+CONFIG_SYS_EXTRA_OPTIONS=BOARD_NORRIN=


Per my comment above, you can remove that one line.

Aside from those issues, this patch looks fine.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


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

2014-08-04 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 and wp sense are
flipped, and it has a different revision of the AS3722 PMIC.  This
board is also refered to as nyan in the ChromeOS trees.

Signed-off-by: Allen Martin amar...@nvidia.com
---
Changes from v2:
-Rebased to u-boot/master
-Changed from boards.cfg to Kconfig based configuration
-Added MAINTAINERS file for Norrin board
Changes from v1:
-Generated pinmux with tegra-pinmux-scripts directly from pinmux
 spreadsheet.
-Don't try to reuse venice2 board files
---
 arch/arm/Kconfig   |   4 +
 arch/arm/dts/Makefile  |   1 +
 arch/arm/dts/tegra124-norrin.dts   |  91 +
 board/nvidia/norrin/Kconfig|  24 +++
 board/nvidia/norrin/MAINTAINERS|   6 +
 board/nvidia/norrin/Makefile   |   9 +
 board/nvidia/norrin/norrin.c   |  29 +++
 board/nvidia/norrin/pinmux-config-norrin.h | 287 +
 board/nvidia/venice2/as3722_init.h |   2 +-
 configs/norrin_defconfig   |   4 +
 include/configs/norrin.h   |  81 
 11 files changed, 537 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/dts/tegra124-norrin.dts
 create mode 100644 board/nvidia/norrin/Kconfig
 create mode 100644 board/nvidia/norrin/MAINTAINERS
 create mode 100644 board/nvidia/norrin/Makefile
 create mode 100644 board/nvidia/norrin/norrin.c
 create mode 100644 board/nvidia/norrin/pinmux-config-norrin.h
 create mode 100644 configs/norrin_defconfig
 create mode 100644 include/configs/norrin.h

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index e385eda94cdf..f4e0f5a42c14 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -716,6 +716,9 @@ config TARGET_DALMORE
 config TARGET_JETSON_TK1
bool Support jetson-tk1
 
+config TARGET_NORRIN
+   bool Support norrin
+
 config TARGET_VENICE2
bool Support venice2
 
@@ -912,6 +915,7 @@ source board/nvidia/cardhu/Kconfig
 source board/nvidia/dalmore/Kconfig
 source board/nvidia/harmony/Kconfig
 source board/nvidia/jetson-tk1/Kconfig
+source board/nvidia/norrin/Kconfig
 source board/nvidia/seaboard/Kconfig
 source board/nvidia/venice2/Kconfig
 source board/nvidia/ventana/Kconfig
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index 6e2e313829c1..e61e306c5c23 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -24,6 +24,7 @@ dtb-$(CONFIG_TEGRA) += tegra20-harmony.dtb \
tegra30-tec-ng.dtb \
tegra114-dalmore.dtb \
tegra124-jetson-tk1.dtb \
+   tegra124-norrin.dtb \
tegra124-venice2.dtb
 dtb-$(CONFIG_ZYNQ) += zynq-zc702.dtb \
zynq-zc706.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 =