linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] can: m_can: add support for bosch mcan version 3.3.0
       [not found] <CGME20201126045221epcas5p46f00cd452b8023262f5556e6f4567352@epcas5p4.samsung.com>
@ 2020-11-26  4:51 ` Pankaj Sharma
  2020-11-26 10:48   ` Marc Kleine-Budde
  2020-11-26 10:51   ` Marc Kleine-Budde
  0 siblings, 2 replies; 5+ messages in thread
From: Pankaj Sharma @ 2020-11-26  4:51 UTC (permalink / raw)
  To: linux-can, netdev, linux-kernel
  Cc: sriram.dash, dmurphy, wg, mkl, davem, kuba, pankaj.dubey, Pankaj Sharma

Add support for mcan bit timing and control mode according to bosch mcan IP
version 3.3.0
The mcan version read from the Core Release field of CREL register would be
33. Accordingly the properties are to be set for mcan v3.3.0

Signed-off-by: Pankaj Sharma <pankj.sharma@samsung.com>
---
Depends on:
https://marc.info/?l=linux-can&m=160624495218700&w=2

 drivers/net/can/m_can/m_can.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/can/m_can/m_can.c b/drivers/net/can/m_can/m_can.c
index 86bbbfa..7652175 100644
--- a/drivers/net/can/m_can/m_can.c
+++ b/drivers/net/can/m_can/m_can.c
@@ -1385,6 +1385,8 @@ static int m_can_dev_setup(struct m_can_classdev *m_can_dev)
 						&m_can_data_bittiming_const_31X;
 		break;
 	case 32:
+	case 33:
+		/* Support both MCAN version v3.2.x and v3.3.0 */
 		m_can_dev->can.bittiming_const = m_can_dev->bit_timing ?
 			m_can_dev->bit_timing : &m_can_bittiming_const_31X;
 
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] can: m_can: add support for bosch mcan version 3.3.0
  2020-11-26  4:51 ` [PATCH] can: m_can: add support for bosch mcan version 3.3.0 Pankaj Sharma
@ 2020-11-26 10:48   ` Marc Kleine-Budde
  2020-11-26 11:21     ` Oliver Hartkopp
  2020-11-26 10:51   ` Marc Kleine-Budde
  1 sibling, 1 reply; 5+ messages in thread
From: Marc Kleine-Budde @ 2020-11-26 10:48 UTC (permalink / raw)
  To: Pankaj Sharma, linux-can, netdev, linux-kernel
  Cc: sriram.dash, dmurphy, wg, davem, kuba, pankaj.dubey


[-- Attachment #1.1: Type: text/plain, Size: 1385 bytes --]

On 11/26/20 5:51 AM, Pankaj Sharma wrote:
> Add support for mcan bit timing and control mode according to bosch mcan IP
> version 3.3.0
> The mcan version read from the Core Release field of CREL register would be
> 33. Accordingly the properties are to be set for mcan v3.3.0

BTW: do you have the v3.2 and v3.1 datasheets?

Marc

> Signed-off-by: Pankaj Sharma <pankj.sharma@samsung.com>
> ---
> Depends on:
> https://marc.info/?l=linux-can&m=160624495218700&w=2
> 
>  drivers/net/can/m_can/m_can.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/net/can/m_can/m_can.c b/drivers/net/can/m_can/m_can.c
> index 86bbbfa..7652175 100644
> --- a/drivers/net/can/m_can/m_can.c
> +++ b/drivers/net/can/m_can/m_can.c
> @@ -1385,6 +1385,8 @@ static int m_can_dev_setup(struct m_can_classdev *m_can_dev)
>  						&m_can_data_bittiming_const_31X;
>  		break;
>  	case 32:
> +	case 33:
> +		/* Support both MCAN version v3.2.x and v3.3.0 */
>  		m_can_dev->can.bittiming_const = m_can_dev->bit_timing ?
>  			m_can_dev->bit_timing : &m_can_bittiming_const_31X;
>  
> 


-- 
Pengutronix e.K.                 | Marc Kleine-Budde           |
Embedded Linux                   | https://www.pengutronix.de  |
Vertretung West/Dortmund         | Phone: +49-231-2826-924     |
Amtsgericht Hildesheim, HRA 2686 | Fax:   +49-5121-206917-5555 |


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] can: m_can: add support for bosch mcan version 3.3.0
  2020-11-26  4:51 ` [PATCH] can: m_can: add support for bosch mcan version 3.3.0 Pankaj Sharma
  2020-11-26 10:48   ` Marc Kleine-Budde
@ 2020-11-26 10:51   ` Marc Kleine-Budde
  1 sibling, 0 replies; 5+ messages in thread
