Changeset 3303


Ignore:
Timestamp:
Sep 14, 2012, 8:18:41 AM (3 years ago)
Author:
wmb
Message:

OLPC ARM audio driver - device tree tweaks for instantiating the Linux audio driver from the device tree.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpu/arm/olpc/sound.fth

    r3262 r3303  
    3434
    3535dev /
     361 [if]
     37new-device
     38   " adma" device-name
     39   h# 900 +audio  h# 100 reg
     40   5 encode-int 4 encode-int encode+ " mmp-mav-dma-channels" property
     41   " marvell,mmp-audio-dma" +compatible
     42   " disabled" " status" string-property
     43   current-device  ( adma1-ph )
     44finish-device
     45
     46new-device
     47   ( adma1-ph )  encode-int  " adma-node" property
     48   " pcm" device-name
     49   1 0 reg
     50
     51   \ This binds to the platform driver, a single point that collects
     52   \ the Audio DMA resources
     53   " marvell,mmp-pcm-audio" +compatible   \ snd_soc_dai_link.cpu_dai_of_node
     54   " disabled" " status" string-property
     55
     56finish-device
     57[then]
     58
    3659new-device
    3760   " adma" device-name
     
    4366
    4467new-device
    45    " adma" device-name
    46    h# 900 +audio  h# 100 reg
    47    5 encode-int 4 encode-int encode+ " mmp-mav-dma-channels" property
    48    " marvell,mmp-audio-dma" +compatible
    49    current-device  ( adma0-ph adma1-ph )
     68   ( adma0-ph )  encode-int  " adma-node" property
     69   " pcm" device-name
     70   0 0 reg
     71
     72   \ This binds to the platform driver, a single point that collects
     73   \ the Audio DMA resources
     74   " marvell,mmp-pcm-audio" +compatible   \ snd_soc_dai_link.cpu_dai_of_node
     75
    5076finish-device
    5177
     
    5480   audio-sram-pa /audio-sram reg
    5581
    56    \ We call this the platform driver, a single point that collects
    57    \ the Audio DMA resources
    58    " marvell,mmp-pcm-audio" +compatible   \ snd_soc_dai_link.cpu_dai_of_node
    59 
    60    ( adma0-ph adma1-ph )
    61    encode-int rot encode-int encode+  " adma-nodes" property
     82   " marvell,mmp-asram" +compatible
    6283finish-device
    6384
     
    6788
    6889   " marvell,mmp-sspa-dai" +compatible
     90[ifdef] mmp2 " marvell,mmp3-sspa-dai" +compatible  [then]
     91[ifdef] mmp3 " marvell,mmp3-sspa-dai" +compatible  [then]
     92
     93   " unused" " status" string-property
    6994
    7095   " /pmua" encode-phandle d# 20 encode-int encode+ " clocks" property
     
    78103
    79104" marvell,mmp-sspa-dai" +compatible
     105[ifdef] mmp2 " marvell,mmp3-sspa-dai" +compatible  [then]
     106[ifdef] mmp3 " marvell,mmp3-sspa-dai" +compatible  [then]
    80107
    81108" /pmua" encode-phandle d# 20 encode-int encode+ " clocks" property
     
    95122: start-audio-pll  ( -- error? )
    96123   \ For VCXO=26 MHz, OCLK=12.2880 MHz
    97    h# 200d.a189 h# 38 sspa!  \ DIV_OCLK_MODULO=010 FRACT=00da1 ENA_DITHER=1 ICP=0 DIV_FBCCLK=01 DIV_MCLK=0 PU=1
     124   \ MMP2: DIV_OCLK_MODULO=010 FRACT=00da1 ENA_DITHER=1 ICP=0 DIV_FBCCLK=01 DIV_MCLK=0 PU=1
     125   \ MMP2: DIV_OCLK_MODULO=010 FRACT=00da1 ENA_DITHER=1 ICP=0 DIV_FBCCLK=01 DIV_MCLK=011 PU=1
     126   [ifdef] mmp3 h# a00d.a18d [else] h# 200d.a189  [then]   h# 38 sspa!
    98127   h# 0000.0801 h# 3c sspa!  \ CLK_SEL=1 (AudioPLL) DIV_OCLK_PATTERN=01
    99128   d# 50 0  do
     
    109138: dly  d# 10 us  ;
    110139
    111 false value use-audio-pll?
     140true value use-audio-pll?
    112141: audio-clock-on  ( -- error? )
    113142   my-clock-on
     
    136165      h# 20.0000  h# 1024 +mpmu  io-set  \ Enable 12S clock out to SSPA1
    137166
    138       h# 10800 h# 38 sspa!
     167      \ h# 10800 h# 38 sspa!  \ Appears unnecessary; not sure what it does
    139168
    140169      \ Bits 14:9 set the divisor from SYSCLK to BITCLK.  The setting below
     
    7107390 0 " "  " /"  begin-package
    711740   " audio-complex" device-name
    712    " olpc,mmp-audio" +compatible
     741[ifdef] olpc-cl4
     742   " olpc,xo4-audio" +compatible
     743[then]
     744[ifdef] olpc-cl3
     745   " olpc,xo3-audio" +compatible
     746[then]
     747[ifdef] olpc-cl2
     748   " olpc,xo1.75-audio" +compatible
     749[then]
    713750
    714751   \ The name that was hardcoded in the Linux driver was OLPC XO-1.75
     
    723760   " audio-routing" property
    724761
     762   " rt5631"        " dai-link-name"  string-property
     763   " rt5631"       " stream-name"     string-property
     764   " rt5631-hifi"  " codec-dai-name"  string-property
     765
    725766   " /audio-codec"  encode-phandle  " codec-node"    property
    726767   " /audio"        encode-phandle  " cpu-dai-node"  property
    727    " /asram"        encode-phandle  " platform-node" property
     768   " /pcm"          encode-phandle  " platform-node" property
    728769
    729770   \ SND_SOC_DAIFTM_xxx:
Note: See TracChangeset for help on using the changeset viewer.