Re: blob2 status on A1200 (etc.)

2008-06-04 Thread Michael 'Mickey' Lauer
On Wednesday 04 June 2008 16:11:18 Daniel Ribeiro wrote:
> >> The time has come for me to do work on the integration of the EZX
> >> specifics
> >> into ophoned (the open phone server), since the way EZX multiplexes
> >> the GSM
> >> is quite different from the way the TI Calypso (found in the Openmoko
> >> Neos)
> >> work.
>
>   Thanks! But I dont know if the mux driver will work on a1200. This will
> need some testing, volunteers? :)

I'll do that gladly once I have blob2ified my a1200.

> >> Therefore, I need a device where I can talk to the BP. I want to use
> >> my A1200
> >> for these experiments. What's the status of blob2 on this device?
>
>   Currently there is no blob2 for 2nd gen phones.
>
>   I will work on one, you may expect it to be ready until next monday.
>   I will make one that works on all phones, the only shortcomming is that
> there will be no FB driver, nothing will appear on the screen.
>   It will also fix ATAGS/cmdline/initrd support for 2nd gen phones.

Wow, excellent! Keep me posted.

> Koen Kooi escreveu:
> > what's the status of blob2 on a780 phones? I'm eager to try 2.6.25, but
> > it seems that won't work due to machine id changes.
>
>   You can try .25 with the latest boot_usb, you just cant write it to
> flash yet. Next version will work even flashed for both generations. :)

Yay!

Cheers,

Mickey.

-- 
Dr. Michael 'Mickey' Lauer | IT-Freelancer | http://www.vanille-media.de



USB Interface docs

2008-06-04 Thread Dirk Thierbach
Hello list,

I have here a Motorola W230 phone, which when connected to my Linux
box shows up as a Texas Instruments USB device with vendor-specific
interface and two bulk endpoints. I know that the W230 isn't the subject 
of the openezx project, but is it possible that this interface is
similar to any of those found in phones known by openezx developers?
If yes, I'd appreciate any pointers to code/documentation that could
help me understand how to use it (as modem, to access internal storage,
or whatever).

I'm not subscribed to the list, so please CC any answers to me directly.

Output of lsusb -v is:

Bus 002 Device 002: ID 0451:d004 Texas Instruments, Inc. 
Device Descriptor:
  bLength18
  bDescriptorType 1
  bcdUSB   1.10
  bDeviceClass  255 Vendor Specific Class
  bDeviceSubClass   255 Vendor Specific Subclass
  bDeviceProtocol   255 Vendor Specific Protocol
  bMaxPacketSize064
  idVendor   0x0451 Texas Instruments, Inc.
  idProduct  0xd004 
  bcdDevice0.00
  iManufacturer   1 
  iProduct2 
  iSerial 0 
  bNumConfigurations  1
  Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength   32
bNumInterfaces  1
bConfigurationValue 1
iConfiguration  3 
bmAttributes 0xc0
  Self Powered
MaxPower  100mA
Interface Descriptor:
  bLength 9
  bDescriptorType 4
  bInterfaceNumber0
  bAlternateSetting   0
  bNumEndpoints   2
  bInterfaceClass   255 Vendor Specific Class
  bInterfaceSubClass255 Vendor Specific Subclass
  bInterfaceProtocol255 Vendor Specific Protocol
  iInterface  4 
  Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81  EP 1 IN
bmAttributes2
  Transfer TypeBulk
  Synch Type   None
  Usage Type   Data
wMaxPacketSize 0x0040  bytes 64 once
bInterval   0
  Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x02  EP 2 OUT
bmAttributes2
  Transfer TypeBulk
  Synch Type   None
  Usage Type   Data
wMaxPacketSize 0x0040  bytes 64 once
bInterval   0

Thanks in advance for any help,

- Dirk




Re: [PATCH] fix i2s emulation on pxa2xx-ssp

2008-06-04 Thread pHilipp Zabel
On Wed, Jun 4, 2008 at 1:40 AM, Daniel Ribeiro <[EMAIL PROTECTED]> wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Antonio Ospite escreveu:
>> I talked with Philipp Zabel about your changes, and obviously he said
>> that this change is way better than my hackish solution but it is not
>> _right_ yet.
>
>Philipp code is wrong, not mine. ;)

Hehe, I never said that the existing code is right.
There's a big fat FIXME in there for a reason :)

>>  ao2: that isn't universally good either, because on my device
>>   they used TISSP mode, not PSP
>
>PSP allows you to set almost any configuration on the port, using TISSP
> is not necessary. TISSP behaviour may be "emulated" by PSP, see below.

This is interesting. If this is possible, is there any advantage of
setting TISSP mode over emulating it via PSP?

>>  also you don't clear SSPSP in i2s emulation mode
>>   anymore, which according to pxa27x docs is needed.
>
>Where on the manual is this said?? The manual says:
[...]
> * SSPSP = 0x0210 (all bit fields must be cleared except:
> FSRT = 1 and SFRMWDTH = 16, DMYSTART=0,1)

