Skip to contentSkip to conversation

tegra: i2c: Enable I2C on PAZ00

PATCH New Marc Dietrich 3 participants 10 messages Sep 10, 2012 – Sep 17, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 tegra: i2c: Enable I2C on PAZ00

This enables I2C on PAZ00.

---
 include/configs/paz00.h |    8 ++++++++
 1 file changed, 8 insertions(+)
include/configs/paz00.h +8 -0
index 24cda48..7e21e66 100644
@@ -38,6 +38,14 @@
 
 #define CONFIG_BOARD_EARLY_INIT_F
 
+/* I2C */
+#define CONFIG_TEGRA_I2C
+#define CONFIG_SYS_I2C_INIT_BOARD
+#define CONFIG_I2C_MULTI_BUS
+#define CONFIG_SYS_MAX_I2C_BUS         4
+#define CONFIG_SYS_I2C_SPEED           100000
+#define CONFIG_CMD_I2C
+
 /* SD/MMC */
 #define CONFIG_MMC
 #define CONFIG_GENERIC_MMC
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 2/2 tegra: enable lp0 on paz00

This enables LP0 to support suspend / resume on PAZ00.

---
 board/compal/paz00/Makefile |    6 ++++--
 include/configs/paz00.h     |    8 ++++++++
 2 files changed, 12 insertions(+), 2 deletions(-)
board/compal/paz00/Makefile +4 -2
index 7f7287e..fbe28b3 100644
@@ -20,9 +20,11 @@ $(shell mkdir -p $(obj)../../nvidia/common)
 
 LIB	= $(obj)lib$(BOARD).o
 
-COBJS	:= $(BOARD).o
-COBJS	+= ../../nvidia/common/board.o
+COBJS-y	:= $(BOARD).o
+COBJS-y	+= ../../nvidia/common/board.o
+COBJS-$(CONFIG_TEGRA_CLOCK_SCALING) += ../../nvidia/common/emc.o
 
+COBJS	:= $(COBJS-y)
 SRCS	:= $(COBJS:.o=.c)
 OBJS	:= $(addprefix $(obj),$(COBJS))
 
include/configs/paz00.h +8 -0
index 7e21e66..1c96f1c 100644
@@ -18,6 +18,14 @@
 #define __CONFIG_H
 
 #include <asm/sizes.h>
+
+/* LP0 suspend / resume */
+#define CONFIG_TEGRA20_LP0
+#define CONFIG_AES
+#define CONFIG_TEGRA_PMU
+#define CONFIG_TPS6586X_POWER
+#define CONFIG_TEGRA_CLOCK_SCALING
+
 #include "tegra20-common.h"
 
 /* Enable fdt support for Paz00. Flash the image in u-boot-dtb.bin */
Signature · 1 line
1.7.9.5
#2 lore raw

PATCH 2/2 tegra: enable lp0 on paz00

Quoted 1 line · Marc Dietrich

This enables LP0 to support suspend / resume on PAZ00.

Ooh. Did you test this out with the AC100 kernel, and have it work? That'd be pretty cool...

board/compal/paz00/Makefile $(shell mkdir -p $(obj)../../nvidia/common) · line 25

Quoted 7 lines
board/compal/paz00/Makefile +3 -2
 
-COBJS	:= $(BOARD).o
-COBJS	+= ../../nvidia/common/board.o
+COBJS-y	:= $(BOARD).o
+COBJS-y	+= ../../nvidia/common/board.o
+COBJS-$(CONFIG_TEGRA_CLOCK_SCALING) += ../../nvidia/common/emc.o

Hmmm. That's odd. I'd expect that to be part of the core Tegra code, rather than something boards have to pull in manually.

include/configs/paz00.h line 23

Quoted 4 lines
include/configs/paz00.h +2 -0
 
+/* LP0 suspend / resume */
+#define CONFIG_TEGRA20_LP0

That's been renamed CONFIG_TEGRA_LP0 in u-boot-tegra/next.

#3 lore raw

PATCH 2/2 tegra: enable lp0 on paz00

Marc,

Quoted 15 lines

-----Original Message-----
From: Stephen Warren [mailto:swarren at wwwdotorg.org]
Sent: Monday, September 10, 2012 12:08 PM
To: Marc Dietrich
Cc: u-boot at lists.denx.de; Tom Warren
Subject: Re: [PATCH 2/2] tegra: enable lp0 on paz00

Quoted 1 line · Marc Dietrich

This enables LP0 to support suspend / resume on PAZ00.

Ooh. Did you test this out with the AC100 kernel, and have it work? That'd be pretty cool...

Quoted 1 line
board/compal/paz00/Makefile +0 -0
Quoted 8 lines

board/compal/paz00/Makefile $(shell mkdir -p $(obj)../../nvidia/common) · line 25

Quoted 5 lines
board/compal/paz00/Makefile +3 -2
-COBJS	:= $(BOARD).o
-COBJS	+= ../../nvidia/common/board.o
+COBJS-y	:= $(BOARD).o
+COBJS-y	+= ../../nvidia/common/board.o
+COBJS-$(CONFIG_TEGRA_CLOCK_SCALING) += ../../nvidia/common/emc.o

