[PATCH 11/25] ARM: tegra: beaver: activate sdmmc1 voltage rail

Lucas Stach dev at lynxeye.de
Mon May 12 00:07:52 PDT 2014


In order to get the SD card solt working.

Signed-off-by: Lucas Stach <dev at lynxeye.de>
---
One day we might move this to a regulator, but now
isn't the time.
---
 arch/arm/boards/nvidia-beaver/Makefile |  1 +
 arch/arm/boards/nvidia-beaver/board.c  | 38 ++++++++++++++++++++++++++++++++++
 2 files changed, 39 insertions(+)
 create mode 100644 arch/arm/boards/nvidia-beaver/board.c

diff --git a/arch/arm/boards/nvidia-beaver/Makefile b/arch/arm/boards/nvidia-beaver/Makefile
index d2d2173..2b6c09e 100644
--- a/arch/arm/boards/nvidia-beaver/Makefile
+++ b/arch/arm/boards/nvidia-beaver/Makefile
@@ -2,3 +2,4 @@ CFLAGS_pbl-entry.o := \
 	-mcpu=arm7tdmi -march=armv4t \
 	-fno-tree-switch-conversion -fno-jump-tables
 lwl-y += entry.o
+obj-y += board.o
diff --git a/arch/arm/boards/nvidia-beaver/board.c b/arch/arm/boards/nvidia-beaver/board.c
new file mode 100644
index 0000000..e87594d
--- /dev/null
+++ b/arch/arm/boards/nvidia-beaver/board.c
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2014 Lucas Stach <l.stach at pengutronix.de>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU General Public License,
+ * version 2, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <common.h>
+#include <init.h>
+#include <i2c/i2c.h>
+
+static int nvidia_beaver_devices_init(void)
+{
+	struct i2c_client client;
+	u8 data;
+
+	if (!of_machine_is_compatible("nvidia,beaver"))
+		return 0;
+
+	client.adapter = i2c_get_adapter(4);
+	client.addr = 0x2d;
+
+	/* TPS659110: LDO5_REG = 3.3v, ACTIVE to SDMMC1 */
+	data = 0x65;
+	i2c_write_reg(&client, 0x32, &data, 1);
+
+	return 0;
+}
+device_initcall(nvidia_beaver_devices_init);
-- 
1.9.0




More information about the barebox mailing list