• David Wu's avatar
    pinctrl: rockchip: Add iomux-route switching support · bd35b9bf
    David Wu authored
    On the some rockchip SOCS, some things like rk3399 specific uart2 can use
    multiple pins. Somewhere between the pin io-cells and the uart it seems
    to have some sort of switch to decide to which pin to actually route the
    data.
    
    +-------+    +--------+  /- GPIO4_B0 (pinmux 2)
    
    | uart2 | -- | switch | --- GPIO4_C0 (pinmux 2)
    
    +-------+    +--------+  \- GPIO4_C3 (pinmux 2)
    (switch selects one of the 3 pins base on the GRF_SOC_CON7[BIT0, BIT1])
    
    The routing switch is determined by one pin of a specific group to be set
    to its special pinmux function. If the pinmux setting is wrong for that
    pin the ip block won't work correctly anyway.
    Signed-off-by: default avatarDavid Wu <david.wu@rock-chips.com>
    Reviewed-by: default avatarHeiko Stuebner <heiko@sntech.de>
    Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
    bd35b9bf
pinctrl-rockchip.c 79.1 KB