Skip to contentSkip to conversation

Add device-tree support for Cypress CYP4226

PATCH Superseded Jon Hunter 4 participants 16 messages Jan 16, 2023 – Jan 20, 2023

Subsystems (6)

v4 of 10 Superseded Latest is v10 →

lore
Share & tools
lore
author maintainer
#1 lore raw

PATCH v4 1/5 dt-bindings: usb: Add binding for Cypress cypd4226 I2C driver

In reply to Jon Hunter

From: Wayne Chang <[email protected]>

add device-tree binding documentation for Cypress cypd4226 type-C controller's I2C interface. It is a standard i2c slave with GPIO input as IRQ interface.

---
V3 -> V4: no changes
V2 -> V3: fix additionalProperties warning on new schema V1 -> V2: based on the review comments. Fix some addressed issues on

 .../bindings/usb/cypress,cypd4226.yaml        | 86 +++++++++++++++++++
 1 file changed, 86 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/usb/cypress,cypd4226.yaml
Documentation/devicetree/bindings/usb/cypress,cypd4226.yaml new file +86 -0
new file mode 100644
index 000000000000..5ac28ab4e7a1
@@ -0,0 +1,86 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/usb/cypress,cypd4226.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Cypress cypd4226 UCSI I2C Type-C Controller
+
+maintainers:
+  - Wayne Chang <[email protected]>
+
+description: |
+  The Cypress cypd4226 UCSI I2C type-C controller is a I2C interface type-C
+  controller.
+
+properties:
+  compatible:
+    const: cypress,cypd4226
+
+  '#address-cells':
+    const: 1
+
+  '#size-cells':
+    const: 0
+
+  reg:
+    const: 0x08
+
+  interrupts:
+    maxItems: 1
+
+  cypress,firmware-build:
+    enum:
+      - nv
+      - gn
+    description: |
+      the name of the CCGx firmware built for product series.
+      should be set one of following:
+      - "nv" for the RTX product series
+      - "gn" for the Jetson product series
+
+patternProperties:
+  '^connector@[0-9a-f]+$':
+    $ref: /schemas/connector/usb-connector.yaml#
+    properties:
+      reg:
+        maxItems: 1
+
+required:
+  - compatible
+  - reg
+  - interrupts
+
+additionalProperties: true
+
+examples:
+  - |
+    #include <dt-bindings/gpio/tegra194-gpio.h>
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
+    i2c {
+      #address-cells = <1>;
+      #size-cells = <0>;
+      #interrupt-cells = <2>;
+
+      ucsi_ccg: ucsi_ccg@8 {
+        compatible = "cypress,cypd4226";
+        interrupt-parent = <&gpio_aon>;
+        interrupts = <TEGRA194_AON_GPIO(BB, 2) IRQ_TYPE_LEVEL_LOW>;
+        reg = <0x08>;
+        cypress,firmware-build = "gn";
+        status = "okay";
+        #address-cells = <1>;
+        #size-cells = <0>;
+        ccg_typec_con0: connector@0 {
+          compatible = "usb-c-connector";
+          reg = <0>;
+          label = "USB-C";
+          data-role = "dual";
+          port {
+            ucsi_ccg_p0: endpoint {
+              remote-endpoint = <&usb_role_switch0>;
+            };
+          };
+        };
+      };
+    };
Signature · 1 line
2.25.1

Jon Hunter

author maintainer
#0 lore raw

v4 cover Add device-tree support for Cypress CYP4226

Add device-tree support for Cypress CYPD4226 Type-C controller and enable for the Jetson AGX Orin board. This series is derived from the series to enable USB host and device support for Jetson AGX Orin [0]. I have split this out from that series because it was getting quite big.

[0] https://lore.kernel.org/linux-tegra/[email protected]/

Jon Hunter (1):
arm64: tegra: Populate USB Type-C Controller for Jetson AGX Orin

Wayne Chang (4):
dt-bindings: usb: Add binding for Cypress cypd4226 I2C driver
usb: typec: ucsi_ccg: Add OF support
usb: typec: ucsi_ccg: Replace ccgx to well-known regex
i2c: nvidia-gpu: Replace ccgx to well-known regex

 .../bindings/usb/cypress,cypd4226.yaml        | 86 +++++++++++++++++++
 .../nvidia/tegra234-p3737-0000+p3701-0000.dts | 14 +++
 drivers/i2c/busses/i2c-nvidia-gpu.c           |  2 +-
 drivers/usb/typec/ucsi/ucsi_ccg.c             | 11 ++-
 4 files changed, 110 insertions(+), 3 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/usb/cypress,cypd4226.yaml
