Skip to content

Update compatability string for remoteproc - #3575

Merged
artursartamonovsadi merged 6 commits into
adsp-6.18.31-yfrom
arturs/adsp/rproc-compatability
Oct 13, 2026
Merged

artursartamonovsadi merged 6 commits into
adsp-6.18.31-yfrom
arturs/adsp/rproc-compatability

Conversation

@artursartamonovsadi

Copy link
Copy Markdown

PR Description

This comes from WIP in #3499

As new platform support is added, SC8XX memory mapping's are incompatible with SC5XX, There is need to distinguish both of them.

The renaming follows stm32 remoteproc upstream
Compatibility string changed
adi,remoteproc
now is

adi,sc5xx-rproc for SHARC
adi,sc8xx-rproc for SHARC-FX(Xtensa)

This is first set of tiny PR's that shouldn't brake old code but introduce support for remoteproc on SC8XX

PR Type

  • Bug fix (a change that fixes an issue)
  • New feature (a change that adds new functionality)
  • Breaking change (a change that affects other repos or cause CIs to fail)

PR Checklist

  • I have conducted a self-review of my own code changes
  • I have compiled my changes, including the documentation
  • I have tested the changes on the relevant hardware
  • I have updated the documentation outside this repo accordingly
  • I have provided links for the relevant upstream lore

@artursartamonovsadi
artursartamonovsadi requested review from a team, nunojsa, pamolloy, sipraga and ukleinek and removed request for nunojsa and sipraga September 30, 2026 09:00
@ukleinek

Copy link
Copy Markdown
Collaborator

