public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
From: Mukesh Kumar Savaliya <quic_msavaliy@quicinc.com>
To: Bjorn Andersson <bjorn.andersson@oss.qualcomm.com>,
	Konrad Dybcio <konradybcio@gmail.com>
Cc: Krzysztof Kozlowski <krzk@kernel.org>,
	Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>,
	<konrad.dybcio@linaro.org>, <andersson@kernel.org>,
	<andi.shyti@kernel.org>, <linux-arm-msm@vger.kernel.org>,
	<dmaengine@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<linux-i2c@vger.kernel.org>, <conor+dt@kernel.org>,
	<agross@kernel.org>, <devicetree@vger.kernel.org>,
	<vkoul@kernel.org>, <linux@treblig.org>,
	<dan.carpenter@linaro.org>, <Frank.Li@nxp.com>,
	<konradybcio@kernel.org>, <bryan.odonoghue@linaro.org>,
	<krzk+dt@kernel.org>, <robh@kernel.org>,
	<quic_vdadhani@quicinc.com>
Subject: Re: [PATCH v5 1/4] dt-bindindgs: i2c: qcom,i2c-geni: Document shared flag
Date: Tue, 31 Mar 2026 17:02:02 +0530	[thread overview]
Message-ID: <d3c4ea34-1c49-417b-8fdf-212ad77e3545@quicinc.com> (raw)
In-Reply-To: <Z1h/x+QJD5Uob8GZ@hu-bjorande-lv.qualcomm.com>

Hi Bjorn, Konrad, Krzysztof, Thanks for all the time and review, 
discussion on this. Really sorry for such long wait, as i was completely 
away from this activity. Now restarting back and will continue on this.

Let me upload v6 as to get context of older series and vet all changes 
and description including DT property flag as the main point of discussion.

On 12/10/2024 11:22 PM, Bjorn Andersson wrote:
> On Tue, Dec 10, 2024 at 01:38:28PM +0100, Konrad Dybcio wrote:
>>
>>
>> On 12/10/24 13:05, Krzysztof Kozlowski wrote:
>>> On 10/12/2024 12:53, Krzysztof Kozlowski wrote:
>>>>>>> I'm not sure a single property name+description can fit all possible
>>>>>>> cases here. The hardware being "shared" can mean a number of different
>>>>>>
>>>>>> Existing property does not explain anything more, either. To recap -
>>>>>> this block is SE and property is named "se-shared", so basically it is
>>>>>> equal to just "shared". "shared" is indeed quite vague, so I was
>>>>>> expecting some wider work here.
>>>>>>
>>>>>>
>>>>>>> things, with some blocks having hardware provisions for that, while
>>>>>>> others may have totally none and rely on external mechanisms (e.g.
>>>>>>> a shared memory buffer) to indicate whether an external entity
>>>>>>> manages power to them.
>>>>>>
>>>>>> We have properties for that too. Qualcomm SoCs need once per year for
>>>>>> such shared properties. BAM has two or three. IPA has two. There are
>>>>>> probably even more blocks which I don't remember now.
>>>>>
>>>>> So, the problem is "driver must not toggle GPIO states", because
>>>>> "the bus controller must not be muxed away from the endpoint".
>>>>> You can come up with a number of similar problems by swapping out
>>>>> the quoted text.
>>>>>
>>>>> We can either describe what the driver must do (A), or what the
>>>>> reason for it is (B).
>>>>>
>>>>>
>>>>> If we go with A, we could have a property like:
>>>>>
>>>>> &i2c1 {
>>>>> 	externally-handled-resources = <(EHR_PINCTRL_STATE | EHR_CLOCK_RATE)>
>>>>> };
>>>>>
>>>>> which would be a generic list of things that the OS would have to
>>>>> tiptoe around, fitting Linux's framework split quite well
>>>>>
>>>>>
>>>>>
>>>>> or if we go with B, we could add a property like:
>>>>>
>>>>> &i2c1 {
>>>>> 	qcom,shared-controller;
>>>>> };
>>>>>
>>>>> which would hide the implementation details into the driver
>>>>>
>>>>> I could see both approaches having their place, but in this specific
>>>>> instance I think A would be more fitting, as the problem is quite
>>>>> simple.
>>>>
>>>>
>>>> The second is fine with me, maybe missing information about "whom" do
>>>> you share it with. Or maybe we get to the point that all this is
>>>> specific to SoC, thus implied by compatible and we do not need
>>>> downstream approach (another discussion in USB pushed by Qcom: I want
>>>> one compatible and 1000 properties).
>>>>
>>>> I really wished Qualcomm start reworking their bindings before they are
>>>> being sent upstream to match standard DT guidelines, not downstream
>>>> approach. Somehow these hundreds reviews we give could result in new
>>>> patches doing things better, not just repeating the same issues.
>>>
>>> This is BTW v5, with all the same concerns from v1 and still no answers
>>> in commit msg about these concerns. Nothing explained in commit msg
>>> which hardware needs it or why the same SoC have it once shared, once
>>> not (exclusive). Basically there is nothing here corresponding to any
>>> real product, so since five versions all this for me is just copy-paste
>>> from downstream approach.
>>
>> So since this is a software contract and not a hardware
>> feature, this is not bound to any specific SoC or "firmware",
>> but rather to what runs on other cores (e.g. DSPs, MCUs spread
>> across the SoC or in a different software world, like TZ).
>>
> 
> I don't think this is a reasonable distinction, the DeviceTree must
> describe the interfaces/environment that the OS is to operate in.
> Claiming that certain properties of that world directly or indirectly
> comes from (static) "software choices" would make the whole concept of
> DeviceTree useless.
> 
> The fact that a serial engine is shared, or not, is a static property of
> the firmware for a given board, no different from "i2c1 being accessible
> by this OS or not" or the fact that i2c1 is actually implement I2C and
> not SPI (i.e. should this node be enabled in the DeviceTree passed to
> the OS or not).
> 
> 
> That said, the commit message still doesn't clearly describe the system
> design or when this property should be set or not, which is what
> Krzysztof has been asking for multiple times.
> 
> Let's circle back and help Mukesh rewrite the commit message such that
> it clearly documents the problem being solved.
> 
In the next patch to be uploaded, Tried to gave clarity on previous 
concerns.