Signature · 1 line
2.25.1
author maintainer
#5 lore raw

PATCH v4 2/5 usb: typec: ucsi_ccg: Add OF support

From: Wayne Chang <[email protected]>

The change enables the device tree infrastructure support.

---
V1 -> V4: nothing has changed

 drivers/usb/typec/ucsi/ucsi_ccg.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
drivers/usb/typec/ucsi/ucsi_ccg.c +8 -1
index 46441f1477f2..4bc31ed8e5bc 100644
@@ -643,7 +643,7 @@ static int ccg_request_irq(struct ucsi_ccg *uc)
 {
 	unsigned long flags = IRQF_ONESHOT;
 
-	if (!has_acpi_companion(uc->dev))
+	if (!dev_fwnode(uc->dev))
 		flags |= IRQF_TRIGGER_HIGH;
 
 	return request_threaded_irq(uc->irq, NULL, ccg_irq_handler, flags, dev_name(uc->dev), uc);
@@ -1426,6 +1426,12 @@ static void ucsi_ccg_remove(struct i2c_client *client)
 	free_irq(uc->irq, uc);
 }
 
+static const struct of_device_id ucsi_ccg_of_match_table[] = {
+		{ .compatible = "cypress,cypd4226", },
+		{ /* sentinel */ }
+};
+MODULE_DEVICE_TABLE(of, ucsi_ccg_of_match_table);
+
 static const struct i2c_device_id ucsi_ccg_device_id[] = {
 	{"ccgx-ucsi", 0},
 	{}
@@ -1480,6 +1486,7 @@ static struct i2c_driver ucsi_ccg_driver = {
 		.pm = &ucsi_ccg_pm,
 		.dev_groups = ucsi_ccg_groups,
 		.acpi_match_table = amd_i2c_ucsi_match,
+		.of_match_table = ucsi_ccg_of_match_table,
 	},
 	.probe_new = ucsi_ccg_probe,
 	.remove = ucsi_ccg_remove,
Signature · 1 line
2.25.1
author maintainer
#6 lore raw

PATCH v4 3/5 usb: typec: ucsi_ccg: Replace ccgx to well-known regex

In reply to Jon Hunter

From: Wayne Chang <[email protected]>

ccgx is refer to the cypress cypd4226 typec controller. Replace ccgx to well-known regex "cypress".

---
V2 -> V4: nothing has changed
V1 -> V2: new change added for adding cypress,firmware-build

 drivers/usb/typec/ucsi/ucsi_ccg.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/typec/ucsi/ucsi_ccg.c +1 -1
index 4bc31ed8e5bc..d6114fb8d5a9 100644
@@ -1357,7 +1357,7 @@ static int ucsi_ccg_probe(struct i2c_client *client)
 	INIT_WORK(&uc->pm_work, ccg_pm_workaround_work);
 
 	/* Only fail FW flashing when FW build information is not provided */
-	status = device_property_read_u16(dev, "ccgx,firmware-build",
+	status = device_property_read_u16(dev, "cypress,firmware-build",
 					  &uc->fw_build);
 	if (status)
 		dev_err(uc->dev, "failed to get FW build information\n");
Signature · 1 line
2.25.1
author maintainer
#13 lore raw

PATCH v4 4/5 i2c: nvidia-gpu: Replace ccgx to well-known regex

In reply to Jon Hunter

From: Wayne Chang <[email protected]>

ccgx is refer to the cypress cypd4226 typec controller. Replace ccgx to well-known regex "cypress".

---
V2 -> V4: nothing has changed
V1 -> V2: New change for adding cypress,firmware-build

 drivers/i2c/busses/i2c-nvidia-gpu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/i2c/busses/i2c-nvidia-gpu.c +1 -1
index 12e330cd7635..0934f8ad7f49 100644
@@ -260,7 +260,7 @@ MODULE_DEVICE_TABLE(pci, gpu_i2c_ids);
 
 static const struct property_entry ccgx_props[] = {
 	/* Use FW built for NVIDIA (nv) only */
-	PROPERTY_ENTRY_U16("ccgx,firmware-build", ('n' << 8) | 'v'),
+	PROPERTY_ENTRY_U16("cypress,firmware-build", ('n' << 8) | 'v'),
 	{ }
 };
 
Signature · 1 line
2.25.1
author maintainer
#15 lore raw

PATCH v4 5/5 arm64: tegra: Populate USB Type-C Controller for Jetson AGX Orin

In reply to Jon Hunter

Add the USB Type-C controller that is present on the Jetson AGX Orin board. The ports for the Type-C controller are not populated yet, but will be added later once the USB host and device support for Jetson AGX Orin is enabled.

This is based upon a patch from Wayne Chang <[email protected]>.

---
V4: This is effectively a new patch that has been added, but based upon
a patch from Wayne Change that added USB host, device and type-C support in a single patch.

 .../dts/nvidia/tegra234-p3737-0000+p3701-0000.dts  | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
arch/arm64/boot/dts/nvidia/tegra234-p3737-0000+p3701-0000.dts +14 -0
index 32c58aa00035..059a23ce810b 100644
@@ -2115,6 +2115,20 @@ usb@3610000 {
 			phy-names = "usb2-0", "usb2-1", "usb2-2", "usb2-3",
 				"usb3-0", "usb3-1", "usb3-2";
 		};
+
+		i2c@c240000 {
+			status = "okay";
+			ucsi_ccg: ucsi_ccg@8 {
+				compatible = "cypress,cypd4226";
+				cypress,firmware-build = "gn";
+				interrupt-parent = <&gpio>;
+				interrupts = <TEGRA234_MAIN_GPIO(Y, 4) IRQ_TYPE_LEVEL_LOW>;
+				reg = <0x08>;
+				status = "okay";
+				#address-cells = <1>;
+				#size-cells = <0>;
+			};
+		};
 	};
 
 	chosen {
Signature · 1 line
2.25.1
#2 lore raw

Re: [PATCH V4 1/5] dt-bindings: usb: Add binding for Cypress cypd4226 I2C driver

In reply to Jon Hunter
Quoted 53 lines · Jon Hunter

From: Wayne Chang <[email protected]>

add device-tree binding documentation for Cypress cypd4226 type-C controller's I2C interface. It is a standard i2c slave with GPIO input as IRQ interface.

---
V3 -> V4: no changes
V2 -> V3: fix additionalProperties warning on new schema V1 -> V2: based on the review comments. Fix some addressed issues on

 .../bindings/usb/cypress,cypd4226.yaml        | 86 +++++++++++++++++++
 1 file changed, 86 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/usb/cypress,cypd4226.yaml
Documentation/devicetree/bindings/usb/cypress,cypd4226.yaml new file +30 -0
new file mode 100644
index 000000000000..5ac28ab4e7a1
@@ -0,0 +1,86 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/usb/cypress,cypd4226.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Cypress cypd4226 UCSI I2C Type-C Controller
+
+maintainers:
+  - Wayne Chang <[email protected]>
+
+description: |
+  The Cypress cypd4226 UCSI I2C type-C controller is a I2C interface type-C
+  controller.
+
+properties:
+  compatible:
+    const: cypress,cypd4226
+
+  '#address-cells':
+    const: 1
+
+  '#size-cells':
+    const: 0
+
+  reg:
+    const: 0x08
+
+  interrupts:
+    maxItems: 1

Documentation/devicetree/bindings/usb/cypress,cypd4226.yaml line 40

Quoted 10 lines
Documentation/devicetree/bindings/usb/cypress,cypd4226.yaml new file +10 -0
+
+  cypress,firmware-build:
+    enum:
+      - nv
+      - gn
+    description: |
+      the name of the CCGx firmware built for product series.
+      should be set one of following:
+      - "nv" for the RTX product series
+      - "gn" for the Jetson product series

This is a friendly reminder during the review process.

It seems my previous comments were not fully addressed. Maybe my feedback got lost between the quotes, maybe you just forgot to apply it. Please go back to the previous discussion and either implement all requested changes or keep discussing them.

Thank you.

Best regards,
Krzysztof

maintainer
#7 lore raw

Re: [PATCH V4 3/5] usb: typec: ucsi_ccg: Replace ccgx to well-known regex

In reply to Jon Hunter
Quoted 19 lines · Jon Hunter

From: Wayne Chang <[email protected]>

ccgx is refer to the cypress cypd4226 typec controller. Replace ccgx to well-known regex "cypress".

---
V2 -> V4: nothing has changed
V1 -> V2: new change added for adding cypress,firmware-build

 drivers/usb/typec/ucsi/ucsi_ccg.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/typec/ucsi/ucsi_ccg.c +0 -0
index 4bc31ed8e5bc..d6114fb8d5a9 100644

drivers/usb/typec/ucsi/ucsi_ccg.c static int ucsi_ccg_probe(struct i2c_client *client) · line 1361

Quoted 6 lines
drivers/usb/typec/ucsi/ucsi_ccg.c +1 -1
@@ -1357,7 +1357,7 @@ static int ucsi_ccg_probe(struct i2c_client *client)
 	INIT_WORK(&uc->pm_work, ccg_pm_workaround_work);
 
 	/* Only fail FW flashing when FW build information is not provided */
-	status = device_property_read_u16(dev, "ccgx,firmware-build",
+	status = device_property_read_u16(dev, "cypress,firmware-build",
 					  &uc->fw_build);

You need to first add that property to
drivers/i2c/busses/i2c-nvidia-gpu.c.

Quoted 4 lines
drivers/usb/typec/ucsi/ucsi_ccg.c +0 -0
 	if (status)
 		dev_err(uc->dev, "failed to get FW build information\n");
Signature · 1 line
2.25.1
Signature · 1 line
heikki
maintainer
#14 lore raw

Re: [PATCH V4 4/5] i2c: nvidia-gpu: Replace ccgx to well-known regex

In reply to Jon Hunter
Quoted 19 lines · Jon Hunter

From: Wayne Chang <[email protected]>

ccgx is refer to the cypress cypd4226 typec controller. Replace ccgx to well-known regex "cypress".

---
V2 -> V4: nothing has changed
V1 -> V2: New change for adding cypress,firmware-build

 drivers/i2c/busses/i2c-nvidia-gpu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/i2c/busses/i2c-nvidia-gpu.c +0 -0
index 12e330cd7635..0934f8ad7f49 100644

drivers/i2c/busses/i2c-nvidia-gpu.c MODULE_DEVICE_TABLE(pci, gpu_i2c_ids); · line 265

Quoted 7 lines
drivers/i2c/busses/i2c-nvidia-gpu.c +1 -1
@@ -260,7 +260,7 @@ MODULE_DEVICE_TABLE(pci, gpu_i2c_ids);
 
 static const struct property_entry ccgx_props[] = {
 	/* Use FW built for NVIDIA (nv) only */
-	PROPERTY_ENTRY_U16("ccgx,firmware-build", ('n' << 8) | 'v'),
+	PROPERTY_ENTRY_U16("cypress,firmware-build", ('n' << 8) | 'v'),
 	{ }
 };

So you need a new patch where you first introduce that "cypress,firmware-build" property. That patch comes before patch 3/5.

Then in this patch you only remove the old property "ccgx,firmware-build" property.

thanks,

Signature · 1 line
heikki
author maintainer
#3 lore raw

Re: [PATCH V4 1/5] dt-bindings: usb: Add binding for Cypress cypd4226 I2C driver

In reply to Krzysztof Kozlowski
Quoted 67 lines · Krzysztof Kozlowski
Quoted 53 lines · Jon Hunter

From: Wayne Chang <[email protected]>

add device-tree binding documentation for Cypress cypd4226 type-C controller's I2C interface. It is a standard i2c slave with GPIO input as IRQ interface.

---
V3 -> V4: no changes
V2 -> V3: fix additionalProperties warning on new schema V1 -> V2: based on the review comments. Fix some addressed issues on

  .../bindings/usb/cypress,cypd4226.yaml        | 86 +++++++++++++++++++
  1 file changed, 86 insertions(+)

create mode 100644 Documentation/devicetree/bindings/usb/cypress,cypd4226.yaml

Documentation/devicetree/bindings/usb/cypress,cypd4226.yaml new file +30 -0
new file mode 100644
index 000000000000..5ac28ab4e7a1
@@ -0,0 +1,86 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/usb/cypress,cypd4226.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Cypress cypd4226 UCSI I2C Type-C Controller
+
+maintainers:
+  - Wayne Chang <[email protected]>
+
+description: |
+  The Cypress cypd4226 UCSI I2C type-C controller is a I2C interface type-C
+  controller.
+
+properties:
+  compatible:
+    const: cypress,cypd4226
+
+  '#address-cells':
+    const: 1
+
+  '#size-cells':
+    const: 0
+
+  reg:
+    const: 0x08
+
+  interrupts:
+    maxItems: 1

Documentation/devicetree/bindings/usb/cypress,cypd4226.yaml line 40

Quoted 10 lines
Documentation/devicetree/bindings/usb/cypress,cypd4226.yaml new file +10 -0
+
+  cypress,firmware-build:
+    enum:
+      - nv
+      - gn
+    description: |
+      the name of the CCGx firmware built for product series.
+      should be set one of following:
+      - "nv" for the RTX product series
+      - "gn" for the Jetson product series

This is a friendly reminder during the review process.

Quoted 4 lines

It seems my previous comments were not fully addressed. Maybe my feedback got lost between the quotes, maybe you just forgot to apply it. Please go back to the previous discussion and either implement all requested changes or keep discussing them.

Thanks. Apologies for this. I will sort this out in the next revision.

Jon

Signature · 1 line
nvpublic
author maintainer
#8 lore raw

Re: [PATCH V4 3/5] usb: typec: ucsi_ccg: Replace ccgx to well-known regex

In reply to Heikki Krogerus
Quoted 22 lines · Heikki Krogerus
Quoted 21 lines · Jon Hunter

From: Wayne Chang <[email protected]>

ccgx is refer to the cypress cypd4226 typec controller. Replace ccgx to well-known regex "cypress".

---
V2 -> V4: nothing has changed
V1 -> V2: new change added for adding cypress,firmware-build

  drivers/usb/typec/ucsi/ucsi_ccg.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/typec/ucsi/ucsi_ccg.c +0 -0
index 4bc31ed8e5bc..d6114fb8d5a9 100644
@@ -1357,7 +1357,7 @@ static int ucsi_ccg_probe(struct i2c_client *client)
  	INIT_WORK(&uc->pm_work, ccg_pm_workaround_work);
 
Quoted 7 lines

drivers/usb/typec/ucsi/ucsi_ccg.c static int ucsi_ccg_probe(struct i2c_client *client) · line 1361

Quoted 4 lines
drivers/usb/typec/ucsi/ucsi_ccg.c +1 -1
  	/* Only fail FW flashing when FW build information is not provided */
-	status = device_property_read_u16(dev, "ccgx,firmware-build",
+	status = device_property_read_u16(dev, "cypress,firmware-build",
  					  &uc->fw_build);

You need to first add that property to
drivers/i2c/busses/i2c-nvidia-gpu.c.

Yes indeed! I will fix this.

Jon

Signature · 1 line
nvpublic
#4 lore raw

Re: [PATCH V4 1/5] dt-bindings: usb: Add binding for Cypress cypd4226 I2C driver

In reply to Jon Hunter
Quoted 69 lines · Jon Hunter
Quoted 67 lines · Krzysztof Kozlowski
Quoted 53 lines · Jon Hunter

From: Wayne Chang <[email protected]>

add device-tree binding documentation for Cypress cypd4226 type-C controller's I2C interface. It is a standard i2c slave with GPIO input as IRQ interface.

---
V3 -> V4: no changes
V2 -> V3: fix additionalProperties warning on new schema V1 -> V2: based on the review comments. Fix some addressed issues on

  .../bindings/usb/cypress,cypd4226.yaml        | 86 +++++++++++++++++++
  1 file changed, 86 insertions(+)

create mode 100644 Documentation/devicetree/bindings/usb/cypress,cypd4226.yaml

Documentation/devicetree/bindings/usb/cypress,cypd4226.yaml new file +30 -0
new file mode 100644
index 000000000000..5ac28ab4e7a1
@@ -0,0 +1,86 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/usb/cypress,cypd4226.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Cypress cypd4226 UCSI I2C Type-C Controller
+
+maintainers:
+  - Wayne Chang <[email protected]>
+
+description: |
+  The Cypress cypd4226 UCSI I2C type-C controller is a I2C interface type-C
+  controller.
+
+properties:
+  compatible:
+    const: cypress,cypd4226
+
+  '#address-cells':
+    const: 1
+
+  '#size-cells':
+    const: 0
+
+  reg:
+    const: 0x08
+
+  interrupts:
+    maxItems: 1

Documentation/devicetree/bindings/usb/cypress,cypd4226.yaml line 40

Quoted 10 lines
Documentation/devicetree/bindings/usb/cypress,cypd4226.yaml new file +10 -0
+
+  cypress,firmware-build:
+    enum:
+      - nv
+      - gn
+    description: |
+      the name of the CCGx firmware built for product series.
+      should be set one of following:
+      - "nv" for the RTX product series
+      - "gn" for the Jetson product series

This is a friendly reminder during the review process.

Quoted 7 lines
Quoted 4 lines

It seems my previous comments were not fully addressed. Maybe my feedback got lost between the quotes, maybe you just forgot to apply it. Please go back to the previous discussion and either implement all requested changes or keep discussing them.

Thanks. Apologies for this. I will sort this out in the next revision.

These could have been comments from Rob about this property.

Best regards,
Krzysztof

author maintainer
#9 lore raw

Re: [PATCH V4 3/5] usb: typec: ucsi_ccg: Replace ccgx to well-known regex

In reply to Heikki Krogerus
Quoted 22 lines · Heikki Krogerus
Quoted 21 lines · Jon Hunter

From: Wayne Chang <[email protected]>

ccgx is refer to the cypress cypd4226 typec controller. Replace ccgx to well-known regex "cypress".

---
V2 -> V4: nothing has changed
V1 -> V2: new change added for adding cypress,firmware-build

  drivers/usb/typec/ucsi/ucsi_ccg.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/typec/ucsi/ucsi_ccg.c +0 -0
index 4bc31ed8e5bc..d6114fb8d5a9 100644
@@ -1357,7 +1357,7 @@ static int ucsi_ccg_probe(struct i2c_client *client)
  	INIT_WORK(&uc->pm_work, ccg_pm_workaround_work);
 
Quoted 7 lines

drivers/usb/typec/ucsi/ucsi_ccg.c static int ucsi_ccg_probe(struct i2c_client *client) · line 1361

Quoted 4 lines
drivers/usb/typec/ucsi/ucsi_ccg.c +1 -1
  	/* Only fail FW flashing when FW build information is not provided */
-	status = device_property_read_u16(dev, "ccgx,firmware-build",
+	status = device_property_read_u16(dev, "cypress,firmware-build",
  					  &uc->fw_build);

You need to first add that property to
drivers/i2c/busses/i2c-nvidia-gpu.c.

Looking at this some more, I wonder if we need to keep 'ccgx,firmware-build' as a fallback for AMD? It is not clear to me if they implement this property or not. Let me know what you think. I will still update the i2c-nvidia-gpu driver.

Thanks
Jon

Signature · 1 line
nvpublic
maintainer
#10 lore raw

Re: [PATCH V4 3/5] usb: typec: ucsi_ccg: Replace ccgx to well-known regex

Quoted 32 lines · Jon Hunter
Quoted 15 lines · Heikki Krogerus
Quoted 14 lines · Jon Hunter

From: Wayne Chang <[email protected]>

ccgx is refer to the cypress cypd4226 typec controller. Replace ccgx to well-known regex "cypress".

---
V2 -> V4: nothing has changed
V1 -> V2: new change added for adding cypress,firmware-build

  drivers/usb/typec/ucsi/ucsi_ccg.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 13 lines

drivers/usb/typec/ucsi/ucsi_ccg.c static int ucsi_ccg_probe(struct i2c_client *client) · line 1360

Quoted 10 lines
drivers/usb/typec/ucsi/ucsi_ccg.c +1 -1
index 4bc31ed8e5bc..d6114fb8d5a9 100644
@@ -1357,7 +1357,7 @@ static int ucsi_ccg_probe(struct i2c_client *client)
  	INIT_WORK(&uc->pm_work, ccg_pm_workaround_work);
  	/* Only fail FW flashing when FW build information is not provided */
-	status = device_property_read_u16(dev, "ccgx,firmware-build",
+	status = device_property_read_u16(dev, "cypress,firmware-build",
  					  &uc->fw_build);

You need to first add that property to
drivers/i2c/busses/i2c-nvidia-gpu.c.

Quoted 4 lines

Looking at this some more, I wonder if we need to keep 'ccgx,firmware-build' as a fallback for AMD? It is not clear to me if they implement this property or not. Let me know what you think. I will still update the i2c-nvidia-gpu driver.

AMD needs to answer to that one. Sanket, do you have that device property ("ccgx,firmware-build") in your ACPI tables (as _DSD device property) for this device?

thanks,

Signature · 1 line
heikki
author maintainer
#11 lore raw

Re: [PATCH V4 3/5] usb: typec: ucsi_ccg: Replace ccgx to well-known regex

Quoted 33 lines · Heikki Krogerus
Quoted 32 lines · Jon Hunter
Quoted 28 lines · Heikki Krogerus
Quoted 19 lines · Jon Hunter

From: Wayne Chang <[email protected]>

ccgx is refer to the cypress cypd4226 typec controller. Replace ccgx to well-known regex "cypress".

---
V2 -> V4: nothing has changed
V1 -> V2: new change added for adding cypress,firmware-build

   drivers/usb/typec/ucsi/ucsi_ccg.c | 2 +-
   1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/typec/ucsi/ucsi_ccg.c +0 -0
index 4bc31ed8e5bc..d6114fb8d5a9 100644

drivers/usb/typec/ucsi/ucsi_ccg.c static int ucsi_ccg_probe(struct i2c_client *client) · line 1360

Quoted 5 lines
drivers/usb/typec/ucsi/ucsi_ccg.c +1 -1
@@ -1357,7 +1357,7 @@ static int ucsi_ccg_probe(struct i2c_client *client)
   	INIT_WORK(&uc->pm_work, ccg_pm_workaround_work);
   	/* Only fail FW flashing when FW build information is not provided */
-	status = device_property_read_u16(dev, "ccgx,firmware-build",
+	status = device_property_read_u16(dev, "cypress,firmware-build",
   					  &uc->fw_build);

You need to first add that property to
drivers/i2c/busses/i2c-nvidia-gpu.c.

Quoted 8 lines
Quoted 4 lines

Looking at this some more, I wonder if we need to keep 'ccgx,firmware-build' as a fallback for AMD? It is not clear to me if they implement this property or not. Let me know what you think. I will still update the i2c-nvidia-gpu driver.

AMD needs to answer to that one. Sanket, do you have that device property ("ccgx,firmware-build") in your ACPI tables (as _DSD device property) for this device?

I will resend the series now, but we can wait on Sanket's response on whether we pick this one up or drop it. If the rest are OK, I would like to get them in queued for v6.3.

Thanks
Jon

Signature · 1 line
nvpublic
#12 lore raw

Re: [PATCH V4 3/5] usb: typec: ucsi_ccg: Replace ccgx to well-known regex

In reply to Heikki Krogerus

Hi Heikki,

Quoted 33 lines · Heikki Krogerus
Quoted 32 lines · Jon Hunter
Quoted 28 lines · Heikki Krogerus
Quoted 19 lines · Jon Hunter

From: Wayne Chang <[email protected]>

ccgx is refer to the cypress cypd4226 typec controller. Replace ccgx to well-known regex "cypress".

---
V2 -> V4: nothing has changed
V1 -> V2: new change added for adding cypress,firmware-build

  drivers/usb/typec/ucsi/ucsi_ccg.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/typec/ucsi/ucsi_ccg.c +0 -0
index 4bc31ed8e5bc..d6114fb8d5a9 100644

drivers/usb/typec/ucsi/ucsi_ccg.c static int ucsi_ccg_probe(struct i2c_client *client) · line 1360

Quoted 5 lines
drivers/usb/typec/ucsi/ucsi_ccg.c +1 -1
@@ -1357,7 +1357,7 @@ static int ucsi_ccg_probe(struct i2c_client *client)
  	INIT_WORK(&uc->pm_work, ccg_pm_workaround_work);
  	/* Only fail FW flashing when FW build information is not provided */
-	status = device_property_read_u16(dev, "ccgx,firmware-build",
+	status = device_property_read_u16(dev, "cypress,firmware-build",
  					  &uc->fw_build);

You need to first add that property to
drivers/i2c/busses/i2c-nvidia-gpu.c.

Quoted 8 lines
Quoted 4 lines

Looking at this some more, I wonder if we need to keep 'ccgx,firmware-build' as a fallback for AMD? It is not clear to me if they implement this property or not. Let me know what you think. I will still update the i2c-nvidia-gpu driver.

AMD needs to answer to that one. Sanket, do you have that device property ("ccgx,firmware-build") in your ACPI tables (as _DSD device property) for this device?

We have not included this property in the ACPI tables, so there will be no impact on us.

Thanks,
Sanket