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/IntegratedPowerSystem.tsx

import { IntegratedPowerStages, integratedPowerStageParts } from "./IntegratedPowerStages"
import { ProtectedFiveVoltInput, protectedInputParts } from "./ProtectedFiveVoltInput"
import { PowerControl, powerControlParts } from "./PowerControl"
import { TPS62182PowerStage } from "./TPS62182PowerStage"
import { ReferenceBootControl } from "../core/ReferenceBootControl"
import boot from "../core/ReferenceBootControl.data.json"
import { BootController, bootControllerParts } from "../control/BootController"
import { BootSignalIsolation, bootIsolationParts } from "../control/BootSignalIsolation"
import { PiBootHeaderIsolation, piHeaderIsolationParts } from "../control/PiBootHeaderIsolation"
import type { ReferencePowerPlacement } from "../power-stages/ReferencePowerStages"
import { systemPowerNetOverrides } from "./SystemPowerNets"
import { UsbPowerDelivery,usbPowerDeliveryParts } from "../usb-pd/UsbPowerDelivery"

export const mainSupplyParts = ["U950", "C950", "C951", "L950", "L951", "C952", "C953", "C954", "R950", "R951"]
// R213/R513/R515 are already fitted on the PMIC source sheet. Instantiate once.
const stageReferences = new Set(integratedPowerStageParts.map(p=>p.reference))
const bootResetParts = boot.parts.filter(p=>!stageReferences.has(p.reference))
const bootResetReferences = new Set(bootResetParts.map(p=>p.reference))
export const integratedPowerSystemParts = [
  ...integratedPowerStageParts.map(p => ({ reference:p.reference, kind:p.kind, section:p.sourceSheet })),
  ...mainSupplyParts.map(reference=>({reference,kind:"main_supply",section:"Main 3.3 V conversion"})),
  ...protectedInputParts.map(p=>({...p,section:"Input protection"})),
  ...powerControlParts.map(p=>({...p,section:"Power sequencing and interface rails"})),
  ...bootResetParts.map(p=>({reference:p.reference,kind:"reset_control",section:"PMIC enable and CPU reset"})),
  ...bootControllerParts.map(p=>({...p,section:"Boot controller and ROM straps"})),
  ...bootIsolationParts.map(p=>({...p,section:"Boot isolation, UART, recovery and fan"})),
  ...piHeaderIsolationParts.map(p=>({...p,section:"Pi boot pin header isolation"})),
  ...usbPowerDeliveryParts.map(p=>({...p,section:"USB-C power delivery"})),
]
if (new Set(integratedPowerSystemParts.map(p=>p.reference)).size !== integratedPowerSystemParts.length) {
  const duplicate = integratedPowerSystemParts.filter((p,i,a)=>a.findIndex(other=>other.reference===p.reference)!==i).map(p=>p.reference)
  throw new Error(`Power-system component references overlap: ${duplicate.join(", ")}`)
}

export type PowerSystemSheet = {name:string; title:string; references:string[]}

/** Connected hardware network; matching EC firmware and all layout checks are required. */
export function IntegratedPowerSystem({ placements, sheets, board, cpuConnections = {}, netOverrides = systemPowerNetOverrides }: {
  placements: Partial<Record<string,ReferencePowerPlacement>>
  sheets: PowerSystemSheet[]
  board: "cm5" | "pi5"
  cpuConnections?: Record<string,string>
  netOverrides?: Record<string,string>
}) {
  return <>
    {sheets.map(sheet=><schematicsheet sheetWidth={800} sheetHeight={600} key={sheet.name} name={sheet.name} displayName={sheet.title}>
      <IntegratedPowerStages placements={placements} references={sheet.references} netOverrides={netOverrides} />
      <ProtectedFiveVoltInput placements={placements} references={sheet.references} board={board} />
      <PowerControl placements={placements} references={sheet.references} board={board} />
      {sheet.references.includes("U950") && <TPS62182PowerStage placements={placements} schematicSections={false}
        inputNet="net.V5_PROTECTED" outputNet="net.V_3V3" enableNet="net.MAIN_3V3_ENABLE"
        powerGoodNet="net.MAIN_3V3_PG" includeInputBulk={false} />}
      {sheet.references.some(ref=>bootResetReferences.has(ref)) && <ReferenceBootControl placements={placements} references={sheet.references.filter(ref=>bootResetReferences.has(ref))} schematicSections={false}
        netOverrides={{...netOverrides,
          NetR539_1:"net.POWER_QUALIFIED_RUN", LM5143_PG:"net.MAIN_3V3_PG", LM5143_PG_R:"net.MAIN_3V3_PG_QUALIFIED",
        }} />}
      <BootController placements={placements} references={sheet.references} cpuConnections={cpuConnections} board={board} />
      <BootSignalIsolation placements={placements} references={sheet.references} board={board} />
      {board==="pi5"&&<PiBootHeaderIsolation placements={placements} references={sheet.references} cpuConnections={cpuConnections} />}
      {board==="pi5"&&sheet.references.some(ref=>usbPowerDeliveryParts.some(p=>p.reference===ref))&&<UsbPowerDelivery placements={placements} references={sheet.references} />}
    </schematicsheet>)}
  </>
}

export function getPowerSystemSheets(board:"cm5"|"pi5"="pi5"): PowerSystemSheet[] {
  const groups = new Map<string,string[]>()
  for (const part of integratedPowerSystemParts) {
    if(board==="cm5"&&piHeaderIsolationParts.some(p=>p.reference===part.reference))continue
    if(board==="cm5"&&usbPowerDeliveryParts.some(p=>p.reference===part.reference))continue
    const list = groups.get(part.section) ?? []
    list.push(part.reference)
    groups.set(part.section,list)
  }
  return [...groups].map(([title,references],i)=>({name:`SYSTEM_POWER_${i+1}`,title,references}))
}