* [PATCH V10 1/6] dt-bindings: usb: Add Cypress cypd4226 Type-C controller
2023-01-31 17:57 [PATCH V10 0/6] Add device-tree support for Cypress CYPD4226 Jon Hunter
@ 2023-01-31 17:57 ` Jon Hunter
2023-02-01 8:13 ` Krzysztof Kozlowski
2023-01-31 17:57 ` [PATCH V10 2/6] i2c: nvidia-gpu: Add ACPI property to align with device-tree Jon Hunter
` (4 subsequent siblings)
5 siblings, 1 reply; 18+ messages in thread
From: Jon Hunter @ 2023-01-31 17:57 UTC (permalink / raw)
To: Heikki Krogerus, Greg Kroah-Hartman, Rob Herring,
Krzysztof Kozlowski, Thierry Reding
Cc: linux-usb, devicetree, linux-tegra, Wayne Chang, Jon Hunter
From: Wayne Chang <waynec@nvidia.com>
Add the device-tree binding documentation for Cypress cypd4226 dual
Type-C controller.
Signed-off-by: Wayne Chang <waynec@nvidia.com>
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
---
V10: Limited connector indexes to 0 and 1. Added 'anyOf' to ensure that
there is at least one connector present.
V9: added 'unevaluatedProperties' and 'additionalProperties'
V8: removed 'additionalProperties'
V7: updated example to use 'typec' for the node name
V6: no changes
V5: updated subject and updated binding to use 'firmware-name'.
V4: no changes
V3: fix additionalProperties warning on new schema
V2: based on the review comments. Fix some addressed issues on
.../bindings/usb/cypress,cypd4226.yaml | 98 +++++++++++++++++++
1 file changed, 98 insertions(+)
create mode 100644 Documentation/devicetree/bindings/usb/cypress,cypd4226.yaml
diff --git a/Documentation/devicetree/bindings/usb/cypress,cypd4226.yaml b/Documentation/devicetree/bindings/usb/cypress,cypd4226.yaml
new file mode 100644
index 000000000000..75eec4a9a020
--- /dev/null
+++ b/Documentation/devicetree/bindings/usb/cypress,cypd4226.yaml
@@ -0,0 +1,98 @@
+# 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 Type-C Controller
+
+maintainers:
+ - Wayne Chang <waynec@nvidia.com>
+
+description:
+ The Cypress cypd4226 is a dual Type-C controller that is controlled
+ via an I2C interface.
+
+properties:
+ compatible:
+ const: cypress,cypd4226
+
+ '#address-cells':
+ const: 1
+
+ '#size-cells':
+ const: 0
+
+ reg:
+ const: 0x08
+
+ interrupts:
+ items:
+ - description: cypd4226 host interrupt
+
+ firmware-name:
+ enum:
+ - nvidia,gpu
+ - nvidia,jetson-agx-xavier
+ description: |
+ The name of the CCGx firmware built for product series.
+ should be set one of following:
+ - "nvidia,gpu" for the NVIDIA RTX product series
+ - "nvidia,jetson-agx-xavier" for the NVIDIA Jetson product series
+
+patternProperties:
+ '^connector@[01]$':
+ $ref: /schemas/connector/usb-connector.yaml#
+ unevaluatedProperties: false
+ properties:
+ reg:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+ - interrupts
+
+anyOf:
+ - required:
+ - connector@0
+ - required:
+ - connector@1
+
+additionalProperties: false
+
+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>;
+
+ typec@8 {
+ compatible = "cypress,cypd4226";
+ reg = <0x08>;
+ interrupt-parent = <&gpio_aon>;
+ interrupts = <TEGRA194_AON_GPIO(BB, 2) IRQ_TYPE_LEVEL_LOW>;
+ firmware-name = "nvidia,jetson-agx-xavier";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ connector@0 {
+ compatible = "usb-c-connector";
+ reg = <0>;
+ label = "USB-C";
+ data-role = "dual";
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ port@0 {
+ reg = <0>;
+ endpoint {
+ remote-endpoint = <&usb_role_switch0>;
+ };
+ };
+ };
+ };
+ };
+ };
--
2.34.1
^ permalink raw reply related [flat|nested] 18+ messages in thread* Re: [PATCH V10 1/6] dt-bindings: usb: Add Cypress cypd4226 Type-C controller
2023-01-31 17:57 ` [PATCH V10 1/6] dt-bindings: usb: Add Cypress cypd4226 Type-C controller Jon Hunter
@ 2023-02-01 8:13 ` Krzysztof Kozlowski
0 siblings, 0 replies; 18+ messages in thread
From: Krzysztof Kozlowski @ 2023-02-01 8:13 UTC (permalink / raw)
To: Jon Hunter, Heikki Krogerus, Greg Kroah-Hartman, Rob Herring,
Krzysztof Kozlowski, Thierry Reding
Cc: linux-usb, devicetree, linux-tegra, Wayne Chang
On 31/01/2023 18:57, Jon Hunter wrote:
> From: Wayne Chang <waynec@nvidia.com>
>
> Add the device-tree binding documentation for Cypress cypd4226 dual
> Type-C controller.
>
> Signed-off-by: Wayne Chang <waynec@nvidia.com>
> Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
> ---
> V10: Limited connector indexes to 0 and 1. Added 'anyOf' to ensure that
> there is at least one connector present.
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH V10 2/6] i2c: nvidia-gpu: Add ACPI property to align with device-tree
2023-01-31 17:57 [PATCH V10 0/6] Add device-tree support for Cypress CYPD4226 Jon Hunter
2023-01-31 17:57 ` [PATCH V10 1/6] dt-bindings: usb: Add Cypress cypd4226 Type-C controller Jon Hunter
@ 2023-01-31 17:57 ` Jon Hunter
2023-02-01 16:00 ` Jon Hunter
2023-01-31 17:57 ` [PATCH V10 3/6] usb: typec: ucsi_ccg: Add OF support Jon Hunter
` (3 subsequent siblings)
5 siblings, 1 reply; 18+ messages in thread
From: Jon Hunter @ 2023-01-31 17:57 UTC (permalink / raw)
To: Heikki Krogerus, Greg Kroah-Hartman, Rob Herring,
Krzysztof Kozlowski, Thierry Reding
Cc: linux-usb, devicetree, linux-tegra, Wayne Chang, Jon Hunter
From: Wayne Chang <waynec@nvidia.com>
Device-tree uses the 'firmware-name' string property to pass a name of
the firmware build to the Cypress CCGx driver. Add a new ACPI string
property to the NVIDIA GPU I2C driver to align with device-tree so that
we can migrate to using a common property name for both ACPI and
device-tree.
Signed-off-by: Wayne Chang <waynec@nvidia.com>
Co-developed-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
---
V8 -> V10: no changes
V7: Added Heikki's reviewed-by
V6: no changes
V5: Added this patch from V3
drivers/i2c/busses/i2c-nvidia-gpu.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/i2c/busses/i2c-nvidia-gpu.c b/drivers/i2c/busses/i2c-nvidia-gpu.c
index 12e330cd7635..6d81ea530a83 100644
--- a/drivers/i2c/busses/i2c-nvidia-gpu.c
+++ b/drivers/i2c/busses/i2c-nvidia-gpu.c
@@ -261,6 +261,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_STRING("firmware-name", "nvidia,gpu"),
{ }
};
--
2.34.1
^ permalink raw reply related [flat|nested] 18+ messages in thread* Re: [PATCH V10 2/6] i2c: nvidia-gpu: Add ACPI property to align with device-tree
2023-01-31 17:57 ` [PATCH V10 2/6] i2c: nvidia-gpu: Add ACPI property to align with device-tree Jon Hunter
@ 2023-02-01 16:00 ` Jon Hunter
2023-02-01 16:56 ` Wolfram Sang
0 siblings, 1 reply; 18+ messages in thread
From: Jon Hunter @ 2023-02-01 16:00 UTC (permalink / raw)
To: Heikki Krogerus, Greg Kroah-Hartman, Rob Herring,
Krzysztof Kozlowski, Thierry Reding, Wolfram Sang
Cc: linux-usb, devicetree, linux-tegra, Wayne Chang
H Wolfram,
On 31/01/2023 17:57, Jon Hunter wrote:
> From: Wayne Chang <waynec@nvidia.com>
>
> Device-tree uses the 'firmware-name' string property to pass a name of
> the firmware build to the Cypress CCGx driver. Add a new ACPI string
> property to the NVIDIA GPU I2C driver to align with device-tree so that
> we can migrate to using a common property name for both ACPI and
> device-tree.
>
> Signed-off-by: Wayne Chang <waynec@nvidia.com>
> Co-developed-by: Jon Hunter <jonathanh@nvidia.com>
> Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
> Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
> ---
> V8 -> V10: no changes
> V7: Added Heikki's reviewed-by
> V6: no changes
> V5: Added this patch from V3
>
> drivers/i2c/busses/i2c-nvidia-gpu.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/i2c/busses/i2c-nvidia-gpu.c b/drivers/i2c/busses/i2c-nvidia-gpu.c
> index 12e330cd7635..6d81ea530a83 100644
> --- a/drivers/i2c/busses/i2c-nvidia-gpu.c
> +++ b/drivers/i2c/busses/i2c-nvidia-gpu.c
> @@ -261,6 +261,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_STRING("firmware-name", "nvidia,gpu"),
> { }
> };
>
Apologies, but we appear to be missing you on this series [0]. Please
take a look at patches, 2, 3 and 4. If you are OK with the changes, I am
not sure if it is easiest for Heikki or Greg to merge?
Thanks
Jon
[0]
https://lore.kernel.org/linux-tegra/20230131175748.256423-1-jonathanh@nvidia.com/
--
nvpublic
^ permalink raw reply [flat|nested] 18+ messages in thread* Re: [PATCH V10 2/6] i2c: nvidia-gpu: Add ACPI property to align with device-tree
2023-02-01 16:00 ` Jon Hunter
@ 2023-02-01 16:56 ` Wolfram Sang
2023-02-01 20:21 ` Jon Hunter
0 siblings, 1 reply; 18+ messages in thread
From: Wolfram Sang @ 2023-02-01 16:56 UTC (permalink / raw)
To: Jon Hunter
Cc: Heikki Krogerus, Greg Kroah-Hartman, Rob Herring,
Krzysztof Kozlowski, Thierry Reding, linux-usb, devicetree,
linux-tegra, Wayne Chang
[-- Attachment #1: Type: text/plain, Size: 342 bytes --]
> Apologies, but we appear to be missing you on this series [0].
Yup, me, the i2c-list and the dedicated maintainer for this driver:
$ scripts/get_maintainer.pl -f drivers/i2c/busses/i2c-nvidia-gpu.c
Ajay Gupta <ajayg@nvidia.com>
linux-i2c@vger.kernel.org
linux-kernel@vger.kernel.org
If Ajay Gupta is happy, you'll get my ack for free.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH V10 2/6] i2c: nvidia-gpu: Add ACPI property to align with device-tree
2023-02-01 16:56 ` Wolfram Sang
@ 2023-02-01 20:21 ` Jon Hunter
2023-02-01 20:30 ` Ajay Gupta
0 siblings, 1 reply; 18+ messages in thread
From: Jon Hunter @ 2023-02-01 20:21 UTC (permalink / raw)
To: Wolfram Sang, Heikki Krogerus, Greg Kroah-Hartman, Rob Herring,
Krzysztof Kozlowski, Thierry Reding, linux-usb, devicetree,
linux-tegra, Wayne Chang, Ajay Gupta
On 01/02/2023 16:56, Wolfram Sang wrote:
>
>> Apologies, but we appear to be missing you on this series [0].
>
> Yup, me, the i2c-list and the dedicated maintainer for this driver:
>
> $ scripts/get_maintainer.pl -f drivers/i2c/busses/i2c-nvidia-gpu.c
> Ajay Gupta <ajayg@nvidia.com>
> linux-i2c@vger.kernel.org
> linux-kernel@vger.kernel.org
>
> If Ajay Gupta is happy, you'll get my ack for free.
Adding Ajay.
Jon
--
nvpublic
^ permalink raw reply [flat|nested] 18+ messages in thread
* RE: [PATCH V10 2/6] i2c: nvidia-gpu: Add ACPI property to align with device-tree
2023-02-01 20:21 ` Jon Hunter
@ 2023-02-01 20:30 ` Ajay Gupta
2023-02-01 21:48 ` Wolfram Sang
0 siblings, 1 reply; 18+ messages in thread
From: Ajay Gupta @ 2023-02-01 20:30 UTC (permalink / raw)
To: Jonathan Hunter, Wolfram Sang, Heikki Krogerus,
Greg Kroah-Hartman, Rob Herring, Krzysztof Kozlowski,
Thierry Reding, linux-usb@vger.kernel.org,
devicetree@vger.kernel.org, linux-tegra@vger.kernel.org,
Wayne Chang
Hi,
> -----Original Message-----
> From: Jonathan Hunter <jonathanh@nvidia.com>
> Sent: Wednesday, February 1, 2023 12:21 PM
> To: Wolfram Sang <wsa@kernel.org>; Heikki Krogerus
> <heikki.krogerus@linux.intel.com>; Greg Kroah-Hartman
> <gregkh@linuxfoundation.org>; Rob Herring <robh+dt@kernel.org>;
> Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>; Thierry Reding
> <thierry.reding@gmail.com>; linux-usb@vger.kernel.org;
> devicetree@vger.kernel.org; linux-tegra@vger.kernel.org; Wayne Chang
> <waynec@nvidia.com>; Ajay Gupta <ajayg@nvidia.com>
> Subject: Re: [PATCH V10 2/6] i2c: nvidia-gpu: Add ACPI property to align with
> device-tree
>
>
> On 01/02/2023 16:56, Wolfram Sang wrote:
> >
> >> Apologies, but we appear to be missing you on this series [0].
> >
> > Yup, me, the i2c-list and the dedicated maintainer for this driver:
> >
> > $ scripts/get_maintainer.pl -f drivers/i2c/busses/i2c-nvidia-gpu.c
> > Ajay Gupta <ajayg@nvidia.com>
> > linux-i2c@vger.kernel.org
> > linux-kernel@vger.kernel.org
> >
> > If Ajay Gupta is happy, you'll get my ack for free.
>
>
> Adding Ajay.
Acked-by: Ajay Gupta <ajayg@nvidia.com>
Thanks
nvpublic
> Jon
>
> --
> nvpublic
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH V10 2/6] i2c: nvidia-gpu: Add ACPI property to align with device-tree
2023-02-01 20:30 ` Ajay Gupta
@ 2023-02-01 21:48 ` Wolfram Sang
0 siblings, 0 replies; 18+ messages in thread
From: Wolfram Sang @ 2023-02-01 21:48 UTC (permalink / raw)
To: Ajay Gupta
Cc: Jonathan Hunter, Heikki Krogerus, Greg Kroah-Hartman, Rob Herring,
Krzysztof Kozlowski, Thierry Reding, linux-usb@vger.kernel.org,
devicetree@vger.kernel.org, linux-tegra@vger.kernel.org,
Wayne Chang
[-- Attachment #1: Type: text/plain, Size: 102 bytes --]
> > Adding Ajay.
> Acked-by: Ajay Gupta <ajayg@nvidia.com>
Acked-by: Wolfram Sang <wsa@kernel.org>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH V10 3/6] usb: typec: ucsi_ccg: Add OF support
2023-01-31 17:57 [PATCH V10 0/6] Add device-tree support for Cypress CYPD4226 Jon Hunter
2023-01-31 17:57 ` [PATCH V10 1/6] dt-bindings: usb: Add Cypress cypd4226 Type-C controller Jon Hunter
2023-01-31 17:57 ` [PATCH V10 2/6] i2c: nvidia-gpu: Add ACPI property to align with device-tree Jon Hunter
@ 2023-01-31 17:57 ` Jon Hunter
2023-01-31 17:57 ` [PATCH V10 4/6] i2c: nvidia-gpu: Remove ccgx,firmware-build property Jon Hunter
` (2 subsequent siblings)
5 siblings, 0 replies; 18+ messages in thread
From: Jon Hunter @ 2023-01-31 17:57 UTC (permalink / raw)
To: Heikki Krogerus, Greg Kroah-Hartman, Rob Herring,
Krzysztof Kozlowski, Thierry Reding
Cc: linux-usb, devicetree, linux-tegra, Wayne Chang, Jon Hunter
From: Wayne Chang <waynec@nvidia.com>
Add device-tree support for the Cypress CCG UCSI driver. The device-tree
binding for the Cypress CCG device uses the standard device-tree
'firmware-name' string property to indicate the firmware build that is
used.
The NVIDIA GPU I2C driver has been updated to use an ACPI string
property that is also named 'firmware-build' and given that this was the
only users of the 'ccgx,firmware-build' property, we can now remove
support for this legacy property.
Signed-off-by: Wayne Chang <waynec@nvidia.com>
Co-developed-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
---
V9 -> V10: no changes
V8: Add Heikki's reviewed-by and fixed unnecessary line wrapping
V7: removed 'ccgx,firmware-build' property
V6: fixed compilation
V5: add support for 'firmware-name'
V1 -> V4: nothing has changed
drivers/usb/typec/ucsi/ucsi_ccg.c | 22 ++++++++++++++++++----
1 file changed, 18 insertions(+), 4 deletions(-)
diff --git a/drivers/usb/typec/ucsi/ucsi_ccg.c b/drivers/usb/typec/ucsi/ucsi_ccg.c
index 46441f1477f2..e0ed465bd518 100644
--- a/drivers/usb/typec/ucsi/ucsi_ccg.c
+++ b/drivers/usb/typec/ucsi/ucsi_ccg.c
@@ -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);
@@ -1342,6 +1342,7 @@ static int ucsi_ccg_probe(struct i2c_client *client)
{
struct device *dev = &client->dev;
struct ucsi_ccg *uc;
+ const char *fw_name;
int status;
uc = devm_kzalloc(dev, sizeof(*uc), GFP_KERNEL);
@@ -1357,9 +1358,15 @@ 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",
- &uc->fw_build);
- if (status)
+ status = device_property_read_string(dev, "firmware-name", &fw_name);
+ if (!status) {
+ if (!strcmp(fw_name, "nvidia,jetson-agx-xavier"))
+ uc->fw_build = CCG_FW_BUILD_NVIDIA_TEGRA;
+ else if (!strcmp(fw_name, "nvidia,gpu"))
+ uc->fw_build = CCG_FW_BUILD_NVIDIA;
+ }
+
+ if (!uc->fw_build)
dev_err(uc->dev, "failed to get FW build information\n");
/* reset ccg device and initialize ucsi */
@@ -1426,6 +1433,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 +1493,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,
--
2.34.1
^ permalink raw reply related [flat|nested] 18+ messages in thread* [PATCH V10 4/6] i2c: nvidia-gpu: Remove ccgx,firmware-build property
2023-01-31 17:57 [PATCH V10 0/6] Add device-tree support for Cypress CYPD4226 Jon Hunter
` (2 preceding siblings ...)
2023-01-31 17:57 ` [PATCH V10 3/6] usb: typec: ucsi_ccg: Add OF support Jon Hunter
@ 2023-01-31 17:57 ` Jon Hunter
2023-02-01 16:01 ` Jon Hunter
2023-01-31 17:57 ` [PATCH V10 5/6] arm64: tegra: Populate USB Type-C Controller for Jetson AGX Orin Jon Hunter
2023-01-31 17:57 ` [PATCH V10 6/6] arm64: defconfig: Enable UCSI support Jon Hunter
5 siblings, 1 reply; 18+ messages in thread
From: Jon Hunter @ 2023-01-31 17:57 UTC (permalink / raw)
To: Heikki Krogerus, Greg Kroah-Hartman, Rob Herring,
Krzysztof Kozlowski, Thierry Reding
Cc: linux-usb, devicetree, linux-tegra, Wayne Chang, Jon Hunter
From: Wayne Chang <waynec@nvidia.com>
Now the Cypress CCG driver has been updated to support the
'firmware-name' property to align with device-tree, remove the
'ccgx,firmware-build' property as this is no longer needed.
Signed-off-by: Wayne Chang <waynec@nvidia.com>
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
---
V6 -> V10: no changes
V5: Added this patch from V3
drivers/i2c/busses/i2c-nvidia-gpu.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/i2c/busses/i2c-nvidia-gpu.c b/drivers/i2c/busses/i2c-nvidia-gpu.c
index 6d81ea530a83..a8b99e7f6262 100644
--- a/drivers/i2c/busses/i2c-nvidia-gpu.c
+++ b/drivers/i2c/busses/i2c-nvidia-gpu.c
@@ -259,8 +259,7 @@ static const struct pci_device_id gpu_i2c_ids[] = {
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'),
+ /* Use FW built for NVIDIA GPU only */
PROPERTY_ENTRY_STRING("firmware-name", "nvidia,gpu"),
{ }
};
--
2.34.1
^ permalink raw reply related [flat|nested] 18+ messages in thread* Re: [PATCH V10 4/6] i2c: nvidia-gpu: Remove ccgx,firmware-build property
2023-01-31 17:57 ` [PATCH V10 4/6] i2c: nvidia-gpu: Remove ccgx,firmware-build property Jon Hunter
@ 2023-02-01 16:01 ` Jon Hunter
2023-02-01 20:23 ` Jon Hunter
0 siblings, 1 reply; 18+ messages in thread
From: Jon Hunter @ 2023-02-01 16:01 UTC (permalink / raw)
To: Heikki Krogerus, Greg Kroah-Hartman, Rob Herring,
Krzysztof Kozlowski, Thierry Reding, Wolfram Sang
Cc: linux-usb, devicetree, linux-tegra, Wayne Chang
Adding Wolfram.
On 31/01/2023 17:57, Jon Hunter wrote:
> From: Wayne Chang <waynec@nvidia.com>
>
> Now the Cypress CCG driver has been updated to support the
> 'firmware-name' property to align with device-tree, remove the
> 'ccgx,firmware-build' property as this is no longer needed.
>
> Signed-off-by: Wayne Chang <waynec@nvidia.com>
> Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
> ---
> V6 -> V10: no changes
> V5: Added this patch from V3
>
> drivers/i2c/busses/i2c-nvidia-gpu.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/i2c/busses/i2c-nvidia-gpu.c b/drivers/i2c/busses/i2c-nvidia-gpu.c
> index 6d81ea530a83..a8b99e7f6262 100644
> --- a/drivers/i2c/busses/i2c-nvidia-gpu.c
> +++ b/drivers/i2c/busses/i2c-nvidia-gpu.c
> @@ -259,8 +259,7 @@ static const struct pci_device_id gpu_i2c_ids[] = {
> 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'),
> + /* Use FW built for NVIDIA GPU only */
> PROPERTY_ENTRY_STRING("firmware-name", "nvidia,gpu"),
> { }
> };
--
nvpublic
^ permalink raw reply [flat|nested] 18+ messages in thread* Re: [PATCH V10 4/6] i2c: nvidia-gpu: Remove ccgx,firmware-build property
2023-02-01 16:01 ` Jon Hunter
@ 2023-02-01 20:23 ` Jon Hunter
2023-02-01 20:33 ` Ajay Gupta
0 siblings, 1 reply; 18+ messages in thread
From: Jon Hunter @ 2023-02-01 20:23 UTC (permalink / raw)
To: Heikki Krogerus, Greg Kroah-Hartman, Rob Herring,
Krzysztof Kozlowski, Thierry Reding, Wolfram Sang, Ajay Gupta
Cc: linux-usb, devicetree, linux-tegra, Wayne Chang
Adding Ajay as well.
On 01/02/2023 16:01, Jon Hunter wrote:
> Adding Wolfram.
>
> On 31/01/2023 17:57, Jon Hunter wrote:
>> From: Wayne Chang <waynec@nvidia.com>
>>
>> Now the Cypress CCG driver has been updated to support the
>> 'firmware-name' property to align with device-tree, remove the
>> 'ccgx,firmware-build' property as this is no longer needed.
>>
>> Signed-off-by: Wayne Chang <waynec@nvidia.com>
>> Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
>> ---
>> V6 -> V10: no changes
>> V5: Added this patch from V3
>>
>> drivers/i2c/busses/i2c-nvidia-gpu.c | 3 +--
>> 1 file changed, 1 insertion(+), 2 deletions(-)
>>
>> diff --git a/drivers/i2c/busses/i2c-nvidia-gpu.c
>> b/drivers/i2c/busses/i2c-nvidia-gpu.c
>> index 6d81ea530a83..a8b99e7f6262 100644
>> --- a/drivers/i2c/busses/i2c-nvidia-gpu.c
>> +++ b/drivers/i2c/busses/i2c-nvidia-gpu.c
>> @@ -259,8 +259,7 @@ static const struct pci_device_id gpu_i2c_ids[] = {
>> 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'),
>> + /* Use FW built for NVIDIA GPU only */
>> PROPERTY_ENTRY_STRING("firmware-name", "nvidia,gpu"),
>> { }
>> };
>
--
nvpublic
^ permalink raw reply [flat|nested] 18+ messages in thread* RE: [PATCH V10 4/6] i2c: nvidia-gpu: Remove ccgx,firmware-build property
2023-02-01 20:23 ` Jon Hunter
@ 2023-02-01 20:33 ` Ajay Gupta
2023-02-01 21:48 ` Wolfram Sang
0 siblings, 1 reply; 18+ messages in thread
From: Ajay Gupta @ 2023-02-01 20:33 UTC (permalink / raw)
To: Jonathan Hunter, Heikki Krogerus, Greg Kroah-Hartman, Rob Herring,
Krzysztof Kozlowski, Thierry Reding, Wolfram Sang
Cc: linux-usb@vger.kernel.org, devicetree@vger.kernel.org,
linux-tegra@vger.kernel.org, Wayne Chang
Hi,
> -----Original Message-----
> From: Jonathan Hunter <jonathanh@nvidia.com>
> Sent: Wednesday, February 1, 2023 12:23 PM
> To: Heikki Krogerus <heikki.krogerus@linux.intel.com>; Greg Kroah-Hartman
> <gregkh@linuxfoundation.org>; Rob Herring <robh+dt@kernel.org>;
> Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>; Thierry Reding
> <thierry.reding@gmail.com>; Wolfram Sang <wsa+renesas@sang-
> engineering.com>; Ajay Gupta <ajayg@nvidia.com>
> Cc: linux-usb@vger.kernel.org; devicetree@vger.kernel.org; linux-
> tegra@vger.kernel.org; Wayne Chang <waynec@nvidia.com>
> Subject: Re: [PATCH V10 4/6] i2c: nvidia-gpu: Remove ccgx,firmware-build
> property
>
> Adding Ajay as well.
>
> On 01/02/2023 16:01, Jon Hunter wrote:
> > Adding Wolfram.
> >
> > On 31/01/2023 17:57, Jon Hunter wrote:
> >> From: Wayne Chang <waynec@nvidia.com>
> >>
> >> Now the Cypress CCG driver has been updated to support the
> >> 'firmware-name' property to align with device-tree, remove the
> >> 'ccgx,firmware-build' property as this is no longer needed.
Acked-by: Ajay Gupta <ajayg@nvidia.com>
Thanks
> >> nvpublic
> >>
> >> Signed-off-by: Wayne Chang <waynec@nvidia.com>
> >> Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
> >> ---
> >> V6 -> V10: no changes
> >> V5: Added this patch from V3
> >>
> >> drivers/i2c/busses/i2c-nvidia-gpu.c | 3 +--
> >> 1 file changed, 1 insertion(+), 2 deletions(-)
> >>
> >> diff --git a/drivers/i2c/busses/i2c-nvidia-gpu.c
> >> b/drivers/i2c/busses/i2c-nvidia-gpu.c
> >> index 6d81ea530a83..a8b99e7f6262 100644
> >> --- a/drivers/i2c/busses/i2c-nvidia-gpu.c
> >> +++ b/drivers/i2c/busses/i2c-nvidia-gpu.c
> >> @@ -259,8 +259,7 @@ static const struct pci_device_id gpu_i2c_ids[] =
> >> {
> >> 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'),
> >> + /* Use FW built for NVIDIA GPU only */
> >> PROPERTY_ENTRY_STRING("firmware-name", "nvidia,gpu"),
> >> { }
> >> };
> >
>
> --
> nvpublic
^ permalink raw reply [flat|nested] 18+ messages in thread* Re: [PATCH V10 4/6] i2c: nvidia-gpu: Remove ccgx,firmware-build property
2023-02-01 20:33 ` Ajay Gupta
@ 2023-02-01 21:48 ` Wolfram Sang
0 siblings, 0 replies; 18+ messages in thread
From: Wolfram Sang @ 2023-02-01 21:48 UTC (permalink / raw)
To: Ajay Gupta
Cc: Jonathan Hunter, Heikki Krogerus, Greg Kroah-Hartman, Rob Herring,
Krzysztof Kozlowski, Thierry Reding, linux-usb@vger.kernel.org,
devicetree@vger.kernel.org, linux-tegra@vger.kernel.org,
Wayne Chang
[-- Attachment #1: Type: text/plain, Size: 300 bytes --]
> > >> Now the Cypress CCG driver has been updated to support the
> > >> 'firmware-name' property to align with device-tree, remove the
> > >> 'ccgx,firmware-build' property as this is no longer needed.
>
> Acked-by: Ajay Gupta <ajayg@nvidia.com>
Acked-by: Wolfram Sang <wsa@kernel.org>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH V10 5/6] arm64: tegra: Populate USB Type-C Controller for Jetson AGX Orin
2023-01-31 17:57 [PATCH V10 0/6] Add device-tree support for Cypress CYPD4226 Jon Hunter
` (3 preceding siblings ...)
2023-01-31 17:57 ` [PATCH V10 4/6] i2c: nvidia-gpu: Remove ccgx,firmware-build property Jon Hunter
@ 2023-01-31 17:57 ` Jon Hunter
2023-04-05 11:40 ` (subset) " Thierry Reding
2023-01-31 17:57 ` [PATCH V10 6/6] arm64: defconfig: Enable UCSI support Jon Hunter
5 siblings, 1 reply; 18+ messages in thread
From: Jon Hunter @ 2023-01-31 17:57 UTC (permalink / raw)
To: Heikki Krogerus, Greg Kroah-Hartman, Rob Herring,
Krzysztof Kozlowski, Thierry Reding
Cc: linux-usb, devicetree, linux-tegra, Wayne Chang, 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 <waynec@nvidia.com>.
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
---
V10: Populated connectors for type-c controller
V9: no changes
V8: no changes
V7: updated to use 'typec' for the node name
V6: no changes
V5: no changes
V4: added in this version
.../nvidia/tegra234-p3737-0000+p3701-0000.dts | 78 +++++++++++++++++++
1 file changed, 78 insertions(+)
diff --git a/arch/arm64/boot/dts/nvidia/tegra234-p3737-0000+p3701-0000.dts b/arch/arm64/boot/dts/nvidia/tegra234-p3737-0000+p3701-0000.dts
index 8a9747855d6b..33ef939fa3bf 100644
--- a/arch/arm64/boot/dts/nvidia/tegra234-p3737-0000+p3701-0000.dts
+++ b/arch/arm64/boot/dts/nvidia/tegra234-p3737-0000+p3701-0000.dts
@@ -2073,11 +2073,21 @@ ports {
usb2-0 {
mode = "host";
status = "okay";
+ port {
+ hs_typec_p1: endpoint {
+ remote-endpoint = <&hs_ucsi_ccg_p1>;
+ };
+ };
};
usb2-1 {
mode = "host";
status = "okay";
+ port {
+ hs_typec_p0: endpoint {
+ remote-endpoint = <&hs_ucsi_ccg_p0>;
+ };
+ };
};
usb2-2 {
@@ -2093,11 +2103,21 @@ usb2-3 {
usb3-0 {
nvidia,usb2-companion = <1>;
status = "okay";
+ port {
+ ss_typec_p0: endpoint {
+ remote-endpoint = <&ss_ucsi_ccg_p0>;
+ };
+ };
};
usb3-1 {
nvidia,usb2-companion = <0>;
status = "okay";
+ port {
+ ss_typec_p1: endpoint {
+ remote-endpoint = <&ss_ucsi_ccg_p1>;
+ };
+ };
};
usb3-2 {
@@ -2190,6 +2210,64 @@ TEGRA234_AON_GPIO(AA, 4)
phy-names = "p2u-0", "p2u-1", "p2u-2", "p2u-3", "p2u-4",
"p2u-5", "p2u-6", "p2u-7";
};
+
+ i2c@c240000 {
+ status = "okay";
+ typec@8 {
+ compatible = "cypress,cypd4226";
+ reg = <0x08>;
+ interrupt-parent = <&gpio>;
+ interrupts = <TEGRA234_MAIN_GPIO(Y, 4) IRQ_TYPE_LEVEL_LOW>;
+ firmware-name = "nvidia,jetson-agx-xavier";
+ status = "okay";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ ccg_typec_con0: connector@0 {
+ compatible = "usb-c-connector";
+ reg = <0>;
+ label = "USB-C";
+ data-role = "host";
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ port@0 {
+ reg = <0>;
+ hs_ucsi_ccg_p0: endpoint {
+ remote-endpoint = <&hs_typec_p0>;
+ };
+ };
+ port@1 {
+ reg = <1>;
+ ss_ucsi_ccg_p0: endpoint {
+ remote-endpoint = <&ss_typec_p0>;
+ };
+ };
+ };
+ };
+ ccg_typec_con1: connector@1 {
+ compatible = "usb-c-connector";
+ reg = <1>;
+ label = "USB-C";
+ data-role = "dual";
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ port@0 {
+ reg = <0>;
+ hs_ucsi_ccg_p1: endpoint {
+ remote-endpoint = <&hs_typec_p1>;
+ };
+ };
+ port@1 {
+ reg = <1>;
+ ss_ucsi_ccg_p1: endpoint {
+ remote-endpoint = <&ss_typec_p1>;
+ };
+ };
+ };
+ };
+ };
+ };
};
gpio-keys {
--
2.34.1
^ permalink raw reply related [flat|nested] 18+ messages in thread* Re: (subset) [PATCH V10 5/6] arm64: tegra: Populate USB Type-C Controller for Jetson AGX Orin
2023-01-31 17:57 ` [PATCH V10 5/6] arm64: tegra: Populate USB Type-C Controller for Jetson AGX Orin Jon Hunter
@ 2023-04-05 11:40 ` Thierry Reding
0 siblings, 0 replies; 18+ messages in thread
From: Thierry Reding @ 2023-04-05 11:40 UTC (permalink / raw)
To: Krzysztof Kozlowski, Thierry Reding, Greg Kroah-Hartman,
Heikki Krogerus, Jon Hunter, Rob Herring
Cc: Wayne Chang, devicetree, linux-usb, linux-tegra
From: Thierry Reding <treding@nvidia.com>
On Tue, 31 Jan 2023 17:57:47 +0000, Jon Hunter wrote:
> 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 <waynec@nvidia.com>.
>
> [...]
Applied, thanks!
[5/6] arm64: tegra: Populate USB Type-C Controller for Jetson AGX Orin
commit: 16744314ee57928c24aca95aa15f1381657edcfe
Best regards,
--
Thierry Reding <treding@nvidia.com>
^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH V10 6/6] arm64: defconfig: Enable UCSI support
2023-01-31 17:57 [PATCH V10 0/6] Add device-tree support for Cypress CYPD4226 Jon Hunter
` (4 preceding siblings ...)
2023-01-31 17:57 ` [PATCH V10 5/6] arm64: tegra: Populate USB Type-C Controller for Jetson AGX Orin Jon Hunter
@ 2023-01-31 17:57 ` Jon Hunter
5 siblings, 0 replies; 18+ messages in thread
From: Jon Hunter @ 2023-01-31 17:57 UTC (permalink / raw)
To: Heikki Krogerus, Greg Kroah-Hartman, Rob Herring,
Krzysztof Kozlowski, Thierry Reding
Cc: linux-usb, devicetree, linux-tegra, Wayne Chang, Jon Hunter
Enable the TYPEC UCSI support and the Cypress UCSI driver that is used
on the NVIDIA Jetson platforms.
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
---
V8 -> V10: no changes
V7: Added in V7
arch/arm64/configs/defconfig | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig
index 984553d55e17..d487d0e2b8e0 100644
--- a/arch/arm64/configs/defconfig
+++ b/arch/arm64/configs/defconfig
@@ -959,6 +959,8 @@ CONFIG_TYPEC_TCPCI=m
CONFIG_TYPEC_FUSB302=m
CONFIG_TYPEC_TPS6598X=m
CONFIG_TYPEC_HD3SS3220=m
+CONFIG_TYPEC_UCSI=m
+CONFIG_UCSI_CCG=m
CONFIG_MMC=y
CONFIG_MMC_BLOCK_MINORS=32
CONFIG_MMC_ARMMMCI=y
--
2.34.1
^ permalink raw reply related [flat|nested] 18+ messages in thread