Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 28 Jan 2013 10:36:20 +0100
From:      Emmanuel Vadot <elbarto@megadrive.org>
To:        Damjan Marion <damjan.marion@gmail.com>
Cc:        freebsd-arm@freebsd.org
Subject:   Re: Beaglebone and GPIO
Message-ID:  <20130128103620.1a84ccb548c2dcd21345335d@megadrive.org>
In-Reply-To: <22039243-8515-4245-97D1-48C29CB04F00@gmail.com>
References:  <20130128044511.86a3d715b11c3346884a7056@megadrive.org> <20130128063436.707fb62d79767d2d8ce0542a@megadrive.org> <22039243-8515-4245-97D1-48C29CB04F00@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.

--Multipart=_Mon__28_Jan_2013_10_36_20_+0100_Z+l1JuVatNnCbLvC
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit

On Mon, 28 Jan 2013 10:28:14 +0100
Damjan Marion <damjan.marion@gmail.com> wrote:

> 
> On Jan 28, 2013, at 6:34 AM, Emmanuel Vadot <elbarto@megadrive.org> wrote:
> 
> > On Mon, 28 Jan 2013 04:45:11 +0100
> > Emmanuel Vadot <elbarto@megadrive.org> wrote:
> > 
> >> 
> >> Hello,
> >> 
> >> I've filled the missings pads on am335x_scm_padconf.c so every GPIO pin is now accessible (if, of course, they are in GPIO mode).
> >> 
> >> I've also corrected/enhanced an error on ti_gpio.c, in the ti_gpio_pin_get function then code was testing if the pin was in output mode and if it was return EINVAL but in fact it was returning EINVAL if the pin was in input mode.
> >> Now the function return the value of the pin despite of it's an input or output. (seems more logical to me but I'm open to discuss this).
> >> 
> >> I've also patched gpioctl(1), it now test if the pin is in GPIO mode (according to the pin mux setting) and print either the value or "Not in GPIO mode".
> >> 
> >> Cheers,
> > 
> > Attached is the coorect patch with the correct case for some signals names.
> 
> Hell, Thanks for diffs.
> 
> padconf stuff is committed. For gpio changes would like to have blessing from gonzo.
> 
> Gonzo, are you fine with gpio changes?
> 
> Damjan
> 

 Thanks,

 Attached is the patch for the DTS of the beaglebone so every pins of the headers are setup like the beaglebone SRM said.

-- 
Emmanuel Vadot <elbarto@megadrive.org>

--Multipart=_Mon__28_Jan_2013_10_36_20_+0100_Z+l1JuVatNnCbLvC
Content-Type: text/x-diff;
 name="beaglebone.dts.patch"
Content-Disposition: attachment;
 filename="beaglebone.dts.patch"
Content-Transfer-Encoding: 7bit

Index: sys/boot/fdt/dts/beaglebone.dts
===================================================================
--- sys/boot/fdt/dts/beaglebone.dts	(revision 245942)
+++ sys/boot/fdt/dts/beaglebone.dts	(working copy)
@@ -91,7 +91,58 @@
 				"MMC0_DAT0", "mmc0_dat0", "input_pullup",
 				"MMC0_DAT1", "mmc0_dat1", "input_pullup",
 				"MMC0_DAT2", "mmc0_dat2", "input_pullup",
-				"MMC0_DAT3", "mmc0_dat3", "input_pullup";
+				"MMC0_DAT3", "mmc0_dat3", "input_pullup",
+				/* GPIO */
+				"ECAP0_IN_PWM0_OUT", "gpio0_7", "input_pulldown",
+				"GPMC_AD10", "gpio0_26", "input_pulldown",
+				"GPMC_AD11", "gpio0_27", "input_pulldown",
+				"GPMC_AD0", "gpio1_0", "input_pulldown",
+				"GPMC_AD1", "gpio1_1", "input_pulldown",
+				"GPMC_AD2", "gpio1_2", "input_pulldown",
+				"GPMC_AD3", "gpio1_3", "input_pulldown",
+				"GPMC_AD4", "gpio1_4", "input_pulldown",
+				"GPMC_AD5", "gpio1_5", "input_pulldown",
+				"GPMC_AD6", "gpio1_6", "input_pulldown",
+				"GPMC_AD7", "gpio1_7", "input_pulldown",
+				"GPMC_AD12", "gpio1_12", "input_pulldown",
+				"GPMC_AD13", "gpio1_13", "input_pulldown",
+				"GPMC_AD14", "gpio1_14", "input_pulldown",
+				"GPMC_AD15", "gpio1_15", "input_pulldown",
+				"GPMC_A0", "gpio1_16", "input_pulldown",
+				"GPMC_A1", "gpio1_17", "input_pulldown",
+				"GPMC_A5", "gpio1_21", "output", /* User LED 1 */
+				"GPMC_A6", "gpio1_22", "output", /* User LED 2 */
+				"GPMC_A7", "gpio1_23", "output", /* User LED 3 */
+				"GPMC_A8", "gpio1_24", "output", /* User LED 4 */
+				"GPMC_BEn1", "gpio1_28", "input_pulldown",
+				"GPMC_CSn0", "gpio1_29", "input_pulldown",
+				"GPMC_CSn1", "gpio1_30", "input_pulldown",
+				"GPMC_CSn2", "gpio1_31", "input_pulldown",
+				"GPMC_CLK", "gpio2_1", "input_pulldown",
+				"LCD_DATA0", "gpio2_6", "input_pulldown", 
+				"LCD_DATA1", "gpio2_7", "input_pulldown", 
+				"LCD_DATA2", "gpio2_8", "input_pulldown", 
+				"LCD_DATA3", "gpio2_9", "input_pulldown", 
+				"LCD_DATA4", "gpio2_10", "input_pulldown", 
+				"LCD_DATA5", "gpio2_11", "input_pulldown", 
+				"LCD_DATA6", "gpio2_12", "input_pulldown", 
+				"LCD_DATA7", "gpio2_13", "input_pulldown", 
+				"LCD_VSYNC", "gpio2_22", "input_pulldown",
+				"LCD_HSYNC", "gpio2_23", "input_pulldown",
+				"LCD_PCLK", "gpio2_24", "input_pulldown",
+				"LCD_AC_BIAS_EN", "gpio2_25", "input_pulldown",
+				"MCASP0_FSR", "gpio3_19", "input_pulldown",
+				"MCASP0_AHCLKX", "gpio3_21", "input_pulldown",
+				/* TIMERs */
+				"GPMC_ADVn_ALE", "timer4", "output",
+				"GPMC_BEn0_CLE", "timer5", "output",
+				"GPMC_WEn", "timer6", "output",
+				"GPMC_OEn_REn", "timer7", "output",
+				/* PWM */
+				"GPMC_A2", "ehrpwm1A", "output",
+				"GPMC_A3", "ehrpwm1B", "output",
+				"GPMC_AD8", "ehrpwm2A", "output",
+				"GPMC_AD9", "ehrpwm2B", "output";
 		};
 
 		prcm@44E00000 {

--Multipart=_Mon__28_Jan_2013_10_36_20_+0100_Z+l1JuVatNnCbLvC--



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