P2 connector use ?


9 posts
by psergiu » Mon May 14, 2012 10:47 pm
Hi everyone.

What's the use of the P2 connector ?
P1 is the GPIO, all pins are doccumented: http://elinux.org/RPi_Low-level_peripherals
P3 is the JTAG, no header attached, useless for us mere mortals.

But what about P2 ? If there's a header attached, then it must be something useful for us end-users. Can we please get a pinout list ? Please ? :)

If this was explained elsewhere, please point me in the right direction - the forum, the wiki and google are not able to search or display relevant results for the term "p2".

Thanks a lot.
User avatar
Posts: 212
Joined: Mon Nov 07, 2011 8:36 am
Location: Bucharest, Romania
by mahjongg » Mon May 14, 2012 11:28 pm
P2 is the JTAG header for the BCM2835 (the Broadcom SoC), and is thus also of no use for us mere mortals, its only used during the production of the board. Probably to program the serial code, and the MAC address I dare to guess.
P3 is, as you said, a similar JTAG header, but it is (only) for the LAN9512 LAN/USB-HUB chip, and there is no need to use it during production, only when debugging a device.

Pinouts of both headers are in the schematic by the way.
User avatar
Forum Moderator
Forum Moderator
Posts: 5201
Joined: Sun Mar 11, 2012 12:19 am
by Morgaine » Tue May 15, 2012 1:53 am
Actually JTAG is a nice thing to have even for mere mortals, as long as it is used with caution and some commonsense. The Pi community is very likely to make use of one or both of the JTAG connectors in due course, as it will assist in debugging of programs with the help of an external development system as is done with any other embedded board. It would be especially valuable for driver development I think.
Intolerance is a failure of education. Education is predicated on tolerance of the uneducated.
User avatar
Posts: 141
Joined: Mon Mar 12, 2012 1:13 am
by psergiu » Tue May 15, 2012 5:51 am
Thanks a lot !

On http://elinux.org/RPi_Low-level_peripherals it says:
It is also possible to reconfigure GPIO connector pins P1-7, 15, 16, 18, 22 (chipset GPIOs 4 and 22 to 25) to provide an ARM JTAG interface.

So i presume P2 is the JTAG for the GPU, used to load the boot code and none of those pins are accesible from the ARM to be used as another GPIO.
Is at least one those 8 pins usable as an extra GND or 3.3V ? The position of the P2 header could be useful for people building plates for extra stability.
User avatar
Posts: 212
Joined: Mon Nov 07, 2011 8:36 am
Location: Bucharest, Romania
by mahjongg » Tue May 15, 2012 8:58 pm
Having JTAG a interface on a chip is almost completely useless, unless you have the accompanying JTAG data file for that chip, and that data file (the "Boundary scan description language" file) is probably unobtainable, unless you have that file you are limited to testing stuff that is connected to the ball grid array pins of the chip in question (doing a "boundary scan"), and even for that you need some info (which pin is connected to which scan cell).

All you can do with the JTAG interface is debugging the hardware external to the SoC, and that does already seem to be working!

P.S.
pin 1 of P2 is connected to 3V3, and pins 7 & 8 are connected to GND.
User avatar
Forum Moderator
Forum Moderator
Posts: 5201
Joined: Sun Mar 11, 2012 12:19 am
by hippy » Tue May 15, 2012 10:09 pm
P2 pin 2 is TRSTN which may provide a means to reset / reboot the whole kaboodle from a push button or some other logic signal without having to cycle power. It may be possible to hold in reset to reduce power consumption rather than switching the supply.

I'm not experienced with ARM hardware and it would need someone to conform or try both.
Posts: 766
Joined: Fri Sep 09, 2011 10:34 pm
by Gert van Loo » Thu May 17, 2012 6:54 pm
hippy wrote:P2 pin 2 is TRSTN which may provide a means to reset / reboot the whole kaboodle from a push button or some other logic signal without having to cycle power. It may be possible to hold in reset to reduce power consumption rather than switching the supply.

I'm not experienced with ARM hardware and it would need someone to conform or try both.


No, that does not work. You can reset the JTAG logic only.
User avatar
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2029
Joined: Tue Aug 02, 2011 7:27 am
by dwelch67 » Fri Jun 01, 2012 4:52 am
Morgaine wrote:Actually JTAG is a nice thing to have even for mere mortals, as long as it is used with caution and some commonsense. The Pi community is very likely to make use of one or both of the JTAG connectors in due course, as it will assist in debugging of programs with the help of an external development system as is done with any other embedded board. It would be especially valuable for driver development I think.


I have jtag working on the Raspberry Pi debugging using the ARM processor debug port. It is not the P2 connector as folks have already figured out. But not everything is on P1 either. see
https://github.com/dwelch67/raspberrypi/tree/master/armjtag

Gert: postedit to put in correct link
Posts: 412
Joined: Sat May 26, 2012 5:32 pm
by AndrewS » Sun Jun 03, 2012 11:03 am
Bad link in above post, try https://github.com/dwelch67/raspberrypi ... er/armjtag instead.
User avatar
Posts: 3494
Joined: Sun Apr 22, 2012 4:50 pm
Location: Cambridge, UK