>> Specifying the specific intended use would be helpful though,
>> indeed.
>>
>> Let's see if we can somehow make this saner.
>>
>>
>> Mukesh, do we have any spare registers that we could use to
>> indicate that a given SE is shared? Preferably within the
>> SE's register space itself. The bootloader or another entity
>> (DSP or what have you) would then set that bit before Linux
>> runs and we could skip the bindings story altogether.
>>
>> It would need to be reserved on all SoCs though (future and
>> past), to make sure the contract is always held up, but I
>> think finding a persistent bit that has never been used
>> shouldn't be impossible.
>>
> 
> Let's not invent a custom one-off "hardware description" passing
> interface.
> 
As you know, as such there is no HW flag as of now indicating this HW 
capability or feature. Please let me know if v6 with description about 
static feature flag helps.

If no, then i need to devise some flag (create/add bit) in existing 
HW/FW register and then read back the register to derive feature flag.

I am clear that each DTSI entry describes the hardware, but provided 
such SW based feature, wanted to review.

> Regards,
> Bjorn
> 
>> Konrad


  reply	other threads:[~2026-03-31 11:32 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-29 14:43 [PATCH v5 0/4] Enable shared SE support over I2C Mukesh Kumar Savaliya
2024-11-29 14:43 ` [PATCH v5 1/4] dt-bindindgs: i2c: qcom,i2c-geni: Document shared flag Mukesh Kumar Savaliya
2024-11-29 15:14   ` Krzysztof Kozlowski
2024-12-02  4:00     ` Mukesh Kumar Savaliya
2024-12-02  7:19       ` Krzysztof Kozlowski
2024-12-02 10:38         ` Mukesh Kumar Savaliya
2024-12-02 11:04           ` Krzysztof Kozlowski
2024-12-02 11:13             ` Krzysztof Kozlowski
2024-12-09 15:07               ` Mukesh Kumar Savaliya
2024-12-02 12:55             ` Mukesh Kumar Savaliya
2024-12-02 14:04               ` Konrad Dybcio
2024-12-09 15:01                 ` Mukesh Kumar Savaliya
2024-12-10  7:28                 ` Krzysztof Kozlowski
2024-12-10  9:09                   ` Konrad Dybcio
2024-12-10 11:53                     ` Krzysztof Kozlowski
2024-12-10 12:05                       ` Krzysztof Kozlowski
2024-12-10 12:38                         ` Konrad Dybcio
2024-12-10 15:17                           ` Mukesh Kumar Savaliya
2024-12-10 15:24                             ` Konrad Dybcio
2024-12-10 15:56                               ` Krzysztof Kozlowski
2024-12-10 17:52                           ` Bjorn Andersson
2026-03-31 11:32                             ` Mukesh Kumar Savaliya [this message]
2024-11-30  4:45   ` Bjorn Andersson
2024-12-02 10:38     ` Mukesh Kumar Savaliya
2024-12-03 15:43       ` Bjorn Andersson
2024-11-29 14:43 ` [PATCH v5 2/4] dmaengine: gpi: Add Lock and Unlock TRE support to access I2C exclusively Mukesh Kumar Savaliya
2024-12-02  6:47   ` Vinod Koul
2024-12-02 10:43     ` Mukesh Kumar Savaliya
2024-12-04 12:21       ` Vinod Koul
2024-12-18 12:34         ` Mukesh Kumar Savaliya
2024-12-24  9:58           ` Vinod Koul
2024-12-26 12:22             ` Mukesh Kumar Savaliya
2025-01-14  9:18               ` Mukesh Kumar Savaliya
2026-03-31 11:33                 ` Mukesh Kumar Savaliya
2024-11-29 14:43 ` [PATCH v5 3/4] soc: qcom: geni-se: Do not keep GPIOs to sleep state for shared SE usecase Mukesh Kumar Savaliya
2024-11-29 14:43 ` [PATCH v5 4/4] i2c: i2c-qcom-geni: Enable i2c controller sharing between two subsystems Mukesh Kumar Savaliya
2024-12-13 13:05   ` Konrad Dybcio
2024-12-15  8:59     ` Mukesh Kumar Savaliya
2024-12-16 12:10       ` Konrad Dybcio
2024-12-16 12:47         ` Mukesh Kumar Savaliya
2026-03-31 11:34           ` Mukesh Kumar Savaliya

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d3c4ea34-1c49-417b-8fdf-212ad77e3545@quicinc.com \
    --to=quic_msavaliy@quicinc.com \
    --cc=Frank.Li@nxp.com \
    --cc=agross@kernel.org \
    --cc=andersson@kernel.org \
    --cc=andi.shyti@kernel.org \
    --cc=bjorn.andersson@oss.qualcomm.com \
    --cc=bryan.odonoghue@linaro.org \
    --cc=conor+dt@kernel.org \
    --cc=dan.carpenter@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dmaengine@vger.kernel.org \
    --cc=konrad.dybcio@linaro.org \
    --cc=konrad.dybcio@oss.qualcomm.com \
    --cc=konradybcio@gmail.com \
    --cc=konradybcio@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=krzk@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@treblig.org \
    --cc=quic_vdadhani@quicinc.com \
    --cc=robh@kernel.org \
    --cc=vkoul@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox