Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 03 Aug 2012 14:34:54 +0000
From:      aleek@FreeBSD.org
To:        svn-soc-all@FreeBSD.org
Subject:   socsvn commit: r240036 - in soc2012/aleek/beaglexm-armv6/sys: arm/conf arm/ti/am37x arm/ti/twl arm/ti/usb boot/fdt/dts
Message-ID:  <20120803143454.7A33510656AC@hub.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: aleek
Date: Fri Aug  3 14:34:53 2012
New Revision: 240036
URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=240036

Log:
  initial twl/tps (Power Management Unit) support for bb-xm

Modified:
  soc2012/aleek/beaglexm-armv6/sys/arm/conf/BEAGLEBOARD-XM
  soc2012/aleek/beaglexm-armv6/sys/arm/ti/am37x/am37x_pmic.c
  soc2012/aleek/beaglexm-armv6/sys/arm/ti/am37x/files.beagleboardxm
  soc2012/aleek/beaglexm-armv6/sys/arm/ti/twl/twl.c
  soc2012/aleek/beaglexm-armv6/sys/arm/ti/twl/twl_clks.c
  soc2012/aleek/beaglexm-armv6/sys/arm/ti/usb/omap_ehci.c
  soc2012/aleek/beaglexm-armv6/sys/boot/fdt/dts/beagleboardxm.dts

Modified: soc2012/aleek/beaglexm-armv6/sys/arm/conf/BEAGLEBOARD-XM
==============================================================================
--- soc2012/aleek/beaglexm-armv6/sys/arm/conf/BEAGLEBOARD-XM	Fri Aug  3 13:50:29 2012	(r240035)
+++ soc2012/aleek/beaglexm-armv6/sys/arm/conf/BEAGLEBOARD-XM	Fri Aug  3 14:34:53 2012	(r240036)
@@ -60,7 +60,7 @@
 #options	WITNESS			#Enable checks to detect deadlocks and cycles
 #options	WITNESS_SKIPSPIN	#Don't run witness on spinlocks for speed
 #options	DIAGNOSTIC
-#options	DEBUG
+options	DEBUG
 
 
 # NFS support
@@ -97,7 +97,7 @@
 device		iicbus
 device		iic
 device		ti_i2c
-#device		am37x_pmic		# AM335x Power Management IC (TPC65217)
+device		twl
 
 # GPIO
 device		gpio

Modified: soc2012/aleek/beaglexm-armv6/sys/arm/ti/am37x/am37x_pmic.c
==============================================================================
--- soc2012/aleek/beaglexm-armv6/sys/arm/ti/am37x/am37x_pmic.c	Fri Aug  3 13:50:29 2012	(r240035)
+++ soc2012/aleek/beaglexm-armv6/sys/arm/ti/am37x/am37x_pmic.c	Fri Aug  3 14:34:53 2012	(r240036)
@@ -100,7 +100,7 @@
 {
 	struct am335x_pmic_softc *sc;
 
-	if (!ofw_bus_is_compatible(dev, "ti,am335x-pmic"))
+	if (!ofw_bus_is_compatible(dev, "ti,am37x-pmic"))
 		return (ENXIO);
 
 	sc = device_get_softc(dev);
@@ -164,7 +164,7 @@
 };
 
 static driver_t am335x_pmic_driver = {
-	"am335x_pmic",
+	"am37x_pmic",
 	am335x_pmic_methods,
 	sizeof(struct am335x_pmic_softc),
 };

Modified: soc2012/aleek/beaglexm-armv6/sys/arm/ti/am37x/files.beagleboardxm
==============================================================================
--- soc2012/aleek/beaglexm-armv6/sys/arm/ti/am37x/files.beagleboardxm	Fri Aug  3 13:50:29 2012	(r240035)
+++ soc2012/aleek/beaglexm-armv6/sys/arm/ti/am37x/files.beagleboardxm	Fri Aug  3 14:34:53 2012	(r240036)
@@ -1,3 +1,6 @@
 #$FreeBSD$
 
-arm/ti/am37x/am37x_pmic.c			optional	am37x_pmic
+#arm/ti/am37x/am37x_pmic.c			optional	am37x_pmic
+arm/ti/twl/twl.c				optional	twl
+arm/ti/twl/twl_vreg.c				optional	twl #twl_vreg
+arm/ti/twl/twl_clks.c				optional	twl #twl_clks

Modified: soc2012/aleek/beaglexm-armv6/sys/arm/ti/twl/twl.c
==============================================================================
--- soc2012/aleek/beaglexm-armv6/sys/arm/ti/twl/twl.c	Fri Aug  3 13:50:29 2012	(r240035)
+++ soc2012/aleek/beaglexm-armv6/sys/arm/ti/twl/twl.c	Fri Aug  3 14:34:53 2012	(r240036)
@@ -419,6 +419,7 @@
 		return (ENOMEM);
 
 	/* FIXME: should be in DTS file */
+	device_printf( dev, "habababa\n" );
 	if ((sc->sc_vreg = device_add_child(dev, "twl_vreg", -1)) == NULL)
 		device_printf(dev, "could not allocate twl_vreg instance\n");
 	if ((sc->sc_clks = device_add_child(dev, "twl_clks", -1)) == NULL)

Modified: soc2012/aleek/beaglexm-armv6/sys/arm/ti/twl/twl_clks.c
==============================================================================
--- soc2012/aleek/beaglexm-armv6/sys/arm/ti/twl/twl_clks.c	Fri Aug  3 13:50:29 2012	(r240035)
+++ soc2012/aleek/beaglexm-armv6/sys/arm/ti/twl/twl_clks.c	Fri Aug  3 14:34:53 2012	(r240036)
@@ -75,7 +75,7 @@
 #include "twl_clks.h"
 
 
-static int twl_clks_debug = 1;
+static int twl_clks_debug = 1; //@todo XXX make it #if DEBUG
 
 
 /*

Modified: soc2012/aleek/beaglexm-armv6/sys/arm/ti/usb/omap_ehci.c
==============================================================================
--- soc2012/aleek/beaglexm-armv6/sys/arm/ti/usb/omap_ehci.c	Fri Aug  3 13:50:29 2012	(r240035)
+++ soc2012/aleek/beaglexm-armv6/sys/arm/ti/usb/omap_ehci.c	Fri Aug  3 14:34:53 2012	(r240036)
@@ -1023,3 +1023,4 @@
 static devclass_t ehci_devclass;
 
 DRIVER_MODULE(ehci, simplebus, ehci_driver, ehci_devclass, 0, 0);
+MODULE_DEPEND(ehci, twl_vreg, 1, 1, 1);

Modified: soc2012/aleek/beaglexm-armv6/sys/boot/fdt/dts/beagleboardxm.dts
==============================================================================
--- soc2012/aleek/beaglexm-armv6/sys/boot/fdt/dts/beagleboardxm.dts	Fri Aug  3 13:50:29 2012	(r240035)
+++ soc2012/aleek/beaglexm-armv6/sys/boot/fdt/dts/beagleboardxm.dts	Fri Aug  3 14:34:53 2012	(r240036)
@@ -195,10 +195,10 @@
 			interrupts = <56>;
 			interrupt-parent = <&AINTC>;
 			i2c-device-id = <1>;
-			/*pmic@24 {
-				compatible = "ti,am37x-pmic";
+			pmic@24 {
+				compatible = "ti,twl4030";
 				reg = <0x24>;
-			};*/
+			};
 		};
 
 		ehci@48064800 {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120803143454.7A33510656AC>