RE: [PATCH 0/8] can: flexcan: add CAN FD support for NXP Flexcan

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Michal,

> -----Original Message-----
> From: Michael Walle <michael@xxxxxxxx>
> Sent: 2020年2月14日 3:20
> To: Marc Kleine-Budde <mkl@xxxxxxxxxxxxxx>
> Cc: Joakim Zhang <qiangqing.zhang@xxxxxxx>; wg@xxxxxxxxxxxxxx;
> netdev@xxxxxxxxxxxxxxx; linux-can@xxxxxxxxxxxxxxx; Pankaj Bansal
> <pankaj.bansal@xxxxxxx>; Michael Walle <michael@xxxxxxxx>
> Subject: Re: [PATCH 0/8] can: flexcan: add CAN FD support for NXP Flexcan
> 
> Hi,
> 
> >>> Are you prepared to add back these patches as they are necessary for
> >>> Flexcan CAN FD? And this Flexcan CAN FD patch set is based on these
> >>> patches.
> >>
> >> Yes, these patches will be added back.
> >
> >I've cleaned up the first patch a bit, and pushed everything to the
> >testing branch. Can you give it a test.
> 
> What happend to that branch? FWIW I've just tried the patches on a custom
> board with a LS1028A SoC. Both CAN and CAN-FD are working. I've tested
> against a Peaktech USB CAN adapter. I'd love to see these patches upstream,
> because our board also offers CAN and basic support for it just made it
> upstream [1].
The FlexCAN CAN FD related patches have stayed in linux-can-next/flexcan branch for a long time, I still don't know why Marc doesn't merge them into Linux mainline.
https://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next.git/tree/?h=flexcan
Also must hope that this patch set can be upstreamed soon. :-)

> If these patches are upstream, only the device tree nodes seems to be missing.
> I don't know what has happened to [2]. But the patch doesn't seem to be
> necessary.
Yes, this patch is unnecessary. I have NACKed this patch for that, according to FlexCAN Integrated Guide, CTRL1[CLKSRC]=0 select oscillator clock and CTRL1[CLKSRC]=1 select peripheral clock.
But it is actually decided by SoC integration, for i.MX, the design is different.
I have not upstream i.MX FlexCAN device tree nodes, since it's dependency have not upstreamed yet.

> Pankaj already send a patch to add the device node to the LS1028A [3].
> Thats basically the same I've used, only that mine didn't had the
> "fsl,ls1028ar1-flexcan" compatiblity string, but only the "lx2160ar1-flexcan"
> which is the correct way to use it, right?
You can see below table from FlexCAN driver, "fsl,lx2160ar1-flexcan" supports CAN FD, you can use this compatible string.
static const struct of_device_id flexcan_of_match[] = {
	{ .compatible = "fsl,imx8qm-flexcan", .data = &fsl_imx8qm_devtype_data, },
	{ .compatible = "fsl,imx6q-flexcan", .data = &fsl_imx6q_devtype_data, },
	{ .compatible = "fsl,imx28-flexcan", .data = &fsl_imx28_devtype_data, },
	{ .compatible = "fsl,imx53-flexcan", .data = &fsl_imx25_devtype_data, },
	{ .compatible = "fsl,imx35-flexcan", .data = &fsl_imx25_devtype_data, },
	{ .compatible = "fsl,imx25-flexcan", .data = &fsl_imx25_devtype_data, },
	{ .compatible = "fsl,p1010-flexcan", .data = &fsl_p1010_devtype_data, },
	{ .compatible = "fsl,vf610-flexcan", .data = &fsl_vf610_devtype_data, },
	{ .compatible = "fsl,ls1021ar2-flexcan", .data = &fsl_ls1021a_r2_devtype_data, },
	{ .compatible = "fsl,lx2160ar1-flexcan", .data = &fsl_lx2160a_r1_devtype_data, },
	{ /* sentinel */ },
};

> Sorry for putting this all in one mail, but I've just subscribed to linux-can and
> there is no message archive on lore.kernel.org for it :/
> 
> [1]
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flore.ker
> nel.org%2Flkml%2F20200212073617.GA11096%40dragon%2F&amp;data=02%
> 7C01%7Cqiangqing.zhang%40nxp.com%7Cd278fdc027a54bc9f57b08d7b0b9d2
> ef%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C637172184473466
> 188&amp;sdata=fbIOrIG4PhL5f4Sc7P9sTFw%2FoNoinz%2Fd56TyLjnHdn8%3D&
> amp;reserved=0
> [2]
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.sp
> inics.net%2Flists%2Flinux-can%2Fmsg01584.html&amp;data=02%7C01%7Cqia
> ngqing.zhang%40nxp.com%7Cd278fdc027a54bc9f57b08d7b0b9d2ef%7C686ea
> 1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C637172184473466188&amp;sd
> ata=BXCIcEzNXN1rh5%2FLKjR8ciM3gZ%2Fdkl3%2BDAohhfgg1PQ%3D&amp;re
> served=0
> [3]
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.sp
> inics.net%2Flists%2Flinux-can%2Fmsg01577.html&amp;data=02%7C01%7Cqia
> ngqing.zhang%40nxp.com%7Cd278fdc027a54bc9f57b08d7b0b9d2ef%7C686ea
> 1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C637172184473466188&amp;sd
> ata=9O6Vg69e%2FNbR2n1F%2BKKKiEqGmYPHO4qLCTEuCQhRS4U%3D&amp;r
> eserved=0
> 
> -michael




[Index of Archives]     [Automotive Discussions]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [CAN Bus]

  Powered by Linux