public inbox for linux-i2c@vger.kernel.org
 help / color / mirror / Atom feed
From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
To: Viken Dadhaniya <quic_vdadhani@quicinc.com>,
	Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>,
	andi.shyti@kernel.org, robh@kernel.org, krzk+dt@kernel.org,
	conor+dt@kernel.org, gregkh@linuxfoundation.org,
	jirislaby@kernel.org, broonie@kernel.or, andersson@kernel.org,
	konradybcio@kernel.org, johan+linaro@kernel.org,
	dianders@chromium.org, agross@kernel.org,
	linux-arm-msm@vger.kernel.org, linux-i2c@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-serial@vger.kernel.org, linux-spi@vger.kernel.org
Cc: Mukesh Kumar Savaliya <quic_msavaliy@quicinc.com>,
	quic_anupkulk@quicinc.com
Subject: Re: [PATCH v1 0/7] Add support to load QUP SE firmware from
Date: Thu, 12 Dec 2024 16:58:00 +0100	[thread overview]
Message-ID: <9f114f7e-8a97-468a-9245-10c2b565da81@oss.qualcomm.com> (raw)
In-Reply-To: <9af6d639-9066-46a1-96c8-1b0b1790191d@quicinc.com>

On 10.12.2024 6:06 AM, Viken Dadhaniya wrote:
> 
> 
> On 12/5/2024 9:29 PM, Konrad Dybcio wrote:
>> On 4.12.2024 4:03 PM, Viken Dadhaniya wrote:
>>> In Qualcomm SoCs, firmware loading for Serial Engines (SE) in the QUP
>>> hardware has traditionally been managed by TrustZone (TZ). This setup
>>> handled Serial Engines(SE) assignments and access control permissions,
>>> ensuring a high level of security but limiting flexibility and
>>> accessibility.
>>>   This limitation poses a significant challenge for developers who need more
>>> flexibility to enable any protocol on any of the SEs within the QUP
>>> hardware.
>>>   To address this, we are introducing a change that opens the firmware
>>> loading mechanism to the Linux environment. This enhancement increases
>>> flexibility and allows for more streamlined and efficient management. We
>>> can now handle SE assignments and access control permissions directly
>>> within Linux, eliminating the dependency on TZ.
>>>   We propose an alternative method for firmware loading and SE
>>> ownership/transfer mode configuration based on device tree configuration.
>>> This method does not rely on other execution environments, making it
>>> accessible to all developers.
>>>   For SEs used prior to the kernel, their firmware will be loaded by the
>>> respective image drivers (e.g., Debug UART, Secure or trusted SE).
>>> Additionally, the GSI firmware, which is common to all SEs per QUPV3 core,
>>> will not be loaded by Linux driver but TZ only. At the kernel level, only
>>> the SE protocol driver should load the respective protocol firmware.
>>
>> I think this is a great opportunity to rethink the SE node in general.
>>
>> Currently, for each supported protocol, we create a new node that
>> differs in (possibly) interconnects and pinctrl states. These are really
>> defined per-SE however and we can programmatically determine which ones
>> are relevant.
>>
>> With the growing number of protocols supported, we would have to add
>> 20+ nodes in some cases for each one of them. I think a good one would
>> look like:
>>
>> geni_se10: serial-engine@abcdef {
>>     compatible = "qcom,geni-se";
>>
>>     reg
>>     clocks
>>     power-domains
>>     interconnects
>>     ...
>>
>>     status
>>
>>     geni_se10_i2c: i2c {
>>         // i2c-controller.yaml
>>     };
>>
>>     geni_se10_spi: spi {
>>         // spi-controller.yaml
>>     };
>>
>>     ...
>> }
>>
>> Or maybe even get rid of the subnodes and restrict that to a single
>> se-protocol = <SE_PROTOCOL_xyz> property, if the bindings folks agree.
>>
>> We could extend the DMA APIs to dynamically determine the protocol
>> ID and get rid of hardcoding it.
>>
>> And then we could spawn an instance of the spi, i2c, etc. driver from
>> the GENI SE driver.
>>
>> Konrad
> 
> Thanks for the advice.
> The above design suggested by you may add more code change into protocol driver as well as common driver.
> I am really interested to discuss more options and come to better design. let me discuss with you on this.
> Also do you think we can push the re-design of DTSI nodes as separate change instead of clubbing with this FW load change ?

