{"id":384,"date":"2013-08-03T12:34:38","date_gmt":"2013-08-03T17:34:38","guid":{"rendered":"http:\/\/mikesmods.com\/mm-wp\/?p=384"},"modified":"2013-09-29T11:27:23","modified_gmt":"2013-09-29T16:27:23","slug":"hacking-the-macbook-pro-retina-lcd-part-3-first-working-demo","status":"publish","type":"post","link":"http:\/\/mikesmods.com\/mm-wp\/?p=384","title":{"rendered":"Hacking the Macbook Pro Retina LCD, Part 3: First Working Demo"},"content":{"rendered":"<p>After screwing up and designing boards around an incorrect connector, and then when the corrected boards came in immediately leaving town for a week on business, I&#8217;ve at long last had some time to work on the Macbook panel.\u00a0 Spoiler alert:\u00a0 Some progress has been made.<\/p>\n<p>If you don&#8217;t recall from previous posts, I threw together a quick board containing only DisplayPort and I-PEX connectors and a bunch of pin headers between them.\u00a0 The idea is that since we know where the DisplayPort connections are but not the order in which they are arranged, we can solder in jumper wires very easily to test the various lane orderings and polarities without having to otherwise modify the board.\u00a0 Here&#8217;s (the fixed Rev B version of) the board I used to figure out the pinout:<\/p>\n<div id=\"attachment_404\" style=\"width: 310px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/mikesmods.com\/mm-wp\/wp-content\/uploads\/2013\/08\/Macbook_Test_Board_Assembly.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-404\" class=\"size-medium wp-image-404\" alt=\"Assembled test board with all wires attached.  I unfortunately don't have a photo of the board prior to installing the wiring.\" src=\"http:\/\/mikesmods.com\/mm-wp\/wp-content\/uploads\/2013\/08\/Macbook_Test_Board_Assembly-300x203.jpg\" width=\"300\" height=\"203\" srcset=\"http:\/\/mikesmods.com\/mm-wp\/wp-content\/uploads\/2013\/08\/Macbook_Test_Board_Assembly-300x203.jpg 300w, http:\/\/mikesmods.com\/mm-wp\/wp-content\/uploads\/2013\/08\/Macbook_Test_Board_Assembly-1024x693.jpg 1024w, http:\/\/mikesmods.com\/mm-wp\/wp-content\/uploads\/2013\/08\/Macbook_Test_Board_Assembly-624x422.jpg 624w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-404\" class=\"wp-caption-text\">Assembled test board with all wires attached. I unfortunately don&#8217;t have a photo of the board prior to installing the wiring.<\/p><\/div>\n<p>There&#8217;s nothing special going on here.\u00a0 At top, connected to the panel, is the I-PEX connector, with its known power and backlight pins hardwired in.\u00a0 At the bottom is a standard mDP, connected to the host PC.\u00a0 I connected all the wires I could &#8211; power and backlight of course, and AUX+ and AUX-.\u00a0 From there some engineering is required.<\/p>\n<p>First, we look for Hotplug Detect.\u00a0 This pin should go logic high shortly after power is applied to the panel.\u00a0 There are only two pins left on the connector without a defined purpose, 9 and 10.\u00a0 In testing the panel, it is observed that pin 9 develops 2.8-3V, and pin 10 develops 1.4-1.7V.\u00a0 The latter is a bit low for HPD, so we will assume that pin 9 is HPD and pin 10 remains unknown for now.<\/p>\n<p>With that pin now connected, we begin testing the DP lanes.\u00a0 Remember that logically, the lanes should be arranged in one of four orders: 0+\/0-..3+\/3-, 0-\/0+..3-\/3+, 3+\/3-..0+\/0-, or 3-\/3+..0-\/0+.\u00a0 I started with the first ordering listed.\u00a0 Interestingly, the display showed a half-inch of garbled blue blocks at the top and gray bands down the rest of the surface, but the display announced itself to the PC properly and I was able to set its properties.\u00a0 More boggling yet was that when I reversed the polarity of each of the four pairs, I got a different garbled top area (this time more like static) and the same gray bands, but equal operation with the PC.\u00a0 I had always assumed that the incorrect polarity would result in a completely inoperable display &#8211; interesting.\u00a0 But not yet correct.\u00a0 I tried the other two combinations, and neither of those would even bother to talk to the PC beyond sending EDID.<\/p>\n<p>I panicked for a second here, thinking I&#8217;d have to try a lot more combinations of pinouts, taking a lot more work.\u00a0 I tried just connecting one, two or three lanes to see if that made any difference but the PC was unhappy with all of these tests.\u00a0 Finally I happened to glance at the analog ammeter dial on my bench supply and it was wiggling fairly wildly around the 300mA range.\u00a0 This didn&#8217;t seem right at all, and I immediately began to suspect the power I was applying to the panel (through about three feet of jumper wires to place it close enough to the DisplayPort source on the other side of the room).\u00a0 When I replaced the original pinout (with the blue blocks) and used about 8&#8243; of hard-soldered wire and a local bench supply, and upped the current limit to about 1A, I was greeted with the following!<\/p>\n<div id=\"attachment_405\" style=\"width: 310px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/mikesmods.com\/mm-wp\/wp-content\/uploads\/2013\/08\/Macbook_Retina_First_Working_Test.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-405\" class=\"size-medium wp-image-405\" alt=\"It works!\" src=\"http:\/\/mikesmods.com\/mm-wp\/wp-content\/uploads\/2013\/08\/Macbook_Retina_First_Working_Test-300x225.jpg\" width=\"300\" height=\"225\" srcset=\"http:\/\/mikesmods.com\/mm-wp\/wp-content\/uploads\/2013\/08\/Macbook_Retina_First_Working_Test-300x225.jpg 300w, http:\/\/mikesmods.com\/mm-wp\/wp-content\/uploads\/2013\/08\/Macbook_Retina_First_Working_Test-1024x768.jpg 1024w, http:\/\/mikesmods.com\/mm-wp\/wp-content\/uploads\/2013\/08\/Macbook_Retina_First_Working_Test-624x468.jpg 624w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-405\" class=\"wp-caption-text\">It works!<\/p><\/div>\n<p>This just goes to show you how important it is to pay attention to the impedance and voltage drop of your wiring.\u00a0 Always use as short of wires as possible!\u00a0 Do note that I only connected one backlight string, which is why the banding is so bad; with the other five strings connected it probably wouldn&#8217;t be noticeable.\u00a0 It looks a little dark because I don&#8217;t have proper current limiting installed and I&#8217;m driving it cautiously.<\/p>\n<p>So now we know the full pinout of the Macbook Pro 15.4&#8243; panel (or, at least enough of it to get it running.\u00a0 Here it is, for your design and hacking purposes:<\/p>\n<div id=\"attachment_407\" style=\"width: 310px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/mikesmods.com\/mm-wp\/wp-content\/uploads\/2013\/08\/Macbook_Retina_15.4_Connector_Pinout.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-407\" class=\"size-medium wp-image-407\" alt=\"Not sure what Pin 10 is.  Looks kind of like 0.5*HPD\" src=\"http:\/\/mikesmods.com\/mm-wp\/wp-content\/uploads\/2013\/08\/Macbook_Retina_15.4_Connector_Pinout-300x148.jpg\" width=\"300\" height=\"148\" srcset=\"http:\/\/mikesmods.com\/mm-wp\/wp-content\/uploads\/2013\/08\/Macbook_Retina_15.4_Connector_Pinout-300x148.jpg 300w, http:\/\/mikesmods.com\/mm-wp\/wp-content\/uploads\/2013\/08\/Macbook_Retina_15.4_Connector_Pinout-624x308.jpg 624w, http:\/\/mikesmods.com\/mm-wp\/wp-content\/uploads\/2013\/08\/Macbook_Retina_15.4_Connector_Pinout.jpg 965w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-407\" class=\"wp-caption-text\">Not sure what Pin 10 is. Looks kind of like 0.5*HPD<\/p><\/div>\n<p>Finally knowing the pinout, and running short on time before the next OSH Park 4-layer order, I quickly made up a proof-of-concept controller board for the panel.\u00a0 The board includes a Freescale MC34844A backlight driver, a Freescale Kinetis MKL25Z128 ARM Cortex-M0+ processor (again chosen for cost to performance ratio), independent switching supplies for the processor and for the panel (which requires a different voltage), mini-USB and mini-DisplayPort connections to the host PC, and a header to match the header on the camera board for the ambient light sensor.\u00a0 Special care was taken to cut costs on this board wherever possible without compromising functionality &#8211; the Linear Technology switcher from the iPad board was scrapped for parts a third of the cost, and some parts were increased in size to avoid paying the premium for the size decrease.\u00a0 With some difficulty the board was kept to the same compact 1.5&#215;2.5 inch form factor as the full iPad board.<\/p>\n<div id=\"attachment_406\" style=\"width: 262px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/mikesmods.com\/mm-wp\/wp-content\/uploads\/2013\/08\/PCB10006_REV_A_Board_Image.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-406\" class=\"size-medium wp-image-406\" alt=\"I don't have many of the parts modeled yet.  So sue me, I was in a hurry!\" src=\"http:\/\/mikesmods.com\/mm-wp\/wp-content\/uploads\/2013\/08\/PCB10006_REV_A_Board_Image-252x300.jpg\" width=\"252\" height=\"300\" srcset=\"http:\/\/mikesmods.com\/mm-wp\/wp-content\/uploads\/2013\/08\/PCB10006_REV_A_Board_Image-252x300.jpg 252w, http:\/\/mikesmods.com\/mm-wp\/wp-content\/uploads\/2013\/08\/PCB10006_REV_A_Board_Image-860x1024.jpg 860w, http:\/\/mikesmods.com\/mm-wp\/wp-content\/uploads\/2013\/08\/PCB10006_REV_A_Board_Image-624x742.jpg 624w, http:\/\/mikesmods.com\/mm-wp\/wp-content\/uploads\/2013\/08\/PCB10006_REV_A_Board_Image.jpg 1019w\" sizes=\"(max-width: 252px) 100vw, 252px\" \/><\/a><p id=\"caption-attachment-406\" class=\"wp-caption-text\">I don&#8217;t have many of the parts modeled yet. So sue me, I was in a hurry!<\/p><\/div>\n<p>I will release the documents for this board as soon as I build one up and verify that it works &#8211; I don&#8217;t want anyone ordering a board which might not work.\u00a0 If you still really want them ahead of time to look at, send me an email.<\/p>\n<p><a title=\"Hacking the Macbook Pro Retina LCD, Part 2: The Camera\" href=\"http:\/\/mikesmods.com\/mm-wp\/?p=340\">&lt;&lt; Previous post in this series<\/a> \u2026 <a title=\"Hacking the Macbook Pro Retina LCD, Part 4: First PCB Tests\" href=\"http:\/\/mikesmods.com\/mm-wp\/?p=431\">Next post in this series &gt;&gt;<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>After screwing up and designing boards around an incorrect connector, and then when the corrected boards came in immediately leaving town for a week on business, I&#8217;ve at long last had some time to work on the Macbook panel.\u00a0 Spoiler alert:\u00a0 Some progress has been made. If you don&#8217;t recall from previous posts, I threw [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"_links":{"self":[{"href":"http:\/\/mikesmods.com\/mm-wp\/index.php?rest_route=\/wp\/v2\/posts\/384"}],"collection":[{"href":"http:\/\/mikesmods.com\/mm-wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/mikesmods.com\/mm-wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/mikesmods.com\/mm-wp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/mikesmods.com\/mm-wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=384"}],"version-history":[{"count":6,"href":"http:\/\/mikesmods.com\/mm-wp\/index.php?rest_route=\/wp\/v2\/posts\/384\/revisions"}],"predecessor-version":[{"id":460,"href":"http:\/\/mikesmods.com\/mm-wp\/index.php?rest_route=\/wp\/v2\/posts\/384\/revisions\/460"}],"wp:attachment":[{"href":"http:\/\/mikesmods.com\/mm-wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=384"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/mikesmods.com\/mm-wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=384"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/mikesmods.com\/mm-wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=384"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}