| From 6abda81d300c632161f73f14523952c01c19bad3 Mon Sep 17 00:00:00 2001 |
| From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> |
| Date: Tue, 3 Oct 2017 02:22:51 +0000 |
| Subject: [PATCH 0194/1795] pinctrl: sh-pfc: r8a7795: Add Audio clock pin |
| support |
| |
| Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> |
| Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> |
| (cherry picked from commit 55bfea9fdc05e3559164f3d58777d9a28ec42bc5) |
| Signed-off-by: Simon Horman <horms+renesas@verge.net.au> |
| Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> |
| --- |
| drivers/pinctrl/sh-pfc/pfc-r8a7795.c | 159 +++++++++++++++++++++++++++ |
| 1 file changed, 159 insertions(+) |
| |
| diff --git a/drivers/pinctrl/sh-pfc/pfc-r8a7795.c b/drivers/pinctrl/sh-pfc/pfc-r8a7795.c |
| index 351855b36f69..3363453c4e4e 100644 |
| --- a/drivers/pinctrl/sh-pfc/pfc-r8a7795.c |
| +++ b/drivers/pinctrl/sh-pfc/pfc-r8a7795.c |
| @@ -1572,6 +1572,127 @@ static const struct sh_pfc_pin pinmux_pins[] = { |
| SH_PFC_PIN_NAMED_CFG(ROW_GROUP_A('T'), 30, ASEBRK, CFG_FLAGS), |
| }; |
| |
| +/* - AUDIO CLOCK ------------------------------------------------------------ */ |
| +static const unsigned int audio_clk_a_a_pins[] = { |
| + /* CLK A */ |
| + RCAR_GP_PIN(6, 22), |
| +}; |
| +static const unsigned int audio_clk_a_a_mux[] = { |
| + AUDIO_CLKA_A_MARK, |
| +}; |
| +static const unsigned int audio_clk_a_b_pins[] = { |
| + /* CLK A */ |
| + RCAR_GP_PIN(5, 4), |
| +}; |
| +static const unsigned int audio_clk_a_b_mux[] = { |
| + AUDIO_CLKA_B_MARK, |
| +}; |
| +static const unsigned int audio_clk_a_c_pins[] = { |
| + /* CLK A */ |
| + RCAR_GP_PIN(5, 19), |
| +}; |
| +static const unsigned int audio_clk_a_c_mux[] = { |
| + AUDIO_CLKA_C_MARK, |
| +}; |
| +static const unsigned int audio_clk_b_a_pins[] = { |
| + /* CLK B */ |
| + RCAR_GP_PIN(5, 12), |
| +}; |
| +static const unsigned int audio_clk_b_a_mux[] = { |
| + AUDIO_CLKB_A_MARK, |
| +}; |
| +static const unsigned int audio_clk_b_b_pins[] = { |
| + /* CLK B */ |
| + RCAR_GP_PIN(6, 23), |
| +}; |
| +static const unsigned int audio_clk_b_b_mux[] = { |
| + AUDIO_CLKB_B_MARK, |
| +}; |
| +static const unsigned int audio_clk_c_a_pins[] = { |
| + /* CLK C */ |
| + RCAR_GP_PIN(5, 21), |
| +}; |
| +static const unsigned int audio_clk_c_a_mux[] = { |
| + AUDIO_CLKC_A_MARK, |
| +}; |
| +static const unsigned int audio_clk_c_b_pins[] = { |
| + /* CLK C */ |
| + RCAR_GP_PIN(5, 0), |
| +}; |
| +static const unsigned int audio_clk_c_b_mux[] = { |
| + AUDIO_CLKC_B_MARK, |
| +}; |
| +static const unsigned int audio_clkout_a_pins[] = { |
| + /* CLKOUT */ |
| + RCAR_GP_PIN(5, 18), |
| +}; |
| +static const unsigned int audio_clkout_a_mux[] = { |
| + AUDIO_CLKOUT_A_MARK, |
| +}; |
| +static const unsigned int audio_clkout_b_pins[] = { |
| + /* CLKOUT */ |
| + RCAR_GP_PIN(6, 28), |
| +}; |
| +static const unsigned int audio_clkout_b_mux[] = { |
| + AUDIO_CLKOUT_B_MARK, |
| +}; |
| +static const unsigned int audio_clkout_c_pins[] = { |
| + /* CLKOUT */ |
| + RCAR_GP_PIN(5, 3), |
| +}; |
| +static const unsigned int audio_clkout_c_mux[] = { |
| + AUDIO_CLKOUT_C_MARK, |
| +}; |
| +static const unsigned int audio_clkout_d_pins[] = { |
| + /* CLKOUT */ |
| + RCAR_GP_PIN(5, 21), |
| +}; |
| +static const unsigned int audio_clkout_d_mux[] = { |
| + AUDIO_CLKOUT_D_MARK, |
| +}; |
| +static const unsigned int audio_clkout1_a_pins[] = { |
| + /* CLKOUT1 */ |
| + RCAR_GP_PIN(5, 15), |
| +}; |
| +static const unsigned int audio_clkout1_a_mux[] = { |
| + AUDIO_CLKOUT1_A_MARK, |
| +}; |
| +static const unsigned int audio_clkout1_b_pins[] = { |
| + /* CLKOUT1 */ |
| + RCAR_GP_PIN(6, 29), |
| +}; |
| +static const unsigned int audio_clkout1_b_mux[] = { |
| + AUDIO_CLKOUT1_B_MARK, |
| +}; |
| +static const unsigned int audio_clkout2_a_pins[] = { |
| + /* CLKOUT2 */ |
| + RCAR_GP_PIN(5, 16), |
| +}; |
| +static const unsigned int audio_clkout2_a_mux[] = { |
| + AUDIO_CLKOUT2_A_MARK, |
| +}; |
| +static const unsigned int audio_clkout2_b_pins[] = { |
| + /* CLKOUT2 */ |
| + RCAR_GP_PIN(6, 30), |
| +}; |
| +static const unsigned int audio_clkout2_b_mux[] = { |
| + AUDIO_CLKOUT2_B_MARK, |
| +}; |
| +static const unsigned int audio_clkout3_a_pins[] = { |
| + /* CLKOUT3 */ |
| + RCAR_GP_PIN(5, 19), |
| +}; |
| +static const unsigned int audio_clkout3_a_mux[] = { |
| + AUDIO_CLKOUT3_A_MARK, |
| +}; |
| +static const unsigned int audio_clkout3_b_pins[] = { |
| + /* CLKOUT3 */ |
| + RCAR_GP_PIN(6, 31), |
| +}; |
| +static const unsigned int audio_clkout3_b_mux[] = { |
| + AUDIO_CLKOUT3_B_MARK, |
| +}; |
| + |
| /* - EtherAVB --------------------------------------------------------------- */ |
| static const unsigned int avb_link_pins[] = { |
| /* AVB_LINK */ |
| @@ -3215,6 +3336,23 @@ static const unsigned int usb30_mux[] = { |
| }; |
| |
| static const struct sh_pfc_pin_group pinmux_groups[] = { |
| + SH_PFC_PIN_GROUP(audio_clk_a_a), |
| + SH_PFC_PIN_GROUP(audio_clk_a_b), |
| + SH_PFC_PIN_GROUP(audio_clk_a_c), |
| + SH_PFC_PIN_GROUP(audio_clk_b_a), |
| + SH_PFC_PIN_GROUP(audio_clk_b_b), |
| + SH_PFC_PIN_GROUP(audio_clk_c_a), |
| + SH_PFC_PIN_GROUP(audio_clk_c_b), |
| + SH_PFC_PIN_GROUP(audio_clkout_a), |
| + SH_PFC_PIN_GROUP(audio_clkout_b), |
| + SH_PFC_PIN_GROUP(audio_clkout_c), |
| + SH_PFC_PIN_GROUP(audio_clkout_d), |
| + SH_PFC_PIN_GROUP(audio_clkout1_a), |
| + SH_PFC_PIN_GROUP(audio_clkout1_b), |
| + SH_PFC_PIN_GROUP(audio_clkout2_a), |
| + SH_PFC_PIN_GROUP(audio_clkout2_b), |
| + SH_PFC_PIN_GROUP(audio_clkout3_a), |
| + SH_PFC_PIN_GROUP(audio_clkout3_b), |
| SH_PFC_PIN_GROUP(avb_link), |
| SH_PFC_PIN_GROUP(avb_magic), |
| SH_PFC_PIN_GROUP(avb_phy_int), |
| @@ -3437,6 +3575,26 @@ static const struct sh_pfc_pin_group pinmux_groups[] = { |
| SH_PFC_PIN_GROUP(usb30), |
| }; |
| |
| +static const char * const audio_clk_groups[] = { |
| + "audio_clk_a_a", |
| + "audio_clk_a_b", |
| + "audio_clk_a_c", |
| + "audio_clk_b_a", |
| + "audio_clk_b_b", |
| + "audio_clk_c_a", |
| + "audio_clk_c_b", |
| + "audio_clkout_a", |
| + "audio_clkout_b", |
| + "audio_clkout_c", |
| + "audio_clkout_d", |
| + "audio_clkout1_a", |
| + "audio_clkout1_b", |
| + "audio_clkout2_a", |
| + "audio_clkout2_b", |
| + "audio_clkout3_a", |
| + "audio_clkout3_b", |
| +}; |
| + |
| static const char * const avb_groups[] = { |
| "avb_link", |
| "avb_magic", |
| @@ -3757,6 +3915,7 @@ static const char * const usb30_groups[] = { |
| }; |
| |
| static const struct sh_pfc_function pinmux_functions[] = { |
| + SH_PFC_FUNCTION(audio_clk), |
| SH_PFC_FUNCTION(avb), |
| SH_PFC_FUNCTION(drif0), |
| SH_PFC_FUNCTION(drif1), |
| -- |
| 2.19.0 |
| |