Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp1485145rdb; Wed, 6 Dec 2023 23:36:39 -0800 (PST) X-Google-Smtp-Source: AGHT+IFiW+RWM91Nl6yK45DxIdA9c/Koc9AezL0V2MvaMBct3+GFj4HOFyjJOu+pupX3iLp0aAjV X-Received: by 2002:a17:903:1212:b0:1cf:61c8:73e9 with SMTP id l18-20020a170903121200b001cf61c873e9mr2518265plh.50.1701934598840; Wed, 06 Dec 2023 23:36:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701934598; cv=none; d=google.com; s=arc-20160816; b=BkCIE8Euo2zVIFAcvxyrJmCm343A3jpmPVa8cO95Vw0bmmRTmGFfyt8ozoZIBqyBOV jTQ/lBlFEXk6+N9Hn5mAWStbqA4dhAzKBro11HJM6/xirGRA519KwdRI/pG/nRT70nrw veHa5GgX3dPwvabtM45cc3z7fHEhBnhxE78Ptq4OApOuPUVIbEz8J2Kk/rvXWxamjFzB AQU6IuaSpcreLMlHdsPteD6u4nD2R3ZwNcSC8lG5TW1/FmkiCOW4D+L1Vfr89+hJJRaF bOhQNZplD4g4t3+LClBP58xdZ2xBxBRdsp33qucwF80vGhkYGtZCwHtSxdBG6R1NRhCN ZYiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Bx/sdnsKumQx6XdP19I/alVAivyipyzs0ZyhJTZLb5E=; fh=0Q5nThHpcqxhTuYPafxHj+TuRjwsk4lTGXpM+LoLmQc=; b=IMTKAlS9XmUw92N8ulVvdFt/EB3b8dROZpk/YZUpO57PitqZXw8CYs2aqtn6wn2Bcy TEJjGmBYE0kcAAQBUC91oF53LM1gErXUmCZvY14jFJshJTsS3FZt0fyRIqfIMUvKryU6 lOvAZ7zP4caq4qeIR5cQyye8tNKIgdvIEGCMX1CVBqFHfWYLa8BaXSAcG4IWRJ6WfB09 7Uj1sFH7maQDEp16vbNqH7PdN75o5JwYSqoZ2zf0mPfiC87niqeQ46myyzpXpfsSf3nR e05R26T0uLsVwji1AV/bJU/fbeiUJ3vvoBOg2oodfHoWcs1VUMGyxG7CB+UU9H04E58D gdag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@tuxon.dev header.s=google header.b=atIfVdYm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id c19-20020a170902849300b001cc51ee5fb1si642486plo.585.2023.12.06.23.36.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Dec 2023 23:36:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@tuxon.dev header.s=google header.b=atIfVdYm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 6927F80E06B2; Wed, 6 Dec 2023 23:08:37 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377771AbjLGHIU (ORCPT + 99 others); Thu, 7 Dec 2023 02:08:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56762 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377758AbjLGHIH (ORCPT ); Thu, 7 Dec 2023 02:08:07 -0500 Received: from mail-ed1-x52d.google.com (mail-ed1-x52d.google.com [IPv6:2a00:1450:4864:20::52d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CF24010D1 for ; Wed, 6 Dec 2023 23:08:12 -0800 (PST) Received: by mail-ed1-x52d.google.com with SMTP id 4fb4d7f45d1cf-54ca43031d1so526589a12.0 for ; Wed, 06 Dec 2023 23:08:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1701932891; x=1702537691; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Bx/sdnsKumQx6XdP19I/alVAivyipyzs0ZyhJTZLb5E=; b=atIfVdYmxCxfrKWv5XsbU7Ivdwh+kvCNIS4lirqhAAuyJaUKgiTwqlGE6WOVnqhM70 1oXohLQNaVxgtszeqlaPRkudR/+1GKYuemk2/JUrg4iCcnBqtNZOt7RRcT8x6aewP2GV LqW6Uka7FjzWKJIKXzxAyoA3u9q8ZZWNOfM24cKYWIlGhbp3ROoTIAepLu4dg6deEvKi FZWfJi1qmoLE/rWwTwSRaDCPtcWBNQd8TOVO14Wqg8D1gthYg8om73pWxSILGw4hKMS9 z8uCyK4B3BseonkBtoH1jz9NhfaCzTmKftnvLYqWKdY/13w6BbAuwUKOYhQfCDDfN4tQ EE6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701932891; x=1702537691; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Bx/sdnsKumQx6XdP19I/alVAivyipyzs0ZyhJTZLb5E=; b=p3c2Nb8YmzFFIL9VUoDt9nMaWuADVCyeh2wREA+SbnKrwiY+2viFC3CJ5cU7PiznxO AqGFid11HJXznkDj7cipH6TMhfse8ejP0rsSiN22f8cjpVplDYOFshfR8AvcffR+3IHN Ss6GrpjdSKVObsWgBPuolEIgg4/dTSDsaD+DiSoJPeGCIaePpLDwzGyI+5SdnX0V8Yg6 89qUSiqnj0ECbHzYEBxmglDwzdS/i/+YV+Wp5qsccZZAs/hqSnJ5+XY9uBhxS9KzhpOs ZAD5aOBhg8A1Cf0H7tFsIrf/eL2rj/ylzt+sq4Hv2NFM0gILba5udOJzu8HDotKr1k05 DC5Q== X-Gm-Message-State: AOJu0Ywa1Qc1cQ1ssRQ2uFQ4a1Dc1QWpyMCGwXDgxmkAvV+568Ni8vLO 3wur/M/JwqxcJXlNe4ZAqbvXHg== X-Received: by 2002:a05:6402:3185:b0:54c:4837:9035 with SMTP id di5-20020a056402318500b0054c48379035mr1460439edb.45.1701932891279; Wed, 06 Dec 2023 23:08:11 -0800 (PST) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.22]) by smtp.gmail.com with ESMTPSA id b41-20020a509f2c000000b0054cb88a353dsm420818edf.14.2023.12.06.23.08.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Dec 2023 23:08:10 -0800 (PST) From: Claudiu X-Google-Original-From: Claudiu To: s.shtylyov@omp.ru, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, geert+renesas@glider.be, magnus.damm@gmail.com, mturquette@baylibre.com, sboyd@kernel.org, linus.walleij@linaro.org, prabhakar.mahadev-lad.rj@bp.renesas.com, biju.das.jz@bp.renesas.com Cc: linux-renesas-soc@vger.kernel.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, linux-gpio@vger.kernel.org, Claudiu Beznea Subject: [PATCH v2 04/11] pinctrl: renesas: rzg2l: Add pin configuration support for pinmux groups Date: Thu, 7 Dec 2023 09:06:53 +0200 Message-Id: <20231207070700.4156557-5-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231207070700.4156557-1-claudiu.beznea.uj@bp.renesas.com> References: <20231207070700.4156557-1-claudiu.beznea.uj@bp.renesas.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Wed, 06 Dec 2023 23:08:37 -0800 (PST) From: Claudiu Beznea On RZ/G3S different Ethernet pins need to be configured with different settings (e.g., power-source needs to be set, RGMII TXC and TX_CTL pins need output-enable). Commit adjust driver to allow specifying pin configuration for pinmux groups. With this, DT settings like the following are taken into account by driver: eth0_pins: eth0 { tx_ctl { pinmux = ; /* ET0_TX_CTL */ power-source = <1800>; output-enable; drive-strength-microamp = <5200>; }; }; Signed-off-by: Claudiu Beznea Reviewed-by: Geert Uytterhoeven --- Changes in v2: - moved num_configs check under num_pinmux check as suggested - collected Rb tag drivers/pinctrl/renesas/pinctrl-rzg2l.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/drivers/pinctrl/renesas/pinctrl-rzg2l.c b/drivers/pinctrl/renesas/pinctrl-rzg2l.c index 2eb240b731d5..58786455ecf3 100644 --- a/drivers/pinctrl/renesas/pinctrl-rzg2l.c +++ b/drivers/pinctrl/renesas/pinctrl-rzg2l.c @@ -376,8 +376,11 @@ static int rzg2l_dt_subnode_to_map(struct pinctrl_dev *pctldev, goto done; } - if (num_pinmux) + if (num_pinmux) { + if (num_configs) + nmaps += 1; nmaps += 1; + } if (num_pins) nmaps += num_pins; @@ -462,6 +465,16 @@ static int rzg2l_dt_subnode_to_map(struct pinctrl_dev *pctldev, maps[idx].data.mux.function = name; idx++; + if (num_configs) { + ret = rzg2l_map_add_config(&maps[idx], name, + PIN_MAP_TYPE_CONFIGS_GROUP, + configs, num_configs); + if (ret < 0) + goto remove_group; + + idx++; + }; + dev_dbg(pctrl->dev, "Parsed %pOF with %d pins\n", np, num_pinmux); ret = 0; goto done; -- 2.39.2