mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
To: "Pandey, Radhey Shyam" <radhey.shyam.pandey@amd.com>,
	Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>,
	Rob Herring <robh+dt@kernel.org>
Cc: Thinh Nguyen <Thinh.Nguyen@synopsys.com>,
	"Simek, Michal" <michal.simek@amd.com>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
	"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"git (AMD-Xilinx)" <git@amd.com>
Subject: Re: [PATCH v2] usb: dwc3: core: enable CCI support for AMD-xilinx DWC3 controller
Date: Wed, 20 Mar 2024 00:48:14 +0000	[thread overview]
Message-ID: <20240320004810.6omwumwbcxk5as4k@synopsys.com> (raw)
In-Reply-To: <MN0PR12MB59533C758566BC5A98588D74B72D2@MN0PR12MB5953.namprd12.prod.outlook.com>

+devicetree maintainers

On Mon, Mar 18, 2024, Pandey, Radhey Shyam wrote:
> > 
> > Instead, perhaps we can do it as following:
> >  * Keep the setting of the controller registers in the core
> >  * Create a software_node to pass a software property to the core
> Thanks. By software property you mean flags or caps that can be passed
> glue drivers to dwc3 core driver ?
> 
> dwc3_set_quirks(struct dwc3 *dwc, u64 flags);
> 
> Defines quirks in core.h
> 
> DWC3_FLAGS_COMMON
> DWC3_XLNX_CCI
> DWC3_XLNX_IPD
> DWC3_REALTEK_RES_FIX
> 
> Then based on these quirks/flags program it in core.c.
> Is this approach fine and aligned with your thoughts?
> 

Not as a flag. Create 4 properties for GSBUSCFG0.DATRDREQINFO,
DESRDREQINFO, DATWRREQINFO, and DESWRREQINFO in your glue driver. Pass
them through your software node as PROPERTY_ENTRY_U16. The core will
override the default coreConsultant value of GSBUSCFG0 based on these
properties in dwc3_get_properties().

Check drivers/usb/dwc3/host.c for reference.

> 
> > 
> > These software properties will not be documented in the devicetree
> > binding. Just document them in the driver core header. They are simply
> > driver properties that get passed through software node.
> > 
> > You can add the software node using device_add_software_node(). This can
> > be done before calling of_platform_populate() in dwc3-xilinx (can be
> > done in pltfm_init())
> > 
> > Let me know if this works for you.
> > 

Hi Rob/Krzysztof,

Just want to check in with you for your opinion. To summarize my
suggestion to Pandey, here are the key notes:
* Platform specific settings are set in glue drivers (match through
  compatible string)
* These settings are set by controller registers that should only
  be accessible in the dwc3 core
* So, the suggestion is to pass these settings as properties using
  software_node created from the glue driver to the dwc3 core
* These properties will not be documented in the devicetree binding, but
  only in the driver

We're already doing that to some properties such as
"linux,sysdev_is_parent"

If this suggestion makes sense, would the prefix "linux," for linux
specific binding or "snps," is a better fit?

Thanks,
Thinh

  reply	other threads:[~2024-03-20  0:48 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-23 19:45 Radhey Shyam Pandey
2024-02-23 22:49 ` Thinh Nguyen
2024-02-23 23:07   ` Thinh Nguyen
2024-02-27 19:13     ` Pandey, Radhey Shyam
2024-03-07  1:44       ` Thinh Nguyen
2024-03-07  7:45         ` Michal Simek
2024-03-15  1:01           ` Thinh Nguyen
2024-03-18 19:23             ` Pandey, Radhey Shyam
2024-03-20  0:48               ` Thinh Nguyen [this message]
2024-04-15 19:06                 ` Pandey, Radhey Shyam

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=20240320004810.6omwumwbcxk5as4k@synopsys.com \
    --to=thinh.nguyen@synopsys.com \
    --cc=devicetree@vger.kernel.org \
    --cc=git@amd.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=michal.simek@amd.com \
    --cc=radhey.shyam.pandey@amd.com \
    --cc=robh+dt@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

all inboxes | Powered by JetHome®