Skip to contentSkip to conversation

can: cc770: add support for the Bosch CC770 and Intel AN82527

PATCH Applied Wolfgang Grandegger 4 participants 11 messages Dec 1, 2011 – Dec 7, 2011 1 message not in the archive

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

v6 cover can: cc770: add support for the Bosch CC770 and Intel AN82527

Already since a while we have support for the Bosch CC770 and Intel AN82527 CAN controllers in our out-of-tree Socket-CAN repository.

In the meantime I found a TQM855L board with two AN82527 on it, which allowed me to provide and test a generic platform driver as well.

Changes since v1:

- remove version.h includes
- some minor corrections in the ISA bus driver
- add platform header file to the driver core
- add generic platform driver
- add and update device tree nodes for tqm8xx and tqm8548

Changes since v2:

- correct license text as suggest by Oliver Hartkopp
- use the new module_platform_driver function
- provide get_berr_counter callback for cc770
- improve CAN error state change handling
- more comprehensive cc770_isa driver description

Changes since v3:

- pre-define pr_fmt()
- use KBUILD_MODNAME instead of DRV_NAME
- use ARRAY_SIZE() whenever appropriate
- use variable name "o" for message objects consistantly
- use proper error code for cc770_probe_chip
- remove unneeded member priv->open_time
- remove unnecessary masking of u8 variables (with 0xff)
- use "!skb" instead of "skb == NULL"
- CC770_MSG_MAX now limits the number of messages read in the ISR
- use "|" instead of "+" to combine bit masks
- remove return code check of platform_get_resource() in remove function
- remove postal address from GPL copyright text
- fix WARNING: __packed is preferred over __attribute__((packed))
- some more minor fixes (casts, white space, etc.)

Changes since v4:

- cc770_isa: add missing cc770 platform include

Changes since v5:

- cc770_platform: fix build issues on ARM and x86 by replacing in_8/out8 with ioread8/iowrite8 amd including some missing header files
- cc770_platform: remove trailing lines

