Received: by 2002:ab2:4a89:0:b0:1f4:a8b6:6e69 with SMTP id w9csp84632lqj; Wed, 10 Apr 2024 05:01:19 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXgTBs/8Gi/lIJYWwIWF7kg3P2gbHUU9kXVfmtLT0pVZPJtu839tQjqbGrh3Jisron0s8tkknBSKfkhHZ20DxWtJ3y5zWVLMOJQELvlJQ== X-Google-Smtp-Source: AGHT+IFtUlGHWzMh10NrSA8Ry1Z2fgCTlm2n+99hhTeUle6KvRQUjesD8CQmcqT0Jw59pcjcmUDr X-Received: by 2002:a05:6a00:2d02:b0:6ed:21cb:13f3 with SMTP id fa2-20020a056a002d0200b006ed21cb13f3mr2390333pfb.17.1712750479583; Wed, 10 Apr 2024 05:01:19 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712750479; cv=pass; d=google.com; s=arc-20160816; b=bOawEc4ACo6L37z5xJeVcMPLDThoS6QOf6H0PmGUXzCesP4hqIAG9pxxu4O6Qq3m5m hN1Wu1W7iQvB704SzceKOVw/2XbKSzjFlxSD3OMYUwp++cXaEG8bf5pyFE9LkF/hRNzO pdPJHMUTLdceGzBUy/HhgA2zEGQ1Yi4zWwlSn29UBIo+8Q/f2b9yq5ldt9EfI5kyq/sm y6h8Eq4xQhd44nMtaJCAq1uHczPS7hLXD8+GwnYNZeHbj1CSYoxKQa7m94Rt7tPw4jz+ kzn2WKtCjG5bsNA6EtR/YSTDpG1EA6i1uyGqnoBR9ygYJdr5EZ5QeeEaiHLGgSVlcNu6 flqA== 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:from :content-language:references:cc:to:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=CzQ5g44djRiRKS8vOV3XPljUU90L73/PWDD1xSuhi/4=; fh=2cd3m3kdKTpEvl2y0iBrT62j94MYwDNkiGNKvIPmX3k=; b=s89O1q/xe+AXJwbm1mW0DQbk5VJhM/Ew47N8HJCgcLRkLiSF8PMnceI/+OMayoNO+b XTh7/Zg++kKOMC8ZcnuJpbApHaohyFIywGIEmi+t3EKJrVpLM9lnJCnQauoOsAvHCuvn PtXvMXTvA5CdA8TyCZMXPFbKEM0rBWj9lnJuLbgF7qOEnF2VdCGZnk4eBcrd4X1+KynM huFrO3p2oLpmO1e02xArB+FaaoaBRFcX2s3BsxUEAa4CVIHcat138ySH1J9oaes3L1ME 3q3D2sUfHz5vnRbRrBh3DT2FRjEVuxUFPTFzqsD6daPXb+pK5h/mL8Fhu7br8/Yx1LmF jmLA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=oxP89rtL; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-138464-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-138464-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id m123-20020a632681000000b005d4fdff9a2csi10770096pgm.328.2024.04.10.05.01.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Apr 2024 05:01:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-138464-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=oxP89rtL; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-138464-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-138464-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 1733E2817CB for ; Wed, 10 Apr 2024 12:01:19 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0A45815B10C; Wed, 10 Apr 2024 12:01:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="oxP89rtL" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F315B13DB9F; Wed, 10 Apr 2024 12:01:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712750469; cv=none; b=HO+E6jgQbbfqiMzys5HVuVr8PS9P48W5UbdMXFoRiBRbNppRKhOcRc9QS7wOKyoFQCDGW1SiNZ3GqL38LbXeAd8XWsPmamWTIBMCcMnA1Xek7B8kI9KOE/uYntV9MzWW7/z8LcMC3kbu4/Lcuxao1Y5kKv7IUIcez2miQVKLJuk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712750469; c=relaxed/simple; bh=BoExRXiMcEXH0BB16rFl2FgwKpjzKlm3TkVjGmjluGc=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=H+fHM+Y7ZY68dQ5MbzJ1Iz62yCTzEIWYmNeK+yM37idM8cyu/94gXMyGIg+IwGVwuqP+qdjWy59As/3I/b96hpXYf4cHRdTsf1mu+EDbtPsTPaTIPpwb6fEjX9hYfQjUaWgJJa8+8NpZGdZ6slTfQ6pn8cxt2u4oq8dIcxc3kzk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=oxP89rtL; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8C975C433F1; Wed, 10 Apr 2024 12:01:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712750468; bh=BoExRXiMcEXH0BB16rFl2FgwKpjzKlm3TkVjGmjluGc=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=oxP89rtLZUenYQp+bRCY1ohx8slIf931KDb7uKqOFB3VqvlQURN7da45HZ9U7hzov 14pBrFXMZsmEs+scitIC6a86OhDgmhbw5d/B2a9zBqOUyoPQRRg+wQKqSUZ0MP3vrm MhTjB5DcLyfoQre5tzXyFAjAJmkkh/uUdRyGhW9oANeCtafSzL8BnSkCvlmUioMMc5 Mkg1nt/THT1J5vBgZ+z40ok5pYRDkDUOm/cCdyIlDE2POHUZSZ4jJUMU8CAqVMr9be mhNydRd+YtytC0yh/W95o04qWXs1S6yPfxjChtyIT0cj4SPBugKHjR/ZEM1QW8HiBt uN73ufBc9D4Og== Message-ID: <82e5503c-0710-4b17-af79-8dece4794ec8@kernel.org> Date: Wed, 10 Apr 2024 14:01:00 +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 v7 1/5] dt-bindings: interconnect: Add Qualcomm IPQ9574 support To: Konrad Dybcio , Varadarajan Narayanan Cc: andersson@kernel.org, mturquette@baylibre.com, sboyd@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, djakov@kernel.org, dmitry.baryshkov@linaro.org, quic_anusha@quicinc.com, linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org References: <20240403104220.1092431-1-quic_varada@quicinc.com> <20240403104220.1092431-2-quic_varada@quicinc.com> <58c9b754-b9a7-444d-9545-9e6648010630@kernel.org> <1ec401be-11cb-416a-9eae-d72ea8acf06f@kernel.org> <70d0afa7-4990-4180-8dfa-cdf267e4c7a2@kernel.org> Content-Language: en-US From: Krzysztof Kozlowski Autocrypt: addr=krzk@kernel.org; keydata= xsFNBFVDQq4BEAC6KeLOfFsAvFMBsrCrJ2bCalhPv5+KQF2PS2+iwZI8BpRZoV+Bd5kWvN79 cFgcqTTuNHjAvxtUG8pQgGTHAObYs6xeYJtjUH0ZX6ndJ33FJYf5V3yXqqjcZ30FgHzJCFUu JMp7PSyMPzpUXfU12yfcRYVEMQrmplNZssmYhiTeVicuOOypWugZKVLGNm0IweVCaZ/DJDIH gNbpvVwjcKYrx85m9cBVEBUGaQP6AT7qlVCkrf50v8bofSIyVa2xmubbAwwFA1oxoOusjPIE J3iadrwpFvsZjF5uHAKS+7wHLoW9hVzOnLbX6ajk5Hf8Pb1m+VH/E8bPBNNYKkfTtypTDUCj NYcd27tjnXfG+SDs/EXNUAIRefCyvaRG7oRYF3Ec+2RgQDRnmmjCjoQNbFrJvJkFHlPeHaeS BosGY+XWKydnmsfY7SSnjAzLUGAFhLd/XDVpb1Een2XucPpKvt9ORF+48gy12FA5GduRLhQU vK4tU7ojoem/G23PcowM1CwPurC8sAVsQb9KmwTGh7rVz3ks3w/zfGBy3+WmLg++C2Wct6nM Pd8/6CBVjEWqD06/RjI2AnjIq5fSEH/BIfXXfC68nMp9BZoy3So4ZsbOlBmtAPvMYX6U8VwD TNeBxJu5Ex0Izf1NV9CzC3nNaFUYOY8KfN01X5SExAoVTr09ew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aAGQS6NDlfhM6O9aYNwGL6tGt/6BkRikNOs7VDEa4/HlbaSJo 7FgndGw1kWmkeL6oQh7wBvYll2buKod4qYntmNKEicoHGU+x91Gcan8mCoqhJkbqrL7+nXG2 5Q/GS5M9RFWS+nYyJh+c3OcfKqVcZQNANItt7+ULzdNJuhvTRRdC3g9hmCEuNSr+CLMdnRBY fv0= In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 10/04/2024 13:48, Konrad Dybcio wrote: > > > On 4/10/24 13:15, Krzysztof Kozlowski wrote: >> On 10/04/2024 12:02, Varadarajan Narayanan wrote: >>>> Okay, so what happens if icc-clk way of generating them changes a bit? >>>> It can change, why not, driver implementation is not an ABI. >>>> >>>>> >>>>> 2. These auto-generated id-numbers have to be correctly >>>>> tied to the DT nodes. Else, the relevant clocks may >>>>> not get enabled. >>>> >>>> Sorry, I don't get, how auto generated ID number is tied to DT node. >>>> What DT node? >>> >>> I meant the following usage for the 'interconnects' entry of the >>> consumer peripheral's node. >>> >>> interconnects = <&gcc MASTER_ANOC_PCIE0 &gcc SLAVE_ANOC_PCIE0>, >>> ^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^ >>> <&gcc MASTER_SNOC_PCIE0 &gcc SLAVE_SNOC_PCIE0>; >>> ^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^ >>> >>>>> Since ICC-CLK creates two ids per clock entry (one MASTER_xxx and >>>>> one SLAVE_xxx), using those MASTER/SLAVE_xxx macros as indices in >>>>> the below array would create holes. >>>>> >>>>> static int icc_ipq9574_hws[] = { >>>>> [MASTER_ANOC_PCIE0] = GCC_ANOC_PCIE0_1LANE_M_CLK, >>>>> [MASTER_SNOC_PCIE0] = GCC_SNOC_PCIE0_1LANE_S_CLK, >>>>> [MASTER_ANOC_PCIE1] = GCC_ANOC_PCIE1_1LANE_M_CLK, >>>>> [MASTER_SNOC_PCIE1] = GCC_SNOC_PCIE1_1LANE_S_CLK, >>>>> . . . >>>>> }; >>>>> >>>>> Other Qualcomm drivers don't have this issue and they can >>>>> directly use the MASTER/SLAVE_xxx macros. >>>> >>>> I understand, thanks, yet your last patch keeps adding fake IDs, means >>>> IDs which are not part of ABI. >>>> >>>>> >>>>> As the MASTER_xxx macros cannot be used, have to define a new set >>>>> of macros that can be used for indices in the above array. This >>>>> is the reason for the ICC_BINDING_NAME macros. >>>> >>>> Then maybe fix the driver, instead of adding something which is not an >>>> ABI to bindings and completely skipping the actual ABI. >>> >>> Will remove the ICC_xxx defines from the header. And in the >>> driver will change the declaration as follows. Will that be >>> acceptable? >>> >>> static int icc_ipq9574_hws[] = { >>> [MASTER_ANOC_PCIE0 / 2] = GCC_ANOC_PCIE0_1LANE_M_CLK, >> >> What is the binding in such case? What exactly do you bind between >> driver and DTS? > > I think what Krzysztof is trying to say here is "the icc-clk API is tragic" > and the best solution would be to make it such that the interconnect indices > are set explicitly, instead of (master, slave), (master, slave) etc. > > Does that sound good, Krzysztof? Yes, I think earlier I expressed that icc-clk might needs fixes. The indices you define in the binding must be used by DTS and by the driver. Directly, otherwise it is error-prone and not really an ABI... Best regards, Krzysztof