musb power issue on beagleboard-xM

2011-08-29 Thread Bob Liu
Hi, folks

I tried to enable musb on beagleboard-xM. But it always failed with
insufficient available bus power.

I am using linux-3.0 from linus git tree.
Do i need to use a hub?  But i heard that musb doesn't support hub.

Thanks.


# dmesg | grep 'musb'
musb-hdrc: version 6.0, pio, host
omap_device: musb-omap2430.-1: new worst case activate latency 0: 30517
musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, bulk combine, bulk
split, HB-ISO Rx, HB-ISO Tx, SoftConn)
musb-hdrc: MHDRC RTL version 1.800
musb-hdrc: setup fifo_mode 4
musb-hdrc: 28/31 max ep, 16384/16384 memory
musb-hdrc musb-hdrc: MUSB HDRC host driver
musb-hdrc musb-hdrc: new USB bus registered, assigned bus number 1
usb usb1: Manufacturer:  musb-hcd
usb usb1: SerialNumber: musb-hdrc
musb-hdrc musb-hdrc: USB OTG mode controller at fa0ab000 using PIO, IRQ 92
#
#
# usb 1-1: new high speed USB device number 2 using musb-hdrc
usb 1-1: New USB device found, idVendor=0781, idProduct=5406
usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 1-1: Product: U3 Cruzer Micro
usb 1-1: Manufacturer: SanDisk Corporation
usb 1-1: SerialNumber: 188A1671738F
usb 1-1: rejected 1 configuration due to insufficient available bus power
usb 1-1: no configuration chosen from 1 choice
#

-- 
Regards,
--Bob
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


pandaboard can't reboot on 2.6.38-rc2?

2011-04-11 Thread Bob Liu
Hi, folks

I am using pandaboard and compiled a 2.6.38-rc2 kernel for it.
Everything works fine except that it can't reboot.

#reboot
#
The system is going down NOW!
Sent SIGTERM to all processes
Sent SIGKILL to all processes
Requesting system reboot
[  120.742370] Restarting system.

Then hanged...

Has anyone seen similar problem?

Thanks
-- 
Regards,
--Bob
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: pandaboard can't reboot on 2.6.38-rc2?

2011-04-11 Thread Bob Liu
On Tue, Apr 12, 2011 at 12:58 PM, Anand Gadiyar gadi...@ti.com wrote:
 Bob Liu wrote:
 Hi, folks

 I am using pandaboard and compiled a 2.6.38-rc2 kernel for it.
 Everything works fine except that it can't reboot.

 #reboot
 #
 The system is going down NOW!
 Sent SIGTERM to all processes
 Sent SIGKILL to all processes
 Requesting system reboot
 [  120.742370] Restarting system.

 Then hanged...

 Has anyone seen similar problem?

 As a quick workaround, turn off CONFIG_ARCH_OMAP2 and
 rebuild the kernel. That should get you functional reboots.


It works, Thanks!

 Looks like something in the asm code is messed up when building
 with OMAP2 support - I don't understand it well enough to solve
 it, but maybe this is a data point for people that do know
 the code better.

 - Anand


-- 
Regards,
--Bob
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [HELP] Audio on BeagleBoard xM can't work

2011-03-16 Thread Bob Liu
On Wed, Mar 16, 2011 at 3:40 PM, Peter Ujfalusi
peter.ujfal...@nokia.com wrote:
 On 03/16/11 07:45, ext Bob Liu wrote:
 amixer cset name=HandsfreeR Switch 1
 amixer cset name=HandsfreeR Mux 2
 amixer cset name=HandsfreeL Switch 1
 amixer cset name=HandsfreeL Mux 2
 amixer cset name=DAC1 Analog Playback Switch 1
 amixer cset name=DAC1 Analog Playback Volume 12
 amixer cset name=DAC1 Digital Coarse Playback Volume 2
 amixer cset name=DAC1 Digital Fine Playback Volume 50
 amixer cset name=DAC2 Analog Playback Switch 1
 amixer cset name=DAC2 Analog Playback Volume 12
 amixer cset name=DAC2 Digital Coarse Playback Volume 2
 amixer cset name=DAC2 Digital Fine Playback Volume 50

 aplay -D plughw:0,0 -d 5 /mnt/mmc/beethoven.wav

 AFAIK the Beagle has the the Headset lines routed to the stereo jack, so
 you might want to try:

 amixer sset 'HeadsetL Mixer AudioL2' on
 amixer sset 'HeadsetR Mixer AudioR2' on

 Do apply the gain settings related to DAC2 path. This is the path for
 the stereo (2ch mode).


Below is my log, I have reboot the system, still no sound.
Did I missed something?
Thanks

---
# amixer sset 'HeadsetL Mixer AudioL2' on
Simple mixer control 'HeadsetL Mixer AudioL2',0
  Capabilities: pswitch pswitch-joined penum
  Playback channels: Mono
  Mono: Playback [on]
# amixer sset 'HeadsetR Mixer AudioR2' on
Simple mixer control 'HeadsetR Mixer AudioR2',0
  Capabilities: pswitch pswitch-joined penum
  Playback channels: Mono
  Mono: Playback [on]
#
# amixer cset name=DAC2 Analog Playback Switch 1
name=DAC2 Digital Coarse Playback Volume 2
amixer cset name=DAC2 Digital Fine Playback Volume 50
numid=9,iface=MIXER,name='DAC2 Analog Playback Switch'
  ; type=BOOLEAN,access=rw--,values=2
  : values=on,on
# amixer cset name=DAC2 Analog Playback Volume 12
numid=7,iface=MIXER,name='DAC2 Analog Playback Volume'
  ; type=INTEGER,access=rw---R--,values=2,min=0,max=18,step=0
  : values=12,12
  | dBscale-min=-24.00dB,step=2.00dB,mute=0
# amixer cset name=DAC2 Digital Coarse Playback Volume 2
numid=5,iface=MIXER,name='DAC2 Digital Coarse Playback Volume'
  ; type=INTEGER,access=rw---R--,values=2,min=0,max=2,step=0
  : values=2,2
  | dBscale-min=0.00dB,step=6.00dB,mute=0
# amixer cset name=DAC2 Digital Fine Playback Volume 50
numid=3,iface=MIXER,name='DAC2 Digital Fine Playback Volume'
  ; type=INTEGER,access=rw---R--,values=2,min=0,max=63,step=0
  : values=50,50
  | dBscale-min=-63.00dB,step=1.00dB,mute=1
#
# aplay ~/alsa/ap.wav
Playing WAVE '/home/bob/alsa/ap.wav' : Signed 16 bit Little Endian,
Rate 22050 Hz, Stereo


-- 
Regards,
--Bob
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [HELP] Audio on BeagleBoard xM can't work

2011-03-16 Thread Bob Liu
On Wed, Mar 16, 2011 at 6:42 PM, Peter Ujfalusi
peter.ujfal...@nokia.com wrote:
 Hi,

 On 03/16/11 11:27, ext Bob Liu wrote:
 On Wed, Mar 16, 2011 at 3:40 PM, Peter Ujfalusi
 peter.ujfal...@nokia.com wrote:
 On 03/16/11 07:45, ext Bob Liu wrote:
 amixer cset name=HandsfreeR Switch 1
 amixer cset name=HandsfreeR Mux 2
 amixer cset name=HandsfreeL Switch 1
 amixer cset name=HandsfreeL Mux 2
 amixer cset name=DAC1 Analog Playback Switch 1
 amixer cset name=DAC1 Analog Playback Volume 12
 amixer cset name=DAC1 Digital Coarse Playback Volume 2
 amixer cset name=DAC1 Digital Fine Playback Volume 50
 amixer cset name=DAC2 Analog Playback Switch 1
 amixer cset name=DAC2 Analog Playback Volume 12
 amixer cset name=DAC2 Digital Coarse Playback Volume 2
 amixer cset name=DAC2 Digital Fine Playback Volume 50

 aplay -D plughw:0,0 -d 5 /mnt/mmc/beethoven.wav

 AFAIK the Beagle has the the Headset lines routed to the stereo jack, so
 you might want to try:

 amixer sset 'HeadsetL Mixer AudioL2' on
 amixer sset 'HeadsetR Mixer AudioR2' on

 Do apply the gain settings related to DAC2 path. This is the path for
 the stereo (2ch mode).


 Below is my log, I have reboot the system, still no sound.
 Did I missed something?
 Thanks

 ---
 # amixer sset 'HeadsetL Mixer AudioL2' on
 Simple mixer control 'HeadsetL Mixer AudioL2',0
   Capabilities: pswitch pswitch-joined penum
   Playback channels: Mono
   Mono: Playback [on]
 # amixer sset 'HeadsetR Mixer AudioR2' on
 Simple mixer control 'HeadsetR Mixer AudioR2',0
   Capabilities: pswitch pswitch-joined penum
   Playback channels: Mono
   Mono: Playback [on]
 #
 # amixer cset name=DAC2 Analog Playback Switch 1
 name=DAC2 Digital Coarse Playback Volume 2
 amixer cset name=DAC2 Digital Fine Playback Volume 50
 numid=9,iface=MIXER,name='DAC2 Analog Playback Switch'
   ; type=BOOLEAN,access=rw--,values=2
   : values=on,on
 # amixer cset name=DAC2 Analog Playback Volume 12
 numid=7,iface=MIXER,name='DAC2 Analog Playback Volume'
   ; type=INTEGER,access=rw---R--,values=2,min=0,max=18,step=0
   : values=12,12
   | dBscale-min=-24.00dB,step=2.00dB,mute=0
 # amixer cset name=DAC2 Digital Coarse Playback Volume 2
 numid=5,iface=MIXER,name='DAC2 Digital Coarse Playback Volume'
   ; type=INTEGER,access=rw---R--,values=2,min=0,max=2,step=0
   : values=2,2
   | dBscale-min=0.00dB,step=6.00dB,mute=0
 # amixer cset name=DAC2 Digital Fine Playback Volume 50
 numid=3,iface=MIXER,name='DAC2 Digital Fine Playback Volume'
   ; type=INTEGER,access=rw---R--,values=2,min=0,max=63,step=0
   : values=50,50
   | dBscale-min=-63.00dB,step=1.00dB,mute=1
 #
 # aplay ~/alsa/ap.wav
 Playing WAVE '/home/bob/alsa/ap.wav' : Signed 16 bit Little Endian,
 Rate 22050 Hz, Stereo

 

 I have downloaded the documentation for the BeagleBoard xM.
 The stereo audio out jack is connected to the HSOL/R (Headset L/R) of
 the codec.
 The commands you execute should be correct, but one thing might be missing:

 amixer sset 'Headset' 2

 Does this helps?


Yeah, it works!!  Thank you very much.

So in order to make aplay work I need to set all of these?

amixer sset 'HeadsetL Mixer AudioL2' on
amixer sset 'HeadsetR Mixer AudioR2' on
amixer sset 'Headset' 2
amixer cset name=DAC2 Analog Playback Switch 1
amixer cset name=DAC2 Analog Playback Volume 12
amixer cset name=DAC2 Digital Coarse Playback Volume 2
amixer cset name=DAC2 Digital Fine Playback Volume 50


