Hi Jacopo,
On Mon, Aug 20, 2018 at 12:17 PM Jacopo Mondi <[email protected]> wrote:
> From: Takeshi Kihara <[email protected]>
>
> This patch adds VIN{4,5} pins, groups and functions to the R8A77990 SoC.
>
> Signed-off-by: Takeshi Kihara <[email protected]>
> Signed-off-by: Jacopo Mondi <[email protected]>
Thanks for your patch!
> --- a/drivers/pinctrl/sh-pfc/pfc-r8a77990.c
> +++ b/drivers/pinctrl/sh-pfc/pfc-r8a77990.c
> @@ -1982,6 +1982,446 @@ static const unsigned int usb30_id_mux[] = {
> USB3HS0_ID_MARK,
> };
>
> +/* - VIN4
> ------------------------------------------------------------------- */
> +static const unsigned int vin4_data8_a_pins[] = {
> + RCAR_GP_PIN(2, 6), RCAR_GP_PIN(2, 7),
> + RCAR_GP_PIN(2, 8), RCAR_GP_PIN(2, 9),
> + RCAR_GP_PIN(2, 10), RCAR_GP_PIN(2, 11),
> + RCAR_GP_PIN(2, 12), RCAR_GP_PIN(2, 13),
> +};
> +
> +static const unsigned int vin4_data8_a_mux[] = {
> + VI4_DATA0_A_MARK, VI4_DATA1_A_MARK,
> + VI4_DATA2_A_MARK, VI4_DATA3_A_MARK,
> + VI4_DATA4_A_MARK, VI4_DATA5_A_MARK,
> + VI4_DATA6_A_MARK, VI4_DATA7_A_MARK,
> +};
> +
> +static const unsigned int vin4_data10_a_pins[] = {
> + RCAR_GP_PIN(2, 6), RCAR_GP_PIN(2, 7),
> + RCAR_GP_PIN(2, 8), RCAR_GP_PIN(2, 9),
> + RCAR_GP_PIN(2, 10), RCAR_GP_PIN(2, 11),
> + RCAR_GP_PIN(2, 12), RCAR_GP_PIN(2, 13),
> + RCAR_GP_PIN(1, 4), RCAR_GP_PIN(1, 5),
> +};
> +
> +static const unsigned int vin4_data10_a_mux[] = {
> + VI4_DATA0_A_MARK, VI4_DATA1_A_MARK,
> + VI4_DATA2_A_MARK, VI4_DATA3_A_MARK,
> + VI4_DATA4_A_MARK, VI4_DATA5_A_MARK,
> + VI4_DATA6_A_MARK, VI4_DATA7_A_MARK,
> + VI4_DATA8_MARK, VI4_DATA9_MARK,
> +};
Can you please use union vin_data and VIN_DATA_PIN_GROUP(), to reduce
redundancies, cfr. commit 9942a5b52990b8d5 ("pinctrl: sh-pfc: r8a7795:
Deduplicate VIN4 pin definitions")?
Or do you want to do that in a follow-up patch (which means more
review work)?
> +static const unsigned int vin4_data8_sft8_pins[] = {
> + RCAR_GP_PIN(1, 4), RCAR_GP_PIN(1, 5),
> + RCAR_GP_PIN(1, 6), RCAR_GP_PIN(1, 7),
> + RCAR_GP_PIN(1, 3), RCAR_GP_PIN(1, 10),
> + RCAR_GP_PIN(1, 13), RCAR_GP_PIN(1, 14),
> +};
R-Car H3 and M3-W don't have the data8_sft8 groups yet (the BSP has).
IIRC, that's due to rcar-vin not yet supporting that mode. Niklas?
> +static const unsigned int vin5_sync_a_pins[] = {
> + /* HSYNC_N, VSYNC_N */
> + RCAR_GP_PIN(1, 8), RCAR_GP_PIN(1, 9),
> +};
> +
> +static const unsigned int vin5_sync_a_mux[] = {
> + VI5_HSYNC_N_A_MARK, VI5_VSYNC_N_A_MARK,
> +};
> +
> +static const unsigned int vin5_field_a_pins[] = {
> + RCAR_GP_PIN(1, 10),
> +};
> +
> +static const unsigned int vin5_field_a_mux[] = {
> + VI5_FIELD_A_MARK,
> +};
> +
> +static const unsigned int vin5_clkenb_a_pins[] = {
> + RCAR_GP_PIN(0, 1),
> +};
> +
> +static const unsigned int vin5_clkenb_a_mux[] = {
> + VI5_CLKENB_A_MARK,
> +};
"A" groups without "B" groups? Usually we drop the "_A" suffix in that case.
They're actually named like that in hardware user manual rev. 1.00 (and no
update in the errata)?
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds