diff --git a/reform2-handbook/build.sh b/reform2-handbook/build.sh index de005e3..ad2f5f7 100755 --- a/reform2-handbook/build.sh +++ b/reform2-handbook/build.sh @@ -4,6 +4,9 @@ function build { dot -Tsvg system-diagram.dot -o system-diagram.svg rsvg-convert -f pdf -o system-diagram.pdf system-diagram.svg kramdown system.md >system.html + + sed -i 's/width="[^"]*"/width="100%"/' system-diagram.svg + sed -i 's/height="[^"]*"//' system-diagram.svg } build diff --git a/reform2-handbook/system-diagram.dot b/reform2-handbook/system-diagram.dot index 528f639..0064966 100644 --- a/reform2-handbook/system-diagram.dot +++ b/reform2-handbook/system-diagram.dot @@ -11,7 +11,7 @@ digraph G { labelloc="t"; rtc [label="Realtime\nClock" color=black href="system.html#rtc"]; - rtcbat [label="Coin Cell"]; + rtcbat [label="Coin Cell" href="system.html#rtc"]; subgraph cluster_som { fontname="Inter"; @@ -51,7 +51,7 @@ digraph G { pwm [label="PWM" href="system.html#pwm"]; - ethmac [label="ETH MAC"]; + ethmac [label="ETH MAC" href="system.html#eth-mac"]; cpu0 [label="Cortex-A53" href="system.html#cortex-a53"]; cpu1 [label="Cortex-M4F" href="system.html#cortex-m4f"]; @@ -61,10 +61,10 @@ digraph G { spi1 [label="SPI" href="system.html#spi"]; } - ram [label="LPDDR4\nRAM 4GB" color=black]; - emmc [label="eMMC\n~8GB" color=black]; + ram [label="LPDDR4\nRAM 4GB" color=black href="system.html#ddrc"]; + emmc [label="eMMC\n~8GB" color=black href="system.html#mmc"]; - ethphy [label="ETH PHY" color=black]; + ethphy [label="ETH PHY" color=black href="system.html#eth-phy"]; s5v [label="5V Input"]; } @@ -82,14 +82,14 @@ digraph G { style=filled; label=<Internal Ports
>; - iuart0 [label="UART1"]; - iuart1 [label="UART2\nConsole"]; + iuart0 [label="UART1" href="system.html#uart"]; + iuart1 [label="UART2\nConsole" href="system.html#uart"]; - iusb0 [label="IUSB1"]; - iusb1 [label="IUSB2"]; + iusb0 [label="IUSB1" href="system.html#usb3"]; + iusb1 [label="IUSB2" href="system.html#usb3"]; - impcie [label="mPCIe Slot"]; - im2 [label="M.2 Slot\nKey M"]; + impcie [label="mPCIe Slot" href="system.html#pcie"]; + im2 [label="M.2 Slot\nKey M" href="system.html#pcie"]; } subgraph cluster_power { @@ -108,18 +108,18 @@ digraph G { style=filled; margin="25.0"; - lpc [label="MCU LPC11U24" color=black width=4]; - ina [label="Current &\nVoltage Monitor" color=black]; + lpc [label="MCU LPC11U24" color=black width=4 href="system.html#lpc"]; + ina [label="Current &\nVoltage Monitor" color=black href="system.html#ina"]; - ltc [label="Buck/Boost\nDC-DC and Charger" color=black]; + ltc [label="Buck/Boost\nDC-DC and Charger" color=black href="system.html#ltc4020"]; - mon [label="Cell Monitor\nBalancer" color=black]; + mon [label="Cell Monitor\nBalancer" color=black href="system.html#balancer"]; - lspi [label="SPI" shape=diamond style=filled color=lightgrey]; - li2c [label="I2C" shape=diamond style=filled color=lightgrey]; + lspi [label="SPI" shape=diamond style=filled color=lightgrey href="system.html#spi"]; + li2c [label="I2C" shape=diamond style=filled color=lightgrey href="system.html#i2c"]; - cells [label="8x LiFePO4 18650 Batteries" shape=rectangle]; - supply [label="24V Power Supply\nfrom Barrel Jack" shape=rectangle]; + cells [label="8x LiFePO4 18650 Batteries" shape=rectangle href="system.html#cells"]; + supply [label="24V Power Supply\nfrom Barrel Jack" shape=rectangle href="system.html#barreljack"]; enabchg [label="Charge On" shape=diamond style=filled color=lightgrey]; enab5v [label="On" shape=diamond style=filled color=lightgrey]; @@ -134,13 +134,13 @@ digraph G { margin="25.0"; r28v [label="~28V" shape=diamond style=filled color=lightgrey]; - stby [label="3V3 Standby" color=black]; - r5v [label="5V" width=1.1 color=black]; - r3v3 [label="3V3" color=black]; + stby [label="3V3 Standby" color=black href="system.html#standby"]; + r5v [label="5V" width=1.1 color=black href="system.html#r5v"]; + r3v3 [label="3V3" color=black href="system.html#r3v3"]; - r1v2 [label="1V2" width=0.5 color=black]; - r1v5 [label="1V5" width=0.5 color=black]; - r1v8 [label="1V8" width=0.5 color=black]; + r1v2 [label="1V2" width=0.5 color=black href="system.html#r1v2"]; + r1v5 [label="1V5" width=0.5 color=black href="system.html#r1v5"]; + r1v8 [label="1V8" width=0.5 color=black href="system.html#r1v8"]; } } @@ -152,19 +152,19 @@ digraph G { color=lightgrey; style=filled; - pusb3 [label="USB3 Port 3"]; - pusb2 [label="USB3 Port 2"]; - pusb1 [label="USB3 Port 1"]; + pusb3 [label="USB3 Port 3" href="system.html#usb3"]; + pusb2 [label="USB3 Port 2" href="system.html#usb3"]; + pusb1 [label="USB3 Port 1" href="system.html#usb3"]; - pbarrel [label="Barrel Jack"]; + pbarrel [label="Barrel Jack" href="system.html#barreljack"]; - phdmi [label="HDMI Port"]; - psdcard [label="SD Card Slot"]; - peth [label="1G Ethernet Port"]; + phdmi [label="HDMI Port" href="system.html#hdmi"]; + psdcard [label="SD Card Slot" href="system.html#mmc"]; + peth [label="1G Ethernet Port" href="system.html#eth-mac"]; - paudio [label="Headphone &\nMic Jack"]; + paudio [label="Headphone &\nMic Jack" href="system.html#audiojack"]; } - lshift [label="Level Shifter"]; + lshift [label="Level Shifter" href="system.html#mmc"]; //refclk [label="PCIe Clock Generator"]; @@ -184,9 +184,9 @@ digraph G { label="Screen Assembly\n "; margin="25.0"; - panel [label="12.5\" 1920x1080\nIPS Panel"]; - backlight [label="Backlight"]; - speakers [label="Stereo\nSpeakers"]; + panel [label="12.5\" 1920x1080\nIPS Panel" href="system.html#panel"]; + backlight [label="Backlight" href="system.html#panel"]; + speakers [label="Stereo\nSpeakers" href="system.html#speakers"]; } subgraph cluster_trackball { @@ -196,13 +196,13 @@ digraph G { label="Trackball\n "; margin="25.0"; - tmcu [label="MCU Atmega32U2" color=black width=3]; - tsens [label="Motion Sensor"]; + tmcu [label="MCU Atmega32U2" color=black width=3 href="system.html#tbctrl"]; + tsens [label="Motion Sensor" href="system.html#tbsensor"]; - ti2c [label="I2C" shape=diamond style=filled color=lightgrey]; + ti2c [label="I2C" shape=diamond style=filled color=lightgrey href="system.html#i2c"]; tgpio [label="GPIO" shape=diamond style=filled color=lightgrey]; - tkeys [label="5 Buttons"]; + tkeys [label="5 Buttons" href="system.html#kbkeys"]; } subgraph cluster_keyboard { @@ -212,14 +212,14 @@ digraph G { label="Keyboard\n "; margin="25.0"; - kmcu [label="MCU Atmega32U4" color=black width=3]; + kmcu [label="MCU Atmega32U4" color=black width=3 href="system.html#kbctrl"]; - oled [label="OLED Display 128x32"]; + oled [label="OLED Display 128x32" href="system.html#oled"]; - ki2c [label="I2C" shape=diamond style=filled color=lightgrey]; - kuart [label="UART" shape=diamond style=filled color=lightgrey]; + ki2c [label="I2C" shape=diamond style=filled color=lightgrey href="system.html#i2c"]; + kuart [label="UART" shape=diamond style=filled color=lightgrey href="system.html#kbctrl"]; kgpio [label="GPIO" shape=diamond style=filled color=lightgrey]; - kkeys [label="Key Matrix"]; + kkeys [label="Key Matrix" href="system.html#kbkeys"]; } } diff --git a/reform2-handbook/system-diagram.pdf b/reform2-handbook/system-diagram.pdf index d0df1c0..eb0e22c 100644 Binary files a/reform2-handbook/system-diagram.pdf and b/reform2-handbook/system-diagram.pdf differ diff --git a/reform2-handbook/system-diagram.svg b/reform2-handbook/system-diagram.svg index 7d4c0d4..b21ea57 100644 --- a/reform2-handbook/system-diagram.svg +++ b/reform2-handbook/system-diagram.svg @@ -4,7 +4,7 @@ - G @@ -89,8 +89,11 @@ rtcbat + Coin Cell + + @@ -134,8 +137,11 @@ phdmi + HDMI Port + + @@ -191,8 +197,11 @@ pusb3 + USB3 Port 3 + + @@ -234,9 +243,12 @@ ram + LPDDR4 RAM 4GB + + @@ -255,9 +267,12 @@ emmc + eMMC ~8GB + + @@ -276,8 +291,11 @@ lshift + Level Shifter + + @@ -296,9 +314,12 @@ iuart1 + UART2 Console + + @@ -317,8 +338,11 @@ impcie + mPCIe Slot + + @@ -337,9 +361,12 @@ im2 + M.2 Slot Key M + + @@ -358,8 +385,11 @@ iuart0 + UART1 + + @@ -378,8 +408,11 @@ backlight + Backlight + + @@ -390,14 +423,20 @@ ethmac + ETH MAC + + ethphy + ETH PHY + + @@ -457,8 +496,11 @@ lpc + MCU LPC11U24 + + @@ -468,8 +510,11 @@ peth + 1G Ethernet Port + + @@ -485,8 +530,11 @@ iusb0 + IUSB1 + + @@ -496,8 +544,11 @@ iusb1 + IUSB2 + + @@ -507,8 +558,11 @@ pusb2 + USB3 Port 2 + + @@ -518,8 +572,11 @@ pusb1 + USB3 Port 1 + + @@ -529,9 +586,12 @@ paudio + Headphone & Mic Jack + + @@ -541,9 +601,12 @@ speakers + Stereo Speakers + + @@ -553,9 +616,12 @@ panel + 12.5" 1920x1080 IPS Panel + + @@ -566,8 +632,11 @@ kmcu + MCU Atmega32U4 + + @@ -577,8 +646,11 @@ tmcu + MCU Atmega32U2 + + @@ -588,8 +660,11 @@ lspi + SPI + + @@ -599,8 +674,11 @@ li2c + I2C + + @@ -646,15 +724,21 @@ ina + Current & Voltage Monitor + + cells + 8x LiFePO4 18650 Batteries + + @@ -664,9 +748,12 @@ ltc + Buck/Boost DC-DC and Charger + + @@ -688,9 +775,12 @@ mon + Cell Monitor Balancer + + @@ -716,9 +806,12 @@ supply + 24V Power Supply from Barrel Jack + + @@ -734,8 +827,11 @@ r5v + 5V + + @@ -746,8 +842,11 @@ r3v3 + 3V3 + + @@ -758,8 +857,11 @@ stby + 3V3 Standby + + @@ -800,8 +902,11 @@ r1v2 + 1V2 + + @@ -812,8 +917,11 @@ r1v5 + 1V5 + + @@ -824,8 +932,11 @@ r1v8 + 1V8 + + @@ -836,14 +947,20 @@ pbarrel + Barrel Jack + + psdcard + SD Card Slot + + @@ -858,8 +975,11 @@ ti2c + I2C + + @@ -880,8 +1000,11 @@ tsens + Motion Sensor + + @@ -891,8 +1014,11 @@ tkeys + 5 Buttons + + @@ -902,8 +1028,11 @@ ki2c + I2C + + @@ -913,8 +1042,11 @@ kuart + UART + + @@ -935,8 +1067,11 @@ oled + OLED Display 128x32 + + @@ -951,8 +1086,11 @@ kkeys + Key Matrix + + diff --git a/reform2-handbook/system.html b/reform2-handbook/system.html index 63f23ab..a4ce70f 100644 --- a/reform2-handbook/system.html +++ b/reform2-handbook/system.html @@ -1,4 +1,4 @@ -

Reform 2.0D-4 Electronic System Components

+

MNT Reform 2.0D-4 Electronic System Components

+

This is an interactive block diagram of the MNT Reform open hardware laptop. Click on a label in the diagram to jump to the corresponding bit of information.

+ +

For general information, visit the MNT Reform Website.

+

System-on-Module: Boundary Devices Nitrogen8M_SOM

The default SOM of Reform.

@@ -37,10 +41,6 @@ iframe {
  • Reference Manual
  • -

    Some interesting core drivers: -- drivers/clk/imx/clk-imx8mq.c --

    -

    Cortex-A53

    The four main 64-bit ARM cores of the default SOC of Reform. The bootloader and operating system usually run on these processors.

    @@ -161,7 +161,7 @@ iframe { @@ -186,6 +186,10 @@ iframe {

    The PHY part of the Ethernet interface is a chip on the SOM. The default SOM has an Atheros AR8035 PHY, which is driven in Linux by a generic PHY driver.

    + +

    USB Hub

    Reform has a TI TUSB8041 USB Hub chip with four downstream ports, two of which lead to external USB3.0 connectors.

    @@ -195,3 +199,273 @@ iframe {
  • Datasheet
  • +

    Battery-Backed Realtime Clock

    + +

    The Reform motherboard has a NXP PCF8523T realtime clock chip that is backed by a 3.3V lithium coin cell when the system is unpowered. It is accessed by the SoC via I²C.

    + + + +

    DSI to eDP Converter

    + +

    The Reform motherboard has a TI SN65DSI86 (variant SN65DSI86IPAPQ1) chip that converts MIPI-DSI signals to eDP signals that the built-in display panel can understand. The DSI output on the default SOM is available on a flat cable connector. A short, 30 pin FPC cable goes from the SOM into the motherboard’s MIPI-DSI input connector directly below the SOM. The DSI signals are routed from there to the SN65DSI86 chip.

    + +

    The eDP signals are available on the 2x15 pin, 2mm DuPont header J24. Normally, a cable is plugged into this header, routed through the right-hand screen hinge and it’s IPEX connector side plugged into the display panel.

    + + + +

    Audio DAC/ADC

    + +

    The Audio DAC/ADC converts between the digital SAI audio signals and the signals on the audio jack and the speakers. It can drive both speakers and headphones with independent volumes.

    + + + +

    TRRS 3.5mm Audio Jack

    + +

    The 3.5mm audio jack, also called a TRRS jack (Tip/Ring/Ring/Sleeve) can be used to connect headphones, an external power amplifier or a headset with integrated microphone.

    + +

    The audio jack uses the CTIA standard to define which signals are located on which contacts on the plug:

    + + + +

    System Controller

    + +

    Except for extreme undervoltage conditions (battery cells below 2.5V), the LPC is always running a C program that implements a state machine which watches over the battery cells and controls their charging and discharging/balancing.

    + +

    In addition, the LPC can toggle the main power rails in the system on and off via GPIOs going to the relevant voltage converters and load switches.

    + +

    The LPC can be directly controlled by Circle commands given via the keyboard.

    + +

    Model: NXP LPC11U24

    + + + +

    Cell Monitor/Balancer

    + + + +

    Battery Voltage/Current Monitor

    + + + +

    Buck-Boost DC-DC/Charger

    + + + +

    Barrel Jack (Wall Power)

    + +

    The barrel jack accepts DC voltage in the range of 7V to 32V. The default power supply shipped with MNT Reform is specified at 24V / 2A.

    + + + +

    5V Power Rail

    + + + +

    3V3 Power Rail

    + + + +

    3V3 Standby Power Rail

    + + + +

    1V8 Power Rail

    + + + +

    1V5 Power Rail

    + + + +

    1V2 Power Rail

    + + + +

    Keyboard Controller

    + + + +

    The following shortcuts are available indepdently of the main processor in Reform, even when the system is powered off. Acting like a primitive terminal, most shortcuts trigger a command string to be sent over the keyboard’s UART to the LPC. The LPC then responds with characters to display on the OLED.

    + +

    In the 2.0D-3/D-4 development version:

    + + + +

    Keep in mind that Circle + 0 powers off the system immediately, so save your work and make sure it is synced to disk before powering off. For example, use the sync or shutdown commands.

    + +

    Keyboard and Trackball Keys

    + +

    The keyboard and trackball modules both use the same type of switch.

    + + + +

    The trackball has custom keycaps designed by MNT Research and 3D printed in an SLA process.

    + + + +

    Keyboard OLED

    + +

    The OLED display sits on its own little PCB on top of the keyboard, and is powered and controlled by the keyboard’s MCU independently from the computer’s main processor.

    + +

    The display is currently used to show the results of Circle commands given via the keyboard.

    + + + +

    Trackball Controller

    + + + +

    Trackball Sensor

    + + + +

    Trackpad Controller

    + + + +

    Trackpad Sensor

    + + + +

    Display Panel

    + +

    The display panel is connected to two main types of signals via a single IPEX connector:

    + + + +

    Speakers

    + +

    Reform uses 2x 8 Ohm, 1 Watt mobile speakers mounted below the display panel. They are powered by the Audio DAC.

    + + + +

    Battery Cells

    + +

    Reform uses 8 battery cells with LiFePO4 (Lithium Iron Phosphate) chemistry.

    + +

    Important Warnings of Potential Fire and Injury Hazards

    + + + +

    Examples of compatible cells

    + + diff --git a/reform2-handbook/system.md b/reform2-handbook/system.md index 2d0bc56..a3fb27f 100644 --- a/reform2-handbook/system.md +++ b/reform2-handbook/system.md @@ -1,4 +1,4 @@ -# Reform 2.0D-4 Electronic System Components +# MNT Reform 2.0D-4 Electronic System Components +This is an interactive block diagram of the MNT Reform open hardware laptop. Click on a label in the diagram to jump to the corresponding bit of information. + +For general information, visit the [MNT Reform Website](https://mntre.com/reform). + ## System-on-Module: Boundary Devices Nitrogen8M_SOM The default SOM of Reform. @@ -33,10 +37,6 @@ The default SOC of Reform. - [Data Sheet](https://www.nxp.com/docs/en/data-sheet/IMX8MDQLQCEC.pdf) - [Reference Manual](https://www.nxp.com/webapp/Download?colCode=IMX8MDQLQRM) -Some interesting core drivers: -- drivers/clk/imx/clk-imx8mq.c -- - #### Cortex-A53 {#cortex-a53} The four main 64-bit ARM cores of the default SOC of Reform. The bootloader and operating system usually run on these processors. @@ -130,7 +130,7 @@ Reform has 3 external USB 3.0 ports and two internal USB 2.0 ports. All of these Reform uses both USDHC MMC/SD controllers of i.MX8M: - The first controller connects to an eMMC flash disk on the SOM (usually 8GB in size). -- The second controller connects to the SD card slot on the motherboard via a level shifter. +- The second controller connects to the SD card slot on the motherboard via a level shifter. The level shifter converts between the SoC's 1.8V and the SD card's 3.3V signal levels. - [Driver](https://github.com/torvalds/linux/tree/master/drivers/mmc/host/sdhci-esdhc-imx.c) @@ -150,6 +150,8 @@ Ethernet in Reform is made from 3 parts (MAC, PHY and the connector with built-i The PHY part of the Ethernet interface is a chip on the SOM. The default SOM has an Atheros AR8035 PHY, which is driven in Linux by a generic PHY driver. +- [Datasheet](https://media.digikey.com/pdf/data%20sheets/csr%20pdfs/ar8035_ds_(atheros)_mar2011.pdf) + ## USB Hub {#usb-hub} Reform has a TI TUSB8041 USB Hub chip with four downstream ports, two of which lead to external USB3.0 connectors. @@ -157,3 +159,215 @@ Reform has a TI TUSB8041 USB Hub chip with four downstream ports, two of which l - [Website](https://www.ti.com/product/TUSB8041) - [Datasheet](https://www.ti.com/lit/ds/symlink/tusb8041.pdf?&ts=1590007407171) +## Battery-Backed Realtime Clock {#rtc} + +The Reform motherboard has a NXP PCF8523T realtime clock chip that is backed by a 3.3V lithium coin cell when the system is unpowered. It is accessed by the SoC via [I²C](#i2c). + +- [RTC Datasheet](https://www.nxp.com/docs/en/data-sheet/PCF8523.pdf) +- Coin cell standard: CR1220 + +## DSI to eDP Converter {#dsi2edp} + +The Reform motherboard has a TI SN65DSI86 (variant SN65DSI86IPAPQ1) chip that converts [MIPI-DSI](#dsi) signals to eDP signals that the built-in [display panel](#panel) can understand. The DSI output on the default SOM is available on a flat cable connector. A short, 30 pin FPC cable goes from the SOM into the motherboard's MIPI-DSI input connector directly below the SOM. The DSI signals are routed from there to the SN65DSI86 chip. + +The eDP signals are available on the 2x15 pin, 2mm DuPont header J24. Normally, a cable is plugged into this header, routed through the right-hand screen hinge and it's IPEX connector side plugged into the display panel. + +- Input DSI lanes: 4 + Clock +- Output eDP lanes: 2 + AUX +- Color depth: 8 bit per color channel (24 bit per pixel) +- Standard Resolution: 1920x1080 @ 60 FPS +- [SN65DSI86 Datasheet](https://www.ti.com/lit/ds/symlink/sn65dsi86-q1.pdf?&ts=1590150753809) + +## Audio DAC/ADC {#dac} + +The Audio DAC/ADC converts between the [digital SAI audio signals](#sai) and the signals on the [audio jack](#audiojack) and the [speakers](#speakers). It can drive both speakers and headphones with independent volumes. + +- Model: Cirrus/Wolfson WM8960 +- [Datasheet](https://statics.cirrus.com/pubs/proDatasheet/WM8960_v4.4.pdf) + +## TRRS 3.5mm Audio Jack {#audiojack} + +The 3.5mm audio jack, also called a TRRS jack (Tip/Ring/Ring/Sleeve) can be used to connect headphones, an external power amplifier or a headset with integrated microphone. + +The audio jack uses the CTIA standard to define which signals are located on which contacts on the plug: + +- Tip: Left Speaker +- First Ring: Right Speaker +- Second Ring: Microphone +- Sleeve: Ground + +## System Controller {#lpc} + +Except for extreme undervoltage conditions (battery cells below 2.5V), the LPC is always running a C program that implements a state machine which watches over the battery cells and controls their charging and discharging/balancing. + +In addition, the LPC can toggle the main power rails in the system on and off via GPIOs going to the relevant voltage converters and load switches. + +The LPC can be directly controlled by [Circle commands given via the keyboard](#kbctrl). + +Model: NXP LPC11U24 + +- [Datasheet](https://www.nxp.com/docs/en/data-sheet/LPC11U2X.pdf) +- [Firmware](https://source.mntmn.com/MNT/reform/src/branch/master/reform2-lpc-fw/src/boards/reform2) + +## Cell Monitor/Balancer {#balancer} + +- Model: Analog/Linear LTC6803-4 +- [Datasheet](https://www.analog.com/media/en/technical-documentation/data-sheets/680324fa.pdf) + +## Battery Voltage/Current Monitor {#ina} + +- Model: Texas Instruments INA260 +- [Datasheet](http://www.ti.com/lit/ds/symlink/ina260.pdf?&ts=1590151953117) + +## Buck-Boost DC-DC/Charger {#ltc4020} + +- Model: Analog/Linear LTC4020 +- [Datasheet](https://www.analog.com/media/en/technical-documentation/data-sheets/4020fd.pdf) + +## Barrel Jack (Wall Power) {#barreljack} + +The barrel jack accepts DC voltage in the range of 7V to 32V. The default power supply shipped with MNT Reform is specified at 24V / 2A. + +- Receptacle: Switchcraft RAPC712X +- Inner diameter: 2.5mm +- Outer diameter: 5.5mm +- Poles: Positive on inner pole, negative on outer barrel. + +## 5V Power Rail {#r5v} + +- Type: Buck +- Model: Texas Instruments LM2677SX-5 +- [Datasheet](http://www.ti.com/lit/ds/symlink/lm2677.pdf?&ts=1590152214783) +- Max Current: 5A + +## 3V3 Power Rail {#r3v3} + +- Model: Texas Instruments LM2677SX-3.3 +- [Datasheet](http://www.ti.com/lit/ds/symlink/lm2677.pdf?&ts=1590152214783) +- Max Current: 5A + +## 3V3 Standby Power Rail {#standby} + +- Type: Buck +- Model: Texas Instruments LMR16006YQ3 +- [Datasheet](http://www.ti.com/lit/gpn/lmr16006y-q1) + +## 1V8 Power Rail {#r1v8} + +- Type: LDO +- Model: Texas Instruments TLV1117-18 +- [Datasheet](http://www.ti.com/lit/ds/symlink/tlv1117.pdf?&ts=1590152118151) + +## 1V5 Power Rail {#r1v5} + +- Type: Buck +- Model: Texas Instruments TLV62568DBV +- [Datasheet](http://www.ti.com/lit/ds/symlink/tlv62568.pdf?&ts=1590152066123) + +## 1V2 Power Rail {#r1v2} + +- Type: Buck +- Model: Texas Instruments TLV62568DBV +- [Datasheet](http://www.ti.com/lit/ds/symlink/tlv62568.pdf?&ts=1590152066123) + +## Keyboard Controller {#kbctrl} + +- Model: Microchip/Atmel Atmega32U4 +- [Datasheet](http://ww1.microchip.com/downloads/en/devicedoc/atmel-7766-8-bit-avr-atmega16u4-32u4_datasheet.pdf) +- [Firmware](https://source.mntmn.com/MNT/reform/src/branch/master/reform2-keyboard-fw) + +The following shortcuts are available indepdently of the main processor in Reform, even when the system is powered off. Acting like a primitive terminal, most shortcuts trigger a command string to be sent over the keyboard's UART to the [LPC](#lpc). The LPC then responds with characters to display on the [OLED](#oled). + +In the 2.0D-3/D-4 development version: + +- *Circle + 1:* Turn on the main system (powers up 5V, 3V3 and PCIe rails) +- *Circle + 0:* Turn off the main system (powers down 5V, 3V3 and PCIe rails) +- *Circle + 2:* Turn off the OLED display (turned back on by any other command) +- *Circle + F1:* Decrease keyboard backlight brightness +- *Circle + F2:* Increase keyboard backlight brightness +- *Circle + V:* Show voltages of all cells, total voltage and Amps going in or out of batteries plus charge percentage estimation. +- *Circle + Y:* Show voltage and amps as measured by the [INA260](#ina) voltage/current monitor. +- *Circle + S:* Display LPC status (idle/charging, overvoltage/balancing, undervoltage) + +Keep in mind that *Circle + 0* powers off the system immediately, so save your work and make sure it is synced to disk before powering off. For example, use the `sync` or `shutdown` commands. + +## Keyboard and Trackball Keys {#kbkeys} + +The keyboard and trackball modules both use the same type of switch. + +- Standard Keyswitch Model: Kailh PG1350 Low Profile Choc Brown. +- [PG1350 Datasheet](https://www.kailhswitch.com/uploads/201915927/CPG135001D02-1_Choc_Burnt_Orange.pdf) +- Keyboard Keycaps: Kailh Black Low Profile / Choc Keycap 1.5U and 1U. + +The trackball has custom keycaps designed by MNT Research and 3D printed in an SLA process. + +- [Trackball 3D Printed Parts](https://source.mntmn.com/MNT/reform/src/branch/master/reform2-3d-printed-parts/reform2-stl) + +## Keyboard OLED {#oled} + +The OLED display sits on its own little PCB on top of the keyboard, and is powered and controlled by the [keyboard's MCU](#kbctrl) independently from the computer's main processor. + +The display is currently used to show the results of [Circle commands given via the keyboard](#kbctrl). + +- Model: Generic SSD1306 128x32 Pixel OLED, Monochrome, I²C Interface + +## Trackball Controller {#tbctrl} + +- Model: Microchip/Atmel Atmega32U2 +- [Datasheet](http://ww1.microchip.com/downloads/en/DeviceDoc/doc7799.pdf) +- [Firmware](https://source.mntmn.com/MNT/reform/src/branch/master/reform2-trackball-fw) +- [Trackball 3D Printed Parts](https://source.mntmn.com/MNT/reform/src/branch/master/reform2-3d-printed-parts/reform2-stl) + +## Trackball Sensor {#tbsensor} + +- Model: Pixart PAT9125EL +- [Datasheet](https://www.codico.com/shop/media/datasheets/PixArt_PAT9125EL_InfoBrief.pdf) + +## Trackpad Controller {#tpcrtl} + +- Model: Microchip/Atmel Atmega32U2 +- [Firmware](https://source.mntmn.com/MNT/reform/src/branch/master/reform2-trackpad-fw) + +## Trackpad Sensor {#tpsensor} + +- Model: Azoteq TPS65-201A-S +- [Datasheet](https://www.mouser.de/datasheet/2/42/proxsense_i2c_trackpad_datasheet-1626845.pdf) + +## Display Panel {#panel} + +The display panel is connected to two main types of signals via a single IPEX connector: + +- eDP (embedded DisplayPort), via the [MIPI-DSI to eDP converter](#dsi2edp) +- [PWM](#pwm) to set the LED backlight's brightness. The brightness is set via the duty cycle of the PWM signal, while the frequency is set at a fixed value (default: 10KHz). + +- Model: Innolux N125HCE-GN1 +- [Panelook Information](http://www.panelook.com/N125HCE-GN1_Innolux_12.5_LCM_overview_28140.html) + +## Speakers {#speakers} + +Reform uses 2x 8 Ohm, 1 Watt mobile speakers mounted below the [display panel](#panel). They are powered by the [Audio DAC](#dac). + +- Model: PUI AS01808AO-3-R +- [Datasheet](http://www.puiaudio.com/pdf/AS01808AO-3-R.pdf) + +## Battery Cells {#cells} + +Reform uses 8 battery cells with LiFePO4 (Lithium Iron Phosphate) chemistry. + +### Important Warnings of Potential Fire and Injury Hazards + +- *Do not use batteries of any other chemistry in MNT Reform!* +- *Double check polarity of battery cells and make sure they are the right way around!* +- *The cells are connected in series, resulting in a 28.8V total voltage with high current capability. If shorted, traces can easily be burned and sparks could ignite nearby material.* - *Do not use metal tools or open wires inside of MNT Reform!* + +- Chemistry: LiFePO4 +- Form Factor: 18650 +- Voltage: 3.2V +- Cell Charge Voltage: 3.6V +- Configuration: Series (28.8V) + +### Examples of compatible cells + +- [Battery Space](https://www.batteryspace.com/lifepo4-18650-rechargeable-cell-3-2v-1500-mah-8-4a-rate-4-32wh-ul-listed-un38-3-passed-ndgr.aspx) +- [ENERpower](https://enerprof.de/akkus/akkus-lifepo4/akkuzellen-lifepo4/akkuzellen-lifepo4-18650/32/enerpower-18650-lifepo4-3-2v-1800-mah?c=26) +- [Lithium Werks](https://www.18650batterystore.com/Lithium-Werks-p/lithiumwerks-apr18650m1b.htm) diff --git a/reform2-keyboard-fw/Keyboard.c b/reform2-keyboard-fw/Keyboard.c index 28a9ae7..8b4f82f 100644 --- a/reform2-keyboard-fw/Keyboard.c +++ b/reform2-keyboard-fw/Keyboard.c @@ -122,7 +122,7 @@ int remote_receive_string(int print) { while (chr==-1 || chr==0) { chr=Serial_ReceiveByte(); clock++; - if (clock>100000) goto timeout; + if (clock>500000) goto timeout; } int poke_chr = chr; if (chr=='\n') poke_chr=' '; @@ -229,7 +229,7 @@ void remote_get_voltages(void) { Serial_SendByte('\r'); Delay_MS(1); remote_receive_string(0); - bat_amps = -((float)atoi(response))/1000.0; + bat_amps = ((float)atoi(response))/1000.0; float sum_volts = 0; @@ -256,17 +256,17 @@ void remote_get_voltages(void) { if (percentage<0) percentage = 0; char str[32]; - sprintf(str,"[] %.1f [] %.1f",voltages[0],voltages[4]); + sprintf(str,"[] %.1f [] %.1f %d%%",voltages[0],voltages[4],(int)percentage); insert_bat_icon(str,0,voltages[0]); insert_bat_icon(str,8,voltages[4]); gfx_poke_str(0,0,str); - sprintf(str,"[] %.1f [] %.1f %d%%",voltages[1],voltages[5],(int)percentage); + sprintf(str,"[] %.1f [] %.1f ",voltages[1],voltages[5]); insert_bat_icon(str,0,voltages[1]); insert_bat_icon(str,8,voltages[5]); gfx_poke_str(0,1,str); - sprintf(str,"[] %.1f [] %.1f %.2fA",voltages[2],voltages[6],bat_amps); + sprintf(str,"[] %.1f [] %.1f %.2fA",voltages[2],voltages[6],-bat_amps); insert_bat_icon(str,0,voltages[2]); insert_bat_icon(str,8,voltages[6]); gfx_poke_str(0,2,str);