Skip to contentSkip to conversation

I3C target mode support

PATCH Superseded Frank Li 5 participants 38 messages Jan 10, 2024 – Jan 19, 2024

Subsystems (6)

v2 of 9 Superseded Latest is v9 →

lore
Share & tools
lore

Frank Li

author maintainer
#0 lore raw

v2 cover I3C target mode support

This patch introduces support for I3C target mode, which is referenced with a PCIe Endpoint system. It also establishes a configuration framework (configfs) for the I3C target controller driver and the I3C target function driver

Typic usage as

The user can configure the i3c-target-tty device using configfs entry. In order to change the vendorid, the following commands can be used

        # echo 0x011b > functions/tty/func1/vendor_id
        # echo 0x1000 > functions/tty/func1/part_id
        # echo 0x6 > functions/tty/t/bcr

Binding i3c-target-tty Device to target Controller
------------------------------------------------

In order for the target function device to be useful, it has to be bound to a I3C target controller driver. Use the configfs to bind the function device to one of the controller driver present in the system::

        # ln -s functions/pci_epf_test/func1 controllers/44330000.i3c-target/

Host side:
cat /dev/ttyI3C0
Taret side:
echo abc >/dev/ttyI3C0

Change from v1 to v2
- change "slave" to "target"
- include master side tty patch
- fixed dtbcheck problem
- fixed kerne-doc check warning

Some review comment may be lost since it is quite long time since v1. Now master side dependent patches already in linux-next. So sent target side patches with tty support again.

No sure why an additional "\r\n" appended.

Frank Li (7):
i3c: add target mode support
dt-bindings: i3c: svc: add compatible string i3c:
silvaco,i3c-target-v1
Documentation: i3c: Add I3C target mode controller and function
i3c: target: add svc target controller support
i3c: target: func: add tty driver
i3c: add API i3c_dev_gettstatus_format1() to get target device status
tty: i3c: add TTY over I3C master support

 .../bindings/i3c/silvaco,i3c-master.yaml      |   7 +-
 Documentation/driver-api/i3c/index.rst        |   1 +
 .../driver-api/i3c/target/i3c-target-cfs.rst  | 109 +++
 .../driver-api/i3c/target/i3c-target.rst      | 189 +++++
 .../driver-api/i3c/target/i3c-tty-howto.rst   | 109 +++
 Documentation/driver-api/i3c/target/index.rst |  13 +
 drivers/i3c/Kconfig                           |  32 +-
 drivers/i3c/Makefile                          |   4 +
 drivers/i3c/device.c                          |  24 +
 drivers/i3c/func/Kconfig                      |   9 +
 drivers/i3c/func/Makefile                     |   3 +
 drivers/i3c/func/tty.c                        | 475 +++++++++++
 drivers/i3c/i3c-cfs.c                         | 389 +++++++++
 drivers/i3c/internals.h                       |   1 +
 drivers/i3c/master.c                          |  26 +
 drivers/i3c/target.c                          | 453 ++++++++++
 drivers/i3c/target/Kconfig                    |   9 +
 drivers/i3c/target/Makefile                   |   4 +
 drivers/i3c/target/svc-i3c-target.c           | 795 ++++++++++++++++++
 drivers/tty/Kconfig                           |  13 +
 drivers/tty/Makefile                          |   1 +
 drivers/tty/i3c_tty.c                         | 426 ++++++++++
 include/linux/i3c/device.h                    |   1 +
 include/linux/i3c/target.h                    | 511 +++++++++++
 24 files changed, 3600 insertions(+), 4 deletions(-)
 create mode 100644 Documentation/driver-api/i3c/target/i3c-target-cfs.rst
 create mode 100644 Documentation/driver-api/i3c/target/i3c-target.rst
 create mode 100644 Documentation/driver-api/i3c/target/i3c-tty-howto.rst
 create mode 100644 Documentation/driver-api/i3c/target/index.rst
 create mode 100644 drivers/i3c/func/Kconfig
 create mode 100644 drivers/i3c/func/Makefile
 create mode 100644 drivers/i3c/func/tty.c
 create mode 100644 drivers/i3c/i3c-cfs.c
 create mode 100644 drivers/i3c/target.c
 create mode 100644 drivers/i3c/target/Kconfig
 create mode 100644 drivers/i3c/target/Makefile
 create mode 100644 drivers/i3c/target/svc-i3c-target.c
 create mode 100644 drivers/tty/i3c_tty.c
 create mode 100644 include/linux/i3c/target.h
Signature · 1 line
2.34.1
author maintainer
#1 lore raw

PATCH v2 1/7 i3c: add target mode support

Introduce a new target core layer in order to support target functions in linux kernel. This comprises the controller library and function library. Controller library implements functions specific to an target controller and function library implements functions specific to an target function.

Introduce a new configfs entry to configure the target function configuring and bind the target function with target controller.

---
 drivers/i3c/Kconfig        |  28 +-
 drivers/i3c/Makefile       |   2 +
 drivers/i3c/i3c-cfs.c      | 389 ++++++++++++++++++++++++++++
 drivers/i3c/target.c       | 453 ++++++++++++++++++++++++++++++++
 include/linux/i3c/target.h | 511 +++++++++++++++++++++++++++++++++++++
 5 files changed, 1382 insertions(+), 1 deletion(-)
 create mode 100644 drivers/i3c/i3c-cfs.c
 create mode 100644 drivers/i3c/target.c
 create mode 100644 include/linux/i3c/target.h
drivers/i3c/Kconfig +27 -1
index 30a441506f61c..d59a7eb83d13a 100644
@@ -10,7 +10,7 @@ menuconfig I3C
 	  support for high speed transfers and native interrupt support
 	  without the need for extra pins.
 
-	  The I3C protocol also standardizes the slave device types and is
+	  The I3C protocol also standardizes the target device types and is
 	  mainly designed to communicate with sensors.
 
 	  If you want I3C support, you should say Y here and also to the
@@ -22,3 +22,29 @@ menuconfig I3C
 if I3C
 source "drivers/i3c/master/Kconfig"
 endif # I3C
+
+config I3C_TARGET
+	bool "I3C Target Support"
+	help
+	  Support I3C Target Mode.
+
+	  Enable this configuration option to support configurable I3C target.
+	  This should be enabled if the platform has a I3C controller that can
+	  operate in target mode.
+
+	  Enabling this option will build the I3C target library, which includes
+	  target controller library and target function library.
+
+	  If in doubt, say "N" to disable target support.
+
+config I3C_TARGET_CONFIGFS
+	bool "I3C Target Configfs Support"
+	depends on I3C_TARGET
+	select CONFIGFS_FS
+	help
+	  Configfs entry for target function and controller.
+
+	  This will enable the configfs entry that can be used to configure
+	  the target function and used to bind the function with a target
+	  controller.
+
drivers/i3c/Makefile +2 -0
index 11982efbc6d91..475afb40429e0 100644
@@ -2,3 +2,5 @@
 i3c-y				:= device.o master.o
 obj-$(CONFIG_I3C)		+= i3c.o
 obj-$(CONFIG_I3C)		+= master/
+obj-$(CONFIG_I3C_TARGET)		+= target.o
+obj-$(CONFIG_I3C_TARGET_CONFIGFS)	+= i3c-cfs.o
drivers/i3c/i3c-cfs.c new file +389 -0

389 lines not on this page · raw message

drivers/i3c/target.c new file +453 -0

453 lines not on this page · raw message

include/linux/i3c/target.h new file +511 -0

511 lines not on this page · raw message

Signature · 1 line
2.34.1
author maintainer
#2 lore raw

PATCH v2 2/7 dt-bindings: i3c: svc: add compatible string i3c: silvaco,i3c-target-v1

In reply to Frank Li

Add compatible string 'silvaco,i3c-target-v1' for target mode.

---
 .../devicetree/bindings/i3c/silvaco,i3c-master.yaml        | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
Documentation/devicetree/bindings/i3c/silvaco,i3c-master.yaml +4 -3
index 133855f11b4f5..17849c91d4d2b 100644
@@ -4,7 +4,7 @@
 $id: http://devicetree.org/schemas/i3c/silvaco,i3c-master.yaml#
 $schema: http://devicetree.org/meta-schemas/core.yaml#
 
-title: Silvaco I3C master
+title: Silvaco I3C master/target
 
 maintainers:
   - Conor Culhane <[email protected]>
@@ -14,8 +14,9 @@ allOf:
 
 properties:
   compatible:
-    const: silvaco,i3c-master-v1
-
+    enum:
+      - silvaco,i3c-master-v1
+      - silvaco,i3c-target-v1
   reg:
     maxItems: 1
 
Signature · 1 line
2.34.1
#3 lore raw

Re: [PATCH v2 2/7] dt-bindings: i3c: svc: add compatible string i3c: silvaco,i3c-target-v1

Quoted 1 line · Frank Li

Add compatible string 'silvaco,i3c-target-v1' for target mode.

Your subject has some multiple prefixes? Why there is one more ":"?
Just: add XYZ device

Quoted 20 lines
---
 .../devicetree/bindings/i3c/silvaco,i3c-master.yaml        | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
Documentation/devicetree/bindings/i3c/silvaco,i3c-master.yaml +1 -1
index 133855f11b4f5..17849c91d4d2b 100644
@@ -4,7 +4,7 @@
 $id: http://devicetree.org/schemas/i3c/silvaco,i3c-master.yaml#
 $schema: http://devicetree.org/meta-schemas/core.yaml#
 
-title: Silvaco I3C master
+title: Silvaco I3C master/target
 
 maintainers:
   - Conor Culhane <[email protected]>

Documentation/devicetree/bindings/i3c/silvaco,i3c-master.yaml allOf: · line 17

Quoted 4 lines
Documentation/devicetree/bindings/i3c/silvaco,i3c-master.yaml +0 -1
@@ -14,8 +14,9 @@ allOf:
 
 properties:
   compatible:
-    const: silvaco,i3c-master-v1

NAK, you got comment, didn't you? Why did you ignore it? It's like third time you try to push it ignoring what we keep asking. Pushing the same without resolving anything in previous discussion is not acceptable and it feels like waste of my time.

Documentation/devicetree/bindings/i3c/silvaco,i3c-master.yaml allOf: · line 18

Quoted 1 line
Documentation/devicetree/bindings/i3c/silvaco,i3c-master.yaml +0 -1
-

Why are you removing the blank line?

Best regards,
Krzysztof

author maintainer
#4 lore raw

Re: [PATCH v2 2/7] dt-bindings: i3c: svc: add compatible string i3c: silvaco,i3c-target-v1

Quoted 28 lines · Krzysztof Kozlowski
Quoted 1 line · Frank Li

Add compatible string 'silvaco,i3c-target-v1' for target mode.

Your subject has some multiple prefixes? Why there is one more ":"?
Just: add XYZ device

Quoted 21 lines
---
 .../devicetree/bindings/i3c/silvaco,i3c-master.yaml        | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
Documentation/devicetree/bindings/i3c/silvaco,i3c-master.yaml +1 -1
index 133855f11b4f5..17849c91d4d2b 100644
@@ -4,7 +4,7 @@
 $id: http://devicetree.org/schemas/i3c/silvaco,i3c-master.yaml#
 $schema: http://devicetree.org/meta-schemas/core.yaml#
 
-title: Silvaco I3C master
+title: Silvaco I3C master/target
 
 maintainers:
   - Conor Culhane <[email protected]>
@@ -14,8 +14,9 @@ allOf:
 
Quoted 8 lines

Documentation/devicetree/bindings/i3c/silvaco,i3c-master.yaml allOf: · line 17

Quoted 3 lines
Documentation/devicetree/bindings/i3c/silvaco,i3c-master.yaml +0 -1
 properties:
   compatible:
-    const: silvaco,i3c-master-v1

NAK, you got comment, didn't you? Why did you ignore it? It's like third time you try to push it ignoring what we keep asking. Pushing the same without resolving anything in previous discussion is not acceptable and it feels like waste of my time.

I review previous comments. The previous RFC patches and I just want I3C expert review to check if there are comments about whole software architecture. Of course, thank you for your comments about "slave".

Go back this binding doc problem.

"No, it's the same device.

Anyway, this was not tested.

Please use scripts/get_maintainers.pl to get a list of necessary people and lists to CC. It might happen, that command when run on an older kernel, gives you outdated entries. Therefore please be sure you base your patches on recent Linux kernel.

You missed at least devicetree list (maybe more), so this won't be tested by automated tooling. Performing review on untested code might be a waste of time, thus I will skip this patch entirely till you follow the process allowing the patch to be tested.

Please kindly resend and include all necessary To/Cc entries. "

It is the same devices, work at difference mode (master and target). what's do you want to change to?

Copy to new file like pci/pci-ep? all context is the same, except for compatible string.

Frank

Quoted 10 lines

Documentation/devicetree/bindings/i3c/silvaco,i3c-master.yaml allOf: · line 18

Quoted 3 lines
Documentation/devicetree/bindings/i3c/silvaco,i3c-master.yaml +0 -1
-

Why are you removing the blank line?

Best regards,
Krzysztof

#5 lore raw

Re: [PATCH v2 2/7] dt-bindings: i3c: svc: add compatible string i3c: silvaco,i3c-target-v1

Quoted 20 lines · Frank Li

I review previous comments. The previous RFC patches and I just want I3C expert review to check if there are comments about whole software architecture. Of course, thank you for your comments about "slave".

Go back this binding doc problem.

"No, it's the same device.

Anyway, this was not tested.

Please use scripts/get_maintainers.pl to get a list of necessary people and lists to CC. It might happen, that command when run on an older kernel, gives you outdated entries. Therefore please be sure you base your patches on recent Linux kernel.

You missed at least devicetree list (maybe more), so this won't be tested by automated tooling. Performing review on untested code might be a waste of time, thus I will skip this patch entirely till you follow the process allowing the patch to be tested.

