Skip to contentSkip to conversation

Add support for generic BCM SoC chipsets

PATCH Superseded Christian Daudt 5 participants 10 messages Nov 13, 2012 – Nov 18, 2012

Subsystems (7)

v3 of 6 Superseded Latest is v6 →

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 Add support for generic BCM SoC chipsets

In order to start upstreaming Broadcom SoC support, create a starting hierarchy, arch and dts files.
The first support SoC family that is planned is the BCM281XX (BCM11130/11140/11351/28145/28155) family of dual A9 mobile SoC cores.
This code is just the skeleton code for get the machine upstreamed. It has been made MULTIPLATFORM compatible.
Next steps
----------
Upstream a basic set of drivers - sufficient for a console boot to ramdisk. These will includer timer, gpio, i2c drivers. After this basic set, we will proceed with a more comprehensive set of drivers for the 281XX SoC family.

v2 patch mods
--------
- Remove l2x0_of_init call as there were problems with the code. A separate patch will be submitted with cache init code
- Rename capri files and refs to bcm281xx-based names
- Add bcm281xx binding doc
- various misc cleanups

v3 patch mods
-------------
- Remove extra #include lines
- Remove remaining references to capri
- dt uart chipset string added
- cleaned up chip # references

---
 .../devicetree/bindings/arm/bcm/bcm281xx.txt       |    8 ++
 arch/arm/Kconfig                                   |    2 +
 arch/arm/Makefile                                  |    1 +
 arch/arm/boot/dts/Makefile                         |    1 +
 arch/arm/boot/dts/bcm11351-brt.dts                 |   30 +++++
 arch/arm/boot/dts/bcm281xx.dtsi                    |   50 +++++++++
 arch/arm/configs/bcm_defconfig                     |  114 ++++++++++++++++++++
 arch/arm/mach-bcm/Kconfig                          |   19 ++++
 arch/arm/mach-bcm/Makefile                         |   13 +++
 arch/arm/mach-bcm/board_bcm.c                      |   57 ++++++++++
 10 files changed, 295 insertions(+), 0 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/arm/bcm/bcm281xx.txt
 create mode 100644 arch/arm/boot/dts/bcm11351-brt.dts
 create mode 100644 arch/arm/boot/dts/bcm281xx.dtsi
 create mode 100644 arch/arm/configs/bcm_defconfig
 create mode 100644 arch/arm/mach-bcm/Kconfig
 create mode 100644 arch/arm/mach-bcm/Makefile
 create mode 100644 arch/arm/mach-bcm/board_bcm.c
Documentation/devicetree/bindings/arm/bcm/bcm281xx.txt new file +8 -0
new file mode 100644
index 0000000..c47200f
@@ -0,0 +1,8 @@
+Broadcom BCM281XX device tree bindings
+-------------------------------------------
+
+Boards with the bcm281xx SoC family shall have the following properties:
+
+Required root node property:
+
+compatible = "bcm,bcm281xx";
arch/arm/Kconfig +2 -0
index ade7e92..3da77ba 100644
@@ -1022,6 +1022,8 @@ source "arch/arm/mach-mvebu/Kconfig"
 
 source "arch/arm/mach-at91/Kconfig"
 
+source "arch/arm/mach-bcm/Kconfig"
+
 source "arch/arm/mach-clps711x/Kconfig"
 
 source "arch/arm/mach-cns3xxx/Kconfig"
arch/arm/Makefile +1 -0
index 5f914fc..8523fdb 100644
@@ -137,6 +137,7 @@ textofs-$(CONFIG_ARCH_MSM8960) := 0x00208000
 # Machine directory name.  This list is sorted alphanumerically
 # by CONFIG_* macro name.
 machine-$(CONFIG_ARCH_AT91)		+= at91
+machine-$(CONFIG_ARCH_BCM)		+= bcm
 machine-$(CONFIG_ARCH_BCM2835)		+= bcm2835
 machine-$(CONFIG_ARCH_CLPS711X)		+= clps711x
 machine-$(CONFIG_ARCH_CNS3XXX)		+= cns3xxx
arch/arm/boot/dts/Makefile +1 -0
index f37cf9f..6b3392b 100644
@@ -17,6 +17,7 @@ dtb-$(CONFIG_ARCH_AT91) += aks-cdu.dtb \
 	usb_a9263.dtb \
 	usb_a9g20.dtb
 dtb-$(CONFIG_ARCH_BCM2835) += bcm2835-rpi-b.dtb
+dtb-$(CONFIG_ARCH_BCM) += bcm11351-brt.dtb
 dtb-$(CONFIG_ARCH_DOVE) += dove-cm-a510.dtb \
 	dove-cubox.dtb \
 	dove-dove-db.dtb
