can: m_can: add device tree binding documentation
Subsystems (3)
PATCH v5 1/2 can: m_can: add device tree binding documentation
add M_CAN device tree binding documentation
---
Changes since v4:
- change the name of board dtsi to board dts which is more common
Changes since v3:
- change mram-cfg property name to bosch,mram-cfg
- indent change
--- .../devicetree/bindings/net/can/m_can.txt | 67 ++++++++++++++++++++ 1 files changed, 67 insertions(+), 0 deletions(-) create mode 100644 Documentation/devicetree/bindings/net/can/m_can.txt
Documentation/devicetree/bindings/net/can/m_can.txt new file +67 -0
@@ -0,0 +1,67 @@ +Bosch MCAN controller Device Tree Bindings +------------------------------------------------- + +Required properties: +- compatible : Should be "bosch,m_can" for M_CAN controllers +- reg : physical base address and size of the M_CAN + registers map and Message RAM +- reg-names : Should be "m_can" and "message_ram" +- interrupts : Should be the interrupt number of M_CAN interrupt + line 0 and line 1, could be same if sharing + the same interrupt. +- interrupt-names : Should contain "int0" and "int1" +- clocks : Clocks used by controller, should be host clock + and CAN clock. +- clock-names : Should contain "hclk" and "cclk" +- pinctrl-<n> : Pinctrl states as described in bindings/pinctrl/pinctrl-bindings.txt +- pinctrl-names : Names corresponding to the numbered pinctrl states +- bosch,mram-cfg : Message RAM configuration data. + Multiple M_CAN instances can share the same Message + RAM and each element(e.g Rx FIFO or Tx Buffer and etc) + number in Message RAM is also configurable, + so this property is telling driver how the shared or + private Message RAM are used by this M_CAN controller. + + The format should be as follows: + <offset sidf_elems xidf_elems rxf0_elems rxf1_elems + rxb_elems txe_elems txb_elems> + The 'offset' is an address offset of the Message RAM + where the following elements start from. This is + usually set to 0x0 if you're using a private Message + RAM. The remain cells are used to specify how many + elements are used for each FIFO/Buffer. + + M_CAN includes the following elements according to user manual: + 11-bit Filter 0-128 elements / 0-128 words + 29-bit Filter 0-64 elements / 0-128 words + Rx FIFO 0 0-64 elements / 0-1152 words + Rx FIFO 1 0-64 elements / 0-1152 words + Rx Buffers 0-64 elements / 0-1152 words + Tx Event FIFO 0-32 elements / 0-64 words + Tx Buffers 0-32 elements / 0-576 words + + Please refer to 2.4.1 Message RAM Configuration in + Bosch M_CAN user manual for details. + +Example: +SoC dtsi: +m_can1: can at 020e8000 { + compatible = "bosch,m_can"; + reg = <0x020e8000 0x4000>, <0x02298000 0x4000>; + reg-names = "m_can", "message_ram"; + interrupts = <0 114 0x04>, + <0 114 0x04>; + interrupt-names = "int0", "int1"; + clocks = <&clks IMX6SX_CLK_CANFD>, + <&clks IMX6SX_CLK_CANFD>; + clock-names = "hclk", "cclk"; + bosch,mram-cfg = <0x0 0 0 32 0 0 0 1>; + status = "disabled"; +}; + +Board dts: +&m_can1 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_m_can1>; + status = "enabled"; +};
Signature · 1 line
1.7.8
PATCH v5 2/2 can: m_can: add Bosch M_CAN controller support
The patch adds the basic CAN TX/RX function support for Bosch M_CAN controller. For TX, only one dedicated tx buffer is used for sending data.
For RX, RXFIFO 0 is used for receiving data to avoid overflow.
Rx FIFO 1 and Rx Buffers are not used currently, as well as Tx Event FIFO.
Due to the message ram can be shared by multi m_can instances
and the fifo element is configurable which is SoC dependant,
the design is to parse the message ram related configuration data from device tree rather than hardcode define it in driver which can make the message ram sharing fully transparent to M_CAN controller driver,
then we can gain better driver maintainability and future features upgrade.
M_CAN also supports CANFD protocol features like data payload up to 64 bytes and bitrate switch at runtime, however, this patch still does not add the support for these features.
---
changes since v4:
some minor changes:
- introduce m_can_fifo_write and is_lec_err functin
- define macro M_CAN_FIFO_XXX for FIFO
- move m_can_of_table before platform_driver
- a few indent fix
Changes since v3:
A few minor changes:
- use the updated name of bosch,mram-cfg
- remove .owner = THIS_MODULE
- add a line comment for mram_cfg structure
Changes since v2:
- fix checkpatch warnings
- handle CAN_CTRLMODE_BERR_REPORTING properly that disable LEC error interrupts (Bus error) if no CAN_CTRLMODE_BERR_REPORTING.
- introduce struct mram_cfg array to store message ram configuration data for each fifo
- fix txb offset calculate wrong issue(should not plus mram_off again)
- check return for clk_prepare_enable
- split doc part into a separate patch
Changes since v1:
Addressed all comments from Mark Rutland, Hartkopp and Marc Kleine-Budde
- merge three patches into one
- create directory drivers/net/can/m_can
- improve binding doc
- make sure using valid pointer before netif_receive_skb(skb)
- remove debug info a bit
- let the stats are updated even if alloc_can_err_skb() fails
- other small fixes
--- drivers/net/can/Kconfig | 2 + drivers/net/can/Makefile | 1 + drivers/net/can/m_can/Kconfig | 4 + drivers/net/can/m_can/Makefile | 7 + drivers/net/can/m_can/m_can.c | 1202 ++++++++++++++++++++++++++++++++++++++++ 5 files changed, 1216 insertions(+), 0 deletions(-) create mode 100644 drivers/net/can/m_can/Kconfig create mode 100644 drivers/net/can/m_can/Makefile create mode 100644 drivers/net/can/m_can/m_can.c
drivers/net/can/Kconfig +2 -0
@@ -143,6 +143,8 @@ source "drivers/net/can/sja1000/Kconfig" source "drivers/net/can/c_can/Kconfig" +source "drivers/net/can/m_can/Kconfig" + source "drivers/net/can/cc770/Kconfig" source "drivers/net/can/spi/Kconfig"
drivers/net/can/Makefile +1 -0
@@ -17,6 +17,7 @@ obj-y += softing/ obj-$(CONFIG_CAN_SJA1000) += sja1000/ obj-$(CONFIG_CAN_MSCAN) += mscan/ obj-$(CONFIG_CAN_C_CAN) += c_can/ +obj-$(CONFIG_CAN_M_CAN) += m_can/ obj-$(CONFIG_CAN_CC770) += cc770/ obj-$(CONFIG_CAN_AT91) += at91_can.o obj-$(CONFIG_CAN_TI_HECC) += ti_hecc.o
drivers/net/can/m_can/Kconfig new file +4 -0
@@ -0,0 +1,4 @@ +config CAN_M_CAN + tristate "Bosch M_CAN devices" + ---help--- + Say Y here if you want to support for Bosch M_CAN controller.
drivers/net/can/m_can/Makefile new file +7 -0
@@ -0,0 +1,7 @@ +# +# Makefile for the Bosch M_CAN controller drivers. +# + +obj-$(CONFIG_CAN_M_CAN) += m_can.o + +ccflags-$(CONFIG_CAN_DEBUG_DEVICES) := -DDEBUG
drivers/net/can/m_can/m_can.c new file +1202 -0
1,202 lines not on this page · raw message
Signature · 1 line
1.7.8
PATCH v5 2/2 can: m_can: add Bosch M_CAN controller support
Quoted 62 lines · Dong Aisheng
The patch adds the basic CAN TX/RX function support for Bosch
M_CANcontroller. For TX, only one dedicated tx buffer is used for sending data.
For RX, RXFIFO 0 is used for receiving data to avoid overflow.
Rx FIFO 1 and Rx Buffers are not used currently, as well as Tx Event FIFO.Due to the message ram can be shared by multi
m_caninstances
and the fifo element is configurable which is SoC dependant,
the design is to parse the message ram related configuration data from device tree rather than hardcode define it in driver which can make the message ram sharing fully transparent toM_CANcontroller driver,
then we can gain better driver maintainability and future features upgrade.
M_CANalso supports CANFD protocol features like data payload up to 64 bytes and bitrate switch at runtime, however, this patch still does not add the support for these features.Cc Wolfgang Grandegger <[email protected]>Cc Marc Kleine-Budde <[email protected]>Cc Mark Rutland <[email protected]>Cc Oliver Hartkopp <[email protected]>Cc Varka Bhadram <[email protected]>Signed-off-by Dong Aisheng <[email protected]>---
changes since v4:
some minor changes:
- introducem_can_fifo_writeandis_lec_errfunctin
- define macroM_CAN_FIFO_XXXfor FIFO
- movem_can_of_tablebeforeplatform_driver
- a few indent fixChanges since v3:
A few minor changes:
- use the updated name of bosch,mram-cfg
- remove .owner =THIS_MODULE
- add a line comment formram_cfgstructureChanges since v2:
- fix checkpatch warnings
- handleCAN_CTRLMODE_BERR_REPORTINGproperly that disable LEC error interrupts (Bus error) if noCAN_CTRLMODE_BERR_REPORTING.
- introduce structmram_cfgarray to store message ram configuration data for each fifo
- fix txb offset calculate wrongissue(should not plus mram_off again)
- check return forclk_prepare_enable
- split doc part into a separate patchChanges since v1:
Addressed all comments from Mark Rutland, Hartkopp and Marc Kleine-Budde
- merge three patches into one
- create directorydrivers/net/can/m_can
- improve binding doc
- make sure using valid pointer beforenetif_receive_skb(skb)
- remove debug info a bit
- let the stats are updated even ifalloc_can_err_skb()fails
- other small fixes--- drivers/net/can/Kconfig | 2 + drivers/net/can/Makefile | 1 + drivers/net/can/m_can/Kconfig | 4 + drivers/net/can/m_can/Makefile | 7 + drivers/net/can/m_can/m_can.c | 1202 ++++++++++++++++++++++++++++++++++++++++ 5 files changed, 1216 insertions(+), 0 deletions(-)
Quoted 5 lines
create mode 100644
drivers/net/can/m_can/Kconfigcreate mode 100644drivers/net/can/m_can/Makefilecreate mode 100644drivers/net/can/m_can/m_can.c
This series addressed all of my comments ...Thanks :-)
Signature · 2 lines
Regards, Varka Bhadram.
PATCH v5 2/2 can: m_can: add Bosch M_CAN controller support
Quoted 68 lines · Varka Bhadram
Quoted 55 lines · Dong Aisheng
The patch adds the basic CAN TX/RX function support for Bosch
M_CANcontroller. For TX, only one dedicated tx buffer is used for sending data.
For RX, RXFIFO 0 is used for receiving data to avoid overflow.
Rx FIFO 1 and Rx Buffers are not used currently, as well as Tx Event FIFO.Due to the message ram can be shared by multi
m_caninstances
and the fifo element is configurable which is SoC dependant,
the design is to parse the message ram related configuration data from device tree rather than hardcode define it in driver which can make the message ram sharing fully transparent toM_CANcontroller driver,
then we can gain better driver maintainability and future features upgrade.
M_CANalso supports CANFD protocol features like data payload up to 64 bytes and bitrate switch at runtime, however, this patch still does not add the support for these features.Cc Wolfgang Grandegger <[email protected]>Cc Marc Kleine-Budde <[email protected]>Cc Mark Rutland <[email protected]>Cc Oliver Hartkopp <[email protected]>Cc Varka Bhadram <[email protected]>Signed-off-by Dong Aisheng <[email protected]>---
changes since v4:
some minor changes:
- introducem_can_fifo_writeandis_lec_errfunctin
- define macroM_CAN_FIFO_XXXfor FIFO
- movem_can_of_tablebeforeplatform_driver
- a few indent fixChanges since v3:
A few minor changes:
- use the updated name of bosch,mram-cfg
- remove .owner =THIS_MODULE
- add a line comment formram_cfgstructureChanges since v2:
- fix checkpatch warnings
- handleCAN_CTRLMODE_BERR_REPORTINGproperly that disable LEC error interrupts (Bus error) if noCAN_CTRLMODE_BERR_REPORTING.
- introduce structmram_cfgarray to store message ram configuration data for each fifo
- fix txb offset calculate wrongissue(should not plus mram_off again)
- check return forclk_prepare_enable
- split doc part into a separate patchChanges since v1:
Addressed all comments from Mark Rutland, Hartkopp and Marc Kleine-Budde
- merge three patches into one
- create directorydrivers/net/can/m_can
- improve binding doc
- make sure using valid pointer beforenetif_receive_skb(skb)
- remove debug info a bit
- let the stats are updated even ifalloc_can_err_skb()fails
- other small fixesQuoted 12 lines
--- drivers/net/can/Kconfig | 2 + drivers/net/can/Makefile | 1 + drivers/net/can/m_can/Kconfig | 4 + drivers/net/can/m_can/Makefile | 7 + drivers/net/can/m_can/m_can.c | 1202 ++++++++++++++++++++++++++++++++++++++++ 5 files changed, 1216 insertions(+), 0 deletions(-) create mode 100644 drivers/net/can/m_can/Kconfig create mode 100644 drivers/net/can/m_can/Makefile create mode 100644 drivers/net/can/m_can/m_can.c
Quoted 4 lines
This series addressed all of my comments ...Thanks :-)
Reviewed-by Varka Bhadram <[email protected]>
Thanks for the review! :-)
Regards
Dong Aisheng
Quoted 4 lines
Signature · 2 lines
Regards, Varka Bhadram.
Marc Kleine-Budde
maintainerPATCH v5 1/2 can: m_can: add device tree binding documentation
In reply to Dong AishengQuoted 12 lines · Dong Aisheng
add
M_CANdevice tree binding documentationCc Wolfgang Grandegger <[email protected]>Cc Marc Kleine-Budde <[email protected]>Cc Mark Rutland <[email protected]>Cc Oliver Hartkopp <[email protected]>Cc Varka Bhadram <[email protected]>Signed-off-by Dong Aisheng <[email protected]>---
Changes since v4:
- change the name of board dtsi to board dts which is more common
Quoted 7 lines
Changes since v3:
- change mram-cfg property name to bosch,mram-cfg
- indent change--- .../devicetree/bindings/net/can/m_can.txt | 67 ++++++++++++++++++++ 1 files changed, 67 insertions(+), 0 deletions(-) create mode 100644 Documentation/devicetree/bindings/net/can/m_can.txt
I'll apply this series once we've got an Ack for the DT folks.
Marc
Signature · 12 lines
Pengutronix e.K. | Marc Kleine-Budde | Industrial Linux Solutions | Phone: +49-231-2826-924 | Vertretung West/Dortmund | Fax: +49-5121-206917-5555 | Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de | -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 242 bytes Desc: OpenPGP digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140716/409130c2/attachment-0001.sig>
PATCH v5 1/2 can: m_can: add device tree binding documentation
Quoted 21 lines · Marc Kleine-Budde
Quoted 12 lines · Dong Aisheng
add
M_CANdevice tree binding documentationCc Wolfgang Grandegger <[email protected]>Cc Marc Kleine-Budde <[email protected]>Cc Mark Rutland <[email protected]>Cc Oliver Hartkopp <[email protected]>Cc Varka Bhadram <[email protected]>Signed-off-by Dong Aisheng <[email protected]>---
Changes since v4:
- change the name of board dtsi to board dts which is more commonQuoted 7 lines
Changes since v3:
- change mram-cfg property name to bosch,mram-cfg
- indent change--- .../devicetree/bindings/net/can/m_can.txt | 67 ++++++++++++++++++++ 1 files changed, 67 insertions(+), 0 deletions(-) create mode 100644 Documentation/devicetree/bindings/net/can/m_can.txt
Quoted 2 lines
I'll apply this series once we've got an Ack for the DT folks.
Okay, thanks!
Copy Grant, Rob and Mark in case they have comments.
Regards
Dong Aisheng
Quoted 8 lines
Marc
Signature · 4 lines
Pengutronix e.K. | Marc Kleine-Budde | Industrial Linux Solutions | Phone: +49-231-2826-924 | Vertretung West/Dortmund | Fax: +49-5121-206917-5555 | Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de |
PATCH v5 1/2 can: m_can: add device tree binding documentation
Ping...
Quoted 47 lines · Dong Aisheng
Quoted 21 lines · Marc Kleine-Budde
Quoted 12 lines · Dong Aisheng
add
M_CANdevice tree binding documentationCc Wolfgang Grandegger <[email protected]>Cc Marc Kleine-Budde <[email protected]>Cc Mark Rutland <[email protected]>Cc Oliver Hartkopp <[email protected]>Cc Varka Bhadram <[email protected]>Signed-off-by Dong Aisheng <[email protected]>---
Changes since v4:
- change the name of board dtsi to board dts which is more commonQuoted 7 lines
Changes since v3:
- change mram-cfg property name to bosch,mram-cfg
- indent change--- .../devicetree/bindings/net/can/m_can.txt | 67 ++++++++++++++++++++ 1 files changed, 67 insertions(+), 0 deletions(-) create mode 100644 Documentation/devicetree/bindings/net/can/m_can.txtQuoted 2 lines
I'll apply this series once we've got an Ack for the DT folks.
Okay, thanks!
Copy Grant, Rob and Mark in case they have comments.
Regards
Dong AishengQuoted 8 lines
Marc
--
Pengutronix e.K. | Marc Kleine-Budde | Industrial Linux Solutions | Phone: +49-231-2826-924 | Vertretung West/Dortmund | Fax: +49-5121-206917-5555 | Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de |_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Marc Kleine-Budde
maintainerPATCH v5 1/2 can: m_can: add device tree binding documentation
In reply to Dong AishengQuoted 8 lines · Dong Aisheng
add
M_CANdevice tree binding documentationCc Wolfgang Grandegger <[email protected]>Cc Marc Kleine-Budde <[email protected]>Cc Mark Rutland <[email protected]>Cc Oliver Hartkopp <[email protected]>Cc Varka Bhadram <[email protected]>Signed-off-by Dong Aisheng <[email protected]>
Are there any comment from the DT side to this patch? Preferred an Acked-by :)
The series looks good to me, I'm waiting for an Ack to apply it to the linux-can-next tree.
Marc
Quoted 86 lines
---
Changes since v4:
- change the name of board dtsi to board dts which is more commonChanges since v3:
- change mram-cfg property name to bosch,mram-cfg
- indent change--- .../devicetree/bindings/net/can/m_can.txt | 67 ++++++++++++++++++++ 1 files changed, 67 insertions(+), 0 deletions(-) create mode 100644 Documentation/devicetree/bindings/net/can/m_can.txtDocumentation/devicetree/bindings/net/can/m_can.txt new file +67
-0@@ -0,0 +1,67 @@ +Bosch MCAN controller Device Tree Bindings +------------------------------------------------- + +Required properties: +- compatible : Should be "bosch,m_can" for M_CAN controllers +- reg : physical base address and size of the M_CAN + registers map and Message RAM +- reg-names : Should be "m_can" and "message_ram" +- interrupts : Should be the interrupt number of M_CAN interrupt + line 0 and line 1, could be same if sharing + the same interrupt. +- interrupt-names : Should contain "int0" and "int1" +- clocks : Clocks used by controller, should be host clock + and CAN clock. +- clock-names : Should contain "hclk" and "cclk" +- pinctrl-<n> : Pinctrl states as described in bindings/pinctrl/pinctrl-bindings.txt +- pinctrl-names : Names corresponding to the numbered pinctrl states +- bosch,mram-cfg : Message RAM configuration data. + Multiple M_CAN instances can share the same Message + RAM and each element(e.g Rx FIFO or Tx Buffer and etc) + number in Message RAM is also configurable, + so this property is telling driver how the shared or + private Message RAM are used by this M_CAN controller. + + The format should be as follows: + <offset sidf_elems xidf_elems rxf0_elems rxf1_elems + rxb_elems txe_elems txb_elems> + The 'offset' is an address offset of the Message RAM + where the following elements start from. This is + usually set to 0x0 if you're using a private Message + RAM. The remain cells are used to specify how many + elements are used for each FIFO/Buffer. + + M_CAN includes the following elements according to user manual: + 11-bit Filter 0-128 elements / 0-128 words + 29-bit Filter 0-64 elements / 0-128 words + Rx FIFO 0 0-64 elements / 0-1152 words + Rx FIFO 1 0-64 elements / 0-1152 words + Rx Buffers 0-64 elements / 0-1152 words + Tx Event FIFO 0-32 elements / 0-64 words + Tx Buffers 0-32 elements / 0-576 words + + Please refer to 2.4.1 Message RAM Configuration in + Bosch M_CAN user manual for details. + +Example: +SoC dtsi: +m_can1: can at 020e8000 { + compatible = "bosch,m_can"; + reg = <0x020e8000 0x4000>, <0x02298000 0x4000>; + reg-names = "m_can", "message_ram"; + interrupts = <0 114 0x04>, + <0 114 0x04>; + interrupt-names = "int0", "int1"; + clocks = <&clks IMX6SX_CLK_CANFD>, + <&clks IMX6SX_CLK_CANFD>; + clock-names = "hclk", "cclk"; + bosch,mram-cfg = <0x0 0 0 32 0 0 0 1>; + status = "disabled"; +}; + +Board dts: +&m_can1 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_m_can1>; + status = "enabled"; +};
Signature · 12 lines
Pengutronix e.K. | Marc Kleine-Budde | Industrial Linux Solutions | Phone: +49-231-2826-924 | Vertretung West/Dortmund | Fax: +49-5121-206917-5555 | Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de | -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 242 bytes Desc: OpenPGP digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140730/49b304ad/attachment.sig>
PATCH v5 1/2 can: m_can: add device tree binding documentation
Ping...
Quoted 118 lines · Marc Kleine-Budde
Quoted 8 lines · Dong Aisheng
add
M_CANdevice tree binding documentationCc Wolfgang Grandegger <[email protected]>Cc Marc Kleine-Budde <[email protected]>Cc Mark Rutland <[email protected]>Cc Oliver Hartkopp <[email protected]>Cc Varka Bhadram <[email protected]>Signed-off-by Dong Aisheng <[email protected]>Are there any comment from the DT side to this patch? Preferred an Acked-by :)
The series looks good to me, I'm waiting for an Ack to apply it to the linux-can-next tree.
Marc
Quoted 76 lines
---
Changes since v4:
- change the name of board dtsi to board dts which is more commonChanges since v3:
- change mram-cfg property name to bosch,mram-cfg
- indent change--- .../devicetree/bindings/net/can/m_can.txt | 67 ++++++++++++++++++++ 1 files changed, 67 insertions(+), 0 deletions(-) create mode 100644 Documentation/devicetree/bindings/net/can/m_can.txtDocumentation/devicetree/bindings/net/can/m_can.txt new file +57
-0@@ -0,0 +1,67 @@ +Bosch MCAN controller Device Tree Bindings +------------------------------------------------- + +Required properties: +- compatible : Should be "bosch,m_can" for M_CAN controllers +- reg : physical base address and size of the M_CAN + registers map and Message RAM +- reg-names : Should be "m_can" and "message_ram" +- interrupts : Should be the interrupt number of M_CAN interrupt + line 0 and line 1, could be same if sharing + the same interrupt. +- interrupt-names : Should contain "int0" and "int1" +- clocks : Clocks used by controller, should be host clock + and CAN clock. +- clock-names : Should contain "hclk" and "cclk" +- pinctrl-<n> : Pinctrl states as described in bindings/pinctrl/pinctrl-bindings.txt +- pinctrl-names : Names corresponding to the numbered pinctrl states +- bosch,mram-cfg : Message RAM configuration data. + Multiple M_CAN instances can share the same Message + RAM and each element(e.g Rx FIFO or Tx Buffer and etc) + number in Message RAM is also configurable, + so this property is telling driver how the shared or + private Message RAM are used by this M_CAN controller. + + The format should be as follows: + <offset sidf_elems xidf_elems rxf0_elems rxf1_elems + rxb_elems txe_elems txb_elems> + The 'offset' is an address offset of the Message RAM + where the following elements start from. This is + usually set to 0x0 if you're using a private Message + RAM. The remain cells are used to specify how many + elements are used for each FIFO/Buffer. + + M_CAN includes the following elements according to user manual: + 11-bit Filter 0-128 elements / 0-128 words + 29-bit Filter 0-64 elements / 0-128 words + Rx FIFO 0 0-64 elements / 0-1152 words + Rx FIFO 1 0-64 elements / 0-1152 words + Rx Buffers 0-64 elements / 0-1152 words + Tx Event FIFO 0-32 elements / 0-64 words + Tx Buffers 0-32 elements / 0-576 words + + Please refer to 2.4.1 Message RAM Configuration in + Bosch M_CAN user manual for details. + +Example: +SoC dtsi: +m_can1: can at 020e8000 { + compatible = "bosch,m_can"; + reg = <0x020e8000 0x4000>, <0x02298000 0x4000>; + reg-names = "m_can", "message_ram"; + interrupts = <0 114 0x04>, + <0 114 0x04>; + interrupt-names = "int0", "int1"; + clocks = <&clks IMX6SX_CLK_CANFD>, + <&clks IMX6SX_CLK_CANFD>; + clock-names = "hclk", "cclk";Documentation/devicetree/bindings/net/can/m_can.txt line 67
Quoted 10 lines
Documentation/devicetree/bindings/net/can/m_can.txt new file +10
-0+ bosch,mram-cfg = <0x0 0 0 32 0 0 0 1>; + status = "disabled"; +}; + +Board dts: +&m_can1 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_m_can1>; + status = "enabled"; +};--
Pengutronix e.K. | Marc Kleine-Budde | Industrial Linux Solutions | Phone: +49-231-2826-924 | Vertretung West/Dortmund | Fax: +49-5121-206917-5555 | Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de |_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
PATCH v5 1/2 can: m_can: add device tree binding documentation
Quoted 5 lines · Dong Aisheng
Ping...
Quoted 2 lines · Marc Kleine-Budde
Quoted 1 line · Dong Aisheng
add
M_CANdevice tree binding documentation
Applied both to linux-can-next.
Thanks,
Marc
Signature · 12 lines
Pengutronix e.K. | Marc Kleine-Budde | Industrial Linux Solutions | Phone: +49-231-2826-924 | Vertretung West/Dortmund | Fax: +49-5121-206917-5555 | Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de | -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 181 bytes Desc: OpenPGP digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140814/fad0c88b/attachment.sig>