Quoted 9 lines

Please kindly resend and include all necessary To/Cc entries. "

It is the same devices, work at difference mode (master and target). what's do you want to change to?

Copy to new file like pci/pci-ep? all context is the same, except for compatible string.

Apologies, I mixed up a bit patches, so this was not obvious. I meant this comment:

https://lore.kernel.org/all/[email protected]/

There is no indication in your commit msg that these concerns were addressed.

Best regards,
Krzysztof

#6 lore raw

Re: [PATCH v2 2/7] dt-bindings: i3c: svc: add compatible string i3c: silvaco,i3c-target-v1

Quoted 31 lines · Krzysztof Kozlowski
Quoted 20 lines · Frank Li

I review previous comments. The previous RFC patches and I just want I3C expert review to check if there are comments about whole software architecture. Of course, thank you for your comments about "slave".

Go back this binding doc problem.

"No, it's the same device.

Anyway, this was not tested.

Please use scripts/get_maintainers.pl to get a list of necessary people and lists to CC. It might happen, that command when run on an older kernel, gives you outdated entries. Therefore please be sure you base your patches on recent Linux kernel.

You missed at least devicetree list (maybe more), so this won't be tested by automated tooling. Performing review on untested code might be a waste of time, thus I will skip this patch entirely till you follow the process allowing the patch to be tested.

Quoted 9 lines

Please kindly resend and include all necessary To/Cc entries. "

It is the same devices, work at difference mode (master and target). what's do you want to change to?

Copy to new file like pci/pci-ep? all context is the same, except for compatible string.

Quoted 7 lines

Apologies, I mixed up a bit patches, so this was not obvious. I meant this comment:

https://lore.kernel.org/all/[email protected]/

There is no indication in your commit msg that these concerns were addressed.

And here:

https://lore.kernel.org/all/[email protected]/

Best regards,
Krzysztof

author maintainer
#7 lore raw

Re: [PATCH v2 2/7] dt-bindings: i3c: svc: add compatible string i3c: silvaco,i3c-target-v1

In reply to Krzysztof Kozlowski
Quoted 31 lines · Krzysztof Kozlowski
Quoted 20 lines · Frank Li

I review previous comments. The previous RFC patches and I just want I3C expert review to check if there are comments about whole software architecture. Of course, thank you for your comments about "slave".

Go back this binding doc problem.

"No, it's the same device.

Anyway, this was not tested.

Please use scripts/get_maintainers.pl to get a list of necessary people and lists to CC. It might happen, that command when run on an older kernel, gives you outdated entries. Therefore please be sure you base your patches on recent Linux kernel.

You missed at least devicetree list (maybe more), so this won't be tested by automated tooling. Performing review on untested code might be a waste of time, thus I will skip this patch entirely till you follow the process allowing the patch to be tested.

Quoted 9 lines

Please kindly resend and include all necessary To/Cc entries. "

It is the same devices, work at difference mode (master and target). what's do you want to change to?

Copy to new file like pci/pci-ep? all context is the same, except for compatible string.

Quoted 7 lines

Apologies, I mixed up a bit patches, so this was not obvious. I meant this comment:

https://lore.kernel.org/all/[email protected]/

There is no indication in your commit msg that these concerns were addressed.

Look like everyone already accecpted 'silvaco,i3c-master-v1'.

driver part:
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=8911eae9c8a947e5c1cc4fcce40473f1f5e475cd
dts part:
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=b8ec0f3b42a3498d5115d1fb1490082ab525747b

Frank

Quoted 4 lines

Best regards,
Krzysztof

author maintainer
#8 lore raw

Re: [PATCH v2 2/7] dt-bindings: i3c: svc: add compatible string i3c: silvaco,i3c-target-v1

Quoted 40 lines · Frank Li
Quoted 31 lines · Krzysztof Kozlowski
Quoted 20 lines · Frank Li

I review previous comments. The previous RFC patches and I just want I3C expert review to check if there are comments about whole software architecture. Of course, thank you for your comments about "slave".

Go back this binding doc problem.

"No, it's the same device.

Anyway, this was not tested.

Please use scripts/get_maintainers.pl to get a list of necessary people and lists to CC. It might happen, that command when run on an older kernel, gives you outdated entries. Therefore please be sure you base your patches on recent Linux kernel.

You missed at least devicetree list (maybe more), so this won't be tested by automated tooling. Performing review on untested code might be a waste of time, thus I will skip this patch entirely till you follow the process allowing the patch to be tested.

Quoted 9 lines

Please kindly resend and include all necessary To/Cc entries. "

It is the same devices, work at difference mode (master and target). what's do you want to change to?

Copy to new file like pci/pci-ep? all context is the same, except for compatible string.

Quoted 7 lines

Apologies, I mixed up a bit patches, so this was not obvious. I meant this comment:

https://lore.kernel.org/all/[email protected]/

There is no indication in your commit msg that these concerns were addressed.

Quoted 6 lines

Look like everyone already accecpted 'silvaco,i3c-master-v1'.

driver part:
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=8911eae9c8a947e5c1cc4fcce40473f1f5e475cd
dts part:
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=b8ec0f3b42a3498d5115d1fb1490082ab525747b

@Krzysztof:
Patches were accepted after discussion, what you ponit to. So I
think everyone agree on the name 'silvaco,i3c-master-v1'.
I plan send next version to fix auto build error. Any additional
comments about this?

Frank

Quoted 7 lines

Frank

Quoted 4 lines

Best regards,
Krzysztof

#9 lore raw

Re: [PATCH v2 2/7] dt-bindings: i3c: svc: add compatible string i3c: silvaco,i3c-target-v1

Quoted 48 lines · Frank Li
Quoted 40 lines · Frank Li
Quoted 31 lines · Krzysztof Kozlowski
Quoted 20 lines · Frank Li

I review previous comments. The previous RFC patches and I just want I3C expert review to check if there are comments about whole software architecture. Of course, thank you for your comments about "slave".

Go back this binding doc problem.

"No, it's the same device.

Anyway, this was not tested.

Please use scripts/get_maintainers.pl to get a list of necessary people and lists to CC. It might happen, that command when run on an older kernel, gives you outdated entries. Therefore please be sure you base your patches on recent Linux kernel.

You missed at least devicetree list (maybe more), so this won't be tested by automated tooling. Performing review on untested code might be a waste of time, thus I will skip this patch entirely till you follow the process allowing the patch to be tested.

Quoted 9 lines

Please kindly resend and include all necessary To/Cc entries. "

It is the same devices, work at difference mode (master and target). what's do you want to change to?

Copy to new file like pci/pci-ep? all context is the same, except for compatible string.

Quoted 7 lines

Apologies, I mixed up a bit patches, so this was not obvious. I meant this comment:

https://lore.kernel.org/all/[email protected]/

There is no indication in your commit msg that these concerns were addressed.

Quoted 6 lines

Look like everyone already accecpted 'silvaco,i3c-master-v1'.

driver part:
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=8911eae9c8a947e5c1cc4fcce40473f1f5e475cd
dts part:
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=b8ec0f3b42a3498d5115d1fb1490082ab525747b

Quoted 5 lines

@Krzysztof:
Patches were accepted after discussion, what you ponit to. So I
think everyone agree on the name 'silvaco,i3c-master-v1'.
I plan send next version to fix auto build error. Any additional
comments about this?

I still do not see how did you address Rob's comment and his point is valid. You just did not reply to it.

Best regards,
Krzysztof

author maintainer
#10 lore raw

Re: [PATCH v2 2/7] dt-bindings: i3c: svc: add compatible string i3c: silvaco,i3c-target-v1

Quoted 49 lines · Krzysztof Kozlowski
Quoted 48 lines · Frank Li
Quoted 46 lines · Frank Li
Quoted 31 lines · Krzysztof Kozlowski
Quoted 20 lines · Frank Li

I review previous comments. The previous RFC patches and I just want I3C expert review to check if there are comments about whole software architecture. Of course, thank you for your comments about "slave".

Go back this binding doc problem.

"No, it's the same device.

Anyway, this was not tested.

Please use scripts/get_maintainers.pl to get a list of necessary people and lists to CC. It might happen, that command when run on an older kernel, gives you outdated entries. Therefore please be sure you base your patches on recent Linux kernel.

You missed at least devicetree list (maybe more), so this won't be tested by automated tooling. Performing review on untested code might be a waste of time, thus I will skip this patch entirely till you follow the process allowing the patch to be tested.

Quoted 9 lines

Please kindly resend and include all necessary To/Cc entries. "

It is the same devices, work at difference mode (master and target). what's do you want to change to?

Copy to new file like pci/pci-ep? all context is the same, except for compatible string.

Quoted 7 lines

Apologies, I mixed up a bit patches, so this was not obvious. I meant this comment:

https://lore.kernel.org/all/[email protected]/

There is no indication in your commit msg that these concerns were addressed.

Look like everyone already accecpted 'silvaco,i3c-master-v1'.

driver part:
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=8911eae9c8a947e5c1cc4fcce40473f1f5e475cd
dts part:
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=b8ec0f3b42a3498d5115d1fb1490082ab525747b

Quoted 8 lines
Quoted 5 lines

@Krzysztof:
Patches were accepted after discussion, what you ponit to. So I
think everyone agree on the name 'silvaco,i3c-master-v1'.
I plan send next version to fix auto build error. Any additional
comments about this?

I still do not see how did you address Rob's comment and his point is valid. You just did not reply to it.

See https://lore.kernel.org/imx/ZXCiaKfMYYShoiXK@lizhi-Precision-Tower-5810/

Frank

Quoted 4 lines

Best regards,
Krzysztof

#11 lore raw

Re: [PATCH v2 2/7] dt-bindings: i3c: svc: add compatible string i3c: silvaco,i3c-target-v1

Quoted 9 lines · Frank Li
Quoted 7 lines
Quoted 4 lines

Patches were accepted after discussion, what you ponit to. So I
think everyone agree on the name 'silvaco,i3c-master-v1'.
I plan send next version to fix auto build error. Any additional
comments about this?

I still do not see how did you address Rob's comment and his point is valid. You just did not reply to it.

See https://lore.kernel.org/imx/ZXCiaKfMYYShoiXK@lizhi-Precision-Tower-5810/

First of all, that's not the answer to Rob's email, but some other thread which is 99% ignored by Rob (unless he has filters for "@Rob"...). Therefore no, it does not count as valid answer.

Second, explanation does not make sense. There is no argument granting you exception from SoC specific compatibles.

Best regards,
Krzysztof

#12 lore raw

Re: [PATCH v2 2/7] dt-bindings: i3c: svc: add compatible string i3c: silvaco,i3c-target-v1

Quoted 9 lines · Krzysztof Kozlowski
Quoted 8 lines · Frank Li
Quoted 7 lines
Quoted 4 lines

Patches were accepted after discussion, what you ponit to. So I
think everyone agree on the name 'silvaco,i3c-master-v1'.
I plan send next version to fix auto build error. Any additional
comments about this?

I still do not see how did you address Rob's comment and his point is valid. You just did not reply to it.

Quoted 8 lines
Quoted 1 line

See https://lore.kernel.org/imx/ZXCiaKfMYYShoiXK@lizhi-Precision-Tower-5810/

First of all, that's not the answer to Rob's email, but some other thread which is 99% ignored by Rob (unless he has filters for "@Rob"...). Therefore no, it does not count as valid answer.

Second, explanation does not make sense. There is no argument granting you exception from SoC specific compatibles.

The patch could have been applied two months ago had Frank done as was requested (multiple times). I don't understand the resistance towards doing so given the process has taken way way longer as a result.

#13 lore raw

Re: [PATCH v2 2/7] dt-bindings: i3c: svc: add compatible string i3c: silvaco,i3c-target-v1

Quoted 16 lines · Conor Dooley
Quoted 15 lines · Krzysztof Kozlowski
Quoted 9 lines · Frank Li
Quoted 7 lines
Quoted 4 lines

Patches were accepted after discussion, what you ponit to. So I
think everyone agree on the name 'silvaco,i3c-master-v1'.
I plan send next version to fix auto build error. Any additional
comments about this?

I still do not see how did you address Rob's comment and his point is valid. You just did not reply to it.

See https://lore.kernel.org/imx/ZXCiaKfMYYShoiXK@lizhi-Precision-Tower-5810/

First of all, that's not the answer to Rob's email, but some other thread which is 99% ignored by Rob (unless he has filters for "@Rob"...). Therefore no, it does not count as valid answer.

Quoted 6 lines
Quoted 2 lines

Second, explanation does not make sense. There is no argument granting you exception from SoC specific compatibles.

The patch could have been applied two months ago had Frank done as was requested (multiple times). I don't understand the resistance towards doing so given the process has taken way way longer as a result.

I think that Rob's comment was just skipped and original master binding was merged without addressing it. I don't want to repeat the same process for the "target". Indeed I could point this earlier... if I only knew that Rob pointed out that issue.

Best regards,
Krzysztof

#14 lore raw

Re: [PATCH v2 2/7] dt-bindings: i3c: svc: add compatible string i3c: silvaco,i3c-target-v1

Quoted 20 lines · Krzysztof Kozlowski
Quoted 19 lines · Conor Dooley
Quoted 17 lines · Krzysztof Kozlowski
Quoted 9 lines · Frank Li
Quoted 7 lines
Quoted 4 lines

Patches were accepted after discussion, what you ponit to. So I
think everyone agree on the name 'silvaco,i3c-master-v1'.
I plan send next version to fix auto build error. Any additional
comments about this?

I still do not see how did you address Rob's comment and his point is valid. You just did not reply to it.

See https://lore.kernel.org/imx/ZXCiaKfMYYShoiXK@lizhi-Precision-Tower-5810/

First of all, that's not the answer to Rob's email, but some other thread which is 99% ignored by Rob (unless he has filters for "@Rob"...). Therefore no, it does not count as valid answer.