From: Marc Kleine-Budde @ 2020-11-26 10:51 UTC (permalink / raw)
  To: Pankaj Sharma, linux-can, netdev, linux-kernel
  Cc: sriram.dash, dmurphy, wg, davem, kuba, pankaj.dubey


[-- Attachment #1.1: Type: text/plain, Size: 664 bytes --]

On 11/26/20 5:51 AM, Pankaj Sharma wrote:
> Add support for mcan bit timing and control mode according to bosch mcan IP
> version 3.3.0
> The mcan version read from the Core Release field of CREL register would be
> 33. Accordingly the properties are to be set for mcan v3.3.0
> 
> Signed-off-by: Pankaj Sharma <pankj.sharma@samsung.com>

Applied to linux-can/testing

tnx,
Marc

-- 
Pengutronix e.K.                 | Marc Kleine-Budde           |
Embedded Linux                   | https://www.pengutronix.de  |
Vertretung West/Dortmund         | Phone: +49-231-2826-924     |
Amtsgericht Hildesheim, HRA 2686 | Fax:   +49-5121-206917-5555 |


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] can: m_can: add support for bosch mcan version 3.3.0
  2020-11-26 10:48   ` Marc Kleine-Budde
@ 2020-11-26 11:21     ` Oliver Hartkopp
  2020-11-26 12:21       ` pankj.sharma
  0 siblings, 1 reply; 5+ messages in thread
From: Oliver Hartkopp @ 2020-11-26 11:21 UTC (permalink / raw)
  To: Marc Kleine-Budde, Pankaj Sharma, linux-can, netdev, linux-kernel
  Cc: sriram.dash, dmurphy, wg, davem, kuba, pankaj.dubey



On 26.11.20 11:48, Marc Kleine-Budde wrote:
> On 11/26/20 5:51 AM, Pankaj Sharma wrote:
>> Add support for mcan bit timing and control mode according to bosch mcan IP
>> version 3.3.0
>> The mcan version read from the Core Release field of CREL register would be
>> 33. Accordingly the properties are to be set for mcan v3.3.0
> 
> BTW: do you have the v3.2 and v3.1 datasheets?

Unfortunately Bosch does not give access to older documents, so I tried 
to concentrate all my downloaded versions of public available 
information here:

https://github.com/hartkopp/M_CAN-User-Manual-History

PR's with updates are welcome ;-)

Best,
Oliver

ps. @Bosch Semiconductors - Read the README there! I would like to 
remove my own collection.

> 
> Marc
> 
>> Signed-off-by: Pankaj Sharma <pankj.sharma@samsung.com>
>> ---
>> Depends on:
>> https://marc.info/?l=linux-can&m=160624495218700&w=2
>>
>>   drivers/net/can/m_can/m_can.c | 2 ++
>>   1 file changed, 2 insertions(+)
>>
>> diff --git a/drivers/net/can/m_can/m_can.c b/drivers/net/can/m_can/m_can.c
>> index 86bbbfa..7652175 100644
>> --- a/drivers/net/can/m_can/m_can.c
>> +++ b/drivers/net/can/m_can/m_can.c
>> @@ -1385,6 +1385,8 @@ static int m_can_dev_setup(struct m_can_classdev *m_can_dev)
>>   						&m_can_data_bittiming_const_31X;
>>   		break;
>>   	case 32:
>> +	case 33:
>> +		/* Support both MCAN version v3.2.x and v3.3.0 */
>>   		m_can_dev->can.bittiming_const = m_can_dev->bit_timing ?
>>   			m_can_dev->bit_timing : &m_can_bittiming_const_31X;
>>   
>>
> 
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [PATCH] can: m_can: add support for bosch mcan version 3.3.0
  2020-11-26 11:21     ` Oliver Hartkopp
