summaryrefslogtreecommitdiffstats
path: root/meta-agl-refhw-gen3/recipes-kernel/linux/files/0001-Create-r8a7795-USB-OVC-pin-groups.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-agl-refhw-gen3/recipes-kernel/linux/files/0001-Create-r8a7795-USB-OVC-pin-groups.patch')
-rw-r--r--meta-agl-refhw-gen3/recipes-kernel/linux/files/0001-Create-r8a7795-USB-OVC-pin-groups.patch416
1 files changed, 416 insertions, 0 deletions
diff --git a/meta-agl-refhw-gen3/recipes-kernel/linux/files/0001-Create-r8a7795-USB-OVC-pin-groups.patch b/meta-agl-refhw-gen3/recipes-kernel/linux/files/0001-Create-r8a7795-USB-OVC-pin-groups.patch
new file mode 100644
index 0000000..c2a63b5
--- /dev/null
+++ b/meta-agl-refhw-gen3/recipes-kernel/linux/files/0001-Create-r8a7795-USB-OVC-pin-groups.patch
@@ -0,0 +1,416 @@
+From 931e6487ca7642f94721a07c1e7da2152bda3baf Mon Sep 17 00:00:00 2001
+From: Scott Murray <scott.murray@konsulko.com>
+Date: Tue, 21 Sep 2021 15:31:36 -0400
+Subject: [PATCH 1/4] Create r8a7795 USB OVC pin groups
+
+Split the r8a7795 USB pin groups to create separate groups for the
+OVC pins. This is required for the AGL reference hardware boards,
+which use some of the OVC pins in other pinmux modes.
+
+Upstream-Status: pending
+
+Signed-off-by: Scott Murray <scott.murray@konsulko.com>
+Signed-off-by: Raquel Medina <raquel.medina@konsulko.com>
+---
+ .../boot/dts/renesas/r8a77950-salvator-x.dts | 2 +-
+ .../boot/dts/renesas/r8a77951-salvator-x.dts | 2 +-
+ .../boot/dts/renesas/r8a77951-salvator-xs.dts | 4 +-
+ .../boot/dts/renesas/salvator-common.dtsi | 6 +-
+ arch/arm64/boot/dts/renesas/ulcb-kf.dtsi | 2 +-
+ arch/arm64/boot/dts/renesas/ulcb.dtsi | 2 +-
+ drivers/pinctrl/renesas/pfc-r8a77950.c | 75 +++++++++++++++----
+ drivers/pinctrl/renesas/pfc-r8a77951.c | 75 +++++++++++++++----
+ 8 files changed, 129 insertions(+), 39 deletions(-)
+
+diff --git a/arch/arm64/boot/dts/renesas/r8a77950-salvator-x.dts b/arch/arm64/boot/dts/renesas/r8a77950-salvator-x.dts
+index 1a1f2324dd6e..776082563a30 100644
+--- a/arch/arm64/boot/dts/renesas/r8a77950-salvator-x.dts
++++ b/arch/arm64/boot/dts/renesas/r8a77950-salvator-x.dts
+@@ -143,7 +143,7 @@ &ohci2 {
+
+ &pfc {
+ usb2_pins: usb2 {
+- groups = "usb2";
++ groups = "usb2", "usb2_ovc";
+ function = "usb2";
+ };
+ };
+diff --git a/arch/arm64/boot/dts/renesas/r8a77951-salvator-x.dts b/arch/arm64/boot/dts/renesas/r8a77951-salvator-x.dts
+index ade33b2ee741..466b8b4f4fef 100644
+--- a/arch/arm64/boot/dts/renesas/r8a77951-salvator-x.dts
++++ b/arch/arm64/boot/dts/renesas/r8a77951-salvator-x.dts
+@@ -143,7 +143,7 @@ &ohci2 {
+
+ &pfc {
+ usb2_pins: usb2 {
+- groups = "usb2";
++ groups = "usb2", "usb2_ovc";
+ function = "usb2";
+ };
+ };
+diff --git a/arch/arm64/boot/dts/renesas/r8a77951-salvator-xs.dts b/arch/arm64/boot/dts/renesas/r8a77951-salvator-xs.dts
+index aa1ff538a4b6..fb1f286e2cd2 100644
+--- a/arch/arm64/boot/dts/renesas/r8a77951-salvator-xs.dts
++++ b/arch/arm64/boot/dts/renesas/r8a77951-salvator-xs.dts
+@@ -167,7 +167,7 @@ pcie-sata-switch-hog {
+
+ &pfc {
+ usb2_pins: usb2 {
+- groups = "usb2";
++ groups = "usb2", "usb2_ovc";
+ function = "usb2";
+ };
+
+@@ -184,7 +184,7 @@ usb2_pins: usb2 {
+ * - Connect GP6_{04,21} to ADV7842.
+ */
+ usb2_ch3_pins: usb2_ch3 {
+- groups = "usb2_ch3";
++ groups = "usb2_ch3", "usb2_ch3_ovc";
+ function = "usb2_ch3";
+ };
+ };
+diff --git a/arch/arm64/boot/dts/renesas/salvator-common.dtsi b/arch/arm64/boot/dts/renesas/salvator-common.dtsi
+index 3cc16111ede3..f26902f8ae9a 100644
+--- a/arch/arm64/boot/dts/renesas/salvator-common.dtsi
++++ b/arch/arm64/boot/dts/renesas/salvator-common.dtsi
+@@ -773,13 +773,13 @@ sound_clk_pins: sound_clk {
+ };
+
+ usb0_pins: usb0 {
+- groups = "usb0";
++ groups = "usb0", "usb0_ovc";
+ function = "usb0";
+ };
+
+ usb1_pins: usb1 {
+ mux {
+- groups = "usb1";
++ groups = "usb1", "usb1_ovc";
+ function = "usb1";
+ };
+
+@@ -795,7 +795,7 @@ pwen {
+ };
+
+ usb30_pins: usb30 {
+- groups = "usb30";
++ groups = "usb30", "usb30_ovc";
+ function = "usb30";
+ };
+ };
+diff --git a/arch/arm64/boot/dts/renesas/ulcb-kf.dtsi b/arch/arm64/boot/dts/renesas/ulcb-kf.dtsi
+index 18867a494f85..6a74f21948da 100644
+--- a/arch/arm64/boot/dts/renesas/ulcb-kf.dtsi
++++ b/arch/arm64/boot/dts/renesas/ulcb-kf.dtsi
+@@ -1008,7 +1008,7 @@ sound_pcm_pins: sound-pcm {
+ };
+
+ usb0_pins: usb0 {
+- groups = "usb0";
++ groups = "usb0", "usb0_ovc";
+ function = "usb0";
+ };
+
+diff --git a/arch/arm64/boot/dts/renesas/ulcb.dtsi b/arch/arm64/boot/dts/renesas/ulcb.dtsi
+index cf1ec42a662b..ad0f04d9ee67 100644
+--- a/arch/arm64/boot/dts/renesas/ulcb.dtsi
++++ b/arch/arm64/boot/dts/renesas/ulcb.dtsi
+@@ -376,7 +376,7 @@ sound_clk_pins: sound-clk {
+ };
+
+ usb1_pins: usb1 {
+- groups = "usb1";
++ groups = "usb1", "usb1_ovc";
+ function = "usb1";
+ };
+ };
+diff --git a/drivers/pinctrl/renesas/pfc-r8a77950.c b/drivers/pinctrl/renesas/pfc-r8a77950.c
+index fd884a0a3206..6d899897b3d2 100644
+--- a/drivers/pinctrl/renesas/pfc-r8a77950.c
++++ b/drivers/pinctrl/renesas/pfc-r8a77950.c
+@@ -3841,44 +3841,79 @@ static const unsigned int tpu_to3_mux[] = {
+
+ /* - USB0 ------------------------------------------------------------------- */
+ static const unsigned int usb0_pins[] = {
+- /* PWEN, OVC */
+- RCAR_GP_PIN(6, 24), RCAR_GP_PIN(6, 25),
++ /* PWEN */
++ RCAR_GP_PIN(6, 24),
+ };
+ static const unsigned int usb0_mux[] = {
+- USB0_PWEN_MARK, USB0_OVC_MARK,
++ USB0_PWEN_MARK,
++};
++static const unsigned int usb0_ovc_pins[] = {
++ /* OVC */
++ RCAR_GP_PIN(6, 25),
++};
++static const unsigned int usb0_ovc_mux[] = {
++ USB0_OVC_MARK,
+ };
+ /* - USB1 ------------------------------------------------------------------- */
+ static const unsigned int usb1_pins[] = {
+- /* PWEN, OVC */
+- RCAR_GP_PIN(6, 26), RCAR_GP_PIN(6, 27),
++ /* PWEN */
++ RCAR_GP_PIN(6, 26),
+ };
+ static const unsigned int usb1_mux[] = {
+- USB1_PWEN_MARK, USB1_OVC_MARK,
++ USB1_PWEN_MARK,
++};
++static const unsigned int usb1_ovc_pins[] = {
++ /* OVC */
++ RCAR_GP_PIN(6, 27),
++};
++static const unsigned int usb1_ovc_mux[] = {
++ USB1_OVC_MARK,
+ };
+ /* - USB2 ------------------------------------------------------------------- */
+ static const unsigned int usb2_pins[] = {
+- /* PWEN, OVC */
+- RCAR_GP_PIN(6, 14), RCAR_GP_PIN(6, 15),
++ /* PWEN */
++ RCAR_GP_PIN(6, 14),
+ };
+ static const unsigned int usb2_mux[] = {
+- USB2_PWEN_MARK, USB2_OVC_MARK,
++ USB2_PWEN_MARK,
++};
++static const unsigned int usb2_ovc_pins[] = {
++ /* OVC */
++ RCAR_GP_PIN(6, 15),
++};
++static const unsigned int usb2_ovc_mux[] = {
++ USB2_OVC_MARK,
+ };
+
+ /* - USB30 ------------------------------------------------------------------ */
+ static const unsigned int usb30_pins[] = {
+- /* PWEN, OVC */
+- RCAR_GP_PIN(6, 28), RCAR_GP_PIN(6, 29),
++ /* PWEN */
++ RCAR_GP_PIN(6, 28),
+ };
+ static const unsigned int usb30_mux[] = {
+- USB30_PWEN_MARK, USB30_OVC_MARK,
++ USB30_PWEN_MARK,
++};
++static const unsigned int usb30_ovc_pins[] = {
++ /* OVC */
++ RCAR_GP_PIN(6, 29),
++};
++static const unsigned int usb30_ovc_mux[] = {
++ USB30_OVC_MARK,
+ };
+ /* - USB31 ------------------------------------------------------------------ */
+ static const unsigned int usb31_pins[] = {
+- /* PWEN, OVC */
+- RCAR_GP_PIN(6, 30), RCAR_GP_PIN(6, 31),
++ /* PWEN */
++ RCAR_GP_PIN(6, 30),
+ };
+ static const unsigned int usb31_mux[] = {
+- USB31_PWEN_MARK, USB31_OVC_MARK,
++ USB31_PWEN_MARK,
++};
++static const unsigned int usb31_ovc_pins[] = {
++ /* OVC */
++ RCAR_GP_PIN(6, 31),
++};
++static const unsigned int usb31_ovc_mux[] = {
++ USB31_OVC_MARK,
+ };
+
+ static const unsigned int vin4_data18_a_pins[] = {
+@@ -4434,10 +4469,15 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {
+ SH_PFC_PIN_GROUP(tpu_to2),
+ SH_PFC_PIN_GROUP(tpu_to3),
+ SH_PFC_PIN_GROUP(usb0),
++ SH_PFC_PIN_GROUP(usb0_ovc),
+ SH_PFC_PIN_GROUP(usb1),
++ SH_PFC_PIN_GROUP(usb1_ovc),
+ SH_PFC_PIN_GROUP(usb2),
++ SH_PFC_PIN_GROUP(usb2_ovc),
+ SH_PFC_PIN_GROUP(usb30),
++ SH_PFC_PIN_GROUP(usb30_ovc),
+ SH_PFC_PIN_GROUP(usb31),
++ SH_PFC_PIN_GROUP(usb31_ovc),
+ VIN_DATA_PIN_GROUP(vin4_data, 8, _a),
+ VIN_DATA_PIN_GROUP(vin4_data, 16, _a),
+ SH_PFC_PIN_GROUP(vin4_data18_a),
+@@ -4936,22 +4976,27 @@ static const char * const tpu_groups[] = {
+
+ static const char * const usb0_groups[] = {
+ "usb0",
++ "usb0_ovc",
+ };
+
+ static const char * const usb1_groups[] = {
+ "usb1",
++ "usb1_ovc",
+ };
+
+ static const char * const usb2_groups[] = {
+ "usb2",
++ "usb2_ovc",
+ };
+
+ static const char * const usb30_groups[] = {
+ "usb30",
++ "usb30_ovc",
+ };
+
+ static const char * const usb31_groups[] = {
+ "usb31",
++ "usb31_ovc",
+ };
+
+ static const char * const vin4_groups[] = {
+diff --git a/drivers/pinctrl/renesas/pfc-r8a77951.c b/drivers/pinctrl/renesas/pfc-r8a77951.c
+index 36436907e215..523a2d7e5e48 100644
+--- a/drivers/pinctrl/renesas/pfc-r8a77951.c
++++ b/drivers/pinctrl/renesas/pfc-r8a77951.c
+@@ -3985,44 +3985,79 @@ static const unsigned int tpu_to3_mux[] = {
+
+ /* - USB0 ------------------------------------------------------------------- */
+ static const unsigned int usb0_pins[] = {
+- /* PWEN, OVC */
+- RCAR_GP_PIN(6, 24), RCAR_GP_PIN(6, 25),
++ /* PWEN */
++ RCAR_GP_PIN(6, 24),
+ };
+ static const unsigned int usb0_mux[] = {
+- USB0_PWEN_MARK, USB0_OVC_MARK,
++ USB0_PWEN_MARK,
++};
++static const unsigned int usb0_ovc_pins[] = {
++ /* OVC */
++ RCAR_GP_PIN(6, 25),
++};
++static const unsigned int usb0_ovc_mux[] = {
++ USB0_OVC_MARK,
+ };
+ /* - USB1 ------------------------------------------------------------------- */
+ static const unsigned int usb1_pins[] = {
+- /* PWEN, OVC */
+- RCAR_GP_PIN(6, 26), RCAR_GP_PIN(6, 27),
++ /* PWEN */
++ RCAR_GP_PIN(6, 26),
+ };
+ static const unsigned int usb1_mux[] = {
+- USB1_PWEN_MARK, USB1_OVC_MARK,
++ USB1_PWEN_MARK,
++};
++static const unsigned int usb1_ovc_pins[] = {
++ /* OVC */
++ RCAR_GP_PIN(6, 27),
++};
++static const unsigned int usb1_ovc_mux[] = {
++ USB1_OVC_MARK,
+ };
+ /* - USB2 ------------------------------------------------------------------- */
+ static const unsigned int usb2_pins[] = {
+- /* PWEN, OVC */
+- RCAR_GP_PIN(6, 14), RCAR_GP_PIN(6, 15),
++ /* PWEN */
++ RCAR_GP_PIN(6, 14),
+ };
+ static const unsigned int usb2_mux[] = {
+- USB2_PWEN_MARK, USB2_OVC_MARK,
++ USB2_PWEN_MARK,
++};
++static const unsigned int usb2_ovc_pins[] = {
++ /* OVC */
++ RCAR_GP_PIN(6, 15),
++};
++static const unsigned int usb2_ovc_mux[] = {
++ USB2_OVC_MARK,
+ };
+ /* - USB2_CH3 --------------------------------------------------------------- */
+ static const unsigned int usb2_ch3_pins[] = {
+- /* PWEN, OVC */
+- RCAR_GP_PIN(6, 30), RCAR_GP_PIN(6, 31),
++ /* PWEN */
++ RCAR_GP_PIN(6, 30),
+ };
+ static const unsigned int usb2_ch3_mux[] = {
+- USB2_CH3_PWEN_MARK, USB2_CH3_OVC_MARK,
++ USB2_CH3_PWEN_MARK,
++};
++static const unsigned int usb2_ch3_ovc_pins[] = {
++ /* OVC */
++ RCAR_GP_PIN(6, 31),
++};
++static const unsigned int usb2_ch3_ovc_mux[] = {
++ USB2_CH3_OVC_MARK,
+ };
+
+ /* - USB30 ------------------------------------------------------------------ */
+ static const unsigned int usb30_pins[] = {
+- /* PWEN, OVC */
+- RCAR_GP_PIN(6, 28), RCAR_GP_PIN(6, 29),
++ /* PWEN */
++ RCAR_GP_PIN(6, 28),
+ };
+ static const unsigned int usb30_mux[] = {
+- USB30_PWEN_MARK, USB30_OVC_MARK,
++ USB30_PWEN_MARK,
++};
++static const unsigned int usb30_ovc_pins[] = {
++ /* OVC */
++ RCAR_GP_PIN(6, 29),
++};
++static const unsigned int usb30_ovc_mux[] = {
++ USB30_OVC_MARK,
+ };
+
+ /* - VIN4 ------------------------------------------------------------------- */
+@@ -4545,10 +4580,15 @@ static const struct {
+ SH_PFC_PIN_GROUP(tpu_to2),
+ SH_PFC_PIN_GROUP(tpu_to3),
+ SH_PFC_PIN_GROUP(usb0),
++ SH_PFC_PIN_GROUP(usb0_ovc),
+ SH_PFC_PIN_GROUP(usb1),
++ SH_PFC_PIN_GROUP(usb1_ovc),
+ SH_PFC_PIN_GROUP(usb2),
++ SH_PFC_PIN_GROUP(usb2_ovc),
+ SH_PFC_PIN_GROUP(usb2_ch3),
++ SH_PFC_PIN_GROUP(usb2_ch3_ovc),
+ SH_PFC_PIN_GROUP(usb30),
++ SH_PFC_PIN_GROUP(usb30_ovc),
+ VIN_DATA_PIN_GROUP(vin4_data, 8, _a),
+ VIN_DATA_PIN_GROUP(vin4_data, 10, _a),
+ VIN_DATA_PIN_GROUP(vin4_data, 12, _a),
+@@ -5103,22 +5143,27 @@ static const char * const tpu_groups[] = {
+
+ static const char * const usb0_groups[] = {
+ "usb0",
++ "usb0_ovc",
+ };
+
+ static const char * const usb1_groups[] = {
+ "usb1",
++ "usb1_ovc",
+ };
+
+ static const char * const usb2_groups[] = {
+ "usb2",
++ "usb2_ovc",
+ };
+
+ static const char * const usb2_ch3_groups[] = {
+ "usb2_ch3",
++ "usb2_ch3_ovc",
+ };
+
+ static const char * const usb30_groups[] = {
+ "usb30",
++ "usb30_ovc",
+ };
+
+ static const char * const vin4_groups[] = {
+--
+2.31.1
+