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] r3237 - dev/olpc/mmp2camera
by repository service
29 Aug '12
29 Aug '12
Author: wmb Date: Wed Aug 29 02:50:52 2012 New Revision: 3237 URL:
http://tracker.coreboot.org/trac/openfirmware/changeset/3237
Log: OLPC ARM - Camera driver - use the new "my-clocks-on/off" facility to move the clock enabling code out of this file into the PMUA driver. Modified: dev/olpc/mmp2camera/ccic.fth Modified: dev/olpc/mmp2camera/ccic.fth ============================================================================== --- dev/olpc/mmp2camera/ccic.fth Wed Aug 29 02:48:20 2012 (r3236) +++ dev/olpc/mmp2camera/ccic.fth Wed Aug 29 02:50:52 2012 (r3237) @@ -79,54 +79,8 @@ 0 to next-buf ; -[ifdef] mmp3 -: isp-island-power-on - \ set ISP regs to the default value - 0 h# 50 pmua! - 0 h# 1fc pmua! - - \ Turn on the CCIC/ISP power switch - h# 200 h# 1fc pmua! - d# 10 ms - h# 600 h# 1fc pmua! - d# 10 ms - \ Disable isp isolation\n" - h# 700 h# 1fc pmua! - - \ Start memory redundacy repair - 4 h# 224 pmua-set \ PMUA_ISP_CLK_RES_CTRL - begin d# 10 ms h# 224 pmua@ 4 and 0= until - - \ Enable dummy clocks to the SRAMS - h# 10 h# 1e0 pmua-set \ PMUA_ISLD_CI_PDWN_CTRL - d# 200 ms - h# 10 h# 1e0 pmua-clr - - \ Enable ISP clocks here if you want to use the ISP - \ 8 h# 224 pmua-set \ Enable AXI clock in PMUA_ISP_CLK_RES_CTRL - \ h# f00 h# 200 h# 224 pmua-fld \ Clock divider - \ h# c0 h# 40 h# 224 pmua-fld \ CLock source - \ h# 10 h# 224 pmua-set - - \ enable CCIC clocks - h# 8238 h# 50 pmua-set - - \ Deassert ISP clocks here if you want to use the ISP - \ XXX should these be pmua-clr ? - \ 1 h# 224 pmua-set \ AXI reset - \ 2 h# 224 pmua-set \ ISP SW reset - \ h# 10000 h# 50 pmua-set \ CCIC1 AXI Arbiter reset - - \ De-assert CCIC Resets - h# 10107 h# 50 pmua-set \ XXX change to 107 -; -[then] : power-on ( -- ) - [ifdef] mmp3 isp-island-power-on [then] - - \ Enable clocks - h# 3f h# 28 pmua! \ Clock gating - AHB, Internal PIXCLK, AXI clock always on - h# 0003.805b h# 50 pmua! \ PMUA clock config for CCIC - /1, PLL1/16, AXI arb, AXI, perip on + my-clock-on \ h# 0000.0002 h# 88 cl! \ Clock select - PIXMCLK, 797/2 (PLL1/16) / 2 -> 24.9 MHz \ h# 4000.0002 h# 88 cl! \ Clock select - AXI, 797/2 (PLL1/16) / 2 -> 24.9 MHz @@ -143,6 +97,8 @@ reset-sensor h# 40 cl@ h# 1000.0000 or h# 40 cl! \ Disable pads sensor-power-off + + my-clock-off ; @@ -206,8 +162,8 @@ : close ( -- ) ctlr-stop interrupts-off - power-off free-dma-bufs + power-off camera-base h# 1000 " map-out" $call-parent ;
1
0
0
0
[commit] r3236 - cpu/arm/mmp2
by repository service
29 Aug '12
29 Aug '12
Author: wmb Date: Wed Aug 29 02:48:20 2012 New Revision: 3236 URL:
http://tracker.coreboot.org/trac/openfirmware/changeset/3236
Log: OLPC ARM - implemented a generic mechanism for enabling and disabling device clocks based on the "clocks" property. Important new words are "my-clock-on" and "my-clock-off", which can be called from a device instance in a node that has a "clocks" property. Modified: cpu/arm/mmp2/apbc.fth cpu/arm/mmp2/pmua.fth Modified: cpu/arm/mmp2/apbc.fth ============================================================================== --- cpu/arm/mmp2/apbc.fth Wed Aug 29 02:12:35 2012 (r3235) +++ cpu/arm/mmp2/apbc.fth Wed Aug 29 02:48:20 2012 (r3236) @@ -89,4 +89,11 @@ h# 94 +int h# 7 +int h# 3 +int d# 26,000,000 +int \ 35 CORESIGHT " clock-enable-registers" property +: on/off ( on? clock# -- ) + get-reg&masks if drop exit then ( on? set-mask clr-mask reg ) + >r r@ apbc@ and ( on? set-mask regval r: reg ) + rot if or else nip then ( regval' r: reg ) + r> apbc! +; + end-package Modified: cpu/arm/mmp2/pmua.fth ============================================================================== --- cpu/arm/mmp2/pmua.fth Wed Aug 29 02:12:35 2012 (r3235) +++ cpu/arm/mmp2/pmua.fth Wed Aug 29 02:48:20 2012 (r3236) @@ -2,6 +2,31 @@ : clocks 2 ; previous definitions +\ Given a clock index, retrieve the register offset and set/clear masks +\ from the clock-enable-registers property in the device node from which +\ this is called. The format and usage of clock-enable-registers is +\ specific to PXA/MMP SoCs, but might be useful for any hardware whose +\ clock enabling can be expressed by clearing some register bits and +\ setting others. + +: get-reg&masks ( clock# -- set-mask ~clr-mask reg false | true ) + " clock-enable-registers" get-property if ( clock# ) + drop true exit ( true -- ) + then ( clock# propval$ ) + + \ Offset into clock-enable-registers array + rot h# 10 * ( propval$ offset ) + 2dup <= if ( propval$ offset ) + 3drop true exit ( true -- ) + then ( propval-adr$ offset ) + /string ( propval-adr$' ) + + decode-int >r ( propval-adr$' r: reg ) + decode-int invert >r ( propval-adr$' r: reg ~clr-mask ) + get-encoded-int r> r> ( set-mask ~clr-mask reg ) + false ( set-mask ~clr-mask reg false ) +; + 0 0 " " " /" begin-package " pmua" name " mrvl,pxa-apmu" +compatible @@ -96,4 +121,132 @@ [then] " clock-enable-registers" property +[ifdef] notdef + " clock-enable-registers" get-property if ( on? clock# ) + 2drop exit ( -- ) + then ( on? clock# propval$ ) + + \ Offset into clock-enable-registers array + rot h# 10 * ( on? propval$ offset ) + 2dup <= if ( on? propval$ offset ) + 4drop exit ( -- ) + then ( on? propval-adr$ offset ) + /string ( on? propval-adr$' ) + + \ Get register offset + decode-int >r ( on? propval-adr$' r: reg-offset ) + + \ Apply the clear mask to the register value + decode-int invert ( on? propval-adr$' clr-mask r: reg-offset ) + r@ pmua@ and ( on? propval-adr$' regval r: reg-offset ) + -rot ( on? regval propval-adr$ r: reg-offset ) + + \ Apply the set mask if the clock is being turned on + 3 roll if ( regval propval-adr$ r: reg-offset ) + get-encoded-int or ( regval' r: reg-offset ) + else ( regval propval-adr$ r: reg-offset ) + 2drop ( regval r: reg-offset ) + then ( regval r: reg-offset ) + + \ Write back the modified register value + r> pmua! ( ) +[then] + +: generic-on/off ( on? clock# -- ) + get-reg&masks if drop exit then ( on? set-mask clr-mask reg ) + >r r@ pmua@ and ( on? set-mask regval r: reg ) + rot if or else nip then ( regval' r: reg ) + r> pmua! +; + +[ifdef] mmp3 +: ccic-isp-island-off ( -- ) + h# 600 h# 1fc pmua! \ Isolation enabled + \ Fiddle with ISP_CLK_RES_CTRL here to turn off ISP engine + h# 000 h# 1fc pmua! \ Power off +; + +: ccic-isp-island-on ( -- ) + \ set ISP regs to the default value + 0 h# 50 pmua! + 0 h# 1fc pmua! + + \ Turn on the CCIC/ISP power switch + h# 200 h# 1fc pmua! \ Partially powered + d# 10 ms + h# 600 h# 1fc pmua! \ Fully powered + d# 10 ms + h# 700 h# 1fc pmua! \ Isolation disabled + +[ifdef] notdef + \ Empirically, the memory redundancy and SRAMs are unnecessary + \ for camera-only (no ISP) operation. + + \ Start memory redundacy repair + 4 h# 224 pmua-set \ PMUA_ISP_CLK_RES_CTRL + begin d# 10 ms h# 224 pmua@ 4 and 0= until + + \ Enable dummy clocks to the SRAMS + h# 10 h# 1e0 pmua-set \ PMUA_ISLD_CI_PDWN_CTRL + d# 200 ms + h# 10 h# 1e0 pmua-clr +[then] + + \ Enable ISP clocks here if you want to use the ISP + \ 8 h# 224 pmua-set \ Enable AXI clock in PMUA_ISP_CLK_RES_CTRL + \ h# f00 h# 200 h# 224 pmua-fld \ Clock divider + \ h# c0 h# 40 h# 224 pmua-fld \ CLock source + \ h# 10 h# 224 pmua-set + + \ enable CCIC clocks + h# 8238 h# 50 pmua-set + + \ Deassert ISP clocks here if you want to use the ISP + \ XXX should these be pmua-clr ? + \ 1 h# 224 pmua-set \ AXI reset + \ 2 h# 224 pmua-set \ ISP SW reset + \ h# 10000 h# 50 pmua-set \ CCIC1 AXI Arbiter reset + + \ De-assert CCIC Resets + h# 10107 h# 50 pmua-set \ XXX change to 107 +; +[then] + +: ccic-on/off ( on? -- ) + if + [ifdef] mmp3 ccic-isp-island-on [then] + + \ Enable clocks + h# 3f h# 28 pmua! \ Clock gating - AHB, Internal PIXCLK, AXI clock always on + h# 0003.805b h# 50 pmua! \ PMUA clock config for CCIC - /1, PLL1/16, AXI arb, AXI, perip on + else + h# 3f h# 50 pmua-clr + [ifdef] mmp3 ccic-isp-island-off [then] + then +; + +: on/off ( on? clock# -- ) + \ Special-case devices that need more elaborate on/off procedures + dup 2 = if \ CCIC ( on? clock# ) + drop ccic-on/off exit ( -- ) + then ( on? clock# ) + + generic-on/off +; + end-package + +\ This is a general-purpose mechanism for enabling/disabling a clock +\ that is described by a "clocks" property in the device node. The +\ property value is a phandle and an index, as used in Linux. + +: my-clock-on/off ( on? -- ) + " clocks" get-my-property abort" No clocks property" ( on? propval$ ) + decode-int >r ( on? propval$ r: phandle ) + get-encoded-int ( on? clock# r: phandle ) + r> push-package ( on? clock# ) + " on/off" package-execute ( ) + pop-package ( ) +; +: my-clock-off ( -- ) false my-clock-on/off ; +: my-clock-on ( -- ) true my-clock-on/off ;
1
0
0
0
[commit] r3235 - in dev/olpc: . mmp2camera
by repository service
29 Aug '12
29 Aug '12
Author: wmb Date: Wed Aug 29 02:12:35 2012 New Revision: 3235 URL:
http://tracker.coreboot.org/trac/openfirmware/changeset/3235
Log: OLPC ARM - Set reg and compatible properties in the /image-sensor node dynamically, by probing for the specific chip that is present. This requires the assistance of the camera driver, because the image sensor won't respond to its I2C bus unless it has a clock from the CCIC camera unit. Modified: dev/olpc/imagesensor.fth dev/olpc/mmp2camera/loadpkg.fth dev/olpc/ov7670.fth dev/olpc/seti.fth Modified: dev/olpc/imagesensor.fth ============================================================================== --- dev/olpc/imagesensor.fth Wed Aug 29 02:10:05 2012 (r3234) +++ dev/olpc/imagesensor.fth Wed Aug 29 02:12:35 2012 (r3235) @@ -12,3 +12,21 @@ : sensor-found? ( -- flag ) false ; +: set-sensor-properties ( name$ i2c-addr -- ) + my-self >r 0 to my-self + " /image-sensor" find-device ( name$ i2c-addr ) + " reg" get-property if ( name$ i2c-addr ) + 1 reg ( name$ ) + +compatible ( ) + else ( name$ i2c-addr regval$ ) + 2drop 3drop ( ) + then + device-end + r> to my-self +; + +also forth definitions +: probe-image-sensor ( -- ) + " /camera" open-dev close-dev +; +previous definitions Modified: dev/olpc/mmp2camera/loadpkg.fth ============================================================================== --- dev/olpc/mmp2camera/loadpkg.fth Wed Aug 29 02:10:05 2012 (r3234) +++ dev/olpc/mmp2camera/loadpkg.fth Wed Aug 29 02:12:35 2012 (r3235) @@ -10,6 +10,8 @@ cam-rst-gpio# 0 encode-gpio " gpios" property + " /image-sensor" encode-phandle " image-sensor" property + 0 [if] : alloc-capture-buffer ( len -- vadr padr ) \ XXX need map-in if we should use virtual mode Modified: dev/olpc/ov7670.fth ============================================================================== --- dev/olpc/ov7670.fth Wed Aug 29 02:10:05 2012 (r3234) +++ dev/olpc/ov7670.fth Wed Aug 29 02:12:35 2012 (r3235) @@ -166,6 +166,7 @@ then ( ) " OV7670" " sensor" string-property + " omnivision,ov7670" camera-smb-slave set-sensor-properties ['] ov7670-set-mirrored to set-mirrored ['] ov7670-config to camera-config Modified: dev/olpc/seti.fth ============================================================================== --- dev/olpc/seti.fth Wed Aug 29 02:10:05 2012 (r3234) +++ dev/olpc/seti.fth Wed Aug 29 02:12:35 2012 (r3235) @@ -306,6 +306,7 @@ h# 12 <> if false exit then ( ) " SETi,SIV120D" " sensor" string-property + " seti,siv120d" camera-smb-slave set-sensor-properties ['] seti-set-mirrored to set-mirrored ['] seti-config to camera-config
1
0
0
0
[commit] r3234 - in cpu/arm: mmp2 olpc
by repository service
29 Aug '12
29 Aug '12
Author: wmb Date: Wed Aug 29 02:10:05 2012 New Revision: 3234 URL:
http://tracker.coreboot.org/trac/openfirmware/changeset/3234
Log: OLPC ARM - Moved the board-specific code to create I2C device nodes into OLPC-specific files. Added: cpu/arm/olpc/gpio-i2c.fth cpu/arm/olpc/twsi-i2c.fth Modified: cpu/arm/mmp2/gpio.fth cpu/arm/mmp2/twsi.fth cpu/arm/olpc/build-fw.fth Modified: cpu/arm/mmp2/gpio.fth ============================================================================== --- cpu/arm/mmp2/gpio.fth Tue Aug 28 18:25:56 2012 (r3233) +++ cpu/arm/mmp2/gpio.fth Wed Aug 29 02:10:05 2012 (r3234) @@ -77,52 +77,3 @@ h# 104 make-gpio-mux-node h# 108 make-gpio-mux-node end-package - -: encode-gpio ( propval$ gpio# low? -- propval$' ) - >r >r ( propval$ r: low? gpio# ) - " /gpio" encode-phandle encode+ ( propval$' r: low? gpio# ) - r> encode-int encode+ ( propval$' r: low? ) - r> encode-int encode+ ( propval$' ) -; - -: gpio-property ( gpionum low? gpioname$ -- ) - 2>r 2>r ( r: gpioname$ gpionum low? ) - 0 0 encode-bytes ( propval$ r: gpioname$ gpionum low? ) - 2r> encode-gpio ( propval$' r: gpioname$ ) - 2r> property ( ) -; - -dev / - 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 - cam-scl-gpio# 0 encode-gpio - " gpios" property - finish-device - - 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 - dcon-scl-gpio# 0 encode-gpio - " gpios" property - finish-device -device-end Modified: cpu/arm/mmp2/twsi.fth ============================================================================== --- cpu/arm/mmp2/twsi.fth Tue Aug 28 18:25:56 2012 (r3233) +++ cpu/arm/mmp2/twsi.fth Wed Aug 29 02:10:05 2012 (r3234) @@ -163,62 +163,6 @@ : twsi-b! ( byte reg -- ) 2 twsi-out ; [ifdef] begin-package -: make-twsi-node ( baseadr clock# irq# muxed-irq? fast? unit# -- ) - root-device - new-device - " linux,unit#" integer-property - " i2c" name - " mrvl,mmp-twsi" +compatible ( baseadr clock# irq# muxed-irq? fast? ) - if 0 0 " mrvl,i2c-fast-mode" property then ( baseadr clock# irq# muxed-irq? ) - if - " /interrupt-controller/interrupt-controller@158" encode-phandle " interrupt-parent" property - then ( baseadr clock# irq# ) - " interrupts" integer-property ( baseadr clock# ) - " /apbc" encode-phandle rot encode-int encode+ " clocks" property - - h# 1000 reg ( ) - 1 " #address-cells" integer-property - 1 " #size-cells" integer-property - " : open true ; : close ;" evaluate - " : encode-unit ( phys.. -- str ) push-hex (u.) pop-base ;" evaluate - " : decode-unit ( str -- phys.. ) push-hex $number if 0 then pop-base ;" evaluate - finish-device - device-end -; - -\ baseadr clk irq mux? fast? unit# - 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 5 make-twsi-node \ TWSI4 -\ h# d4038000 d# 30 3 true true N make-twsi-node \ TWSI5 - h# d4034000 d# 31 4 true true 4 make-twsi-node \ TWSI6 - - -[ifdef] soon-olpc-cl2 \ this breaks cl4-a1 boards, which ofw calls cl2. -0 0 " 30" " /i2c@d4033000" begin-package \ TWSI4 - " touchscreen" name - " raydium_ts" +compatible - my-address my-space 1 reg -end-package -[else] -0 0 " 50" " /i2c@d4033000" begin-package \ TWSI4 - " touchscreen" name - " zforce" +compatible - my-address my-space 1 reg - touch-rst-gpio# 1 " reset-gpios" gpio-property - touch-tck-gpio# 1 " test-gpios" gpio-property - touch-hd-gpio# 1 " hd-gpios" gpio-property - touch-int-gpio# 1 " dr-gpios" gpio-property -end-package -[then] - -0 0 " 19" " /i2c@d4034000" begin-package \ TWSI6 - " accelerometer" name - " lis3lv02d" +compatible - my-address my-space 1 reg -end-package - 0 0 " " " /" begin-package " twsi" name Modified: cpu/arm/olpc/build-fw.fth ============================================================================== --- cpu/arm/olpc/build-fw.fth Tue Aug 28 18:25:56 2012 (r3233) +++ cpu/arm/olpc/build-fw.fth Wed Aug 29 02:10:05 2012 (r3234) @@ -102,6 +102,9 @@ fload ${BP}/cpu/arm/mmp2/watchdog.fth \ reset-all using watchdog timer +fload ${BP}/cpu/arm/olpc/gpio-i2c.fth +fload ${BP}/cpu/arm/olpc/twsi-i2c.fth + 0 0 " d4018000" " /" begin-package \ UART3 fload ${BP}/cpu/arm/mmp2/uart.fth " /apbc" encode-phandle d# 12 encode-int encode+ " clocks" property Added: cpu/arm/olpc/gpio-i2c.fth ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ cpu/arm/olpc/gpio-i2c.fth Wed Aug 29 02:10:05 2012 (r3234) @@ -0,0 +1,78 @@ +purpose: Device tree nodes for I2C buses implemented with GPIOs + +: encode-gpio ( propval$ gpio# low? -- propval$' ) + >r >r ( propval$ r: low? gpio# ) + " /gpio" encode-phandle encode+ ( propval$' r: low? gpio# ) + r> encode-int encode+ ( propval$' r: low? ) + r> encode-int encode+ ( propval$' ) +; + +: gpio-property ( gpionum low? gpioname$ -- ) + 2>r 2>r ( r: gpioname$ gpionum low? ) + 0 0 encode-bytes ( propval$ r: gpioname$ gpionum low? ) + 2r> encode-gpio ( propval$' r: gpioname$ ) + 2r> property ( ) +; + +: make-sensor-node ( name$ i2c-addr -- ) + " /camera-i2c" find-device ( name$ i2c-addr ) + new-device ( name$ i2c-addr ) + 1 reg ( name$ ) + +compatible ( ) + " image-sensor" device-name + 0 0 encode-bytes + cam-pwr-gpio# 0 encode-gpio + cam-rst-gpio# 0 encode-gpio + " gpios" property + finish-device + device-end +; + +dev / + 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 + cam-scl-gpio# 0 encode-gpio + " gpios" property + + new-device + " image-sensor" device-name + + \ The reg and compatible properties are set by probing, based on the actual + \ image sensor encountered. For example: + \ h# 21 1 reg + \ " omnivision,ov7670" +compatible + + 0 0 encode-bytes + cam-pwr-gpio# 0 encode-gpio + cam-rst-gpio# 0 encode-gpio + " gpios" property + + finish-device + finish-device + + 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 + dcon-scl-gpio# 0 encode-gpio + " gpios" property + finish-device +device-end Added: cpu/arm/olpc/twsi-i2c.fth ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ cpu/arm/olpc/twsi-i2c.fth Wed Aug 29 02:10:05 2012 (r3234) @@ -0,0 +1,57 @@ +purpose: Device tree nodes for board-specific I2C buses implemented by TWSI hardware + +: make-twsi-node ( baseadr clock# irq# muxed-irq? fast? unit# -- ) + root-device + new-device + " linux,unit#" integer-property + " i2c" name + " mrvl,mmp-twsi" +compatible ( baseadr clock# irq# muxed-irq? fast? ) + if 0 0 " mrvl,i2c-fast-mode" property then ( baseadr clock# irq# muxed-irq? ) + if + " /interrupt-controller/interrupt-controller@158" encode-phandle " interrupt-parent" property + then ( baseadr clock# irq# ) + " interrupts" integer-property ( baseadr clock# ) + " /apbc" encode-phandle rot encode-int encode+ " clocks" property + + h# 1000 reg ( ) + 1 " #address-cells" integer-property + 1 " #size-cells" integer-property + " : open true ; : close ;" evaluate + " : encode-unit ( phys.. -- str ) push-hex (u.) pop-base ;" evaluate + " : decode-unit ( str -- phys.. ) push-hex $number if 0 then pop-base ;" evaluate + finish-device + device-end +; + +\ baseadr clk irq mux? fast? unit# + 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 5 make-twsi-node \ TWSI4 +\ h# d4038000 d# 30 3 true true N make-twsi-node \ TWSI5 + h# d4034000 d# 31 4 true true 4 make-twsi-node \ TWSI6 + + +[ifdef] soon-olpc-cl2 \ this breaks cl4-a1 boards, which ofw calls cl2. +0 0 " 30" " /i2c@d4033000" begin-package \ TWSI4 + " touchscreen" name + " raydium_ts" +compatible + my-address my-space 1 reg +end-package +[else] +0 0 " 50" " /i2c@d4033000" begin-package \ TWSI4 + " touchscreen" name + " zforce" +compatible + my-address my-space 1 reg + touch-rst-gpio# 1 " reset-gpios" gpio-property + touch-tck-gpio# 1 " test-gpios" gpio-property + touch-hd-gpio# 1 " hd-gpios" gpio-property + touch-int-gpio# 1 " dr-gpios" gpio-property +end-package +[then] + +0 0 " 19" " /i2c@d4034000" begin-package \ TWSI6 + " accelerometer" name + " lis3lv02d" +compatible + my-address my-space 1 reg +end-package
1
0
0
0
[commit] r3233 - dev/olpc/mmp2camera
by repository service
28 Aug '12
28 Aug '12
Author: wmb Date: Tue Aug 28 18:25:56 2012 New Revision: 3233 URL:
http://tracker.coreboot.org/trac/openfirmware/changeset/3233
Log: OLPC ARM - MMP camera driver - Some tweaking of device tree properties for the benefit of the Linux driver. Modified: dev/olpc/mmp2camera/loadpkg.fth Modified: dev/olpc/mmp2camera/loadpkg.fth ============================================================================== --- dev/olpc/mmp2camera/loadpkg.fth Tue Aug 28 18:25:18 2012 (r3232) +++ dev/olpc/mmp2camera/loadpkg.fth Tue Aug 28 18:25:56 2012 (r3233) @@ -1,9 +1,15 @@ " " " d420a000" " /" begin-package " camera" device-name + " marvell,mmpcam" +compatible my-address my-space h# 800 reg " /pmua" encode-phandle 2 encode-int encode+ " clocks" property d# 42 " interrupts" integer-property + 0 0 encode-bytes + cam-pwr-gpio# 0 encode-gpio + cam-rst-gpio# 0 encode-gpio + " gpios" property + 0 [if] : alloc-capture-buffer ( len -- vadr padr ) \ XXX need map-in if we should use virtual mode
1
0
0
0
[commit] r3232 - cpu/arm/olpc
by repository service
28 Aug '12
28 Aug '12
Author: wmb Date: Tue Aug 28 18:25:18 2012 New Revision: 3232 URL:
http://tracker.coreboot.org/trac/openfirmware/changeset/3232
Log: OLPC ARM - MMP audio driver - Some tweaking of device tree properties for the benefit of the Linux driver. Modified: cpu/arm/olpc/sound.fth Modified: cpu/arm/olpc/sound.fth ============================================================================== --- cpu/arm/olpc/sound.fth Tue Aug 28 10:03:02 2012 (r3231) +++ cpu/arm/olpc/sound.fth Tue Aug 28 18:25:18 2012 (r3232) @@ -10,18 +10,36 @@ [ifdef] mmp3 h# c0ffd000 [else] h# d42a0000 [then] + ; +\ "mav" stands for M(DMA), A(DMA), V(DMA), distinct from +\ the 16 "peripheral" PDMA channels. +\ The number space for mmp-mav-dma-channels is as follows: +\ 0: MDMA0 +\ 1: MDMA1 +\ 2: ADMA1_CH0 (out) +\ 3: ADMA1_CH1 (in) +\ 4: ADMA2_CH0 (out) +\ 5: ADMA2_CH1 (in) +\ 6: VDMA1_CH0 +\ 7: VDMA1_CH1 +\ That's consistent with the enumeration mmp_tdma_type in +\ Linux:arch/arm/mach-mmp/include/mach/mmp_dma.h +\ and also reflects the bit numbering (+16) in the various +\ DMA IRQ status and mask registers, e.g. ICU_DMA_IRQ1_STATUS + dev / new-device " adma" device-name h# 800 +audio h# 100 reg - d# 47 " interrupts" integer-property + 3 encode-int 2 encode-int encode+ " mmp-mav-dma-channels" property + " marvell,mmp-audio-dma" +compatible current-device ( adma0-ph ) finish-device new-device " adma" device-name h# 900 +audio h# 100 reg - d# 48 " interrupts" integer-property + 5 encode-int 4 encode-int encode+ " mmp-mav-dma-channels" property + " marvell,mmp-audio-dma" +compatible current-device ( adma0-ph adma1-ph ) finish-device @@ -31,7 +49,7 @@ \ We call this the platform driver, a single point that collects \ the Audio DMA resources - " mrvl,mmp-pcm-audio" +compatible \ snd_soc_dai_link.cpu_dai_of_node + " marvell,mmp-pcm-audio" +compatible \ snd_soc_dai_link.cpu_dai_of_node ( adma0-ph adma1-ph ) encode-int rot encode-int encode+ " adma-nodes" property @@ -41,7 +59,7 @@ " sspa" name h# d00 +audio h# 100 reg - " mrvl,mmp-sspa-dai" +compatible + " marvell,mmp-sspa-dai" +compatible " /pmua" encode-phandle d# 20 encode-int encode+ " clocks" property d# 3 " interrupts" integer-property @@ -52,7 +70,7 @@ " audio" name h# c00 +audio h# 100 reg -" mrvl,mmp-sspa-dai" +compatible +" marvell,mmp-sspa-dai" +compatible " /pmua" encode-phandle d# 20 encode-int encode+ " clocks" property d# 2 " interrupts" integer-property
1
0
0
0
[commit] r3231 - cpu/x86/pc/olpc/via
by repository service
28 Aug '12
28 Aug '12
Author: quozl Date: Tue Aug 28 10:03:02 2012 New Revision: 3231 URL:
http://tracker.coreboot.org/trac/openfirmware/changeset/3231
Log: Q3C09 Modified: cpu/x86/pc/olpc/via/fw-version.fth Modified: cpu/x86/pc/olpc/via/fw-version.fth ============================================================================== --- cpu/x86/pc/olpc/via/fw-version.fth Tue Aug 28 05:21:44 2012 (r3230) +++ cpu/x86/pc/olpc/via/fw-version.fth Tue Aug 28 10:03:02 2012 (r3231) @@ -1,6 +1,6 @@ \ The overall firmware revision macro: FW_MAJOR C -macro: FW_MINOR 08 +macro: FW_MINOR 09 \ Create a 2-character build/fw-suffix file to personalize your test builds " fw-suffix" $file-exists? [if]
1
0
0
0
[commit] r3230 - cpu/arm/olpc
by repository service
28 Aug '12
28 Aug '12
Author: quozl Date: Tue Aug 28 05:21:44 2012 New Revision: 3230 URL:
http://tracker.coreboot.org/trac/openfirmware/changeset/3230
Log: OLPC XO-1.75 XO-4 - ignore unimplemented write protect for internal eMMC Modified: cpu/arm/olpc/sdhci.fth Modified: cpu/arm/olpc/sdhci.fth ============================================================================== --- cpu/arm/olpc/sdhci.fth Tue Aug 28 03:28:52 2012 (r3229) +++ cpu/arm/olpc/sdhci.fth Tue Aug 28 05:21:44 2012 (r3230) @@ -87,6 +87,7 @@ [then] fload ${BP}/dev/mmc/sdhci/slot.fth + : write-protected? false ; new-device fload ${BP}/dev/mmc/sdhci/sdmmc.fth fload ${BP}/dev/mmc/sdhci/selftest.fth
1
0
0
0
[commit] r3229 - dev/olpc
by repository service
28 Aug '12
28 Aug '12
Author: wmb Date: Tue Aug 28 03:28:52 2012 New Revision: 3229 URL:
http://tracker.coreboot.org/trac/openfirmware/changeset/3229
Log: SETi camera driver - invert the PCLK polarity so the data is sampled on the correct edge Modified: dev/olpc/seti.fth Modified: dev/olpc/seti.fth ============================================================================== --- dev/olpc/seti.fth Tue Aug 28 03:25:39 2012 (r3228) +++ dev/olpc/seti.fth Tue Aug 28 03:28:52 2012 (r3229) @@ -107,7 +107,7 @@ \ IDP 03 00 ov! ff 10 ov! - 0d 11 ov! + 1d 11 ov! cb 12 ov! 04 14 ov! \ don't change
1
0
0
0
[commit] r3228 - cpu/arm/olpc
by repository service
28 Aug '12
28 Aug '12
Author: wmb Date: Tue Aug 28 03:25:39 2012 New Revision: 3228 URL:
http://tracker.coreboot.org/trac/openfirmware/changeset/3228
Log: OLPC XO-4 - temporarily remove suspend/resume from selftest pending the implementation of that feature. Modified: cpu/arm/olpc/test-tweaks.fth Modified: cpu/arm/olpc/test-tweaks.fth ============================================================================== --- cpu/arm/olpc/test-tweaks.fth Tue Aug 28 03:07:53 2012 (r3227) +++ cpu/arm/olpc/test-tweaks.fth Tue Aug 28 03:25:39 2012 (r3228) @@ -17,6 +17,7 @@ device-end \ Add suspend resume test except in final +[ifndef] mmp3 \ Pending MMP3 suspend/resume implementation dev /switches warning @ warning off : selftest ( -- error? ) @@ -27,3 +28,4 @@ ; warning ! device-end +[then]
1
0
0
0
← Newer
1
2
3
4
5
6
7
...
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