Hmmm. That's odd. I'd expect that to be part of the core Tegra code, rather than something boards have to pull in manually.

Stephen's right - this is already done in ../cpu/tegra20-common/Makefile when CONFIG_TEGRA_CLOCK_SCALING is defined. So no need to change the PAZ00 Makefile.

Quoted 7 lines

include/configs/paz00.h line 23

Quoted 5 lines
include/configs/paz00.h +2 -0
 
+/* LP0 suspend / resume */
+#define CONFIG_TEGRA20_LP0

That's been renamed CONFIG_TEGRA_LP0 in u-boot-tegra/next.

As part of the pre-work for Tegra30 changes, I've changed generic Tegra defines, labels, etc. to be more non-specific, unless it does really refer to a Tegra20 feature, file, etc. As Stephen says, see u-boot-tegra/next's top commit.

Tom

Signature · 1 line
nvpublic
#4 lore raw

PATCH 2/2 tegra: enable lp0 on paz00

Tom,

Quoted 15 lines · On Monday 10 September 2012 12:32:00 Tom Warren wrote:
Quoted 15 lines

-----Original Message-----
From: Stephen Warren [mailto:swarren at wwwdotorg.org]
Sent: Monday, September 10, 2012 12:08 PM
To: Marc Dietrich
Cc: u-boot at lists.denx.de; Tom Warren
Subject: Re: [PATCH 2/2] tegra: enable lp0 on paz00

Quoted 1 line · Marc Dietrich

This enables LP0 to support suspend / resume on PAZ00.

Ooh. Did you test this out with the AC100 kernel, and have it work? That'd be pretty cool...

Quoted 2 lines
board/compal/paz00/Makefile +0 -0
Quoted 9 lines
Quoted 9 lines

board/compal/paz00/Makefile $(shell mkdir -p $(obj)../../nvidia/common) · line 25

Quoted 5 lines
board/compal/paz00/Makefile +3 -2
-COBJS	:= $(BOARD).o
-COBJS	+= ../../nvidia/common/board.o
+COBJS-y	:= $(BOARD).o
+COBJS-y	+= ../../nvidia/common/board.o
+COBJS-$(CONFIG_TEGRA_CLOCK_SCALING) += ../../nvidia/common/emc.o

Hmmm. That's odd. I'd expect that to be part of the core Tegra code, rather
than something boards have to pull in manually.

