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

import type { ReferencePowerPlacement } from "../power-stages/ReferencePowerStages"
import { SOT236Footprint } from "./footprints/PackageFootprints"
import {controlResistor0402,controlCapacitor0402} from "./ControlPassiveParts"

export const powerControlParts = [
  { reference: "U900", kind: "TLV75533" },
  { reference: "U901", kind: "SN74LVC2G17" },
  { reference: "U1090", kind: "SN74LVC1G32" },
  { reference: "U1091", kind: "SN74LVC1G08" },
  { reference: "U1092", kind: "TLV75533" },
  { reference: "U1093", kind: "TPS22918" },
  { reference: "U1094", kind: "TPS22918" },
  { reference: "U1095", kind: "SN74LVC1G08" },
  ...[900, 901, 902, 1089, 1090, 1091, 1092, 1093, 1094, 1095, 1096, 1097, 1098, 1099].map(i => ({ reference: `C${i}`, kind: "capacitor" })),
  ...[900, 901, 1090, 1091, 1092, 1093].map(i => ({ reference: `R${i}`, kind: "resistor" })),
]

/**
 * AON control and TI-style keep-alive: MAIN_EN = RUN_REQUEST OR EN_3V3_VIO.
 * U105 separately qualifies RUN_REQUEST with main-rail PG before PMIC ENABLE.
 * The PMIC's factory sequence can therefore finish before the main buck turns
 * off. EC_RUN_REQUEST is pulled down: the controller must initialize straps
 * before allowing CPU power. Carrier enable and button inputs are 5.5 V tolerant.
 */
export function PowerControl({ placements = {}, references, board }: {
  placements?: Partial<Record<string, ReferencePowerPlacement>>
  references?: readonly string[]
  board: "cm5" | "pi5"
}) {
  const wanted = (ref: string) => !references || references.includes(ref)
  const p = (ref: string) => placements[ref] ?? {}
  const ldo = (name: string, input: string, enable: string, output: string) => wanted(name) && <chip
    name={name} manufacturerPartNumber="TLV75533PDBVR" footprint="sot23_5"
    pinLabels={{ pin1: "IN", pin2: "GND", pin3: "EN", pin4: "NC", pin5: "OUT" }}
    pinAttributes={{ pin1: { requiresPower: true }, pin2: { requiresGround: true }, pin3: { isInput: true }, pin4: { doNotConnect: true }, pin5: { isOutput: true } }}
    noConnect={["NC"]} schPinArrangement={{ leftSide: ["IN", "EN"], rightSide: ["OUT"], bottomSide: ["GND"] }}
    {...p(name)} connections={{ IN: input, GND: "net.GND", EN: enable, OUT: output }} />
  const gate = (name: string, part: string, a: string, b: string, output: string) => wanted(name) && <chip
    name={name} manufacturerPartNumber={part} footprint="sot23_5"
    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 } }}
    schPinArrangement={{ leftSide: ["A", "B"], rightSide: ["Y"], topSide: ["VCC"], bottomSide: ["GND"] }}
    {...p(name)} connections={{ A: a, B: b, Y: output, GND: "net.GND", VCC: "net.V3V3_AON_INTERFACE" }} />
  const loadSwitch = (name: string, input: string, output: string, ct: string) => wanted(name) && <chip
    name={name} manufacturerPartNumber="TPS22918DBVR" footprint={<SOT236Footprint />}
    pinLabels={{ pin1: "VIN", pin2: "GND", pin3: "ON", pin4: "CT", pin5: "QOD", pin6: "VOUT" }}
    pinAttributes={{ pin1: { requiresPower: true }, pin2: { requiresGround: true }, pin3: { isInput: true }, pin4: { isPassive: true }, pin5: { isPassive: true }, pin6: { isOutput: true } }}
    schPinArrangement={{ leftSide: ["VIN", "ON"], rightSide: ["VOUT"], bottomSide: ["CT", "QOD", "GND"] }}
    {...p(name)} connections={{ VIN: input, VOUT: output, GND: "net.GND", ON: "net.EN_3V3_VIO", CT: ct, QOD: output }} />
  const capacitors = [
    ["C900", "1uF", "net.V5_PROTECTED"], ["C901", "1uF", "net.V3V3_AON_INTERFACE"],
    ["C902", "100nF", "net.V3V3_AON_INTERFACE"], ["C1090", "100nF", "net.V3V3_AON_INTERFACE"],
    ["C1091", "100nF", "net.V3V3_AON_INTERFACE"], ["C1092", "1uF", "net.V5_PROTECTED"],
    ["C1089", "100nF", "net.V3V3_AON_INTERFACE"],
    ["C1093", "1uF", "net.VDDA_USB_3V3"], ["C1094", "1uF", "net.V_3V3"],
    ["C1095", "1uF", "net.V3V3_INTERFACE"], ["C1096", "1uF", "net.VDD_IO_1V8"],
    ["C1097", "1uF", "net.V1V8_EXTERNAL"], ["C1098", "1nF", "net.INTERFACE_3V3_CT"],
    ["C1099", "1nF", "net.INTERFACE_1V8_CT"],
  ]
  const resistors = [
    ["R900", "100k", "net.V5_PROTECTED", board === "cm5" ? "net.CM5_PMIC_ENABLE" : "net.CARRIER_ENABLE_INPUT"],
    ["R901", "10k", "net.V5_PROTECTED", board === "cm5" ? "net.CM5_PWR_BUTTON_N" : "net.POWER_BUTTON_INPUT_N"],
    ["R1090", "100k", "net.EC_RUN_REQUEST", "net.GND"],
    ["R1091", "100k", "net.EN_3V3_VIO", "net.GND"],
    ["R1092", "100k", "net.SYSTEM_RUN_REQUEST", "net.GND"],
    ["R1093", "100k", "net.MAIN_3V3_ENABLE", "net.GND"],
  ]
  return <>
    {ldo("U900", "net.V5_PROTECTED", "net.V5_PROTECTED", "net.V3V3_AON_INTERFACE")}
    {ldo("U1092", "net.V5_PROTECTED", "net.EN_3V3_VIO", "net.VDDA_USB_3V3")}
    {wanted("U901") && <chip name="U901" manufacturerPartNumber="SN74LVC2G17DCKR" footprint="sot363"
      pinLabels={{ pin1: "A1", pin2: "GND", pin3: "A2", pin4: "Y2", pin5: "VCC", pin6: "Y1" }}
      pinAttributes={{ pin1: { isInput: true }, pin2: { requiresGround: true }, pin3: { isInput: true }, pin4: { isOutput: true }, pin5: { requiresPower: true }, pin6: { isOutput: true } }}
      {...p("U901")} connections={{
        A1: board === "cm5" ? "net.CM5_PMIC_ENABLE" : "net.CARRIER_ENABLE_INPUT",
        A2: board === "cm5" ? "net.CM5_PWR_BUTTON_N" : "net.POWER_BUTTON_INPUT_N",
        Y1: "net.CARRIER_RUN_REQUEST", Y2: "net.PWR_BUTTON_N_3V3", GND: "net.GND", VCC: "net.V3V3_AON_INTERFACE",
      }} />}
    {gate("U1091", "SN74LVC1G08DBVR", "net.CARRIER_RUN_REQUEST", "net.EC_RUN_REQUEST", "net.SYSTEM_RUN_REQUEST")}
    {gate("U1090", "SN74LVC1G32DBVR", "net.SYSTEM_RUN_REQUEST", "net.EN_3V3_VIO", board==="pi5"?"net.MAIN_3V3_REQUEST":"net.MAIN_3V3_ENABLE")}
    {gate("U1095", "SN74LVC1G08DBVR", "net.SYSTEM_RUN_REQUEST", "net.INPUT_POWER_GOOD", "net.POWER_QUALIFIED_RUN")}
    {loadSwitch("U1093", "net.V_3V3", "net.V3V3_INTERFACE", "net.INTERFACE_3V3_CT")}
    {loadSwitch("U1094", "net.VDD_IO_1V8", "net.V1V8_EXTERNAL", "net.INTERFACE_1V8_CT")}
    {capacitors.filter(([ref]) => wanted(ref)).map(([ref, capacitance, rail]) => <capacitor key={ref}
      name={ref} capacitance={capacitance} {...controlCapacitor0402(capacitance)} footprint="0402" schRotation={-90}
      {...p(ref)} connections={{ pin1: rail, pin2: "net.GND" }} />)}
    {resistors.filter(([ref]) => wanted(ref)).map(([ref, resistance, a, b]) => <resistor key={ref}
      name={ref} resistance={resistance} manufacturerPartNumber={controlResistor0402[resistance]} footprint="0402" {...p(ref)} connections={{ pin1: a, pin2: b }} />)}
  </>
}