Second, explanation does not make sense. There is no argument granting you exception from SoC specific compatibles.

Quoted 8 lines
Quoted 3 lines

The patch could have been applied two months ago had Frank done as was requested (multiple times). I don't understand the resistance towards doing so given the process has taken way way longer as a result.

I think that Rob's comment was just skipped and original master binding was merged without addressing it. I don't want to repeat the same process for the "target". Indeed I could point this earlier... if I only knew that Rob pointed out that issue.

Oh I think I got confused here. The context for this mail led me to think that this was still trying to push the i3c-master-v1 stuff through and I was commenting on my frustration with the resistance to applying the feedback received. I didn't realise that this was for another patch adding a target.

I think you already said it, but NAK to adding any more compatibles here until the soc-specific compatible that was asked for for the imx93 is added.

Thanks,
Conor.

author maintainer
#15 lore raw

Re: [PATCH v2 2/7] dt-bindings: i3c: svc: add compatible string i3c: silvaco,i3c-target-v1

Quoted 36 lines · Conor Dooley
Quoted 20 lines · Krzysztof Kozlowski
Quoted 19 lines · Conor Dooley
Quoted 17 lines · Krzysztof Kozlowski
Quoted 9 lines · Frank Li
Quoted 7 lines
Quoted 4 lines

Patches were accepted after discussion, what you ponit to. So I
think everyone agree on the name 'silvaco,i3c-master-v1'.
I plan send next version to fix auto build error. Any additional
comments about this?

I still do not see how did you address Rob's comment and his point is valid. You just did not reply to it.

See https://lore.kernel.org/imx/ZXCiaKfMYYShoiXK@lizhi-Precision-Tower-5810/

First of all, that's not the answer to Rob's email, but some other thread which is 99% ignored by Rob (unless he has filters for "@Rob"...). Therefore no, it does not count as valid answer.

Second, explanation does not make sense. There is no argument granting you exception from SoC specific compatibles.

Quoted 8 lines
Quoted 3 lines

The patch could have been applied two months ago had Frank done as was requested (multiple times). I don't understand the resistance towards doing so given the process has taken way way longer as a result.

I think that Rob's comment was just skipped and original master binding was merged without addressing it. I don't want to repeat the same process for the "target". Indeed I could point this earlier... if I only knew that Rob pointed out that issue.

Oh I think I got confused here. The context for this mail led me to think that this was still trying to push the i3c-master-v1 stuff through and I was commenting on my frustration with the resistance to applying the feedback received. I didn't realise that this was for another patch adding a target.

Quoted 3 lines

I think you already said it, but NAK to adding any more compatibles here until the soc-specific compatible that was asked for for the imx93 is added.

Is it okay for 'silvaco,i3c-target-imx93'?

Frank

Quoted 3 lines

Thanks,
Conor.

#16 lore raw

Re: [PATCH v2 2/7] dt-bindings: i3c: svc: add compatible string i3c: silvaco,i3c-target-v1

Quoted 37 lines · Frank Li
Quoted 36 lines · Conor Dooley
Quoted 20 lines · Krzysztof Kozlowski
Quoted 19 lines · Conor Dooley
Quoted 17 lines · Krzysztof Kozlowski
Quoted 9 lines · Frank Li
Quoted 7 lines
Quoted 4 lines

Patches were accepted after discussion, what you ponit to. So I
think everyone agree on the name 'silvaco,i3c-master-v1'.
I plan send next version to fix auto build error. Any additional
comments about this?

I still do not see how did you address Rob's comment and his point is valid. You just did not reply to it.

See https://lore.kernel.org/imx/ZXCiaKfMYYShoiXK@lizhi-Precision-Tower-5810/

First of all, that's not the answer to Rob's email, but some other thread which is 99% ignored by Rob (unless he has filters for "@Rob"...). Therefore no, it does not count as valid answer.

Second, explanation does not make sense. There is no argument granting you exception from SoC specific compatibles.

Quoted 8 lines
Quoted 3 lines

The patch could have been applied two months ago had Frank done as was requested (multiple times). I don't understand the resistance towards doing so given the process has taken way way longer as a result.

I think that Rob's comment was just skipped and original master binding was merged without addressing it. I don't want to repeat the same process for the "target". Indeed I could point this earlier... if I only knew that Rob pointed out that issue.

Oh I think I got confused here. The context for this mail led me to think that this was still trying to push the i3c-master-v1 stuff through and I was commenting on my frustration with the resistance to applying the feedback received. I didn't realise that this was for another patch adding a target.

Quoted 5 lines
Quoted 3 lines

I think you already said it, but NAK to adding any more compatibles here until the soc-specific compatible that was asked for for the imx93 is added.

Is it okay for 'silvaco,i3c-target-imx93'?

I don't know. Is the device in question capable of also operating in master mode? I have no idea from the commit message since it contains zero information on the hardware.
If the exact same controller can operate in master and target mode, having two compatibles for the same device does not seem okay to me.

Also, "silvaco" does not make the imx93 so that is not a suitable vendor prefix. If the imx93 only supports i3c IPs in target mode, I would call it "<vendorofimx>,imx93-i3c" with "silvaco,i3c-target-v1" as a fallback.

Thanks,
Conor.

author maintainer
#17 lore raw

Re: [PATCH v2 2/7] dt-bindings: i3c: svc: add compatible string i3c: silvaco,i3c-target-v1

Quoted 42 lines · Conor Dooley
Quoted 41 lines · Frank Li
Quoted 39 lines · Conor Dooley
Quoted 20 lines · Krzysztof Kozlowski
Quoted 19 lines · Conor Dooley
Quoted 17 lines · Krzysztof Kozlowski
Quoted 9 lines · Frank Li
Quoted 7 lines
Quoted 4 lines

Patches were accepted after discussion, what you ponit to. So I
think everyone agree on the name 'silvaco,i3c-master-v1'.
I plan send next version to fix auto build error. Any additional
comments about this?

I still do not see how did you address Rob's comment and his point is valid. You just did not reply to it.

See https://lore.kernel.org/imx/ZXCiaKfMYYShoiXK@lizhi-Precision-Tower-5810/

First of all, that's not the answer to Rob's email, but some other thread which is 99% ignored by Rob (unless he has filters for "@Rob"...). Therefore no, it does not count as valid answer.

Second, explanation does not make sense. There is no argument granting you exception from SoC specific compatibles.

Quoted 8 lines
Quoted 3 lines

The patch could have been applied two months ago had Frank done as was requested (multiple times). I don't understand the resistance towards doing so given the process has taken way way longer as a result.

I think that Rob's comment was just skipped and original master binding was merged without addressing it. I don't want to repeat the same process for the "target". Indeed I could point this earlier... if I only knew that Rob pointed out that issue.

Oh I think I got confused here. The context for this mail led me to think that this was still trying to push the i3c-master-v1 stuff through and I was commenting on my frustration with the resistance to applying the feedback received. I didn't realise that this was for another patch adding a target.

I think you already said it, but NAK to adding any more compatibles here until the soc-specific compatible that was asked for for the imx93 is added.

Quoted 5 lines
Quoted 1 line

Is it okay for 'silvaco,i3c-target-imx93'?

I don't know. Is the device in question capable of also operating in master mode? I have no idea from the commit message since it contains zero information on the hardware.

Yes, it is dual mode controller.

Quoted 3 lines

If the exact same controller can operate in master and target mode, having two compatibles for the same device does not seem okay to me.

what's your suggestion? create a total new yaml file for target mode (like PCI ep)?
All target information(interrupt, reg, clock) are the same as master.

Or added "mode" property instead of using difference compatible string? It may cause kconfig become complex to handle difference mode at the same drivers.

Quoted 4 lines

Also, "silvaco" does not make the imx93 so that is not a suitable vendor prefix. If the imx93 only supports i3c IPs in target mode, I would call it "<vendorofimx>,imx93-i3c" with "silvaco,i3c-target-v1" as a fallback.

Look like Rob and krysztof don't likes 'silvaco,i3c-target-v1'.

Quoted 2 lines

Thanks,
Conor.

#18 lore raw

Re: [PATCH v2 2/7] dt-bindings: i3c: svc: add compatible string i3c: silvaco,i3c-target-v1

Quoted 39 lines · Frank Li
Quoted 38 lines · Conor Dooley
Quoted 37 lines · Frank Li
Quoted 36 lines · Conor Dooley
Quoted 20 lines · Krzysztof Kozlowski
Quoted 19 lines · Conor Dooley
Quoted 17 lines · Krzysztof Kozlowski
Quoted 9 lines · Frank Li
Quoted 7 lines
Quoted 4 lines

Patches were accepted after discussion, what you ponit to. So I
think everyone agree on the name 'silvaco,i3c-master-v1'.
I plan send next version to fix auto build error. Any additional
comments about this?

I still do not see how did you address Rob's comment and his point is valid. You just did not reply to it.

See https://lore.kernel.org/imx/ZXCiaKfMYYShoiXK@lizhi-Precision-Tower-5810/

First of all, that's not the answer to Rob's email, but some other thread which is 99% ignored by Rob (unless he has filters for "@Rob"...). Therefore no, it does not count as valid answer.

Second, explanation does not make sense. There is no argument granting you exception from SoC specific compatibles.

Quoted 8 lines
Quoted 3 lines

The patch could have been applied two months ago had Frank done as was requested (multiple times). I don't understand the resistance towards doing so given the process has taken way way longer as a result.

I think that Rob's comment was just skipped and original master binding was merged without addressing it. I don't want to repeat the same process for the "target". Indeed I could point this earlier... if I only knew that Rob pointed out that issue.

Oh I think I got confused here. The context for this mail led me to think that this was still trying to push the i3c-master-v1 stuff through and I was commenting on my frustration with the resistance to applying the feedback received. I didn't realise that this was for another patch adding a target.

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 3 lines

I think you already said it, but NAK to adding any more compatibles here until the soc-specific compatible that was asked for for the imx93 is added.

Is it okay for 'silvaco,i3c-target-imx93'?

No, because imx93 is product of NXP, not Silvaco.

You need regular SoC-block compatibles, just like we have for all other snps, dwc and cdns.

Best regards,
Krzysztof

author maintainer
#19 lore raw

Re: [PATCH v2 2/7] dt-bindings: i3c: svc: add compatible string i3c: silvaco,i3c-target-v1

Quoted 44 lines · Krzysztof Kozlowski
Quoted 43 lines · Frank Li
Quoted 42 lines · Conor Dooley
Quoted 41 lines · Frank Li
Quoted 39 lines · Conor Dooley
Quoted 20 lines · Krzysztof Kozlowski
Quoted 19 lines · Conor Dooley
Quoted 17 lines · Krzysztof Kozlowski
Quoted 9 lines · Frank Li
Quoted 7 lines
Quoted 4 lines

Patches were accepted after discussion, what you ponit to. So I
think everyone agree on the name 'silvaco,i3c-master-v1'.
I plan send next version to fix auto build error. Any additional
comments about this?

I still do not see how did you address Rob's comment and his point is valid. You just did not reply to it.

See https://lore.kernel.org/imx/ZXCiaKfMYYShoiXK@lizhi-Precision-Tower-5810/

First of all, that's not the answer to Rob's email, but some other thread which is 99% ignored by Rob (unless he has filters for "@Rob"...). Therefore no, it does not count as valid answer.

Second, explanation does not make sense. There is no argument granting you exception from SoC specific compatibles.

Quoted 8 lines
Quoted 3 lines

The patch could have been applied two months ago had Frank done as was requested (multiple times). I don't understand the resistance towards doing so given the process has taken way way longer as a result.

I think that Rob's comment was just skipped and original master binding was merged without addressing it. I don't want to repeat the same process for the "target". Indeed I could point this earlier... if I only knew that Rob pointed out that issue.

Oh I think I got confused here. The context for this mail led me to think that this was still trying to push the i3c-master-v1 stuff through and I was commenting on my frustration with the resistance to applying the feedback received. I didn't realise that this was for another patch adding a target.

I think you already said it, but NAK to adding any more compatibles here until the soc-specific compatible that was asked for for the imx93 is added.

Quoted 6 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line

Is it okay for 'silvaco,i3c-target-imx93'?

No, because imx93 is product of NXP, not Silvaco.

You need regular SoC-block compatibles, just like we have for all other snps, dwc and cdns.

"nxp,imx93-svc-i3c-target" ? Just little bit strange for binding file name is silvaco,i3c-master.yaml.

look like "dwc,*" compatitble string's file name is "dwc,*".yaml.

Frank

Quoted 5 lines

Best regards,
Krzysztof

#20 lore raw

Re: [PATCH v2 2/7] dt-bindings: i3c: svc: add compatible string i3c: silvaco,i3c-target-v1

Quoted 45 lines · Frank Li
Quoted 44 lines · Krzysztof Kozlowski
Quoted 43 lines · Frank Li
Quoted 42 lines · Conor Dooley
Quoted 41 lines · Frank Li
Quoted 39 lines · Conor Dooley
Quoted 20 lines · Krzysztof Kozlowski
Quoted 19 lines · Conor Dooley
Quoted 17 lines · Krzysztof Kozlowski
Quoted 9 lines · Frank Li
Quoted 7 lines
Quoted 4 lines

Patches were accepted after discussion, what you ponit to. So I
think everyone agree on the name 'silvaco,i3c-master-v1'.
I plan send next version to fix auto build error. Any additional
comments about this?

I still do not see how did you address Rob's comment and his point is valid. You just did not reply to it.

See https://lore.kernel.org/imx/ZXCiaKfMYYShoiXK@lizhi-Precision-Tower-5810/

First of all, that's not the answer to Rob's email, but some other thread which is 99% ignored by Rob (unless he has filters for "@Rob"...). Therefore no, it does not count as valid answer.

Second, explanation does not make sense. There is no argument granting you exception from SoC specific compatibles.

