mirror of
https://github.com/torvalds/linux.git
synced 2026-05-28 09:04:39 +02:00
pinctrl: renesas: Updates for v6.11
- Add support for the new RZ/V2H(P) (R9A09G057) Soc, - Miscellaneous fixes and improvements. -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQQ9qaHoIs/1I4cXmEiKwlD9ZEnxcAUCZmwB0AAKCRCKwlD9ZEnx cKIJAQDoO2BVZmaYJvJoiV8mHUdcRqj94pL5GF2tvNb/cKqdwQEA8ceFXJC2zp0L 6yjNrDI29WVHsdcQLTy5dAWYeRgJPAQ= =O4N5 -----END PGP SIGNATURE----- Merge tag 'renesas-pinctrl-for-v6.11-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers into devel pinctrl: renesas: Updates for v6.11 - Add support for the new RZ/V2H(P) (R9A09G057) Soc, - Miscellaneous fixes and improvements. Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
commit
2659f36a56
|
|
@ -26,6 +26,7 @@ properties:
|
|||
- renesas,r9a07g043-pinctrl # RZ/G2UL{Type-1,Type-2} and RZ/Five
|
||||
- renesas,r9a07g044-pinctrl # RZ/G2{L,LC}
|
||||
- renesas,r9a08g045-pinctrl # RZ/G3S
|
||||
- renesas,r9a09g057-pinctrl # RZ/V2H(P)
|
||||
|
||||
- items:
|
||||
- enum:
|
||||
|
|
@ -66,10 +67,14 @@ properties:
|
|||
maxItems: 1
|
||||
|
||||
resets:
|
||||
items:
|
||||
- description: GPIO_RSTN signal
|
||||
- description: GPIO_PORT_RESETN signal
|
||||
- description: GPIO_SPARE_RESETN signal
|
||||
oneOf:
|
||||
- items:
|
||||
- description: GPIO_RSTN signal
|
||||
- description: GPIO_PORT_RESETN signal
|
||||
- description: GPIO_SPARE_RESETN signal
|
||||
- items:
|
||||
- description: PFC main reset
|
||||
- description: Reset for the control register related to WDTUDFCA and WDTUDFFCM pins
|
||||
|
||||
additionalProperties:
|
||||
anyOf:
|
||||
|
|
@ -79,21 +84,6 @@ additionalProperties:
|
|||
- $ref: pincfg-node.yaml#
|
||||
- $ref: pinmux-node.yaml#
|
||||
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
enum:
|
||||
- renesas,r9a08g045-pinctrl
|
||||
then:
|
||||
properties:
|
||||
drive-strength: false
|
||||
output-impedance-ohms: false
|
||||
slew-rate: false
|
||||
else:
|
||||
properties:
|
||||
drive-strength-microamp: false
|
||||
|
||||
description:
|
||||
Pin controller client devices use pin configuration subnodes (children
|
||||
and grandchildren) for desired pin configuration.
|
||||
|
|
@ -126,6 +116,16 @@ additionalProperties:
|
|||
output-high: true
|
||||
output-low: true
|
||||
line-name: true
|
||||
bias-disable: true
|
||||
bias-pull-down: true
|
||||
bias-pull-up: true
|
||||
renesas,output-impedance:
|
||||
description:
|
||||
Output impedance for pins on the RZ/V2H(P) SoC. The value provided by this
|
||||
property corresponds to register bit values that can be set in the PFC_IOLH_mn
|
||||
register, which adjusts the drive strength value and is pin-dependent.
|
||||
$ref: /schemas/types.yaml#/definitions/uint32
|
||||
enum: [0, 1, 2, 3]
|
||||
|
||||
- type: object
|
||||
additionalProperties:
|
||||
|
|
@ -134,6 +134,20 @@ additionalProperties:
|
|||
allOf:
|
||||
- $ref: pinctrl.yaml#
|
||||
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
const: renesas,r9a09g057-pinctrl
|
||||
then:
|
||||
properties:
|
||||
resets:
|
||||
maxItems: 2
|
||||
else:
|
||||
properties:
|
||||
resets:
|
||||
minItems: 3
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
|
|
|
|||
|
|
@ -852,7 +852,6 @@ static const struct gpio_chip rza1_gpiochip_template = {
|
|||
*/
|
||||
static int rza1_dt_node_pin_count(struct device_node *np)
|
||||
{
|
||||
struct device_node *child;
|
||||
struct property *of_pins;
|
||||
unsigned int npins;
|
||||
|
||||
|
|
@ -861,12 +860,10 @@ static int rza1_dt_node_pin_count(struct device_node *np)
|
|||
return of_pins->length / sizeof(u32);
|
||||
|
||||
npins = 0;
|
||||
for_each_child_of_node(np, child) {
|
||||
for_each_child_of_node_scoped(np, child) {
|
||||
of_pins = of_find_property(child, "pinmux", NULL);
|
||||
if (!of_pins) {
|
||||
of_node_put(child);
|
||||
if (!of_pins)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
npins += of_pins->length / sizeof(u32);
|
||||
}
|
||||
|
|
@ -986,7 +983,6 @@ static int rza1_dt_node_to_map(struct pinctrl_dev *pctldev,
|
|||
struct rza1_pinctrl *rza1_pctl = pinctrl_dev_get_drvdata(pctldev);
|
||||
struct rza1_mux_conf *mux_confs, *mux_conf;
|
||||
unsigned int *grpins, *grpin;
|
||||
struct device_node *child;
|
||||
const char *grpname;
|
||||
const char **fngrps;
|
||||
int ret, npins;
|
||||
|
|
@ -1023,13 +1019,11 @@ static int rza1_dt_node_to_map(struct pinctrl_dev *pctldev,
|
|||
|
||||
ret = rza1_parse_pinmux_node(rza1_pctl, np, mux_conf, grpin);
|
||||
if (ret == -ENOENT)
|
||||
for_each_child_of_node(np, child) {
|
||||
for_each_child_of_node_scoped(np, child) {
|
||||
ret = rza1_parse_pinmux_node(rza1_pctl, child, mux_conf,
|
||||
grpin);
|
||||
if (ret < 0) {
|
||||
of_node_put(child);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
}
|
||||
|
||||
grpin += ret;
|
||||
mux_conf += ret;
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -404,7 +404,6 @@ static int rzn1_dt_node_to_map(struct pinctrl_dev *pctldev,
|
|||
struct pinctrl_map **map,
|
||||
unsigned int *num_maps)
|
||||
{
|
||||
struct device_node *child;
|
||||
int ret;
|
||||
|
||||
*map = NULL;
|
||||
|
|
@ -414,12 +413,10 @@ static int rzn1_dt_node_to_map(struct pinctrl_dev *pctldev,
|
|||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
for_each_child_of_node(np, child) {
|
||||
for_each_child_of_node_scoped(np, child) {
|
||||
ret = rzn1_dt_node_to_map_one(pctldev, child, map, num_maps);
|
||||
if (ret < 0) {
|
||||
of_node_put(child);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
@ -740,13 +737,12 @@ static int rzn1_pinctrl_parse_groups(struct device_node *np,
|
|||
|
||||
static int rzn1_pinctrl_count_function_groups(struct device_node *np)
|
||||
{
|
||||
struct device_node *child;
|
||||
int count = 0;
|
||||
|
||||
if (of_property_count_u32_elems(np, RZN1_PINS_PROP) > 0)
|
||||
count++;
|
||||
|
||||
for_each_child_of_node(np, child) {
|
||||
for_each_child_of_node_scoped(np, child) {
|
||||
if (of_property_count_u32_elems(child, RZN1_PINS_PROP) > 0)
|
||||
count++;
|
||||
}
|
||||
|
|
@ -760,7 +756,6 @@ static int rzn1_pinctrl_parse_functions(struct device_node *np,
|
|||
{
|
||||
struct rzn1_pmx_func *func;
|
||||
struct rzn1_pin_group *grp;
|
||||
struct device_node *child;
|
||||
unsigned int i = 0;
|
||||
int ret;
|
||||
|
||||
|
|
@ -793,15 +788,13 @@ static int rzn1_pinctrl_parse_functions(struct device_node *np,
|
|||
ipctl->ngroups++;
|
||||
}
|
||||
|
||||
for_each_child_of_node(np, child) {
|
||||
for_each_child_of_node_scoped(np, child) {
|
||||
func->groups[i] = child->name;
|
||||
grp = &ipctl->groups[ipctl->ngroups];
|
||||
grp->func = func->name;
|
||||
ret = rzn1_pinctrl_parse_groups(child, grp, ipctl);
|
||||
if (ret < 0) {
|
||||
of_node_put(child);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
}
|
||||
i++;
|
||||
ipctl->ngroups++;
|
||||
}
|
||||
|
|
@ -816,7 +809,6 @@ static int rzn1_pinctrl_probe_dt(struct platform_device *pdev,
|
|||
struct rzn1_pinctrl *ipctl)
|
||||
{
|
||||
struct device_node *np = pdev->dev.of_node;
|
||||
struct device_node *child;
|
||||
unsigned int maxgroups = 0;
|
||||
unsigned int i = 0;
|
||||
int nfuncs = 0;
|
||||
|
|
@ -834,7 +826,7 @@ static int rzn1_pinctrl_probe_dt(struct platform_device *pdev,
|
|||
return -ENOMEM;
|
||||
|
||||
ipctl->ngroups = 0;
|
||||
for_each_child_of_node(np, child)
|
||||
for_each_child_of_node_scoped(np, child)
|
||||
maxgroups += rzn1_pinctrl_count_function_groups(child);
|
||||
|
||||
ipctl->groups = devm_kmalloc_array(&pdev->dev,
|
||||
|
|
@ -844,12 +836,10 @@ static int rzn1_pinctrl_probe_dt(struct platform_device *pdev,
|
|||
if (!ipctl->groups)
|
||||
return -ENOMEM;
|
||||
|
||||
for_each_child_of_node(np, child) {
|
||||
for_each_child_of_node_scoped(np, child) {
|
||||
ret = rzn1_pinctrl_parse_functions(child, ipctl, i++);
|
||||
if (ret < 0) {
|
||||
of_node_put(child);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -388,7 +388,6 @@ static int rzv2m_dt_node_to_map(struct pinctrl_dev *pctldev,
|
|||
unsigned int *num_maps)
|
||||
{
|
||||
struct rzv2m_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev);
|
||||
struct device_node *child;
|
||||
unsigned int index;
|
||||
int ret;
|
||||
|
||||
|
|
@ -396,13 +395,11 @@ static int rzv2m_dt_node_to_map(struct pinctrl_dev *pctldev,
|
|||
*num_maps = 0;
|
||||
index = 0;
|
||||
|
||||
for_each_child_of_node(np, child) {
|
||||
for_each_child_of_node_scoped(np, child) {
|
||||
ret = rzv2m_dt_subnode_to_map(pctldev, child, np, map,
|
||||
num_maps, &index);
|
||||
if (ret < 0) {
|
||||
of_node_put(child);
|
||||
if (ret < 0)
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
|
||||
if (*num_maps == 0) {
|
||||
|
|
|
|||
|
|
@ -241,7 +241,6 @@ static int sh_pfc_dt_node_to_map(struct pinctrl_dev *pctldev,
|
|||
{
|
||||
struct sh_pfc_pinctrl *pmx = pinctrl_dev_get_drvdata(pctldev);
|
||||
struct device *dev = pmx->pfc->dev;
|
||||
struct device_node *child;
|
||||
unsigned int index;
|
||||
int ret;
|
||||
|
||||
|
|
@ -249,13 +248,11 @@ static int sh_pfc_dt_node_to_map(struct pinctrl_dev *pctldev,
|
|||
*num_maps = 0;
|
||||
index = 0;
|
||||
|
||||
for_each_child_of_node(np, child) {
|
||||
for_each_child_of_node_scoped(np, child) {
|
||||
ret = sh_pfc_dt_subnode_to_map(pctldev, child, map, num_maps,
|
||||
&index);
|
||||
if (ret < 0) {
|
||||
of_node_put(child);
|
||||
if (ret < 0)
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
|
||||
/* If no mapping has been found in child nodes try the config node. */
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user