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-cm5

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/interface/NativeEthernetSupport.tsx

import {DP83867E} from './DP83867E'
import {TPS7A2025} from '../power/TPS7A2025'
import type {ReferencePowerPlacement} from '../power-stages/ReferencePowerStages'

const bypassPins=[{pin:3,rail:'V_ETH_2V5'},{pin:9,rail:'V_ETH_2V5'},
 {pin:6,rail:'V_USB_PHY_1V1'},{pin:24,rail:'V_USB_PHY_1V1'},{pin:31,rail:'V_USB_PHY_1V1'},{pin:42,rail:'V_USB_PHY_1V1'},
 {pin:19,rail:'V_3V3'},{pin:30,rail:'V_3V3'},{pin:41,rail:'V_3V3'}]as const
const passiveRefs=[...Array.from({length:18},(_,i)=>`C${1800+i}`),'C1820','C1821',...Array.from({length:11},(_,i)=>`R${1800+i}`)]
/** Separated preview positions only. Product integration must place each bypass
 * pair by its named supply pin, and the bias/strap parts by the PHY.
 */
export const ethernetDefaultPlacements:Record<string,ReferencePowerPlacement>={
 U1800:{pcbX:-17,pcbY:0,layer:'top'},U1801:{pcbX:-8,pcbY:0,layer:'top'},
 ...Object.fromEntries(passiveRefs.map((ref,i)=>[ref,{pcbX:1+(i%8)*3,pcbY:8-Math.floor(i/8)*4,layer:'top'}])),
}
export const ethernetParts=Object.keys(ethernetDefaultPlacements).map(reference=>({reference,kind:reference.startsWith('U')?'ethernet':reference.startsWith('C')?'capacitor':'resistor'}))
export const ethernetCpuConnections={
 B35:'net.MCU_MDIO0_MDIO',A36:'net.MCU_MDIO0_MDC',
 A35:'net.MCU_RGMII_RD0',B36:'net.MCU_RGMII_RD1',C36:'net.MCU_RGMII_RD2',D36:'net.MCU_RGMII_RD3',C37:'net.MCU_RGMII_RX_CTL',B37:'net.MCU_RGMII_RXC',
 D37:'net.MCU_RGMII_TD0',D38:'net.MCU_RGMII_TD1',E37:'net.MCU_RGMII_TD2',E38:'net.MCU_RGMII_TD3',C38:'net.MCU_RGMII_TX_CTL',E36:'net.MCU_RGMII_TXC',
}as const

/** RGMII PHY circuit with its specified nine local bypass pairs and separate
 * 2.5V analog LDO. Requires externally qualified25MHz1.8V clock, driven reset,
 * LED buffers, MDI protection/magnetics and board-specific constrained routing.
 * The reset owner must configure MAC pins as high impedance before sampling
 * PHY straps. Software must program and verify the RGMII internal delays.
 */