Sure, the firmware loading support itself is a separate change.
I simply used this thread as an opportunity to talk about a future
cleanup.

Konrad

  reply	other threads:[~2024-12-12 15:58 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-04 15:03 [PATCH v1 0/7] Add support to load QUP SE firmware from Viken Dadhaniya
2024-12-04 15:03 ` [PATCH v1 1/7] dt-bindings: i2c: qcom,i2c-geni: Document DT properties for QUP firmware loading Viken Dadhaniya
2024-12-04 15:06   ` Krzysztof Kozlowski
2024-12-10  4:43     ` Viken Dadhaniya
2024-12-10  7:23       ` Krzysztof Kozlowski
2024-12-04 15:25   ` neil.armstrong
2024-12-10  4:44     ` Viken Dadhaniya
2024-12-04 17:25   ` Doug Anderson
2024-12-10  5:28     ` Viken Dadhaniya
2024-12-10 17:42       ` Doug Anderson
2024-12-11  5:27         ` Viken Dadhaniya
2024-12-11 22:27           ` Doug Anderson
2024-12-04 22:36   ` Dmitry Baryshkov
2024-12-10  4:48     ` Viken Dadhaniya
2024-12-04 15:03 ` [PATCH v1 2/7] spi: dt-bindings: " Viken Dadhaniya
2024-12-04 15:07   ` Krzysztof Kozlowski
2024-12-04 15:03 ` [PATCH v1 3/7] dt-bindings: serial: " Viken Dadhaniya
2024-12-04 15:07   ` Krzysztof Kozlowski
2024-12-04 15:03 ` [PATCH v1 4/7] soc: qcom: geni-se:: Add support to load QUP SE Firmware via Linux subsystem Viken Dadhaniya
2024-12-04 15:24   ` neil.armstrong
2024-12-10  4:53     ` Viken Dadhaniya
2024-12-04 20:19   ` kernel test robot
2024-12-04 22:37     ` Dmitry Baryshkov
2024-12-10  4:54       ` Viken Dadhaniya
2024-12-04 21:22   ` kernel test robot
2024-12-05  1:23   ` kernel test robot
2024-12-04 15:03 ` [PATCH v1 5/7] i2c: qcom-geni: Load i2c qup Firmware from linux side Viken Dadhaniya
2024-12-04 15:03 ` [PATCH v1 6/7] spi: geni-qcom: Load spi " Viken Dadhaniya
2024-12-04 15:03 ` [PATCH v1 7/7] serial: qcom-geni: Load UART " Viken Dadhaniya
2024-12-05 15:59 ` [PATCH v1 0/7] Add support to load QUP SE firmware from Konrad Dybcio
2024-12-09 14:45   ` neil.armstrong
2024-12-10  5:22     ` Viken Dadhaniya
2024-12-12 15:56     ` Konrad Dybcio
2024-12-10  5:06   ` Viken Dadhaniya
2024-12-12 15:58     ` Konrad Dybcio [this message]
2025-01-07 11:25 ` Caleb Connolly
2025-01-10  6:56   ` Mukesh Kumar Savaliya
2025-01-22 15:23     ` Caleb Connolly
2025-01-22 17:52       ` 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=9f114f7e-8a97-468a-9245-10c2b565da81@oss.qualcomm.com \
    --to=konrad.dybcio@oss.qualcomm.com \
    --cc=agross@kernel.org \
    --cc=andersson@kernel.org \
    --cc=andi.shyti@kernel.org \
    --cc=broonie@kernel.or \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dianders@chromium.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jirislaby@kernel.org \
    --cc=johan+linaro@kernel.org \
    --cc=konradybcio@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=quic_anupkulk@quicinc.com \
    --cc=quic_msavaliy@quicinc.com \
    --cc=quic_vdadhani@quicinc.com \
    --cc=robh@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