arch/arm/boot/dts/bcm11351-brt.dts new file +30 -0
new file mode 100644
index 0000000..d9379d0
@@ -0,0 +1,30 @@
+/*
+ * Copyright (C) 2012 Broadcom Corporation
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation version 2.
+ *
+ * This program is distributed "as is" WITHOUT ANY WARRANTY of any
+ * kind, whether express or implied; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+/dts-v1/;
+
+/include/ "bcm281xx.dtsi"
+
+/ {
+	model = "BCM11351 BRT board";
+	compatible = "bcm,bcm11351-brt", "bcm,bcm281xx";
+
+	memory {
+		reg = <0x80000000 0x40000000>; /* 1 GB */
+	};
+
+	uart at 3e000000 {
+		status = "okay";
+	};
+
+};
arch/arm/boot/dts/bcm281xx.dtsi new file +50 -0

50 lines not on this page · raw message

arch/arm/configs/bcm_defconfig new file +114 -0

114 lines not on this page · raw message

arch/arm/mach-bcm/Kconfig new file +19 -0
new file mode 100644
index 0000000..18ae21c
@@ -0,0 +1,19 @@
+config ARCH_BCM
+	bool "Broadcom SoC" if ARCH_MULTI_V7
+	depends on MMU
+	select ARCH_REQUIRE_GPIOLIB
+	select ARM_ERRATA_754322
+	select ARM_ERRATA_764369 if SMP
+	select ARM_GIC
+	select CPU_V7
+	select GENERIC_CLOCKEVENTS
+	select GENERIC_GPIO
+	select GENERIC_TIME
+	select GPIO_BCM
+	select SPARSE_IRQ
+	select TICK_ONESHOT
+	help
+	  This enables support for system based on Broadcom SoCs.
+	  It currently supports the 'BCM281XX' family, which includes
+	  BCM11130, BCM1140, BCM11351, BCM28145 and
+	  BCM28155 variants.
arch/arm/mach-bcm/Makefile new file +13 -0
new file mode 100644
index 0000000..bbf4122
@@ -0,0 +1,13 @@
+#
+# Copyright (C) 2012 Broadcom Corporation
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation version 2.
+#
+# This program is distributed "as is" WITHOUT ANY WARRANTY of any
+# kind, whether express or implied; without even the implied warranty
+# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+obj-$(CONFIG_ARCH_BCM) := board_bcm.o
arch/arm/mach-bcm/board_bcm.c new file +57 -0

57 lines not on this page · raw message

Signature · 1 line
1.7.1
#1 lore raw

PATCH v3 1/1 Add support for generic BCM SoC chipsets

Quoted 7 lines · Christian Daudt

In order to start upstreaming Broadcom SoC support, create a starting hierarchy, arch and dts files.
The first support SoC family that is planned is the BCM281XX (BCM11130/11140/11351/28145/28155) family of dual A9 mobile SoC cores.
This code is just the skeleton code for get the machine upstreamed. It has been made MULTIPLATFORM compatible.

Sorry for the slow review...

Documentation/devicetree/bindings/arm/bcm/bcm281xx.txt line 8

Quoted 5 lines
Documentation/devicetree/bindings/arm/bcm/bcm281xx.txt +3 -0
 
+Required root node property:
+
+compatible = "bcm,bcm281xx";

Hmm. I still tend to think we should list the specific SoC rather than the family here, but I guess if you're sure there won't be any SW compatibility between the different SoCs in the series, this is fine.

arch/arm/boot/dts/bcm281xx.dtsi line 35

Quoted 4 lines
arch/arm/boot/dts/bcm281xx.dtsi +2 -0
 