Fine for me, maybe consider keeping the old compatible as a fallback (i.e.

compatible = "adi,sc5xx-rproc", "adi,remoteproc";

but I don't feel strong about it and intend to change the binding in an incompatible way anyhow soon (which I think is needed for upstreaming), so there isn't much use on keeping compatibility anyhow.

@ukleinek ukleinek left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apart from a minor concern, I agree that's the right way forward.

Comment thread drivers/remoteproc/adi_remoteproc.c Outdated
@artursartamonovsadi
artursartamonovsadi force-pushed the arturs/adsp/rproc-compatability branch 3 times, most recently from ecb53b4 to 3ab66e0 Compare September 30, 2026 09:59
@artursartamonovsadi

Copy link
Copy Markdown
Author

Fine for me, maybe consider keeping the old compatible as a fallback (i.e.

compatible = "adi,sc5xx-rproc", "adi,remoteproc";

but I don't feel strong about it and intend to change the binding in an incompatible way anyhow soon (which I think is needed for upstreaming), so there isn't much use on keeping compatibility anyhow.

Have added, for now

@artursartamonovsadi
artursartamonovsadi force-pushed the arturs/adsp/rproc-compatability branch from 3ab66e0 to 5410ad5 Compare September 30, 2026 11:09
@artursartamonovsadi

Copy link
Copy Markdown
Author

@sipraga renamed to adi,adsp-sc598-rproc

@nunojsa

nunojsa commented Sep 30, 2026

Copy link
Copy Markdown
Collaborator

but I don't feel strong about it and intend to change the binding in an incompatible way anyhow soon (which I think is needed for upstreaming), so there isn't much use on keeping compatibility anyhow.

Long term we also want to upstream all of this and I guess the legacy stuff won't be taken into account anyways :)

Comment thread drivers/remoteproc/adi_remoteproc.c Outdated
@artursartamonovsadi
artursartamonovsadi force-pushed the arturs/adsp/rproc-compatability branch from 5410ad5 to f439089 Compare October 8, 2026 13:31
static const struct of_device_id adi_rproc_of_match[] = {
{ .compatible = "adi,remoteproc" },
{ .compatible = "adi,adsp-sc598-rproc" },
{ .compatible = "adi,adsp-sc846-rproc" },

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

did you not want to already wire in .data pointers?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

He had but it but I asked to drop it. These pointers are useless if we're not going to do anything with them (which was the case). When we do need to do anything different per variant, then we can add them. But until them, just noise :)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair enough, but I guess by the same logic this should also be dropped:

enum adi_rproc_variant {
	SC5XX_RPROC_SHARC,
	SC5XX_RPROC_SHARCFX,
};

struct adi_rproc_config {
	unsigned int variant;
};

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like the sc846 remoteproc PR will add those: #3499. I feel like we should drop it here and then let that PR add them once they are actually being used.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wanted to make it in small chunks rather as big PR. So all parts can be reviewed in fast manner.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That PR now have 2 platforms, will split it in 2, SC846 - ELF support, and SC598 ELF support PR's first one is SC846

Comment thread arch/arm/boot/dts/adi/sc573-ezlite.dts Outdated
scb {
core1-rproc@3108C000 {
compatible = "adi,remoteproc";
compatible = "adi,adsp-sc598-rproc","adi,remoteproc";

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

commit subject should be ARM: not arm64:

Comment thread arch/arm/boot/dts/adi/sc573-ezlite.dts Outdated

core2-rproc@3108C000 {
compatible = "adi,remoteproc";
compatible = "adi,adsp-sc598-rproc","adi,remoteproc";

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generic compatibles are frowned upon. There is some advice here:

https://docs.kernel.org/devicetree/bindings/writing-bindings.html

Relevant rules:

  • DO make ‘compatible’ properties specific.
  • DON’T use wildcards or device-family names in compatible strings.
  • DON’T add fake fallback compatibles when software cannot use such to match and bind to a device, and still operate correctly.
  • DO use a SoC-specific compatible for all SoC devices, followed by a fallback if appropriate. SoC-specific compatibles are also preferred for the fallbacks.

Ergo, I would make this:

"adi,adsp-sc573-rproc","adi,adsp-sc598-remoteproc"

if 598 is to be the fallback compatible.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree, "adi,remoteproc"; as a valid compatible is not the way to go

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure why to add "adi,adsp-sc573-rproc" as there is no any difference in code for for whole set of SHARC+ part's
something like adi,adsp-sp-rproc" for all SHARC+ remoteproc drivers.

Comment thread arch/arm/boot/dts/adi/sc589-mini.dts Outdated
Comment thread arch/arm/boot/dts/adi/sc594-som.dtsi Outdated
Comment thread arch/arm/boot/dts/adi/sc573-ezlite.dts Outdated
scb {
core1-rproc@3108C000 {
compatible = "adi,remoteproc";
compatible = "adi,adsp-sc598-rproc","adi,remoteproc";

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should add some DT bindings for these compatibles

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there was no compatibles by default

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as usually don't want to get out of scope in singe tiny PR, can always separate PR that add DT bindings

@artursartamonovsadi
artursartamonovsadi force-pushed the arturs/adsp/rproc-compatability branch from d7b236b to c2fb2a6 Compare October 9, 2026 13:44
Replace the generic "adi,remoteproc" compatible with "adi,sc5xx-rproc"
and "adi,sc8xx-rproc", each carrying an adi_rproc_config that tags the
SHARC variant (SHARC+ vs SHARCFX) so later patches can branch on the
core type. Rename the platform driver to "adi-rproc" to match.

Signed-off-by: Arturs Artamonovs <Arturs.Artamonovs@analog.com>
Comment thread arch/arm/boot/dts/adi/sc573-ezlite.dts Outdated
scb {
core1-rproc@3108C000 {
compatible = "adi,remoteproc";
compatible = "adi,adsp-sc598-rproc";

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add a compatible string for the non-sc598 boards, e.g adi,adsp-sc573-rproc? This could be confusing to someone who doesn't know that the underlying architecture is the same. Otherwise LGTM

@nunojsa nunojsa left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At some point we also need to start renaming the filenames

Comment thread arch/arm/boot/dts/adi/sc573-ezlite.dts Outdated

core2-rproc@3108C000 {
compatible = "adi,remoteproc";
compatible = "adi,adsp-sc598-rproc";

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah... looks a bit weird to me. I guess we could very well already add adi,adsp-sc573-rproc. I guess the plan is still to upstream first 598 so we could make that as the fallback one

&scb {
sharc0: core1-rproc@28240000 {
compatible = "adi,remoteproc";
compatible = "adi,adsp-sc846-rproc";

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

Comment thread arch/arm/boot/dts/adi/sc589-mini.dts Outdated

core2-rproc@28a40000 {
compatible = "adi,remoteproc";
compatible = "adi,adsp-sc598-rproc";

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

Comment thread arch/arm/boot/dts/adi/sc594-som.dtsi Outdated

sharc1: core2-rproc@28a40000 {
compatible = "adi,remoteproc";
compatible = "adi,adsp-sc598-rproc";

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

...

@nunojsa

nunojsa commented Oct 13, 2026

Copy link
Copy Markdown
Collaborator

Also, do not ignore comments without justifying :). @sipraga made the same points about compatibles and also git subject style :)

@sipraga

sipraga commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

looks fine now except I would still add the more SoC-specific compatibles, like compatible = "adi,adsp-sc573-rproc", "adi,adsp-sc598-rproc"; for SC573.

I know in theory there is no difference, but when it comes to mainlining the DTs it will be required to do this. Rationale is that one day you might find that there is a subtle difference and you need to update the driver to account for it (do X if SC573, do Y if SC598). But because the driver has to work with "old" device trees (since DTs are kind of ABI), you want to future proof things by having that more SoC-specific compatible in place from the very beginning.

The fallback compatible you choose (here sc598) is usually arbitrary. In fact I think the driver itself need only list that particular compatible in its OF match table if there is no actual difference in behaviour. The dtbs_check makefile target will however require that all compatibles are listed in the yaml bindings.

So in the bindings you do like:

compatible:
  oneOf:
    - items:
        - enum:
            - adi,adsp-sc573-rproc
            - adi,adsp-sc589-rproc
            - ...
        - const: adi,adsp-sc598-rproc
    - const: adi,adsp-sc598-rproc
    - const: adi,adsp-sc846-rproc

I put 846 separately because it's not actually compatible with 598.

@sipraga

sipraga commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

Since there isn't any bindings yaml file right now I think you can skip that part in this PR though, no harm done

Signed-off-by: Arturs Artamonovs <Arturs.Artamonovs@analog.com>
Signed-off-by: Arturs Artamonovs <Arturs.Artamonovs@analog.com>
Signed-off-by: Arturs Artamonovs <Arturs.Artamonovs@analog.com>
Signed-off-by: Arturs Artamonovs <Arturs.Artamonovs@analog.com>
Signed-off-by: Arturs Artamonovs <Arturs.Artamonovs@analog.com>
@artursartamonovsadi
artursartamonovsadi force-pushed the arturs/adsp/rproc-compatability branch from 2edfc9c to 0a9eb3d Compare October 13, 2026 13:31

@sipraga sipraga left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM now!

also, I just noticed that the remoteproc nodes are in the som/board-level DTs rather than the SoC-level DT. seems a bit odd. probably needs to be moved at some point (but that's really for another day, out of scope here)

@artursartamonovsadi
artursartamonovsadi merged commit c969610 into adsp-6.18.31-y Oct 13, 2026
17 of 19 checks passed
@artursartamonovsadi
artursartamonovsadi deleted the arturs/adsp/rproc-compatability branch October 13, 2026 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants