User:Uli/R-Car PFC Table Review

Jump to: navigation, search

This page describes how to review a Renesas R-Car Gen3 pin control patches that add pin groups and functions for a specific device. The VIN4 device will be used as an example.

Note: Following these instructions requires access to non-public information obtainable only from Renesas under NDA.

Find device in pin mapping spreadsheet

Open the Excel spreadsheet (.xslx file) describing the pin mappings for the SoC in question. Locate all pins that belong to the device under review. (Usually, these pins have a common prefix, like VI4_...)

Verify that all pins are part of a pin group

Each pin should be part of one or more pin multiplexing arrays, commonly named like this: vin4_..._mux[].

Verify that alternative groups of pins are kept apart

Some sets of pins provide alternatives to the default pinout. These pins are marked with one-letter suffixes, such as ..._A, ..._B etc. Pins with one suffix should not be mixed with those of a different suffix, i.e. ..._A pins should not be in a group with ..._B pins.

Verify that pins that are dependent on each other are in the same group

Some pins are not useful if not paired with others, such as the data pins on a parallel data bus. Make sure these pins are collected in one group. For instance, the pins VI4_DATA..._A should be in the same group.

Note, however, that sometimes a subset of dependent pins can provide functionality as well, such as in the case of a variable-width parallel bus. In this case, not all pins have to be present in every group. For instance, the group vin4_data8_a_mux[] contains only the first eight data pins.

Verify that each multiplex array has a corresponding pins array

Each ..._mux[] array needs to have a ..._pins[] array with the same number of elements. Each entry in the pin array contains a GP pin descriptor, such as RCAR_GP_PIN(x, y).

Verify the correctness of the pin mapping

Using the pin mapping spreadsheet, check that each pin named in the multiplex table has a corresponding entry in the pins table specifying the associated GP pin. The number of the GP pin can be found in the spreadsheet on the left side, on the same line as the pin name.

Check that all pin groups are listed in the pinmux group table

The array sh_pfc_pin_group_pinmux_groups[] must have an entry for each pin group previously defined, omitting the ..._mux and ..._pin suffixes. For instance, the VIN4 8-bit data bus group A must have this entry: SH_PFC_PIN_GROUP(vin4_data_8_a)

Check the device's groups array

Each device must have an array of strings with the names of each pin group. For VIN4, this array would be called vin4_groups[].

Check that there is a pinmux function definition

Each device must have an entry in the pinmux_functions array. For VIN4, that entry would be SH_PFC_FUNCTION(vin4).