+	uart at 3e000000 {
+		compatible = "snps,dw-apb-uart", "bcm,bcm281xx-sw-apb-uart";

The most specific value should be first, so swap those two entries.

arch/arm/mach-bcm/Kconfig line 18

Quoted 6 lines
arch/arm/mach-bcm/Kconfig +4 -0
 
+	help
+	  This enables support for system based on Broadcom SoCs.
+	  It currently supports the 'BCM281XX' family, which includes
+	  BCM11130, BCM1140, BCM11351, BCM28145 and

Should that be 11140 rather than 1140?

Aside from that,

#2 lore raw

PATCH v3 1/1 Add support for generic BCM SoC chipsets

Quoted 11 lines · Stephen Warren
Quoted 7 lines · Christian Daudt

In order to start upstreaming Broadcom SoC support, create a starting hierarchy, arch and dts files.
The first support SoC family that is planned is the BCM281XX (BCM11130/11140/11351/28145/28155) family of dual A9 mobile SoC cores.
This code is just the skeleton code for get the machine upstreamed. It has been made MULTIPLATFORM compatible.

Sorry for the slow review...

no worries.

Quoted 10 lines

Documentation/devicetree/bindings/arm/bcm/bcm281xx.txt line 8

Quoted 5 lines
Documentation/devicetree/bindings/arm/bcm/bcm281xx.txt +3 -0
 
+Required root node property:
+
+compatible = "bcm,bcm281xx";

Hmm. I still tend to think we should list the specific SoC rather than the family here, but I guess if you're sure there won't be any SW compatibility between the different SoCs in the series, this is fine.

right now I expect to be able to use the family thoughout, so I'll stick to it.

Quoted 7 lines

arch/arm/boot/dts/bcm281xx.dtsi line 35

Quoted 4 lines
arch/arm/boot/dts/bcm281xx.dtsi +2 -0
 
+     uart at 3e000000 {
+             compatible = "snps,dw-apb-uart", "bcm,bcm281xx-sw-apb-uart";

The most specific value should be first, so swap those two entries.

ok. done

Quoted 8 lines

arch/arm/mach-bcm/Kconfig line 18

Quoted 6 lines
arch/arm/mach-bcm/Kconfig +4 -0
 
+     help
+       This enables support for system based on Broadcom SoCs.
+       It currently supports the 'BCM281XX' family, which includes
+       BCM11130, BCM1140, BCM11351, BCM28145 and

Should that be 11140 rather than 1140?

yes. that's a typo. corrected.

Quoted 3 lines

Aside from that,

thanks for reviewing it !

csd

maintainer
#3 lore raw

PATCH v3 1/1 Add support for generic BCM SoC chipsets

Quoted 11 lines · Christian Daudt
Quoted 10 lines

Documentation/devicetree/bindings/arm/bcm/bcm281xx.txt line 8

Quoted 5 lines
Documentation/devicetree/bindings/arm/bcm/bcm281xx.txt +3 -0
 
+Required root node property:
+
+compatible = "bcm,bcm281xx";

Hmm. I still tend to think we should list the specific SoC rather than the family here, but I guess if you're sure there won't be any SW compatibility between the different SoCs in the series, this is fine.

Quoted 2 lines

right now I expect to be able to use the family thoughout, so I'll stick to it.

But that's not how the compatible property is supposed to work: Each compatible value should refer to a specific property, and not include wildcards. If you have one driver (or platform file in this case) that can deal with a whole family of devices, the normal solution is to list the name of the oldest part in the compatible string as the most generic part, and then list the name of the new part as the specific one.

Arnd

#4 lore raw

PATCH v3 1/1 Add support for generic BCM SoC chipsets

Quoted 26 lines · Arnd Bergmann
Quoted 1 line · Christian Daudt
Quoted 1 line

Review

Quoted 1 line
(quoted diff) +0 -0

b/Documentation/devicetree/bindings/arm/bcm/bcm281xx.txt

Quoted 11 lines
Quoted 9 lines

Documentation/devicetree/bindings/arm/bcm/bcm281xx.txt line 8

Quoted 4 lines
Documentation/devicetree/bindings/arm/bcm/bcm281xx.txt new file +3 -0
+Required root node property:
+
+compatible = "bcm,bcm281xx";

Hmm. I still tend to think we should list the specific SoC rather than the family here, but I guess if you're sure there won't be any SW compatibility between the different SoCs in the series, this is fine.

right now I expect to be able to use the family thoughout, so I'll stick

to it.

Quoted 1 line

But that's not how the compatible property is supposed to work: Each compatible
value should refer to a specific property, and not include wildcards. If you have one driver (or platform file in this case) that can deal with a whole family of devices, the normal solution is to list the name of the oldest
part in the compatible string as the most generic part, and then list the name of the new part as the specific one.

Quoted 1 line

At that point doesn't the 'oldest part' become the wildcard ? I'm not

very attached to names, so I'm ok changing bcm281xx above to bcm11351, which happens to be the first chip I'm submitting a board for. But then bcm11351 will just become 'the chip name used to represent the family' right ? I had followed the fact that omap does use omap5 in omap5.dtsi - and afaik tegra2 and tegra3 are family names, not chip models, and are used in dtsi. But then again a bunch of chip models are used to represent the families too...
Let me know if you want me to submit a modified patchset. Shouldn't take
me more than 5 minutes anyways :)

Thanks,
csd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20121117/159b5b7f/attachment-0001.html>

maintainer
#5 lore raw

PATCH v3 1/1 Add support for generic BCM SoC chipsets

Quoted 10 lines · Christian Daudt
Quoted 1 line

At that point doesn't the 'oldest part' become the wildcard ? I'm not

very attached to names, so I'm ok changing bcm281xx above to bcm11351, which happens to be the first chip I'm submitting a board for. But then bcm11351 will just become 'the chip name used to represent the family' right ? I had followed the fact that omap does use omap5 in omap5.dtsi - and afaik tegra2 and tegra3 are family names, not chip models, and are used in dtsi. But then again a bunch of chip models are used to represent the families too...
Let me know if you want me to submit a modified patchset. Shouldn't take
me more than 5 minutes anyways :)