Quoted 8 lines
Quoted 3 lines

The patch could have been applied two months ago had Frank done as was requested (multiple times). I don't understand the resistance towards doing so given the process has taken way way longer as a result.

I think that Rob's comment was just skipped and original master binding was merged without addressing it. I don't want to repeat the same process for the "target". Indeed I could point this earlier... if I only knew that Rob pointed out that issue.

Oh I think I got confused here. The context for this mail led me to think that this was still trying to push the i3c-master-v1 stuff through and I was commenting on my frustration with the resistance to applying the feedback received. I didn't realise that this was for another patch adding a target.

I think you already said it, but NAK to adding any more compatibles here until the soc-specific compatible that was asked for for the imx93 is added.

Quoted 8 lines
Quoted 6 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line

Is it okay for 'silvaco,i3c-target-imx93'?

No, because imx93 is product of NXP, not Silvaco.

You need regular SoC-block compatibles, just like we have for all other snps, dwc and cdns.

"nxp,imx93-svc-i3c-target" ?

Could be, now please point me to patch adding such code to DTS. I would like to see the real use case for it.

Quoted 2 lines

Just little bit strange for binding file name
is silvaco,i3c-master.yaml.

Many other bindings do it. I don't see a problem in creating device specific schema sharing some parts, if you have some common pieces.

Quoted 2 lines

look like "dwc,*" compatitble string's file name is "dwc,*".yaml.

? I don't understand how is this related, but if this is what you want to discuss then look:
Documentation/devicetree/bindings/usb/qcom,dwc3.yaml

or many other examples. Please open dwc, snps and cdns bindings and look how it is done there.

Best regards,
Krzysztof

#21 lore raw

Re: [PATCH v2 2/7] dt-bindings: i3c: svc: add compatible string i3c: silvaco,i3c-target-v1

Quoted 50 lines · Krzysztof Kozlowski
Quoted 49 lines · Frank Li
Quoted 48 lines · Krzysztof Kozlowski
Quoted 39 lines · Frank Li
Quoted 38 lines · Conor Dooley
Quoted 37 lines · Frank Li
Quoted 36 lines · Conor Dooley
Quoted 20 lines · Krzysztof Kozlowski
Quoted 19 lines · Conor Dooley
Quoted 17 lines · Krzysztof Kozlowski
Quoted 9 lines · Frank Li
Quoted 7 lines
Quoted 4 lines

Patches were accepted after discussion, what you ponit to. So I
think everyone agree on the name 'silvaco,i3c-master-v1'.
I plan send next version to fix auto build error. Any additional
comments about this?

I still do not see how did you address Rob's comment and his point is valid. You just did not reply to it.

See https://lore.kernel.org/imx/ZXCiaKfMYYShoiXK@lizhi-Precision-Tower-5810/

First of all, that's not the answer to Rob's email, but some other thread which is 99% ignored by Rob (unless he has filters for "@Rob"...). Therefore no, it does not count as valid answer.

Second, explanation does not make sense. There is no argument granting you exception from SoC specific compatibles.

Quoted 8 lines
Quoted 3 lines

The patch could have been applied two months ago had Frank done as was requested (multiple times). I don't understand the resistance towards doing so given the process has taken way way longer as a result.

I think that Rob's comment was just skipped and original master binding was merged without addressing it. I don't want to repeat the same process for the "target". Indeed I could point this earlier... if I only knew that Rob pointed out that issue.

Oh I think I got confused here. The context for this mail led me to think that this was still trying to push the i3c-master-v1 stuff through and I was commenting on my frustration with the resistance to applying the feedback received. I didn't realise that this was for another patch adding a target.

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 3 lines

I think you already said it, but NAK to adding any more compatibles here until the soc-specific compatible that was asked for for the imx93 is added.

Is it okay for 'silvaco,i3c-target-imx93'?

No, because imx93 is product of NXP, not Silvaco.

Quoted 7 lines
Quoted 4 lines
Quoted 2 lines

You need regular SoC-block compatibles, just like we have for all other snps, dwc and cdns.

"nxp,imx93-svc-i3c-target" ?

Could be, now please point me to patch adding such code to DTS. I would like to see the real use case for it.

Probably I was not clear enough, so let's be more precise: I think you might have troubles pointing to such code, because it just does not exist. It is a bit contradicting to single hardware description, because you want to describe one hardware in two different ways, with two different compatibles.

Your commit msg is here empty - it says what patch is does, which is obvious. Tells nothing about the hardware being described here, which does not help this discussion. This would need solving as well, but main point stays - don't add new compatibles for the same hardware, at least not without valid reason/explanation.

Best regards,
Krzysztof

author maintainer
#22 lore raw

Re: [PATCH v2 2/7] dt-bindings: i3c: svc: add compatible string i3c: silvaco,i3c-target-v1

Quoted 65 lines · Krzysztof Kozlowski
Quoted 50 lines · Krzysztof Kozlowski
Quoted 49 lines · Frank Li
Quoted 48 lines · Krzysztof Kozlowski
Quoted 39 lines · Frank Li
Quoted 38 lines · Conor Dooley
Quoted 37 lines · Frank Li
Quoted 36 lines · Conor Dooley
Quoted 20 lines · Krzysztof Kozlowski
Quoted 19 lines · Conor Dooley
Quoted 17 lines · Krzysztof Kozlowski
Quoted 9 lines · Frank Li
Quoted 7 lines

Patches were accepted after discussion, what you ponit to. So I
think everyone agree on the name 'silvaco,i3c-master-v1'.
I plan send next version to fix auto build error. Any additional
comments about this?

I still do not see how did you address Rob's comment and his point is
valid. You just did not reply to it.

See https://lore.kernel.org/imx/ZXCiaKfMYYShoiXK@lizhi-Precision-Tower-5810/

First of all, that's not the answer to Rob's email, but some other thread which is 99% ignored by Rob (unless he has filters for "@Rob"...). Therefore no, it does not count as valid answer.

Second, explanation does not make sense. There is no argument granting you exception from SoC specific compatibles.

Quoted 8 lines
Quoted 3 lines

The patch could have been applied two months ago had Frank done as was requested (multiple times). I don't understand the resistance towards doing so given the process has taken way way longer as a result.

I think that Rob's comment was just skipped and original master binding was merged without addressing it. I don't want to repeat the same process for the "target". Indeed I could point this earlier... if I only knew that Rob pointed out that issue.

Oh I think I got confused here. The context for this mail led me to think that this was still trying to push the i3c-master-v1 stuff through and I was commenting on my frustration with the resistance to applying the feedback received. I didn't realise that this was for another patch adding a target.

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 3 lines

I think you already said it, but NAK to adding any more compatibles here until the soc-specific compatible that was asked for for the imx93 is added.

Is it okay for 'silvaco,i3c-target-imx93'?

No, because imx93 is product of NXP, not Silvaco.

Quoted 7 lines
Quoted 4 lines
Quoted 2 lines

You need regular SoC-block compatibles, just like we have for all other snps, dwc and cdns.

"nxp,imx93-svc-i3c-target" ?

Could be, now please point me to patch adding such code to DTS. I would like to see the real use case for it.

Probably I was not clear enough, so let's be more precise: I think you might have troubles pointing to such code, because it just does not exist. It is a bit contradicting to single hardware description, because you want to describe one hardware in two different ways, with two different compatibles.

Quoted 5 lines

Your commit msg is here empty - it says what patch is does, which is obvious. Tells nothing about the hardware being described here, which does not help this discussion. This would need solving as well, but main point stays - don't add new compatibles for the same hardware, at least not without valid reason/explanation.

I can improve commt msg. It was similar PCI case (There are two work mode:
root complex and endpoint). So there are two kind compatible string for it.

If you think it is good for using two compatible string for two work mode of the same hardware.

I can write git commit message like:

dt-bindings: i3c: svc: add compatible string nxp,imx93-svc-i3c-target

silvaco i3c controller is dual mode controller, which can work as master and target mode. All clock, reg, irq are the same for both mode. Add compatible string "nxp,imx93-svc-i3c-target" to let silivaco i3c controller work as target mode.

Of course, alternate method to added a property "mode" to distingiush master and target mode. but old "silvaco,i3c-master-v1" will actually work as dual mode support. Driver structure will become complex.

Frank

Quoted 4 lines

Best regards,
Krzysztof

#23 lore raw

Re: [PATCH v2 2/7] dt-bindings: i3c: svc: add compatible string i3c: silvaco,i3c-target-v1

Quoted 72 lines · Frank Li
Quoted 65 lines · Krzysztof Kozlowski
Quoted 50 lines · Krzysztof Kozlowski
Quoted 49 lines · Frank Li
Quoted 48 lines · Krzysztof Kozlowski
Quoted 39 lines · Frank Li
Quoted 38 lines · Conor Dooley
Quoted 37 lines · Frank Li
Quoted 36 lines · Conor Dooley
Quoted 20 lines · Krzysztof Kozlowski
Quoted 19 lines · Conor Dooley
Quoted 17 lines · Krzysztof Kozlowski
Quoted 9 lines · Frank Li

Patches were accepted after discussion, what you ponit to. So I
think everyone agree on the name 'silvaco,i3c-master-v1'.
I plan send next version to fix auto build error. Any additional
comments about this?

I still do not see how did you address Rob's comment and his point is
valid. You just did not reply to it.

See https://lore.kernel.org/imx/ZXCiaKfMYYShoiXK@lizhi-Precision-Tower-5810/

First of all, that's not the answer to Rob's email, but some other thread which is 99% ignored by Rob (unless he has filters for "@Rob"...). Therefore no, it does not count as valid answer.

Second, explanation does not make sense. There is no argument granting you exception from SoC specific compatibles.

Quoted 8 lines
Quoted 3 lines

The patch could have been applied two months ago had Frank done as was requested (multiple times). I don't understand the resistance towards doing so given the process has taken way way longer as a result.

I think that Rob's comment was just skipped and original master binding was merged without addressing it. I don't want to repeat the same process for the "target". Indeed I could point this earlier... if I only knew that Rob pointed out that issue.

Oh I think I got confused here. The context for this mail led me to think that this was still trying to push the i3c-master-v1 stuff through and I was commenting on my frustration with the resistance to applying the feedback received. I didn't realise that this was for another patch adding a target.

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 3 lines

I think you already said it, but NAK to adding any more compatibles here until the soc-specific compatible that was asked for for the imx93 is added.

Is it okay for 'silvaco,i3c-target-imx93'?

No, because imx93 is product of NXP, not Silvaco.

Quoted 7 lines
Quoted 4 lines
Quoted 2 lines

You need regular SoC-block compatibles, just like we have for all other snps, dwc and cdns.

"nxp,imx93-svc-i3c-target" ?

Could be, now please point me to patch adding such code to DTS. I would like to see the real use case for it.

Probably I was not clear enough, so let's be more precise: I think you might have troubles pointing to such code, because it just does not exist. It is a bit contradicting to single hardware description, because you want to describe one hardware in two different ways, with two different compatibles.

Quoted 5 lines

Your commit msg is here empty - it says what patch is does, which is obvious. Tells nothing about the hardware being described here, which does not help this discussion. This would need solving as well, but main point stays - don't add new compatibles for the same hardware, at least not without valid reason/explanation.

Quoted 5 lines

I can improve commt msg. It was similar PCI case (There are two work mode:
root complex and endpoint). So there are two kind compatible string for it.

If you think it is good for using two compatible string for two work mode of the same hardware.

Not really, because compatible describes hardware and it is the same hardware here. We do not have two different compatibles for GPIOs being input or output. Or two different compatibles for serial engines (ones providing UART, SPI or I2C).

Quoted 5 lines

I can write git commit message like:

dt-bindings: i3c: svc: add compatible string nxp,imx93-svc-i3c-target

Quoted 8 lines

silvaco i3c controller is dual mode controller, which can work as master and target mode. All clock, reg, irq are the same for both mode. Add compatible string "nxp,imx93-svc-i3c-target" to let silivaco i3c controller work as target mode.

Of course, alternate method to added a property "mode" to distingiush master and target mode. but old "silvaco,i3c-master-v1" will actually work as dual mode support. Driver structure will become complex.

Please send full DTS of user for this, which works for 100%, so we can see how it differs from controller mode. If your code snippet from other thread is correct, then it would suggest "mode" property or lack of children. Maybe lack of children is not enough, if user-space could control I3C bus.

Best regards,
Krzysztof

author maintainer
#24 lore raw

Re: [PATCH v2 2/7] dt-bindings: i3c: svc: add compatible string i3c: silvaco,i3c-target-v1

Quoted 76 lines · Krzysztof Kozlowski
Quoted 75 lines · Frank Li
Quoted 65 lines · Krzysztof Kozlowski
Quoted 50 lines · Krzysztof Kozlowski
Quoted 49 lines · Frank Li
Quoted 48 lines · Krzysztof Kozlowski
Quoted 39 lines · Frank Li
Quoted 38 lines · Conor Dooley
Quoted 37 lines · Frank Li
Quoted 36 lines · Conor Dooley
Quoted 20 lines · Krzysztof Kozlowski
Quoted 19 lines · Conor Dooley
Quoted 17 lines · Krzysztof Kozlowski

On 16/01/2024 03:29, Frank Li wrote:
Patches were accepted after discussion, what you ponit to. So I
think everyone agree on the name 'silvaco,i3c-master-v1'.
I plan send next version to fix auto build error. Any additional
comments about this?

I still do not see how did you address Rob's comment and his point is
valid. You just did not reply to it.

See https://lore.kernel.org/imx/ZXCiaKfMYYShoiXK@lizhi-Precision-Tower-5810/

First of all, that's not the answer to Rob's email, but some other
thread which is 99% ignored by Rob (unless he has filters for
"@Rob"...). Therefore no, it does not count as valid answer.

Second, explanation does not make sense. There is no argument granting
you exception from SoC specific compatibles.

