changeset 48:d55824058cfc

LCD subsystem integrated
author Mychaela Falconia <falcon@freecalypso.org>
date Sat, 27 Nov 2021 02:46:19 +0000
parents 9f5a3567d699
children 0884b4661573
files venus/src/MCL venus/src/Makefile venus/src/periph/bl_current_sink.v venus/src/periph/lcd_subsystem.v venus/src/slotmap/U403 venus/src/top/mobile.v
diffstat 6 files changed, 103 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/venus/src/MCL	Sat Nov 27 02:09:46 2021 +0000
+++ b/venus/src/MCL	Sat Nov 27 02:46:19 2021 +0000
@@ -246,6 +246,16 @@
  footprint=0402
  npins=2
 
+C404:
+ hier=mob.lcd.LCD_bypass_cap
+ footprint=0402
+ npins=2
+
+C405:
+ hier=mob.lcd.bl.cursel.U403_bypass
+ footprint=0402
+ npins=2
+
 C600:
  hier=mob.core.rf.rita2pa_hb.C600
  footprint=0402
@@ -702,6 +712,7 @@
 # LCD module
 
 LCD1:
+ hier=mob.lcd.lcd.pkg
  manufacturer=Formike
  device=KWH020ST23-F01
  part=yes
@@ -951,6 +962,30 @@
  footprint=0402
  npins=2
 
+R409:
+ hier=mob.lcd.bl.BL_EN_pulldown
+ value=100k
+ footprint=0402
+ npins=2
+
+R410:
+ hier=mob.lcd.bl.cursel.R_fixed
+ value=TBD
+ footprint=0402
+ npins=2
+
+R411:
+ hier=mob.lcd.bl.cursel.R_GPIO11
+ value=TBD
+ footprint=0402
+ npins=2
+
+R412:
+ hier=mob.lcd.bl.cursel.R_GPIO12
+ value=TBD
+ footprint=0402
+ npins=2
+
 # attenuators in the Tx path from Rita to PA
 part chip_atten:
  device=RAC101A-3dB
@@ -1144,8 +1179,10 @@
  vendor_part_number=1727-7013-1-ND
  pinout=74LVC2G125.pinout
  npins=8
+ slotmap=slotmap/U403
 
 U404:
+ hier=mob.lcd.bl.MAX1916.pkg
  manufacturer=Maxim
  device=MAX1916
  part=yes
--- a/venus/src/Makefile	Sat Nov 27 02:09:46 2021 +0000
+++ b/venus/src/Makefile	Sat Nov 27 02:46:19 2021 +0000
@@ -12,8 +12,8 @@
 	periph/bl_current_select.v periph/bl_current_sink.v \
 	periph/calypso_uart_in.v periph/charging_circuit.v \
 	periph/charging_led.v periph/inv_buffer_74LVC1G04.v periph/jtag_if.v \
-	periph/lcd_module.v periph/sim_socket_block.v periph/sim_socket_wrap.v \
-	periph/sma_wrap.v \
+	periph/lcd_module.v periph/lcd_subsystem.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 \
--- a/venus/src/periph/bl_current_sink.v	Sat Nov 27 02:09:46 2021 +0000
+++ b/venus/src/periph/bl_current_sink.v	Sat Nov 27 02:46:19 2021 +0000
@@ -12,6 +12,8 @@
 		 .LEDK(LEDK)
 	);
 
+resistor BL_EN_pulldown (BL_GPIO9, GND);
+
 bl_current_select cursel (.GND(GND),
 			  .Vio(Vio),
 			  .BL_GPIO11(BL_GPIO11),
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/venus/src/periph/lcd_subsystem.v	Sat Nov 27 02:46:19 2021 +0000
@@ -0,0 +1,43 @@
+module lcd_subsystem (GND, VBAT, Vio, DB, RD, WR, RS, CS, RESET,
+		      BL_GPIO9, BL_GPIO11, BL_GPIO12);
+
+input GND, VBAT, Vio;
+
+inout [15:0] DB;
+input RD, WR, RS, CS, RESET;
+
+input BL_GPIO9, BL_GPIO11, BL_GPIO12;
+
+wire [1:3] LEDK;
+
+lcd_module lcd (.GND(GND),
+		.VCI(Vio),
+		.IOVCC(Vio),
+		.DB(DB),
+		.RD(RD),
+		.WR(WR),
+		.RS(RS),
+		.CS(CS),
+		.RESET(RESET),
+		.IM0(GND),
+		.LEDA(VBAT),
+		/* LEDK broken out to allow reordering for layout */
+		.LEDK[1](LEDK[1]),
+		.LEDK[2](LEDK[2]),
+		.LEDK[3](LEDK[3])
+	);
+
+capacitor LCD_bypass_cap (Vio, GND);
+
+bl_current_sink bl (.GND(GND),
+		    .Vio(Vio),
+		    .BL_GPIO9(BL_GPIO9),
+		    .BL_GPIO11(BL_GPIO11),
+		    .BL_GPIO12(BL_GPIO12),
+		    /* LEDK broken out to allow reordering for layout */
+		    .LEDK[1](LEDK[1]),
+		    .LEDK[2](LEDK[2]),
+		    .LEDK[3](LEDK[3])
+	);
+
+endmodule
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/venus/src/slotmap/U403	Sat Nov 27 02:46:19 2021 +0000
@@ -0,0 +1,4 @@
+#instance			slot
+mob.lcd.bl.cursel.buf_GPIO11	1
+mob.lcd.bl.cursel.buf_GPIO12	2
+mob.lcd.bl.cursel.U403_common
--- a/venus/src/top/mobile.v	Sat Nov 27 02:09:46 2021 +0000
+++ b/venus/src/top/mobile.v	Sat Nov 27 02:46:19 2021 +0000
@@ -176,6 +176,21 @@
 		 .TDO(TDO)
 	);
 
+/* LCD subsystem */
+lcd_subsystem lcd (.GND(GND),
+		   .VBAT(VBAT),
+		   .Vio(Vio),
+		   .DB(MCU_D),
+		   .RD(MCU_nFOE),
+		   .WR(MCU_RnW),
+		   .RS(MCU_A[1]),
+		   .CS(LCD_CS),
+		   .RESET(LCD_RESET),
+		   .BL_GPIO9(BL_GPIO9),
+		   .BL_GPIO11(BL_GPIO11),
+		   .BL_GPIO12(BL_GPIO12)
+	);
+
 /* SIM socket */
 sim_socket_block sim (.GND(GND),
 		      .Vio(Vio),