raspberry pi 3 patch series, part 1: essentials
Subsystems (8)
v2 cover raspberry pi 3 patch series, part 1: essentials
Hi,
Raspberry pi 3 patches, next round. I'll go split the longish patch series into smaller ones. I'll also go include the linux-arm-kernel list this time (note I'm subscribed to linux-rpi-kernel only so please take care to keep me in Cc). This is part one with just the essential stuff needed to get the rpi3 boot, without wifi support.
Changes:
* dropped ARCH_BCM kconfig option.
* drop include hack for rpi3 device tree in arm.
* drop DMA offset patch, pick up the version from Alex instead.
Patches are also available from:
git://git.kraxel.org/linux bcm2837-47-v2
Note that the git branch has the complete set of patches (including device tree patches and rpi3 wifi).
cheers,
Gerd
Alexander Graf (1):
arm64: Allow for different DMA and CPU bus offsets
Eric Anholt (5):
irqchip: bcm2835: Avoid arch/arm-specific handle_IRQ.
arm64: Add platform selection for BCM2835.
arm64: Add BCM2835 support to the defconfig.
dt-bindings: Add root properties for Raspberry Pi 3
ARM: bcm2835: Add devicetree for the Raspberry Pi 3.
Gerd Hoffmann (2):
pinctrl: walk into bcm subdir unconditionally
ARM: bcm2837: dt: Add the ethernet to the device trees
Lubomir Rintel (1):
ARM: bcm2835: dt: Add the ethernet to the device trees
.../devicetree/bindings/arm/bcm/brcm,bcm2835.txt | 4 ++ arch/arm/boot/dts/Makefile | 3 +- arch/arm/boot/dts/bcm2835-rpi-b-plus.dts | 1 + arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts | 1 + arch/arm/boot/dts/bcm2835-rpi-b.dts | 1 + arch/arm/boot/dts/bcm2836-rpi-2-b.dts | 1 + arch/arm/boot/dts/bcm283x-rpi-smsc9512.dtsi | 19 ++++++ arch/arm/boot/dts/bcm283x-rpi-smsc9514.dtsi | 19 ++++++ arch/arm/boot/dts/bcm283x.dtsi | 2 + arch/arm64/Kconfig.platforms | 13 ++++ arch/arm64/boot/dts/broadcom/Makefile | 1 + arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dts | 30 +++++++++ arch/arm64/boot/dts/broadcom/bcm2837.dtsi | 74 ++++++++++++++++++++++ arch/arm64/configs/defconfig | 23 ++++++- arch/arm64/include/asm/dma-mapping.h | 17 ++++- drivers/irqchip/irq-bcm2835.c | 3 +- drivers/irqchip/irq-bcm2836.c | 2 +- drivers/pinctrl/Makefile | 2 +- 18 files changed, 206 insertions(+), 10 deletions(-) create mode 100644 arch/arm/boot/dts/bcm283x-rpi-smsc9512.dtsi create mode 100644 arch/arm/boot/dts/bcm283x-rpi-smsc9514.dtsi create mode 100644 arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dts create mode 100644 arch/arm64/boot/dts/broadcom/bcm2837.dtsi
Signature · 1 line
1.8.3.1
PATCH v2 1/9 pinctrl: walk into bcm subdir unconditionally
There is no ARCH_BCM on arm64, and we need pinctrl-bcm2835 for the rpi3.
--- drivers/pinctrl/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pinctrl/Makefile +1 -1
@@ -35,7 +35,7 @@ obj-$(CONFIG_PINCTRL_TB10X) += pinctrl-tb10x.o obj-$(CONFIG_PINCTRL_ST) += pinctrl-st.o obj-$(CONFIG_PINCTRL_ZYNQ) += pinctrl-zynq.o -obj-$(CONFIG_ARCH_BCM) += bcm/ +obj-y += bcm/ obj-$(CONFIG_PINCTRL_BERLIN) += berlin/ obj-y += freescale/ obj-$(CONFIG_X86) += intel/
Signature · 1 line
1.8.3.1
Re: [PATCH v2 1/9] pinctrl: walk into bcm subdir unconditionally
Quoted 12 lines · Gerd Hoffmann
There is no
ARCH_BCMon arm64, and we need pinctrl-bcm2835 for the rpi3.Signed-off-by Gerd Hoffmann <[email protected]>--- drivers/pinctrl/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/pinctrl/Makefile +0
-0
drivers/pinctrl/Makefile obj-$(CONFIG_PINCTRL_TB10X) += pinctrl-tb10x.o · line 38
Quoted 5 lines
drivers/pinctrl/Makefile +1
-1@@ -35,7 +35,7 @@ obj-$(CONFIG_PINCTRL_TB10X) += pinctrl-tb10x.o obj-$(CONFIG_PINCTRL_ST) += pinctrl-st.o obj-$(CONFIG_PINCTRL_ZYNQ) += pinctrl-zynq.o -obj-$(CONFIG_ARCH_BCM) += bcm/ +obj-y += bcm/
Looks OK to me, but would like Stephen's or Eric's ACK?
Yours,
Linus Walleij
Eric Anholt
Acked-byRe: [PATCH v2 1/9] pinctrl: walk into bcm subdir unconditionally
Quoted 17 lines · Linus Walleij
Quoted 15 lines · Gerd Hoffmann
There is no
ARCH_BCMon arm64, and we need pinctrl-bcm2835 for the rpi3.Signed-off-by Gerd Hoffmann <[email protected]>--- drivers/pinctrl/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/pinctrl/Makefile +0
-0@@ -35,7 +35,7 @@ obj-$(CONFIG_PINCTRL_TB10X) += pinctrl-tb10x.o obj-$(CONFIG_PINCTRL_ST) += pinctrl-st.o obj-$(CONFIG_PINCTRL_ZYNQ) += pinctrl-zynq.o
Quoted 4 lines
drivers/pinctrl/Makefile obj-$(CONFIG_PINCTRL_TB10X) += pinctrl-tb10x.o · line 38
Quoted 2 lines
drivers/pinctrl/Makefile +1
-1-obj-$(CONFIG_ARCH_BCM) += bcm/ +obj-y += bcm/Looks OK to me, but would like Stephen's or Eric's ACK?
It looks like this is the only instance of filtering the directory on CONFIG_ARCH_BCM, so regardless of the patch 4 resolution,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160609/bf187f9a/attachment.sig>
Re: [PATCH v2 1/9] pinctrl: walk into bcm subdir unconditionally
In reply to Gerd HoffmannQuoted 3 lines · Gerd Hoffmann
There is no
ARCH_BCMon arm64, and we need pinctrl-bcm2835 for the rpi3.Signed-off-by Gerd Hoffmann <[email protected]>
I see I got an identical patch from Florian Fainelli and applied it. Sorry for my clashes, confusion and screwups... Added Eric's ACK on the applied patch.
Yours,
Linus Walleij
Re: [PATCH v2 1/9] pinctrl: walk into bcm subdir unconditionally
Quoted 9 lines · Linus Walleij
Quoted 3 lines · Gerd Hoffmann
There is no
ARCH_BCMon arm64, and we need pinctrl-bcm2835 for the rpi3.Signed-off-by Gerd Hoffmann <[email protected]>I see I got an identical patch from Florian Fainelli and applied it. Sorry for my clashes, confusion and screwups... Added Eric's ACK on the applied patch.
Florian's had a nice commit message, and I'm just happy to see patches
land. Thanks!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160614/e6ea7959/attachment.sig>
PATCH v2 2/9 irqchip: bcm2835: Avoid arch/arm-specific handle_IRQ.
In reply to Gerd HoffmannFrom: Eric Anholt <[email protected]>
This is equivalent and works for arm64 as well.
--- drivers/irqchip/irq-bcm2835.c | 3 +-- drivers/irqchip/irq-bcm2836.c | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-)
drivers/irqchip/irq-bcm2835.c +1 -2
@@ -52,7 +52,6 @@#include <linux/irqdomain.h> #include <asm/exception.h> -#include <asm/mach/irq.h> /* Put the bank and irq (32 bits) into the hwirq */ #define MAKE_HWIRQ (b, n) ((b << 5) | (n))
@@ -242,7 +241,7 @@ static void __exception_irq_entry bcm2835_handle_irq(u32 hwirq;while ((hwirq =get_next_armctrl_hwirq ()) != ~0 ) -handle_IRQ (irq_linear_revmap (intc.domain, hwirq), regs); +handle_domain_irq (intc.domain, hwirq, regs); }static void bcm2836_chained_handle_irq (struct irq_desc *desc)
drivers/irqchip/irq-bcm2836.c +1 -1
@@ -180,7 +180,7 @@ __exception_irq_entry bcm2836_arm_irqchip_handle_irq(struct pt_regs *regs) }else if (stat) {u32 hwirq =ffs (stat) -1 ; -handle_IRQ (irq_linear_revmap (intc.domain, hwirq), regs); +handle_domain_irq (intc.domain, hwirq, regs); } }
Signature · 1 line
1.8.3.1
PATCH v2 3/9 arm64: Allow for different DMA and CPU bus offsets
In reply to Gerd HoffmannFrom: Alexander Graf <[email protected]>
On arm64, all SoCs we supported so far either have an IOMMU or have bus addresses equal to CPU addresses.
However, with the Raspberry Pi 3 coming up, this is no longer true. To allow DMA to work with an AArch64 kernel on those devices, let's allow devices to have DMA offsets again.
--- arch/arm64/include/asm/dma-mapping.h | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-)
arch/arm64/include/asm/dma-mapping.h +15 -2
@@ -66,12 +66,16 @@ static inline bool is_device_dma_coherent(struct device *dev)static inline dma_addr_t phys_to_dma (struct device *dev,phys_addr_t paddr) { -return (dma_addr_t )paddr; +dma_addr_t dev_addr = (dma_addr_t )paddr; + +return dev_addr - ((dma_addr_t )dev->dma_pfn_offset <<PAGE_SHIFT ); }static inline phys_addr_t dma_to_phys (struct device *dev,dma_addr_t dev_addr) { -return (phys_addr_t )dev_addr; +phys_addr_t paddr = (phys_addr_t )dev_addr; + +return paddr + ((phys_addr_t )dev->dma_pfn_offset <<PAGE_SHIFT ); }static inline bool dma_capable (struct device *dev,dma_addr_t addr,size_t size)
@@ -86,5 +90,14 @@ static inline void dma_mark_clean(void *addr, size_t size) { } +/* Override for dma_max_pfn() */ +static inline unsigned long dma_max_pfn (struct device *dev) +{ +dma_addr_t dma_max = (dma_addr_t)*dev->dma_mask; + +return (ulong )dma_to_phys (dev, dma_max) >>PAGE_SHIFT ; +} +#define dma_max_pfn (dev) dma_max_pfn(dev) +#endif /* __KERNEL__ */ #endif /* __ASM_DMA_MAPPING_H */
Signature · 1 line
1.8.3.1
PATCH v2 4/9 arm64: Add platform selection for BCM2835.
In reply to Gerd HoffmannFrom: Eric Anholt <[email protected]>
[ kraxel: copy some selects from arm to arm64 ]
--- arch/arm64/Kconfig.platforms | 13 +++++++++++++ 1 file changed, 13 insertions(+)
arch/arm64/Kconfig.platforms +13 -0
@@ -13,6 +13,19 @@ config ARCH_ALPINE This enables support for the Annapurna Labs Alpine Soc family. +config ARCH_BCM2835 + bool "Broadcom BCM2835 family" + select ARCH_REQUIRE_GPIOLIB + select CLKSRC_OF + select PINCTRL + select PINCTRL_BCM2835 + select ARM_AMBA + select ARM_TIMER_SP804 + select HAVE_ARM_ARCH_TIMER + help + This enables support for the Broadcom BCM2837 SoC. + This SoC is used in the Raspberry Pi 3 device. + config ARCH_BCM_IPROC bool "Broadcom iProc SoC Family" select COMMON_CLK_IPROC
Signature · 1 line
1.8.3.1
Catalin Marinas
maintainerRe: [PATCH v2 4/9] arm64: Add platform selection for BCM2835.
Quoted 10 lines · Gerd Hoffmann
arch/arm64/Kconfig.platforms +2
-0@@ -13,6 +13,19 @@ config ARCH_ALPINE This enables support for the Annapurna Labs Alpine Soc family. +config ARCH_BCM2835 + bool "Broadcom BCM2835 family"
arch/arm64/Kconfig.platforms config ARCH_ALPINE · line 27
Quoted 10 lines
arch/arm64/Kconfig.platforms +10
-0+ select ARCH_REQUIRE_GPIOLIB + select CLKSRC_OF + select PINCTRL + select PINCTRL_BCM2835 + select ARM_AMBA + select ARM_TIMER_SP804 + select HAVE_ARM_ARCH_TIMER + help + This enables support for the Broadcom BCM2837 SoC. + This SoC is used in the Raspberry Pi 3 device.
I thought we would just use ARCH_BCM, or is it too generic?
Signature · 1 line
Catalin
Re: [PATCH v2 4/9] arm64: Add platform selection for BCM2835.
Quoted 9 lines · Catalin Marinas
Quoted 8 lines · Gerd Hoffmann
arch/arm64/Kconfig.platforms +0
-0@@ -13,6 +13,19 @@ config ARCH_ALPINE This enables support for the Annapurna Labs Alpine Soc family.
Quoted 14 lines
arch/arm64/Kconfig.platforms config ARCH_ALPINE · line 27
Quoted 12 lines
arch/arm64/Kconfig.platforms +12
-0+config ARCH_BCM2835 + bool "Broadcom BCM2835 family" + select ARCH_REQUIRE_GPIOLIB + select CLKSRC_OF + select PINCTRL + select PINCTRL_BCM2835 + select ARM_AMBA + select ARM_TIMER_SP804 + select HAVE_ARM_ARCH_TIMER + help + This enables support for the Broadcom BCM2837 SoC. + This SoC is used in the Raspberry Pi 3 device.I thought we would just use
ARCH_BCM, or is it too generic?
Consensus last time around seemed to be to drop adding ARCH_BCM, in
favor of patch 1 of the series.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160604/2f3df089/attachment.sig>
Catalin Marinas
maintainerRe: [PATCH v2 4/9] arm64: Add platform selection for BCM2835.
Quoted 10 lines · Eric Anholt
Quoted 9 lines · Catalin Marinas
Quoted 8 lines · Gerd Hoffmann
arch/arm64/Kconfig.platforms +0
-0@@ -13,6 +13,19 @@ config ARCH_ALPINE This enables support for the Annapurna Labs Alpine Soc family.
Quoted 11 lines
Quoted 11 lines
arch/arm64/Kconfig.platforms config ARCH_ALPINE · line 26
Quoted 11 lines
arch/arm64/Kconfig.platforms +11
-0+config ARCH_BCM2835 + bool "Broadcom BCM2835 family" + select ARCH_REQUIRE_GPIOLIB + select CLKSRC_OF + select PINCTRL + select PINCTRL_BCM2835 + select ARM_AMBA + select ARM_TIMER_SP804 + select HAVE_ARM_ARCH_TIMER + help + This enables support for the Broadcom BCM2837 SoC.
Even the BCM number is inconsistent here.
Quoted 6 lines
Quoted 3 lines
arch/arm64/Kconfig.platforms config ARCH_ALPINE · line 27
Quoted 1 line
arch/arm64/Kconfig.platforms +1
-0+ This SoC is used in the Raspberry Pi 3 device.I thought we would just use
ARCH_BCM, or is it too generic?Consensus last time around seemed to be to drop adding
ARCH_BCM, in favor of patch 1 of the series.
I may have missed that discussion. My point was about consistency with existing ARCH_* definitions in the arm64 Kconfig.platforms. I can see why it's easier for you since some drivers are built based on ARCH_BCM2835. Looking at drivers/clk/bcm/Makefile, there is an inconsistent mix of CLK_BCM_* and ARCH_BCM_*. I would rather have a new CLK_BCM2835 that's selected/enabled accordingly (maybe simply depending on ARCH_BCM).
Signature · 1 line
Catalin
Re: [PATCH v2 4/9] arm64: Add platform selection for BCM2835.
Quoted 11 lines · Catalin Marinas
Quoted 10 lines · Eric Anholt
Quoted 9 lines · Catalin Marinas
Quoted 8 lines · Gerd Hoffmann
arch/arm64/Kconfig.platforms +0
-0@@ -13,6 +13,19 @@ config ARCH_ALPINE This enables support for the Annapurna Labs Alpine Soc family.
Quoted 13 lines
Quoted 11 lines
Quoted 11 lines
arch/arm64/Kconfig.platforms config ARCH_ALPINE · line 26
Quoted 11 lines
arch/arm64/Kconfig.platforms +11
-0+config ARCH_BCM2835 + bool "Broadcom BCM2835 family" + select ARCH_REQUIRE_GPIOLIB + select CLKSRC_OF + select PINCTRL + select PINCTRL_BCM2835 + select ARM_AMBA + select ARM_TIMER_SP804 + select HAVE_ARM_ARCH_TIMER + help + This enables support for the Broadcom BCM2837 SoC.Even the BCM number is inconsistent here.
Well, given the past chip numbers, we could call the family's Kconfig ARCH_BCM283X, and for now arm64 would only do the 2837 in the family. Back when I was doing 2836, other maintainers agreed that renaming all of the ARCH_BCM2835 in the tree to BCM283X was pointless thrashing.
Quoted 7 lines
Quoted 6 lines
Quoted 3 lines
arch/arm64/Kconfig.platforms config ARCH_ALPINE · line 27
Quoted 1 line
arch/arm64/Kconfig.platforms +1
-0+ This SoC is used in the Raspberry Pi 3 device.I thought we would just use
ARCH_BCM, or is it too generic?Consensus last time around seemed to be to drop adding
ARCH_BCM, in favor of patch 1 of the series.
Quoted 7 lines
I may have missed that discussion. My point was about consistency with existing ARCH_* definitions in the arm64
Kconfig.platforms. I can see why it's easier for you since some drivers are built based onARCH_BCM2835. Looking atdrivers/clk/bcm/Makefile, there is an inconsistent mix of CLK_BCM_* and ARCH_BCM_*. I would rather have a newCLK_BCM2835that's selected/enabled accordingly (maybe simply depending onARCH_BCM).
So I introduce a new ARCH_BCM here, that selects the just the 283x
family's core drivers? That seems strange, but I'm willing if that's
what you want.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160609/1b8ec2d7/attachment-0001.sig>
Catalin Marinas
maintainerRe: [PATCH v2 4/9] arm64: Add platform selection for BCM2835.
Quoted 19 lines · Eric Anholt
Quoted 10 lines · Catalin Marinas
Quoted 8 lines · Eric Anholt
Quoted 4 lines · Catalin Marinas
arch/arm64/Kconfig.platforms config ARCH_ALPINE · line 27
Quoted 1 line · Gerd Hoffmann
arch/arm64/Kconfig.platforms +1
-0+ This SoC is used in the Raspberry Pi 3 device.I thought we would just use
ARCH_BCM, or is it too generic?Consensus last time around seemed to be to drop adding
ARCH_BCM, in favor of patch 1 of the series.Quoted 7 lines
I may have missed that discussion. My point was about consistency with existing ARCH_* definitions in the arm64
Kconfig.platforms. I can see why it's easier for you since some drivers are built based onARCH_BCM2835. Looking atdrivers/clk/bcm/Makefile, there is an inconsistent mix of CLK_BCM_* and ARCH_BCM_*. I would rather have a newCLK_BCM2835that's selected/enabled accordingly (maybe simply depending onARCH_BCM).
Quoted 3 lines
So I introduce a new
ARCH_BCMhere, that selects the just the 283x family's core drivers? That seems strange, but I'm willing if that's what you want.
I'll leave this decision to the arm-soc guys. What I want to avoid is another ARCH_BCM283[89] when some clock or other device changes in a future revision of this board (RPi4?). I also don't want fine-grained SoC configuration *within* the arch/arm64 Kconfigs but rather just a family ARCH_* entry with selectable individual drivers based on the SoC revision you target (in case you want to avoid single Image).
We should in general try to give drivers their own Kconfig entries separate from ARCH_* ones (with a "depend on ARCH_*" and default y if you want it enabled).
Signature · 1 line
Catalin
Re: [PATCH v2 4/9] arm64: Add platform selection for BCM2835.
Quoted 31 lines · Catalin Marinas
Quoted 19 lines · Eric Anholt
Quoted 10 lines · Catalin Marinas
Quoted 8 lines · Eric Anholt
Quoted 4 lines · Catalin Marinas
arch/arm64/Kconfig.platforms config ARCH_ALPINE · line 27
Quoted 1 line · Gerd Hoffmann
arch/arm64/Kconfig.platforms +1
-0+ This SoC is used in the Raspberry Pi 3 device.I thought we would just use
ARCH_BCM, or is it too generic?Consensus last time around seemed to be to drop adding
ARCH_BCM, in favor of patch 1 of the series.Quoted 7 lines
I may have missed that discussion. My point was about consistency with existing ARCH_* definitions in the arm64
Kconfig.platforms. I can see why it's easier for you since some drivers are built based onARCH_BCM2835. Looking atdrivers/clk/bcm/Makefile, there is an inconsistent mix of CLK_BCM_* and ARCH_BCM_*. I would rather have a newCLK_BCM2835that's selected/enabled accordingly (maybe simply depending onARCH_BCM).Quoted 3 lines
So I introduce a new
ARCH_BCMhere, that selects the just the 283x family's core drivers? That seems strange, but I'm willing if that's what you want.I'll leave this decision to the arm-soc guys. What I want to avoid is another ARCH_BCM283[89] when some clock or other device changes in a future revision of this board (RPi4?). I also don't want fine-grained SoC configuration *within* the
arch/arm64Kconfigs but rather just a family ARCH_* entry with selectable individual drivers based on the SoC revision you target (in case you want to avoid single Image).
Quoted 3 lines
We should in general try to give drivers their own
Kconfigentries separate from ARCH_* ones (with a "depend on ARCH_*" and default y if you want it enabled).
OK, we haven't added separate ARCH_BCM283* for the 3 chip revs so far, so I think what you want is actually the status quo, and we're in serious agreement. The name for the family just happens to be ARCH_BCM2835.
Any chance we could get an ack on this?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160614/1d3740df/attachment.sig>
Re: [PATCH v2 4/9] arm64: Add platform selection for BCM2835.
Quoted 37 lines · Eric Anholt
Quoted 31 lines · Catalin Marinas
Quoted 19 lines · Eric Anholt
Quoted 10 lines · Catalin Marinas
Quoted 8 lines · Eric Anholt
Quoted 4 lines · Catalin Marinas
Review
Quoted 1 line · Gerd Hoffmann
(quoted diff) +1
-0+ This SoC is used in the Raspberry Pi 3 device.I thought we would just use
ARCH_BCM, or is it too generic?Consensus last time around seemed to be to drop adding
ARCH_BCM, in favor of patch 1 of the series.Quoted 7 lines
I may have missed that discussion. My point was about consistency with existing ARCH_* definitions in the arm64
Kconfig.platforms. I can see why it's easier for you since some drivers are built based onARCH_BCM2835. Looking atdrivers/clk/bcm/Makefile, there is an inconsistent mix of CLK_BCM_* and ARCH_BCM_*. I would rather have a newCLK_BCM2835that's selected/enabled accordingly (maybe simply depending onARCH_BCM).Quoted 3 lines
So I introduce a new
ARCH_BCMhere, that selects the just the 283x family's core drivers? That seems strange, but I'm willing if that's what you want.I'll leave this decision to the arm-soc guys. What I want to avoid is another ARCH_BCM283[89] when some clock or other device changes in a future revision of this board (RPi4?). I also don't want fine-grained SoC configuration *within* the
arch/arm64Kconfigs but rather just a family ARCH_* entry with selectable individual drivers based on the SoC revision you target (in case you want to avoid single Image).Quoted 3 lines
We should in general try to give drivers their own
Kconfigentries separate from ARCH_* ones (with a "depend on ARCH_*" and default y if you want it enabled).
Quoted 6 lines
OK, we haven't added separate ARCH_BCM283* for the 3 chip revs so far, so I think what you want is actually the status quo, and we're in serious agreement. The name for the family just happens to be
ARCH_BCM2835.Any chance we could get an ack on this?
If you need one ;) (arm-soc is maintaining this file):
Re: [PATCH v2 4/9] arm64: Add platform selection for BCM2835.
Quoted 43 lines · Catalin Marinas
Quoted 42 lines · Eric Anholt
Quoted 31 lines · Catalin Marinas
Quoted 19 lines · Eric Anholt
Quoted 10 lines · Catalin Marinas
Quoted 8 lines · Eric Anholt
Quoted 4 lines · Catalin Marinas
Review
Quoted 1 line · Gerd Hoffmann
(quoted diff) +1
-0+ This SoC is used in the Raspberry Pi 3 device.I thought we would just use
ARCH_BCM, or is it too generic?Consensus last time around seemed to be to drop adding
ARCH_BCM, in favor of patch 1 of the series.Quoted 7 lines
I may have missed that discussion. My point was about consistency with existing ARCH_* definitions in the arm64
Kconfig.platforms. I can see why it's easier for you since some drivers are built based onARCH_BCM2835. Looking atdrivers/clk/bcm/Makefile, there is an inconsistent mix of CLK_BCM_* and ARCH_BCM_*. I would rather have a newCLK_BCM2835that's selected/enabled accordingly (maybe simply depending onARCH_BCM).Quoted 3 lines
So I introduce a new
ARCH_BCMhere, that selects the just the 283x family's core drivers? That seems strange, but I'm willing if that's what you want.I'll leave this decision to the arm-soc guys. What I want to avoid is another ARCH_BCM283[89] when some clock or other device changes in a future revision of this board (RPi4?). I also don't want fine-grained SoC configuration *within* the
arch/arm64Kconfigs but rather just a family ARCH_* entry with selectable individual drivers based on the SoC revision you target (in case you want to avoid single Image).Quoted 3 lines
We should in general try to give drivers their own
Kconfigentries separate from ARCH_* ones (with a "depend on ARCH_*" and default y if you want it enabled).OK, we haven't added separate ARCH_BCM283* for the 3 chip revs so far, so I think what you want is actually the status quo, and we're in serious agreement. The name for the family just happens to be
ARCH_BCM2835.
Quoted 5 lines
Quoted 1 line
Any chance we could get an ack on this?
If you need one ;) (arm-soc is maintaining this file):
Acked-by Catalin Marinas <[email protected]>
It's in my for-next now. Thanks!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160615/39b73856/attachment.sig>
PATCH v2 5/9 arm64: Add BCM2835 support to the defconfig.
In reply to Gerd HoffmannFrom: Eric Anholt <[email protected]>
Made with make defconfig; make menuconfig (only saying Y to new entries); make savedefconfig.
[ kraxel: quick+dirty rebase to 4.7 ]
--- arch/arm64/configs/defconfig | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-)
arch/arm64/configs/defconfig +20 -3
@@ -31,6 +31,7 @@ CONFIG_MODULE_UNLOAD=y # CONFIG_IOSCHED_DEADLINE is not set CONFIG_ARCH_SUNXI=y CONFIG_ARCH_ALPINE=y +CONFIG_ARCH_BCM2835=y CONFIG_ARCH_BCM_IPROC=y CONFIG_ARCH_BERLIN=y CONFIG_ARCH_EXYNOS=y
@@ -140,6 +141,9 @@ CONFIG_USB_NET_PLUSB=m CONFIG_USB_NET_MCS7830=m CONFIG_WL18XX=m CONFIG_WLCORE_SDIO=m +CONFIG_USB_USBNET=y +CONFIG_USB_NET_SMSC95XX=y +# CONFIG_WLAN is not set CONFIG_INPUT_EVDEV=y CONFIG_KEYBOARD_GPIO=y # CONFIG_SERIO_SERPORT is not set
@@ -147,6 +151,9 @@ CONFIG_SERIO_AMBAKMI=y CONFIG_LEGACY_PTY_COUNT=16 CONFIG_SERIAL_8250=y CONFIG_SERIAL_8250_CONSOLE=y +CONFIG_SERIAL_8250_EXTENDED=y +CONFIG_SERIAL_8250_SHARE_IRQ=y +CONFIG_SERIAL_8250_BCM2835AUX=y CONFIG_SERIAL_8250_DW=y CONFIG_SERIAL_8250_MT6577=y CONFIG_SERIAL_8250_UNIPHIER=y
@@ -173,6 +180,7 @@ CONFIG_I2C_MUX=y CONFIG_I2C_MUX_PCA954x=y CONFIG_I2C_DESIGNWARE_PLATFORM=y CONFIG_I2C_IMX=y +CONFIG_I2C_BCM2835=y CONFIG_I2C_MV64XXX=y CONFIG_I2C_QUP=y CONFIG_I2C_TEGRA=y
@@ -180,6 +188,8 @@ CONFIG_I2C_UNIPHIER_F=y CONFIG_I2C_RCAR=y CONFIG_SPI=y CONFIG_SPI_ORION=y +CONFIG_SPI_BCM2835=y +CONFIG_SPI_BCM2835AUX=y CONFIG_SPI_PL022=y CONFIG_SPI_QUP=y CONFIG_SPI_SPIDEV=m
@@ -206,20 +216,24 @@ CONFIG_MFD_SPMI_PMIC=y CONFIG_MFD_SEC_CORE=y CONFIG_MFD_HI655X_PMIC=y CONFIG_REGULATOR=y +CONFIG_BCM2835_WDT=y +CONFIG_MFD_SPMI_PMIC=y +CONFIG_MFD_SEC_CORE=y CONFIG_REGULATOR_FIXED_VOLTAGE=y CONFIG_REGULATOR_HI655X=y CONFIG_REGULATOR_QCOM_SMD_RPM=y CONFIG_REGULATOR_QCOM_SPMI=y CONFIG_REGULATOR_S2MPS11=y -CONFIG_FB=y +CONFIG_DRM=y +CONFIG_DRM_VC4=y CONFIG_FB_ARMCLCD=y -CONFIG_FRAMEBUFFER_CONSOLE=y CONFIG_LOGO=y # CONFIG_LOGO_LINUX_MONO is not set # CONFIG_LOGO_LINUX_VGA16 is not set CONFIG_SOUND=y CONFIG_SND=y CONFIG_SND_SOC=y +CONFIG_SND_BCM2835_SOC_I2S=y CONFIG_SND_SOC_RCAR=y CONFIG_SND_SOC_AK4613=y CONFIG_USB=y
@@ -270,6 +284,7 @@ CONFIG_RTC_DRV_SUN6I=y CONFIG_RTC_DRV_XGENE=y CONFIG_DMADEVICES=y CONFIG_PL330_DMA=y +CONFIG_DMA_BCM2835=y CONFIG_TEGRA20_APB_DMA=y CONFIG_QCOM_BAM_DMA=y CONFIG_RCAR_DMAC=y
@@ -289,7 +304,9 @@ CONFIG_HWSPINLOCK_QCOM=y CONFIG_MAILBOX=y CONFIG_ARM_MHU=y CONFIG_HI6220_MBOX=y +CONFIG_BCM2835_MBOX=y CONFIG_ARM_SMMU=y +CONFIG_RASPBERRYPI_POWER=y CONFIG_QCOM_SMEM=y CONFIG_QCOM_SMD=y CONFIG_QCOM_SMD_RPM=y
@@ -302,6 +319,7 @@ CONFIG_PHY_HI6220_USB=y CONFIG_PHY_XGENE=y CONFIG_ARM_SCPI_PROTOCOL=y CONFIG_ACPI=y +CONFIG_RASPBERRYPI_FIRMWARE=y CONFIG_EXT2_FS=y CONFIG_EXT3_FS=y CONFIG_FANOTIFY=y
@@ -311,7 +329,6 @@ CONFIG_AUTOFS4_FS=y CONFIG_FUSE_FS=y CONFIG_CUSE=y CONFIG_VFAT_FS=y -CONFIG_TMPFS=y CONFIG_HUGETLBFS=y CONFIG_CONFIGFS_FS=y CONFIG_EFIVAR_FS=y
Signature · 1 line
1.8.3.1
Arnd Bergmann
maintainerRe: [PATCH v2 5/9] arm64: Add BCM2835 support to the defconfig.
Quoted 4 lines · CEST Gerd Hoffmann
From: Eric Anholt <[email protected]>
Made with make defconfig; make menuconfig (only saying Y to new entries); make savedefconfig.
Please try not to mix 'make savedefconfig' changes with your own changes, it make it harder to review and can lead to more conflicts.
arch/arm64/configs/defconfig CONFIG_USB_NET_PLUSB=m · line 148
Quoted 9 lines
arch/arm64/configs/defconfig +3
-0@@ -140,6 +141,9 @@ CONFIG_USB_NET_PLUSB=m CONFIG_USB_NET_MCS7830=m CONFIG_WL18XX=m CONFIG_WLCORE_SDIO=m +CONFIG_USB_USBNET=y +CONFIG_USB_NET_SMSC95XX=y +# CONFIG_WLAN is not set CONFIG_INPUT_EVDEV=y CONFIG_KEYBOARD_GPIO=y
Can this be =m like the others?
arch/arm64/configs/defconfig CONFIG_MFD_SPMI_PMIC=y · line 216
Quoted 2 lines
arch/arm64/configs/defconfig +0
-2-CONFIG_FB=y -CONFIG_FRAMEBUFFER_CONSOLE=y
Is this intended?
arch/arm64/configs/defconfig CONFIG_MFD_SPMI_PMIC=y · line 230
Quoted 4 lines
arch/arm64/configs/defconfig +2
-0+CONFIG_DRM=y +CONFIG_DRM_VC4=y CONFIG_FB_ARMCLCD=y CONFIG_LOGO=y
Maybe modules?
Quoted 9 lines
#
CONFIG_LOGO_LINUX_MONOis not set
#CONFIG_LOGO_LINUX_VGA16is not set
CONFIG_SOUND=y
CONFIG_SND=y
CONFIG_SND_SOC=y
+CONFIG_SND_BCM2835_SOC_I2S=y
CONFIG_SND_SOC_RCAR=y
CONFIG_SND_SOC_AK4613=y
CONFIG_USB=y
We probably want CONFIG_SND=m, but that should be a separate patch.
arch/arm64/configs/defconfig CONFIG_RTC_DRV_SUN6I=y · line 290
Quoted 8 lines
arch/arm64/configs/defconfig +1
-0@@ -270,6 +284,7 @@ CONFIG_RTC_DRV_SUN6I=y CONFIG_RTC_DRV_XGENE=y CONFIG_DMADEVICES=y CONFIG_PL330_DMA=y +CONFIG_DMA_BCM2835=y CONFIG_TEGRA20_APB_DMA=y CONFIG_QCOM_BAM_DMA=y CONFIG_RCAR_DMAC=y
Does any essential driver depend on this one?
arch/arm64/configs/defconfig CONFIG_AUTOFS4_FS=y · line 334
Quoted 8 lines
arch/arm64/configs/defconfig +0
-1@@ -311,7 +329,6 @@ CONFIG_AUTOFS4_FS=y CONFIG_FUSE_FS=y CONFIG_CUSE=y CONFIG_VFAT_FS=y -CONFIG_TMPFS=y CONFIG_HUGETLBFS=y CONFIG_CONFIGFS_FS=y CONFIG_EFIVAR_FS=y
Why?
Arnd
Re: [PATCH v2 5/9] arm64: Add BCM2835 support to the defconfig.
Quoted 9 lines · Arnd Bergmann
Quoted 4 lines · CEST Gerd Hoffmann
From: Eric Anholt <[email protected]>
Made with make defconfig; make menuconfig (only saying Y to new entries); make savedefconfig.
Please try not to mix 'make savedefconfig' changes with your own changes, it make it harder to review and can lead to more conflicts.
This is just conflicts resolved by hand after 4.6 -> 4.7-rc1 rebase, latest version didn't actually ran through savedefconfig. Probably some unwanted changes made it in by accident this way.
Guess I better redo this from scratch.
What is the suggested procedure to generate defconfig patches?
cheers,
Gerd
Arnd Bergmann
maintainerRe: [PATCH v2 5/9] arm64: Add BCM2835 support to the defconfig.
Quoted 11 lines · CEST Gerd Hoffmann
Quoted 9 lines · Arnd Bergmann
Quoted 4 lines · CEST Gerd Hoffmann
From: Eric Anholt <[email protected]>
Made with make defconfig; make menuconfig (only saying Y to new entries); make savedefconfig.
Please try not to mix 'make savedefconfig' changes with your own changes, it make it harder to review and can lead to more conflicts.
Quoted 7 lines
This is just conflicts resolved by hand after 4.6 -> 4.7-rc1 rebase, latest version didn't actually ran through savedefconfig. Probably some unwanted changes made it in by accident this way.
Guess I better redo this from scratch.
What is the suggested procedure to generate defconfig patches?
I tend to just edit the files by hand, or use 'make savedefconfig' to create an initial version, and then use 'vimdiff' to revert the changes I don't want.
Arnd
Re: [PATCH v2 5/9] arm64: Add BCM2835 support to the defconfig.
In reply to Arnd BergmannHi,
Quoted 10 lines
arch/arm64/configs/defconfig CONFIG_AUTOFS4_FS=y · line 334
Quoted 8 lines
arch/arm64/configs/defconfig +0
-1@@ -311,7 +329,6 @@ CONFIG_AUTOFS4_FS=y CONFIG_FUSE_FS=y CONFIG_CUSE=y CONFIG_VFAT_FS=y -CONFIG_TMPFS=y CONFIG_HUGETLBFS=y CONFIG_CONFIGFS_FS=y CONFIG_EFIVAR_FS=yWhy?
That seems to come from enabling drm+vc4, probably something does "select TMPFS".
cheers,
Gerd
Re: [PATCH v2 5/9] arm64: Add BCM2835 support to the defconfig.
In reply to Arnd BergmannQuoted 10 lines · Arnd Bergmann
Quoted 4 lines · CEST Gerd Hoffmann
From: Eric Anholt <[email protected]>
Made with make defconfig; make menuconfig (only saying Y to new entries); make savedefconfig.
Please try not to mix 'make savedefconfig' changes with your own changes, it make it harder to review and can lead to more conflicts.
Quoted 11 lines
arch/arm64/configs/defconfig CONFIG_USB_NET_PLUSB=m · line 148
Quoted 9 lines
arch/arm64/configs/defconfig +3
-0@@ -140,6 +141,9 @@ CONFIG_USB_NET_PLUSB=m CONFIG_USB_NET_MCS7830=m CONFIG_WL18XX=m CONFIG_WLCORE_SDIO=m +CONFIG_USB_USBNET=y +CONFIG_USB_NET_SMSC95XX=y +# CONFIG_WLAN is not set CONFIG_INPUT_EVDEV=y CONFIG_KEYBOARD_GPIO=yCan this be =m like the others?
I guess, but it's an on-board device and I was assuming =m was about whether the device is always present on the board being added.
Quoted 11 lines
arch/arm64/configs/defconfig CONFIG_MFD_SPMI_PMIC=y · line 216
Quoted 2 lines
arch/arm64/configs/defconfig +0
-2-CONFIG_FB=y -CONFIG_FRAMEBUFFER_CONSOLE=yIs this intended?
arch/arm64/configs/defconfig CONFIG_MFD_SPMI_PMIC=y · line 230
Quoted 4 lines
arch/arm64/configs/defconfig +2
-0+CONFIG_DRM=y +CONFIG_DRM_VC4=y CONFIG_FB_ARMCLCD=y CONFIG_LOGO=yMaybe modules?
It looks like in multi_v7_defconfig we have CONFIG_DRM=y but CONFIG_DRM_*=m, so should we be consistent with that?
Quoted 12 lines
Quoted 9 lines
#
CONFIG_LOGO_LINUX_MONOis not set
#CONFIG_LOGO_LINUX_VGA16is not set
CONFIG_SOUND=y
CONFIG_SND=y
CONFIG_SND_SOC=y
+CONFIG_SND_BCM2835_SOC_I2S=y
CONFIG_SND_SOC_RCAR=y
CONFIG_SND_SOC_AK4613=y
CONFIG_USB=yWe probably want
CONFIG_SND=m, but that should be a separate patch.
Quoted 10 lines
arch/arm64/configs/defconfig CONFIG_RTC_DRV_SUN6I=y · line 290
Quoted 8 lines
arch/arm64/configs/defconfig +1
-0@@ -270,6 +284,7 @@ CONFIG_RTC_DRV_SUN6I=y CONFIG_RTC_DRV_XGENE=y CONFIG_DMADEVICES=y CONFIG_PL330_DMA=y +CONFIG_DMA_BCM2835=y CONFIG_TEGRA20_APB_DMA=y CONFIG_QCOM_BAM_DMA=y CONFIG_RCAR_DMAC=yDoes any essential driver depend on this one?
bcm2835-sdhost and vc4 will eventually.
Quoted 10 lines
arch/arm64/configs/defconfig CONFIG_AUTOFS4_FS=y · line 334
Quoted 8 lines
arch/arm64/configs/defconfig +0
-1@@ -311,7 +329,6 @@ CONFIG_AUTOFS4_FS=y CONFIG_FUSE_FS=y CONFIG_CUSE=y CONFIG_VFAT_FS=y -CONFIG_TMPFS=y CONFIG_HUGETLBFS=y CONFIG_CONFIGFS_FS=y CONFIG_EFIVAR_FS=yWhy?
DRM was selecting it, so savedefconfig dropped it.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160607/96abb74c/attachment.sig>
PATCH v2 6/9 dt-bindings: Add root properties for Raspberry Pi 3
In reply to Gerd HoffmannFrom: Eric Anholt <[email protected]>
--- Documentation/devicetree/bindings/arm/bcm/brcm,bcm2835.txt | 4 ++++ 1 file changed, 4 insertions(+)
Documentation/devicetree/bindings/arm/bcm/brcm,bcm2835.txt +4 -0
@@ -30,6 +30,10 @@ Raspberry Pi 2 Model B Required root node properties: compatible = "raspberrypi,2-model-b", "brcm,bcm2836"; +Raspberry Pi 3 Model B +Required root node properties: +compatible = "raspberrypi,3-model-b", "brcm,bcm2837"; + Raspberry Pi Compute Module Required root node properties: compatible = "raspberrypi,compute-module", "brcm,bcm2835";
Signature · 1 line
1.8.3.1
PATCH v2 7/9 ARM: bcm2835: Add devicetree for the Raspberry Pi 3.
In reply to Gerd HoffmannFrom: Eric Anholt <[email protected]>
While this devicetree also works for booting in 32-bit mode, it's placed in arm64 since it's a 64-bit CPU (as suggested by Arnd).
v2: Move to arm64/ instead of arm/
[ kraxel: update bcm2837-rpi-3-b.dtb path in arm(32) Makefile ]
--- arch/arm/boot/dts/Makefile | 3 +- arch/arm64/boot/dts/broadcom/Makefile | 1 + arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dts | 29 ++++++++++ arch/arm64/boot/dts/broadcom/bcm2837.dtsi | 74 ++++++++++++++++++++++++ 4 files changed, 106 insertions(+), 1 deletion(-) create mode 100644 arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dts create mode 100644 arch/arm64/boot/dts/broadcom/bcm2837.dtsi
arch/arm/boot/dts/Makefile +2 -1
@@ -66,7 +66,8 @@ dtb-$(CONFIG_ARCH_BCM2835) += \ bcm2835-rpi-b-rev2.dtb \ bcm2835-rpi-b-plus.dtb \ bcm2835-rpi-a-plus.dtb \ - bcm2836-rpi-2-b.dtb + bcm2836-rpi-2-b.dtb \ + ../../../arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dtb dtb-$(CONFIG_ARCH_BCM_5301X) += \ bcm4708-asus-rt-ac56u.dtb \ bcm4708-asus-rt-ac68u.dtb \
arch/arm64/boot/dts/broadcom/Makefile +1 -0
@@ -1,3 +1,4 @@ +dtb-$(CONFIG_ARCH_BCM2835) += bcm2837-rpi-3-b.dtb dtb-$(CONFIG_ARCH_BCM_IPROC) += ns2-svk.dtb dtb-$(CONFIG_ARCH_VULCAN) += vulcan-eval.dtb
arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dts new file +29 -0
@@ -0,0 +1,29 @@ +/dts-v1/; +#include "bcm2837.dtsi" +#include "../../../../arm/boot/dts/bcm2835-rpi.dtsi" + +/ { + compatible = "raspberrypi,3-model-b", "brcm,bcm2837"; + model = "Raspberry Pi 3 Model B"; + + memory { + reg = <0 0x40000000>; + }; + + leds { + act { + gpios = <&gpio 47 0>; + }; + + pwr { + label = "PWR"; + gpios = <&gpio 35 0>; + default-state = "keep"; + linux,default-trigger = "default-on"; + }; + }; +}; + +&uart1 { + status = "okay"; +};
arch/arm64/boot/dts/broadcom/bcm2837.dtsi new file +74 -0
74 lines not on this page · raw message
Signature · 1 line
1.8.3.1
Arnd Bergmann
maintainerRe: [PATCH v2 7/9] ARM: bcm2835: Add devicetree for the Raspberry Pi 3.
Quoted 5 lines · CEST Gerd Hoffmann
arch/arm/boot/dts/Makefile +0
-0
arch/arm/boot/dts/Makefile dtb-$(CONFIG_ARCH_BCM2835) += \ · line 73
Quoted 9 lines
arch/arm/boot/dts/Makefile +2
-1@@ -66,7 +66,8 @@ dtb-$(CONFIG_ARCH_BCM2835) += \ bcm2835-rpi-b-rev2.dtb \ bcm2835-rpi-b-plus.dtb \ bcm2835-rpi-a-plus.dtb \ - bcm2836-rpi-2-b.dtb + bcm2836-rpi-2-b.dtb \ + ../../../arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dtb dtb-$(CONFIG_ARCH_BCM_5301X) += \ bcm4708-asus-rt-ac56u.dtb \ bcm4708-asus-rt-ac68u.dtb \
Let's make this hunk a separate patch so we can discuss it on its own. I'm not really happy about the way it looks (in general, using ../../../ anywhere in the kernel looks hacky.
How about a separate
dtb-$(CONFIG_ARCH_BCM2835) +=
../../../arm64/boot/dts/broadcom/
so at least we don't have to add each board on its own?
Arnd
Re: [PATCH v2 7/9] ARM: bcm2835: Add devicetree for the Raspberry Pi 3.
Quoted 10 lines · Arnd Bergmann
Quoted 9 lines · CEST Gerd Hoffmann
arch/arm/boot/dts/Makefile +0
-1@@ -66,7 +66,8 @@ dtb-$(CONFIG_ARCH_BCM2835) += \ bcm2835-rpi-b-rev2.dtb \ bcm2835-rpi-b-plus.dtb \ bcm2835-rpi-a-plus.dtb \ - bcm2836-rpi-2-b.dtb
Quoted 8 lines
arch/arm/boot/dts/Makefile dtb-$(CONFIG_ARCH_BCM2835) += \ · line 73
Quoted 5 lines
arch/arm/boot/dts/Makefile +2
-0+ bcm2836-rpi-2-b.dtb \ + ../../../arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dtb dtb-$(CONFIG_ARCH_BCM_5301X) += \ bcm4708-asus-rt-ac56u.dtb \ bcm4708-asus-rt-ac68u.dtb \Let's make this hunk a separate patch so we can discuss it on its own.
Hmm, I through we where in agreement to do it this way ...
Quoted 7 lines
I'm not really happy about the way it looks (in general, using ../../../ anywhere in the kernel looks hacky.
How about a separate
dtb-$(CONFIG_ARCH_BCM2835) +=
../../../arm64/boot/dts/broadcom/
Not working.
Tried "subdir-$(CONFIG_ARCH_BCM) += ...". Didn't work either. Same for "dts-dirs += ...".
Running out of ideas. Guess I have to leave this to someone who knows kbuild better than me.
cheers,
Gerd
Arnd Bergmann
maintainerRe: [PATCH v2 7/9] ARM: bcm2835: Add devicetree for the Raspberry Pi 3.
Quoted 20 lines · CEST Gerd Hoffmann
Quoted 10 lines · Arnd Bergmann
Quoted 9 lines · CEST Gerd Hoffmann
arch/arm/boot/dts/Makefile +0
-1@@ -66,7 +66,8 @@ dtb-$(CONFIG_ARCH_BCM2835) += \ bcm2835-rpi-b-rev2.dtb \ bcm2835-rpi-b-plus.dtb \ bcm2835-rpi-a-plus.dtb \ - bcm2836-rpi-2-b.dtbQuoted 8 lines
arch/arm/boot/dts/Makefile dtb-$(CONFIG_ARCH_BCM2835) += \ · line 73
Quoted 5 lines
arch/arm/boot/dts/Makefile +2
-0+ bcm2836-rpi-2-b.dtb \ + ../../../arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dtb dtb-$(CONFIG_ARCH_BCM_5301X) += \ bcm4708-asus-rt-ac56u.dtb \ bcm4708-asus-rt-ac68u.dtb \Let's make this hunk a separate patch so we can discuss it on its own.
Quoted 1 line
Hmm, I through we where in agreement to do it this way ...
I think it's ok in principle, this is about the specific syntax.
Quoted 8 lines
Quoted 7 lines
I'm not really happy about the way it looks (in general, using ../../../ anywhere in the kernel looks hacky.
How about a separate
dtb-$(CONFIG_ARCH_BCM2835) +=
../../../arm64/boot/dts/broadcom/
Quoted 7 lines
Not working.
Tried "subdir-$(CONFIG_ARCH_BCM) += ...". Didn't work either. Same for "dts-dirs += ...".
Running out of ideas. Guess I have to leave this to someone who knows kbuild better than me.
I tried
subdir-y += ../../../arm64/boot/dts/broadcom
and it seemed to work fine, I got
DTC arch/arm/boot/dts/../../../arm64/boot/dts/broadcom/ns2-svk.dtb
in an allmodconfig build, which also includes CONFIG_ARCH_BCM_IPROC.
Arnd
Re: [PATCH v2 7/9] ARM: bcm2835: Add devicetree for the Raspberry Pi 3.
Hi,
Quoted 3 lines
I tried
subdir-y += ../../../arm64/boot/dts/broadcom
Hmm, works for me too now, probably had a typo somewhere.
But it works for "make dtbs" only, "make dtbs_install" ignores it.
cheers,
Gerd
Arnd Bergmann
maintainerRe: [PATCH v2 7/9] ARM: bcm2835: Add devicetree for the Raspberry Pi 3.
Quoted 9 lines · CEST Gerd Hoffmann
Hi,
Quoted 3 lines
I tried
subdir-y += ../../../arm64/boot/dts/broadcom
Hmm, works for me too now, probably had a typo somewhere.
But it works for "make dtbs" only, "make
dtbs_install" ignores it.
Right: this is no good ;-)
make -f /git/arm-soc/scripts/Makefile.dtbinst obj=arch/arm/boot/dts/../../../arm64/boot/dts/broadcom
mkdir -p /tmp/boot//dtbs/4.7.0-rc1-00345-gd2a060ee0c24-dirty/../../../arm64/boot/dts/broadcom; cp arch/arm/boot/dts/../../../arm64/boot/dts/broadcom/ns2-svk.dtb /tmp/boot//dtbs/4.7.0-rc1-00345-gd2a060ee0c24-dirty/../../../arm64/boot/dts/broadcom
Maybe we can have a symlink there? I've tried that without success too, but it shouldn't be that hard to get right.
Arnd
Re: [PATCH v2 7/9] ARM: bcm2835: Add devicetree for the Raspberry Pi 3.
In reply to Gerd HoffmannQuoted 7 lines · Gerd Hoffmann
Hi,
Quoted 3 lines
I tried
subdir-y += ../../../arm64/boot/dts/broadcom
Hmm, works for me too now, probably had a typo somewhere.
What directory does the dtb end up in? Because as it was, it ended up in arch/arm64/boot/dts/broadcom. I'm not sure all this hackery is worth it if the dtb doesn't end up in arch/arm/boot/dts/.
Quoted 1 line
But it works for "make dtbs" only, "make
dtbs_install" ignores it.
That will be fun for users to debug...
Rob
Arnd Bergmann
maintainerRe: [PATCH v2 7/9] ARM: bcm2835: Add devicetree for the Raspberry Pi 3.
Quoted 5 lines · CEST Rob Herring
Quoted 4 lines · Gerd Hoffmann
Hi,
Quoted 2 lines
I tried
Quoted 7 lines
Quoted 3 lines
Quoted 1 line
subdir-y += ../../../arm64/boot/dts/broadcom
Hmm, works for me too now, probably had a typo somewhere.
What directory does the dtb end up in? Because as it was, it ended up in
arch/arm64/boot/dts/broadcom. I'm not sure all this hackery is worth it if the dtb doesn't end up inarch/arm/boot/dts/.
I think having the dtb in $(objdir)arch/arm64/boot/dts/broadcom is fine, however installing the 'make dtbs_install' rule copy it to /boot/dts/../../../arm64/boot/dts/broadcom is not.
Arnd
Re: [PATCH v2 7/9] ARM: bcm2835: Add devicetree for the Raspberry Pi 3.
In reply to Rob HerringQuoted 5 lines · Rob Herring
Quoted 4 lines · Gerd Hoffmann
Hi,
Quoted 2 lines
I tried
Quoted 7 lines
Quoted 3 lines
Quoted 1 line
subdir-y += ../../../arm64/boot/dts/broadcom
Hmm, works for me too now, probably had a typo somewhere.
What directory does the dtb end up in? Because as it was, it ended up in
arch/arm64/boot/dts/broadcom. I'm not sure all this hackery is worth it if the dtb doesn't end up inarch/arm/boot/dts/.
With the 2/7 patch at the start of this subthread the dtb ends up in arch/arm64/boot/dts/broadcom for both arm and arm64 builds.
make "dtbs_install" places it in /boot/dtbs/$version/ for arm builds and in /boot/dtbs/$version/broadcom/ for arm64 builds.
cheers,
Gerd
Arnd Bergmann
maintainerRe: [PATCH v2 7/9] ARM: bcm2835: Add devicetree for the Raspberry Pi 3.
Quoted 14 lines · CEST Gerd Hoffmann
Quoted 5 lines · Rob Herring
Quoted 4 lines · Gerd Hoffmann
Hi,
Quoted 2 lines
I tried
Quoted 7 lines
Quoted 3 lines
Quoted 1 line
subdir-y += ../../../arm64/boot/dts/broadcom
Hmm, works for me too now, probably had a typo somewhere.
What directory does the dtb end up in? Because as it was, it ended up in
arch/arm64/boot/dts/broadcom. I'm not sure all this hackery is worth it if the dtb doesn't end up inarch/arm/boot/dts/.
Quoted 5 lines
With the 2/7 patch at the start of this subthread the dtb ends up in
arch/arm64/boot/dts/broadcomfor both arm and arm64 builds.make "
dtbs_install" places it in/boot/dtbs/$version/for arm builds and in/boot/dtbs/$version/broadcom/for arm64 builds.
Ok, let's stay with that for now then, and solve it better when we need to do more of the same. Are you aware of any other boards using bcm2837?
Arnd
Re: [PATCH v2 7/9] ARM: bcm2835: Add devicetree for the Raspberry Pi 3.
Hi,
Quoted 9 lines
Quoted 5 lines
With the 2/7 patch at the start of this subthread the dtb ends up in
arch/arm64/boot/dts/broadcomfor both arm and arm64 builds.make "
dtbs_install" places it in/boot/dtbs/$version/for arm builds and in/boot/dtbs/$version/broadcom/for arm64 builds.Ok, let's stay with that for now then, and solve it better when we need to do more of the same. Are you aware of any other boards using bcm2837?
No.
As far I know it has been created specifically for the rpi foundation, so I expect we might see new members of the rpi family using the bcm2837 too, but probably no other devices.
Maybe Eric Anholt knows more details.
cheers,
Gerd
Re: [PATCH v2 7/9] ARM: bcm2835: Add devicetree for the Raspberry Pi 3.
In reply to Gerd HoffmannHi,
Am 03.06.2016 um 08:18 schrieb Gerd Hoffmann:
Quoted 4 lines
From: Eric Anholt <[email protected]>
While this devicetree also works for booting in 32-bit mode, it's placed in arm64 since it's a 64-bit CPU (as suggested by Arnd).
i'm currently working on a patch series to fix dtc warnings like
Warning (unit_address_vs_reg): Node /memory has a reg or ranges property, but no unit name
This a copy of affected parts ( look at memory, soc and local_intc node ).
So how should this be handled?
a) fix the issues here
b) extend my patch series after this patch has been applied
Stefan
PATCH v2 8/9 ARM: bcm2835: dt: Add the ethernet to the device trees
In reply to Gerd HoffmannFrom: Lubomir Rintel <[email protected]>
The hub and the ethernet in its port 1 are hardwired on the board.
Compared to the adapters that can be plugged into the USB ports, this one has no serial EEPROM to store its MAC. Nevertheless, the Raspberry Pi has the MAC address for this adapter in its ROM, accessible from its firmware.
U-Boot can read out the address and set the local-mac-address property of the node with "ethernet" alias. Let's add the node so that U-Boot can do its business.
Model B rev2 and Model B+ entries were verified by me, the hierarchy and pid/vid pair for the Version 2 was provided by Peter Chen. Original Model B is a blind shot, though very likely correct.
--- arch/arm/boot/dts/bcm2835-rpi-b-plus.dts | 1 + arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts | 1 + arch/arm/boot/dts/bcm2835-rpi-b.dts | 1 + arch/arm/boot/dts/bcm2836-rpi-2-b.dts | 1 + arch/arm/boot/dts/bcm283x-rpi-smsc9512.dtsi | 19 +++++++++++++++++++ arch/arm/boot/dts/bcm283x-rpi-smsc9514.dtsi | 19 +++++++++++++++++++ arch/arm/boot/dts/bcm283x.dtsi | 2 ++ 7 files changed, 44 insertions(+) create mode 100644 arch/arm/boot/dts/bcm283x-rpi-smsc9512.dtsi create mode 100644 arch/arm/boot/dts/bcm283x-rpi-smsc9514.dtsi
arch/arm/boot/dts/bcm2835-rpi-b-plus.dts +1 -0
@@ -1,6 +1,7 @@ /dts-v1/; #include "bcm2835.dtsi" #include "bcm2835-rpi.dtsi" +#include "bcm283x-rpi-smsc9514.dtsi" / { compatible = "raspberrypi,model-b-plus", "brcm,bcm2835";
arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts +1 -0
@@ -1,6 +1,7 @@ /dts-v1/; #include "bcm2835.dtsi" #include "bcm2835-rpi.dtsi" +#include "bcm283x-rpi-smsc9512.dtsi" / { compatible = "raspberrypi,model-b-rev2", "brcm,bcm2835";
arch/arm/boot/dts/bcm2835-rpi-b.dts +1 -0
@@ -1,6 +1,7 @@ /dts-v1/; #include "bcm2835.dtsi" #include "bcm2835-rpi.dtsi" +#include "bcm283x-rpi-smsc9512.dtsi" / { compatible = "raspberrypi,model-b", "brcm,bcm2835";
arch/arm/boot/dts/bcm2836-rpi-2-b.dts +1 -0
@@ -1,6 +1,7 @@ /dts-v1/; #include "bcm2836.dtsi" #include "bcm2835-rpi.dtsi" +#include "bcm283x-rpi-smsc9514.dtsi" / { compatible = "raspberrypi,2-model-b", "brcm,bcm2836";
arch/arm/boot/dts/bcm283x-rpi-smsc9512.dtsi new file +19 -0
@@ -0,0 +1,19 @@ +/ { + aliases { + ethernet = ðernet; + }; +}; + +&usb { + usb1 at 1 { + compatible = "usb424,9512"; + reg = <1>; + #address-cells = <1>; + #size-cells = <0>; + + ethernet: usbether at 1 { + compatible = "usb424,ec00"; + reg = <1>; + }; + }; +};
arch/arm/boot/dts/bcm283x-rpi-smsc9514.dtsi new file +19 -0
@@ -0,0 +1,19 @@ +/ { + aliases { + ethernet = ðernet; + }; +}; + +&usb { + usb1 at 1 { + compatible = "usb424,9514"; + reg = <1>; + #address-cells = <1>; + #size-cells = <0>; + + ethernet: usbether at 1 { + compatible = "usb424,ec00"; + reg = <1>; + }; + }; +};
arch/arm/boot/dts/bcm283x.dtsi +2 -0
@@ -287,6 +287,8 @@ compatible = "brcm,bcm2835-usb"; reg = <0x7e980000 0x10000>; interrupts = <1 9>; + #address-cells = <1>; + #size-cells = <0>; }; v3d: v3d at 7ec00000 {
Signature · 1 line
1.8.3.1
PATCH v2 9/9 ARM: bcm2837: dt: Add the ethernet to the device trees
In reply to Gerd Hoffmann--- arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dts | 1 + 1 file changed, 1 insertion(+)
arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dts +1 -0
@@ -1,6 +1,7 @@ /dts-v1/; #include "bcm2837.dtsi" #include "../../../../arm/boot/dts/bcm2835-rpi.dtsi" +#include "../../../../arm/boot/dts/bcm283x-rpi-smsc9514.dtsi" / { compatible = "raspberrypi,3-model-b", "brcm,bcm2837";
Signature · 1 line
1.8.3.1
Arnd Bergmann
maintainerv2 cover raspberry pi 3 patch series, part 1: essentials
In reply to Gerd HoffmannQuoted 11 lines · CEST Gerd Hoffmann
Raspberry pi 3 patches, next round. I'll go split the longish patch series into smaller ones. I'll also go include the linux-arm-kernel list this time (note I'm subscribed to linux-rpi-kernel only so please take care to keep me in Cc). This is part one with just the essential stuff needed to get the rpi3 boot, without wifi support.
Changes:
* droppedARCH_BCMkconfig option.
* drop include hack for rpi3 device tree in arm.
* drop DMA offset patch, pick up the version from Alex instead.
Quoted 5 lines
Patches are also available from:
git://git.kraxel.org/linuxbcm2837-47-v2Note that the git branch has the complete set of patches (including device tree patches and rpi3 wifi).
Looks good overall, thanks for sending the more manageable series.
See individual replies for a couple of comments on details.
Arnd