Quoted 8 lines
Quoted 3 lines

The patch could have been applied two months ago had Frank done as was requested (multiple times). I don't understand the resistance towards doing so given the process has taken way way longer as a result.

I think that Rob's comment was just skipped and original master binding was merged without addressing it. I don't want to repeat the same process for the "target". Indeed I could point this earlier... if I only knew that Rob pointed out that issue.

Oh I think I got confused here. The context for this mail led me to think that this was still trying to push the i3c-master-v1 stuff through and I was commenting on my frustration with the resistance to applying the feedback received. I didn't realise that this was for another patch adding a target.

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 3 lines

I think you already said it, but NAK to adding any more compatibles here until the soc-specific compatible that was asked for for the imx93 is added.

Is it okay for 'silvaco,i3c-target-imx93'?

No, because imx93 is product of NXP, not Silvaco.

Quoted 7 lines
Quoted 4 lines
Quoted 2 lines

You need regular SoC-block compatibles, just like we have for all other snps, dwc and cdns.

"nxp,imx93-svc-i3c-target" ?

Could be, now please point me to patch adding such code to DTS. I would like to see the real use case for it.

Probably I was not clear enough, so let's be more precise: I think you might have troubles pointing to such code, because it just does not exist. It is a bit contradicting to single hardware description, because you want to describe one hardware in two different ways, with two different compatibles.

Quoted 5 lines

Your commit msg is here empty - it says what patch is does, which is obvious. Tells nothing about the hardware being described here, which does not help this discussion. This would need solving as well, but main point stays - don't add new compatibles for the same hardware, at least not without valid reason/explanation.

I can improve commt msg. It was similar PCI case (There are two work mode:
root complex and endpoint). So there are two kind compatible string for it.

Quoted 7 lines
Quoted 2 lines

If you think it is good for using two compatible string for two work mode of the same hardware.

Not really, because compatible describes hardware and it is the same hardware here. We do not have two different compatibles for GPIOs being input or output. Or two different compatibles for serial engines (ones providing UART, SPI or I2C).

GPIO and UART is simple. Actuall SPI and I2C have two mode, slave and master. Many SPI/I2C is dual mode controller. Just seldom use slave mode at linux side. So you just see master mode SPI/I2C controller in dt-binding and dts file. So few people upstream slave part to linux kernel community. They have the exact same problems if support slave mode.

PCI is typical example:

EP mode:  Documentation/devicetree/bindings/pci/qcom,pcie-ep.yaml
RC mode:  Documentation/devicetree/bindings/pci/qcom,pcie.yaml

Which is the same hardware for two difference compatible string.

Quoted 15 lines
Quoted 6 lines

I can write git commit message like:

dt-bindings: i3c: svc: add compatible string nxp,imx93-svc-i3c-target

Quoted 8 lines

silvaco i3c controller is dual mode controller, which can work as master and target mode. All clock, reg, irq are the same for both mode. Add compatible string "nxp,imx93-svc-i3c-target" to let silivaco i3c controller work as target mode.

Of course, alternate method to added a property "mode" to distingiush master and target mode. but old "silvaco,i3c-master-v1" will actually work as dual mode support. Driver structure will become complex.

Quoted 5 lines

Please send full DTS of user for this, which works for 100%, so we can see how it differs from controller mode. If your code snippet from other thread is correct, then it would suggest "mode" property or lack of children. Maybe lack of children is not enough, if user-space could control I3C bus.

According to current implment, only need change imx93.dtsi's @i3c1's compatible string to "silvaco,i3c-target-v1". I attached imx93 dts node for your reference.

	i3c1: i3c-master@44330000 {                        
                                compatible = "silvaco,i3c-master-v1"; 
					     ^^^^ only need change here!
   
                                reg = <0x44330000 0x10000>;                
                                interrupts = <GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH>;
                                #address-cells = <3>;                      
                                #size-cells = <0>;                         
                                clocks = <&clk IMX93_CLK_BUS_AON>,         
                                         <&clk IMX93_CLK_I3C1_GATE>,       
                                         <&clk IMX93_CLK_I3C1_SLOW>;       
                                clock-names = "pclk", "fast_clk", "slow_clk";
                                dmas = <&edma1 6 0 1>, <&edma1 5 0 0>;     
                                dma-names = "rx", "tx";                    
                                status = "disabled";                       
                        }; 

For master mode:
Unlike i2c. Genenally I3C can auto probe children node like USB can auto detect attached devices. So I3C master can work without children nodes. Such as auto load i3c sensor driver according to i3c standard vendor id and production id.

For target mode: using configfs to controller I3C.

mkdir /sys/kernel/config/i3c_target/functions/tty/t
echo 0x011b > /sys/kernel/config/i3c_target/functions/tty/t/vendor_id echo 0x1000 > /sys/kernel/config/i3c_target/functions/tty/t/part_id echo 0x6 > /sys/kernel/config/i3c_target/functions/tty/t/bcr

ln -s /sys/kernel/config/i3c_target/functions/tty/t /sys/kernel/config/i3c_target/controllers/44330000.i3c-master/

Then you echo test >/dev/ttySI3C0.

Unlike USB, user can switch host and gadget mode dymatically. Suppose I3C only work on one of master or slave mode only, which is static.

Although it is one hardware, I think it is exculsive multi function device.

Summary: basice two option to distingiush controller and target mode.
1. by "compatible" string
2. by "mode"

I think 1 is relatively simple and easy to understand.

Quoted 4 lines

Best regards,
Krzysztof

#25 lore raw

Re: [PATCH v2 2/7] dt-bindings: i3c: svc: add compatible string i3c: silvaco,i3c-target-v1

Quoted 7 lines · Frank Li
Quoted 5 lines

Not really, because compatible describes hardware and it is the same hardware here. We do not have two different compatibles for GPIOs being input or output. Or two different compatibles for serial engines (ones providing UART, SPI or I2C).

GPIO and UART is simple. Actuall SPI and I2C have two mode, slave and

I talked about serial engines which can be multiple: UART, SPI and I2C.

Quoted 10 lines

master. Many SPI/I2C is dual mode controller. Just seldom use slave mode at linux side. So you just see master mode SPI/I2C controller in dt-binding and dts file. So few people upstream slave part to linux kernel community. They have the exact same problems if support slave mode.

PCI is typical example:

EP mode:  Documentation/devicetree/bindings/pci/qcom,pcie-ep.yaml
RC mode:  Documentation/devicetree/bindings/pci/qcom,pcie.yaml

Which is the same hardware for two difference compatible string.

That's the only case, I recall.

Quoted 21 lines
Quoted 15 lines
Quoted 6 lines

I can write git commit message like:

dt-bindings: i3c: svc: add compatible string nxp,imx93-svc-i3c-target

Quoted 8 lines

silvaco i3c controller is dual mode controller, which can work as master and target mode. All clock, reg, irq are the same for both mode. Add compatible string "nxp,imx93-svc-i3c-target" to let silivaco i3c controller work as target mode.

Of course, alternate method to added a property "mode" to distingiush master and target mode. but old "silvaco,i3c-master-v1" will actually work as dual mode support. Driver structure will become complex.

Quoted 5 lines

Please send full DTS of user for this, which works for 100%, so we can see how it differs from controller mode. If your code snippet from other thread is correct, then it would suggest "mode" property or lack of children. Maybe lack of children is not enough, if user-space could control I3C bus.

Quoted 7 lines

According to current implment, only need change imx93.dtsi's @i3c1's compatible string to "silvaco,i3c-target-v1". I attached imx93 dts node for your reference.

	i3c1: i3c-master@44330000 {                        
                                compatible = "silvaco,i3c-master-v1"; 
					     ^^^^ only need change here!

Nope, don't change compatibles of existing nodes. Unreadable and unmanageable code.

Quoted 13 lines
   
                                reg = <0x44330000 0x10000>;                
                                interrupts = <GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH>;
                                #address-cells = <3>;                      
                                #size-cells = <0>;                         
                                clocks = <&clk IMX93_CLK_BUS_AON>,         
                                         <&clk IMX93_CLK_I3C1_GATE>,       
                                         <&clk IMX93_CLK_I3C1_SLOW>;       
                                clock-names = "pclk", "fast_clk", "slow_clk";
                                dmas = <&edma1 6 0 1>, <&edma1 5 0 0>;     
                                dma-names = "rx", "tx";                    
                                status = "disabled";                       
                        }; 

That's not a patch for existing file. I did not claim you cannot write such DTS. I claimed you don't have such DTS for upstream...

Quoted 6 lines

For master mode:
Unlike i2c. Genenally I3C can auto probe children node like USB can auto detect attached devices. So I3C master can work without children nodes. Such as auto load i3c sensor driver according to i3c standard vendor id and production id.

Then presence of children cannot be used.

Quoted 8 lines

For target mode: using configfs to controller I3C.

mkdir /sys/kernel/config/i3c_target/functions/tty/t
echo 0x011b > /sys/kernel/config/i3c_target/functions/tty/t/vendor_id echo 0x1000 > /sys/kernel/config/i3c_target/functions/tty/t/part_id echo 0x6 > /sys/kernel/config/i3c_target/functions/tty/t/bcr

Quoted 6 lines

ln -s /sys/kernel/config/i3c_target/functions/tty/t /sys/kernel/config/i3c_target/controllers/44330000.i3c-master/

Then you echo test >/dev/ttySI3C0.

Unlike USB, user can switch host and gadget mode dymatically. Suppose I3C only work on one of master or slave mode only, which is static.

I don't understand this. So it can switch dynamically or not?

Quoted 2 lines

Although it is one hardware, I think it is exculsive multi function device.

Just like serial engines. Do you see there replacing compatibles? No.

Quoted 6 lines

Summary: basice two option to distingiush controller and target mode.
1. by "compatible" string
2. by "mode"

I think 1 is relatively simple and easy to understand.

Eh, if you only saw my comments on people replacing compatibles... Anyway, I stated my reasons, so to reiterate: NAK.

Best regards,
Krzysztof

author maintainer
#26 lore raw

Re: [PATCH v2 2/7] dt-bindings: i3c: svc: add compatible string i3c: silvaco,i3c-target-v1

Quoted 16 lines · Krzysztof Kozlowski
Quoted 7 lines · Frank Li
Quoted 5 lines

Not really, because compatible describes hardware and it is the same hardware here. We do not have two different compatibles for GPIOs being input or output. Or two different compatibles for serial engines (ones providing UART, SPI or I2C).

GPIO and UART is simple. Actuall SPI and I2C have two mode, slave and

I talked about serial engines which can be multiple: UART, SPI and I2C.

Quoted 5 lines

master. Many SPI/I2C is dual mode controller. Just seldom use slave mode at linux side. So you just see master mode SPI/I2C controller in dt-binding and dts file. So few people upstream slave part to linux kernel community. They have the exact same problems if support slave mode.

Quoted 7 lines
Quoted 5 lines

PCI is typical example:

EP mode:  Documentation/devicetree/bindings/pci/qcom,pcie-ep.yaml
RC mode:  Documentation/devicetree/bindings/pci/qcom,pcie.yaml

Which is the same hardware for two difference compatible string.

That's the only case, I recall.

As my knowledge, yes.

Quoted 26 lines
Quoted 26 lines
Quoted 16 lines
Quoted 7 lines

I can write git commit message like:

dt-bindings: i3c: svc: add compatible string nxp,imx93-svc-i3c-target

Quoted 8 lines

silvaco i3c controller is dual mode controller, which can work as master and target mode. All clock, reg, irq are the same for both mode. Add compatible string "nxp,imx93-svc-i3c-target" to let silivaco i3c controller work as target mode.

Of course, alternate method to added a property "mode" to distingiush master and target mode. but old "silvaco,i3c-master-v1" will actually work as dual mode support. Driver structure will become complex.

Quoted 5 lines

Please send full DTS of user for this, which works for 100%, so we can see how it differs from controller mode. If your code snippet from other thread is correct, then it would suggest "mode" property or lack of children. Maybe lack of children is not enough, if user-space could control I3C bus.

According to current implment, only need change imx93.dtsi's @i3c1's compatible string to "silvaco,i3c-target-v1". I attached imx93 dts node for your reference.

Quoted 6 lines
Quoted 3 lines
	i3c1: i3c-master@44330000 {                        
                                compatible = "silvaco,i3c-master-v1"; 
					     ^^^^ only need change here!

Nope, don't change compatibles of existing nodes. Unreadable and unmanageable code.

It is just show minimize difference.

Normally, it should be.

	i3c1: i3c-master@44330000 {
		...
		compatible = "silvaco,i3c-master-v1";
		...
		status = disabled;
	}
	
	i3c1-target: i3c-target@44330000 {
		...
		compatible = "silvaco,i3c-target-v1";
		...
		status = disabled;
	}

in board dts

@i3c1{
	status = "okay";
}

Or

@i3c1-target{
	status = "okay";
}
Quoted 15 lines
Quoted 14 lines
   
                                reg = <0x44330000 0x10000>;                
                                interrupts = <GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH>;
                                #address-cells = <3>;                      
                                #size-cells = <0>;                         
                                clocks = <&clk IMX93_CLK_BUS_AON>,         
                                         <&clk IMX93_CLK_I3C1_GATE>,       
                                         <&clk IMX93_CLK_I3C1_SLOW>;       
                                clock-names = "pclk", "fast_clk", "slow_clk";
                                dmas = <&edma1 6 0 1>, <&edma1 5 0 0>;     
                                dma-names = "rx", "tx";                    
                                status = "disabled";                       
                        }; 
Quoted 2 lines

That's not a patch for existing file. I did not claim you cannot write such DTS. I claimed you don't have such DTS for upstream...

Yes, it need finialize this topic before handle dts upstream.

Quoted 18 lines
Quoted 7 lines