I checked this again. The Makefile in nvidia/common is never executed on non nvidia boards (it is included from the topdir Makefile ($vendor/common/Makefile).

Therefore the explicit "COBJS += ../../nvidia/common/board.o" in the paz00
Makefile is needed. So either we have to add ../../nvidia/common/foo.o to all non nvidia boards or we "source" the whole Makefile somehow else.

Marc

Quoted 16 lines

Stephen's right - this is already done in ../cpu/tegra20-common/Makefile when CONFIG_TEGRA_CLOCK_SCALING is defined. So no need to change the PAZ00 Makefile.

Quoted 6 lines

include/configs/paz00.h line 23

Quoted 4 lines
include/configs/paz00.h +2 -0
 
+/* LP0 suspend / resume */
+#define CONFIG_TEGRA20_LP0

That's been renamed CONFIG_TEGRA_LP0 in u-boot-tegra/next.

As part of the pre-work for Tegra30 changes, I've changed generic Tegra defines, labels, etc. to be more non-specific, unless it does really refer to a Tegra20 feature, file, etc. As Stephen says, see u-boot-tegra/next's top commit.

Tom

#5 lore raw

PATCH 2/2 tegra: enable lp0 on paz00

Marc,

Quoted 39 lines

-----Original Message-----
From: Marc Dietrich [mailto:marvin24 at gmx.de]
Sent: Sunday, September 16, 2012 9:17 AM
To: Tom Warren
Cc: Stephen Warren; u-boot at lists.denx.de
Subject: Re: [PATCH 2/2] tegra: enable lp0 on paz00

Tom,

Quoted 16 lines · On Monday 10 September 2012 12:32:00 Tom Warren wrote:
Quoted 16 lines

-----Original Message-----
From: Stephen Warren [mailto:swarren at wwwdotorg.org]
Sent: Monday, September 10, 2012 12:08 PM
To: Marc Dietrich
Cc: u-boot at lists.denx.de; Tom Warren
Subject: Re: [PATCH 2/2] tegra: enable lp0 on paz00

Quoted 1 line · Marc Dietrich

This enables LP0 to support suspend / resume on PAZ00.

Ooh. Did you test this out with the AC100 kernel, and have it work? That'd be pretty cool...

Quoted 3 lines
board/compal/paz00/Makefile +0 -0
Quoted 8 lines
Quoted 8 lines

board/compal/paz00/Makefile $(shell mkdir -p $(obj)../../nvidia/common) · line 25

Quoted 5 lines
board/compal/paz00/Makefile +3 -2
-COBJS	:= $(BOARD).o
-COBJS	+= ../../nvidia/common/board.o
+COBJS-y	:= $(BOARD).o
+COBJS-y	+= ../../nvidia/common/board.o
+COBJS-$(CONFIG_TEGRA_CLOCK_SCALING) += ../../nvidia/common/emc.o

Hmmm. That's odd. I'd expect that to be part of the core Tegra code, rather than something boards have to pull in manually.

I checked this again. The Makefile in nvidia/common is never executed on non nvidia boards (it is included from the topdir Makefile ($vendor/common/Makefile).

Quoted 5 lines

Therefore the explicit "COBJS += ../../nvidia/common/board.o" in the paz00
Makefile is needed. So either we have to add ../../nvidia/common/foo.o to all non nvidia boards or we "source" the whole Makefile somehow else.

Marc

Feel free to submit a patch that does one or the other (patches all non-nvidia Makefiles or sources the whole Makefile). I think I'd prefer the first approach, though it's ugly having ../.. 'reach arounds' in the Makefiles.

Once you have a fix, we can discuss its merits and move forward.

Thanks,

Tom

Quoted 17 lines
Quoted 17 lines

Stephen's right - this is already done in ../cpu/tegra20-common/Makefile when CONFIG_TEGRA_CLOCK_SCALING is defined. So no need to change the PAZ00 Makefile.

Quoted 6 lines

include/configs/paz00.h line 23

Quoted 4 lines
include/configs/paz00.h +2 -0
 
+/* LP0 suspend / resume */
+#define CONFIG_TEGRA20_LP0

That's been renamed CONFIG_TEGRA_LP0 in u-boot-tegra/next.

As part of the pre-work for Tegra30 changes, I've changed generic Tegra defines, labels, etc. to be more non-specific, unless it does really refer to a Tegra20 feature, file, etc. As Stephen says, see u-boot-tegra/next's top commit.

Tom

Signature · 1 line
nvpublic
#6 lore raw

PATCH 2/2 tegra: enable lp0 on paz00

In reply to Stephen Warren
Quoted 5 lines · On Monday 10 September 2012 13:07:43 Stephen Warren wrote:
Quoted 1 line · Marc Dietrich

This enables LP0 to support suspend / resume on PAZ00.

Ooh. Did you test this out with the AC100 kernel, and have it work? That'd be pretty cool...

yeah, it would.

Unfortunately, I failed to boot a nvidia 3.1 kernel with uboot (hangs somewhere in usb code), so I couldn't test it so far. But I'll retry soon.

Quoted 10 lines

board/compal/paz00/Makefile $(shell mkdir -p $(obj)../../nvidia/common) · line 25

Quoted 7 lines
board/compal/paz00/Makefile +3 -2
 
-COBJS	:= $(BOARD).o
-COBJS	+= ../../nvidia/common/board.o
+COBJS-y	:= $(BOARD).o
+COBJS-y	+= ../../nvidia/common/board.o
+COBJS-$(CONFIG_TEGRA_CLOCK_SCALING) += ../../nvidia/common/emc.o

Hmmm. That's odd. I'd expect that to be part of the core Tegra code, rather than something boards have to pull in manually.

Correct, will kill it in the next try.

Quoted 6 lines

include/configs/paz00.h line 23

Quoted 4 lines
include/configs/paz00.h +2 -0
 
+/* LP0 suspend / resume */
+#define CONFIG_TEGRA20_LP0

That's been renamed CONFIG_TEGRA_LP0 in u-boot-tegra/next.

Thanks for the hint. At least I have a better chance to test it now ;-)

Marc

#7 lore raw

PATCH 1/2 tegra: i2c: Enable I2C on PAZ00

In reply to Marc Dietrich
Quoted 1 line · Marc Dietrich

This enables I2C on PAZ00.

Really? You need to edit board/compal/dts/tegra20-paz00.dts to enable the I2C ports, don't you?

#8 lore raw

PATCH 1/2 tegra: i2c: Enable I2C on PAZ00

Quoted 5 lines · On Monday 10 September 2012 13:04:42 Stephen Warren wrote:
Quoted 1 line · Marc Dietrich

This enables I2C on PAZ00.

Really? You need to edit board/compal/dts/tegra20-paz00.dts to enable the I2C ports, don't you?

yes, together with the regulator node. Should this be split in two patches?

Marc

#9 lore raw

PATCH 1/2 tegra: i2c: Enable I2C on PAZ00

Quoted 8 lines · Marc Dietrich
Quoted 5 lines · On Monday 10 September 2012 13:04:42 Stephen Warren wrote:
Quoted 1 line · Marc Dietrich

This enables I2C on PAZ00.

Really? You need to edit board/compal/dts/tegra20-paz00.dts to enable the I2C ports, don't you?

yes, together with the regulator node. Should this be split in two patches?

I'd imagine that the editing both paz00.h tegra20-paz00.dts to enable I2C could be part of the same patch. It seems reasonable enough to add a node for an I2C device in the same patch.