It would be nice if somebody else could test the driver, especially the ISA driver (I don't have hardware at hand).

Wolfgang.

Wolfgang Grandegger (4):
can: cc770: add driver core for the Bosch CC770 and Intel AN82527
can: cc770: add legacy ISA bus driver for the CC770 and AN82527
can: cc770: add platform bus driver for the CC770 and AN82527
powerpc: tqm8548/tqm8xx: add and update CAN device nodes

 .../devicetree/bindings/net/can/cc770.txt          |   53 ++
 arch/powerpc/boot/dts/tqm8548-bigflash.dts         |   19 +-
 arch/powerpc/boot/dts/tqm8548.dts                  |   19 +-
 arch/powerpc/boot/dts/tqm8xx.dts                   |   25 +
 drivers/net/can/Kconfig                            |    2 +
 drivers/net/can/Makefile                           |    1 +
 drivers/net/can/cc770/Kconfig                      |   21 +
 drivers/net/can/cc770/Makefile                     |    9 +
 drivers/net/can/cc770/cc770.c                      |  881 ++++++++++++++++++++
 drivers/net/can/cc770/cc770.h                      |  203 +++++
 drivers/net/can/cc770/cc770_isa.c                  |  367 ++++++++
 drivers/net/can/cc770/cc770_platform.c             |  272 ++++++
 include/linux/can/platform/cc770.h                 |   33 +
 13 files changed, 1895 insertions(+), 10 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/net/can/cc770.txt
 create mode 100644 drivers/net/can/cc770/Kconfig
 create mode 100644 drivers/net/can/cc770/Makefile
 create mode 100644 drivers/net/can/cc770/cc770.c
 create mode 100644 drivers/net/can/cc770/cc770.h
 create mode 100644 drivers/net/can/cc770/cc770_isa.c
 create mode 100644 drivers/net/can/cc770/cc770_platform.c
 create mode 100644 include/linux/can/platform/cc770.h
Signature · 1 line
1.7.4.1
#1 lore raw

PATCH v6 1/4 can: cc770: add driver core for the Bosch CC770 and Intel AN82527

---
 drivers/net/can/Kconfig            |    2 +
 drivers/net/can/Makefile           |    1 +
 drivers/net/can/cc770/Kconfig      |    3 +
 drivers/net/can/cc770/Makefile     |    7 +
 drivers/net/can/cc770/cc770.c      |  881 ++++++++++++++++++++++++++++++++++++
 drivers/net/can/cc770/cc770.h      |  203 +++++++++
 include/linux/can/platform/cc770.h |   33 ++
 7 files changed, 1130 insertions(+), 0 deletions(-)
 create mode 100644 drivers/net/can/cc770/Kconfig
 create mode 100644 drivers/net/can/cc770/Makefile
 create mode 100644 drivers/net/can/cc770/cc770.c
 create mode 100644 drivers/net/can/cc770/cc770.h
 create mode 100644 include/linux/can/platform/cc770.h
drivers/net/can/Kconfig +2 -0
index f6c98fb..ab45758 100644
@@ -116,6 +116,8 @@ source "drivers/net/can/sja1000/Kconfig"
 
 source "drivers/net/can/c_can/Kconfig"
 
+source "drivers/net/can/cc770/Kconfig"
+
 source "drivers/net/can/usb/Kconfig"
 
 source "drivers/net/can/softing/Kconfig"
drivers/net/can/Makefile +1 -0
index 24ebfe8..938be37 100644
@@ -14,6 +14,7 @@ obj-y				+= softing/
 obj-$(CONFIG_CAN_SJA1000)	+= sja1000/
 obj-$(CONFIG_CAN_MSCAN)		+= mscan/
 obj-$(CONFIG_CAN_C_CAN)		+= c_can/
+obj-$(CONFIG_CAN_CC770)		+= cc770/
 obj-$(CONFIG_CAN_AT91)		+= at91_can.o
 obj-$(CONFIG_CAN_TI_HECC)	+= ti_hecc.o
 obj-$(CONFIG_CAN_MCP251X)	+= mcp251x.o
drivers/net/can/cc770/Kconfig new file +3 -0
new file mode 100644
index 0000000..225131b
@@ -0,0 +1,3 @@
+menuconfig CAN_CC770
+	tristate "Bosch CC770 and Intel AN82527 devices"
+	depends on CAN_DEV && HAS_IOMEM
drivers/net/can/cc770/Makefile new file +7 -0
new file mode 100644
index 0000000..34e8180
@@ -0,0 +1,7 @@
+#
+#  Makefile for the Bosch CC770 CAN controller drivers.
+#
+
+obj-$(CONFIG_CAN_CC770) += cc770.o
+
+ccflags-$(CONFIG_CAN_DEBUG_DEVICES) := -DDEBUG
drivers/net/can/cc770/cc770.c new file +881 -0

881 lines not on this page · raw message

drivers/net/can/cc770/cc770.h new file +203 -0

203 lines not on this page · raw message

include/linux/can/platform/cc770.h new file +33 -0
new file mode 100644
index 0000000..7702641
@@ -0,0 +1,33 @@
+#ifndef _CAN_PLATFORM_CC770_H_
+#define _CAN_PLATFORM_CC770_H_
+
+/* CPU Interface Register (0x02) */
+#define CPUIF_CEN	0x01	/* Clock Out Enable */
+#define CPUIF_MUX	0x04	/* Multiplex */
+#define CPUIF_SLP	0x08	/* Sleep */
+#define CPUIF_PWD	0x10	/* Power Down Mode */
+#define CPUIF_DMC	0x20	/* Divide Memory Clock */
+#define CPUIF_DSC	0x40	/* Divide System Clock */
+#define CPUIF_RST	0x80	/* Hardware Reset Status */
+
+/* Clock Out Register (0x1f) */
+#define CLKOUT_CD_MASK  0x0f	/* Clock Divider mask */
+#define CLKOUT_SL_MASK	0x30	/* Slew Rate mask */
+#define CLKOUT_SL_SHIFT	4
+
+/* Bus Configuration Register (0x2f) */
+#define BUSCFG_DR0	0x01	/* Disconnect RX0 Input / Select RX input */
+#define BUSCFG_DR1	0x02	/* Disconnect RX1 Input / Silent mode */
+#define BUSCFG_DT1	0x08	/* Disconnect TX1 Output */
+#define BUSCFG_POL	0x20	/* Polarity dominant or recessive */
+#define BUSCFG_CBY	0x40	/* Input Comparator Bypass */
+
+struct cc770_platform_data {
+	u32 osc_freq;	/* CAN bus oscillator frequency in Hz */
+
+	u8 cir;		/* CPU Interface Register */
+	u8 cor;		/* Clock Out Register */
+	u8 bcr;		/* Bus Configuration Register */
+};
+
+#endif	/* !_CAN_PLATFORM_CC770_H_ */
Signature · 1 line
1.7.4.1

A message that is not in the archive (sent off-list or not yet received): 1322732481-2255-1-git-send-email-wg-5Yr1BZd7O62+XT7JhA+gdA@public.gmane.org

#3 lore raw

PATCH v6 2/4 can: cc770: add legacy ISA bus driver for the CC770 and AN82527

This patch adds support for legacy Bosch CC770 and Intel AN82527 CAN controllers on the ISA or PC-104 bus. The I/O port or memory address and the IRQ number must be specified via module parameters:

insmod cc770_isa.ko port=0x310,0x380 irq=7,11

for ISA devices using I/O ports or:

insmod cc770_isa.ko mem=0xd1000,0xd1000 irq=7,11

for memory mapped ISA devices.

Indirect access via address and data port is supported as well:

insmod cc770_isa.ko port=0x310,0x380 indirect=1 irq=7,11

Furthermore, the following mode parameter can be defined:

clk: External oscillator clock frequency (default=16000000 [16 MHz])
cir: CPU interface register (default=0x40 [DSC])
bcr: Bus configuration register (default=0x40 [CBY])
cor: Clockout register (default=0x00)

Note: for clk, cir, bcr and cor, the first argument re-defines the default for all other devices, e.g.:

insmod cc770_isa.ko mem=0xd1000,0xd1000 irq=7,11 clk=24000000

is equivalent to

insmod cc770_isa.ko mem=0xd1000,0xd1000 irq=7,11 clk=24000000,24000000

---
 drivers/net/can/cc770/Kconfig     |   11 +
 drivers/net/can/cc770/Makefile    |    1 +
 drivers/net/can/cc770/cc770_isa.c |  367 +++++++++++++++++++++++++++++++++++++
 3 files changed, 379 insertions(+), 0 deletions(-)
 create mode 100644 drivers/net/can/cc770/cc770_isa.c
drivers/net/can/cc770/Kconfig +11 -0
index 225131b..28e4d48 100644
@@ -1,3 +1,14 @@
 menuconfig CAN_CC770
 	tristate "Bosch CC770 and Intel AN82527 devices"
 	depends on CAN_DEV && HAS_IOMEM
+
+if CAN_CC770
+
+config CAN_CC770_ISA
+	tristate "ISA Bus based legacy CC770 driver"
+	---help---
+	  This driver adds legacy support for CC770 and AN82527 chips
+	  connected to the ISA bus using I/O port, memory mapped or
+	  indirect access.
+
+endif
drivers/net/can/cc770/Makefile +1 -0
index 34e8180..872ecff 100644
@@ -3,5 +3,6 @@
 #
 
 obj-$(CONFIG_CAN_CC770) += cc770.o
+obj-$(CONFIG_CAN_CC770_ISA) += cc770_isa.o
 
 ccflags-$(CONFIG_CAN_DEBUG_DEVICES) := -DDEBUG
drivers/net/can/cc770/cc770_isa.c new file +367 -0

367 lines not on this page · raw message

Signature · 1 line
1.7.4.1
#4 lore raw

PATCH v6 3/4 can: cc770: add platform bus driver for the CC770 and AN82527

In reply to a message not in the archive

This driver works with both, static platform data and device tree bindings. It has been tested on a TQM855L board with two AN82527 CAN controllers on the local bus.

---
 .../devicetree/bindings/net/can/cc770.txt          |   53 ++++
 drivers/net/can/cc770/Kconfig                      |    7 +
 drivers/net/can/cc770/Makefile                     |    1 +
 drivers/net/can/cc770/cc770_platform.c             |  272 ++++++++++++++++++++
 4 files changed, 333 insertions(+), 0 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/net/can/cc770.txt
 create mode 100644 drivers/net/can/cc770/cc770_platform.c
Documentation/devicetree/bindings/net/can/cc770.txt new file +53 -0
new file mode 100644
index 0000000..77027bf
@@ -0,0 +1,53 @@
+Memory mapped Bosch CC770 and Intel AN82527 CAN controller
+
+Note: The CC770 is a CAN controller from Bosch, which is 100%
+compatible with the old AN82527 from Intel, but with "bugs" being fixed.
+
+Required properties:
+
+- compatible : should be "bosch,cc770" for the CC770 and "intc,82527"
+	for the AN82527.
+
+- reg : should specify the chip select, address offset and size required
+	to map the registers of the controller. The size is usually 0x80.
+
+- interrupts : property with a value describing the interrupt source
+	(number and sensitivity) required for the controller.
+
+Optional properties:
+
+- bosch,external-clock-frequency : frequency of the external oscillator
+	clock in Hz. Note that the internal clock frequency used by the
+	controller is half of that value. If not specified, a default
+	value of 16000000 (16 MHz) is used.
+
+- bosch,clock-out-frequency : slock frequency in Hz on the CLKOUT pin.
+	If not specified or if the specified value is 0, the CLKOUT pin
+	will be disabled.
+
+- bosch,slew-rate : slew rate of the CLKOUT signal. If not specified,
+	a resonable value will be calculated.
+
+- bosch,disconnect-rx0-input : see data sheet.
+
+- bosch,disconnect-rx1-input : see data sheet.
+
+- bosch,disconnect-tx1-output : see data sheet.
+
+- bosch,polarity-dominant : see data sheet.
+
+- bosch,divide-memory-clock : see data sheet.
+
+- bosch,iso-low-speed-mux : see data sheet.
+
+For further information, please have a look to the CC770 or AN82527.
+
+Examples:
+
+can@3,100 {
+	compatible = "bosch,cc770";
+	reg = <3 0x100 0x80>;
+	interrupts = <2 0>;
+	interrupt-parent = <&mpic>;
+	bosch,external-clock-frequency = <16000000>;
+};
drivers/net/can/cc770/Kconfig +7 -0
index 28e4d48..22c07a8 100644
@@ -11,4 +11,11 @@ config CAN_CC770_ISA
 	  connected to the ISA bus using I/O port, memory mapped or
 	  indirect access.
 
+config CAN_CC770_PLATFORM
+	tristate "Generic Platform Bus based CC770 driver"
+	---help---
+	  This driver adds support for the CC770 and AN82527 chips
+	  connected to the "platform bus" (Linux abstraction for directly
+	  to the processor attached devices).
+
 endif
drivers/net/can/cc770/Makefile +1 -0
index 872ecff..9fb8321 100644
@@ -4,5 +4,6 @@
 
 obj-$(CONFIG_CAN_CC770) += cc770.o
 obj-$(CONFIG_CAN_CC770_ISA) += cc770_isa.o
+obj-$(CONFIG_CAN_CC770_PLATFORM) += cc770_platform.o
 
 ccflags-$(CONFIG_CAN_DEBUG_DEVICES) := -DDEBUG
drivers/net/can/cc770/cc770_platform.c new file +272 -0

272 lines not on this page · raw message

Signature · 1 line
1.7.4.1
#5 lore raw

PATCH v6 4/4 powerpc: tqm8548/tqm8xx: add and update CAN device nodes

In reply to Wolfgang Grandegger

This patch enables or updates support for the CC770 and AN82527 CAN controller on the TQM8548 and TQM8xx boards.

---
 arch/powerpc/boot/dts/tqm8548-bigflash.dts |   19 ++++++++++++++-----
 arch/powerpc/boot/dts/tqm8548.dts          |   19 ++++++++++++++-----
 arch/powerpc/boot/dts/tqm8xx.dts           |   25 +++++++++++++++++++++++++
 3 files changed, 53 insertions(+), 10 deletions(-)
arch/powerpc/boot/dts/tqm8548-bigflash.dts +14 -5
index 9452c3c..d918752 100644
@@ -352,7 +352,7 @@
 		ranges = <
 			0 0x0 0xfc000000 0x04000000	// NOR FLASH bank 1
 			1 0x0 0xf8000000 0x08000000	// NOR FLASH bank 0
-			2 0x0 0xa3000000 0x00008000	// CAN (2 x i82527)
+			2 0x0 0xa3000000 0x00008000	// CAN (2 x CC770)
 			3 0x0 0xa3010000 0x00008000	// NAND FLASH
 
 		>;
@@ -393,18 +393,27 @@
 		};
 
 		/* Note: CAN support needs be enabled in U-Boot */