For master mode:
Unlike i2c. Genenally I3C can auto probe children node like USB can auto detect attached devices. So I3C master can work without children nodes. Such as auto load i3c sensor driver according to i3c standard vendor id and production id.

Then presence of children cannot be used.

Quoted 8 lines

For target mode: using configfs to controller I3C.

mkdir /sys/kernel/config/i3c_target/functions/tty/t
echo 0x011b > /sys/kernel/config/i3c_target/functions/tty/t/vendor_id echo 0x1000 > /sys/kernel/config/i3c_target/functions/tty/t/part_id echo 0x6 > /sys/kernel/config/i3c_target/functions/tty/t/bcr

Quoted 8 lines
Quoted 6 lines

ln -s /sys/kernel/config/i3c_target/functions/tty/t /sys/kernel/config/i3c_target/controllers/44330000.i3c-master/

Then you echo test >/dev/ttySI3C0.

Unlike USB, user can switch host and gadget mode dymatically. Suppose I3C only work on one of master or slave mode only, which is static.

I don't understand this. So it can switch dynamically or not?

I3C Protocal allow do that. But no one really do that.

Quoted 7 lines
Quoted 3 lines

Although it is one hardware, I think it is exculsive multi function device.

Just like serial engines. Do you see there replacing compatibles? No.

Quoted 1 line
Quoted 8 lines
Quoted 5 lines

Summary: basice two option to distingiush controller and target mode.
1. by "compatible" string
2. by "mode"

I think 1 is relatively simple and easy to understand.

Eh, if you only saw my comments on people replacing compatibles... Anyway, I stated my reasons, so to reiterate: NAK.

I know it. Needn't emphase it every time.

Is using "mode" ('controller' and 'target') proptery okay?

Frank

Quoted 4 lines

Best regards,
Krzysztof

author maintainer
#27 lore raw

Re: [PATCH v2 2/7] dt-bindings: i3c: svc: add compatible string i3c: silvaco,i3c-target-v1

Quoted 148 lines · Frank Li
Quoted 16 lines · Krzysztof Kozlowski
Quoted 7 lines · Frank Li
Quoted 5 lines

Not really, because compatible describes hardware and it is the same hardware here. We do not have two different compatibles for GPIOs being input or output. Or two different compatibles for serial engines (ones providing UART, SPI or I2C).

GPIO and UART is simple. Actuall SPI and I2C have two mode, slave and

I talked about serial engines which can be multiple: UART, SPI and I2C.

Quoted 5 lines

master. Many SPI/I2C is dual mode controller. Just seldom use slave mode at linux side. So you just see master mode SPI/I2C controller in dt-binding and dts file. So few people upstream slave part to linux kernel community. They have the exact same problems if support slave mode.

Quoted 7 lines
Quoted 5 lines

PCI is typical example:

EP mode:  Documentation/devicetree/bindings/pci/qcom,pcie-ep.yaml
RC mode:  Documentation/devicetree/bindings/pci/qcom,pcie.yaml

Which is the same hardware for two difference compatible string.

That's the only case, I recall.

As my knowledge, yes.

Quoted 26 lines
Quoted 26 lines
Quoted 16 lines
Quoted 7 lines

I can write git commit message like:

dt-bindings: i3c: svc: add compatible string nxp,imx93-svc-i3c-target

Quoted 8 lines

silvaco i3c controller is dual mode controller, which can work as master and target mode. All clock, reg, irq are the same for both mode. Add compatible string "nxp,imx93-svc-i3c-target" to let silivaco i3c controller work as target mode.

Of course, alternate method to added a property "mode" to distingiush master and target mode. but old "silvaco,i3c-master-v1" will actually work as dual mode support. Driver structure will become complex.

Quoted 5 lines

Please send full DTS of user for this, which works for 100%, so we can see how it differs from controller mode. If your code snippet from other thread is correct, then it would suggest "mode" property or lack of children. Maybe lack of children is not enough, if user-space could control I3C bus.

According to current implment, only need change imx93.dtsi's @i3c1's compatible string to "silvaco,i3c-target-v1". I attached imx93 dts node for your reference.

Quoted 6 lines
Quoted 3 lines
	i3c1: i3c-master@44330000 {                        
                                compatible = "silvaco,i3c-master-v1"; 
					     ^^^^ only need change here!

Nope, don't change compatibles of existing nodes. Unreadable and unmanageable code.

It is just show minimize difference.

Normally, it should be.

	i3c1: i3c-master@44330000 {
		...
		compatible = "silvaco,i3c-master-v1";
		...
		status = disabled;
	}
	
	i3c1-target: i3c-target@44330000 {
		...
		compatible = "silvaco,i3c-target-v1";
		...
		status = disabled;
	}

in board dts

@i3c1{
	status = "okay";
}

Or

@i3c1-target{
	status = "okay";
}
Quoted 15 lines
Quoted 14 lines
   
                                reg = <0x44330000 0x10000>;                
                                interrupts = <GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH>;
                                #address-cells = <3>;                      
                                #size-cells = <0>;                         
                                clocks = <&clk IMX93_CLK_BUS_AON>,         
                                         <&clk IMX93_CLK_I3C1_GATE>,       
                                         <&clk IMX93_CLK_I3C1_SLOW>;       
                                clock-names = "pclk", "fast_clk", "slow_clk";
                                dmas = <&edma1 6 0 1>, <&edma1 5 0 0>;     
                                dma-names = "rx", "tx";                    
                                status = "disabled";                       
                        }; 
Quoted 2 lines

That's not a patch for existing file. I did not claim you cannot write such DTS. I claimed you don't have such DTS for upstream...

Yes, it need finialize this topic before handle dts upstream.

Quoted 18 lines
Quoted 7 lines

For master mode:
Unlike i2c. Genenally I3C can auto probe children node like USB can auto detect attached devices. So I3C master can work without children nodes. Such as auto load i3c sensor driver according to i3c standard vendor id and production id.

Then presence of children cannot be used.

Quoted 8 lines

For target mode: using configfs to controller I3C.

mkdir /sys/kernel/config/i3c_target/functions/tty/t
echo 0x011b > /sys/kernel/config/i3c_target/functions/tty/t/vendor_id echo 0x1000 > /sys/kernel/config/i3c_target/functions/tty/t/part_id echo 0x6 > /sys/kernel/config/i3c_target/functions/tty/t/bcr

Quoted 8 lines
Quoted 6 lines

ln -s /sys/kernel/config/i3c_target/functions/tty/t /sys/kernel/config/i3c_target/controllers/44330000.i3c-master/

Then you echo test >/dev/ttySI3C0.

Unlike USB, user can switch host and gadget mode dymatically. Suppose I3C only work on one of master or slave mode only, which is static.

I don't understand this. So it can switch dynamically or not?

I3C Protocal allow do that. But no one really do that.

Quoted 11 lines
Quoted 3 lines

Although it is one hardware, I think it is exculsive multi function device.

Just like serial engines. Do you see there replacing compatibles? No.

Quoted 5 lines

Summary: basice two option to distingiush controller and target mode.
1. by "compatible" string
2. by "mode"

Quoted 8 lines
Quoted 4 lines
Quoted 1 line

I think 1 is relatively simple and easy to understand.

Eh, if you only saw my comments on people replacing compatibles... Anyway, I stated my reasons, so to reiterate: NAK.

I know it. Needn't emphase it every time.

Is using "mode" ('controller' and 'target') proptery okay?

@krzyszkof:
Do you agree using "mode"?

Frank

Quoted 7 lines

Frank

Quoted 4 lines

Best regards,
Krzysztof

author maintainer
#28 lore raw

Re: [PATCH v2 2/7] dt-bindings: i3c: svc: add compatible string i3c: silvaco,i3c-target-v1

In reply to Krzysztof Kozlowski
Quoted 50 lines · Krzysztof Kozlowski
Quoted 49 lines · Frank Li
Quoted 48 lines · Krzysztof Kozlowski
Quoted 39 lines · Frank Li
Quoted 38 lines · Conor Dooley
Quoted 37 lines · Frank Li
Quoted 36 lines · Conor Dooley
Quoted 20 lines · Krzysztof Kozlowski
Quoted 19 lines · Conor Dooley
Quoted 17 lines · Krzysztof Kozlowski
Quoted 9 lines · Frank Li
Quoted 7 lines
Quoted 4 lines

Patches were accepted after discussion, what you ponit to. So I
think everyone agree on the name 'silvaco,i3c-master-v1'.
I plan send next version to fix auto build error. Any additional
comments about this?

I still do not see how did you address Rob's comment and his point is valid. You just did not reply to it.

See https://lore.kernel.org/imx/ZXCiaKfMYYShoiXK@lizhi-Precision-Tower-5810/

First of all, that's not the answer to Rob's email, but some other thread which is 99% ignored by Rob (unless he has filters for "@Rob"...). Therefore no, it does not count as valid answer.

Second, explanation does not make sense. There is no argument granting you exception from SoC specific compatibles.

Quoted 8 lines
Quoted 3 lines

The patch could have been applied two months ago had Frank done as was requested (multiple times). I don't understand the resistance towards doing so given the process has taken way way longer as a result.

I think that Rob's comment was just skipped and original master binding was merged without addressing it. I don't want to repeat the same process for the "target". Indeed I could point this earlier... if I only knew that Rob pointed out that issue.

Oh I think I got confused here. The context for this mail led me to think that this was still trying to push the i3c-master-v1 stuff through and I was commenting on my frustration with the resistance to applying the feedback received. I didn't realise that this was for another patch adding a target.

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 3 lines

I think you already said it, but NAK to adding any more compatibles here until the soc-specific compatible that was asked for for the imx93 is added.

Is it okay for 'silvaco,i3c-target-imx93'?

No, because imx93 is product of NXP, not Silvaco.

Quoted 7 lines
Quoted 4 lines
Quoted 2 lines

You need regular SoC-block compatibles, just like we have for all other snps, dwc and cdns.

"nxp,imx93-svc-i3c-target" ?

Could be, now please point me to patch adding such code to DTS. I would like to see the real use case for it.

This part have not sent to review yet. basically in imx93evk.dts add

&i3c1 { 
	compatible = "silvaco,i3c-target-v1";
        pinctrl-names = "default", "sleep";                                
        pinctrl-0 = <&pinctrl_i3c1>;                                       
        pinctrl-1 = <&pinctrl_i3c1>;                                       
        status = "okay"
}
Quoted 20 lines
Quoted 3 lines

Just little bit strange for binding file name
is silvaco,i3c-master.yaml.

Many other bindings do it. I don't see a problem in creating device specific schema sharing some parts, if you have some common pieces.

Quoted 2 lines

look like "dwc,*" compatitble string's file name is "dwc,*".yaml.

? I don't understand how is this related, but if this is what you want to discuss then look:
Documentation/devicetree/bindings/usb/qcom,dwc3.yaml

or many other examples. Please open dwc, snps and cdns bindings and look how it is done there.

Best regards,
Krzysztof

#29 lore raw

Re: [PATCH v2 2/7] dt-bindings: i3c: svc: add compatible string i3c: silvaco,i3c-target-v1

Quoted 15 lines · Frank Li
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

Is it okay for 'silvaco,i3c-target-imx93'?

No, because imx93 is product of NXP, not Silvaco.

Quoted 7 lines
Quoted 4 lines
Quoted 2 lines

You need regular SoC-block compatibles, just like we have for all other snps, dwc and cdns.

"nxp,imx93-svc-i3c-target" ?

Could be, now please point me to patch adding such code to DTS. I would like to see the real use case for it.

This part have not sent to review yet. basically in imx93evk.dts add

Quoted 7 lines
&i3c1 { 
	compatible = "silvaco,i3c-target-v1";
        pinctrl-names = "default", "sleep";                                
        pinctrl-0 = <&pinctrl_i3c1>;                                       
        pinctrl-1 = <&pinctrl_i3c1>;                                       
        status = "okay"
}

Overriding compatible is not desired. It also supports here the statement that this is the same hardware.

Best regards,
Krzysztof

author maintainer
#30 lore raw

PATCH v2 3/7 Documentation: i3c: Add I3C target mode controller and function

In reply to Frank Li

Add I3C target mode and tty over i3c func driver document.

---
 Documentation/driver-api/i3c/index.rst        |   1 +
 .../driver-api/i3c/target/i3c-target-cfs.rst  | 109 ++++++++++
 .../driver-api/i3c/target/i3c-target.rst      | 189 ++++++++++++++++++
 .../driver-api/i3c/target/i3c-tty-howto.rst   | 109 ++++++++++
 Documentation/driver-api/i3c/target/index.rst |  13 ++
 5 files changed, 421 insertions(+)
 create mode 100644 Documentation/driver-api/i3c/target/i3c-target-cfs.rst
 create mode 100644 Documentation/driver-api/i3c/target/i3c-target.rst
 create mode 100644 Documentation/driver-api/i3c/target/i3c-tty-howto.rst
 create mode 100644 Documentation/driver-api/i3c/target/index.rst
Documentation/driver-api/i3c/index.rst +1 -0
index 783d6dad054b6..345a43c9f61b0 100644
@@ -9,3 +9,4 @@ I3C subsystem
    protocol
    device-driver-api
    master-driver-api
+   target/index
Documentation/driver-api/i3c/target/i3c-target-cfs.rst new file +109 -0

109 lines not on this page · raw message

Documentation/driver-api/i3c/target/i3c-target.rst new file +189 -0

189 lines not on this page · raw message

Documentation/driver-api/i3c/target/i3c-tty-howto.rst new file +109 -0

109 lines not on this page · raw message

Documentation/driver-api/i3c/target/index.rst new file +13 -0
new file mode 100644
index 0000000000000..56eabfae83aa4
@@ -0,0 +1,13 @@
+.. SPDX-License-Identifier: GPL-2.0
+
+======================
+I3C Target Framework
+======================
+
+.. toctree::
+   :maxdepth: 2
+
+   i3c-target
+   i3c-target-cfs
+   i3c-tty-howto
+
Signature · 1 line
2.34.1
#31 lore raw

