Commit ad05d4b4 authored by Linus Walleij's avatar Linus Walleij

Merge tag 'sh-pfc-for-v5.9-tag2' of...

Merge tag 'sh-pfc-for-v5.9-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers into devel

pinctrl: sh-pfc: Updates for v5.9 (take two)

  - Add support for the new RZ/G2H (R8A774E1) SoC,
  - One more conversion of DT bindings to json-schema,
  - Fix RZ/A1 kerneldoc.
parents 3e3f742b 4d0e6267
...@@ -21,6 +21,7 @@ Required Properties: ...@@ -21,6 +21,7 @@ Required Properties:
- "renesas,pfc-r8a774a1": for R8A774A1 (RZ/G2M) compatible pin-controller. - "renesas,pfc-r8a774a1": for R8A774A1 (RZ/G2M) compatible pin-controller.
- "renesas,pfc-r8a774b1": for R8A774B1 (RZ/G2N) compatible pin-controller. - "renesas,pfc-r8a774b1": for R8A774B1 (RZ/G2N) compatible pin-controller.
- "renesas,pfc-r8a774c0": for R8A774C0 (RZ/G2E) compatible pin-controller. - "renesas,pfc-r8a774c0": for R8A774C0 (RZ/G2E) compatible pin-controller.
- "renesas,pfc-r8a774e1": for R8A774E1 (RZ/G2H) compatible pin-controller.
- "renesas,pfc-r8a7778": for R8A7778 (R-Car M1) compatible pin-controller. - "renesas,pfc-r8a7778": for R8A7778 (R-Car M1) compatible pin-controller.
- "renesas,pfc-r8a7779": for R8A7779 (R-Car H1) compatible pin-controller. - "renesas,pfc-r8a7779": for R8A7779 (R-Car H1) compatible pin-controller.
- "renesas,pfc-r8a7790": for R8A7790 (R-Car H2) compatible pin-controller. - "renesas,pfc-r8a7790": for R8A7790 (R-Car H2) compatible pin-controller.
......
Renesas RZ/A2 combined Pin and GPIO controller
The Renesas SoCs of the RZ/A2 series feature a combined Pin and GPIO controller.
Pin multiplexing and GPIO configuration is performed on a per-pin basis.
Each port features up to 8 pins, each of them configurable for GPIO
function (port mode) or in alternate function mode.
Up to 8 different alternate function modes exist for each single pin.
Pin controller node
-------------------
Required properties:
- compatible: shall be:
- "renesas,r7s9210-pinctrl": for RZ/A2M
- reg
Address base and length of the memory area where the pin controller
hardware is mapped to.
- gpio-controller
This pin controller also controls pins as GPIO
- #gpio-cells
Must be 2
- gpio-ranges
Expresses the total number of GPIO ports/pins in this SoC
Example: Pin controller node for RZ/A2M SoC (r7s9210)
pinctrl: pin-controller@fcffe000 {
compatible = "renesas,r7s9210-pinctrl";
reg = <0xfcffe000 0x1000>;
gpio-controller;
#gpio-cells = <2>;
gpio-ranges = <&pinctrl 0 0 176>;
};
Sub-nodes
---------
The child nodes of the pin controller designate pins to be used for
specific peripheral functions or as GPIO.
- Pin multiplexing sub-nodes:
A pin multiplexing sub-node describes how to configure a set of
(or a single) pin in some desired alternate function mode.
The values for the pinmux properties are a combination of port name, pin
number and the desired function index. Use the RZA2_PINMUX macro located
in include/dt-bindings/pinctrl/r7s9210-pinctrl.h to easily define these.
For assigning GPIO pins, use the macro RZA2_PIN also in r7s9210-pinctrl.h
to express the desired port pin.
Required properties:
- pinmux:
integer array representing pin number and pin multiplexing configuration.
When a pin has to be configured in alternate function mode, use this
property to identify the pin by its global index, and provide its
alternate function configuration number along with it.
When multiple pins are required to be configured as part of the same
alternate function they shall be specified as members of the same
argument list of a single "pinmux" property.
Helper macros to ease assembling the pin index from its position
(port where it sits on and pin number) and alternate function identifier
are provided by the pin controller header file at:
<dt-bindings/pinctrl/r7s9210-pinctrl.h>
Integers values in "pinmux" argument list are assembled as:
((PORT * 8 + PIN) | MUX_FUNC << 16)
Example: Board specific pins configuration
&pinctrl {
/* Serial Console */
scif4_pins: serial4 {
pinmux = <RZA2_PINMUX(PORT9, 0, 4)>, /* TxD4 */
<RZA2_PINMUX(PORT9, 1, 4)>; /* RxD4 */
};
};
Example: Assigning a GPIO:
leds {
status = "okay";
compatible = "gpio-leds";
led0 {
/* P6_0 */
gpios = <&pinctrl RZA2_PIN(PORT6, 0) GPIO_ACTIVE_HIGH>;
};
};
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/pinctrl/renesas,rza2-pinctrl.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Renesas RZ/A2 combined Pin and GPIO controller
maintainers:
- Chris Brandt <chris.brandt@renesas.com>
- Geert Uytterhoeven <geert+renesas@glider.be>
description:
The Renesas SoCs of the RZ/A2 series feature a combined Pin and GPIO
controller.
Pin multiplexing and GPIO configuration is performed on a per-pin basis.
Each port features up to 8 pins, each of them configurable for GPIO function
(port mode) or in alternate function mode.
Up to 8 different alternate function modes exist for each single pin.
properties:
compatible:
const: "renesas,r7s9210-pinctrl" # RZ/A2M
reg:
maxItems: 1
gpio-controller: true
'#gpio-cells':
const: 2
description:
The first cell contains the global GPIO port index, constructed using the
RZA2_PIN() helper macro in r7s9210-pinctrl.h.
E.g. "RZA2_PIN(PORT6, 0)" for P6_0.
gpio-ranges:
maxItems: 1
patternProperties:
"^.*$":
if:
type: object
then:
allOf:
- $ref: pincfg-node.yaml#
- $ref: pinmux-node.yaml#
description:
The child nodes of the pin controller designate pins to be used for
specific peripheral functions or as GPIO.
A pin multiplexing sub-node describes how to configure a set of
(or a single) pin in some desired alternate function mode.
The values for the pinmux properties are a combination of port name,
pin number and the desired function index. Use the RZA2_PINMUX macro
located in include/dt-bindings/pinctrl/r7s9210-pinctrl.h to easily
define these.
For assigning GPIO pins, use the macro RZA2_PIN also in
to express the desired port pin.
properties:
phandle: true
pinmux:
description:
Values are constructed from GPIO port number, pin number, and
alternate function configuration number using the RZA2_PINMUX()
helper macro in r7s9210-pinctrl.h.
required:
- pinmux
additionalProperties: false
required:
- compatible
- reg
- gpio-controller
- '#gpio-cells'
- gpio-ranges
additionalProperties: false
examples:
- |
#include <dt-bindings/pinctrl/r7s9210-pinctrl.h>
pinctrl: pin-controller@fcffe000 {
compatible = "renesas,r7s9210-pinctrl";
reg = <0xfcffe000 0x1000>;
gpio-controller;
#gpio-cells = <2>;
gpio-ranges = <&pinctrl 0 0 176>;
/* Serial Console */
scif4_pins: serial4 {
pinmux = <RZA2_PINMUX(PORT9, 0, 4)>, /* TxD4 */
<RZA2_PINMUX(PORT9, 1, 4)>; /* RxD4 */
};
};
...@@ -75,7 +75,7 @@ ...@@ -75,7 +75,7 @@
* RZ/A1 pinmux flags * RZ/A1 pinmux flags
*/ */
/** /*
* rza1_bidir_pin - describe a single pin that needs bidir flag applied. * rza1_bidir_pin - describe a single pin that needs bidir flag applied.
*/ */
struct rza1_bidir_pin { struct rza1_bidir_pin {
...@@ -83,7 +83,7 @@ struct rza1_bidir_pin { ...@@ -83,7 +83,7 @@ struct rza1_bidir_pin {
u8 func: 4; u8 func: 4;
}; };
/** /*
* rza1_bidir_entry - describe a list of pins that needs bidir flag applied. * rza1_bidir_entry - describe a list of pins that needs bidir flag applied.
* Each struct rza1_bidir_entry describes a port. * Each struct rza1_bidir_entry describes a port.
*/ */
...@@ -92,7 +92,7 @@ struct rza1_bidir_entry { ...@@ -92,7 +92,7 @@ struct rza1_bidir_entry {
const struct rza1_bidir_pin *pins; const struct rza1_bidir_pin *pins;
}; };
/** /*
* rza1_swio_pin - describe a single pin that needs swio flag applied. * rza1_swio_pin - describe a single pin that needs swio flag applied.
*/ */
struct rza1_swio_pin { struct rza1_swio_pin {
...@@ -102,7 +102,7 @@ struct rza1_swio_pin { ...@@ -102,7 +102,7 @@ struct rza1_swio_pin {
u16 input: 1; u16 input: 1;
}; };
/** /*
* rza1_swio_entry - describe a list of pins that needs swio flag applied * rza1_swio_entry - describe a list of pins that needs swio flag applied
*/ */
struct rza1_swio_entry { struct rza1_swio_entry {
...@@ -110,7 +110,7 @@ struct rza1_swio_entry { ...@@ -110,7 +110,7 @@ struct rza1_swio_entry {
const struct rza1_swio_pin *pins; const struct rza1_swio_pin *pins;
}; };
/** /*
* rza1_pinmux_conf - group together bidir and swio pinmux flag tables * rza1_pinmux_conf - group together bidir and swio pinmux flag tables
*/ */
struct rza1_pinmux_conf { struct rza1_pinmux_conf {
...@@ -431,7 +431,7 @@ static const struct rza1_pinmux_conf rza1l_pmx_conf = { ...@@ -431,7 +431,7 @@ static const struct rza1_pinmux_conf rza1l_pmx_conf = {
* RZ/A1 types * RZ/A1 types
*/ */
/** /**
* rza1_mux_conf - describes a pin multiplexing operation * struct rza1_mux_conf - describes a pin multiplexing operation
* *
* @id: the pin identifier from 0 to RZA1_NPINS * @id: the pin identifier from 0 to RZA1_NPINS
* @port: the port where pin sits on * @port: the port where pin sits on
...@@ -450,7 +450,7 @@ struct rza1_mux_conf { ...@@ -450,7 +450,7 @@ struct rza1_mux_conf {
}; };
/** /**
* rza1_port - describes a pin port * struct rza1_port - describes a pin port
* *
* This is mostly useful to lock register writes per-bank and not globally. * This is mostly useful to lock register writes per-bank and not globally.
* *
...@@ -467,12 +467,12 @@ struct rza1_port { ...@@ -467,12 +467,12 @@ struct rza1_port {
}; };
/** /**
* rza1_pinctrl - RZ pincontroller device * struct rza1_pinctrl - RZ pincontroller device
* *
* @dev: parent device structure * @dev: parent device structure
* @mutex: protect [pinctrl|pinmux]_generic functions * @mutex: protect [pinctrl|pinmux]_generic functions
* @base: logical address base * @base: logical address base
* @nports: number of pin controller ports * @nport: number of pin controller ports
* @ports: pin controller banks * @ports: pin controller banks
* @pins: pin array for pinctrl core * @pins: pin array for pinctrl core
* @desc: pincontroller desc for pinctrl core * @desc: pincontroller desc for pinctrl core
...@@ -536,7 +536,7 @@ static inline int rza1_pinmux_get_swio(unsigned int port, ...@@ -536,7 +536,7 @@ static inline int rza1_pinmux_get_swio(unsigned int port,
return -ENOENT; return -ENOENT;
} }
/** /*
* rza1_pinmux_get_flags() - return pinmux flags associated to a pin * rza1_pinmux_get_flags() - return pinmux flags associated to a pin
*/ */
static unsigned int rza1_pinmux_get_flags(unsigned int port, unsigned int pin, static unsigned int rza1_pinmux_get_flags(unsigned int port, unsigned int pin,
...@@ -566,7 +566,7 @@ static unsigned int rza1_pinmux_get_flags(unsigned int port, unsigned int pin, ...@@ -566,7 +566,7 @@ static unsigned int rza1_pinmux_get_flags(unsigned int port, unsigned int pin,
* RZ/A1 SoC operations * RZ/A1 SoC operations
*/ */
/** /*
* rza1_set_bit() - un-locked set/clear a single bit in pin configuration * rza1_set_bit() - un-locked set/clear a single bit in pin configuration
* registers * registers
*/ */
...@@ -664,7 +664,7 @@ static inline int rza1_pin_get(struct rza1_port *port, unsigned int pin) ...@@ -664,7 +664,7 @@ static inline int rza1_pin_get(struct rza1_port *port, unsigned int pin)
/** /**
* rza1_pin_mux_single() - configure pin multiplexing on a single pin * rza1_pin_mux_single() - configure pin multiplexing on a single pin
* *
* @pinctrl: RZ/A1 pin controller device * @rza1_pctl: RZ/A1 pin controller device
* @mux_conf: pin multiplexing descriptor * @mux_conf: pin multiplexing descriptor
*/ */
static int rza1_pin_mux_single(struct rza1_pinctrl *rza1_pctl, static int rza1_pin_mux_single(struct rza1_pinctrl *rza1_pctl,
......
...@@ -20,6 +20,7 @@ config PINCTRL_SH_PFC ...@@ -20,6 +20,7 @@ config PINCTRL_SH_PFC
select PINCTRL_PFC_R8A774A1 if ARCH_R8A774A1 select PINCTRL_PFC_R8A774A1 if ARCH_R8A774A1
select PINCTRL_PFC_R8A774B1 if ARCH_R8A774B1 select PINCTRL_PFC_R8A774B1 if ARCH_R8A774B1
select PINCTRL_PFC_R8A774C0 if ARCH_R8A774C0 select PINCTRL_PFC_R8A774C0 if ARCH_R8A774C0
select PINCTRL_PFC_R8A774E1 if ARCH_R8A774E1
select PINCTRL_PFC_R8A7778 if ARCH_R8A7778 select PINCTRL_PFC_R8A7778 if ARCH_R8A7778
select PINCTRL_PFC_R8A7779 if ARCH_R8A7779 select PINCTRL_PFC_R8A7779 if ARCH_R8A7779
select PINCTRL_PFC_R8A7790 if ARCH_R8A7790 select PINCTRL_PFC_R8A7790 if ARCH_R8A7790
...@@ -99,6 +100,9 @@ config PINCTRL_PFC_R8A774B1 ...@@ -99,6 +100,9 @@ config PINCTRL_PFC_R8A774B1
config PINCTRL_PFC_R8A774C0 config PINCTRL_PFC_R8A774C0
bool "RZ/G2E pin control support" if COMPILE_TEST bool "RZ/G2E pin control support" if COMPILE_TEST
config PINCTRL_PFC_R8A774E1
bool "RZ/G2H pin control support" if COMPILE_TEST
config PINCTRL_PFC_R8A7778 config PINCTRL_PFC_R8A7778
bool "R-Car M1A pin control support" if COMPILE_TEST bool "R-Car M1A pin control support" if COMPILE_TEST
......
...@@ -12,6 +12,7 @@ obj-$(CONFIG_PINCTRL_PFC_R8A77470) += pfc-r8a77470.o ...@@ -12,6 +12,7 @@ obj-$(CONFIG_PINCTRL_PFC_R8A77470) += pfc-r8a77470.o
obj-$(CONFIG_PINCTRL_PFC_R8A774A1) += pfc-r8a7796.o obj-$(CONFIG_PINCTRL_PFC_R8A774A1) += pfc-r8a7796.o
obj-$(CONFIG_PINCTRL_PFC_R8A774B1) += pfc-r8a77965.o obj-$(CONFIG_PINCTRL_PFC_R8A774B1) += pfc-r8a77965.o
obj-$(CONFIG_PINCTRL_PFC_R8A774C0) += pfc-r8a77990.o obj-$(CONFIG_PINCTRL_PFC_R8A774C0) += pfc-r8a77990.o
obj-$(CONFIG_PINCTRL_PFC_R8A774E1) += pfc-r8a77951.o
obj-$(CONFIG_PINCTRL_PFC_R8A7778) += pfc-r8a7778.o obj-$(CONFIG_PINCTRL_PFC_R8A7778) += pfc-r8a7778.o
obj-$(CONFIG_PINCTRL_PFC_R8A7779) += pfc-r8a7779.o obj-$(CONFIG_PINCTRL_PFC_R8A7779) += pfc-r8a7779.o
obj-$(CONFIG_PINCTRL_PFC_R8A7790) += pfc-r8a7790.o obj-$(CONFIG_PINCTRL_PFC_R8A7790) += pfc-r8a7790.o
......
...@@ -533,6 +533,12 @@ static const struct of_device_id sh_pfc_of_table[] = { ...@@ -533,6 +533,12 @@ static const struct of_device_id sh_pfc_of_table[] = {
.data = &r8a774c0_pinmux_info, .data = &r8a774c0_pinmux_info,
}, },
#endif #endif
#ifdef CONFIG_PINCTRL_PFC_R8A774E1
{
.compatible = "renesas,pfc-r8a774e1",
.data = &r8a774e1_pinmux_info,
},
#endif
#ifdef CONFIG_PINCTRL_PFC_R8A7778 #ifdef CONFIG_PINCTRL_PFC_R8A7778
{ {
.compatible = "renesas,pfc-r8a7778", .compatible = "renesas,pfc-r8a7778",
......
...@@ -4157,7 +4157,11 @@ static const unsigned int vin5_clk_mux[] = { ...@@ -4157,7 +4157,11 @@ static const unsigned int vin5_clk_mux[] = {
VI5_CLK_MARK, VI5_CLK_MARK,
}; };
static const struct sh_pfc_pin_group pinmux_groups[] = { static const struct {
struct sh_pfc_pin_group common[320];
struct sh_pfc_pin_group automotive[30];
} pinmux_groups = {
.common = {
SH_PFC_PIN_GROUP(audio_clk_a_a), SH_PFC_PIN_GROUP(audio_clk_a_a),
SH_PFC_PIN_GROUP(audio_clk_a_b), SH_PFC_PIN_GROUP(audio_clk_a_b),
SH_PFC_PIN_GROUP(audio_clk_a_c), SH_PFC_PIN_GROUP(audio_clk_a_c),
...@@ -4193,36 +4197,6 @@ static const struct sh_pfc_pin_group pinmux_groups[] = { ...@@ -4193,36 +4197,6 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {
SH_PFC_PIN_GROUP(canfd0_data_a), SH_PFC_PIN_GROUP(canfd0_data_a),
SH_PFC_PIN_GROUP(canfd0_data_b), SH_PFC_PIN_GROUP(canfd0_data_b),
SH_PFC_PIN_GROUP(canfd1_data), SH_PFC_PIN_GROUP(canfd1_data),
SH_PFC_PIN_GROUP(drif0_ctrl_a),
SH_PFC_PIN_GROUP(drif0_data0_a),
SH_PFC_PIN_GROUP(drif0_data1_a),
SH_PFC_PIN_GROUP(drif0_ctrl_b),
SH_PFC_PIN_GROUP(drif0_data0_b),
SH_PFC_PIN_GROUP(drif0_data1_b),
SH_PFC_PIN_GROUP(drif0_ctrl_c),
SH_PFC_PIN_GROUP(drif0_data0_c),
SH_PFC_PIN_GROUP(drif0_data1_c),
SH_PFC_PIN_GROUP(drif1_ctrl_a),
SH_PFC_PIN_GROUP(drif1_data0_a),
SH_PFC_PIN_GROUP(drif1_data1_a),
SH_PFC_PIN_GROUP(drif1_ctrl_b),
SH_PFC_PIN_GROUP(drif1_data0_b),
SH_PFC_PIN_GROUP(drif1_data1_b),
SH_PFC_PIN_GROUP(drif1_ctrl_c),
SH_PFC_PIN_GROUP(drif1_data0_c),
SH_PFC_PIN_GROUP(drif1_data1_c),
SH_PFC_PIN_GROUP(drif2_ctrl_a),
SH_PFC_PIN_GROUP(drif2_data0_a),
SH_PFC_PIN_GROUP(drif2_data1_a),
SH_PFC_PIN_GROUP(drif2_ctrl_b),
SH_PFC_PIN_GROUP(drif2_data0_b),
SH_PFC_PIN_GROUP(drif2_data1_b),
SH_PFC_PIN_GROUP(drif3_ctrl_a),
SH_PFC_PIN_GROUP(drif3_data0_a),
SH_PFC_PIN_GROUP(drif3_data1_a),
SH_PFC_PIN_GROUP(drif3_ctrl_b),
SH_PFC_PIN_GROUP(drif3_data0_b),
SH_PFC_PIN_GROUP(drif3_data1_b),
SH_PFC_PIN_GROUP(du_rgb666), SH_PFC_PIN_GROUP(du_rgb666),
SH_PFC_PIN_GROUP(du_rgb888), SH_PFC_PIN_GROUP(du_rgb888),
SH_PFC_PIN_GROUP(du_clk_out_0), SH_PFC_PIN_GROUP(du_clk_out_0),
...@@ -4508,6 +4482,40 @@ static const struct sh_pfc_pin_group pinmux_groups[] = { ...@@ -4508,6 +4482,40 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {
SH_PFC_PIN_GROUP(vin5_field), SH_PFC_PIN_GROUP(vin5_field),
SH_PFC_PIN_GROUP(vin5_clkenb), SH_PFC_PIN_GROUP(vin5_clkenb),
SH_PFC_PIN_GROUP(vin5_clk), SH_PFC_PIN_GROUP(vin5_clk),
},
.automotive = {
SH_PFC_PIN_GROUP(drif0_ctrl_a),
SH_PFC_PIN_GROUP(drif0_data0_a),
SH_PFC_PIN_GROUP(drif0_data1_a),
SH_PFC_PIN_GROUP(drif0_ctrl_b),
SH_PFC_PIN_GROUP(drif0_data0_b),
SH_PFC_PIN_GROUP(drif0_data1_b),
SH_PFC_PIN_GROUP(drif0_ctrl_c),
SH_PFC_PIN_GROUP(drif0_data0_c),
SH_PFC_PIN_GROUP(drif0_data1_c),
SH_PFC_PIN_GROUP(drif1_ctrl_a),
SH_PFC_PIN_GROUP(drif1_data0_a),
SH_PFC_PIN_GROUP(drif1_data1_a),
SH_PFC_PIN_GROUP(drif1_ctrl_b),
SH_PFC_PIN_GROUP(drif1_data0_b),
SH_PFC_PIN_GROUP(drif1_data1_b),
SH_PFC_PIN_GROUP(drif1_ctrl_c),
SH_PFC_PIN_GROUP(drif1_data0_c),
SH_PFC_PIN_GROUP(drif1_data1_c),
SH_PFC_PIN_GROUP(drif2_ctrl_a),
SH_PFC_PIN_GROUP(drif2_data0_a),
SH_PFC_PIN_GROUP(drif2_data1_a),
SH_PFC_PIN_GROUP(drif2_ctrl_b),
SH_PFC_PIN_GROUP(drif2_data0_b),
SH_PFC_PIN_GROUP(drif2_data1_b),
SH_PFC_PIN_GROUP(drif3_ctrl_a),
SH_PFC_PIN_GROUP(drif3_data0_a),
SH_PFC_PIN_GROUP(drif3_data1_a),
SH_PFC_PIN_GROUP(drif3_ctrl_b),
SH_PFC_PIN_GROUP(drif3_data0_b),
SH_PFC_PIN_GROUP(drif3_data1_b),
}
}; };
static const char * const audio_clk_groups[] = { static const char * const audio_clk_groups[] = {
...@@ -5031,7 +5039,11 @@ static const char * const vin5_groups[] = { ...@@ -5031,7 +5039,11 @@ static const char * const vin5_groups[] = {
"vin5_clk", "vin5_clk",
}; };
static const struct sh_pfc_function pinmux_functions[] = { static const struct {
struct sh_pfc_function common[53];
struct sh_pfc_function automotive[4];
} pinmux_functions = {
.common = {
SH_PFC_FUNCTION(audio_clk), SH_PFC_FUNCTION(audio_clk),
SH_PFC_FUNCTION(avb), SH_PFC_FUNCTION(avb),
SH_PFC_FUNCTION(can0), SH_PFC_FUNCTION(can0),
...@@ -5039,10 +5051,6 @@ static const struct sh_pfc_function pinmux_functions[] = { ...@@ -5039,10 +5051,6 @@ static const struct sh_pfc_function pinmux_functions[] = {
SH_PFC_FUNCTION(can_clk), SH_PFC_FUNCTION(can_clk),
SH_PFC_FUNCTION(canfd0), SH_PFC_FUNCTION(canfd0),
SH_PFC_FUNCTION(canfd1), SH_PFC_FUNCTION(canfd1),
SH_PFC_FUNCTION(drif0),
SH_PFC_FUNCTION(drif1),
SH_PFC_FUNCTION(drif2),
SH_PFC_FUNCTION(drif3),
SH_PFC_FUNCTION(du), SH_PFC_FUNCTION(du),
SH_PFC_FUNCTION(hscif0), SH_PFC_FUNCTION(hscif0),
SH_PFC_FUNCTION(hscif1), SH_PFC_FUNCTION(hscif1),
...@@ -5089,6 +5097,14 @@ static const struct sh_pfc_function pinmux_functions[] = { ...@@ -5089,6 +5097,14 @@ static const struct sh_pfc_function pinmux_functions[] = {
SH_PFC_FUNCTION(usb30), SH_PFC_FUNCTION(usb30),
SH_PFC_FUNCTION(vin4), SH_PFC_FUNCTION(vin4),
SH_PFC_FUNCTION(vin5), SH_PFC_FUNCTION(vin5),
},
.automotive = {
SH_PFC_FUNCTION(drif0),
SH_PFC_FUNCTION(drif1),
SH_PFC_FUNCTION(drif2),
SH_PFC_FUNCTION(drif3),
}
}; };
static const struct pinmux_cfg_reg pinmux_config_regs[] = { static const struct pinmux_cfg_reg pinmux_config_regs[] = {
...@@ -5777,7 +5793,9 @@ static const struct pinmux_drive_reg pinmux_drive_regs[] = { ...@@ -5777,7 +5793,9 @@ static const struct pinmux_drive_reg pinmux_drive_regs[] = {
{ PIN_DU_DOTCLKIN1, 0, 2 }, /* DU_DOTCLKIN1 */ { PIN_DU_DOTCLKIN1, 0, 2 }, /* DU_DOTCLKIN1 */
} }, } },
{ PINMUX_DRIVE_REG("DRVCTRL12", 0xe6060330) { { PINMUX_DRIVE_REG("DRVCTRL12", 0xe6060330) {
#ifdef CONFIG_PINCTRL_PFC_R8A77951
{ PIN_DU_DOTCLKIN2, 28, 2 }, /* DU_DOTCLKIN2 */ { PIN_DU_DOTCLKIN2, 28, 2 }, /* DU_DOTCLKIN2 */
#endif
{ PIN_DU_DOTCLKIN3, 24, 2 }, /* DU_DOTCLKIN3 */ { PIN_DU_DOTCLKIN3, 24, 2 }, /* DU_DOTCLKIN3 */
{ PIN_FSCLKST_N, 20, 2 }, /* FSCLKST# */ { PIN_FSCLKST_N, 20, 2 }, /* FSCLKST# */
{ PIN_TMS, 4, 2 }, /* TMS */ { PIN_TMS, 4, 2 }, /* TMS */
...@@ -5898,8 +5916,8 @@ static const struct pinmux_drive_reg pinmux_drive_regs[] = { ...@@ -5898,8 +5916,8 @@ static const struct pinmux_drive_reg pinmux_drive_regs[] = {
{ RCAR_GP_PIN(6, 27), 20, 3 }, /* USB1_OVC */ { RCAR_GP_PIN(6, 27), 20, 3 }, /* USB1_OVC */
{ RCAR_GP_PIN(6, 28), 16, 3 }, /* USB30_PWEN */ { RCAR_GP_PIN(6, 28), 16, 3 }, /* USB30_PWEN */
{ RCAR_GP_PIN(6, 29), 12, 3 }, /* USB30_OVC */ { RCAR_GP_PIN(6, 29), 12, 3 }, /* USB30_OVC */
{ RCAR_GP_PIN(6, 30), 8, 3 }, /* USB2_CH3_PWEN */ { RCAR_GP_PIN(6, 30), 8, 3 }, /* GP6_30/USB2_CH3_PWEN */
{ RCAR_GP_PIN(6, 31), 4, 3 }, /* USB2_CH3_OVC */ { RCAR_GP_PIN(6, 31), 4, 3 }, /* GP6_31/USB2_CH3_OVC */
} }, } },
{ }, { },
}; };
...@@ -6220,6 +6238,32 @@ static const struct sh_pfc_soc_operations r8a77951_pinmux_ops = { ...@@ -6220,6 +6238,32 @@ static const struct sh_pfc_soc_operations r8a77951_pinmux_ops = {
.set_bias = r8a77951_pinmux_set_bias, .set_bias = r8a77951_pinmux_set_bias,
}; };
#ifdef CONFIG_PINCTRL_PFC_R8A774E1
const struct sh_pfc_soc_info r8a774e1_pinmux_info = {
.name = "r8a774e1_pfc",
.ops = &r8a77951_pinmux_ops,
.unlock_reg = 0xe6060000, /* PMMR */
.function = { PINMUX_FUNCTION_BEGIN, PINMUX_FUNCTION_END },
.pins = pinmux_pins,
.nr_pins = ARRAY_SIZE(pinmux_pins),
.groups = pinmux_groups.common,
.nr_groups = ARRAY_SIZE(pinmux_groups.common),
.functions = pinmux_functions.common,
.nr_functions = ARRAY_SIZE(pinmux_functions.common),
.cfg_regs = pinmux_config_regs,
.drive_regs = pinmux_drive_regs,
.bias_regs = pinmux_bias_regs,
.ioctrl_regs = pinmux_ioctrl_regs,
.pinmux_data = pinmux_data,
.pinmux_data_size = ARRAY_SIZE(pinmux_data),
};
#endif
#ifdef CONFIG_PINCTRL_PFC_R8A77951
const struct sh_pfc_soc_info r8a77951_pinmux_info = { const struct sh_pfc_soc_info r8a77951_pinmux_info = {
.name = "r8a77951_pfc", .name = "r8a77951_pfc",
.ops = &r8a77951_pinmux_ops, .ops = &r8a77951_pinmux_ops,
...@@ -6229,10 +6273,12 @@ const struct sh_pfc_soc_info r8a77951_pinmux_info = { ...@@ -6229,10 +6273,12 @@ const struct sh_pfc_soc_info r8a77951_pinmux_info = {
.pins = pinmux_pins, .pins = pinmux_pins,
.nr_pins = ARRAY_SIZE(pinmux_pins), .nr_pins = ARRAY_SIZE(pinmux_pins),
.groups = pinmux_groups, .groups = pinmux_groups.common,
.nr_groups = ARRAY_SIZE(pinmux_groups), .nr_groups = ARRAY_SIZE(pinmux_groups.common) +
.functions = pinmux_functions, ARRAY_SIZE(pinmux_groups.automotive),
.nr_functions = ARRAY_SIZE(pinmux_functions), .functions = pinmux_functions.common,
.nr_functions = ARRAY_SIZE(pinmux_functions.common) +
ARRAY_SIZE(pinmux_functions.automotive),
.cfg_regs = pinmux_config_regs, .cfg_regs = pinmux_config_regs,
.drive_regs = pinmux_drive_regs, .drive_regs = pinmux_drive_regs,
...@@ -6242,3 +6288,4 @@ const struct sh_pfc_soc_info r8a77951_pinmux_info = { ...@@ -6242,3 +6288,4 @@ const struct sh_pfc_soc_info r8a77951_pinmux_info = {
.pinmux_data = pinmux_data, .pinmux_data = pinmux_data,
.pinmux_data_size = ARRAY_SIZE(pinmux_data), .pinmux_data_size = ARRAY_SIZE(pinmux_data),
}; };
#endif
...@@ -312,6 +312,7 @@ extern const struct sh_pfc_soc_info r8a77470_pinmux_info; ...@@ -312,6 +312,7 @@ extern const struct sh_pfc_soc_info r8a77470_pinmux_info;
extern const struct sh_pfc_soc_info r8a774a1_pinmux_info; extern const struct sh_pfc_soc_info r8a774a1_pinmux_info;
extern const struct sh_pfc_soc_info r8a774b1_pinmux_info; extern const struct sh_pfc_soc_info r8a774b1_pinmux_info;
extern const struct sh_pfc_soc_info r8a774c0_pinmux_info; extern const struct sh_pfc_soc_info r8a774c0_pinmux_info;
extern const struct sh_pfc_soc_info r8a774e1_pinmux_info;
extern const struct sh_pfc_soc_info r8a7778_pinmux_info; extern const struct sh_pfc_soc_info r8a7778_pinmux_info;
extern const struct sh_pfc_soc_info r8a7779_pinmux_info; extern const struct sh_pfc_soc_info r8a7779_pinmux_info;
extern const struct sh_pfc_soc_info r8a7790_pinmux_info; extern const struct sh_pfc_soc_info r8a7790_pinmux_info;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment