Difference between revisions of "Configuring ext signals"
(Expanded: Pin functions (mux))
m (→Setup: Removed hashes.)
|Line 8:||Line 8:|
mount -t debugfs none /debug
Revision as of 12:56, 25 May 2014
Pin functions (mux)
By default the UART2 pins are set up as GPIOs, and UART3 is set up as an UART. The following describes how to change pin functions under a 3.2 kernel.
mkdir /debug mount -t debugfs none /debug
In the /debug/omap_mux directory which appears, the files relevant to the EXT connector are uart2_cts, uart2_rts, uart2_rx, uart2_tx, uart3_rx_irrx, uart3_tx_irtx. They are mapped to the pad configuration registers. Reading one of these files reports the current configuration of the pin. Writing the appropriate pattern to the file changes the configuration of the pin.
Pad Configuration Register
As described in OMAP35x Technical Reference Manual (Rev. Y), section 7.4.4 
|8||INPUTENABLE||0: output only. 1: bidirectional.|
|4||PULLTYPESELECT||0: pull-down. 1: pull-up.|
|3||PULLUDENABLE||0: pull not active. 1: pull active if pin not configured as output.|
|2,1,0||MUXMODE||See table below.|
|Mode 0||Mode 1||Mode 2||Mode 3||Mode 4||Mode 5||Mode 6||Mode 7|
Example of changing UART2_RTS from GPIO to UART mode :
# cat /debug/omap_mux/uart2_rts name: uart2_rts.gpio_145 (0x48002176/0x146 = 0x010c), b ab25, t NA mode: OMAP_PIN_INPUT_PULLDOWN | OMAP_MUX_MODE4 signals: uart2_rts | mcbsp3_dr | gpt10_pwm_evt | NA | gpio_145 | NA | NA | safe_mode # echo 0x0108 > /debug/omap_mux/uart2_rts # cat /debug/omap_mux/uart2_rts name: uart2_rts.uart2_rts (0x48002176/0x146 = 0x0108), b ab25, t NA mode: OMAP_PIN_INPUT_PULLDOWN | OMAP_MUX_MODE0 signals: uart2_rts | mcbsp3_dr | gpt10_pwm_evt | NA | gpio_145 | NA | NA | safe_mode
The value was changed from 0x010c to 0x0108. In both numbers, bit8 is 1 for input enable, bit4 is 0 for pull-down, and bit3 is 1 for pull enable. Bits 2,1,0 changed from 4 to 0, which changed the mux mode from 4 to 0.
Currently always set to supply 2.8V, changing this requires patching bootloaders (xload and u-boot).
This is connected to VAUX3 supply on PMIC, with these programmable voltages (200mA max): 1.5V, 1.8V, 2.5V, 2.8V and 3.0V, with 2.8V as default.
warning: at the time of this writing, both bootloaders (xload and u-boot) set this to 2.8V unconditionally, so don't rely on this providing other voltages during reboot until you patch both bootloaders.
Can be controlled using GPIO sysfs class device, as described in beagleboard tutorials here.
On older firmwares, kernel messages are directed there. SuperZaxxon or later have that disabled.
On all firmwares released so far terminal with a shell is attached to UART3. The port runs at 115200 8N1 baud rate.
Disabling kernel messages
To disable kernel mesages, you need to edit kernel boot arguments. Probably easiest way to do it is to create autoboot.txt and place on root directory of a card in slot1 with this content:
setenv bootargs ubi.mtd=4 ubi.mtd=3 root=ubi0:rootfs rootfstype=ubifs rw rootflags=bulk_read
Alternatives are using u-boot environment (configure through USB or UART3 serial before system boots up) or patching and reflashing u-boot itself.
Disabling attached terminal
For this you need to edit /etc/inittab on pandora rootfs and comment out these lines:
#S0:2345:once:/sbin/getty 115200 ttyS0 #O2:2345:once:/sbin/getty 115200 ttyO2