That's what I meant. The code I saw just did SSPSP |= ... IIRC (if I
read correctly).

>Please, note that the _mandatory_ bits are expressed on the first
> paragraph. The second paragraph shows the _recommended_ settings, values
> on the second paragraph are not mandatory. We are using I2S emulation
> with SCLKDIR and SFRMDIR *set* (pxa is _slave_) and it is working just fine.

I didn't remember that mandatory vs. recommended bit. I was talking
only about SSPSP.

>Philipp's device is _not_using_i2s_emulation_. DSS=32bit and EDSS are
> _mandatory_ for I2S (I2S always use 32bit frames).

Both true. Magician is supposed to use 32bit, MSB though:

 /* FIXME: this is what wince uses for msb */
 if ((fmt & SND_SOC_DAIFMT_FORMAT_MASK) == SND_SOC_DAIFMT_MSB) {
 __raw_writel(SSCR0_EDSS | SSCR0_TISSP | SSCR0_DataSize(16),
 mmio_base + SSCR0);
 goto master;
 }

>Changes to EDSS|DSS on ssp_set_dai_fmt are useless (without my patch)
> because they are overriden by ssp_hw_params. Philipp can try this by
> removing EDSS|DSS from ssp_set_dai_fmt and i am 100% sure that his
> device will still work.

Hmm. Will try. If I understand this correctly, EDSS/DSS should not be touched in
set_dai_fmt at all?

>From the PXA manual, TISSP:
>1. The first bit (MSB) is transmitted one bitclk after SFRM is 
> asserted.
>2. Output transitions occur on the rising edge of SSPSCLKx while data
> sampling occurs on the falling edge.
>
>The same may be accomplished with PSP by:
>1. SFRMWDTH=[1-(anything less than the frame size)], DMYSTRT=1
>2. SCMODE=[1-2].
>
>Philipp, could you please try to set your dai_fmt to
> SND_SOC_DAIFMT_DSP_A | SND_SOC_DAIFMT_CBS_CFS | SND_SOC_DAIFMT_IB_IF and
> report the results?? Hope this helps. ;)

Ok, I will check this during the weekend

regards
Philipp



Re: [PATCH] fix i2s emulation on pxa2xx-ssp

2008-06-04 Thread Daniel Ribeiro
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

pHilipp Zabel escreveu:
>>PSP allows you to set almost any configuration on the port, using 
>> TISSP
>> is not necessary. TISSP behaviour may be "emulated" by PSP, see below.
> 
> This is interesting. If this is possible, is there any advantage of
> setting TISSP mode over emulating it via PSP?

No difference. I consider that the other SSP modes of operation are
just pre-defined PSP configurations. :)
In fact, the manual says that SSPSP values are ignored if the port mode
is not PSP(8.5.3) and numerous other times it says that SSPSP is NOT
ignored on other port modes(8.4.4.2(Motorola SPI), 8.4.4.3(Microwire),
Table 8-8(TISSP)).

> That's what I meant. The code I saw just did SSPSP |= ... IIRC (if I
> read correctly).
...
> I didn't remember that mandatory vs. recommended bit. I was talking
> only about SSPSP.

To me it looks like 8.4.11 of the pxa manual is "unfinished", I only
considered the first paragraph, and ignored the _examples_. This made my
life easier.

>>Philipp's device is _not_using_i2s_emulation_. DSS=32bit and EDSS are
>> _mandatory_ for I2S (I2S always use 32bit frames).
> 
> Both true. Magician is supposed to use 32bit, MSB though:
> 
>  /* FIXME: this is what wince uses for msb */
>  if ((fmt & SND_SOC_DAIFMT_FORMAT_MASK) == SND_SOC_DAIFMT_MSB) {
>  __raw_writel(SSCR0_EDSS | SSCR0_TISSP | SSCR0_DataSize(16),
>  mmio_base + SSCR0);
>  goto master;
>  }

But with the current code, ssp_hw_params changes the frame size
depending on the PCM format. With the very common 16 bit stereo audio,
EDSS is cleared changing the frame size to 16 bits. If it currently
works with 16bit stereo pcm, its definitely not expecting 32bit frames.
I2S "emulation" is nothing more than enforcing 32bit frames even for
non 32bit pcm data. MSB is the same as I2S, but with SFRM inverted
(left/right channels swapped) and without the 1 bclk delay before the
MSB (Figure 14-1 and 14-2 from the manual).

>>Changes to EDSS|DSS on ssp_set_dai_fmt are useless (without my patch)
>> because they are overriden by ssp_hw_params. Philipp can try this by
>> removing EDSS|DSS from ssp_set_dai_fmt and i am 100% sure that his
>> device will still work.
> 
> Hmm. Will try. If I understand this correctly, EDSS/DSS should not be touched 
> in
> set_dai_fmt at all?