@ 2020-11-26 12:21       ` pankj.sharma
  0 siblings, 0 replies; 5+ messages in thread
From: pankj.sharma @ 2020-11-26 12:21 UTC (permalink / raw)
  To: 'Oliver Hartkopp', 'Marc Kleine-Budde',
	linux-can, netdev, linux-kernel
  Cc: sriram.dash, dmurphy, wg, davem, kuba, pankaj.dubey


> From: Oliver Hartkopp <socketcan@hartkopp.net>
> Subject: Re: [PATCH] can: m_can: add support for bosch mcan version 3.3.0
> 
> 
> 
> On 26.11.20 11:48, Marc Kleine-Budde wrote:
> > On 11/26/20 5:51 AM, Pankaj Sharma wrote:
> >> Add support for mcan bit timing and control mode according to bosch
> >> mcan IP version 3.3.0 The mcan version read from the Core Release
> >> field of CREL register would be 33. Accordingly the properties are to
> >> be set for mcan v3.3.0
> >
> > BTW: do you have the v3.2 and v3.1 datasheets?
> 
> Unfortunately Bosch does not give access to older documents, so I tried to
> concentrate all my downloaded versions of public available information here:
> 
> https://protect2.fireeye.com/v1/url?k=6afc7639-35674f23-6afdfd76-
> 000babff24ad-be473a015905c7ca&q=1&e=8d02d5be-2511-407d-bfd1-
> 1d9135e21b7c&u=https%3A%2F%2Fgithub.com%2Fhartkopp%2FM_CAN-User-
> Manual-History

Thanks Oliver for sharing the link. 
@Marc: I have used the documents from the link provided by Oliver.

Regards
Pankaj Sharma

> 
> PR's with updates are welcome ;-)
> 
> Best,
> Oliver
> 
> ps. @Bosch Semiconductors - Read the README there! I would like to remove
> my own collection.
> 
> >
> > Marc
> >
> >> Signed-off-by: Pankaj Sharma <pankj.sharma@samsung.com>
> >> ---
> >> Depends on:
> >> https://protect2.fireeye.com/v1/url?k=6c628f8e-33f9b694-6c6304c1-000b
> >> abff24ad-a2e76f208a6b1470&q=1&e=8d02d5be-2511-407d-bfd1-
> 1d9135e21b7c&
> >> u=https%3A%2F%2Fmarc.info%2F%3Fl%3Dlinux-
> can%26m%3D160624495218700%26
> >> w%3D2
> >>
> >>   drivers/net/can/m_can/m_can.c | 2 ++
> >>   1 file changed, 2 insertions(+)
> >>
> >> diff --git a/drivers/net/can/m_can/m_can.c
> >> b/drivers/net/can/m_can/m_can.c index 86bbbfa..7652175 100644
> >> --- a/drivers/net/can/m_can/m_can.c
> >> +++ b/drivers/net/can/m_can/m_can.c
> >> @@ -1385,6 +1385,8 @@ static int m_can_dev_setup(struct m_can_classdev
> *m_can_dev)
> >>
> 	&m_can_data_bittiming_const_31X;
> >>   		break;
> >>   	case 32:
> >> +	case 33:
> >> +		/* Support both MCAN version v3.2.x and v3.3.0 */
> >>   		m_can_dev->can.bittiming_const = m_can_dev->bit_timing ?
> >>   			m_can_dev->bit_timing :
> &m_can_bittiming_const_31X;
> >>
> >>
> >
> >


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-11-27  6:09 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CGME20201126045221epcas5p46f00cd452b8023262f5556e6f4567352@epcas5p4.samsung.com>
2020-11-26  4:51 ` [PATCH] can: m_can: add support for bosch mcan version 3.3.0 Pankaj Sharma
2020-11-26 10:48   ` Marc Kleine-Budde
2020-11-26 11:21     ` Oliver Hartkopp
2020-11-26 12:21       ` pankj.sharma
2020-11-26 10:51   ` Marc Kleine-Budde

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).