And what should I set making arecord also work?
Sorry for that because I didn't have any alsa experiences.

Thanks.


 The Beagle doc has this to say about the audio output:

 8.16.3 Audio Output Jack
 A single 3.5mm jack is provided on BeagleBoard to support external
 stereo audio output
 devices such as headphones and powered speakers. This interface is not
 amplified and
 may require the use of amplified speakers in certain instances.


-- 
Regards,
--Bob
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [HELP] Audio on BeagleBoard xM can't work

2011-03-15 Thread Bob Liu
On Tue, Mar 15, 2011 at 5:53 PM, Jarkko Nikula jhnik...@gmail.com wrote:
 On Tue, 15 Mar 2011 11:12:17 +0800
 Bob Liu lliu...@gmail.com wrote:

 It seems that the code in sound/soc/omap/omap-mcbsp.c uses the function
 cpu-is-omap343x() which fails and returns ENODEV.

 But I have enabled OMAP3430 support in System Type / TI OMAP2/3/4
 Specific Features,
 why it still return ENODEV? (Attached my kernel config).

 And after I changed that check to cpu-is-omap34xx(), there was no
 error message but neither any audio output,
 I can't hear any sound.
 

 Is the DMA running after you change the cpu_is_omap34xx and try to play
 e.g. aplay /dev/urandom? If audio is running you should see DMA
 interrupt count increasing with grep DMA /proc/interrupts.


Yes, DMA interrupt count increased after aplay /dev/urandom or some
other audio file.
Thanks

 If that is working then issue could be in codec side. I don't have a
 beagle at the moment to verify but IRCC something like ~10 TWL4030 ALSA
 controls must be adjusted in order to route audio from DAC to outputs
 at proper volume.


-- 
Regards,
--Bob
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [HELP] Audio on BeagleBoard xM can't work

2011-03-15 Thread Bob Liu
On Wed, Mar 16, 2011 at 12:21 AM, Premi, Sanjeev pr...@ti.com wrote:
 -Original Message-
 From: linux-omap-ow...@vger.kernel.org
 [mailto:linux-omap-ow...@vger.kernel.org] On Behalf Of Bob Liu
 Sent: Tuesday, March 15, 2011 3:27 PM
 To: Jarkko Nikula
 Cc: linux-omap@vger.kernel.org;
 broo...@opensource.wolfsonmicro.com; l...@slimlogic.co.uk;
 l...@metafoo.de; p...@pwsan.com; peter.ujfal...@nokia.com
 Subject: Re: [HELP] Audio on BeagleBoard xM can't work

 On Tue, Mar 15, 2011 at 5:53 PM, Jarkko Nikula
 jhnik...@gmail.com wrote:
  On Tue, 15 Mar 2011 11:12:17 +0800
  Bob Liu lliu...@gmail.com wrote:
 
  It seems that the code in sound/soc/omap/omap-mcbsp.c uses
 the function
  cpu-is-omap343x() which fails and returns ENODEV.
 
  But I have enabled OMAP3430 support in System Type /
 TI OMAP2/3/4
  Specific Features,
  why it still return ENODEV? (Attached my kernel config).
 
  And after I changed that check to cpu-is-omap34xx(), there was no
  error message but neither any audio output,
  I can't hear any sound.
  
 
  Is the DMA running after you change the cpu_is_omap34xx and
 try to play
  e.g. aplay /dev/urandom? If audio is running you should see DMA
  interrupt count increasing with grep DMA /proc/interrupts.
 

 Yes, DMA interrupt count increased after aplay /dev/urandom or some
 other audio file.
 Thanks

  If that is working then issue could be in codec side. I don't have a
  beagle at the moment to verify but IRCC something like ~10
 TWL4030 ALSA
  controls must be adjusted in order to route audio from DAC
 to outputs
  at proper volume.

 I don't have HW with me right now, can you try the following?
 (Got the steps over phone from Abhilash)

 1) run command alsamixer
 2) Un-mute by pressing the key m
 3) Play the audio using aplay

 If it doesn't work, you may want to check the options used by
 alsamixer. I will be able to try it myself tomorrow morning.


Thanks for your reply.
It seems pressing the key m has no effect during alsamixer and there
are so many options I don't know how to adjust it.

-- 
Regards,
--Bob
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [HELP] Audio on BeagleBoard xM can't work

