Received: by 2002:ab2:6309:0:b0:1fb:d597:ff75 with SMTP id s9csp334065lqt; Thu, 6 Jun 2024 05:17:39 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWVDs8F1bpxlyRbiVV29R9KcoBboI68CA4dAt8Hc+Y8tYysO5pFId4+C58HbySPfCNvGyWn/wTOfHSV4KfZW3wlODUqeazdkeD5QWoaNw== X-Google-Smtp-Source: AGHT+IFkUrua7Nj94B6o1uPsJAMPn5hRW4sK4AD3kCDBoX0SSM6kVytZ9ihz5ZXrLZGKpvorP7Dx X-Received: by 2002:ac8:590d:0:b0:440:24f1:6809 with SMTP id d75a77b69052e-4402b5e5f28mr57905711cf.18.1717676259317; Thu, 06 Jun 2024 05:17:39 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717676259; cv=pass; d=google.com; s=arc-20160816; b=urW4qG5F59ZvVlwxmLx821WLjXI4K1FWiY256pYd026H7roFxskoQhl76bIV1KGora llhPqrRrRSDppZFgRvTjIYLA1fqK+91ANG3jYKTZXPF0pcfMOA1HBhz/v+/79IXtRwkW JIxPoUof/2VQfZu/z6f2AVtyJlapicbJec/QJBwptlD7BncZVVOTDAO2cZlRtonf+++s SuFBP/cmlvrdmwi2xgIGe0kNmfK/xihB2MRdeYLBSjfISh3qrivHc+iAyvU3Cjazxy46 LzFBDlo5ZPutzDz0huvRzk+r++AtqRbpQDCFpwI4Me9IZ+PQBQVAwOVuPAO9tuTUIN7J 26ZA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:autocrypt:content-language :from:references:cc:to:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=hp8zTN6GAyn/5QygJpsnE9NfAvQzaWOA5Ikx+6pcgEs=; fh=+Z55K+Ek+qDr35a1rlhKaONn5de2P/SFA/1kAja32lM=; b=GwL40/dqttNicpVstFVdcy9iG3o5KFdudEnE+3J5Je6R6aifdp2WkJlFxwVEgGoUcO 8oPiof/UAGYI25kg03Q5uInNp5mWT11kD6pq2JofocaUXATRnnJJ5JKqXVtPwQp9Ln7F LvT6FSN/Ox3qBXlv2M9YU6Kwq/7ga2qiWEgv+2vWAS/VmV1+V2lb35uRiB/Fnne3nsqe yrU/aXeGnT1VOUMs0srH1E7wEQyIfNoQJbzoporKZOYhFt9jxDE1LTZ+ZrYuLs2xoBwL zwXNBjMW47JJmo7MHQLfkq032atGYKIRfnzhjm5rQLA2vAzQhQROF5wyOKC6BxKHMQGh LVqw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=outQRGy2; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-204261-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-204261-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id d75a77b69052e-44038b7a318si15005121cf.695.2024.06.06.05.17.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jun 2024 05:17:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-204261-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=outQRGy2; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-204261-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-204261-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 02A6A1C259DC for ; Thu, 6 Jun 2024 12:17:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F0594195993; Thu, 6 Jun 2024 12:17:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="outQRGy2" Received: from mail-lj1-f182.google.com (mail-lj1-f182.google.com [209.85.208.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2A8B6168C10 for ; Thu, 6 Jun 2024 12:17:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717676222; cv=none; b=VhVRPia9RB+HJQQ0ROgKOSf8Z+RCcX4fsmJVEw7C0j8UseEgvBrAIN6l72qG+Swp9yB4PC1JZ9AG7Qu9FTZkUkwDVNXd3B1FCG+AlzSDoOG0lXANbgOZqvm3RXON2/T3gPCr6AUwsLSOj5L/673xSBb8NtZFvh2/HD0zNYimysA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717676222; c=relaxed/simple; bh=saW5Bm5m3DbYvBF5Mio+quiZabvPeXPkZXZjlsMXATs=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=GqP30p5uldw0Mh9FpE7Ob4nvsfOjH3vMnsXFEXB6B4yybaCIR8s3VXXp+JmcnzuMDzuRzOzNh37yWD+eDFJlgD/yny2L3YQrhC5egk6isJ9tefmL2yANDK/N5veXlo6nsapK4KGtX0pqb0xQWE98Y9XBcoqmwnrX3pZMyfN8cGk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=outQRGy2; arc=none smtp.client-ip=209.85.208.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-lj1-f182.google.com with SMTP id 38308e7fff4ca-2e6f33150bcso8903871fa.2 for ; Thu, 06 Jun 2024 05:16:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717676218; x=1718281018; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:autocrypt:content-language :from:references:cc:to:subject:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=hp8zTN6GAyn/5QygJpsnE9NfAvQzaWOA5Ikx+6pcgEs=; b=outQRGy23O2kFC30Uh1jsE/63VWDF905RL1Dx6v3CEcoxkRbvA6VqMT016N/Z0FcwY ROFl/rfygsv4q29UbBrc76M4KYu2FGRswh9cV2BaoWAndg5kw7GUteL0l5b0oo6mlyWR Hz+t/4ZKJJKqyF7+2E/a9WnQN0PiNRnIc0OJeS9z3IOLNJdcxEw5Q2ybYtNzj4teFQWB QsCUlLnnv90plYAYSXM63lWNpXC8mkPE5b5zzfoYShSA9XLjumWwuHNPonXkF6CtjuA3 2yAAPtbWDsPWqqx1i9jjc56K0H2GHHDMDDmFqYN7TIzIm1RhpDPLzPL4qY4zdj/b5zpS YwPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717676218; x=1718281018; h=content-transfer-encoding:in-reply-to:autocrypt:content-language :from:references:cc:to:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=hp8zTN6GAyn/5QygJpsnE9NfAvQzaWOA5Ikx+6pcgEs=; b=iYy8kLbuw2nrABnXKApNLH2TGoJAEm65eawG4LVn6utEHuuMPF1ON41+lMvQ0D3M9/ MMwH8CfUlY0tdUDIjvsqCpOQzqxPUp9jIXuvgcniEFdVRWfFsBqWGl7RmHHUtPtT2gJb hdm00XUPnPzMfYEpvy7oD3Hf6Eq7G6YPTCZrrarlGtTgs9k0uB9jpeVFvKfAwakmosoG NVq07mRfiKNwvzlOayV6FefzUQf9mbRUXGla2aB8Xppt5kUuR6C9bF9G/aE9qh5ZQ95q 56rnVj5mp2G2dk29aSZqcjIy6ghKxJiUPp3TF3I9dbXLPqLub+eDXRo5gzKYJnm/10C8 nMAg== X-Forwarded-Encrypted: i=1; AJvYcCXAoOVgE1CdWqLZ8rJnauca0T6L+oimTkiib5TpiZXMq5aGvEZ6cPEtTZuW0aDF+OBWGE8R+LtXva6vnY0siObeWF8hGI6U0JzkPH3Q X-Gm-Message-State: AOJu0YxlvqrJ6rZMYM/So8MvG0BAyayHUdWUVTUtrd1zGoQOUT4yjFUd sI8rzzAq1/t8iSpRKnqldkAmHF4q8qF1aab4rnkbwk+eYhnfe2DoCwdKQDAfxYQ= X-Received: by 2002:a2e:6804:0:b0:2d6:dba1:6d37 with SMTP id 38308e7fff4ca-2eac79c3350mr33762401fa.11.1717676218298; Thu, 06 Jun 2024 05:16:58 -0700 (PDT) Received: from [192.168.2.24] ([110.93.11.116]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-35ef5d66d0esm1400028f8f.51.2024.06.06.05.16.56 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 06 Jun 2024 05:16:57 -0700 (PDT) Message-ID: Date: Thu, 6 Jun 2024 14:16:55 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 2/4] net: stmmac: dwc-qos: Add FSD EQoS support To: Swathi K S , 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, richardcochran@gmail.com, alexandre.torgue@foss.st.com, joabreu@synopsys.com, mcoquelin.stm32@gmail.com, alim.akhtar@samsung.com, linux-fsd@tesla.com, pankaj.dubey@samsung.com, ravi.patel@samsung.com Cc: netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, 'Chandrasekar R' , 'Suresh Siddha' References: <20230814112539.70453-1-sriranjani.p@samsung.com> <20230814112539.70453-3-sriranjani.p@samsung.com> <001201d9d00c$5413a9a0$fc3afce0$@samsung.com> <000101dab7f2$1aa41320$4fec3960$@samsung.com> From: Krzysztof Kozlowski Content-Language: en-US Autocrypt: addr=krzysztof.kozlowski@linaro.org; keydata= xsFNBFVDQq4BEAC6KeLOfFsAvFMBsrCrJ2bCalhPv5+KQF2PS2+iwZI8BpRZoV+Bd5kWvN79 cFgcqTTuNHjAvxtUG8pQgGTHAObYs6xeYJtjUH0ZX6ndJ33FJYf5V3yXqqjcZ30FgHzJCFUu JMp7PSyMPzpUXfU12yfcRYVEMQrmplNZssmYhiTeVicuOOypWugZKVLGNm0IweVCaZ/DJDIH gNbpvVwjcKYrx85m9cBVEBUGaQP6AT7qlVCkrf50v8bofSIyVa2xmubbAwwFA1oxoOusjPIE J3iadrwpFvsZjF5uHAKS+7wHLoW9hVzOnLbX6ajk5Hf8Pb1m+VH/E8bPBNNYKkfTtypTDUCj NYcd27tjnXfG+SDs/EXNUAIRefCyvaRG7oRYF3Ec+2R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4I2LPmptPE9Rb9yCTAbSUlzgjiyyjuXhcwM qf3lzsm02y7Ooq+ERVKiJzlvLd9tSe4jRx6Z6LMXhB21fa5DGs/tHAcUF35hSJrvMJzPT/+u /oVmYDFZkbLlqs2XpWaVCo2jv8+iHxZZ9FL7F6AHFzqEFdqGnJQqmEApiRqH6b4jRBOgJ+cY qc+rJggwMQcJL9F+oDm3wX47nr6jIsEB5ZftdybIzpMZ5V9v45lUwmdnMrSzZVgC4jRGXzsU EViBQt2CopXtHtYfPAO5nAkIvKSNp3jmGxZw4aTc5xoAZBLo0OV+Ezo71pg3AYvq0a3/oGRG KQ06ztUMRrj8eVtpImjsWCd0bDWRaaR4vqhCHvAG9iWXZu4qh3ipie2Y0oSJygcZT7H3UZxq fyYKiqEmRuqsvv6dcbblD8ZLkz1EVZL6djImH5zc5x8qpVxlA0A0i23v5QvN00m6G9NFF0Le D2GYIS41Kv4Isx2dEFh+/Q== In-Reply-To: <000101dab7f2$1aa41320$4fec3960$@samsung.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 06/06/2024 11:14, Swathi K S wrote: > > >> -----Original Message----- >> From: Krzysztof Kozlowski [mailto:krzysztof.kozlowski@linaro.org] >> Sent: 18 August 2023 14:57 >> To: Sriranjani P ; 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; richardcochran@gmail.com; >> alexandre.torgue@foss.st.com; joabreu@synopsys.com; >> mcoquelin.stm32@gmail.com; alim.akhtar@samsung.com; linux- >> fsd@tesla.com; pankaj.dubey@samsung.com; swathi.ks@samsung.com; >> ravi.patel@samsung.com >> Cc: netdev@vger.kernel.org; devicetree@vger.kernel.org; linux- >> kernel@vger.kernel.org; linux-samsung-soc@vger.kernel.org; linux-arm- >> kernel@lists.infradead.org; 'Chandrasekar R' ; >> 'Suresh Siddha' >> Subject: Re: [PATCH v3 2/4] net: stmmac: dwc-qos: Add FSD EQoS support >> >> On 16/08/2023 08:38, Sriranjani P wrote: >>> >>> >>>> -----Original Message----- >>>> From: Krzysztof Kozlowski [mailto:krzysztof.kozlowski@linaro.org] >>>> Sent: 15 August 2023 01:21 >>>> To: Sriranjani P ; 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; richardcochran@gmail.com; >>>> alexandre.torgue@foss.st.com; joabreu@synopsys.com; >>>> mcoquelin.stm32@gmail.com; alim.akhtar@samsung.com; linux- >>>> fsd@tesla.com; pankaj.dubey@samsung.com; swathi.ks@samsung.com; >>>> ravi.patel@samsung.com >>>> Cc: netdev@vger.kernel.org; devicetree@vger.kernel.org; linux- >>>> kernel@vger.kernel.org; linux-samsung-soc@vger.kernel.org; linux-arm- >>>> kernel@lists.infradead.org; Chandrasekar R ; >>>> Suresh Siddha >>>> Subject: Re: [PATCH v3 2/4] net: stmmac: dwc-qos: Add FSD EQoS >>>> support >>>> >>>> On 14/08/2023 13:25, Sriranjani P wrote: >>>>> The FSD SoC contains two instance of the Synopsys DWC ethernet QOS >>>>> IP >>>> core. >>>>> The binding that it uses is slightly different from existing ones >>>>> because of the integration (clocks, resets). >>>>> >>>>> For FSD SoC, a mux switch is needed between internal and external >> clocks. >>>>> By default after reset internal clock is used but for receiving >>>>> packets properly, external clock is needed. Mux switch to external >>>>> clock happens only when the external clock is present. >>>>> >>>>> Signed-off-by: Chandrasekar R >>>>> Signed-off-by: Suresh Siddha >>>>> Signed-off-by: Swathi K S >>>>> Signed-off-by: Sriranjani P >>>>> --- >>>> >>>> >>>>> +static int dwc_eqos_setup_rxclock(struct platform_device *pdev, int >>>>> +ins_num) { >>>>> + struct device_node *np = pdev->dev.of_node; >>>>> + struct regmap *syscon; >>>>> + unsigned int reg; >>>>> + >>>>> + if (np && of_property_read_bool(np, "fsd-rx-clock-skew")) { >>>>> + syscon = syscon_regmap_lookup_by_phandle_args(np, >>>>> + "fsd-rx-clock- >>>> skew", >>>>> + 1, ®); >>>>> + if (IS_ERR(syscon)) { >>>>> + dev_err(&pdev->dev, >>>>> + "couldn't get the rx-clock-skew syscon!\n"); >>>>> + return PTR_ERR(syscon); >>>>> + } >>>>> + >>>>> + regmap_write(syscon, reg, rx_clock_skew_val[ins_num]); >>>>> + } >>>>> + >>>>> + return 0; >>>>> +} >>>>> + >>>>> +static int fsd_eqos_clk_init(struct fsd_eqos_plat_data *plat, >>>>> + struct plat_stmmacenet_data *data) { >>>>> + int ret = 0, i; >>>>> + >>>>> + const struct fsd_eqos_variant *fsd_eqos_v_data = >>>>> + plat->fsd_eqos_inst_var; >>>>> + >>>>> + plat->clks = devm_kcalloc(plat->dev, fsd_eqos_v_data->num_clks, >>>>> + sizeof(*plat->clks), GFP_KERNEL); >>>>> + if (!plat->clks) >>>>> + return -ENOMEM; >>>>> + >>>>> + for (i = 0; i < fsd_eqos_v_data->num_clks; i++) >>>>> + plat->clks[i].id = fsd_eqos_v_data->clk_list[i]; >>>>> + >>>>> + ret = devm_clk_bulk_get(plat->dev, fsd_eqos_v_data->num_clks, >>>>> + plat->clks); >>>> >>>> Instead of duplicating entire clock management with existing code, >>>> you should extend/rework existing one. >>>> >>>> This code is unfortunately great example how not to stuff vendor code >>>> into upstream project. :( >>> >>> I will check again if I can extend existing one to support FSD platform >> specific requirement. >>> >>>> >>>>> + >>>>> + return ret; >>>>> +} >>>>> + >>>>> +static int fsd_clks_endisable(void *priv, bool enabled) { >>>>> + int ret, num_clks; >>>>> + struct fsd_eqos_plat_data *plat = priv; >>>>> + >>>>> + num_clks = plat->fsd_eqos_inst_var->num_clks; >>>>> + >>>>> + if (enabled) { >>>>> + ret = clk_bulk_prepare_enable(num_clks, plat->clks); >>>>> + if (ret) { >>>>> + dev_err(plat->dev, "Clock enable failed, err = %d\n", >>>> ret); >>>>> + return ret; >>>>> + } >>>>> + } else { >>>>> + clk_bulk_disable_unprepare(num_clks, plat->clks); >>>>> + } >>>>> + >>>>> + return 0; >>>>> +} >>>>> + >>>>> +static int fsd_eqos_probe(struct platform_device *pdev, >>>>> + struct plat_stmmacenet_data *data, >>>>> + struct stmmac_resources *res) >>>>> +{ >>>>> + struct fsd_eqos_plat_data *priv_plat; >>>>> + struct device_node *np = pdev->dev.of_node; >>>>> + int ret = 0; >>>>> + >>>>> + priv_plat = devm_kzalloc(&pdev->dev, sizeof(*priv_plat), >>>> GFP_KERNEL); >>>>> + if (!priv_plat) { >>>>> + ret = -ENOMEM; >>>> >>>> return -ENOMEM >>> >>> Will fix this in v4. >>> >>>> >>>>> + goto error; >>>>> + } >>>>> + >>>>> + priv_plat->dev = &pdev->dev; >>>>> + data->bus_id = of_alias_get_id(np, "eth"); >>>> >>>> No, you cannot do like this. Aliases are board specific and are based >>>> on labeling on the board. >>> >>> So if I understood this correctly, I need to move alias in the board >>> specific DTS file >> >> This part: yes >> >>> and I can use this, because we have to handle rx-clock-skew differently for >> the two instances in the FSD platform. >> >> Not really. Do you expect it to work correctly if given EQoS instance receives >> different alias, e.g. 5? >> >>> Another approach we took in v1, by specifying the value to be programmed >> in rx-clock-skew property itself, but it seems it is not a preferred approach. >>> I can see that in drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c >> +436 common code is already using this API and getting alias id, so I can >> probably use the same rather getting same again here, but I have to specify >> alias in DTS file. >> >> Getting alias ID is okay in general. It is used to provide user-visible ID of the >> devices (see mmc). Using such alias to configure hardware is abuse of the >> alias, because of the reasons I said - how is it supposed to work if alias is 5 >> (this is perfectly valid alias)? >> >> I suspect that all this is to substitute missing abstractions, like clocks, phys or >> resets... > > Will avoid using the API to get alias id to configure the HW. Will share the new implementation in v4. That was August 2023, almost year ago. Whatever you plan, expect having same questions in the discussion because we forgot everything said that year ago... Best regards, Krzysztof