mail.coreboot.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
List overview
Download
openfirmware
August 2012
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
openfirmware@openfirmware.info
1 participants
154 discussions
Start a n
N
ew thread
[commit] r3197 - cpu/arm/olpc cpu/arm/olpc/1.75 cpu/arm/olpc/1.75/attic dev/olpc dev/olpc/cafecamera dev/olpc/dcon dev/olpc/mmp2camera dev/olpc/viacamera dev/via/unichrome
by repository service
18 Aug '12
18 Aug '12
Author: wmb Date: Sat Aug 18 09:05:11 2012 New Revision: 3197 URL:
http://tracker.coreboot.org/trac/openfirmware/changeset/3197
Log: OLPC - Change all uses of I2C addresses for bit-banged SMBUS (I2C) to use unshifted address form. Modified: cpu/arm/olpc/1.75/attic/audiosmb.fth cpu/arm/olpc/1.75/compass.fth cpu/arm/olpc/rtc.fth cpu/arm/olpc/smbus.fth dev/olpc/cafecamera/platform.fth dev/olpc/dcon/mmp2dcon.fth dev/olpc/mmp2camera/smbus.fth dev/olpc/ov7670.fth dev/olpc/seti.fth dev/olpc/viacamera/platform.fth dev/olpc/viacamera/smbus.fth dev/via/unichrome/dconsmb.fth Modified: cpu/arm/olpc/1.75/attic/audiosmb.fth ============================================================================== --- cpu/arm/olpc/1.75/attic/audiosmb.fth Sat Aug 18 07:25:14 2012 (r3196) +++ cpu/arm/olpc/1.75/attic/audiosmb.fth Sat Aug 18 09:05:11 2012 (r3197) @@ -72,7 +72,7 @@ ; 0 value smb-slave -: smb-addr ( lowbit -- ) smb-slave or smb-byte ; +: smb-addr ( lowbit -- ) smb-slave 2* or smb-byte ; : smb-byte! ( byte reg# -- ) smb-start @@ -115,7 +115,7 @@ d# 32 0 do smb-clk-lo smb-clk-hi loop ; -: set-dcon-slave ( -- ) h# 1a to smb-slave ; +: set-dcon-slave ( -- ) h# 0d to smb-slave ; : smb-init ( -- ) set-dcon-slave smb-on smb-pulses ; : dcon@ ( reg# -- word ) set-dcon-slave smb-word@ ; Modified: cpu/arm/olpc/1.75/compass.fth ============================================================================== --- cpu/arm/olpc/1.75/compass.fth Sat Aug 18 07:25:14 2012 (r3196) +++ cpu/arm/olpc/1.75/compass.fth Sat Aug 18 09:05:11 2012 (r3197) @@ -4,7 +4,7 @@ : set-compass-slave ( -- ) compass-scl-gpio# to smb-clock-gpio# compass-sda-gpio# to smb-data-gpio# - h# 1e to smb-slave + h# 0f to smb-slave smb-data-gpio# gpio-dir-out ; : smb-init ( -- ) set-compass-slave smb-on smb-pulses ; @@ -39,7 +39,7 @@ : set-sensor-slave ( -- ) 4 to smb-clock-gpio# 5 to smb-data-gpio# - h# 18 to smb-slave + h# 0c to smb-slave smb-data-gpio# gpio-dir-out ; Modified: cpu/arm/olpc/rtc.fth ============================================================================== --- cpu/arm/olpc/rtc.fth Sat Aug 18 07:25:14 2012 (r3196) +++ cpu/arm/olpc/rtc.fth Sat Aug 18 09:05:11 2012 (r3197) @@ -17,7 +17,7 @@ : set-address ( -- ) rtc-scl-gpio# to smb-clock-gpio# rtc-sda-gpio# to smb-data-gpio# - h# d0 to smb-slave + h# 68 to smb-slave ; : rtc@ ( reg# -- byte ) set-address smb-byte@ ; : rtc! ( byte reg# -- ) set-address smb-byte! ; Modified: cpu/arm/olpc/smbus.fth ============================================================================== --- cpu/arm/olpc/smbus.fth Sat Aug 18 07:25:14 2012 (r3196) +++ cpu/arm/olpc/smbus.fth Sat Aug 18 09:05:11 2012 (r3197) @@ -87,7 +87,7 @@ ; 0 value smb-slave -: smb-addr ( lowbit -- ) smb-slave or smb-byte ; +: smb-addr ( lowbit -- ) smb-slave 2* or smb-byte ; : smb-byte! ( byte reg# -- ) smb-start Modified: dev/olpc/cafecamera/platform.fth ============================================================================== --- dev/olpc/cafecamera/platform.fth Sat Aug 18 07:25:14 2012 (r3196) +++ dev/olpc/cafecamera/platform.fth Sat Aug 18 09:05:11 2012 (r3197) @@ -37,7 +37,7 @@ \ 4 my-w@ 6 invert and 4 my-w! \ No need to turn it off ; -h# 42 value camera-smb-slave +h# 21 value camera-smb-slave : camera-smb-on ( -- ) ; : clr-smb-intr ( -- ) 7.0000 30 cl! ; @@ -46,7 +46,7 @@ 1 ms \ 20 usec delay ; -: set-slave ( -- ) camera-smb-slave 2 lshift 87.fc01 or b8 cl! ; \ TWSI control 0: id, 8-bit, clk +: set-slave ( -- ) camera-smb-slave 2* 2 lshift 87.fc01 or b8 cl! ; \ TWSI control 0: id, 8-bit, clk : ov@ ( reg -- data ) clr-smb-intr Modified: dev/olpc/dcon/mmp2dcon.fth ============================================================================== --- dev/olpc/dcon/mmp2dcon.fth Sat Aug 18 07:25:14 2012 (r3196) +++ dev/olpc/dcon/mmp2dcon.fth Sat Aug 18 09:05:11 2012 (r3197) @@ -6,12 +6,12 @@ false ; -0 0 " 1a" " /dcon-i2c" begin-package +0 0 " 0d" " /dcon-i2c" begin-package " dcon" device-name " olpc,xo1-dcon" +compatible " olpc,xo1.75-dcon" +compatible -h# 1a 1 reg +my-space 1 reg 0 0 encode-bytes dcon-stat0-gpio# 0 encode-gpio @@ -57,7 +57,7 @@ dcon-scl-gpio# to smb-clock-gpio# dcon-sda-gpio# to smb-data-gpio# - h# 1a to smb-slave + h# 0d to smb-slave ; : smb-init ( -- ) set-dcon-slave smb-on smb-pulses ; Modified: dev/olpc/mmp2camera/smbus.fth ============================================================================== --- dev/olpc/mmp2camera/smbus.fth Sat Aug 18 07:25:14 2012 (r3196) +++ dev/olpc/mmp2camera/smbus.fth Sat Aug 18 09:05:11 2012 (r3197) @@ -78,7 +78,7 @@ ; 0 value smb-slave -: smb-addr ( lowbit -- ) smb-slave or smb-byte ; +: smb-addr ( lowbit -- ) smb-slave 2* or smb-byte ; : smb-byte! ( byte reg# -- ) smb-start Modified: dev/olpc/ov7670.fth ============================================================================== --- dev/olpc/ov7670.fth Sat Aug 18 07:25:14 2012 (r3196) +++ dev/olpc/ov7670.fth Sat Aug 18 09:05:11 2012 (r3197) @@ -148,7 +148,7 @@ ; : probe-ov7670 ( -- found? ) - h# 42 to camera-smb-slave ( ) \ Omnivision SMB ID + h# 21 to camera-smb-slave ( ) \ Omnivision SMB ID camera-smb-on \ Try to read a byte of the manufacturing ID. If the read fails, Modified: dev/olpc/seti.fth ============================================================================== --- dev/olpc/seti.fth Sat Aug 18 07:25:14 2012 (r3196) +++ dev/olpc/seti.fth Sat Aug 18 09:05:11 2012 (r3197) @@ -294,7 +294,7 @@ ; : probe-seti ( -- found? ) - h# 66 to camera-smb-slave ( ) + h# 33 to camera-smb-slave ( ) camera-smb-on ( ) \ Try to read a byte of the manufacturing ID. If the read fails, Modified: dev/olpc/viacamera/platform.fth ============================================================================== --- dev/olpc/viacamera/platform.fth Sat Aug 18 07:25:14 2012 (r3196) +++ dev/olpc/viacamera/platform.fth Sat Aug 18 09:05:11 2012 (r3197) @@ -2,7 +2,7 @@ purpose: Platform specifics for OLPC Camera on XO-1.5 h# 26 constant dcon-port -: dcon-setup ( -- ) dcon-port to smb-port h# 1a to smb-slave ; +: dcon-setup ( -- ) dcon-port to smb-port h# 0d to smb-slave ; : smb-init ( -- ) dcon-setup smb-on smb-pulses ; : dcon@ ( reg# -- word ) dcon-setup smb-word@ ; Modified: dev/olpc/viacamera/smbus.fth ============================================================================== --- dev/olpc/viacamera/smbus.fth Sat Aug 18 07:25:14 2012 (r3196) +++ dev/olpc/viacamera/smbus.fth Sat Aug 18 09:05:11 2012 (r3197) @@ -73,7 +73,7 @@ ; 0 value smb-slave -: smb-addr ( lowbit -- ) smb-slave or smb-byte ; +: smb-addr ( lowbit -- ) smb-slave 2* or smb-byte ; : smb-byte! ( byte reg# -- ) smb-start Modified: dev/via/unichrome/dconsmb.fth ============================================================================== --- dev/via/unichrome/dconsmb.fth Sat Aug 18 07:25:14 2012 (r3196) +++ dev/via/unichrome/dconsmb.fth Sat Aug 18 09:05:11 2012 (r3197) @@ -70,7 +70,7 @@ ; 0 value smb-slave -: smb-addr ( lowbit -- ) smb-slave or smb-byte ; +: smb-addr ( lowbit -- ) smb-slave 2* or smb-byte ; : smb-word! ( word reg# -- ) smb-start 0 smb-addr ( word reg# ) @@ -95,5 +95,5 @@ ; : smb-init ( -- ) smb-on smb-pulses ; -: dcon@ ( reg# -- word ) h# 1a to smb-slave smb-word@ ; -: dcon! ( word reg# -- ) h# 1a to smb-slave smb-word! ; +: dcon@ ( reg# -- word ) h# 0d to smb-slave smb-word@ ; +: dcon! ( word reg# -- ) h# 0d to smb-slave smb-word! ;
1
0
0
0
[commit] r3196 - cpu/arm/olpc
by repository service
18 Aug '12
18 Aug '12
Author: quozl Date: Sat Aug 18 07:25:14 2012 New Revision: 3196 URL:
http://tracker.coreboot.org/trac/openfirmware/changeset/3196
Log: OLPC CL4 - Neonode, add display of MSP430 firmware version, fix display of low signal test results, add a minimum field strength value for customisation, read boot complete message before already-ready open, identify short or open components by silkscreen layer identifier. Modified: cpu/arm/olpc/nn-touchscreen.fth Modified: cpu/arm/olpc/nn-touchscreen.fth ============================================================================== --- cpu/arm/olpc/nn-touchscreen.fth Fri Aug 17 19:29:15 2012 (r3195) +++ cpu/arm/olpc/nn-touchscreen.fth Sat Aug 18 07:25:14 2012 (r3196) @@ -53,7 +53,7 @@ 2drop ( ) ; -: read-boot-complete ( -- ) h# 07 d# 20 anticipate ; +: read-boot-complete ( -- ) h# 07 d# 0 anticipate ; : initialise ( -- ) h# 01 h# 01 h# ee 3 twsi-out h# 01 d# 20 anticipate ; @@ -86,8 +86,8 @@ no-data? if reset no-data? if pbuf /pbuf free-mem false exit then - read-boot-complete then + read-boot-complete ['] configure catch if pbuf /pbuf free-mem false exit then true ; @@ -111,43 +111,218 @@ ; -0 value faults -: fault faults 1+ to faults ; +: (.version) ( addr -- ) + dup c@ over 1+ c@ bwjoin ( addr version ) + (.) type +; + +: .version ( addr -- ) + pbuf 2+ c@ h# 1e <> abort" bad response" + ." Neonode zForce Touch Driver firmware version " + pbuf 3 + 3 0 do ( addr ) + (.version) 2+ + [char] . emit + loop ( addr ) + (.version) ( ) +; + +: test-version ( -- ) + h# 1e h# 01 h# ee 3 twsi-out + h# 1e d# 30 anticipate -: .bits ( addr low high -- addr ) - ." ( " swap do ( addr ) - i over bittest if - i .d fault - then - loop ." )" cr ( addr ) + .version + cr ; + +0 value faults +: fault faults 1+ to faults ; + : 4sp ." " ; : 8sp ." " ; +[ifdef] nn-components +\ optional decoding of component identifiers + +\ bit descriptions +\ shorts have been verified +\ a trailing ? means this combination is untested +string-array x-os + + ," PD13 open?" \ 01 00 00 00 00 00 00 00 + ," PD14 open?" \ 02 00 00 00 00 00 00 00 + ," PD15 open?" \ 04 00 00 00 00 00 00 00 + ," PD16 open?" \ 08 00 00 00 00 00 00 00 + ," PD17 open?" \ 10 00 00 00 00 00 00 00 + ," PD18 open?" \ 20 00 00 00 00 00 00 00 + ," PD19 open?" \ 40 00 00 00 00 00 00 00 + ," PD20 open?" \ 80 00 00 00 00 00 00 00 + + ," PD21 open?" \ 00 01 00 00 00 00 00 00 + ," PD22 open?" \ 00 02 00 00 00 00 00 00 + ," PD23 open?" \ 00 04 00 00 00 00 00 00 + ," PD24 open?" \ 00 08 00 00 00 00 00 00 + ," PD25 open?" \ 00 10 00 00 00 00 00 00 + ," PD26 open?" \ 00 20 00 00 00 00 00 00 + ," PD27 open?" \ 00 40 00 00 00 00 00 00 + ," PD28 open?" \ 00 80 00 00 00 00 00 00 + + ," PD13 short" \ 00 00 01 00 00 00 00 00 + ," PD14 short" \ 00 00 02 00 00 00 00 00 + ," PD15 short" \ 00 00 04 00 00 00 00 00 + ," PD16 short" \ 00 00 08 00 00 00 00 00 + ," PD17 short" \ 00 00 10 00 00 00 00 00 + ," PD18 short" \ 00 00 20 00 00 00 00 00 + ," PD19 short" \ 00 00 40 00 00 00 00 00 + ," PD20 short" \ 00 00 80 00 00 00 00 00 + + ," PD21 short" \ 00 00 00 01 00 00 00 00 + ," PD22 short" \ 00 00 00 02 00 00 00 00 + ," PD23 short" \ 00 00 00 04 00 00 00 00 + ," PD24 short" \ 00 00 00 08 00 00 00 00 + ," PD25 short" \ 00 00 00 10 00 00 00 00 + ," PD26 short" \ 00 00 00 20 00 00 00 00 + ," PD27 short" \ 00 00 00 40 00 00 00 00 + ," PD28 short" \ 00 00 00 80 00 00 00 00 + + ," IR12 short" \ 00 00 00 00 01 00 00 00 + ," IR13 short" \ 00 00 00 00 02 00 00 00 + ," IR14 short" \ 00 00 00 00 04 00 00 00 + ," IR15 short" \ 00 00 00 00 08 00 00 00 + ," IR16 short" \ 00 00 00 00 10 00 00 00 + ," IR17 short" \ 00 00 00 00 20 00 00 00 + ," IR18 short" \ 00 00 00 00 40 00 00 00 + ," IR19 short" \ 00 00 00 00 80 00 00 00 + + ," IR20 short" \ 00 00 00 00 00 01 00 00 + ," IR21 short" \ 00 00 00 00 00 02 00 00 + ," IR22 short" \ 00 00 00 00 00 04 00 00 + ," IR23 short" \ 00 00 00 00 00 08 00 00 + ," IR24 short" \ 00 00 00 00 00 10 00 00 + ," IR25 short" \ 00 00 00 00 00 20 00 00 + ," IR26 short" \ 00 00 00 00 00 40 00 00 + ," reserved?" \ 00 00 00 00 00 80 00 00 + + ," IR12 open?" \ 00 00 00 00 00 00 01 00 + ," IR13 open?" \ 00 00 00 00 00 00 02 00 + ," IR14 open?" \ 00 00 00 00 00 00 04 00 + ," IR15 open?" \ 00 00 00 00 00 00 08 00 + ," IR16 open?" \ 00 00 00 00 00 00 10 00 + ," IR17 open?" \ 00 00 00 00 00 00 20 00 + ," IR18 open?" \ 00 00 00 00 00 00 40 00 + ," IR19 open?" \ 00 00 00 00 00 00 80 00 + + ," IR20 open?" \ 00 00 00 00 00 00 00 01 + ," IR21 open?" \ 00 00 00 00 00 00 00 02 + ," IR22 open?" \ 00 00 00 00 00 00 00 04 + ," IR23 open?" \ 00 00 00 00 00 00 00 08 + ," IR24 open?" \ 00 00 00 00 00 00 00 10 + ," IR25 open?" \ 00 00 00 00 00 00 00 20 + ," IR26 open?" \ 00 00 00 00 00 00 00 40 + ," reserved?" \ 00 00 00 00 00 00 00 80 + +end-string-array + +string-array y-os + + ," PD4 open?" \ 01 00 00 00 00 00 + ," PD3 open?" \ 02 00 00 00 00 00 + ," PD2 open?" \ 04 00 00 00 00 00 + ," PD1 open?" \ 08 00 00 00 00 00 + ," PD12 open?" \ 10 00 00 00 00 00 + ," PD11 open?" \ 20 00 00 00 00 00 + ," PD10 open?" \ 40 00 00 00 00 00 + ," PD9 open?" \ 80 00 00 00 00 00 + + ," PD8 open?" \ 00 01 00 00 00 00 + ," PD7 open?" \ 00 02 00 00 00 00 + ," PD6 open?" \ 00 04 00 00 00 00 + ," PD5 open?" \ 00 08 00 00 00 00 + ," PD12 short" \ 00 10 00 00 00 00 + ," PD11 short" \ 00 20 00 00 00 00 + ," PD10 short" \ 00 40 00 00 00 00 + ," PD9 short" \ 00 80 00 00 00 00 + + ," PD8 short" \ 00 00 01 00 00 00 + ," PD7 short" \ 00 00 02 00 00 00 + ," PD6 short" \ 00 00 04 00 00 00 + ," PD5 short" \ 00 00 08 00 00 00 + ," PD4 short" \ 00 00 10 00 00 00 + ," PD3 short" \ 00 00 20 00 00 00 + ," PD2 short" \ 00 00 40 00 00 00 + ," PD1 short" \ 00 00 80 00 00 00 + + ," IR11 short" \ 00 00 00 01 00 00 + ," IR10 short" \ 00 00 00 02 00 00 + ," IR9 short" \ 00 00 00 04 00 00 + ," IR8 short" \ 00 00 00 08 00 00 + ," IR7 short" \ 00 00 00 10 00 00 + ," IR6 short" \ 00 00 00 20 00 00 + ," IR5 short" \ 00 00 00 40 00 00 + ," IR4 short" \ 00 00 00 80 00 00 + + ," IR3 short" \ 00 00 00 00 01 00 + ," IR2 short" \ 00 00 00 00 02 00 + ," IR1 short" \ 00 00 00 00 04 00 + ," reserved?" \ 00 00 00 00 08 00 + ," reserved?" \ 00 00 00 00 10 00 + ," IR11 open?" \ 00 00 00 00 20 00 + ," IR10 open?" \ 00 00 00 00 40 00 + ," IR9 open?" \ 00 00 00 00 80 00 + + ," IR8 open?" \ 00 00 00 00 00 01 + ," IR7 open?" \ 00 00 00 00 00 02 + ," IR6 open?" \ 00 00 00 00 00 04 + ," IR5 open?" \ 00 00 00 00 00 08 + ," IR4 open?" \ 00 00 00 00 00 10 + ," IR3 open?" \ 00 00 00 00 00 20 + ," IR2 open?" \ 00 00 00 00 00 40 + ," IR1 open?" \ 00 00 00 00 00 80 + +end-string-array + +defer our-os +' noop is our-os +[then] + +d# 64 constant /x-os +d# 48 constant /y-os + : test-os-axis ( axis -- ) h# 21 h# 02 h# ee 4 twsi-out h# 21 d# 30 anticipate pbuf 2+ c@ h# 21 <> abort" bad response" - pbuf 3 + c@ if h# 0a else h# 0e then >r ( r:nleds ) - pbuf 5 + ( r:nleds array ) + pbuf d# 5 + ( addr ) - \ bit array layout: | open_pd | short_pd | short_led | open_led | - \ subarray widths: | npds bits | npds bits | nleds bits | nleds bits | - \ npds = nleds+1 - - \ FIXME: express failed devices in terms of IR PCB component names. - \ 0 npds - 8sp ." open_pd=" 0 r@ 1+ .bits - \ npds npds*2 - 8sp ." short_pd=" r@ 1+ r@ 1+ 2* .bits - \ npds*2 npds*2+nleds - 8sp ." short_led=" r@ 1+ 2* dup r@ + .bits - \ npds*2+nleds npds*2+nleds*2 - 8sp ." open_led=" r@ 1+ 2* r@ + dup r@ + .bits - r> drop drop ( ) + pbuf 3 + c@ if + pbuf 4 + c@ h# 16 <> abort" bad signals y" + [ifdef] nn-components + ['] y-os to our-os + [then] + /y-os ( addr bits# ) + else + pbuf 4 + c@ h# 1e <> abort" bad signals x" + [ifdef] nn-components + ['] x-os to our-os + [then] + /x-os ( addr bits# ) + then + + 0 do ( addr ) + dup c@ ( addr byte ) + i 8 mod ( addr byte bit# ) + rshift 1 and if ( addr ) + 8sp + [ifdef] nn-components + i our-os count type + [then] + ." ( bit " i .d ." )" cr + fault + then ( addr ) + i 8 mod 7 = if 1+ then ( addr' ) + loop drop ( ) cr ; @@ -157,6 +332,18 @@ 4sp ." Y Axis" cr 1 test-os-axis ; +[ifdef] nn-components +d# 11 constant x-ir-0 \ first X axis IR component identifier +d# 12 constant x-pd-0 \ first X axis PD component identifier +d# -1 constant x-up \ direction of numbering + +d# 12 constant y-ir-0 +d# 13 constant y-pd-0 +d# 1 constant y-up +[then] + +d# 1 value fss-min + : test-fss-axis ( axis -- ) d# 64 swap h# 0f h# 03 h# ee 5 twsi-out h# 0f d# 20 anticipate @@ -165,14 +352,18 @@ push-decimal pbuf 4 + c@ 0 do ( ) pbuf 5 + i + c@ - dup 0= if fault then + dup fss-min < if fault then 4 .r space i d# 10 mod d# 9 = if cr 8sp then loop cr pop-base +[ifdef] nn-components + \ FIXME: express failed signals in terms of IR PCB component names. + \ Y axis, IR11 PD12, IR11 PD11, IR10 PD11 ... IR1 PD1 + \ X axis, IR12 PD13, IR12 PD14, IR13 PD14 ... IR26 PD28 +[then] \ FIXME: using a light guide, characterise a low signal level, \ detect, and fail self test - \ FIXME: express failed signals in terms of IR PCB component names. ; : test-fss @@ -187,10 +378,19 @@ pbuf 2+ c@ h# 0d <> abort" bad response" 8sp - pbuf 4 + c@ >r ( r:nsigs ) - pbuf 5 + ( r:nsigs array ) - 0 r@ 1+ .bits ( r:nsigs array ) - r> drop drop ( ) + pbuf 5 + ( addr ) + pbuf 4 + c@ ( addr #bits ) + ." ( " 0 do ( addr ) + dup c@ ( addr byte ) + i 8 mod ( addr byte bit# ) + rshift 1 and if ( addr ) + i .d + fault + then + i 8 mod ( addr rem ) + 7 = if 1+ then ( addr' ) + loop drop ( ) + ." )" cr cr \ FIXME: express low signals in terms of IR PCB component names. ; @@ -213,6 +413,7 @@ diagnostic-mode? if 0 to faults + test-version test-os test-fss test-ls
1
0
0
0
[commit] r3195 - cpu/arm/olpc cpu/arm/olpc/1.75 dev/olpc/dcon
by repository service
17 Aug '12
17 Aug '12
Author: wmb Date: Fri Aug 17 19:29:15 2012 New Revision: 3195 URL:
http://tracker.coreboot.org/trac/openfirmware/changeset/3195
Log: OLPC ARM - moved the DCON driver out of the screen node into a new node underneath an I2C bus node, for ease of Linux driver binding. Modified: cpu/arm/olpc/1.75/lcdcfg.fth cpu/arm/olpc/lcd.fth dev/olpc/dcon/mmp2dcon.fth Modified: cpu/arm/olpc/1.75/lcdcfg.fth ============================================================================== --- cpu/arm/olpc/1.75/lcdcfg.fth Fri Aug 17 19:27:24 2012 (r3194) +++ cpu/arm/olpc/1.75/lcdcfg.fth Fri Aug 17 19:29:15 2012 (r3195) @@ -1,7 +1,30 @@ dev /display +new-device + " panel" device-name + " mrvl,dumb-panel" +compatible + + " OLPC DCON panel" model + : +i encode-int encode+ ; + + decimal + 0 0 encode-bytes + \ xres, yres, refresh, clockhz, left, right, top, bottom, hsync, vsync, flags, widthmm, heightmm + 1200 +i 900 +i 50 +i 56,930,000 +i 24 +i 26 +i 5 +i 4 +i 6 +i 3 +i 0 +i 152 +i 115 +i + hex + " linux,timing-modes" property + + " 1200x900@50" " linux,mode-names" string-property + + h# 2000000d " lcd-dumb-ctrl-regval" integer-property + h# 08001100 " lcd-pn-ctrl0-regval" integer-property +finish-device +device-end [ifdef] has-dcon - fload ${BP}/dev/olpc/dcon/mmp2dcon.fth \ DCON control -[then] +fload ${BP}/dev/olpc/dcon/mmp2dcon.fth \ DCON control +dev /display/panel + " /dcon" encode-phandle " control-node" property device-end +[then] + Modified: cpu/arm/olpc/lcd.fth ============================================================================== --- cpu/arm/olpc/lcd.fth Fri Aug 17 19:27:24 2012 (r3194) +++ cpu/arm/olpc/lcd.fth Fri Aug 17 19:29:15 2012 (r3195) @@ -319,9 +319,11 @@ [then] defer init-panel ' noop to init-panel - defer bright! ' drop to bright! - defer backlight-off ' noop to backlight-off - defer backlight-on ' noop to backlight-on + + \ XXX we really should bounce these through the panel node(s) + : bright! " bright!" $call-dcon ; + : backlight-off " backlight-off" $call-dcon ; + : backlight-on " backlight-on" $call-dcon ; : display-on init-panel \ Turns on DCON etc Modified: dev/olpc/dcon/mmp2dcon.fth ============================================================================== --- dev/olpc/dcon/mmp2dcon.fth Fri Aug 17 19:27:24 2012 (r3194) +++ dev/olpc/dcon/mmp2dcon.fth Fri Aug 17 19:29:15 2012 (r3195) @@ -1,58 +1,30 @@ \ See license at end of file -\ " dcon" device-name -also forth definitions : has-dcon-ram? ( -- flag ) board-revision h# 1b18 = if true exit then board-revision h# 1b48 >= if true exit then false ; -previous definitions -new-device - " dcon" device-name - " mrvl,dumb-panel" +compatible - " olpc,xo1-dcon" +compatible - " olpc,xo1.75-dcon" +compatible - - " OLPC DCON panel" model - : +i encode-int encode+ ; - - 0 0 encode-bytes - dcon-stat0-gpio# 0 encode-gpio - dcon-stat1-gpio# 0 encode-gpio - dcon-load-gpio# 0 encode-gpio - dcon-irq-gpio# 0 encode-gpio - " gpios" property - - " stat0" encode-string - " stat1" encode-string encode+ - " load" encode-string encode+ - " irq" encode-string encode+ - " gpio-names" property - - " /dcon-i2c" encode-phandle " i2c-parent" property - - decimal - 0 0 encode-bytes - \ xres, yres, refresh, clockhz, left, right, top, bottom, hsync, vsync, flags, widthmm, heightmm - 1200 +i 900 +i 50 +i 56,930,000 +i 24 +i 26 +i 5 +i 4 +i 6 +i 3 +i 0 +i 152 +i 115 +i - hex - " linux,timing-modes" property - - " 1200x900@50" " linux,mode-names" string-property - - h# 2000000d " lcd-dumb-ctrl-regval" integer-property - h# 08001100 " lcd-pn-ctrl0-regval" integer-property -finish-device +0 0 " 1a" " /dcon-i2c" begin-package -stand-init: - has-dcon-ram? 0= if - " /dcon" find-device - 0 0 " no-freeze" property - device-end - then -; +" dcon" device-name +" olpc,xo1-dcon" +compatible +" olpc,xo1.75-dcon" +compatible +h# 1a 1 reg + +0 0 encode-bytes +dcon-stat0-gpio# 0 encode-gpio +dcon-stat1-gpio# 0 encode-gpio +dcon-load-gpio# 0 encode-gpio +dcon-irq-gpio# 0 encode-gpio +" gpios" property + +" stat0" encode-string +" stat1" encode-string encode+ +" load" encode-string encode+ +" irq" encode-string encode+ +" gpio-names" property \ DCON internal registers, accessed via I2C \ 0 constant DCON_ID @@ -89,6 +61,7 @@ ; : smb-init ( -- ) set-dcon-slave smb-on smb-pulses ; +: smb-reset ( -- ) smb-stop 1 ms smb-off 1 ms smb-on ; : dcon@ ( reg# -- word ) set-dcon-slave smb-word@ ; : dcon! ( word reg# -- ) set-dcon-slave smb-word! ; @@ -161,7 +134,7 @@ \ gx_configure_tft(info); : try-dcon! ( w reg# -- ) - ['] dcon! catch if 2drop smb-stop 1 ms smb-off 1 ms smb-on then + ['] dcon! catch if 2drop smb-reset then ; : mode@ ( -- mode ) 1 dcon@ ; @@ -174,16 +147,22 @@ : vsync! ( sync -- ) 7 dcon! ; \ def: h# 403 d# 4,3 : timeout! ( to -- ) 8 dcon! ; \ def: h# ffff : scanint! ( si -- ) 9 dcon! ; \ def: h# 0000 +[ifdef] old-way : dcon-bright! ( level -- ) d# 10 dcon! ; \ def: h# xxxF ' dcon-bright! to bright! -: bright@ ( -- level ) d# 10 dcon@ ; -: brighter ( -- ) bright@ 1+ h# f min bright! ; -: dimmer ( -- ) bright@ 1- 0 max bright! ; - : dcon-backlight-off ( -- ) mode@ 8 invert and mode! ; ' dcon-backlight-off to backlight-off : dcon-backlight-on ( -- ) mode@ 8 or mode! ; ' dcon-backlight-on to backlight-on +[else] +: bright! ( level -- ) d# 10 dcon! ; \ def: h# xxxF +: backlight-off ( -- ) mode@ 8 invert and mode! ; +: backlight-on ( -- ) mode@ 8 or mode! ; +[then] + +: bright@ ( -- level ) d# 10 dcon@ ; +: brighter ( -- ) bright@ 1+ h# f min bright! ; +: dimmer ( -- ) bright@ 1- 0 max bright! ; \ Color swizzle, AA, no passthrough, backlight : set-color ( color? -- ) @@ -232,19 +211,11 @@ h# f bright! ; -: video-save - 0 set-source \ Freeze image -; - -: video-restore - smb-init - 1 set-source \ Unfreeze image -; - 0 value dcon-found? : maybe-set-cmos ( -- ) ; +[ifdef] old-way : init-dcon ( -- ) smb-init @@ -253,6 +224,15 @@ \ dcon-enable leaves mode set to 69 - 40:antialias, 20:swizzle, 8:backlight on, 1:passthru off ; ' init-dcon to init-panel +[else] +: open ( -- flag ) + smb-init +\ Unnecessary because CForth has already done it +\ dcon-load dcon-enable ( maybe-set-cmos ) + \ dcon-enable leaves mode set to 69 - 40:antialias, 20:swizzle, 8:backlight on, 1:passthru off + true +; +[then] : dcon-power-on ( -- ) 1 h# 26 ec-cmd-b! ; : dcon-power-off ( -- ) 0 h# 26 ec-cmd-b! ; @@ -275,6 +255,16 @@ saved-brightness bright! ; +end-package + +stand-init: + has-dcon-ram? 0= if + " /dcon" find-device + 0 0 " no-freeze" property + device-end + then +; + \ LICENSE_BEGIN \ Copyright (c) 2010 FirmWorks \
1
0
0
0
[commit] r3194 - in cpu: arm/mmp2 arm/olpc x86/pc/olpc x86/pc/olpc/via
by repository service
17 Aug '12
17 Aug '12
Author: wmb Date: Fri Aug 17 19:27:24 2012 New Revision: 3194 URL:
http://tracker.coreboot.org/trac/openfirmware/changeset/3194
Log: OLPC - made a new word $call-dcon to break the assumption that the DCON driver is part of the screen node. It is implemented differently on different platforms, depending on the actual location of the DCON driver. For old platforms, it's equivalent to $call-screen . Modified: cpu/arm/mmp2/dramrecal.fth cpu/arm/olpc/build-fw.fth cpu/x86/pc/olpc/fw.bth cpu/x86/pc/olpc/gui.fth cpu/x86/pc/olpc/via/fw.bth Modified: cpu/arm/mmp2/dramrecal.fth ============================================================================== --- cpu/arm/mmp2/dramrecal.fth Fri Aug 17 19:24:13 2012 (r3193) +++ cpu/arm/mmp2/dramrecal.fth Fri Aug 17 19:27:24 2012 (r3194) @@ -767,7 +767,7 @@ sleep-mask 1 and if \ DCON power down dcon-freeze else - " dcon-suspend" $call-screen + " dcon-suspend" $call-dcon then " sleep" $call-screen " set-ack" $call-ec @@ -793,7 +793,7 @@ sleep-mask 1 and if \ DCON power up dcon-unfreeze else - " dcon-resume" $call-screen + " dcon-resume" $call-dcon then ; Modified: cpu/arm/olpc/build-fw.fth ============================================================================== --- cpu/arm/olpc/build-fw.fth Fri Aug 17 19:24:13 2012 (r3193) +++ cpu/arm/olpc/build-fw.fth Fri Aug 17 19:27:24 2012 (r3194) @@ -41,6 +41,9 @@ : poll-tty ( -- ) ubreak? if user-abort then ; \ BREAK detection : install-abort ( -- ) ['] poll-tty d# 100 alarm ; +0 value dcon-ih +: $call-dcon ( ... -- ... ) dcon-ih $call-method ; + 0 value keyboard-ih fload ${BP}/ofw/core/muxdev.fth \ I/O collection/distribution device @@ -171,9 +174,7 @@ ' stand-power-off to power-off : olpc-reset-all ( -- ) - " screen" " dcon-off" ['] execute-device-method catch if - 2drop 2drop - then + " dcon-off" $call-dcon ec-power-cycle begin wfi again ; @@ -510,6 +511,7 @@ fload ${BP}/cpu/arm/olpc/banner.fth : console-start ( -- ) + " /dcon" open-dev to dcon-ih install-mux-io cursor-off true to text-on? Modified: cpu/x86/pc/olpc/fw.bth ============================================================================== --- cpu/x86/pc/olpc/fw.bth Fri Aug 17 19:24:13 2012 (r3193) +++ cpu/x86/pc/olpc/fw.bth Fri Aug 17 19:27:24 2012 (r3194) @@ -305,6 +305,9 @@ time&date .date space .time ." UTC" cr ; +\ The DCON methods are in the screen node on this system +: $call-dcon ( ... -- ... ) screen-ih $call-method ; + fload ${BP}/cpu/x86/pc/olpc/banner.fth fload ${BP}/ofw/gui/loadmenu.fth fload ${BP}/cpu/x86/pc/olpc/via/mfgtest.fth Modified: cpu/x86/pc/olpc/gui.fth ============================================================================== --- cpu/x86/pc/olpc/gui.fth Fri Aug 17 19:24:13 2012 (r3193) +++ cpu/x86/pc/olpc/gui.fth Fri Aug 17 19:27:24 2012 (r3194) @@ -355,9 +355,9 @@ $show ( ) ; -: frozen? ( -- flag ) " vga?" $call-screen 0= ; -: dcon-freeze ( -- ) 0 " set-source" $call-screen d# 30 ms ; -: dcon-unfreeze ( -- ) 1 " set-source" $call-screen d# 30 ms ; +: frozen? ( -- flag ) " vga?" $call-dcon 0= ; +: dcon-freeze ( -- ) 0 " set-source" $call-dcon d# 30 ms ; +: dcon-unfreeze ( -- ) 1 " set-source" $call-dcon d# 30 ms ; \ === Stuff moved from security.fth === @@ -380,7 +380,7 @@ : show-going ( -- ) background-rgb rgb>565 progress-xy ?adjust d# 500 d# 100 " fill-rectangle" $call-screen d# 588 d# 638 set-icon-xy " bigdot" show-icon - " vga?" $call-screen 0= if dcon-unfreeze dcon-freeze then + frozen? if dcon-unfreeze dcon-freeze then ; : show-no-power ( -- ) \ chip, battery, overlaid sad face Modified: cpu/x86/pc/olpc/via/fw.bth ============================================================================== --- cpu/x86/pc/olpc/via/fw.bth Fri Aug 17 19:24:13 2012 (r3193) +++ cpu/x86/pc/olpc/via/fw.bth Fri Aug 17 19:27:24 2012 (r3194) @@ -359,6 +359,9 @@ fload ${BP}/cpu/x86/pc/olpc/setwp.fth +\ The DCON methods are in the screen node on this system +: $call-dcon ( ... -- ... ) screen-ih $call-method ; + fload ${BP}/cpu/x86/pc/olpc/via/help.fth \ Help for common user tasks fload ${BP}/cpu/x86/pc/olpc/gui.fth fload ${BP}/cpu/x86/pc/olpc/via/suspend.fth \ Suspend/resume setup
1
0
0
0
[commit] r3193 - dev/usb2/hcd/ehci
by repository service
17 Aug '12
17 Aug '12
Author: wmb Date: Fri Aug 17 19:24:13 2012 New Revision: 3193 URL:
http://tracker.coreboot.org/trac/openfirmware/changeset/3193
Log: USB EHCI driver - use string-property instead of +compatible so it can be compiled with the FCode tokenizer. Modified: dev/usb2/hcd/ehci/ehci.fth Modified: dev/usb2/hcd/ehci/ehci.fth ============================================================================== --- dev/usb2/hcd/ehci/ehci.fth Fri Aug 17 19:22:45 2012 (r3192) +++ dev/usb2/hcd/ehci/ehci.fth Fri Aug 17 19:24:13 2012 (r3193) @@ -3,7 +3,7 @@ " ehci" encode-string " device_type" property -" usb-ehci" +compatible +" usb-ehci" " compatible" string-property hex headers
1
0
0
0
[commit] r3192 - dev/olpc
by repository service
17 Aug '12
17 Aug '12
Author: wmb Date: Fri Aug 17 19:22:45 2012 New Revision: 3192 URL:
http://tracker.coreboot.org/trac/openfirmware/changeset/3192
Log: OLPC camera test - removed an unnecessary call to full-brightness. Modified: dev/olpc/cameratest.fth Modified: dev/olpc/cameratest.fth ============================================================================== --- dev/olpc/cameratest.fth Fri Aug 17 19:20:39 2012 (r3191) +++ dev/olpc/cameratest.fth Fri Aug 17 19:22:45 2012 (r3192) @@ -13,9 +13,8 @@ : autobright ( -- ) read-agc 3 + 3 rshift h# f min " bright!" " $call-screen" evaluate ; -[then] - : full-brightness ( -- ) h# f " bright!" " $call-screen" evaluate ; +[then] : timeout-read ( adr len timeout -- actual ) >r 0 -rot r> 0 ?do ( actual adr len ) @@ -47,7 +46,7 @@ false set-mirrored resync ( ) shoot-still ?dup if stop-display close exit then ( error? ) d# 1,000 ms - true set-mirrored resync shoot-movie full-brightness ( error? ) + true set-mirrored resync shoot-movie ( full-brightness ) ( error? ) stop-display close ( error? ) ?dup 0= if confirm-selftest? then ( error? ) ;
1
0
0
0
[commit] r3191 - cpu/arm/mmp2
by repository service
17 Aug '12
17 Aug '12
Author: wmb Date: Fri Aug 17 19:20:39 2012 New Revision: 3191 URL:
http://tracker.coreboot.org/trac/openfirmware/changeset/3191
Log: OLPC ARM - Changed the unit numbers for some TWSI nodes so they don't conflict with auto-assigned unit numbers of i2c gpio nodes. Modified: cpu/arm/mmp2/twsi.fth Modified: cpu/arm/mmp2/twsi.fth ============================================================================== --- cpu/arm/mmp2/twsi.fth Fri Aug 17 19:19:25 2012 (r3190) +++ cpu/arm/mmp2/twsi.fth Fri Aug 17 19:20:39 2012 (r3191) @@ -190,9 +190,9 @@ h# d4011000 1 7 false true 2 make-twsi-node \ TWSI1 h# d4031000 2 0 true true 3 make-twsi-node \ TWSI2 \ h# d4032000 3 1 true true N make-twsi-node \ TWSI3 - h# d4033000 4 2 true true 0 make-twsi-node \ TWSI4 + h# d4033000 4 2 true true 5 make-twsi-node \ TWSI4 \ h# d4038000 d# 30 3 true true N make-twsi-node \ TWSI5 - h# d4034000 d# 31 4 true true 1 make-twsi-node \ TWSI6 + h# d4034000 d# 31 4 true true 4 make-twsi-node \ TWSI6 0 0 " 1a" " /i2c@d4011000" begin-package \ TWSI1
1
0
0
0
[commit] r3190 - cpu/arm/mmp2
by repository service
17 Aug '12
17 Aug '12
Author: wmb Date: Fri Aug 17 19:19:25 2012 New Revision: 3190 URL:
http://tracker.coreboot.org/trac/openfirmware/changeset/3190
Log: OLPC ARM - Added #address-cells, #size-cells, encode-unit, and decode-unit methods to i2c-gpio device nodes so they can have children with reg properties. Modified: cpu/arm/mmp2/gpio.fth Modified: cpu/arm/mmp2/gpio.fth ============================================================================== --- cpu/arm/mmp2/gpio.fth Fri Aug 17 06:11:00 2012 (r3189) +++ cpu/arm/mmp2/gpio.fth Fri Aug 17 19:19:25 2012 (r3190) @@ -96,6 +96,13 @@ new-device " camera-i2c" device-name " i2c-gpio" +compatible + 1 " #address-cells" integer-property + 1 " #size-cells" integer-property + : encode-unit ( phys.. -- str ) push-hex (u.) pop-base ; + : decode-unit ( str -- phys.. ) push-hex $number if 0 then pop-base ; + : open ( -- flag ) true ; + : close ( -- ) ; + 0 0 encode-bytes cam-sda-gpio# 0 encode-gpio @@ -106,6 +113,12 @@ new-device " dcon-i2c" device-name " i2c-gpio" +compatible + 1 " #address-cells" integer-property + 1 " #size-cells" integer-property + : encode-unit ( phys.. -- str ) push-hex (u.) pop-base ; + : decode-unit ( str -- phys.. ) push-hex $number if 0 then pop-base ; + : open ( -- flag ) true ; + : close ( -- ) ; 0 0 encode-bytes dcon-sda-gpio# 0 encode-gpio
1
0
0
0
[commit] r3189 - dev
by repository service
17 Aug '12
17 Aug '12
Author: quozl Date: Fri Aug 17 06:11:00 2012 New Revision: 3189 URL:
http://tracker.coreboot.org/trac/openfirmware/changeset/3189
Log: OLPC - libertas antenna test, translate baseband processor register antenna numbers to the same numbering as used by the user interface. Modified: dev/libertas.fth Modified: dev/libertas.fth ============================================================================== --- dev/libertas.fth Fri Aug 17 05:53:07 2012 (r3188) +++ dev/libertas.fth Fri Aug 17 06:11:00 2012 (r3189) @@ -2203,8 +2203,8 @@ : .rx-antenna ( antenna -- ) 6 rshift case - b# 00 of ." 0" endof - b# 01 of ." 1" endof + b# 00 of ." 1" endof + b# 01 of ." 2" endof b# 10 of ." d" endof \ diversity b# 11 of ." ?" endof endcase @@ -2213,8 +2213,8 @@ : .tx-antenna ( antenna -- ) 6 rshift case - b# 00 of ." 0" endof - b# 01 of ." 1" endof + b# 00 of ." 1" endof + b# 01 of ." 2" endof b# 10 of ." r" endof \ same antenna as receive antenna b# 11 of ." ?" endof endcase
1
0
0
0
[commit] r3188 - dev
by repository service
17 Aug '12
17 Aug '12
Author: quozl Date: Fri Aug 17 05:53:07 2012 New Revision: 3188 URL:
http://tracker.coreboot.org/trac/openfirmware/changeset/3188
Log: OLPC - libertas antenna test, comply with new firmware specification that requires ordering of antenna selection commands. Now works on XO-4 A2. Modified: dev/libertas.fth Modified: dev/libertas.fth ============================================================================== --- dev/libertas.fth Fri Aug 17 01:27:49 2012 (r3187) +++ dev/libertas.fth Fri Aug 17 05:53:07 2012 (r3188) @@ -1692,12 +1692,18 @@ outbuf-wait drop ; +\ When changing from antenna diversity to single antenna, +\ issue ACT_SET_TX before ACT_SET_RX. : set-antenna ( antenna -- ) - 1 ( ACT_SET_RX ) rf-antenna ( ) + dup 2 ( ACT_SET_TX ) rf-antenna ( antenna ) + 1 ( ACT_SET_RX ) rf-antenna ( ) ; +\ When changing from single antenna to antenna diversity, +\ issue ACT_SET_RX before ACT_SET_TX. : set-antenna-diversity ( -- ) h# ffff 1 ( ACT_SET_RX ) rf-antenna + h# ffff 2 ( ACT_SET_TX ) rf-antenna ; : get-antenna ( -- antenna ) @@ -2197,18 +2203,20 @@ : .rx-antenna ( antenna -- ) 6 rshift case - b# 00 of ." 0" endof - b# 01 of ." 1" endof - b# 10 of ." d" endof + b# 00 of ." 0" endof + b# 01 of ." 1" endof + b# 10 of ." d" endof \ diversity + b# 11 of ." ?" endof endcase ; : .tx-antenna ( antenna -- ) 6 rshift case - b# 00 of ." 0" endof - b# 01 of ." 1" endof - b# 10 of ." r" endof + b# 00 of ." 0" endof + b# 01 of ." 1" endof + b# 10 of ." r" endof \ same antenna as receive antenna + b# 11 of ." ?" endof endcase ; @@ -2221,8 +2229,8 @@ get-antenna ( base antenna ) hex ." ant" .antenna ( base ) - ." rx " h# 3f bbp-reg@ .rx-antenna - ." tx " h# 40 bbp-reg@ .tx-antenna + ." rx " h# 3f bbp-reg@ .rx-antenna ( base ) + ." tx " h# 40 bbp-reg@ .tx-antenna ( base ) base ! ; @@ -2236,16 +2244,16 @@ ." keys: (0,1,2,3,d,a,s,q)" cr begin d# 100 ms show-antenna key? if - cr show-antenna key + cr key case - h# 71 ( q ) of cr exit endof - h# 1b of cr exit endof - h# 30 ( 0 ) of ." antenna to 0" 0 set-antenna endof - h# 31 ( 1 ) of ." antenna to 1" 1 set-antenna endof - h# 32 ( 2 ) of ." antenna to 2" 2 set-antenna endof - h# 33 ( 3 ) of ." antenna to 3" 3 set-antenna endof - h# 64 ( d ) of ." diversity" cr set-antenna-diversity endof - h# 61 ( a ) of ." associate" cr close open drop endof + h# 71 ( q ) of ." quit" exit endof + h# 1b of exit endof + h# 30 ( 0 ) of ." antenna to 0 " 0 set-antenna cr endof + h# 31 ( 1 ) of ." antenna to 1 " 1 set-antenna cr endof + h# 32 ( 2 ) of ." antenna to 2 " 2 set-antenna cr endof + h# 33 ( 3 ) of ." antenna to 3 " 3 set-antenna cr endof + h# 64 ( d ) of ." diversity " set-antenna-diversity cr endof + h# 61 ( a ) of ." associate " close open drop endof h# 73 ( s ) of ta-scan endof endcase then
1
0
0
0
← Newer
1
...
5
6
7
8
9
10
11
...
16
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Results per page:
10
25
50
100
200