Difference between revisions of "Lightning Connector"

From The iPhone Wiki
Jump to: navigation, search
m (Lightning Digital AV Adapter)
Line 130: Line 130:
   
 
=== Lightning Digital AV Adapter ===
 
=== Lightning Digital AV Adapter ===
  +
  +
The Lightning Digital AV adapter is based off the Samsung S5L8700 series of chips. This series of processors is mainly used in the iPod nano, and the [[iPod touch 2G]]. The SoC used is the Samsung S5L8747.
  +
  +
The boot chain starts off very much like a normal iOS device, but img3 files for iBSS are uploaded, along with an APTicket. This APTicket remains static for every digital AV adapter. The kernel is then uploaded and then booted.
  +
  +
SoC peripherals look very much akin to other Samsung chips.
   
 
It appears the Lightning Digital AV Adapter has an ARM SoC CPU with part number H9TKNNN2GD and 256MB RAM. There is some discussion regarding the output image quality of this adapter as it appears the video is upscaled from max 1600×900 resoultion to 1080p and also visible (MPEG) compression artifacts. Apparently an Apple Engineer explained details of the adapter at [https://www.panic.com/blog/2013/03/the-lightning-digital-av-adapter-surprise/#comment-16841 www.panic.com]:
 
It appears the Lightning Digital AV Adapter has an ARM SoC CPU with part number H9TKNNN2GD and 256MB RAM. There is some discussion regarding the output image quality of this adapter as it appears the video is upscaled from max 1600×900 resoultion to 1080p and also visible (MPEG) compression artifacts. Apparently an Apple Engineer explained details of the adapter at [https://www.panic.com/blog/2013/03/the-lightning-digital-av-adapter-surprise/#comment-16841 www.panic.com]:

Revision as of 01:33, 5 March 2013

Lightning connector compared to USB
Lightning connector mechanical drawing (front)
Lightning connector from aerial, front, top, and socket angles

Lightning is the "new" connector since the introduction of the iPhone 5, iPad mini, iPad 4 and the 5th generation iPod touch. (For the old connector, see 30-pin Connector.) It was presented by Tim Cook at an Apple Special Event on September 12, 2012. Lightning matches up with the existing Thunderbolt branding as noted by Phil Schiller. According to Apple it as an all-digital connector and "features an adaptive interface that uses only the signals that each accessory requires and also is 80% smaller as well as orientation independent."

  • Lightning is adaptive.
  • All 8 pins are used for signals, and all or most can be switched to be used for power.
  • The outer plug shell is used as ground reference and connected to the device shell.
  • At least one (probably at most two) of the pins is used for detecting what sort of plug is plugged in.
  • All plugs have to contain a controller/driver chip to implement the “adaptive” thing.
  • The device watches for a momentary short on all pins (by the leading edge of the plug) to detect plug insertion/removal.
  • The pins on the plug are deactivated until after the plug is fully inserted, when a wake-up signal on one of the pins cues the chip inside the plug. This avoids any shorting hazard while the plug isn’t inside the connector.
  • The controller/driver chip tells the device what type it is, and for cases like the Lightning-to-USB cable whether a charger (that sends power) or a device (that needs power) is on the other end.
  • The device can then switch the other pins between the SoC’s data lines or the power circuitry, as needed in each case.
  • Once everything is properly set up, the controller/driver chip gets digital signals from the SoC and converts them – via serial/parallel, ADC/DAC, differential drivers or whatever – to whatever is needed by the interface on the other end of the adapter or cable. It could even re-encode these signals to some other format to use fewer wires, gain noise-immunity or whatever, and re-decode them on the other end; it’s all flexible. It could even convert to optical.

Pinnout

Top (DHC marked)

Pin Signal Description
1 V-
2 D+
3 D-
4 (dynamic)
5 (dynamic)
6 (dynamic)
7 (dynamic)
8 (dynamic)

Bottom

Pin Signal Description
8 V-
2 D+
3 D-
1 (dynamic)
4 (dynamic)
6 (dynamic)
7 (dynamic)
5 (dynamic)

USB

Pin Signal Description
1 V+
2 D-
3 D+
4 V-

Adapters

When a Lightning adapter is plugged in to the device it will connect to

https://mesu.apple.com/assets/com_apple_MobileAsset_MobileAccessoryUpdate_haywire/com_apple_MobileAsset_MobileAccessoryUpdate_haywire.xml

where, similar to an OTA iOS update, it looks for any new update bundles. This would only be for any in-between updates, though, since both iOS 6.0 and 6.1 come with predownloaded adapter firmware bundles located at /System/Library/PreinstalledAssets. (Each firmware bundle is about 11MB uncompressed.)

For fun, you can also monitor the device Console using Xcode or iPCU while connecting the adapter; you’ll see logs very similar to what happens during an iOS DFU restore, as the device loads firmware onto the Lightning adapter.

Lightning Digital AV Adapter

The Lightning Digital AV adapter is based off the Samsung S5L8700 series of chips. This series of processors is mainly used in the iPod nano, and the iPod touch 2G. The SoC used is the Samsung S5L8747.

The boot chain starts off very much like a normal iOS device, but img3 files for iBSS are uploaded, along with an APTicket. This APTicket remains static for every digital AV adapter. The kernel is then uploaded and then booted.

SoC peripherals look very much akin to other Samsung chips.

It appears the Lightning Digital AV Adapter has an ARM SoC CPU with part number H9TKNNN2GD and 256MB RAM. There is some discussion regarding the output image quality of this adapter as it appears the video is upscaled from max 1600×900 resoultion to 1080p and also visible (MPEG) compression artifacts. Apparently an Apple Engineer explained details of the adapter at www.panic.com:

"Airplay is not involved in the operation of this adapter.

It is true that the kernel the adapter SoC boots is based off of XNU, but that’s where the similarities between iOS and the adapter firmware end. The firmware environment doesn’t even run launchd. There’s no shell in the image, there’s no utilities (analogous to what we used to call the “BSD Subsystem” in Mac OS X). It boots straight into a daemon designed to accept incoming data from the host device, decode that data stream, and output it through the A/V connectors. There’s a set of kernel modules that handle the low level data transfer and HDMI output, but that’s about it. I wish I could offer more details then this but I’m posting as AC for a damned good reason.

The reason why this adapter exists is because Lightning is simply not capable of streaming a “raw” HDMI signal across the cable. Lightning is a serial bus. There is no clever wire multiplexing involved. Contrary to the opinions presented in this thread, we didn’t do this to screw the customer. We did this to specifically shift the complexity of the “adapter” bit into the adapter itself, leaving the host hardware free of any concerns in regards to what was hanging off the other end of the Lightning cable. If you wanted to produce a Lightning adapter that offered something like a GPIB port (don’t laugh, I know some guys doing exactly this) on the other end, then the only support you need to implement on the iDevice is in software- not hardware. The GPIB adapter contains all the relevant Lightning -> GPIB circuitry.

It’s vastly the same thing with the HDMI adapter. Lightning doesn’t have anything to do with HDMI at all. Again, it’s just a high speed serial interface. Airplay uses a bunch of hardware h264 encoding technology that we’ve already got access to, so what happens here is that we use the same hardware to encode an output stream on the fly and fire it down the Lightning cable straight into the ARM SoC the guys at Panic discovered. Airplay itself (the network protocol) is NOT involved in this process. The encoded data is transferred as packetized data across the Lightning bus, where it is decoded by the ARM SoC and pushed out over HDMI.

This system essentially allows us to output to any device on the planet, irregardless of the endpoint bus (HDMI, DisplayPort, and any future inventions) by simply producing the relevant adapter that plugs into the Lightning port. Since the iOS device doesn’t care about the hardware hanging off the other end, you don’t need a new iPad or iPhone when a new A/V connector hits the market.

Certain people are aware that the quality could be better and others are working on it. For the time being, the quality was deemed to be suitably acceptable. Given the dynamic nature of the system (and the fact that the firmware is stored in RAM rather then ROM), updates **will** be made available as a part of future iOS updates. When this will happen I can’t say for anonymous reasons, but these concerns haven’t gone unnoticed."

External Resources

Hacking.png This hardware article is a "stub", an incomplete page. Please add more content to this article and remove this tag.