The pinctrl subsystem is nothing but a way to gather pins (not only GPIO), and pass them to the driver. The pin controller driver is responsible for parsing pin descriptions in the DT and applying their configuration in the chip. The driver usually needs a set of two nested nodes to describe a group of pins configurations. The first node describes the function of the group (what purpose the group will be used for), the second holds the pin's configuration.
How pin groups are assigned in the DT heavily depends on the platform, and thus the pin controller driver. Every pin control state is given an integer ID starting at 0 and contiguous. You can use a name property, which will be mapped on top of IDs, so that the ...