ti,am13-pga

Description

Texas Instruments AM13E Programmable Gain Amplifier (PGA).

Register and field names (PGACTL, MUXSEL, PWREN_SYSPERIPH, ...) are those of
the AM13E230x Technical Reference Manual (SPRUJF2), chapter "Programmable
Gain Amplifier (PGA)" and section "Peripheral Power Control".

An op-amp with an internal resistor ladder. Mux topology, filter resistor
and output routing are set in devicetree; only gain changes at runtime via
opamp_set_gain().

functional-mode must match the mux connections:
  non_inverting: nmux rtap, mmux non-inverting. Gain x1, x2, x4 ... x64.
  inverting: nmux rtap, mmux inm0..inm3 or shared. Gain -1, -3, -7 ... -63,
    selected by magnitude.
  differential: as inverting; gain selects G in G * INP - (G - 1) * INM.
  follower: nmux rtop, mmux standalone. Fixed gain x1.
  standalone: nmux inm0..inm3, mmux standalone. Gain set externally;
    opamp_set_gain() has no effect.

The amplifier starts at the lowest gain of its mode.

Properties

Properties not inherited from the base binding file.

Name

Type

Details

sysctl

phandle

SYSCTL syscon containing the peripheral power control register.

This property is required.

ti,power-bit

int

PGA instance bit in SYSCTL PWREN_SYSPERIPH.

This property is required.

Legal values: 1, 2, 3

ti,pmux-input

string

Positive input mux selection (MUXSEL.PMUXSEL[3:0]).
Selects which PGA_INPx package pin is routed to the non-inverting op-amp input.

Default value: inp0

Legal values: inp0, inp1, inp2, inp3, inp4, inp5, inp6, inp7, inp8

ti,nmux-input

string

Negative input mux selection (MUXSEL.NMUXSEL[2:0]).
rtop: direct output feedback for follower mode.
rtap: internal feedback resistor tap for programmable-gain modes.
inm0..inm3: PGA_INMx package pin.

Default value: rtap

Legal values: rtop, rtap, inm0, inm1, inm2, inm3

ti,mmux-input

string

M-mux selection (MUXSEL.MMUXSEL[2:0]). Controls the bottom node of the
internal feedback resistor ladder (Ria bottom).
standalone: naked op-amp / G=1, no internal gain (MMUXSEL=0).
non-inverting: feedback to VSSA, non-inverting gain x1..x64 (MMUXSEL=1).
inm0..inm3: inverting gain via local PGA_INMx pin (MMUXSEL=2..5).
neg-shared-a/b: select shared inputs from another PGA instance
  (MMUXSEL=6,7).

Default value: non-inverting

Legal values: standalone, non-inverting, inm0, inm1, inm2, inm3, neg-shared-a, neg-shared-b

ti,filter-resistor-ohms

int

On-chip series filter resistor at PGA_OUT pin (PGACTL.FILT_RES_SEL).
0 disables the filtered output path; it does not select a zero-ohm bypass.
Connect an external capacitor to PGA_OUT for an RC low-pass filter with
cutoff 1 / (2 * pi * R * C), so the value depends on the application.
Minimum values per gain setting (from TRM Table 23-6):
  G=1..4: 50 ohm, G=8..16: 100 ohm, G=32: 200 ohm, G=64: 400 ohm.
Gain changes that require a higher resistance are rejected.

Default value: 0

Legal values: 0, 50, 100, 200, 400, 800

ti,output-to-pin

boolean

Route the PGA output to the PGA_OUT package pin (PGACTL.PGA_OUTENABLE),
through the filter resistor selected by ti,filter-resistor-ohms. Without
a filter resistor the driver also closes the internal feedback path
(PGACTL.PGA_OUTEN_INTGAIN), so the gain is kept. The unfiltered
PGA_OUT_INT signal for the ADC and CMPSS is always available.

ti,chop-mode

string

Chopping mode (MUXSEL.PGA_CHOP[1:0]).
disabled: no chopping (default).
adc-soc: select ADC-assisted chopping when using the corresponding ADC.
  The acquisition sequence must account for the alternating chop phases.

Default value: disabled

Legal values: disabled, adc-soc

ti,feedback-on-pin

boolean

Connect PGA_INM0 and the inverting input together (MUXSEL.PGA_FBONPIN=1).
Used in non-inverting mode for single-pole low-pass filtering via an
external capacitor across the feedback loop.

functional-mode

string

Selects opamp functional mode.

a) differential mode