2011-03-15 Thread Bob Liu
On Wed, Mar 16, 2011 at 1:31 PM, ABRAHAM, KISHON VIJAY kis...@ti.com wrote:
 On Wed, Mar 16, 2011 at 9:09 AM, Bob Liu lliu...@gmail.com wrote:
 On Wed, Mar 16, 2011 at 12:21 AM, Premi, Sanjeev pr...@ti.com wrote:
 -Original Message-
 From: linux-omap-ow...@vger.kernel.org
 [mailto:linux-omap-ow...@vger.kernel.org] On Behalf Of Bob Liu
 Sent: Tuesday, March 15, 2011 3:27 PM
 To: Jarkko Nikula
 Cc: linux-omap@vger.kernel.org;
 broo...@opensource.wolfsonmicro.com; l...@slimlogic.co.uk;
 l...@metafoo.de; p...@pwsan.com; peter.ujfal...@nokia.com
 Subject: Re: [HELP] Audio on BeagleBoard xM can't work

 On Tue, Mar 15, 2011 at 5:53 PM, Jarkko Nikula
 jhnik...@gmail.com wrote:
  On Tue, 15 Mar 2011 11:12:17 +0800
  Bob Liu lliu...@gmail.com wrote:
 
  It seems that the code in sound/soc/omap/omap-mcbsp.c uses
 the function
  cpu-is-omap343x() which fails and returns ENODEV.
 
  But I have enabled OMAP3430 support in System Type /
 TI OMAP2/3/4
  Specific Features,
  why it still return ENODEV? (Attached my kernel config).
 
  And after I changed that check to cpu-is-omap34xx(), there was no
  error message but neither any audio output,
  I can't hear any sound.
  
 
  Is the DMA running after you change the cpu_is_omap34xx and
 try to play
  e.g. aplay /dev/urandom? If audio is running you should see DMA
  interrupt count increasing with grep DMA /proc/interrupts.
 

 Yes, DMA interrupt count increased after aplay /dev/urandom or some
 other audio file.
 Thanks

  If that is working then issue could be in codec side. I don't have a
  beagle at the moment to verify but IRCC something like ~10
 TWL4030 ALSA
  controls must be adjusted in order to route audio from DAC
 to outputs
  at proper volume.

 I don't have HW with me right now, can you try the following?
 (Got the steps over phone from Abhilash)

 1) run command alsamixer
 2) Un-mute by pressing the key m
 3) Play the audio using aplay

 If it doesn't work, you may want to check the options used by
 alsamixer. I will be able to try it myself tomorrow morning.


 Thanks for your reply.
 It seems pressing the key m has no effect during alsamixer and there
 are so many options I don't know how to adjust it.

   I've never tried playing audio in beagleboardxm but I've tried
 using 3430 SDP.
   You can try with the following settings.

 amixer cset name=HandsfreeR Switch 1
 amixer cset name=HandsfreeR Mux 2
 amixer cset name=HandsfreeL Switch 1
 amixer cset name=HandsfreeL Mux 2
 amixer cset name=DAC1 Analog Playback Switch 1
 amixer cset name=DAC1 Analog Playback Volume 12
 amixer cset name=DAC1 Digital Coarse Playback Volume 2
 amixer cset name=DAC1 Digital Fine Playback Volume 50
 amixer cset name=DAC2 Analog Playback Switch 1
 amixer cset name=DAC2 Analog Playback Volume 12
 amixer cset name=DAC2 Digital Coarse Playback Volume 2
 amixer cset name=DAC2 Digital Fine Playback Volume 50

 aplay -D plughw:0,0 -d 5 /mnt/mmc/beethoven.wav


Hi, Kishon

Thanks for your help.
After these amixer commands, there is still no sound.
Below is amixer result.
(I am sure the hardware has no problem because I used kernel-2.6.32
the audio works fine).

---
# amixer cget name=HandsfreeR Switch
numid=35,iface=MIXER,name='HandsfreeR Switch'
  ; type=BOOLEAN,access=rw--,values=1
  : values=on
# amixer cget name=HandsfreeR Mux
numid=36,iface=MIXER,name='HandsfreeR Mux'
  ; type=ENUMERATED,access=rw--,values=1,items=4
  ; Item #0 'Voice'
  ; Item #1 'AudioR1'
  ; Item #2 'AudioR2'
  ; Item #3 'AudioL2'
  : values=2
# amixer cget name=HandsfreeL Switch
numid=37,iface=MIXER,name='HandsfreeL Switch'
  ; type=BOOLEAN,access=rw--,values=1
  : values=on
# amixer cget name=HandsfreeL Mux
numid=38,iface=MIXER,name='HandsfreeL Mux'
  ; type=ENUMERATED,access=rw--,values=1,items=4
  ; Item #0 'Voice'
  ; Item #1 'AudioL1'
  ; Item #2 'AudioL2'
  ; Item #3 'AudioR2'
  : values=2
# amixer cget name=DAC1 Analog Playback Switch
numid=8,iface=MIXER,name='DAC1 Analog Playback Switch'
  ; type=BOOLEAN,access=rw--,values=2
  : values=on,on
# amixer cget name=DAC1 Analog Playback Volume
numid=6,iface=MIXER,name='DAC1 Analog Playback Volume'
  ; type=INTEGER,access=rw---R--,values=2,min=0,max=18,step=0
  : values=12,12
  | dBscale-min=-24.00dB,step=2.00dB,mute=0
# amixer cget name=DAC1 Digital Coarse Playback Volume
numid=4,iface=MIXER,name='DAC1 Digital Coarse Playback Volume'
  ; type=INTEGER,access=rw---R--,values=2,min=0,max=2,step=0
  : values=2,2
  | dBscale-min=0.00dB,step=6.00dB,mute=0
# amixer cget name=DAC1 Digital Fine Playback Volume
numid=2,iface=MIXER,name='DAC1 Digital Fine Playback Volume'
  ; type=INTEGER,access=rw---R--,values=2,min=0,max=63,step=0
  : values=50,50
  | dBscale-min=-63.00dB,step=1.00dB,mute=1
# amixer cget name=DAC2 Analog Playback Switch
numid=9,iface=MIXER,name='DAC2 Analog Playback Switch'
  ; type=BOOLEAN,access=rw--,values=2

[HELP] Audio on BeagleBoard xM can't work

2011-03-14 Thread Bob Liu
Hi, folks,

I am using 2.6.37-rc3(from linux-2.6.git not linux-omap.git) and I am
not able to play any audio on my beagleboard-xM.

The log is like this:
-
# aplay a.wav
Playing WAVE 'a.wav' : Signed 16 bit Little Endasoc: interface
omap-mcbsp-dai.1 hw params failed
ian, Rate 8000 Hz, Mono
aplay: set_params:1053: Unable to install hw params:
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 16
CHANNELS: 1
RATE: 8000
PERIOD_TIME: 125000
PERIOD_SIZE: 1000
PERIOD_BYTES: 2000
PERIODS: 4
BUFFER_TIME: 50
BUFFER_SIZE: 4000
BUFFER_BYTES: 8000
TICK_TIME: 0
#
-