-		can0@2,0 {
-			compatible = "intel,82527"; // Bosch CC770
+		can@2,0 {
+			compatible = "bosch,cc770"; // Bosch CC770
 			reg = <2 0x0 0x100>;
 			interrupts = <4 1>;
 			interrupt-parent = <&mpic>;
+			bosch,external-clock-frequency = <16000000>;
+			bosch,disconnect-rx1-input;
+			bosch,disconnect-tx1-output;
+			bosch,iso-low-speed-mux;
+			bosch,clock-out-frequency = <16000000>;
 		};
 
-		can1@2,100 {
-			compatible = "intel,82527"; // Bosch CC770
+		can@2,100 {
+			compatible = "bosch,cc770"; // Bosch CC770
 			reg = <2 0x100 0x100>;
 			interrupts = <4 1>;
 			interrupt-parent = <&mpic>;
+			bosch,external-clock-frequency = <16000000>;
+			bosch,disconnect-rx1-input;
+			bosch,disconnect-tx1-output;
+			bosch,iso-low-speed-mux;
 		};
 
 		/* Note: NAND support needs to be enabled in U-Boot */
arch/powerpc/boot/dts/tqm8548.dts +14 -5
index 619776f..988d887 100644
@@ -352,7 +352,7 @@
 		ranges = <
 			0 0x0 0xfc000000 0x04000000	// NOR FLASH bank 1
 			1 0x0 0xf8000000 0x08000000	// NOR FLASH bank 0
-			2 0x0 0xe3000000 0x00008000	// CAN (2 x i82527)
+			2 0x0 0xe3000000 0x00008000	// CAN (2 x CC770)
 			3 0x0 0xe3010000 0x00008000	// NAND FLASH
 
 		>;
@@ -393,18 +393,27 @@
 		};
 
 		/* Note: CAN support needs be enabled in U-Boot */
-		can0@2,0 {
-			compatible = "intel,82527"; // Bosch CC770
+		can@2,0 {
+			compatible = "bosch,cc770"; // Bosch CC770
 			reg = <2 0x0 0x100>;
 			interrupts = <4 1>;
 			interrupt-parent = <&mpic>;
+			bosch,external-clock-frequency = <16000000>;
+			bosch,disconnect-rx1-input;
+			bosch,disconnect-tx1-output;
+			bosch,iso-low-speed-mux;
+			bosch,clock-out-frequency = <16000000>;
 		};
 
-		can1@2,100 {
-			compatible = "intel,82527"; // Bosch CC770
+		can@2,100 {
+			compatible = "bosch,cc770"; // Bosch CC770
 			reg = <2 0x100 0x100>;
 			interrupts = <4 1>;
 			interrupt-parent = <&mpic>;
+			bosch,external-clock-frequency = <16000000>;
+			bosch,disconnect-rx1-input;
+			bosch,disconnect-tx1-output;
+			bosch,iso-low-speed-mux;
 		};
 
 		/* Note: NAND support needs to be enabled in U-Boot */
arch/powerpc/boot/dts/tqm8xx.dts +25 -0
index f6da7ec..c3dba25 100644
@@ -57,6 +57,7 @@
 
 		ranges = <
 			0x0 0x0 0x40000000 0x800000
+			0x3 0x0 0xc0000000 0x200
 		>;
 
 		flash@0,0 {
@@ -67,6 +68,30 @@
 			bank-width = <4>;
 			device-width = <2>;
 		};
+
+		/* Note: CAN support needs be enabled in U-Boot */
+		can@3,0 {
+			compatible = "intc,82527";
+			reg = <3 0x0 0x80>;
+			interrupts = <8 1>;
+			interrupt-parent = <&PIC>;
+			bosch,external-clock-frequency = <16000000>;
+			bosch,disconnect-rx1-input;
+			bosch,disconnect-tx1-output;
+			bosch,iso-low-speed-mux;
+			bosch,clock-out-frequency = <16000000>;
+		};
+
+		can@3,100 {
+			compatible = "intc,82527";
+			reg = <3 0x100 0x80>;
+			interrupts = <8 1>;
+			interrupt-parent = <&PIC>;
+			bosch,external-clock-frequency = <16000000>;
+			bosch,disconnect-rx1-input;
+			bosch,disconnect-tx1-output;
+			bosch,iso-low-speed-mux;
+		};
 	};
 
 	soc@fff00000 {
Signature · 1 line
1.7.4.1
#6 lore raw

Re: [PATCH net-next v6 4/4] powerpc: tqm8548/tqm8xx: add and update CAN device nodes

Quoted 2 lines · Wolfgang Grandegger

This patch enables or updates support for the CC770 and AN82527 CAN controller on the TQM8548 and TQM8xx boards.

I'm a bit confused by the net-next prefix here. Those patches seem to be only touching arch/powerpc and seem to be sent primarily toward netdev with a net-next prefix.

Also there have been at least 3 versions in a couple of days already without comments nor indication of what was changed...

Can you clarify things a bit please ? It looks like they really should go to linuxppc-dev (and you can probably drop a bunch of other lists) or am I missing an important piece of the puzzle ? (Such as patch 1/4 and 2/4 ...)

Let me know if I should just remove them from powerpc patchwork.

Cheers,
Ben.

Quoted 143 lines
---
 arch/powerpc/boot/dts/tqm8548-bigflash.dts |   19 ++++++++++++++-----
 arch/powerpc/boot/dts/tqm8548.dts          |   19 ++++++++++++++-----
 arch/powerpc/boot/dts/tqm8xx.dts           |   25 +++++++++++++++++++++++++
 3 files changed, 53 insertions(+), 10 deletions(-)
arch/powerpc/boot/dts/tqm8548-bigflash.dts +14 -5
index 9452c3c..d918752 100644
@@ -352,7 +352,7 @@
 		ranges = <
 			0 0x0 0xfc000000 0x04000000	// NOR FLASH bank 1
 			1 0x0 0xf8000000 0x08000000	// NOR FLASH bank 0
-			2 0x0 0xa3000000 0x00008000	// CAN (2 x i82527)
+			2 0x0 0xa3000000 0x00008000	// CAN (2 x CC770)
 			3 0x0 0xa3010000 0x00008000	// NAND FLASH
 
 		>;
@@ -393,18 +393,27 @@
 		};
 
 		/* Note: CAN support needs be enabled in U-Boot */
-		can0@2,0 {
-			compatible = "intel,82527"; // Bosch CC770
+		can@2,0 {
+			compatible = "bosch,cc770"; // Bosch CC770
 			reg = <2 0x0 0x100>;
 			interrupts = <4 1>;
 			interrupt-parent = <&mpic>;
+			bosch,external-clock-frequency = <16000000>;
+			bosch,disconnect-rx1-input;
+			bosch,disconnect-tx1-output;
+			bosch,iso-low-speed-mux;
+			bosch,clock-out-frequency = <16000000>;
 		};
 
-		can1@2,100 {
-			compatible = "intel,82527"; // Bosch CC770
+		can@2,100 {
+			compatible = "bosch,cc770"; // Bosch CC770
 			reg = <2 0x100 0x100>;
 			interrupts = <4 1>;
 			interrupt-parent = <&mpic>;
+			bosch,external-clock-frequency = <16000000>;
+			bosch,disconnect-rx1-input;
+			bosch,disconnect-tx1-output;
+			bosch,iso-low-speed-mux;
 		};
 
 		/* Note: NAND support needs to be enabled in U-Boot */
arch/powerpc/boot/dts/tqm8548.dts +14 -5
index 619776f..988d887 100644
@@ -352,7 +352,7 @@
 		ranges = <
 			0 0x0 0xfc000000 0x04000000	// NOR FLASH bank 1
 			1 0x0 0xf8000000 0x08000000	// NOR FLASH bank 0
-			2 0x0 0xe3000000 0x00008000	// CAN (2 x i82527)
+			2 0x0 0xe3000000 0x00008000	// CAN (2 x CC770)
 			3 0x0 0xe3010000 0x00008000	// NAND FLASH
 
 		>;
@@ -393,18 +393,27 @@
 		};
 
 		/* Note: CAN support needs be enabled in U-Boot */
-		can0@2,0 {
-			compatible = "intel,82527"; // Bosch CC770
+		can@2,0 {
+			compatible = "bosch,cc770"; // Bosch CC770
 			reg = <2 0x0 0x100>;
 			interrupts = <4 1>;
 			interrupt-parent = <&mpic>;
+			bosch,external-clock-frequency = <16000000>;
+			bosch,disconnect-rx1-input;
+			bosch,disconnect-tx1-output;
+			bosch,iso-low-speed-mux;
+			bosch,clock-out-frequency = <16000000>;
 		};
 
-		can1@2,100 {
-			compatible = "intel,82527"; // Bosch CC770
+		can@2,100 {
+			compatible = "bosch,cc770"; // Bosch CC770
 			reg = <2 0x100 0x100>;
 			interrupts = <4 1>;
 			interrupt-parent = <&mpic>;
+			bosch,external-clock-frequency = <16000000>;
+			bosch,disconnect-rx1-input;
+			bosch,disconnect-tx1-output;
+			bosch,iso-low-speed-mux;
 		};
 
 		/* Note: NAND support needs to be enabled in U-Boot */
arch/powerpc/boot/dts/tqm8xx.dts +25 -0
index f6da7ec..c3dba25 100644
@@ -57,6 +57,7 @@
 
 		ranges = <
 			0x0 0x0 0x40000000 0x800000
+			0x3 0x0 0xc0000000 0x200
 		>;
 
 		flash@0,0 {
@@ -67,6 +68,30 @@
 			bank-width = <4>;
 			device-width = <2>;
 		};
+
+		/* Note: CAN support needs be enabled in U-Boot */
+		can@3,0 {
+			compatible = "intc,82527";
+			reg = <3 0x0 0x80>;
+			interrupts = <8 1>;
+			interrupt-parent = <&PIC>;
+			bosch,external-clock-frequency = <16000000>;
+			bosch,disconnect-rx1-input;
+			bosch,disconnect-tx1-output;
+			bosch,iso-low-speed-mux;
+			bosch,clock-out-frequency = <16000000>;
+		};
+
+		can@3,100 {
+			compatible = "intc,82527";
+			reg = <3 0x100 0x80>;
+			interrupts = <8 1>;
+			interrupt-parent = <&PIC>;
+			bosch,external-clock-frequency = <16000000>;
+			bosch,disconnect-rx1-input;
+			bosch,disconnect-tx1-output;
+			bosch,iso-low-speed-mux;
+		};
 	};
 
 	soc@fff00000 {
maintainer
#7 lore raw

Re: [PATCH net-next v6 4/4] powerpc: tqm8548/tqm8xx: add and update CAN device nodes

From: Benjamin Herrenschmidt <[email protected]>
Date: Wed, 07 Dec 2011 18:34:28 +1100

Quoted 1 line

Let me know if I should just remove them from powerpc patchwork.

These are DT entries for CAN devices for which drivers only exist in the net-next tree, I already included this patch into the net-next tree so you do not have to.

#8 lore raw

Re: [PATCH net-next v6 4/4] powerpc: tqm8548/tqm8xx: add and update CAN device nodes

Quoted 8 lines · David Miller

From: Benjamin Herrenschmidt <[email protected]>
Date: Wed, 07 Dec 2011 18:34:28 +1100

Quoted 1 line

Let me know if I should just remove them from powerpc patchwork.

These are DT entries for CAN devices for which drivers only exist in the net-next tree, I already included this patch into the net-next tree so you do not have to.

Thanks.

Cheers,
Ben.

#9 lore raw

Re: [PATCH net-next v6 4/4] powerpc: tqm8548/tqm8xx: add and update CAN device nodes

In reply to Benjamin Herrenschmidt
Quoted 7 lines · Benjamin Herrenschmidt
Quoted 2 lines · Wolfgang Grandegger

This patch enables or updates support for the CC770 and AN82527 CAN controller on the TQM8548 and TQM8xx boards.

I'm a bit confused by the net-next prefix here. Those patches seem to be only touching arch/powerpc and seem to be sent primarily toward netdev with a net-next prefix.

These patches are part of a series implementing a new netdev CAN driver with device-tree support for CC770/i82527 CAN controllers. The device-tree support and bindings are properly documented and some DTS files have been updated accordingly. The relevant maintainers and mailing list have been addressed.

Quoted 2 lines

Also there have been at least 3 versions in a couple of days already without comments nor indication of what was changed...

Unfortunately, no response from those sub-system guys.

Quoted 4 lines

Can you clarify things a bit please ? It looks like they really should go to linuxppc-dev (and you can probably drop a bunch of other lists) or am I missing an important piece of the puzzle ? (Such as patch 1/4 and 2/4 ...)

I have not sent the whole series. The changes are documented in the cover-letter, which I have not sent for those patches. Well, I think it's better to sent the whole series to all parties instead?

Quoted 1 line

Let me know if I should just remove them from powerpc patchwork.

Dave has already applied all patches.

Sorry for the confusion. Any advice on how to handle multi subsystem series of patches properly is welcome.

Wolfgang.

#10 lore raw

Re: [PATCH net-next v6 4/4] powerpc: tqm8548/tqm8xx: add and update CAN device nodes

Quoted 5 lines · Wolfgang Grandegger
Quoted 2 lines

Also there have been at least 3 versions in a couple of days already without comments nor indication of what was changed...

Unfortunately, no response from those sub-system guys.

Quoted 8 lines
Quoted 4 lines

Can you clarify things a bit please ? It looks like they really should go to linuxppc-dev (and you can probably drop a bunch of other lists) or am I missing an important piece of the puzzle ? (Such as patch 1/4 and 2/4 ...)

I have not sent the whole series. The changes are documented in the cover-letter, which I have not sent for those patches. Well, I think it's better to sent the whole series to all parties instead?

Well at least for linuxppc-dev, don't bother now that I know what this is about :-)

Quoted 6 lines
Quoted 1 line

Let me know if I should just remove them from powerpc patchwork.

Dave has already applied all patches.

Sorry for the confusion. Any advice on how to handle multi subsystem series of patches properly is welcome.

No specific advice. Ideally, if patchwork could track cover letters it would help but I don't see a non-nasty way to do it so ... :-)

Cheers,
Ben.

maintainer Applied
#11 lore raw
In reply to Wolfgang Grandegger

From: Wolfgang Grandegger <[email protected]>
Date: Thu, 1 Dec 2011 10:41:17 +0100

Quoted 6 lines

Already since a while we have support for the Bosch CC770 and Intel AN82527 CAN controllers in our out-of-tree Socket-CAN repository.

In the meantime I found a TQM855L board with two AN82527 on it, which allowed me to provide and test a generic platform driver as well.

Applied.