changeset 32:85fbd582af88

Venus src: charging circuit captured
author Mychaela Falconia <falcon@freecalypso.org>
date Sun, 21 Nov 2021 20:20:38 +0000
parents d0b6c4915397
children 1d2b57d4f1c9
files venus/src/MCL venus/src/Makefile venus/src/periph/charging_circuit.v venus/src/starpoints venus/src/top/mobile.v
diffstat 5 files changed, 63 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/venus/src/MCL	Sun Nov 21 08:58:43 2021 +0000
+++ b/venus/src/MCL	Sun Nov 21 20:20:38 2021 +0000
@@ -227,6 +227,13 @@
  footprint=0402
  npins=2
 
+# Cap in charging circuit between ICTL and VCHG
+C401:
+ hier=mob.chg.C401
+ value=22nF
+ footprint=0402
+ npins=2
+
 C600:
  hier=mob.core.rf.rita2pa_hb.C600
  footprint=0402
@@ -530,6 +537,7 @@
 
 # Schottky diode in charging circuit
 D404:
+ hier=mob.chg.D404
  device=SS34
  footprint=DO214
  pinout=ipc-diode.pinout
@@ -707,6 +715,7 @@
 # specific part TBD, needs to be footprint-compatible with Si9407AEY,
 # as shown in TI's APN0 document
 Q401:
+ hier=mob.chg.Q401.pkg
  footprint=SO8
  npins=8
 
@@ -890,6 +899,20 @@
  footprint=0402
  npins=2
 
+# Precharge current limiting resistor
+R406:
+ hier=mob.chg.Rprech
+ value=TBD
+ footprint=TBD
+ npins=2
+
+# Charging current measurement resistor
+R407:
+ hier=mob.chg.Rmeas
+ value=0.2R
+ footprint=TBD
+ npins=2
+
 # attenuators in the Tx path from Rita to PA
 part chip_atten:
  device=RAC101A-3dB
--- a/venus/src/Makefile	Sun Nov 21 08:58:43 2021 +0000
+++ b/venus/src/Makefile	Sun Nov 21 20:20:38 2021 +0000
@@ -9,8 +9,9 @@
 	core/rita_rf_chip.v core/rita_vcxo_int.v core/rita_wrap.v \
 	core/xtal_32khz_wrap.v \
 	periph/Si9407AEY.v periph/battery.v periph/calypso_uart_in.v \
-	periph/inv_buffer_74LVC1G04.v periph/jtag_if.v \
-	periph/sim_socket_block.v periph/sim_socket_wrap.v periph/sma_wrap.v \
+	periph/charging_circuit.v periph/inv_buffer_74LVC1G04.v \
+	periph/jtag_if.v periph/sim_socket_block.v periph/sim_socket_wrap.v \
+	periph/sma_wrap.v \
 	top/board.v top/mobile.v \
 	usb/FT2232D_block.v usb/FT2232D_chip.v usb/eeprom_93Cx6_16bit.v \
 	usb/regulator_ic.v usb/regulator_with_caps.v usb/usb_conn.v \
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/venus/src/periph/charging_circuit.v	Sun Nov 21 20:20:38 2021 +0000
@@ -0,0 +1,26 @@
+/*
+ * This module encapsulates the battery charging circuit.
+ */
+
+module charging_circuit (GND, VCHG, VBAT, ICTL, PCHG, VCCS, VBATS);
+
+input GND, VCHG;
+inout VBAT;
+
+input ICTL, PCHG;
+output VCCS, VBATS;
+
+wire mid;
+
+Si9407AEY Q401 (.G(ICTL), .S(VCHG), .D(mid));
+capacitor C401 (ICTL, VCHG);
+
+resistor Rprech (PCHG, mid);
+
+misc_diode D404 (.A(mid), .C(VCCS));
+
+resistor Rmeas (VCCS, VBATS);
+
+starpoint VBATS_join (VBAT, VBATS);
+
+endmodule
--- a/venus/src/starpoints	Sun Nov 21 08:58:43 2021 +0000
+++ b/venus/src/starpoints	Sun Nov 21 20:20:38 2021 +0000
@@ -1,3 +1,4 @@
 mob.core.bb.dbb.HST201 2
 mob.core.bb.dbb.HST202 2
 mob.core.bb.dbb.HST203 2
+mob.chg.VBATS_join 2
--- a/venus/src/top/mobile.v	Sun Nov 21 08:58:43 2021 +0000
+++ b/venus/src/top/mobile.v	Sun Nov 21 20:20:38 2021 +0000
@@ -142,6 +142,16 @@
 	      .Third_pin(ADIN2)
 	);
 
+/* charging circuit */
+charging_circuit chg (  .GND(GND),
+			.VCHG(VCHG),
+			.VBAT(VBAT),
+			.ICTL(ICTL),
+			.PCHG(PCHG),
+			.VCCS(VCCS),
+			.VBATS(VBATS)
+	);
+
 /* Calypso UART inputs */
 calypso_uart_in uart (  .GND(GND),
 			.VBAT(VBAT),