It seems that the code in sound/soc/omap/omap-mcbsp.c uses the function
cpu-is-omap343x() which fails and returns ENODEV.

But I have enabled OMAP3430 support in System Type / TI OMAP2/3/4
Specific Features,
why it still return ENODEV? (Attached my kernel config).

And after I changed that check to cpu-is-omap34xx(), there was no
error message but neither any audio output,
I can't hear any sound.

# aplay a.wav
Playing WAVE 'a.wav' : Signed 16 bit Little Endian, Rate 8000 Hz, Mono

-

And suggestion is welcome, Thanks!

-- 
Regards,
--Bob


beagle-audio.config
Description: Binary data


Re: [PATCH] arm: omap3beagle: init musb default role by Kconfig

2011-02-16 Thread Bob Liu
On Wed, Feb 16, 2011 at 4:05 PM, Felipe Balbi ba...@ti.com wrote:
 On Wed, Feb 16, 2011 at 10:07:26AM +0800, Bob Liu wrote:
 On Tue, Feb 15, 2011 at 7:23 PM, Felipe Balbi ba...@ti.com wrote:
  Hi,
 
  On Tue, Feb 15, 2011 at 04:55:00PM +0800, Bob Liu wrote:
  Currently musb is initialized to OTG mode by default in musb_board_data, 
  it's
  better to init it depending on Kconfig.
 
  what's the problem in always keeping OTG ? that board is wired for OTG
  anyway.
 

 Yeah, but it's better if user can make their choices by themselves.
 Or mask the other choices in Kconfig if keeping OTG.
 Currently user can select HOST-only mode in Kconfig, but will receive
 compiler error.
 In my opinion, this should be consist.

 compile error ?? Would you share that ? All I see is a dev_err() when
 Kconfig doesn't match board-file.

 Another problem is if keeping in OTG mode, my board can't recognize usb 
 device.
 HOST-only mode works fine, I am still debugging on it.
 But I think it's not related with current topic.

 I can be related. Try this:

Yeah, it works. Thanks, sorry for the noise
.
BTW: Is the below patch which about musb_core.c will be merged into mainline ?


 diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
 index 54a8bd1..bc29655 100644
 --- a/drivers/usb/musb/musb_core.c
 +++ b/drivers/usb/musb/musb_core.c
 @@ -1949,31 +1949,6 @@ musb_init_controller(struct device *dev, int nIrq, 
 void __iomem *ctrl)
                goto fail0;
        }

 -       switch (plat-mode) {
 -       case MUSB_HOST:
 -#ifdef CONFIG_USB_MUSB_HDRC_HCD
 -               break;
 -#else
 -               goto bad_config;
 -#endif
 -       case MUSB_PERIPHERAL:
 -#ifdef CONFIG_USB_GADGET_MUSB_HDRC
 -               break;
 -#else
 -               goto bad_config;
 -#endif
 -       case MUSB_OTG:
 -#ifdef CONFIG_USB_MUSB_OTG
 -               break;
 -#else
 -bad_config:
 -#endif
 -       default:
 -               dev_err(dev, incompatible Kconfig role setting\n);
 -               status = -EINVAL;
 -               goto fail0;
 -       }
 -
        /* allocate */
        musb = allocate_instance(dev, plat-config, ctrl);
        if (!musb) {


-- 
Regards,
--Bob
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] arm: omap3beagle: init musb default role by Kconfig

2011-02-15 Thread Bob Liu
Currently musb is initialized to OTG mode by default in musb_board_data, it's
better to init it depending on Kconfig.

Signed-off-by: Bob Liu lliu...@gmail.com
---
 arch/arm/mach-omap2/board-omap3beagle.c |8 +++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-omap2/board-omap3beagle.c 
b/arch/arm/mach-omap2/board-omap3beagle.c
index 14f4224..fb82773 100644
--- a/arch/arm/mach-omap2/board-omap3beagle.c
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
@@ -554,7 +554,13 @@ static struct omap_board_mux board_mux[] __initdata = {
 
 static struct omap_musb_board_data musb_board_data = {
.interface_type = MUSB_INTERFACE_ULPI,
-   .mode   = MUSB_OTG,
+#if defined(CONFIG_USB_MUSB_OTG)
+   .mode   = MUSB_OTG,
+#elif defined(CONFIG_USB_MUSB_HDRC_HCD)
+   .mode   = MUSB_HOST,
+#elif defined(CONFIG_USB_GADGET_MUSB_HDRC)
+   .mode   = MUSB_PERIPHERAL,
+#endif
.power  = 100,
 };
 
-- 
1.6.3.3

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] arm: omap3beagle: init musb default role by Kconfig

2011-02-15 Thread Bob Liu
On Tue, Feb 15, 2011 at 7:23 PM, Felipe Balbi ba...@ti.com wrote:
 Hi,

 On Tue, Feb 15, 2011 at 04:55:00PM +0800, Bob Liu wrote:
 Currently musb is initialized to OTG mode by default in musb_board_data, it's
 better to init it depending on Kconfig.

 what's the problem in always keeping OTG ? that board is wired for OTG
 anyway.


Yeah, but it's better if user can make their choices by themselves.
Or mask the other choices in Kconfig if keeping OTG.
Currently user can select HOST-only mode in Kconfig, but will receive
compiler error.
In my opinion, this should be consist.

Another problem is if keeping in OTG mode, my board can't recognize usb device.
HOST-only mode works fine, I am still debugging on it.
But I think it's not related with current topic.

Thanks
-- 
Regards,
--Bob
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[HELP-OMAP-SERAIL] beagleboard-xM can't boot up after update to kernel-2.6.37

