Hi,
On 03.08.2012 02:54, B, Ravi wrote:
On 02.08.2012 14:12, Ravi Babu wrote:
This series of patches adds,
a) Multi instances support in musb driver
b) DT support for musb_dsps glue layer
c) DT support for NOP transceiver
AM33xx and TI81xx has dual musb controller and has two usb
Hi,
I am using v3.5 kernel and running a test where I disconnect a SS MSC
device while a big file is being written to it. I am also watching the
lsusb output in parallel. Expectation is that SS MSC device should
immediately disappear from lsusb output but sometime I see that SS MSC
is listed for
Hi,
I am using v3.5 kernel and running a test where I disconnect
a SS MSC device while a big file is being written to it. I am
also watching the lsusb output in parallel. Expectation is
that SS MSC device should immediately disappear from lsusb
output but sometime I see that SS MSC is listed
Hi
I am using v3.5 kernel and running a test where I disconnect a SS MSC
device while a big file is being written to it. I am also watching the
lsusb output in parallel. Expectation is that SS MSC device should
immediately disappear from lsusb output but sometime I see that SS MSC
is
Hi,
Ajay, which host controller are you seeing the disconnect lags on? Can you
send me the output of `sudo lspci -vvv -n`?
I was on leave last week so will get the data at earliest.
Ajay
Sarah Sharp
--
To unsubscribe from this list: send the line unsubscribe linux-usb in the
body of a
Some controllers take almost 55ms to complete controller
restore state (CRS).
There is no timeout limit mentioned in xhci specification so
fix the issue by increasing the timeout limit to 55ms
Signed-off-by: Ajay Gupta
Signed-off-by: Nagaraj Annaiah
---
drivers/usb/host/xhci.c | 2 +-
1 file
Some controllers take almost 55ms to complete controller
restore state (CRS).
There is no timeout limit mentioned in xhci specification so
fixing the issue by increasing the timeout limit to 55ms
Signed-off-by: Ajay Gupta
Signed-off-by: Nagaraj Annaiah
---
drivers/usb/host/xhci.c | 7
Some controllers take almost 55ms to complete controller
restore state (CRS).
There is no timeout limit mentioned in xhci specification so
fixing the issue by increasing the timeout limit to 100ms
Signed-off-by: Ajay Gupta
Signed-off-by: Nagaraj Annaiah
---
Changes from v2->v3
Updated com
Reviewed-by: Andy Shevchenko
> Signed-off-by: Loic Poulain
Reviewed-by: Ajay Gupta
> ---
> v2: Use ifdef instead of IS_ENABLED
> error message in case of nvmem registering failure
> Fix space/tab in Kconfig
> v3: Make nvmem a child of the usb dev instead of the serial
Hi Loic
On 6/21/18, Loic Poulain wrote:
> Most of FTDI's devices have an EEPROM which records FTDI devices
> configuration setting (e.g. the VID, PID, I/O config...) and user
> data. FT230R chip integrates a 128-byte eeprom, FT230X a 2048-byte
> eeprom...
>
> This patch adds support for FTDI
Latest NVIDIA GPU card has USB Type-C interface. There is a
Type-C controller which can be accessed over I2C.
This driver add I2C bus driver to communicate with Type-C controller.
I2C client driver will be part of USB Type-C UCSI driver.
Signed-off-by: Ajay Gupta
---
Documentation/i2c/busses
Latest NVIDIA GPU cards have a Cypress CCGx Type-C controller
over I2C interface.
This UCSI I2C driver uses I2C bus driver interface for communicating
with Type-C controller.
Signed-off-by: Ajay Gupta
---
drivers/usb/typec/ucsi/Kconfig| 10 +
drivers/usb/typec/ucsi/Makefile
Latest NVIDIA GPU card has USB Type-C interface. There is a
Type-C controller which can be accessed over I2C.
This driver add I2C bus driver to communicate with Type-C controller.
I2C client driver will be part of USB Type-C UCSI driver.
Signed-off-by: Ajay Gupta
---
Changes from v1 -> v2: N
Latest NVIDIA GPU cards have a Cypress CCGx Type-C controller
over I2C interface.
This UCSI I2C driver uses I2C bus driver interface for communicating
with Type-C controller.
Signed-off-by: Ajay Gupta
---
Changes from v1 -> v2:
Fixed identation in drivers/usb/typec/ucsi/Kconfig
drivers/
struct ucsi_ccg *uc = data;
> > +
> > + ucsi_notify(uc->ucsi);
> > +
> > + return IRQ_HANDLED;
> > +}
> > +
>
> > +static int ucsi_ccg_probe(struct i2c_client *client,
> > + const struct i2c_device_id *id
Latest NVIDIA GPU card has USB Type-C interface. There is a
Type-C controller which can be accessed over I2C.
This driver adds I2C bus driver to communicate with Type-C controller.
I2C client driver will be part of USB Type-C UCSI driver.
Signed-off-by: Ajay Gupta
---
Changes from v1 ->
Latest NVIDIA GPU cards have a Cypress CCGx Type-C controller
over I2C interface.
This UCSI I2C driver uses I2C bus driver interface for communicating
with Type-C controller.
Signed-off-by: Ajay Gupta
---
Changes from v1 -> v2
Fixed identation in drivers/usb/typec/ucsi/Kconfig
Chan
.
> >
>
> Some small comments below, after addressing them
>
> Reviewed-by: Andy Shevchenko
>
> > Signed-off-by: Ajay Gupta
> > ---
> > Changes from v1 -> v2
> > None
> > Changes from v2 -> v3
> >
Hi Andy,
> > Latest NVIDIA GPU cards have a Cypress CCGx Type-C controller over I2C
> > interface.
> >
> > This UCSI I2C driver uses I2C bus driver interface for communicating
> > with Type-C controller.
>
> > Changes from v3 -> v4
> > Fixed comments from Andy
>
> Unfortunatelly not all
Hi Andy,
> > Latest NVIDIA GPU card has USB Type-C interface. There is a Type-C
> > controller which can be accessed over I2C.
> >
> > This driver adds I2C bus driver to communicate with Type-C controller.
> > I2C client driver will be part of USB Type-C UCSI driver.
>
> Thanks for an update, my
Latest NVIDIA GPU card has USB Type-C interface. There is a
Type-C controller which can be accessed over I2C.
This driver adds I2C bus driver to communicate with Type-C controller.
I2C client driver will be part of USB Type-C UCSI driver.
Signed-off-by: Ajay Gupta
---
Changes from v1 ->
Latest NVIDIA GPU cards have a Cypress CCGx Type-C controller
over I2C interface.
This UCSI I2C driver uses I2C bus driver interface for communicating
with Type-C controller.
Signed-off-by: Ajay Gupta
---
Changes from v1 -> v2
Fixed identation in drivers/usb/typec/ucsi/Kconfig
Chan
Hi Andy
> > > Latest NVIDIA GPU card has USB Type-C interface. There is a Type-C
> > > controller which can be accessed over I2C.
> > > + val &= ~(I2C_MST_CNTL_GEN_START | I2C_MST_CNTL_GEN_STOP
> > > + | I2C_MST_CNTL_GEN_RAB);
> >
> > "|" should be on previous line to follow
Hi Greg,
> On Fri, Aug 31, 2018 at 01:22:21PM -0700, Ajay Gupta wrote:
> > + dev_info(dev, "Silicon id %2ph", data +
> CCGX_I2C_RAB_READ_SILICON_ID);
> > + dev_info(dev, "FW1 version %8ph\n", data +
> CCGX_I2C_RAB_FW1_VERSION);
> &g
Hi Greg,
> > +static int ccg_read(struct ucsi_ccg *uc, u16 rab, u8 *data, u32 len)
> > +{
> > + struct device *dev = uc->dev;
> > + struct i2c_client *client = uc->client;
> > + unsigned char buf[2];
> > + struct i2c_msg msgs[] = {
> > + {
> > + .addr =
Latest NVIDIA GPU card has USB Type-C interface. There is a
Type-C controller which can be accessed over I2C.
This driver adds I2C bus driver to communicate with Type-C controller.
I2C client driver will be part of USB Type-C UCSI driver.
Signed-off-by: Ajay Gupta
---
Changes from v1 ->
Latest NVIDIA GPU cards have a Cypress CCGx Type-C controller
over I2C interface.
This UCSI I2C driver uses I2C bus driver interface for communicating
with Type-C controller.
Signed-off-by: Ajay Gupta
---
Changes from v1 -> v2
Fixed identation in drivers/usb/typec/ucsi/Kconfig
Chan
Hi Peter,
> > Signed-off-by: Ajay Gupta
> > Reviewed-by: Andy Shevchenko
> > Reviewed-by: Heikki Krogerus
> > ---
> > Changes from v1 -> v2
> > None
> > Changes from v2 -> v3
> > Fixed review comments from Andy and Thierry
> >
Hi Peter,
> -Original Message-
> From: Peter Rosin
> Sent: Friday, September 7, 2018 2:13 AM
> To: Ajay Gupta ; w...@the-dreams.de;
> heikki.kroge...@linux.intel.com
> Cc: linux-usb@vger.kernel.org; linux-...@vger.kernel.org
> Subject: Re: [PATCH v9 2/2] usb: typ
+ return status;
> > + }
> > +
> > + i2cd->do_start = true;
> > + mutex_init(>mutex);
> > + enable_i2c_bus(i2cd);
> > +
> > + i2c_set_adapdata(>adapter, i2cd);
> > + i2cd->adapter.owner = THIS_MODULE;
> > + strlcpy(i2cd->adapter.name, "NVIDIA GPU I2C adapter",
> > + sizeof(i2cd->adapter.name));
> > + i2cd->adapter.algo = _i2c_algorithm;
> > + i2cd->adapter.dev.parent = >dev;
> > + status = i2c_add_adapter(>adapter);
> > + if (status < 0) {
> > + dev_err(>dev, "i2c_add_adapter failed %d\n", status);
> > + goto free_irq_vectors;
> > + }
> > +
> > + status = gpu_populate_client(i2cd, pdev->irq);
> > + if (status < 0) {
> > + dev_err(>dev, "gpu_populate_client failed %d\n",
> status);
> > + goto del_adapter;
> > + }
> > +
> > + return 0;
> > +
> > +del_adapter:
> > + i2c_del_adapter(>adapter);
> > +free_irq_vectors:
> > + pci_free_irq_vectors(pdev);
> > + return status;
> > +}
> > +
> > +static void gpu_i2c_remove(struct pci_dev *pdev) {
> > + struct gpu_i2c_dev *i2cd = dev_get_drvdata(>dev);
> > +
> > + i2c_del_adapter(>adapter);
> > + pci_free_irq_vectors(pdev);
> > +}
> > +
> > +static int gpu_i2c_resume(struct device *dev) {
> > + struct gpu_i2c_dev *i2cd = dev_get_drvdata(dev);
> > +
> > + enable_i2c_bus(i2cd);
> > + return 0;
> > +}
> > +
> > +static int gpu_i2c_idle(struct device *dev) {
> > + struct gpu_i2c_dev *i2cd = dev_get_drvdata(dev);
> > +
> > + if (!mutex_trylock(>mutex)) {
> > + dev_info(dev, "-EBUSY\n");
> > + return -EBUSY;
> > + }
> > + mutex_unlock(>mutex);
> > +
> > + return 0;
> > +}
> > +
> > +UNIVERSAL_DEV_PM_OPS(gpu_i2c_driver_pm, NULL, gpu_i2c_resume,
> > +gpu_i2c_idle);
> > +
> > +static struct pci_driver gpu_i2c_driver = {
> > + .name = "nvidia-gpu",
> > + .id_table = gpu_i2c_ids,
> > + .probe = gpu_i2c_probe,
> > + .remove = gpu_i2c_remove,
> > + .driver = {
> > + .pm = _i2c_driver_pm,
> > + },
> > +};
> > +
> > +module_pci_driver(gpu_i2c_driver);
> > +
> > +MODULE_AUTHOR("Ajay Gupta ");
> > +MODULE_DESCRIPTION("Nvidia GPU I2C controller Driver");
> > +MODULE_LICENSE("GPL v2");
> >
Latest NVIDIA GPU cards have a Cypress CCGx Type-C controller
over I2C interface.
This UCSI I2C driver uses I2C bus driver interface for communicating
with Type-C controller.
Signed-off-by: Ajay Gupta
---
Changes from v1 -> v2
Fixed identation in drivers/usb/typec/ucsi/Kconfig
Chan
Latest NVIDIA GPU card has USB Type-C interface. There is a
Type-C controller which can be accessed over I2C.
This driver adds I2C bus driver to communicate with Type-C controller.
I2C client driver will be part of USB Type-C UCSI driver.
Signed-off-by: Ajay Gupta
Reviewed-by: Andy Shevchenko
Latest NVIDIA GPU card has USB Type-C interface. There is a
Type-C controller which can be accessed over I2C.
This driver adds I2C bus driver to communicate with Type-C controller.
I2C client driver will be part of USB Type-C UCSI driver.
Signed-off-by: Ajay Gupta
Reviewed-by: Andy Shevchenko
Latest NVIDIA GPU cards have a Cypress CCGx Type-C controller
over I2C interface.
This UCSI I2C driver uses I2C bus driver interface for communicating
with Type-C controller.
Signed-off-by: Ajay Gupta
Reviewed-by: Andy Shevchenko
Acked-by: Heikki Krogerus
---
Changes from v1 ->
gt;regs) {
> >>> + dev_err(>dev, "pcim_iomap failed\n");
> >>> + return -ENOMEM;
> >>> + }
> >>> +
> >>> + status = pci_alloc_irq_vectors(pdev, 1, 1, PCI_IRQ_MSI);
> >>> + if (status < 0) {
> >>
c(dev, sizeof(*uc), GFP_KERNEL);
> > + if (!uc)
> > + return -ENOMEM;
> > +
> > + uc->ppm.data = devm_kzalloc(dev, sizeof(struct ucsi_data),
> GFP_KERNEL);
> > + if (!uc->ppm.data)
> > + return -ENOMEM;
> > +
> > + uc->ppm.cmd = ucsi_ccg_cmd;
> > + uc->ppm.sync = ucsi_ccg_sync;
> > + uc->dev = dev;
> > + uc->client = client;
> > +
> > + /* reset ccg device and initialize ucsi */
> > + status = ucsi_ccg_init(uc);
> > + if (status < 0) {
> > + dev_err(uc->dev, "ucsi_ccg_init failed - %d\n", status);
> > + return status;
> > + }
> > +
> > + uc->irq = client->irq;
> > +
> > + status = devm_request_threaded_irq(dev, uc->irq, NULL,
> ccg_irq_handler,
> > + IRQF_ONESHOT |
> IRQF_TRIGGER_HIGH,
> > + dev_name(dev), uc);
> > + if (status < 0) {
> > + dev_err(uc->dev, "request_threaded_irq failed - %d\n",
> status);
> > + return status;
> > + }
> > +
> > + uc->ucsi = ucsi_register_ppm(dev, >ppm);
> > + if (IS_ERR(uc->ucsi)) {
> > + dev_err(uc->dev, "ucsi_register_ppm failed\n");
> > + return PTR_ERR(uc->ucsi);
> > + }
> > +
> > + i2c_set_clientdata(client, uc);
> > + return 0;
> > +}
> > +
> > +static int ucsi_ccg_remove(struct i2c_client *client) {
> > + struct ucsi_ccg *uc = i2c_get_clientdata(client);
> > +
> > + ucsi_unregister_ppm(uc->ucsi);
> > +
> > + return 0;
> > +}
> > +
> > +static const struct i2c_device_id ucsi_ccg_device_id[] = {
> > + {"ccgx-ucsi", 0},
> > + {}
> > +};
> > +MODULE_DEVICE_TABLE(i2c, ucsi_ccg_device_id);
> > +
> > +static struct i2c_driver ucsi_ccg_driver = {
> > + .driver = {
> > + .name = "ucsi_ccg",
> > + },
> > + .probe = ucsi_ccg_probe,
> > + .remove = ucsi_ccg_remove,
> > + .id_table = ucsi_ccg_device_id,
> > +};
> > +
> > +module_i2c_driver(ucsi_ccg_driver);
> > +
> > +MODULE_AUTHOR("Ajay Gupta ");
> > +MODULE_DESCRIPTION("UCSI driver for Cypress CCGx Type-C controller");
> > +MODULE_LICENSE("GPL v2");
> >
Latest NVIDIA GPU card has USB Type-C interface. There is a
Type-C controller which can be accessed over I2C.
This driver adds I2C bus driver to communicate with Type-C controller.
I2C client driver will be part of USB Type-C UCSI driver.
Signed-off-by: Ajay Gupta
Reviewed-by: Andy Shevchenko
Latest NVIDIA GPU cards have a Cypress CCGx Type-C controller
over I2C interface.
This UCSI I2C driver uses I2C bus driver interface for communicating
with Type-C controller.
Signed-off-by: Ajay Gupta
Reviewed-by: Andy Shevchenko
Acked-by: Heikki Krogerus
---
Changes from v1 ->
> create mode 100644 Documentation/i2c/busses/i2c-nvidia-gpu
> > create mode 100644 drivers/i2c/busses/i2c-nvidia-gpu.c
> >
> > diff --git a/Documentation/i2c/busses/i2c-nvidia-gpu
> > b/Documentation/i2c/busses/i2c-nvidia-gpu
> > new file mode 1006
Hi Peter,
> >> +
> >> + if (msgs[i].flags & I2C_M_RD) {
> >> + /* gpu_i2c_read has implicit start and stop */
> >> + status = gpu_i2c_read(i2cd, msgs[i].buf, msgs[i].len);
> >> + if (status < 0)
> >> + return
Hi Peter,
> > +
> > + if (msgs[i].flags & I2C_M_RD) {
> > + /* gpu_i2c_read has implicit start and stop */
> > + status = gpu_i2c_read(i2cd, msgs[i].buf,
> > msgs[i].len);
> > + if (status <
Hi Peter,
> > Latest NVIDIA GPU cards have a Cypress CCGx Type-C controller over I2C
> > interface.
> >
> > This UCSI I2C driver uses I2C bus driver interface for communicating
> > with Type-C controller.
> >
> > Signed-off-by: Ajay Gupta
> > Re
Hi Peter,
> >>> + if (msgs[i].flags & I2C_M_RD) {
> >>> + /* gpu_i2c_read has implicit start and stop */
> >>> + status = gpu_i2c_read(i2cd, msgs[i].buf,
> msgs[i].len);
> >>> + if (status < 0)
> >>> +
t means that all the new offsets and sizes
> >> defined in v10 are available with
> >> offsetof() and sizeof() which would be much neater than a bunch of defines.
> >> Sorry for not catching this earlier!
> >>
> >> See below for an example.
> > Sure.
> >>
> >>> +
> >>> + uc->ppm.cmd = ucsi_ccg_cmd;
> >>> + uc->ppm.sync = ucsi_ccg_sync;
> >>> + uc->dev = dev;
> >>> + uc->client = client;
> >>> +
> >>> + /* reset ccg device and initialize ucsi */
> >>> + status = ucsi_ccg_init(uc);
> >>> + if (status < 0) {
> >>> + dev_err(uc->dev, "ucsi_ccg_init failed - %d\n", status);
> >>> + return status;
> >>> + }
> >>> +
> >>> + uc->irq = client->irq;
> >>> +
> >>> + status = devm_request_threaded_irq(dev, uc->irq, NULL,
> >> ccg_irq_handler,
> >>> +IRQF_ONESHOT |
> >> IRQF_TRIGGER_HIGH,
> >>> +dev_name(dev), uc);
> >>> + if (status < 0) {
> >>> + dev_err(uc->dev, "request_threaded_irq failed - %d\n",
> >> status);
> >>> + return status;
> >>> + }
> >>> +
> >>> + uc->ucsi = ucsi_register_ppm(dev, >ppm);
> >>> + if (IS_ERR(uc->ucsi)) {
> >>> + dev_err(uc->dev, "ucsi_register_ppm failed\n");
> >>> + return PTR_ERR(uc->ucsi);
> >>> + }
> >>> +
> >>> + rab = CCGX_I2C_RAB_UCSI_DATA_BLOCK(USBC_VERSION_OFFSET);
> >>> + status = ccg_read(uc, rab, (u8 *)(uc->ppm.data) +
> >> USBC_VERSION_OFFSET,
> >>> + USBC_VERSION_SIZE);
> >>
> >> E.g.
> >>rab = CCGX_I2C_RAB_UCSI_DATA_BLOCK(offsetof(struct ucsi_data,
> >> version));
> >>status = ccg_read(uc, rab, (u8 *)>ppm.data->version,
> >> sizeof(uc->ppm.data->version));
> >>
> >> Hmm, but this highlights that you are not doing any endian conversion
> >> of the fields in that struct as you read/write it.
> >
> >> Do you need to in case you have an endian mismatch?
> > Looks like don't need it. I have tested it and it works as is.
>
> Yeah, but have you tested the driver on a machine with the other byte-sex?
No, I think better to convert to desired endian.
Thanks
Ajay
--
nvpublic
--
> Cheers,
> Peter
>
> > Thanks
> > Ajay
> >
> > --
> > nvpublic
> > --
> >>
> >> Cheers,
> >> Peter
> >>
> >>> + if (status < 0) {
> >>> + ucsi_unregister_ppm(uc->ucsi);
> >>> + return status;
> >>> + }
> >>> +
> >>> + i2c_set_clientdata(client, uc);
> >>> + return 0;
> >>> +}
> >>> +
> >>> +static int ucsi_ccg_remove(struct i2c_client *client) {
> >>> + struct ucsi_ccg *uc = i2c_get_clientdata(client);
> >>> +
> >>> + ucsi_unregister_ppm(uc->ucsi);
> >>> +
> >>> + return 0;
> >>> +}
> >>> +
> >>> +static const struct i2c_device_id ucsi_ccg_device_id[] = {
> >>> + {"ccgx-ucsi", 0},
> >>> + {}
> >>> +};
> >>> +MODULE_DEVICE_TABLE(i2c, ucsi_ccg_device_id);
> >>> +
> >>> +static struct i2c_driver ucsi_ccg_driver = {
> >>> + .driver = {
> >>> + .name = "ucsi_ccg",
> >>> + },
> >>> + .probe = ucsi_ccg_probe,
> >>> + .remove = ucsi_ccg_remove,
> >>> + .id_table = ucsi_ccg_device_id,
> >>> +};
> >>> +
> >>> +module_i2c_driver(ucsi_ccg_driver);
> >>> +
> >>> +MODULE_AUTHOR("Ajay Gupta ");
> >>> +MODULE_DESCRIPTION("UCSI driver for Cypress CCGx Type-C
> >>> +controller"); MODULE_LICENSE("GPL v2");
> >>>
> >
Hi Peter
> > +static int ucsi_ccg_send_data(struct ucsi_ccg *uc) {
> > + unsigned char buf1[USBC_MSG_OUT_SIZE];
> > + unsigned char buf2[USBC_CONTROL_SIZE];
> > + int status;
> > + u16 rab;
> > +
> > + memcpy(buf1, (u8 *)(uc->ppm.data) +
Hi Peter
> > + if (msgs[i].flags & I2C_M_RD) {
> > + /* gpu_i2c_read has implicit start and stop */
> > + status = gpu_i2c_read(i2cd, msgs[i].buf,
> >> msgs[i].len);
> > + if (status < 0)
> > +
Latest NVIDIA GPU card has USB Type-C interface. There is a
Type-C controller which can be accessed over I2C.
This driver adds I2C bus driver to communicate with Type-C controller.
I2C client driver will be part of USB Type-C UCSI driver.
Signed-off-by: Ajay Gupta
Reviewed-by: Andy Shevchenko
Latest NVIDIA GPU cards have a Cypress CCGx Type-C controller
over I2C interface.
This UCSI I2C driver uses I2C bus driver interface for communicating
with Type-C controller.
Signed-off-by: Ajay Gupta
Reviewed-by: Andy Shevchenko
Acked-by: Heikki Krogerus
---
Changes from v1 ->
Hi Peter
> > > +static int ucsi_ccg_send_data(struct ucsi_ccg *uc) {
> > > + unsigned char buf1[USBC_MSG_OUT_SIZE];
> > > + unsigned char buf2[USBC_CONTROL_SIZE];
> > > + int status;
> > > + u16 rab;
> > > +
> > > + memcpy(buf1, (u8 *)(uc->ppm.data)
sses/i2c-nvidia-gpu
> > create mode 100644 drivers/i2c/busses/i2c-nvidia-gpu.c
> >
> > diff --git a/Documentation/i2c/busses/i2c-nvidia-gpu
> > b/Documentation/i2c/busses/i2c-nvidia-gpu
> > new file mode 100644
> > index 000..31884d2
> > --- /dev/null
>
Hi Peter,
> +static int ucsi_ccg_send_data(struct ucsi_ccg *uc) {
> +unsigned char buf1[USBC_MSG_OUT_SIZE];
> +unsigned char buf2[USBC_CONTROL_SIZE];
> +int status;
> +u16 rab;
> +
> +memcpy(buf1, (u8
Hi Heikki,
> On Fri, Aug 24, 2018 at 02:33:36PM -0700, Ajay Gupta wrote:
> > Latest NVIDIA GPU cards have a Cypress CCGx Type-C controller
> > over I2C interface.
> >
> > This UCSI I2C driver uses I2C bus driver interface for communicating
> > with Type-C contr
= {
> >>> + I2C_BOARD_INFO("ccgx-ucsi", 0x8),
> >>> + };
> >>> +
> >>> + gpu_ccgx_ucsi.irq = irq;
> >>> + i2cd->client = i2c_new_device(>adapter, _ccgx_ucsi);
> >>> + if (!i2cd->client) {
> >>> +
Hi Peter,
> >>> + memcpy(buf1, ((const void *)uc->ppm.data) + 0x20, sizeof(buf1));
> >>> + memcpy(buf2, ((const void *)uc->ppm.data) + 0x8, sizeof(buf2));
> >>> +
> >>> + status = ccg_write(uc, *(u16 *)buf, buf1, sizeof(buf1));
> >>
> >> This seems to be endian-dependent. May I suggest that you
Latest NVIDIA GPU cards have a Cypress CCGx Type-C controller
over I2C interface.
This UCSI I2C driver uses I2C bus driver interface for communicating
with Type-C controller.
Signed-off-by: Ajay Gupta
Reviewed-by: Andy Shevchenko
Acked-by: Heikki Krogerus
---
Changes from v1 ->
Latest NVIDIA GPU card has USB Type-C interface. There is a
Type-C controller which can be accessed over I2C.
This driver adds I2C bus driver to communicate with Type-C controller.
I2C client driver will be part of USB Type-C UCSI driver.
Signed-off-by: Ajay Gupta
Reviewed-by: Andy Shevchenko
Hi Peter,
.
>SMBUS has nothing to do with the >problem, that was just an example. An I2C
>>client driver can issue such I2C xfers all by >itself without going through
>emulation, so >just dropping the _EMUL flag is not the >answer. And I'd be
>surprised if the >hardware doesn't support
gt; drivers/i2c/busses/i2c-nvidia-gpu.c | 368
>
> > 5 files changed, 403 insertions(+)
> > create mode 100644 Documentation/i2c/busses/i2c-nvidia-gpu
> > create mode 100644 drivers/i2c/busses/i2c-nvidia-gpu.c
> >
>
Heikki Krogerus.
> Peter Rosin also helped review the patches and provided valuable comments.
> Thanks to all reviewers.
>
> Thanks
> Ajay
>
> Ajay Gupta (2):
> i2c: buses: add i2c bus driver for NVIDIA GPU
> usb: typec: ucsi: add support for Cypress CCGx
>
>
Hi Heikki,
> I still have a few more comments below..
Thanks for reviewing.
> On Wed, Oct 03, 2018 at 11:27:28AM -0700, Ajay Gupta wrote:
> > Latest NVIDIA GPU cards have a Cypress CCGx Type-C controller over I2C
> > interface.
> >
> > This UCSI I2C driver
Hi Andy
> > > > Latest NVIDIA GPU cards have a Cypress CCGx Type-C controller over
> > > > I2C interface.
> > > >
> > > > This UCSI I2C driver uses I2C bus driver interface for
> > > > communicating with Type-C controller.
>
> > > > + /*
> > > > +* Flush CCGx RESPONSE queue by
Hi Wolfram,
> > I don't think SMBus is an option in this case since the intended
> > client (Cypress something in patch 2/2) does xfers that would need
> > 16-bit commands and I think they are always 8-bit in SMBus, no?
>
> Yes. Command is 8 bit, data can be 16. Thanks for the heads up!
Please
now have added logic to check i2c adapter quirks and
issues i2c read transfer based on max_read_len quirk settings. This will make
sure
the read limitation is not affecting I2C host which do not have such limitation.
I think the patches should through usb tree because the main functionality is
Latest NVIDIA GPU card has USB Type-C interface. There is a
Type-C controller which can be accessed over I2C.
This driver adds I2C bus driver to communicate with Type-C controller.
I2C client driver will be part of USB Type-C UCSI driver.
Signed-off-by: Ajay Gupta
---
Changes from v1 ->
Latest NVIDIA GPU cards have a Cypress CCGx Type-C controller
over I2C interface.
This UCSI I2C driver uses I2C bus driver interface for communicating
with Type-C controller.
Signed-off-by: Ajay Gupta
---
Changes from v1 -> v2
Fixed identation in drivers/usb/typec/ucsi/Kconfig
Chan
Hi Peter and Andy,
> Shouldn't you return -ETIMEDOUT if count == 0?
> >>> Yes. Good catch. Does the below fix looks ok?
> >>>
> >>> do {
> >>> status = ccg_write(uc, CCGX_RAB_INTR_REG, ,
> sizeof(data));
> >>> if (status < 0)
> >>>
Hi Heikki,
> > > I still didn't understand why can't this just be taken care of in
> > > your I2C host driver? Why can't you just read 4 bytes at a time in
> > > your master_xfer hook until you have received as much as the message
> > > is asking, and only after that return?
> >
> > The I2C host
; > > > + dev_name(dev), uc);
> > > > + if (status < 0) {
> > > > + dev_err(uc->dev, "request_threaded_irq failed - %d\n",
> > > status);
> > > > + return s
Hi Andy,
> > > > > > Latest NVIDIA GPU cards have a Cypress CCGx Type-C controller
> > > > > > over I2C interface.
> > > > > >
> > > > > > This UCSI I2C driver uses I2C bus driver interface for
> > > > > > communicating with Type-C controller.
> > >
> > > > > > + /*
> > > > > > +* Flush
Hi Wolfram,
Do you have any comments on these patches?
Thanks
Ajay
> nvpublic
> -Original Message-
> From: Andy Shevchenko
> Sent: Monday, October 29, 2018 5:43 AM
> To: Ajay Gupta
> Cc: w...@the-dreams.de; heikki.kroge...@linux.intel.com; p...@axentia.se;
> linu
Hi Wolfram,
> > @@ -140,5 +140,6 @@ obj-$(CONFIG_I2C_SIBYTE)+= i2c-sibyte.o
> > obj-$(CONFIG_I2C_XGENE_SLIMPRO) += i2c-xgene-slimpro.o
> > obj-$(CONFIG_SCx200_ACB) += scx200_acb.o
> > obj-$(CONFIG_I2C_FSI) += i2c-fsi.o
> > +obj-$(CONFIG_I2C_NVIDIA_GPU) +=
Hi Wolfram,
> > Latest NVIDIA GPU card has USB Type-C interface. There is a Type-C
> > controller which can be accessed over I2C.
> >
> > This driver adds I2C bus driver to communicate with Type-C controller.
> > I2C client driver will be part of USB Type-C UCSI drive
Hi Wolfram,
> > It will be good if both of them can go together either through I2C or
> > USB subsystem. Since USB part is reviewed and has Acked-by Heikki so
> > please take that also.
>
> Hmmm, technicallly, there is no need to let them go together. There is no
> strict dependency.
Agree.
>
Latest NVIDIA GPU card has USB Type-C interface. There is a
Type-C controller which can be accessed over I2C.
This driver adds I2C bus driver to communicate with Type-C controller.
I2C client driver will be part of USB Type-C UCSI driver.
Signed-off-by: Ajay Gupta
Reviewed-by: Andy Shevchenko
Latest NVIDIA GPU cards have a Cypress CCGx Type-C controller
over I2C interface.
This UCSI I2C driver uses I2C bus driver interface for communicating
with Type-C controller.
Signed-off-by: Ajay Gupta
Reviewed-by: Andy Shevchenko
Acked-by: Heikki Krogerus
---
Changes from v1 ->
hould through usb tree because the main functionality is
usb Type-C.
The changes have been reviewed by Andy Shevchenko and Heikki Krogerus.
Peter Rosin also helped review the patches and provided valuable comments.
Thanks to all reviewers.
Thanks
Ajay
Ajay Gupta (2):
i2c: buses: add i2c bus driver for
Hi Wolfram,
> > > > We got confirmation from HW team about 4 byte read limitation.
> > > > There has to be a STOP after every single read cycle. One read
> > > > cycle supports maximum of
> > > > 4 byte burst. I will update the patches with a comment on this.
> > >
> > > Could it be that this is
Hi Wolfram,
> > > > > > Can we get the working set in while the issues is being debugged?
> > > > >
> > > > > I'm not the one making the decision, and I don't even know if
> > > > > this is going through the i2c or the usb tree? If it's going
> > > > > through the i2c tree you need a tag from the
Hi Heikki and Peter,
> > > > Can we get the working set in while the issues is being debugged?
> > >
> > > I'm not the one making the decision, and I don't even know if this
> > > is going through the i2c or the usb tree? If it's going through the
> > > i2c tree you need a tag from the usb people
Hi Peter,
> I'm not the one making the decision, and I don't even know if this
> is going through the i2c or the usb tree? If it's going through the
> i2c tree you need a tag from the usb people (Greg?) on patch 2/2,
> and if it's going through the usb tree, you need a tag
Hi Peter,
> > This driver adds I2C bus driver to communicate with Type-C controller.
> > I2C client driver will be part of USB Type-C UCSI driver.
> >
> > Signed-off-by: Ajay Gupta
> > Reviewed-by: Andy Shevchenko
> > Reviewed-by: Heikki Krogerus
> >
Hi Peter,
> >>> This driver adds I2C bus driver to communicate with Type-C controller.
> >>> I2C client driver will be part of USB Type-C UCSI driver.
> >>>
> >>> Signed-off-by: Ajay Gupta
> >>> Reviewed-by: Andy Shevchenko
> &g
Hi Peter,
> -Original Message-
> From: linux-i2c-ow...@vger.kernel.org
> On Behalf Of Peter Rosin
> Sent: Tuesday, September 11, 2018 1:55 AM
> To: Ajay Gupta ; w...@the-dreams.de;
> heikki.kroge...@linux.intel.com
> Cc: linux-usb@vger.kernel.org; linux-...@vger.ker
Hi Heikki and Peter,
> > > Can we get the working set in while the issues is being debugged?
> >
> > I'm not the one making the decision, and I don't even know if this is
> > going through the i2c or the usb tree? If it's going through the i2c
> > tree you need a tag from the usb people (Greg?)
Latest NVIDIA GPU card has USB Type-C interface. There is a
Type-C controller which can be accessed over I2C.
This driver adds I2C bus driver to communicate with Type-C controller.
I2C client driver will be part of USB Type-C UCSI driver.
Signed-off-by: Ajay Gupta
Reviewed-by: Andy Shevchenko
Latest NVIDIA GPU cards have a Cypress CCGx Type-C controller
over I2C interface.
This UCSI I2C driver uses I2C bus driver interface for communicating
with Type-C controller.
Signed-off-by: Ajay Gupta
Reviewed-by: Andy Shevchenko
Acked-by: Heikki Krogerus
---
Changes from v1 ->
86 matches
Mail list logo