Author: wmb Date: Sat Dec 3 01:45:21 2011 New Revision: 2729 URL: http://tracker.coreboot.org/trac/openfirmware/changeset/2729
Log: OLPC XO-3 - Fixed LCD and USB drivers, moved testitems.fth up to olpc/
Added: cpu/arm/olpc/testitems.fth - copied, changed from r2728, cpu/arm/olpc/1.75/testitems.fth Deleted: cpu/arm/olpc/1.75/testitems.fth cpu/arm/olpc/3.0/sdhci.fth cpu/arm/olpc/3.0/testitems.fth Modified: cpu/arm/olpc/3.0/lcdcfg.fth cpu/arm/olpc/3.0/olpc.bth cpu/arm/olpc/3.0/testinstructions.fth cpu/arm/olpc/3.0/usb.fth cpu/arm/olpc/build-fw.fth
Modified: cpu/arm/olpc/3.0/lcdcfg.fth ============================================================================== --- cpu/arm/olpc/3.0/lcdcfg.fth Sat Dec 3 01:45:15 2011 (r2728) +++ cpu/arm/olpc/3.0/lcdcfg.fth Sat Dec 3 01:45:21 2011 (r2729) @@ -2,13 +2,15 @@ h# 00000700 value pmua-disp-clk-sel \ PLL1 / 7 -> 113.86 MHz
d# 8 value hsync \ Sync width -d# 1200 value hdisp \ Display width -d# 1256 value htotal \ Display + FP + Sync + BP +d# 1024 value hdisp \ Display width +d# 1344 value htotal \ Display + FP + Sync + BP +\ d# 1200 value hdisp \ Display width +\ d# 1256 value htotal \ Display + FP + Sync + BP d# 24 value hbp \ Back porch
d# 3 value vsync \ Sync width -d# 900 value vdisp \ Display width -d# 912 value vtotal \ Display + FP + Sync + BP +d# 768 value vdisp \ Display width +d# 806 value vtotal \ Display + FP + Sync + BP d# 5 value vbp \ Back porch
: hfp ( -- n ) htotal hdisp - hsync - hbp - ; \ 24
Modified: cpu/arm/olpc/3.0/olpc.bth ============================================================================== --- cpu/arm/olpc/3.0/olpc.bth Sat Dec 3 01:45:15 2011 (r2728) +++ cpu/arm/olpc/3.0/olpc.bth Sat Dec 3 01:45:21 2011 (r2729) @@ -152,10 +152,10 @@
" nandblaster15_rx.bin" " nb15_rx" $add-deflated-dropin " nandblaster_tx.bin" " nb_tx" $add-deflated-dropin - " ec.img" " ecimage.bin" $add-deflated-dropin - " ${BP}/clients/emacs/x86/emacs.rc" " emacs.rc" $add-deflated-dropin - " ${BP}/clients/emacs/emacs.hlp" " emacs.hlp" $add-deflated-dropin - " ${BP}/clients/emacs/arm/emacs" " emacs" $add-deflated-dropin +\ " ec.img" " ecimage.bin" $add-deflated-dropin +\ " ${BP}/clients/emacs/x86/emacs.rc" " emacs.rc" $add-deflated-dropin +\ " ${BP}/clients/emacs/emacs.hlp" " emacs.hlp" $add-deflated-dropin +\ " ${BP}/clients/emacs/arm/emacs" " emacs" $add-deflated-dropin
.( Dropin top is ) ofd @ fsize .x cr
@@ -216,4 +216,3 @@ \ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ \ LICENSE_END -
Modified: cpu/arm/olpc/3.0/testinstructions.fth ============================================================================== --- cpu/arm/olpc/3.0/testinstructions.fth Sat Dec 3 01:45:15 2011 (r2728) +++ cpu/arm/olpc/3.0/testinstructions.fth Sat Dec 3 01:45:21 2011 (r2729) @@ -1,3 +1,4 @@ +.( *** testinstructions.fth needs to be fixed for XO-3) cr \ See license at end of file purpose: Drawings of OLPC XO-1.75 board and components for test instructions
Modified: cpu/arm/olpc/3.0/usb.fth ============================================================================== --- cpu/arm/olpc/3.0/usb.fth Sat Dec 3 01:45:15 2011 (r2728) +++ cpu/arm/olpc/3.0/usb.fth Sat Dec 3 01:45:21 2011 (r2729) @@ -1,7 +1,7 @@ purpose: Platform-specific USB elaborations \ See license at end of file
-0 0 " d4208000" " /" begin-package \ USB Host Controller +0 0 " d4208000" " /" begin-package \ USB OTG Host Controller h# 200 constant /regs my-address my-space /regs reg : my-map-in ( len -- adr ) @@ -16,19 +16,35 @@ : otg-set-host-mode 3 h# a8 ehci-reg! ; \ Force host mode ' otg-set-host-mode to set-host-mode
- \ Port 1 on the hub is connected to unused pins on the WLAN connector, - \ so testing it is confusing - \ Port 2 is right upper - \ Port 3 is left - \ Port 4 is right lower - " 3,4,2" " usb-hub-test-list" string-property + : sleep ( -- ) true to first-open? ; + : wake ( -- ) ; +end-package + +0 0 " f0001000" " /" begin-package \ USB Host Controller 1 - ULPI + h# 200 constant /regs + my-address my-space /regs reg + : my-map-in ( len -- adr ) + my-space swap " map-in" $call-parent h# 100 + ( adr ) + ; + : my-map-out ( adr len -- ) swap h# 100 - swap " map-out" $call-parent ; + false constant has-dbgp-regs? + false constant needs-dummy-qh? + : grab-controller ( config-adr -- error? ) drop false ; + fload ${BP}/dev/usb2/hcd/ehci/loadpkg.fth +\ false to delay? \ No need for a polling delay on this platform + : sleep ( -- ) true to first-open? ; : wake ( -- ) ; end-package
\ Turn on USB power after a delay, to ensure that USB devices are reset correctly on boot -: usb-power-on ( -- ) ; \ The EC controls the USB power -: reset-usb-hub ( -- ) d# 146 gpio-clr d# 10 ms d# 146 gpio-set ; +: usb-power-on ( -- ) + d# 126 gpio-clr \ OTG 5V on + d# 127 gpio-clr \ ULPI 5V on +; +: reset-usb-hub ( -- ) + d# 146 gpio-clr d# 10 ms d# 146 gpio-set \ Resets ULPI hub +;
: init-usb ( -- ) h# 9 h# 5c pmua! \ Enable clock to USB block
Modified: cpu/arm/olpc/build-fw.fth ============================================================================== --- cpu/arm/olpc/build-fw.fth Sat Dec 3 01:45:15 2011 (r2728) +++ cpu/arm/olpc/build-fw.fth Sat Dec 3 01:45:21 2011 (r2729) @@ -536,8 +536,7 @@ \ so exiting from emacs doesn't invoke the diag menu. ' quit to user-interface fload ${BP}/cpu/x86/pc/olpc/via/mfgtest.fth -+ olpc-cl3 fload ${BP}/cpu/arm/olpc/3.0/testitems.fth -+ olpc-cl2 fload ${BP}/cpu/arm/olpc/1.75/testitems.fth +fload ${BP}/cpu/arm/olpc/testitems.fth
[ifdef] notyet fload ${BP}/cpu/x86/pc/olpc/via/bootmenu.fth
Copied and modified: cpu/arm/olpc/testitems.fth (from r2728, cpu/arm/olpc/1.75/testitems.fth) ============================================================================== --- cpu/arm/olpc/1.75/testitems.fth Sat Dec 3 01:45:15 2011 (r2728, copy source) +++ cpu/arm/olpc/testitems.fth Sat Dec 3 01:45:21 2011 (r2729) @@ -7,9 +7,9 @@ icon: camera.icon rom:camera.565 icon: wifi.icon rom:wifi.565 icon: audio.icon rom:audio.565 -icon: touchpad.icon rom:touchpad.565 +- olpc-cl3 icon: touchpad.icon rom:touchpad.565 icon: display.icon rom:display.565 -icon: keyboard.icon rom:keyboard.565 +- olpc-cl3 icon: keyboard.icon rom:keyboard.565 icon: timer.icon rom:timer.565 icon: clock.icon rom:clock.565 icon: ebook.icon rom:ebook.565 @@ -25,15 +25,15 @@ : memory-item ( -- ) " /memory" mfg-test-dev ; : usb-item ( -- ) " /usb/hub" mfg-test-dev ; : int-sd-item ( -- ) " int:0" mfg-test-dev ; -: ext-sd-item ( -- ) " ext:0" mfg-test-dev ; +- olpc-cl3 : ext-sd-item ( -- ) " ext:0" mfg-test-dev ; : rtc-item ( -- ) " /rtc" mfg-test-dev ; : display-item ( -- ) " /display" mfg-test-dev ; : audio-item ( -- ) " /audio" mfg-test-dev ; : camera-item ( -- ) " /camera" mfg-test-dev ; : wlan-item ( -- ) " /wlan" mfg-test-dev ; : timer-item ( -- ) " /timer" mfg-test-dev ; -: touchpad-item ( -- ) " mouse" mfg-test-dev ; -: keyboard-item ( -- ) " keyboard" mfg-test-dev ; +- olpc-cl3 : touchpad-item ( -- ) " mouse" mfg-test-dev ; +- olpc-cl3 : keyboard-item ( -- ) " keyboard" mfg-test-dev ; : switch-item ( -- ) " /accelerometer" mfg-test-dev " /switches" mfg-test-dev ; : leds-item ( -- ) " /leds" mfg-test-dev ;
@@ -52,8 +52,8 @@ " Internal mass storage" ['] int-sd-item sdcard.icon 1 2 install-icon
- " Plug-in SD card" - ['] ext-sd-item sdcard.icon 1 3 install-icon +- olpc-cl3 " Plug-in SD card" +- olpc-cl3 ['] ext-sd-item sdcard.icon 1 3 install-icon
" Wireless LAN" ['] wlan-item wifi.icon 1 4 install-icon @@ -79,11 +79,11 @@ \ These are last because they require user participation. \ The earlier tests are all included in automatic batch-mode.
- " Keyboard" - ['] keyboard-item keyboard.icon 3 1 install-icon +- olpc-cl3 " Keyboard" +- olpc-cl3 ['] keyboard-item keyboard.icon 3 1 install-icon
- " Touchpad" - ['] touchpad-item touchpad.icon 3 2 install-icon +- olpc-cl3 " Touchpad" +- olpc-cl3 ['] touchpad-item touchpad.icon 3 2 install-icon
" LEDs" ['] leds-item leds.icon 3 3 install-icon
openfirmware@openfirmware.info