2011-01-19 Thread Bob Liu
Hi, folks

After I update kernel from 2.6.36.2 to 2.6.37, my beagleboard-xM can't bootup.
The message is:
===
Texas Instruments X-Loader 1.4.4ss (Aug 19 2010 - 02:49:27)
Beagle xM Rev A
Reading boot sector
Loading u-boot.bin from mmc


U-Boot 2010.12-svn2585 (ADI-2011R1-pre) (Jan 17 2011 - 11:09:50)

OMAP3630/3730-GP ES2.0, CPU-OPP2, L3-165MHz, Max CPU Clock 1 Ghz
OMAP3 Beagle board + LPDDR/NAND
I2C:   ready
DRAM:  512 MiB
NAND:  0 MiB
MMC:   OMAP SD/MMC: 0
*** Warning - readenv() failed, using default environment

In:serial
Out:   serial
Err:   serial
Beagle xM Rev A
No EEPROM on expansion board
Die ID #15dc00211ff0015739eb08018030
Hit any key to stop autoboot:  0
OMAP3 beagleboard.org # run bootcmd
reading boot.scr

** Unable to read boot.scr from mmc 0:1 **
reading uImage

1903484 bytes read
Booting from mmc ...
## Booting kernel from Legacy Image at 8200 ...
   Image Name:   Linux-2.6.37-ADI-2011R1-pre-g02d
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:1903420 Bytes = 1.8 MiB
   Load Address: 80008000
   Entry Point:  80008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
=

Then nothing appears.
I think the reason is 2.6.37 using omap-serial driver.
After I force it using 8250 serial driver, it works fine.

Any ideas?
Thanks !

Attach my linux .config file.
-- 
Regards,
--Bob


omap3.config
Description: Binary data


Re: [HELP-OMAP-SERAIL] beagleboard-xM can't boot up after update to kernel-2.6.37

2011-01-19 Thread Bob Liu
On Wed, Jan 19, 2011 at 7:06 PM, Felipe Balbi ba...@ti.com wrote:
 Hi,

 On Wed, Jan 19, 2011 at 06:57:33PM +0800, Bob Liu wrote:
 Any ideas?

 s/console=ttyS2,115200n8/console=ttyO2,115200n8/

 on your CMDLINE.


Yeah, that work! Thanks!

But my system still can't enter shell, I have changed /etc/inittab
from tty0::respawn:/sbin/getty -L ttyS2 115200 vt102 to
tty0::respawn:/sbin/getty -L ttyO2 115200 vt102, and also have added
ttyO2 to /etc/securetty.

Thanks.

The detail log is below:
===
CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c53c7f
CPU: VIPT nonaliasing data cache, VIPT aliasing instruction cache
Machine: OMAP3 Beagle Board
Memory policy: ECC disabled, Data cache writeback
OMAP3630 ES1.1 (l2cache iva sgx neon isp 192mhz_clk )
SRAM: Mapped pa 0x4020 to va 0xfe40 size: 0x1
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 130048
Kernel command line: console=ttyO2,115200n8 mpurate=800 vram=12M
omapfb.mode=dvi:1024x768MR-16@60 omapfb.debug=y omapdss.def_disp=dvi
root=/dev/mmcblk0p2 rw rootfstype=ext3 rootwait
PID hash table entries: 2048 (order: 1, 8192 bytes)
Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
Memory: 512MB = 512MB total
Memory: 489120k/489120k available, 35168k reserved, 0K highmem
Virtual kernel memory layout:
vector  : 0x - 0x1000   (   4 kB)
fixmap  : 0xfff0 - 0xfffe   ( 896 kB)
DMA : 0xffc0 - 0xffe0   (   2 MB)
vmalloc : 0xe080 - 0xf800   ( 376 MB)
lowmem  : 0xc000 - 0xe000   ( 512 MB)
modules : 0xbf00 - 0xc000   (  16 MB)
  .init : 0xc0008000 - 0xc1a61000   (26980 kB)
  .text : 0xc1a61000 - 0xc1d9e260   (3317 kB)
  .data : 0xc1da - 0xc1dd4660   ( 210 kB)