- Signals applied to both inputs
- Amplifies the difference between two input signals
- Common-mode signals are rejected
- Used in instrumentation and noise rejection
- Vout = (Rf/Rin) * (Vin2 - Vin1), where Rf is the feedback resistor
  and Rin is the input resistor, with gain (Rf/Rin)

         Rin        Rf
Vin1 --/\/\/\--*--/\/\/\-----
               |            |
               |     |\     |
               ------|- \   |
                     |   >--*-- Vout
               ------|+ /
               |     |/
               |
Vin2 --/\/\/\--*--/\/\/\-----
         Rin        Rf      |
                           GND

b) inverting mode

- Input signal applied to inverting (-) terminal
- Non-inverting (+) terminal connected to ground
- Feedback resistor connects output to inverting input
- Output is 180° out of phase with input
- Vout = (-Rf/Rin) * Vin, where Rf is the feedback resistor
  and Rin is the input resistor, s.t. gain is (-Rf/Rin)

        Rin        Rf
Vin --/\/\/\--*--/\/\/\-----
              |            |
              |     |\     |
              ------|- \   |
                    |   >--*-- Vout
              ------|+ /
              |     |/
            GND

c) non_inverting mode

- Input signal applied to non-inverting (+) terminal
- Inverting (-) terminal connected to feedback network
- Output is in phase with input
- Vout = (1 + (Rf/Rin)) * Vin, where Rf is the feedback resistor
  and Rin is the input resistor, s.t. gain is (1 + (Rf/Rin))

      Rin        Rf
 |--/\/\/\--*--/\/\/\-----
 |          |            |
GND         |     |\     |
            ------|- \   |
                  |   >--*-- Vout
        Vin ------|+ /
                  |/

d) follower mode (voltage follower or buffer)

- Special case of non-inverting amplifier
- Vout = 1 * Vin, s.t. gain is 1
- Direct feedback from output to inverting input
- Very high input impedance, very low output impedance
- Used for impedance matching

    --------------
    |            |
    |     |\     |
    ------|- \   |
          |   >--*-- Vout
Vin ------|+ /
          |/

e) standalone mode

- The opamp mode is defined by external circuitry

          |\
Vin- -----|- \
          |   >---- Vout
Vin+ -----|+ /
          |/

References:
  - https://www.electronics-tutorials.ws/category/opamp

This property is required.

Legal values: differential, inverting, non_inverting, follower, standalone

programmable-gain

string-array

If the OPAMP supports programmable gain, then the gain of
the opamp can be changed dynamically at runtime. The gain
value needs to be one of the enumerations above.
Gain selection:
- OPAMP_GAIN_1_7  : x 1/7
- OPAMP_GAIN_1_3  : x 1/3
- OPAMP_GAIN_1    : x 1
- OPAMP_GAIN_5_3  : x 5/3
- OPAMP_GAIN_2    : x 2
- OPAMP_GAIN_11_5 : x 11/5
- OPAMP_GAIN_3    : x 3
- OPAMP_GAIN_4    : x 4
- OPAMP_GAIN_13_3 : x 13/3
- OPAMP_GAIN_7    : x 7
- OPAMP_GAIN_8    : x 8
- OPAMP_GAIN_15   : x 15
- OPAMP_GAIN_16   : x 16
- OPAMP_GAIN_31   : x 31
- OPAMP_GAIN_32   : x 32
- OPAMP_GAIN_33   : x 33
- OPAMP_GAIN_63   : x 63
- OPAMP_GAIN_64   : x 64

Legal values: OPAMP_GAIN_1_7, OPAMP_GAIN_1_3, OPAMP_GAIN_1, OPAMP_GAIN_5_3, OPAMP_GAIN_2, OPAMP_GAIN_11_5, OPAMP_GAIN_3, OPAMP_GAIN_4, OPAMP_GAIN_13_3, OPAMP_GAIN_7, OPAMP_GAIN_8, OPAMP_GAIN_15, OPAMP_GAIN_16, OPAMP_GAIN_31, OPAMP_GAIN_32, OPAMP_GAIN_33, OPAMP_GAIN_63, OPAMP_GAIN_64

pinctrl-0

phandles

Pin configuration/s for the first state. Content is specific to the
selected pin controller driver implementation.

pinctrl-1

phandles

Pin configuration/s for the second state. See pinctrl-0.

pinctrl-2

phandles

Pin configuration/s for the third state. See pinctrl-0.

pinctrl-3

phandles

Pin configuration/s for the fourth state. See pinctrl-0.

pinctrl-4

phandles

Pin configuration/s for the fifth state. See pinctrl-0.

pinctrl-names

string-array

Names for the provided states. The number of names needs to match the
number of states.