export function NativeEthernetSupport({placements=ethernetDefaultPlacements,references,resetNet='net.ETH_RESET_N',clockNet='net.ETH_CLK25_1V8'}:{
 placements?:Partial<Record<string,ReferencePowerPlacement>>;references?:readonly string[];resetNet?:string;clockNet?:string
}){
 const wanted=(name:string)=>!references||references.includes(name)
 const p=(name:string)=>{
  const i=Object.keys(ethernetDefaultPlacements).indexOf(name)
  return {schX:-21+(i%7)*7,schY:24-Math.floor(i/7)*12,schSectionName:'ETHERNET_SUPPORT_SECTION',...placements[name]}
 }
 const g='net.GND',v='net.V_3V3'
 const connections={
  TD_P_A:'net.ETH_MDI_A_P',TD_M_A:'net.ETH_MDI_A_N',TD_P_B:'net.ETH_MDI_B_P',TD_M_B:'net.ETH_MDI_B_N',TD_P_C:'net.ETH_MDI_C_P',TD_M_C:'net.ETH_MDI_C_N',TD_P_D:'net.ETH_MDI_D_P',TD_M_D:'net.ETH_MDI_D_N',
  VDDA2P5_A:'net.V_ETH_2V5',VDDA2P5_B:'net.V_ETH_2V5',VDD1P0_A:'net.V_USB_PHY_1V1',VDD1P0_B:'net.V_USB_PHY_1V1',VDD1P0_C:'net.V_USB_PHY_1V1',VDD1P0_D:'net.V_USB_PHY_1V1',VDDIO_A:v,VDDIO_B:v,VDDIO_C:v,GND_EP:g,
  RBIAS:'net.ETH_RBIAS',XI:clockNet,MDC:'net.ETH_MDC_PHY',MDIO:'net.MCU_MDIO0_MDIO',
  TX_D0:'net.MCU_RGMII_TD0',TX_D1:'net.MCU_RGMII_TD1',TX_D2:'net.MCU_RGMII_TD2',TX_D3:'net.MCU_RGMII_TD3',GTX_CLK:'net.MCU_RGMII_TXC',TX_CTRL:'net.MCU_RGMII_TX_CTL',
  RX_D0:'net.MCU_RGMII_RD0',RX_D1:'net.MCU_RGMII_RD1',RX_D2:'net.MCU_RGMII_RD2',RX_D3:'net.MCU_RGMII_RD3',RX_CLK:'net.ETH_RXC_PHY',RX_CTRL:'net.MCU_RGMII_RX_CTL',
  RESET_N:resetNet,INT_PWDN:'net.ETH_INT_PWDN',LED_1:'net.ETH_LED_1000_RAW',LED_2:'net.ETH_LED_ACTIVITY_RAW',
  JTAG_CLK:'net.ETH_JTAG_CLK',JTAG_TMS:'net.ETH_JTAG_TMS',JTAG_TDI:'net.ETH_JTAG_TDI',
 }
 const resistors=[
  ['R1800','11k','RC0402FR-0711KL','net.ETH_RBIAS',g],
  ['R1801','1.5k','RC0402FR-071K5L',v,'net.MCU_MDIO0_MDIO'],
  ['R1802','22','RC0402FR-0722RL','net.MCU_MDIO0_MDC','net.ETH_MDC_PHY'],
  ['R1803','22','RC0402FR-0722RL','net.ETH_RXC_PHY','net.MCU_RGMII_RXC'],
  ['R1804','5.76k','RC0402FR-075K76L',v,'net.MCU_RGMII_RX_CTL'],
  ['R1805','2.49k','RC0402FR-072K49L','net.MCU_RGMII_RX_CTL',g],
  ['R1806','10k','RC0402FR-0710KL',resetNet,g],
  ['R1807','47k','RC0402FR-0747KL','net.ETH_JTAG_CLK',g],
  ['R1808','47k','RC0402FR-0747KL',v,'net.ETH_JTAG_TMS'],
  ['R1809','47k','RC0402FR-0747KL',v,'net.ETH_JTAG_TDI'],
  ['R1810','2.2k','RC0402FR-072K2L',v,'net.ETH_INT_PWDN'],
 ]
 return <>
  <schematicsection name="ETHERNET_SUPPORT_SECTION" displayName="RGMII Ethernet PHY and power" />
  <net name="V_ETH_2V5" isPower />
  {wanted('U1800')&&<DP83867E name="U1800" {...p('U1800')} connections={connections}
   noConnect={['VDDA1P8_A','VDDA1P8_B','XO','CLK_OUT','JTAG_TDO','GPIO_0','GPIO_1','LED_0']} />}
  {wanted('U1801')&&<TPS7A2025 name="U1801" {...p('U1801')} noConnect={['NC']}
   connections={{IN:v,OUT:'net.V_ETH_2V5',EN:'net.MAIN_3V3_PG',GND:g}} />}
  {bypassPins.flatMap((b,i)=>[0,1].map(j=>{const name=`C${1800+i*2+j}`;return wanted(name)&&<capacitor key={name} name={name}
   capacitance={j?'100nF':'1uF'} maxVoltageRating={j?'16V':'10V'} manufacturerPartNumber={j?'GRM155R71C104KA88D':'GRM155R61A105KE15D'}
   footprint="0402" {...p(name)} connections={{pin1:`net.${b.rail}`,pin2:g}} />}))}
  {[['C1820',v],['C1821','net.V_ETH_2V5']].filter(([name])=>wanted(name)).map(([name,rail])=><capacitor key={name} name={name}
   capacitance="4.7uF" maxVoltageRating="10V" manufacturerPartNumber="GRM188R61A475KE15D" footprint="0603" {...p(name)} connections={{pin1:rail,pin2:g}} />)}
  {resistors.filter(([name])=>wanted(name)).map(([name,value,mpn,a,b])=><resistor key={name} name={name} resistance={value}
   tolerance="1%" manufacturerPartNumber={mpn} footprint="0402" {...p(name)} connections={{pin1:a,pin2:b}} />)}
 </>
}