NR_IRQS:402
Clocking rate (Crystal/Core/MPU): 26.0/332/600 MHz
Reprogramming SDRC clock to 33200 Hz
GPMC revision 5.0
IRQ: Found an INTC at 0xfa20 (revision 4.0) with 96 interrupts
Total of 96 interrupts on 1 active controller
OMAP GPIO hardware version 2.5
OMAP clockevent source: GPTIMER12 at 32768 Hz
Console: colour dummy device 80x30
Calibrating delay loop... 484.21 BogoMIPS (lpj=1892352)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
regulator: core version 0.5
regulator: dummy:
NET: Registered protocol family 16
OMAP3 Beagle Rev: xM
Found NAND on CS0
Registering NAND on CS0
Unable to get DVI reset GPIO
Switched to new clocking rate (Crystal/Core/MPU): 26.0/800/332 MHz
OMAP DMA hardware revision 5.0
bio: create slab bio-0 at 0
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
i2c_omap i2c_omap.1: bus 1 rev4.0 at 2600 kHz
twl4030: PIH (irq 7) chaining IRQs 368..375
twl4030: power (irq 373) chaining IRQs 376..383
twl4030: gpio (irq 368) chaining IRQs 384..401
regulator: VUSB1V5: 1500 mV normal standby
regulator: VUSB1V8: 1800 mV normal standby
regulator: VUSB3V1: 3100 mV normal standby
twl4030_usb twl4030_usb: Initialized TWL4030 USB module
regulator: VMMC1: 1850 -- 3150 mV at 3000 mV normal standby
regulator: VDAC: 1800 mV normal standby
regulator: VDVI: 1800 mV normal standby
regulator: VSIM: 1800 -- 3000 mV at 1800 mV normal standby
i2c_omap i2c_omap.3: bus 3 rev4.0 at 100 kHz
Switching to clocksource 32k_counter
musb_hdrc: version 6.0, musb-dma, host, debug=0
musb_hdrc musb_hdrc: incompatible Kconfig role setting
musb_hdrc: probe of musb_hdrc failed with error -22
NET: Registered protocol family 2
IP route cache hash table entries: 4096 (order: 2, 16384 bytes)
TCP established hash table entries: 16384 (order: 5, 131072 bytes)
TCP bind hash table entries: 16384 (order: 4, 65536 bytes)
TCP: Hash tables configured (established 16384 bind 16384)
TCP reno registered
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
VFS: Disk quotas dquot_6.5.2
Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
msgmni has been set to 955
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
omap-hsuart.0: ttyO0 at MMIO 0x4806a000 (irq = 72) is a OMAP UART0
omap-hsuart.1: ttyO1 at MMIO 0x4806c000 (irq = 73) is a OMAP UART1
omap-hsuart.2: ttyO2 at MMIO 0x4902 (irq = 74) is a OMAP UART2
console [ttyO2] enabled
omap-hsuart.3: ttyO3 at MMIO 0x49042000 (irq = 80) is a OMAP UART3
brd: module loaded
loop: module loaded
usbcore: registered new interface driver asix
usbcore: registered new interface driver cdc_ether
usbcore: registered new interface driver smsc95xx
usbcore: registered new interface driver net1080
usbcore: registered new interface driver cdc_subset
usbcore

Re: [HELP-OMAP-SERAIL] beagleboard-xM can't boot up after update to kernel-2.6.37

2011-01-19 Thread Bob Liu
On Thu, Jan 20, 2011 at 2:30 PM, Felipe Balbi ba...@ti.com wrote:
 On Thu, Jan 20, 2011 at 01:32:24PM +0800, Bob Liu wrote:
 On Wed, Jan 19, 2011 at 7:06 PM, Felipe Balbi ba...@ti.com wrote:
  Hi,
 
  On Wed, Jan 19, 2011 at 06:57:33PM +0800, Bob Liu wrote:
  Any ideas?
 
  s/console=ttyS2,115200n8/console=ttyO2,115200n8/
 
  on your CMDLINE.
 

 Yeah, that work! Thanks!

 But my system still can't enter shell, I have changed /etc/inittab
 from tty0::respawn:/sbin/getty -L ttyS2 115200 vt102 to
 tty0::respawn:/sbin/getty -L ttyO2 115200 vt102, and also have added
 ttyO2 to /etc/securetty.

 Add this line to /etc/inittab:

 1:2345:respawn:/sbin/getty 115200 ttyO2


Hi, balbi

I tried it ,this can't work.
always show: can't open /dev/1: No such file or directory.

Now I fixed this problem by add major and minor number to struct
serial_omap_reg in omap-serial.c. The same major minor number as
8250.c.
It can enter console now.

Thanks
-- 
Regards,
--Bob
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [HELP-OMAP-SERAIL] beagleboard-xM can't boot up after update to kernel-2.6.37

2011-01-19 Thread Bob Liu
On Thu, Jan 20, 2011 at 2:33 PM, G, Manjunath Kondaiah manj...@ti.com wrote:
 On Thu, Jan 20, 2011 at 01:32:24PM +0800, Bob Liu wrote:
 On Wed, Jan 19, 2011 at 7:06 PM, Felipe Balbi ba...@ti.com wrote:
  Hi,
 
  On Wed, Jan 19, 2011 at 06:57:33PM +0800, Bob Liu wrote:
  Any ideas?
 
  s/console=ttyS2,115200n8/console=ttyO2,115200n8/
 
  on your CMDLINE.
 

 Yeah, that work! Thanks!

 But my system still can't enter shell, I have changed /etc/inittab
 from tty0::respawn:/sbin/getty -L ttyS2 115200 vt102 to
 tty0::respawn:/sbin/getty -L ttyO2 115200 vt102, and also have added
 ttyO2 to /etc/securetty.
 Looks like file system issue. You can try with below fs:
 http://code.google.com/p/beagleboard/downloads/detail?name=ALSA-FS.tar.gzcan=2q=


Yeah, I also think it's file system issue. I added major and minor
number to omap-serial driver, it fix the problem temporary.

 No need to edit /etc/inittab with above fs since ttyO2 is mapped to
 console device file under /dev

Do you know how to do this map during build a fs?
Thanks.

-- 
Regards,
--Bob
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [HELP-OMAP-SERAIL] beagleboard-xM can't boot up after update to kernel-2.6.37

2011-01-19 Thread Bob Liu
On Thu, Jan 20, 2011 at 2:50 PM, Felipe Balbi ba...@ti.com wrote:
 Hi,

 On Thu, Jan 20, 2011 at 02:46:47PM +0800, Bob Liu wrote:
 Yeah, I also think it's file system issue. I added major and minor
 number to omap-serial driver, it fix the problem temporary.

  No need to edit /etc/inittab with above fs since ttyO2 is mapped to
  console device file under /dev

 Do you know how to do this map during build a fs?
 Thanks.

 which FS do you use ? I use a debootstrap generally :-p


I use buildroot to generate an initramfs :-)
Of course I made some changes.

If using 8250 serial driver, my fs works well,it can enter console correctly.
But using omap-serial driver, it can't.

I think there maybe some problem about the ttyO2 node in my fs.
So I add it to my fs by hand, so i need to know it's major  minor number,
so I added major minor number to omap-serial driver.
It seems working okay now.

