Skip to content
Snippets Groups Projects
Commit abfb0f7c authored by João Paulo Gonçalves's avatar João Paulo Gonçalves
Browse files

arm64: dts: freescale: imx8mp-verdin: Add Ivy carrier board

Add Toradex Verdin Ivy carrier board support. One notable feature of Ivy
is the analog inputs. These inputs are multiplexed, allowing the same
input to measure either voltage or current. For current measurements,
a GPIO switch enables or disables the shunt resistor. This process is
automatically managed by the Linux kernel using the IIO and MUX
subsystems. Voltage measurement is always enabled, but the voltage
measured by the ADC is scaled by a cascade voltage divider. In the
device tree, the equivalent gain of the voltage divider is used, which
can be calculated as follows:

               ------------
               +          |
                         .-.
                  R1=30K | |
                         | |
                         '-'
                          |-------------------
    Analog Input (AIN)    |                  |
                         .-.                .-.
                  R2=10K | |         R3=30K | |
                         | |                | |
                         '-'                '-'
                          |                  |
                          |                  |--------
                          |                 .-.      +
                          |          R4=10K | |
                          |                 | |      ADC Input (Channels 0 and 1)
                          |                 '-'
               -          |                  |       -
               -----------|                  |--------
                         ===                ===
                         GND                GND

Vin  = Analog Input (AIN)
Vout = ADC Input
Rth  = Thevenin Equiv. Resistance
Vth  = Thevenin Equiv. Voltage
RL   = Load Resistor

R1 = 30K, R2 = 10K, R3 = 30K, R4 = 10K
RL = R4 = 10K

Rth  = (R1 // R2) + R3 = 37500 Ohms
Vth  = (Vin * R2) / (R1 + R2) = Vin/4;
Vout = (Vth * RL)/ (Rth + RL) = Vth/4.75 = Vin/19
Gain = Vout/Vin = 1/19

https://www.toradex.com/products/carrier-board/ivy-carrier-board

Upstream-Status: Submitted [https://lore.kernel.org/lkml/20240924114053.127737-1-francesco@dolcini.it/

]
Signed-off-by: default avatarJoão Paulo Gonçalves <joao.goncalves@toradex.com>
Signed-off-by: default avatarFrancesco Dolcini <francesco.dolcini@toradex.com>
parent adeab2c2
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment