ShiboSoftwareDev/am69-pi5

A 85×56 mm 10-layer AM69A single-board computer carrier integrates 8 GiB LPDDR4, 32 GB eMMC, Pi-style expansion and multimedia/USB/Ethernet connectors, multi-rail PMIC power, STM32 boot/power control, USB-C PD, SD/fan protection, and HDI-controlled high-speed routing.

Version
0.0.8-engineering-draft-20261107-dqs19
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-pi5  # download the package files into ./am69-pi5
tsci add ShiboSoftwareDev/am69-pi5    # add it to your project as @tsci/ShiboSoftwareDev.am69-pi5

In 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/power/UsbPhyResetSupervisor.tsx

import {TPS386000RGP} from './TPS386000RGP'
import {DRL5Footprint} from '../interface/NativeInterfaceSupport'
import type {ReferencePowerPlacement} from '../power-stages/ReferencePowerStages'

export const usbPhyResetDefaultPlacements:Record<string,ReferencePowerPlacement>={
 U1701:{pcbX:0,pcbY:0,layer:'top'},U1702:{pcbX:4.5,pcbY:4.8,layer:'top'},U1703:{pcbX:4.5,pcbY:-.8,layer:'top'},
 C1710:{pcbX:4,pcbY:2,layer:'top'},C1711:{pcbX:4.5,pcbY:7,layer:'top'},C1712:{pcbX:6.9,pcbY:-.8,layer:'top'},
 ...Object.fromEntries(Array.from({length:8},(_,i)=>[`R${1710+i}`,{pcbX:-3.6+Math.floor(i/2)*2.4,pcbY:i%2?-5.2:-3.8,pcbRotation:i%2?180:0,layer:'top'}])),
 ...Object.fromEntries(Array.from({length:4},(_,i)=>[`C${1713+i}`,{pcbX:-3.6+i*2.4,pcbY:-7.2,layer:'top'}])),
 R1720:{pcbX:-3.9,pcbY:-1.2,layer:'top'},R1721:{pcbX:-3.9,pcbY:1.2,layer:'top'},
 R1722:{pcbX:-6.3,pcbY:-1.2,layer:'top'},R1723:{pcbX:-6.3,pcbY:1.2,layer:'top'},
 R1724:{pcbX:0,pcbY:3.9,layer:'top'},R1725:{pcbX:7,pcbY:4.8,layer:'top'},R1726:{pcbX:7,pcbY:-3,layer:'top'},
}
export const usbPhyResetParts=Object.keys(usbPhyResetDefaultPlacements).map(reference=>({reference,kind:reference[0]==='U'?'reset_control':reference[0]==='C'?'capacitor':'resistor'}))

/** Four independently monitored supplies, wired open-drain reset outputs and
 * a225–375ms release delay. Always-on supply and main-enable MR assert reset
 * before orderly rail shutdown. Reference clocks must start within that delay.
 */
export function UsbPhyResetSupervisor({placements=usbPhyResetDefaultPlacements,references}:{placements?:Partial<Record<string,ReferencePowerPlacement>>;references?:readonly string[]}){
 const wanted=(name:string)=>!references||references.includes(name)
 const p=(name:string)=>{
  const i=Object.keys(usbPhyResetDefaultPlacements).indexOf(name)
  return {schX:-14+(i%5)*7,schY:24-Math.floor(i/5)*12,schSectionName:'USB_PHY_RESET_SECTION',...placements[name]}
 }
 const aov='net.V3V3_AON_INTERFACE',v33='net.V_3V3',gnd='net.GND',reset='net.USB_PHY_RESET_N'
 const monitored=[
  {rail:v33,node:'net.USB_SENSE_3V3',upper:'68.1k',mpn:'RT0402BRD0768K1L'},
  {rail:'net.V_USB_PHY_1V1',node:'net.USB_SENSE_1V1',upper:'16.5k',mpn:'RT0402BRD0716K5L'},
  {rail:'net.VDD_IO_1V8',node:'net.USB_SENSE_1V8',upper:'31.6k',mpn:'RT0402BRD0731K6L'},
  {rail:'net.V5_PROTECTED',node:'net.USB_SENSE_5V',upper:'100k',mpn:'RT0402BRD07100KL'},
 ]
 const resistors=[
  ...monitored.flatMap((m,i)=>[[`R${1710+i*2}`,m.upper,m.mpn,m.rail,m.node],[`R${1711+i*2}`,'10k','RT0402BRD0710KL',m.node,gnd]]),
  ...Array.from({length:4},(_,i)=>[`R${1720+i}`,'100k','RC0402FR-07100KL',aov,`net.USB_SUP_CT${i+1}`]),
  ['R1724','10k','RC0402FR-0710KL',v33,reset],
  ['R1725','100k','RC0402FR-07100KL','net.CPU_USB_A_PERST_N',gnd],
  ['R1726','100k','RC0402FR-07100KL','net.CPU_USB_B_PERST_N',gnd],
 ]
 return <>
  <schematicsection name="USB_PHY_RESET_SECTION" displayName="USB rails and reset timing" />
  {wanted('U1701')&&<TPS386000RGP name="U1701" {...p('U1701')} noConnect={['VREF','WDO_N']}
   connections={{MR_N:'net.MAIN_3V3_ENABLE',CT1:'net.USB_SUP_CT1',CT2:'net.USB_SUP_CT2',CT3:'net.USB_SUP_CT3',CT4:'net.USB_SUP_CT4',SENSE1:monitored[0].node,SENSE2:monitored[1].node,SENSE3:monitored[2].node,SENSE4L:monitored[3].node,SENSE4H:gnd,NC_GND:gnd,GND:gnd,EP:gnd,VDD:aov,WDI:gnd,RESET1_N:reset,RESET2_N:reset,RESET3_N:reset,RESET4_N:reset}} />}
  {[['U1702','net.CPU_USB_A_PERST_N','net.USB_A_PERST_N'],['U1703','net.CPU_USB_B_PERST_N','net.USB_B_PERST_N']].filter(([name])=>wanted(name)).map(([name,cpu,out])=><chip key={name} name={name} manufacturerPartNumber="SN74LVC1G08DRLR" footprint={<DRL5Footprint />}
   pinLabels={{pin1:'A',pin2:'B',pin3:'GND',pin4:'Y',pin5:'VCC'}} pinAttributes={{pin1:{isInput:true},pin2:{isInput:true},pin3:{requiresGround:true},pin4:{isOutput:true},pin5:{requiresPower:true}}}
   {...p(name)} connections={{A:reset,B:cpu,GND:gnd,Y:out,VCC:v33}} />)}
  {resistors.filter(([name])=>wanted(name)).map(([name,value,mpn,a,b])=><resistor key={name} name={name} resistance={value} tolerance={Number(name.slice(1))<1720?'0.1%':'1%'} manufacturerPartNumber={mpn} footprint="0402" {...p(name)} connections={{pin1:a,pin2:b}} />)}
  {[['C1710',aov],['C1711',v33],['C1712',v33]].filter(([name])=>wanted(name)).map(([name,rail])=><capacitor key={name} name={name} capacitance="100nF" maxVoltageRating="16V" manufacturerPartNumber="GRM155R71C104KA88D" footprint="0402" {...p(name)} connections={{pin1:rail,pin2:gnd}} />)}
  {monitored.map((m,i)=>{const name=`C${1713+i}`;return wanted(name)&&<capacitor key={name} name={name} capacitance="100pF" maxVoltageRating="50V" manufacturerPartNumber="GRM1555C1H101JA01D" footprint="0402" {...p(name)} connections={{pin1:m.node,pin2:gnd}} />})}
 </>
}