-- 
Regards,
--Bob
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH V2 6/8] usb: musb: Offmode fix for idle path

2010-08-06 Thread Bob Liu
On Sat, Aug 7, 2010 at 1:27 AM, Hema HK hem...@ti.com wrote:
 From: Hema HK  hem...@ti.com

 With OMAP core-off support musb was not functional as context was getting
 lost after wakeup from core-off. And also musb was blocking the core-off
 after loading the gadget driver even with no cable connected sometimes.

 Added the conext save/restore api in the platform layer which will
 be called in the idle and wakeup path.

 Changed the usb sysconfig settings as per the usbotg functional spec.
 When the device is not active, configure to force idle and force standby mode.
 When it is being used, configure in smart standby and smart idle mode.
 So while attempting to coreoff the usb is configured to force standby and
 force idle mode, after wakeup configured in smart idle and smart standby.

 Signed-off-by: Hema HK hem...@ti.com
 Signed-off-by: Maulik Mankad x0082...@ti.com

 Cc: Felipe Balbi felipe.ba...@nokia.com
 Cc: Tony Lindgren t...@atomide.com
 Cc: Kevin Hilman khil...@deeprootsystems.com
 ---

  arch/arm/mach-omap2/pm34xx.c          |    4 ++
  arch/arm/mach-omap2/usb-musb.c        |   21 ++
  arch/arm/plat-omap/include/plat/usb.h |    2 +
  drivers/usb/musb/musb_core.c          |   11 ---
  drivers/usb/musb/omap2430.c           |   48 
 +++---
  5 files changed, 71 insertions(+), 15 deletions(-)

 Index: linux-omap-pm/arch/arm/mach-omap2/pm34xx.c
 ===
 --- linux-omap-pm.orig/arch/arm/mach-omap2/pm34xx.c     2010-08-06 
 09:23:01.153862710 -0400
 +++ linux-omap-pm/arch/arm/mach-omap2/pm34xx.c  2010-08-06 10:44:06.393863125 
 -0400
 @@ -39,6 +39,7 @@
  #include plat/gpmc.h
  #include plat/dma.h
  #include plat/dmtimer.h
 +#include plat/usb.h

  #include asm/tlbflush.h

 @@ -416,6 +417,8 @@
                if (core_next_state == PWRDM_POWER_OFF) {
                        omap3_core_save_context();
                        omap3_prcm_save_context();
 +                       /* Save MUSB context */
 +                       musb_context_save_restore(1);
                }
        }

 @@ -458,6 +461,8 @@
                        omap3_prcm_restore_context();
                        omap3_sram_restore_context();
                        omap2_sms_restore_context();
 +                       /* restore MUSB context */
 +                       musb_context_save_restore(0);
                }
                omap_uart_resume_idle(0);
                omap_uart_resume_idle(1);
 Index: linux-omap-pm/arch/arm/mach-omap2/usb-musb.c
 ===
 --- linux-omap-pm.orig/arch/arm/mach-omap2/usb-musb.c   2010-08-06 
 09:24:23.690112596 -0400
 +++ linux-omap-pm/arch/arm/mach-omap2/usb-musb.c        2010-08-06 
 10:44:06.385862697 -0400
 @@ -120,6 +120,27 @@
        }
  }

 +void musb_context_save_restore(int save)
 +{
 +       struct omap_hwmod *oh = omap_hwmod_lookup(usb_otg_hs);
 +       struct omap_device *od = oh-od;
 +       struct platform_device *pdev = od-pdev;
 +       struct device *dev = pdev-dev;
 +       struct device_driver *drv = dev-driver;
 +
 +       if (drv) {
 +               struct musb_hdrc_platform_data *pdata = dev-platform_data;
 +               const struct dev_pm_ops *pm = drv-pm;
 +               if (!pdata-is_usb_active(dev)) {
 +
 +                       if (save)
 +                               pm-suspend(dev);
 +                       else
 +                               pm-resume_noirq(dev);
 +               }
 +       }
 +}
 +
  #else
  void __init usb_musb_init(struct omap_musb_board_data *board_data)
  {
 Index: linux-omap-pm/arch/arm/plat-omap/include/plat/usb.h
 ===
 --- linux-omap-pm.orig/arch/arm/plat-omap/include/plat/usb.h    2010-08-06 
 09:23:01.137862514 -0400
 +++ linux-omap-pm/arch/arm/plat-omap/include/plat/usb.h 2010-08-06 
 10:44:06.381864367 -0400
 @@ -79,6 +79,8 @@

  extern void usb_ohci_init(const struct ohci_hcd_omap_platform_data *pdata);

 +/* For saving and restoring the musb context during off/wakeup*/
 +extern void musb_context_save_restore(int save);
  #endif


 Index: linux-omap-pm/drivers/usb/musb/musb_core.c
 ===
 --- linux-omap-pm.orig/drivers/usb/musb/musb_core.c     2010-08-06 
 09:24:21.069863329 -0400
 +++ linux-omap-pm/drivers/usb/musb/musb_core.c  2010-08-06 10:44:06.369863527 
 -0400
 @@ -2427,11 +2427,6 @@
        }

        musb_save_context(musb);
 -
 -       if (musb-set_clock)
 -               musb-set_clock(musb-clock, 0);
 -       else
 -               clk_disable(musb-clock);
        spin_unlock_irqrestore(musb-lock, flags);
        return 0;
  }
 @@ -2443,12 +2438,6 @@

        if (!musb-clock)
                return 0;

Is this check can be deleted also ?
Because our blackfin platform have no clock support now.
Thanks.

 -
 -       if (musb-set_clock)
 -