Yes! On the I2S case ssp_set_dai_fmt should set some kind of flag so
later ssp_hw_params set the frame size to 32bit regardless of the PCM
format.

>>Philipp, could you please try to set your dai_fmt to
>> SND_SOC_DAIFMT_DSP_A | SND_SOC_DAIFMT_CBS_CFS | SND_SOC_DAIFMT_IB_IF and
>> report the results?? Hope this helps. ;)
> 
> Ok, I will check this during the weekend

Thanks! In theory DMYSTRT=1 will make PSP compatible with TISSP. If im
right, and magician is not expecting 32bit it will work flawlessly.


- --
Daniel Ribeiro
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFIRp4Vw3OYl0G0liQRAvxRAJ93UDNiEWWWov83YtVXfhd8V7GRpQCgoHTL
Rmb+eyxkZ6iZJWR+6oym2j8=
=UeSY
-END PGP SIGNATURE-



Re: blob2 status on A1200 (etc.)

2008-06-04 Thread Daniel Ribeiro
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

> Op 4 jun 2008, om 13:39 heeft Michael 'Mickey' Lauer het volgende
> geschreven:
> 
>> Hi Ho,
> 
>> thanks to rapid progress on the Openmoko Framework initiative (see
>> wiki page
>> and my blog posts), within the next couple of months, we will have a
>> userland
>> that looks nice and works as a phone and sms application on EZX phones.

Great!

>> The time has come for me to do work on the integration of the EZX
>> specifics
>> into ophoned (the open phone server), since the way EZX multiplexes
>> the GSM
>> is quite different from the way the TI Calypso (found in the Openmoko
>> Neos)
>> work.

Thanks! But I dont know if the mux driver will work on a1200. This will
need some testing, volunteers? :)

>> Therefore, I need a device where I can talk to the BP. I want to use
>> my A1200
>> for these experiments. What's the status of blob2 on this device?

Currently there is no blob2 for 2nd gen phones.

I will work on one, you may expect it to be ready until next monday.
I will make one that works on all phones, the only shortcomming is that
there will be no FB driver, nothing will appear on the screen.
It will also fix ATAGS/cmdline/initrd support for 2nd gen phones.

Koen Kooi escreveu:
> what's the status of blob2 on a780 phones? I'm eager to try 2.6.25, but
> it seems that won't work due to machine id changes.

You can try .25 with the latest boot_usb, you just cant write it to
flash yet. Next version will work even flashed for both generations. :)

- --
Daniel Ribeiro
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFIRqKGw3OYl0G0liQRAo/OAJ4k1cIcxeoRYv1zYgcNYkQ/U9P52gCfd4aY
FA+/QN6dWyGIjKvV6fmDFPU=
=59Ak
-END PGP SIGNATURE-



Re: blob2 status on A1200 (etc.)

2008-06-04 Thread Koen Kooi

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


Op 4 jun 2008, om 13:39 heeft Michael 'Mickey' Lauer het volgende  
geschreven:



Hi Ho,

thanks to rapid progress on the Openmoko Framework initiative (see  
wiki page
and my blog posts), within the next couple of months, we will have a  
userland
that looks nice and works as a phone and sms application on EZX  
phones.


The time has come for me to do work on the integration of the EZX  
specifics
into ophoned (the open phone server), since the way EZX multiplexes  
the GSM
is quite different from the way the TI Calypso (found in the  
Openmoko Neos)

work.

Therefore, I need a device where I can talk to the BP. I want to use  
my A1200

for these experiments. What's the status of blob2 on this device?


And related to that:

what's the status of blob2 on a780 phones? I'm eager to try 2.6.25,  
but it seems that won't work due to machine id changes.


regards,

Koen
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.5 (Darwin)

iD8DBQFIRoj/MkyGM64RGpERAgkvAJ9IowkS+0I0c9Cffe0tktanGZlq5wCgtg7c
NIkuTGniQ/1uWJE0XLhd0tQ=
=n6ux
-END PGP SIGNATURE-



blob2 status on A1200 (etc.)

2008-06-04 Thread Michael 'Mickey' Lauer
Hi Ho,

thanks to rapid progress on the Openmoko Framework initiative (see wiki page 
and my blog posts), within the next couple of months, we will have a userland 
that looks nice and works as a phone and sms application on EZX phones.

The time has come for me to do work on the integration of the EZX specifics 
into ophoned (the open phone server), since the way EZX multiplexes the GSM 
is quite different from the way the TI Calypso (found in the Openmoko Neos) 
work.

Therefore, I need a device where I can talk to the BP. I want to use my A1200 
for these experiments. What's the status of blob2 on this device?

Cheers,

:M:

-- 
Dr. Michael 'Mickey' Lauer | IT-Freelancer | http://www.vanille-media.de