Re: [PATCH v2 3/7] Documentation: i3c: Add I3C target mode controller and function

kernel test robot noticed the following build warnings:

Hi Frank,

kernel test robot noticed the following build warnings:

[auto build test WARNING on tty/tty-testing]
[also build test WARNING on tty/tty-next tty/tty-linus robh/for-next linus/master v6.7 next-20240111] [If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Frank-Li/i3c-add-target-mode-support/20240111-015711
base:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git tty-testing
patch link:    https://lore.kernel.org/r/20240110175221.2335480-4-Frank.Li%40nxp.com
patch subject: [PATCH v2 3/7] Documentation: i3c: Add I3C target mode controller and function
reproduce: (https://download.01.org/0day-ci/archive/20240112/[email protected]/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

All warnings (new ones prefixed by >>):

>> Warning: Documentation/driver-api/i3c/target/i3c-target-cfs.rst references a file that doesn't exist: Documentation/I3C/target/pci-target.rst
>> Documentation/driver-api/i3c/target/i3c-target.rst:38: WARNING: Title underline too short.
>> Documentation/driver-api/i3c/target/i3c-target-cfs.rst:73: WARNING: Title underline too short.
>> Documentation/driver-api/i3c/target/i3c-tty-howto.rst:45: WARNING: Title underline too short.
Signature · 2 lines
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
author maintainer
#32 lore raw

PATCH v2 4/7 i3c: target: add svc target controller support

In reply to Frank Li

Add Silvaco I3C target controller support

---
 drivers/i3c/Kconfig                 |   3 +
 drivers/i3c/Makefile                |   1 +
 drivers/i3c/target/Kconfig          |   9 +
 drivers/i3c/target/Makefile         |   4 +
 drivers/i3c/target/svc-i3c-target.c | 795 ++++++++++++++++++++++++++++
 5 files changed, 812 insertions(+)
 create mode 100644 drivers/i3c/target/Kconfig
 create mode 100644 drivers/i3c/target/Makefile
 create mode 100644 drivers/i3c/target/svc-i3c-target.c
drivers/i3c/Kconfig +3 -0
index d59a7eb83d13a..08ceef313f831 100644
@@ -48,3 +48,6 @@ config I3C_TARGET_CONFIGFS
 	  the target function and used to bind the function with a target
 	  controller.
 
+if I3C_TARGET
+source "drivers/i3c/target/Kconfig"
+endif # I3C_TARGET
drivers/i3c/Makefile +1 -0
index 475afb40429e0..c36455cb852ea 100644
@@ -4,3 +4,4 @@ obj-$(CONFIG_I3C)		+= i3c.o
 obj-$(CONFIG_I3C)		+= master/
 obj-$(CONFIG_I3C_TARGET)		+= target.o
 obj-$(CONFIG_I3C_TARGET_CONFIGFS)	+= i3c-cfs.o
+obj-$(CONFIG_I3C_TARGET)		+= target/
drivers/i3c/target/Kconfig new file +9 -0
new file mode 100644
index 0000000000000..6b6307117caab
@@ -0,0 +1,9 @@
+# SPDX-License-Identifier: GPL-2.0
+
+config I3C_TARGET_CTRL_SVC
+	tristate "Silvaco I3C Dual-Role Target driver"
+	depends on I3C
+	depends on HAS_IOMEM
+	depends on !(ALPHA || PARISC)
+	help
+	  Support for Silvaco I3C Dual-Role Target Controller.
drivers/i3c/target/Makefile new file +4 -0
new file mode 100644
index 0000000000000..10e160f66e3dc
@@ -0,0 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
+
+obj-${CONFIG_I3C_TARGET_CTRL_SVC} += svc-i3c-target.o
+
drivers/i3c/target/svc-i3c-target.c new file +795 -0

795 lines not on this page · raw message

Signature · 1 line
2.34.1
#33 lore raw

Re: [PATCH v2 4/7] i3c: target: add svc target controller support

kernel test robot noticed the following build warnings:

Hi Frank,

kernel test robot noticed the following build warnings:

[auto build test WARNING on tty/tty-testing]
[also build test WARNING on tty/tty-next tty/tty-linus robh/for-next linus/master v6.7 next-20240111] [If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Frank-Li/i3c-add-target-mode-support/20240111-015711
base:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git tty-testing
patch link:    https://lore.kernel.org/r/20240110175221.2335480-5-Frank.Li%40nxp.com
patch subject: [PATCH v2 4/7] i3c: target: add svc target controller support
config: powerpc-allmodconfig (https://download.01.org/0day-ci/archive/20240111/[email protected]/config)
compiler: clang version 18.0.0git (https://github.com/llvm/llvm-project 9bde5becb44ea071f5e1fa1f5d4071dc8788b18c)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240111/[email protected]/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

All warnings (new ones prefixed by >>):

In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:24:
In file included from include/linux/mm.h:1084:
In file included from include/linux/huge_mm.h:8:
In file included from include/linux/fs.h:33:
In file included from include/linux/percpu-rwsem.h:7:
In file included from include/linux/rcuwait.h:6:
In file included from include/linux/sched/signal.h:6:
include/linux/signal.h:186:1: warning: array index 1 is past the end of the array (that has type 'unsigned long[1]') [-Warray-bounds]

     186 | _SIG_SET_OP(signotset, _sig_not)
         | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/signal.h:176:10: note: expanded from macro '_SIG_SET_OP'
     176 |         case 2: set->sig[1] = op(set->sig[1]);                          \
         |                 ^        ~
   arch/powerpc/include/uapi/asm/signal.h:18:2: note: array 'sig' declared here
      18 |         unsigned long sig[_NSIG_WORDS];
         |         ^
   In file included from drivers/i3c/target/svc-i3c-target.c:14:
   In file included from include/linux/interrupt.h:11:
   In file included from include/linux/hardirq.h:11:
   In file included from arch/powerpc/include/asm/hardirq.h:6:
   In file included from include/linux/irq.h:20:
   In file included from include/linux/io.h:13:
   In file included from arch/powerpc/include/asm/io.h:24:
   In file included from include/linux/mm.h:1084:
   In file included from include/linux/huge_mm.h:8:
   In file included from include/linux/fs.h:33:
   In file included from include/linux/percpu-rwsem.h:7:
   In file included from include/linux/rcuwait.h:6:
   In file included from include/linux/sched/signal.h:6:
   include/linux/signal.h:197:10: warning: array index 1 is past the end of the array (that has type 'unsigned long[1]') [-Warray-bounds]
     197 |         case 2: set->sig[1] = 0;
         |                 ^        ~
   arch/powerpc/include/uapi/asm/signal.h:18:2: note: array 'sig' declared here
      18 |         unsigned long sig[_NSIG_WORDS];
         |         ^
   In file included from drivers/i3c/target/svc-i3c-target.c:14:
   In file included from include/linux/interrupt.h:11:
   In file included from include/linux/hardirq.h:11:
   In file included from arch/powerpc/include/asm/hardirq.h:6:
   In file included from include/linux/irq.h:20:
   In file included from include/linux/io.h:13:
   In file included from arch/powerpc/include/asm/io.h:24:
   In file included from include/linux/mm.h:1084:
   In file included from include/linux/huge_mm.h:8:
   In file included from include/linux/fs.h:33:
   In file included from include/linux/percpu-rwsem.h:7:
   In file included from include/linux/rcuwait.h:6:
   In file included from include/linux/sched/signal.h:6:
   include/linux/signal.h:210:10: warning: array index 1 is past the end of the array (that has type 'unsigned long[1]') [-Warray-bounds]
     210 |         case 2: set->sig[1] = -1;
         |                 ^        ~
   arch/powerpc/include/uapi/asm/signal.h:18:2: note: array 'sig' declared here
      18 |         unsigned long sig[_NSIG_WORDS];
         |         ^
   In file included from drivers/i3c/target/svc-i3c-target.c:14:
   In file included from include/linux/interrupt.h:11:
   In file included from include/linux/hardirq.h:11:
   In file included from arch/powerpc/include/asm/hardirq.h:6:
   In file included from include/linux/irq.h:20:
   In file included from include/linux/io.h:13:
   In file included from arch/powerpc/include/asm/io.h:24:
   In file included from include/linux/mm.h:1084:
   In file included from include/linux/huge_mm.h:8:
   In file included from include/linux/fs.h:33:
   In file included from include/linux/percpu-rwsem.h:7:
   In file included from include/linux/rcuwait.h:6:
   In file included from include/linux/sched/signal.h:6:
   include/linux/signal.h:241:10: warning: array index 1 is past the end of the array (that has type 'unsigned long[1]') [-Warray-bounds]
     241 |         case 2: set->sig[1] = 0;
         |                 ^        ~
   arch/powerpc/include/uapi/asm/signal.h:18:2: note: array 'sig' declared here
      18 |         unsigned long sig[_NSIG_WORDS];
         |         ^
   In file included from drivers/i3c/target/svc-i3c-target.c:14:
   In file included from include/linux/interrupt.h:11:
   In file included from include/linux/hardirq.h:11:
   In file included from arch/powerpc/include/asm/hardirq.h:6:
   In file included from include/linux/irq.h:20:
   In file included from include/linux/io.h:13:
   In file included from arch/powerpc/include/asm/io.h:24:
   In file included from include/linux/mm.h:1084:
   In file included from include/linux/huge_mm.h:8:
   In file included from include/linux/fs.h:33:
   In file included from include/linux/percpu-rwsem.h:7:
   In file included from include/linux/rcuwait.h:6:
   In file included from include/linux/sched/signal.h:6:
   include/linux/signal.h:254:10: warning: array index 1 is past the end of the array (that has type 'unsigned long[1]') [-Warray-bounds]
     254 |         case 2: set->sig[1] = -1;
         |                 ^        ~
   arch/powerpc/include/uapi/asm/signal.h:18:2: note: array 'sig' declared here
      18 |         unsigned long sig[_NSIG_WORDS];
         |         ^
   drivers/i3c/target/svc-i3c-target.c:211:40: warning: no previous prototype for function 'svc_i3c_get_features' [-Wmissing-prototypes]
     211 | const struct i3c_target_ctrl_features *svc_i3c_get_features(struct i3c_target_ctrl *ctrl)
         |                                        ^
   drivers/i3c/target/svc-i3c-target.c:211:7: note: declare 'static' if the function is not intended to be used outside of this translation unit
     211 | const struct i3c_target_ctrl_features *svc_i3c_get_features(struct i3c_target_ctrl *ctrl)
         |       ^
         | static 
>> drivers/i3c/target/svc-i3c-target.c:268:63: warning: omitting the parameter name in a function definition is a C23 extension [-Wc23-extensions]
     268 | static int svc_i3c_target_queue(struct i3c_request *req, gfp_t)
         |                                                               ^
   drivers/i3c/target/svc-i3c-target.c:666:5: warning: no previous prototype for function 'svc_i3c_fifo_status' [-Wmissing-prototypes]
     666 | int svc_i3c_fifo_status(struct i3c_target_ctrl *ctrl, bool tx)
         |     ^
   drivers/i3c/target/svc-i3c-target.c:666:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
     666 | int svc_i3c_fifo_status(struct i3c_target_ctrl *ctrl, bool tx)
         | ^
         | static 

52 warnings and 5 errors generated.

vim +268 drivers/i3c/target/svc-i3c-target.c

267

 > 268	static int svc_i3c_target_queue(struct i3c_request *req, gfp_t)

269 {
270 struct svc_i3c_target *svc;
271 struct list_head *q;
272 unsigned long flags;
273 spinlock_t *lk;
274
275 svc = dev_get_drvdata(&req->ctrl->dev);
276 if (!svc)
277 return -EINVAL;
278
279 if (req->tx) {
280 q = &svc->txq;
281 lk = &svc->txq_lock;
282 } else {
283 q = &svc->rxq;
284 lk = &svc->rxq_lock;
285 }
286
287 spin_lock_irqsave(lk, flags);
288 list_add_tail(&req->list, q);
289 spin_unlock_irqrestore(lk, flags);
290
291 if (req->tx)
292 svc_i3c_fill_txfifo(svc);
293
294 if (req->tx)
295 writel_relaxed(I3C_SINT_TXSEND, svc->regs + I3C_SINTSET);
296 else
297 writel_relaxed(I3C_SINT_RXPEND, svc->regs + I3C_SINTSET);
298
299 return 0;
300 }
301

Signature · 2 lines
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
#34 lore raw

Re: [PATCH v2 4/7] i3c: target: add svc target controller support

In reply to Frank Li
kernel test robot noticed the following build warnings:

Hi Frank,

kernel test robot noticed the following build warnings:

[auto build test WARNING on tty/tty-testing]
[also build test WARNING on tty/tty-next tty/tty-linus robh/for-next linus/master v6.7 next-20240111] [If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Frank-Li/i3c-add-target-mode-support/20240111-015711
base:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git tty-testing
patch link:    https://lore.kernel.org/r/20240110175221.2335480-5-Frank.Li%40nxp.com
patch subject: [PATCH v2 4/7] i3c: target: add svc target controller support
config: x86_64-allmodconfig (https://download.01.org/0day-ci/archive/20240111/[email protected]/config)
compiler: ClangBuiltLinux clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240111/[email protected]/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

All warnings (new ones prefixed by >>):

>> drivers/i3c/target/svc-i3c-target.c:211:40: warning: no previous prototype for function 'svc_i3c_get_features' [-Wmissing-prototypes]
     211 | const struct i3c_target_ctrl_features *svc_i3c_get_features(struct i3c_target_ctrl *ctrl)
         |                                        ^
   drivers/i3c/target/svc-i3c-target.c:211:7: note: declare 'static' if the function is not intended to be used outside of this translation unit
     211 | const struct i3c_target_ctrl_features *svc_i3c_get_features(struct i3c_target_ctrl *ctrl)
         |       ^
         | static 
>> drivers/i3c/target/svc-i3c-target.c:268:63: warning: omitting the parameter name in a function definition is a C2x extension [-Wc2x-extensions]
     268 | static int svc_i3c_target_queue(struct i3c_request *req, gfp_t)
         |                                                               ^
>> drivers/i3c/target/svc-i3c-target.c:666:5: warning: no previous prototype for function 'svc_i3c_fifo_status' [-Wmissing-prototypes]
     666 | int svc_i3c_fifo_status(struct i3c_target_ctrl *ctrl, bool tx)
         |     ^
   drivers/i3c/target/svc-i3c-target.c:666:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
     666 | int svc_i3c_fifo_status(struct i3c_target_ctrl *ctrl, bool tx)
         | ^
         | static 

3 warnings generated.

vim +/svc_i3c_get_features +211 drivers/i3c/target/svc-i3c-target.c

210

 > 211	const struct i3c_target_ctrl_features *svc_i3c_get_features(struct i3c_target_ctrl *ctrl)
   212	{
   213		struct svc_i3c_target *svc;
   214	
   215		svc = dev_get_drvdata(&ctrl->dev);
   216	
   217		if (!svc)
   218			return NULL;
   219	
   220		return &svc->features;
   221	}
   222	
   223	static void svc_i3c_queue_complete(struct svc_i3c_target *svc, struct i3c_request *complete)
   224	{
   225		unsigned long flags;
   226	
   227		spin_lock_irqsave(&svc->cq_lock, flags);
   228		list_add_tail(&complete->list, &svc->cq);
   229		spin_unlock_irqrestore(&svc->cq_lock, flags);
   230		queue_work(svc->workqueue, &svc->work);
   231	}
   232	
   233	static void svc_i3c_fill_txfifo(struct svc_i3c_target *svc)
   234	{
   235		struct i3c_request *req, *complete = NULL;
   236		unsigned long flags;
   237		int val;
   238	
   239		spin_lock_irqsave(&svc->txq_lock, flags);
   240		while ((!!(req = list_first_entry_or_null(&svc->txq, struct i3c_request, list))) &&
   241		       !((readl_relaxed(svc->regs + I3C_SDATACTRL) & I3C_SDATACTRL_TXFULL_MASK))) {
   242			while (!(readl_relaxed(svc->regs + I3C_SDATACTRL)
   243						& I3C_SDATACTRL_TXFULL_MASK)) {
   244				val = *(u8 *)(req->buf + req->actual);
   245	
   246				if (req->actual + 1 == req->length)
   247					writel_relaxed(val, svc->regs + I3C_SWDATAE);
   248				else
   249					writel_relaxed(val, svc->regs + I3C_SWDATAB);
   250	
   251				req->actual++;
   252	
   253				if (req->actual == req->length) {
   254					list_del(&req->list);
   255					complete = req;
   256					spin_unlock_irqrestore(&svc->txq_lock, flags);
   257	
   258					svc_i3c_queue_complete(svc, complete);
   259	
   260					spin_lock_irqsave(&svc->txq_lock, flags);
   261					break;
   262				}
   263			}
   264		}
   265		spin_unlock_irqrestore(&svc->txq_lock, flags);
   266	}
   267	
 > 268	static int svc_i3c_target_queue(struct i3c_request *req, gfp_t)

269 {
270 struct svc_i3c_target *svc;
271 struct list_head *q;
272 unsigned long flags;
273 spinlock_t *lk;
274
275 svc = dev_get_drvdata(&req->ctrl->dev);
276 if (!svc)
277 return -EINVAL;
278
279 if (req->tx) {
280 q = &svc->txq;
281 lk = &svc->txq_lock;
282 } else {
283 q = &svc->rxq;
284 lk = &svc->rxq_lock;
285 }
286
287 spin_lock_irqsave(lk, flags);
288 list_add_tail(&req->list, q);
289 spin_unlock_irqrestore(lk, flags);
290
291 if (req->tx)
292 svc_i3c_fill_txfifo(svc);
293
294 if (req->tx)
295 writel_relaxed(I3C_SINT_TXSEND, svc->regs + I3C_SINTSET);
296 else
297 writel_relaxed(I3C_SINT_RXPEND, svc->regs + I3C_SINTSET);
298
299 return 0;
300 }
301

Signature · 2 lines
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
author maintainer
#35 lore raw

PATCH v2 5/7 i3c: target: func: add tty driver

In reply to Frank Li

Add tty over I3C target function driver.

---
 drivers/i3c/Kconfig       |   1 +
 drivers/i3c/Makefile      |   1 +
 drivers/i3c/func/Kconfig  |   9 +
 drivers/i3c/func/Makefile |   3 +
 drivers/i3c/func/tty.c    | 475 ++++++++++++++++++++++++++++++++++++++
 5 files changed, 489 insertions(+)
 create mode 100644 drivers/i3c/func/Kconfig
 create mode 100644 drivers/i3c/func/Makefile
 create mode 100644 drivers/i3c/func/tty.c
drivers/i3c/Kconfig +1 -0
index 08ceef313f831..e524a8777e182 100644
@@ -50,4 +50,5 @@ config I3C_TARGET_CONFIGFS
 
 if I3C_TARGET
 source "drivers/i3c/target/Kconfig"
+source "drivers/i3c/func/Kconfig"
 endif # I3C_TARGET
drivers/i3c/Makefile +1 -0
index c36455cb852ea..1f7e5fa9d25c2 100644
@@ -5,3 +5,4 @@ obj-$(CONFIG_I3C)		+= master/
 obj-$(CONFIG_I3C_TARGET)		+= target.o
 obj-$(CONFIG_I3C_TARGET_CONFIGFS)	+= i3c-cfs.o
 obj-$(CONFIG_I3C_TARGET)		+= target/
+obj-$(CONFIG_I3C_TARGET)		+= func/
drivers/i3c/func/Kconfig new file +9 -0
new file mode 100644
index 0000000000000..6302061e02279
@@ -0,0 +1,9 @@
+# SPDX-License-Identifier: GPL-2.0
+
+config I3C_TARGET_FUNC_TTY
+	tristate "PCI Endpoint Test driver"
+	depends on I3C_TARGET
+	help
+	  I3C Target TTY Function Driver.
+
+	  General TTY over I3C target controller function drivers.
drivers/i3c/func/Makefile new file +3 -0
new file mode 100644
index 0000000000000..16b3b9301496b
@@ -0,0 +1,3 @@
+# SPDX-License-Identifier: GPL-2.0
+
+obj-$(CONFIG_I3C_TARGET_FUNC_TTY)              += tty.o
drivers/i3c/func/tty.c new file +475 -0

475 lines not on this page · raw message

Signature · 1 line
2.34.1
author maintainer
#36 lore raw

PATCH v2 6/7 i3c: add API i3c_dev_gettstatus_format1() to get target device status

In reply to Frank Li

I3C standard 5.1.9.3.15 Get Device Status (GETSTATUS):
Get request for one I3C Target Device to return its current status.

Add API to fetch it with format1.

---
 drivers/i3c/device.c       | 24 ++++++++++++++++++++++++
 drivers/i3c/internals.h    |  1 +
 drivers/i3c/master.c       | 26 ++++++++++++++++++++++++++
 include/linux/i3c/device.h |  1 +
 4 files changed, 52 insertions(+)
drivers/i3c/device.c +24 -0
index 1a6a8703dbc3a..aa26cf50ab9c6 100644
@@ -196,6 +196,30 @@ void i3c_device_free_ibi(struct i3c_device *dev)
 }
 EXPORT_SYMBOL_GPL(i3c_device_free_ibi);
 
+/**
+ * i3c_device_getstatus_format1() - Get device status with format 1.
+ * @dev: device for which you want to get status.
+ * @status: I3C status format 1
+ *
+ * Return: 0 in case of success, a negative error core otherwise.
+ */
+int i3c_device_getstatus_format1(struct i3c_device *dev, u16 *status)
+{
+	int ret = -EINVAL;
+
+	if (!status)
+		return -EINVAL;
+
+	i3c_bus_normaluse_lock(dev->bus);
+	if (dev->desc)
+		ret = i3c_dev_getstatus_format1_locked(dev->desc, status);
+
+	i3c_bus_normaluse_unlock(dev->bus);
+
+	return ret;
+}
+EXPORT_SYMBOL_GPL(i3c_device_getstatus_format1);
+
 /**
  * i3cdev_to_dev() - Returns the device embedded in @i3cdev
  * @i3cdev: I3C device
drivers/i3c/internals.h +1 -0
index 908a807badaf9..976ad26ca79c2 100644
@@ -24,4 +24,5 @@ int i3c_dev_enable_ibi_locked(struct i3c_dev_desc *dev);
 int i3c_dev_request_ibi_locked(struct i3c_dev_desc *dev,
 			       const struct i3c_ibi_setup *req);
 void i3c_dev_free_ibi_locked(struct i3c_dev_desc *dev);
+int i3c_dev_getstatus_format1_locked(struct i3c_dev_desc *dev, u16 *status);
 #endif /* I3C_INTERNAL_H */
drivers/i3c/master.c +26 -0
index d3b56c9f601e2..81611a3e3585a 100644
@@ -2923,6 +2923,32 @@ void i3c_dev_free_ibi_locked(struct i3c_dev_desc *dev)
 	dev->ibi = NULL;
 }
 
+int i3c_dev_getstatus_format1_locked(struct i3c_dev_desc *dev, u16 *status)
+{
+	struct i3c_master_controller *master = i3c_dev_get_master(dev);
+	struct i3c_ccc_getstatus *format1;
+	struct i3c_ccc_cmd_dest dest;
+	struct i3c_ccc_cmd cmd;
+	int ret;
+
+	format1 = i3c_ccc_cmd_dest_init(&dest, dev->info.dyn_addr, sizeof(*format1));
+	if (!format1)
+		return -ENOMEM;
+
+	i3c_ccc_cmd_init(&cmd, true, I3C_CCC_GETSTATUS, &dest, 1);
+
+	ret = i3c_master_send_ccc_cmd_locked(master, &cmd);
+	if (ret)
+		goto out;
+
+	*status = be16_to_cpu(format1->status);
+
+out:
+	i3c_ccc_cmd_dest_cleanup(&dest);
+
+	return ret;
+}
+
 static int __init i3c_init(void)
 {
 	int res;
include/linux/i3c/device.h +1 -0
index ef6217da8253b..5f511bd400f11 100644
@@ -345,4 +345,5 @@ void i3c_device_free_ibi(struct i3c_device *dev);
 int i3c_device_enable_ibi(struct i3c_device *dev);
 int i3c_device_disable_ibi(struct i3c_device *dev);
 
+int i3c_device_getstatus_format1(struct i3c_device *dev, u16 *status);
 #endif /* I3C_DEV_H */
Signature · 1 line
2.34.1
author maintainer
#37 lore raw

PATCH v2 7/7 tty: i3c: add TTY over I3C master support

In reply to Frank Li

In typical embedded Linux systems, UART consoles require at least two pins, TX and RX. In scenarios where I2C/I3C devices like sensors or PMICs are present, we can save these two pins by using this driver. Pins is crucial resources, especially in small chip packages.

This introduces support for using the I3C bus to transfer console tty data, effectively replacing the need for dedicated UART pins. This not only conserves valuable pin resources but also facilitates testing of I3C's advanced features, including early termination, in-band interrupt (IBI) support, and the creation of more complex data patterns. Additionally, it aids in identifying and addressing issues within the I3C controller driver.

---

Notes:
Version number use i3c target patches.
Change v2
- using system_unbound_wq working queue
- fixed accoring to Jiri Slaby's comments

Change before send with i3c target support

Change from v4 to v5
- send in i3c improvememtn patches.

Change from v2 to v4
- none

Change from v1 to v2
- update commit message.
- using goto for err handle
- using one working queue for all tty-i3c device
- fixed typo found by js
- update kconfig help
- using kfifo

Still below items not be fixed (according to Jiri Slaby's comments)
- rxwork thread: need trigger from two position.
- common thread queue: need some suggestion

 drivers/tty/Kconfig   |  13 ++
 drivers/tty/Makefile  |   1 +
 drivers/tty/i3c_tty.c | 426 ++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 440 insertions(+)
 create mode 100644 drivers/tty/i3c_tty.c
drivers/tty/Kconfig +13 -0
index 5646dc6242cd9..9ab4cd480e9f8 100644
@@ -412,6 +412,19 @@ config RPMSG_TTY
 	  To compile this driver as a module, choose M here: the module will be
 	  called rpmsg_tty.
 
+config I3C_TTY
+	tristate "TTY over I3C"
+	depends on I3C
+	help
+	  Select this option to use TTY over I3C master controller.
+
+	  This makes it possible for user-space programs to send and receive
+	  data as a standard tty protocol. I3C provide relatively higher data
+	  transfer rate and less pin numbers, SDA/SCL are shared with other
+	  devices.
+
+	  If unsure, say N
+
 endif # TTY
 
 source "drivers/tty/serdev/Kconfig"
drivers/tty/Makefile +1 -0
index 07aca5184a55d..f329f9c7d308a 100644
@@ -27,5 +27,6 @@ obj-$(CONFIG_GOLDFISH_TTY)	+= goldfish.o
 obj-$(CONFIG_MIPS_EJTAG_FDC_TTY) += mips_ejtag_fdc.o
 obj-$(CONFIG_VCC)		+= vcc.o
 obj-$(CONFIG_RPMSG_TTY)		+= rpmsg_tty.o
+obj-$(CONFIG_I3C_TTY)		+= i3c_tty.o
 
 obj-y += ipwireless/
drivers/tty/i3c_tty.c new file +426 -0

426 lines not on this page · raw message

Signature · 1 line
2.34.1