I think in a lot of cases, we just list all the possible parts specifically since we already know them, especially when supporting a new one requires changing code already.

Using bcm11351 as the name for the family sounds reasonable to me when the other ones are derived from that, and the other option is to just list all the ones that are out there already in the source code match table. For future SoCs, you can then decide whether you want to change the code to add the new number or just list one of the existing parts as backwards compatible for the new device tree file if that allows you to support it without other code changes.

Please pick one of the two options and resubmit.

Arnd

#6 lore raw

PATCH v3 1/1 Add support for generic BCM SoC chipsets

Quoted 25 lines · Arnd Bergmann
Quoted 6 lines · Christian Daudt
Quoted 1 line

At that point doesn't the 'oldest part' become the wildcard ? I'm not

very attached to names, so I'm ok changing bcm281xx above to bcm11351, which happens to be the first chip I'm submitting a board for. But then bcm11351 will just become 'the chip name used to represent the family' right ? I had followed the fact that omap does use omap5 in omap5.dtsi - and afaik tegra2 and tegra3 are family names, not chip models, and are

used

Quoted 4 lines

in dtsi. But then again a bunch of chip models are used to represent the families too...
Let me know if you want me to submit a modified patchset. Shouldn't take
me more than 5 minutes anyways :)

I think in a lot of cases, we just list all the possible parts specifically since we already know them, especially when supporting a new one requires changing code already.

Using bcm11351 as the name for the family sounds reasonable to me when the other ones are derived from that, and the other option is to just list all the ones that are out there already in the source code match table. For future SoCs, you can then decide whether you want to change the code to add the new number or just list one of the existing parts as backwards compatible for the new device tree file if that allows you to support it without other code changes.

Quoted 2 lines

Please pick one of the two options and resubmit.

ok. resubmitting shortly with bcm11351.

thanks,
csd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20121117/43c83a77/attachment-0001.html>

#7 lore raw

PATCH v3 1/1 Add support for generic BCM SoC chipsets

Quoted 31 lines · Christian Daudt
Quoted 28 lines · Arnd Bergmann
Quoted 12 lines · Christian Daudt
Quoted 1 line

At that point doesn't the 'oldest part' become the wildcard ? I'm not

very attached to names, so I'm ok changing bcm281xx above to bcm11351, which happens to be the first chip I'm submitting a board for. But then bcm11351 will just become 'the chip name used to represent the family' right ? I had followed the fact that omap does use omap5 in omap5.dtsi - and afaik tegra2 and tegra3 are family names, not chip models, and are used
in dtsi. But then again a bunch of chip models are used to represent the families too...
Let me know if you want me to submit a modified patchset. Shouldn't
take
me more than 5 minutes anyways :)

I think in a lot of cases, we just list all the possible parts specifically
since we already know them, especially when supporting a new one requires changing code already.

Using bcm11351 as the name for the family sounds reasonable to me when the other ones are derived from that, and the other option is to just list all the ones that are out there already in the source code match table. For future SoCs, you can then decide whether you want to change the code to add the new number or just list one of the existing parts as backwards compatible for the new device tree file if that allows you to support it without other code changes.

Quoted 4 lines
Quoted 1 line

Please pick one of the two options and resubmit.

ok. resubmitting shortly with bcm11351.

On an administrative question: Stephen sent me a reviewed-by that effectively applied to V4 of the patch. I dropped it for V5 as this is not the exact patchset that he reviewed. Is the expected procedure that new versions of patches carry previous reviewed-by or not ? I could not find any reference to that in the submittingpatches doc

thanks,
csd

maintainer
#8 lore raw

PATCH v3 1/1 Add support for generic BCM SoC chipsets

Quoted 5 lines · Christian Daudt

On an administrative question: Stephen sent me a reviewed-by that effectively applied to V4 of the patch. I dropped it for V5 as this is not the exact patchset that he reviewed. Is the expected procedure that new versions of patches carry previous reviewed-by or not ? I could not find any reference to that in the submittingpatches doc

Usually you should keep the reviewed-by tag as you only make small changes to other comments. If you do substantial changes, best ask the reviewers to look at the new version as well.

Arnd

#9 lore raw

PATCH v3 1/1 Add support for generic BCM SoC chipsets

In reply to Christian Daudt
Quoted 6 lines · Christian Daudt

and afaik tegra2 and tegra3 are family names, not chip models, and are used in dtsi. But then again a bunch of chip models are used to represent the families too... Let me know if you want me to submit a modified patchset. Shouldn't take me more than 5 minutes anyways :)

From a software perspective at least, all Tegra2x are the exact same chip, same for Tegra3.

Sorry if this email is borked; trying out list email on my tablet for the first time.

Signature · 1 line
Sent from my Android phone with K-9 Mail. Please excuse my brevity.