Re: [PATCH v10 4/7] can: Add Nuvoton NCT6694 CANFD support
From: Ming Yu
Date: Fri May 09 2025 - 01:39:40 EST
Marc Kleine-Budde <mkl@xxxxxxxxxxxxxx> 於 2025年5月8日 週四 下午11:08寫道:
> > > > This driver supports Socket CANFD functionality for NCT6694 MFD
> > > > device based on USB interface.
> > > >
> > > > Signed-off-by: Ming Yu <tmyu0@xxxxxxxxxxx>
> > >
> > > The destroy functions nct6694_canfd_close() and nct6694_canfd_remove()
> > > are not the exact inverse of their init functions. Se comments inline.
> > >
> > > Please fix and add:
> > >
> > > Reviewed-by: Marc Kleine-Budde <mkl@xxxxxxxxxxxxxx>
> > >
> > > Feel free to mainline this patch as part of the series outside of the
> > > linux-can-next tree. Better ask the netdev maintainers for their OK, too.
> > >
> > > What about transceiver delay compensation for higher CAN-FD bitrates?
> > > How does you device handle these?
> > >
> >
> > In the CAN CMD0's DBTP field, bit 23 is the TDC flag, I will add
> > support for enabling tdc, and firmware will automatically configure
> > tdco. Do you think this approach is appropriate?
>
> Can you configure the TDC manually via USB?
>
Currently, it only supports enabling or disabling TDC.
> If the firmware does automatic TDCO configuration, does it take care of
> not enabling TCDO if the Data-BRP is > 2?
>
No, the firmware does not handle it. Do you think it would be
appropriate for the driver to handle the case where DBRP is > 2, for
example by disabling TDC?
(The firmware sets TDCO to (Total bit TQs / 2) when configuring DBTP.)
> BTW: What's the CAN clock of the device? I want to add it to the
> can-utils' bitrate calculation tool.
>
The CAN clock is running at 96Mhz.
Thanks,
Ming