ShiboSoftwareDev/am69-cm5
A 55×40 mm 10-layer CM5 carrier board integrating an AM69A98 SoC, 8‑GiB LPDDR4, 32‑GB eMMC, CM5 connectors, clocking, extensive decoupling/EMI filtering, and HDI DDR/ground escape routing.
- Version
- 0.0.7-engineering-draft-20261107-manual-ddr0
- License
- unset
- Stars
- 0
Use with the tscircuit CLI
tsci is the tscircuit CLI. Install it with npm install -g tscircuit.
tsci clone ShiboSoftwareDev/am69-cm5 # download the package files into ./am69-cm5
tsci add ShiboSoftwareDev/am69-cm5 # add it to your project as @tsci/ShiboSoftwareDev.am69-cm5In a cloned or new (tsci init) project: tsci dev starts a local preview, tsci build outputs Circuit JSON, and tsci push publishes to tscircuit.com.
components/shared/usb-pd/UsbPowerDelivery.tsx
import type {ReferencePowerPlacement} from "../power-stages/ReferencePowerStages"
import {controlCapacitor0402} from "../power/ControlPassiveParts"
// DS12499 Rev7 Figure12 (unchanged in Rev8): 4.4mm outside span,
// .6x.25 perimeter at .5mm pitch; nominal exposed land2.7mm square.
export function STUSB4500Footprint() {
return <footprint>
{Array.from({length:24},(_,i)=>{
const side=Math.floor(i/6),t=i%6
const x=side===0?-1.9:side===1?-1.25+t*.5:side===2?1.9:1.25-t*.5
const y=side===0?1.25-t*.5:side===1?-1.9:side===2?-1.25+t*.5:1.9
return <smtpad key={i} portHints={[`pin${i+1}`]} shape="rect" pcbX={x} pcbY={y}
width={side%2?.25:.6} height={side%2?.6:.25} solderMaskMargin={.05} solderPasteMargin={0} />
})}
<smtpad portHints={["pin25"]} shape="rect" pcbX={0} pcbY={0} width={2.7} height={2.7} noSolderPaste solderMaskMargin={0} />
{[-.675,.675].flatMap(x=>[-.675,.675].map(y=><solderpaste key={`${x},${y}`} shape="rect" pcbX={x} pcbY={y} width={1.08} height={1.08} />))}
<courtyardrect width={4.9} height={4.9} />
<silkscreencircle pcbX={-2.25} pcbY={2.25} radius={.1} />
</footprint>
}
export const usbPowerDeliveryParts=[
...[1600,1601,1602,1603,1604].map(i=>({reference:`U${i}`,kind:"pd_control"})),
...Array.from({length:10},(_,i)=>({reference:`R${1600+i}`,kind:"resistor"})),
...Array.from({length:9},(_,i)=>({reference:`C${1600+i}`,kind:"capacitor"})),
...[1600,1601].map(i=>({reference:`D${i}`,kind:"esd_protection"})),
...[1600,1601].map(i=>({reference:`TP${i}`,kind:"programming_testpoint"})),
]
/** 5V-only sink. A valid 5A contract is required before main/fan enable.
* NVM must be programmed and verified before normal USB power is applied.
* eFuse UV/OV protection remains independent of controller configuration.
*/
export function UsbPowerDelivery({placements={},references}:{
placements?:Partial<Record<string,ReferencePowerPlacement>>;references?:readonly string[]
}) {
const wanted=(name:string)=>!references||references.includes(name)
const p=(name:string)=>({schSectionName:"USB_PD_SECTION",...placements[name]})
const resistors=[
["R1600","4.7k","RC0402FR-074K7L","net.PD_SCL","net.V3V3_AON_INTERFACE"],
["R1601","4.7k","RC0402FR-074K7L","net.PD_SDA","net.V3V3_AON_INTERFACE"],
["R1602","10k","RC0402FR-0710KL","net.PD_ALERT_N","net.V3V3_AON_INTERFACE"],
["R1603","10k","RC0402FR-0710KL","net.PD_VBUS_EN_N","net.V3V3_AON_INTERFACE"],
["R1604","10k","RC0402FR-0710KL","net.PD_RESET","net.GND"],
["R1605","100k","RC0402FR-07100KL","net.PD_POWER_ALLOWED","net.GND"],
["R1606","470","RC0402FR-07470RL","net.V5_IN","net.PD_VDD"],
["R1607","1k","ERJ-2RKF1001X","net.PD_VDD","net.PD_VBUS_SENSE"],
["R1608","1k","ERJ-2RKF1001X","net.V5_PROTECTED","net.PD_DISCH"],
["R1609","100k","RC0402FR-07100KL","net.PD_POWER_QUALIFIED","net.GND"],
]
const gate=(name:string,a:string,b:string,y:string)=>wanted(name)&&<chip name={name}
manufacturerPartNumber="SN74LVC1G08DBVR" footprint="sot23_5"
pinLabels={{pin1:"A",pin2:"B",pin3:"GND",pin4:"Y",pin5:"VCC"}}
schPinArrangement={{leftSide:["A","B"],rightSide:["Y"],topSide:["VCC"],bottomSide:["GND"]}}
{...p(name)} connections={{A:a,B:b,Y:y,VCC:"net.V3V3_AON_INTERFACE",GND:"net.GND"}} />
return <>
<schematicsection name="USB_PD_SECTION" displayName="USB-C contract and power gating" />
{wanted("U1600")&&<chip name="U1600" manufacturerPartNumber="STUSB4500QTR" footprint={<STUSB4500Footprint />}
pinLabels={{pin1:"CC1DB",pin2:"CC1",pin3:"NC",pin4:"CC2",pin5:"CC2DB",pin6:"RESET",pin7:"SCL",pin8:"SDA",pin9:"DISCH",pin10:"GND",pin11:"ATTACH",pin12:"ADDR0",pin13:"ADDR1",pin14:"POWER_OK3",pin15:"GPIO",pin16:"VBUS_EN_SNK",pin17:"A_B_SIDE",pin18:"VBUS_VS_DISCH",pin19:"ALERT",pin20:"POWER_OK2",pin21:"VREG_1V2",pin22:"VSYS",pin23:"VREG_2V7",pin24:"VDD",pin25:"EP"}}
pinAttributes={{pin3:{doNotConnect:true},pin10:{requiresGround:true},pin25:{requiresGround:true},pin24:{requiresPower:true},pin21:{providesPower:true},pin23:{providesPower:true}}}
schWidth={8} schHeight={14} noConnect={["NC","ATTACH","POWER_OK3","GPIO","A_B_SIDE","POWER_OK2"]}
{...p("U1600")} connections={{CC1DB:"net.USB_C_CC1",CC1:"net.USB_C_CC1",CC2:"net.USB_C_CC2",CC2DB:"net.USB_C_CC2",RESET:"net.PD_RESET",SCL:"net.PD_SCL",SDA:"net.PD_SDA",DISCH:"net.PD_DISCH",GND:"net.GND",ADDR0:"net.GND",ADDR1:"net.GND",VBUS_EN_SNK:"net.PD_VBUS_EN_N",VBUS_VS_DISCH:"net.PD_VBUS_SENSE",ALERT:"net.PD_ALERT_N",VREG_1V2:"net.PD_VREG_1V2",VSYS:"net.GND",VREG_2V7:"net.PD_VREG_2V7",VDD:"net.PD_VDD",EP:"net.GND"}} />}
{wanted("U1601")&&<chip name="U1601" manufacturerPartNumber="SN74LVC2G04DCKR" footprint="sot363"
pinLabels={{pin1:"A1",pin2:"GND",pin3:"A2",pin4:"Y2",pin5:"VCC",pin6:"Y1"}}
noConnect={["Y2"]} {...p("U1601")} connections={{A1:"net.PD_VBUS_EN_N",A2:"net.GND",GND:"net.GND",VCC:"net.V3V3_AON_INTERFACE",Y1:"net.PD_VBUS_PRESENT"}} />}
{gate("U1602","net.PD_VBUS_PRESENT","net.PD_POWER_ALLOWED","net.PD_POWER_QUALIFIED")}
{gate("U1603","net.MAIN_3V3_REQUEST","net.PD_POWER_QUALIFIED","net.MAIN_3V3_ENABLE")}
{wanted("U1604")&&<chip name="U1604" manufacturerPartNumber="TPS22965DSGR"
pinLabels={{pin1:"VIN1",pin2:"VIN2",pin3:"ON",pin4:"VBIAS",pin5:"GND",pin6:"CT",pin7:"VOUT1",pin8:"VOUT2",pin9:"EP_GND"}}
schPinArrangement={{leftSide:["VIN1","VIN2","ON"],rightSide:["VOUT1","VOUT2"],topSide:["VBIAS"],bottomSide:["CT","GND","EP_GND"]}}
footprint={<footprint>
{Array.from({length:8},(_,i)=>{const pin=i+1;return <smtpad key={pin} portHints={[`pin${pin}`]} shape="rect"
pcbX={pin<=4?-.95:.95} pcbY={pin<=4?.75-i*.5:-.75+(pin-5)*.5}
width={.5} height={.25} rectBorderRadius={.05} solderMaskMargin={.05} solderPasteMargin={0} />})}
<smtpad portHints={["pin9"]} shape="rect" pcbX={0} pcbY={0} width={.9} height={1.6} noSolderPaste solderMaskMargin={.05} />
{[-.4,.4].map(y=><solderpaste key={y} shape="rect" pcbX={0} pcbY={y} width={.72} height={.64} />)}
<courtyardrect width={2.9} height={2.5} />
</footprint>}
{...p("U1604")} connections={{VIN1:"net.V5_PROTECTED",VIN2:"net.V5_PROTECTED",VBIAS:"net.V5_PROTECTED",ON:"net.PD_POWER_QUALIFIED",GND:"net.GND",EP_GND:"net.GND",CT:"net.HEADER_5V_CT",VOUT1:"net.V5_EXTERNAL",VOUT2:"net.V5_EXTERNAL"}} />}
{resistors.filter(([name])=>wanted(name)).map(([name,value,mpn,a,b])=><resistor key={name} name={name} resistance={value} manufacturerPartNumber={mpn} footprint="0402" {...p(name)} connections={{pin1:a,pin2:b}} />)}
{wanted("C1600")&&<capacitor name="C1600" capacitance="1uF" maxVoltageRating="50V" manufacturerPartNumber="GRM188R61H105KAALD" footprint="0603" {...p("C1600")} connections={{pin1:"net.PD_VDD",pin2:"net.GND"}} />}
{[ ["C1601","1uF","net.PD_VREG_2V7"],["C1602","1uF","net.PD_VREG_1V2"],
["C1603","100nF","net.V3V3_AON_INTERFACE"],["C1604","100nF","net.V3V3_AON_INTERFACE"],["C1605","100nF","net.V3V3_AON_INTERFACE"],
["C1606","1uF","net.V5_PROTECTED"],["C1607","1uF","net.V5_EXTERNAL"],
].filter(([name])=>wanted(name)).map(([name,value,net])=><capacitor key={name} name={name} capacitance={value}
{...controlCapacitor0402(value)} footprint="0402" {...p(name)} connections={{pin1:net,pin2:"net.GND"}} />)}
{wanted("C1608")&&<capacitor name="C1608" capacitance="4.7nF" maxVoltageRating="50V" manufacturerPartNumber="GRM155R71H472KA01D" footprint="0402" {...p("C1608")} connections={{pin1:"net.HEADER_5V_CT",pin2:"net.GND"}} />}
{[["TP1600","net.PD_SCL"],["TP1601","net.PD_SDA"]].filter(([name])=>wanted(name)).map(([name,net])=><testpoint key={name} name={name}
footprintVariant="pad" padShape="circle" padDiameter={1} doNotPlace cadModel={null} {...p(name)}
footprint={<footprint><smtpad portHints={["pin1"]} shape="circle" radius={.5} pcbX={0} pcbY={0} noSolderPaste solderMaskMargin={.05} /><courtyardrect width={1.3} height={1.3} /></footprint>}
connections={{pin1:net}} />)}
{wanted("D1600")&&<chip name="D1600" manufacturerPartNumber="ESDA25W" pinLabels={{pin1:"CC1",pin2:"CC2",pin3:"GND"}}
pinAttributes={{pin1:{isPassive:true},pin2:{isPassive:true},pin3:{requiresGround:true}}}
footprint="sot323" {...p("D1600")} connections={{CC1:"net.USB_C_CC1",CC2:"net.USB_C_CC2",GND:"net.GND"}} />}
{/* DS14419 Rev4 Table6: 12V standoff, <=20V at60A (8/20us).
The former ESDA25P35 clamps at41V, above the eFuse28V absolute
maximum and the25V raw input capacitor rating. Same native lands. */}
{wanted("D1601")&&<chip name="D1601" manufacturerPartNumber="ESDA13P70-1U1M" pinLabels={{pin1:"K",pin2:"A"}}
pinAttributes={{pin1:{isPassive:true},pin2:{requiresGround:true}}}
footprint={<footprint>{[-1,1].map((s,i)=><smtpad key={i} portHints={[`pin${i+1}`]} shape="rect" pcbX={s*.625} pcbY={0} width={.55} height={.8} solderMaskMargin={.05} solderPasteMargin={0} />)}<courtyardrect width={2.3} height={1.55} /></footprint>}
{...p("D1601")} connections={{K:"net.V5_IN",A:"net.GND"}} />}
</>
}