* [PATCH v2 0/2] Add support for bcm2711 in vchiq_arm @ 2022-03-24 17:26 Adrien Thierry 2022-03-24 17:26 ` [PATCH v2 1/2] dt-bindings: soc: bcm: bcm2835-vchiq: Add support for bcm2711 Adrien Thierry ` (2 more replies) 0 siblings, 3 replies; 8+ messages in thread From: Adrien Thierry @ 2022-03-24 17:26 UTC (permalink / raw) To: linux-kernel Cc: Adrien Thierry, Rob Herring, Nicolas Saenz Julienne, Florian Fainelli, Ray Jui, Scott Branden, bcm-kernel-feedback-list, Stefan Wahren, devicetree, linux-rpi-kernel, linux-arm-kernel, Greg Kroah-Hartman, Gaston Gonzalez, Ojaswin Mujoo, linux-staging The goal of this patch series is to use the bcm2711 compatible string in vchiq_arm for the Raspberry Pi 4. This allows using the downstream device tree with the upstream kernel. --- Changes since v1: - Removed duplicate compatible string for bcm2711 in brcm,bcm2835-vchiq.yaml Adrien Thierry (2): dt-bindings: soc: bcm: bcm2835-vchiq: Add support for bcm2711 staging: vchiq_arm: Use bcm2711 compatible string for bcm2711-based RPi .../devicetree/bindings/soc/bcm/brcm,bcm2835-vchiq.yaml | 5 +++++ arch/arm/boot/dts/bcm2711-rpi.dtsi | 1 + .../staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 5 +++++ 3 files changed, 11 insertions(+) base-commit: ed4643521e6af8ab8ed1e467630a85884d2696cf -- 2.35.1 ^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v2 1/2] dt-bindings: soc: bcm: bcm2835-vchiq: Add support for bcm2711 2022-03-24 17:26 [PATCH v2 0/2] Add support for bcm2711 in vchiq_arm Adrien Thierry @ 2022-03-24 17:26 ` Adrien Thierry 2022-03-24 18:47 ` Krzysztof Kozlowski 2022-03-24 17:26 ` [PATCH v2 2/2] staging: vchiq_arm: Use bcm2711 compatible string for bcm2711-based RPi Adrien Thierry 2022-03-26 9:04 ` [PATCH v2 0/2] Add support for bcm2711 in vchiq_arm Stefan Wahren 2 siblings, 1 reply; 8+ messages in thread From: Adrien Thierry @ 2022-03-24 17:26 UTC (permalink / raw) To: linux-kernel Cc: Adrien Thierry, Rob Herring, Nicolas Saenz Julienne, Florian Fainelli, Ray Jui, Scott Branden, bcm-kernel-feedback-list, Stefan Wahren, devicetree, linux-rpi-kernel, linux-arm-kernel, Greg Kroah-Hartman, Gaston Gonzalez, Ojaswin Mujoo, linux-staging Add a new compatible string for BCM2711. This is the chip used on the Raspberry Pi 4. Signed-off-by: Adrien Thierry <athierry@redhat.com> --- Changes since v1: - Removed duplicate compatible string for bcm2711 .../devicetree/bindings/soc/bcm/brcm,bcm2835-vchiq.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-vchiq.yaml b/Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-vchiq.yaml index e04439b3355b..9cb957facae0 100644 --- a/Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-vchiq.yaml +++ b/Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-vchiq.yaml @@ -27,6 +27,11 @@ properties: - brcm,bcm2836-vchiq - const: brcm,bcm2835-vchiq + - description: BCM2711 based boards + items: + - enum: + - brcm,bcm2711-vchiq + reg: description: Physical base address and length of the doorbell register pair minItems: 1 -- 2.35.1 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH v2 1/2] dt-bindings: soc: bcm: bcm2835-vchiq: Add support for bcm2711 2022-03-24 17:26 ` [PATCH v2 1/2] dt-bindings: soc: bcm: bcm2835-vchiq: Add support for bcm2711 Adrien Thierry @ 2022-03-24 18:47 ` Krzysztof Kozlowski 2022-03-25 7:16 ` Krzysztof Kozlowski 0 siblings, 1 reply; 8+ messages in thread From: Krzysztof Kozlowski @ 2022-03-24 18:47 UTC (permalink / raw) To: Adrien Thierry, linux-kernel Cc: Rob Herring, Nicolas Saenz Julienne, Florian Fainelli, Ray Jui, Scott Branden, bcm-kernel-feedback-list, Stefan Wahren, devicetree, linux-rpi-kernel, linux-arm-kernel, Greg Kroah-Hartman, Gaston Gonzalez, Ojaswin Mujoo, linux-staging On 24/03/2022 18:26, Adrien Thierry wrote: > Add a new compatible string for BCM2711. This is the chip used on the > Raspberry Pi 4. > > Signed-off-by: Adrien Thierry <athierry@redhat.com> > --- > Changes since v1: > - Removed duplicate compatible string for bcm2711 > > .../devicetree/bindings/soc/bcm/brcm,bcm2835-vchiq.yaml | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-vchiq.yaml b/Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-vchiq.yaml > index e04439b3355b..9cb957facae0 100644 > --- a/Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-vchiq.yaml > +++ b/Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-vchiq.yaml > @@ -27,6 +27,11 @@ properties: > - brcm,bcm2836-vchiq > - const: brcm,bcm2835-vchiq > > + - description: BCM2711 based boards > + items: > + - enum: > + - brcm,bcm2711-vchiq This oneOf here - just to add description which is copy-paste of compatible - does not make sense. It should be just enum with compatibles. At least for 2711 and 2835 (and put them in alphabetical order). Best regards, Krzysztof ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2 1/2] dt-bindings: soc: bcm: bcm2835-vchiq: Add support for bcm2711 2022-03-24 18:47 ` Krzysztof Kozlowski @ 2022-03-25 7:16 ` Krzysztof Kozlowski 0 siblings, 0 replies; 8+ messages in thread From: Krzysztof Kozlowski @ 2022-03-25 7:16 UTC (permalink / raw) To: Adrien Thierry, linux-kernel Cc: Rob Herring, Nicolas Saenz Julienne, Florian Fainelli, Ray Jui, Scott Branden, bcm-kernel-feedback-list, Stefan Wahren, devicetree, linux-rpi-kernel, linux-arm-kernel, Greg Kroah-Hartman, Gaston Gonzalez, Ojaswin Mujoo, linux-staging On 24/03/2022 19:47, Krzysztof Kozlowski wrote: > On 24/03/2022 18:26, Adrien Thierry wrote: >> Add a new compatible string for BCM2711. This is the chip used on the >> Raspberry Pi 4. >> >> Signed-off-by: Adrien Thierry <athierry@redhat.com> >> --- >> Changes since v1: >> - Removed duplicate compatible string for bcm2711 >> >> .../devicetree/bindings/soc/bcm/brcm,bcm2835-vchiq.yaml | 5 +++++ >> 1 file changed, 5 insertions(+) >> >> diff --git a/Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-vchiq.yaml b/Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-vchiq.yaml >> index e04439b3355b..9cb957facae0 100644 >> --- a/Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-vchiq.yaml >> +++ b/Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-vchiq.yaml >> @@ -27,6 +27,11 @@ properties: >> - brcm,bcm2836-vchiq >> - const: brcm,bcm2835-vchiq >> >> + - description: BCM2711 based boards >> + items: >> + - enum: >> + - brcm,bcm2711-vchiq > > This oneOf here - just to add description which is copy-paste of > compatible - does not make sense. It should be just enum with > compatibles. At least for 2711 and 2835 (and put them in alphabetical > order). Actually, judging by your driver and DTS, it seems that this should be list of items bcm2711 followed by bcm2836. Best regards, Krzysztof ^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v2 2/2] staging: vchiq_arm: Use bcm2711 compatible string for bcm2711-based RPi 2022-03-24 17:26 [PATCH v2 0/2] Add support for bcm2711 in vchiq_arm Adrien Thierry 2022-03-24 17:26 ` [PATCH v2 1/2] dt-bindings: soc: bcm: bcm2835-vchiq: Add support for bcm2711 Adrien Thierry @ 2022-03-24 17:26 ` Adrien Thierry 2022-03-24 18:49 ` Krzysztof Kozlowski 2022-03-26 9:04 ` [PATCH v2 0/2] Add support for bcm2711 in vchiq_arm Stefan Wahren 2 siblings, 1 reply; 8+ messages in thread From: Adrien Thierry @ 2022-03-24 17:26 UTC (permalink / raw) To: linux-kernel Cc: Adrien Thierry, Rob Herring, Nicolas Saenz Julienne, Florian Fainelli, Ray Jui, Scott Branden, bcm-kernel-feedback-list, Stefan Wahren, devicetree, linux-rpi-kernel, linux-arm-kernel, Greg Kroah-Hartman, Gaston Gonzalez, Ojaswin Mujoo, linux-staging Use bcm2711 compatible string in vchiq driver and device tree for bcm2711-based Raspberry Pi (Raspberry Pi 4). This is consistent with what the downstream device tree uses, and allows running the vchiq driver on the upstream kernel with the downstream device tree. Signed-off-by: Adrien Thierry <athierry@redhat.com> --- arch/arm/boot/dts/bcm2711-rpi.dtsi | 1 + .../staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/arch/arm/boot/dts/bcm2711-rpi.dtsi b/arch/arm/boot/dts/bcm2711-rpi.dtsi index ca266c5d9f9b..c868d1dcaba7 100644 --- a/arch/arm/boot/dts/bcm2711-rpi.dtsi +++ b/arch/arm/boot/dts/bcm2711-rpi.dtsi @@ -70,5 +70,6 @@ blconfig: nvram@0 { }; &vchiq { + compatible = "brcm,bcm2711-vchiq"; interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>; }; diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c index 3a2e4582db8e..136c664132f4 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c @@ -81,6 +81,10 @@ static struct vchiq_drvdata bcm2836_drvdata = { .cache_line_size = 64, }; +static struct vchiq_drvdata bcm2711_drvdata = { + .cache_line_size = 64, +}; + struct vchiq_arm_state { /* Keepalive-related data */ struct task_struct *ka_thread; @@ -1748,6 +1752,7 @@ void vchiq_platform_conn_state_changed(struct vchiq_state *state, static const struct of_device_id vchiq_of_match[] = { { .compatible = "brcm,bcm2835-vchiq", .data = &bcm2835_drvdata }, { .compatible = "brcm,bcm2836-vchiq", .data = &bcm2836_drvdata }, + { .compatible = "brcm,bcm2711-vchiq", .data = &bcm2711_drvdata }, {}, }; MODULE_DEVICE_TABLE(of, vchiq_of_match); -- 2.35.1 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH v2 2/2] staging: vchiq_arm: Use bcm2711 compatible string for bcm2711-based RPi 2022-03-24 17:26 ` [PATCH v2 2/2] staging: vchiq_arm: Use bcm2711 compatible string for bcm2711-based RPi Adrien Thierry @ 2022-03-24 18:49 ` Krzysztof Kozlowski 0 siblings, 0 replies; 8+ messages in thread From: Krzysztof Kozlowski @ 2022-03-24 18:49 UTC (permalink / raw) To: Adrien Thierry, linux-kernel Cc: Rob Herring, Nicolas Saenz Julienne, Florian Fainelli, Ray Jui, Scott Branden, bcm-kernel-feedback-list, Stefan Wahren, devicetree, linux-rpi-kernel, linux-arm-kernel, Greg Kroah-Hartman, Gaston Gonzalez, Ojaswin Mujoo, linux-staging On 24/03/2022 18:26, Adrien Thierry wrote: > Use bcm2711 compatible string in vchiq driver and device tree for > bcm2711-based Raspberry Pi (Raspberry Pi 4). This is consistent with > what the downstream device tree uses, and allows running the vchiq > driver on the upstream kernel with the downstream device tree. > > Signed-off-by: Adrien Thierry <athierry@redhat.com> > --- > arch/arm/boot/dts/bcm2711-rpi.dtsi | 1 + DTS is always separate, independent of device drivers. If you mix them, it's usually a sign of ABI breakage or compatibility issues, so don't mix them. > .../staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 5 +++++ > 2 files changed, 6 insertions(+) > > diff --git a/arch/arm/boot/dts/bcm2711-rpi.dtsi b/arch/arm/boot/dts/bcm2711-rpi.dtsi > index ca266c5d9f9b..c868d1dcaba7 100644 > --- a/arch/arm/boot/dts/bcm2711-rpi.dtsi > +++ b/arch/arm/boot/dts/bcm2711-rpi.dtsi > @@ -70,5 +70,6 @@ blconfig: nvram@0 { > }; > > &vchiq { > + compatible = "brcm,bcm2711-vchiq"; This looks weird. Is BCM2711 on Raspberry Pi 4 different than other BCM2711? Commit msg also does not explain this. > interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>; > }; > diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c > index 3a2e4582db8e..136c664132f4 100644 > --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c > +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c > @@ -81,6 +81,10 @@ static struct vchiq_drvdata bcm2836_drvdata = { > .cache_line_size = 64, > }; > > +static struct vchiq_drvdata bcm2711_drvdata = { > + .cache_line_size = 64, > +}; > + > struct vchiq_arm_state { > /* Keepalive-related data */ > struct task_struct *ka_thread; > @@ -1748,6 +1752,7 @@ void vchiq_platform_conn_state_changed(struct vchiq_state *state, > static const struct of_device_id vchiq_of_match[] = { > { .compatible = "brcm,bcm2835-vchiq", .data = &bcm2835_drvdata }, > { .compatible = "brcm,bcm2836-vchiq", .data = &bcm2836_drvdata }, > + { .compatible = "brcm,bcm2711-vchiq", .data = &bcm2711_drvdata }, Just re-use bcm2836_drvdata instead of duplicating it. > {}, > }; > MODULE_DEVICE_TABLE(of, vchiq_of_match); Best regards, Krzysztof ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2 0/2] Add support for bcm2711 in vchiq_arm 2022-03-24 17:26 [PATCH v2 0/2] Add support for bcm2711 in vchiq_arm Adrien Thierry 2022-03-24 17:26 ` [PATCH v2 1/2] dt-bindings: soc: bcm: bcm2835-vchiq: Add support for bcm2711 Adrien Thierry 2022-03-24 17:26 ` [PATCH v2 2/2] staging: vchiq_arm: Use bcm2711 compatible string for bcm2711-based RPi Adrien Thierry @ 2022-03-26 9:04 ` Stefan Wahren 2022-04-07 14:03 ` Adrien Thierry 2 siblings, 1 reply; 8+ messages in thread From: Stefan Wahren @ 2022-03-26 9:04 UTC (permalink / raw) To: Adrien Thierry, linux-kernel Cc: Rob Herring, Nicolas Saenz Julienne, Florian Fainelli, Ray Jui, Scott Branden, bcm-kernel-feedback-list, devicetree, linux-rpi-kernel, linux-arm-kernel, Greg Kroah-Hartman, Gaston Gonzalez, Ojaswin Mujoo, linux-staging, Krzysztof Kozlowski Hi Adrien, Am 24.03.22 um 18:26 schrieb Adrien Thierry: > The goal of this patch series is to use the bcm2711 compatible string in > vchiq_arm for the Raspberry Pi 4. there was already a patch series to enable VCHIQ on BCM2711, which wasn't accepted: https://lore.kernel.org/linux-arm-kernel/20211014223230.451659-1-mguma@redhat.com/T/ Could you please explain your approach, especially leaving out 36 bit DMA support? > This allows using the downstream device > tree with the upstream kernel. This is a really bad idea and caused a lot of trouble in the past. A lot of the issues in the Fedora or Arch Linux forums or mailing lists results from this idea. It wastes the time of the kernel developer since these DT files has never been reviewed by the devicetree maintainers. Best regards > > --- > Changes since v1: > - Removed duplicate compatible string for bcm2711 in > brcm,bcm2835-vchiq.yaml > > Adrien Thierry (2): > dt-bindings: soc: bcm: bcm2835-vchiq: Add support for bcm2711 > staging: vchiq_arm: Use bcm2711 compatible string for bcm2711-based > RPi > > .../devicetree/bindings/soc/bcm/brcm,bcm2835-vchiq.yaml | 5 +++++ > arch/arm/boot/dts/bcm2711-rpi.dtsi | 1 + > .../staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 5 +++++ > 3 files changed, 11 insertions(+) > > > base-commit: ed4643521e6af8ab8ed1e467630a85884d2696cf ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2 0/2] Add support for bcm2711 in vchiq_arm 2022-03-26 9:04 ` [PATCH v2 0/2] Add support for bcm2711 in vchiq_arm Stefan Wahren @ 2022-04-07 14:03 ` Adrien Thierry 0 siblings, 0 replies; 8+ messages in thread From: Adrien Thierry @ 2022-04-07 14:03 UTC (permalink / raw) To: Stefan Wahren Cc: linux-kernel, Rob Herring, Nicolas Saenz Julienne, Florian Fainelli, Ray Jui, Scott Branden, bcm-kernel-feedback-list, devicetree, linux-rpi-kernel, linux-arm-kernel, Greg Kroah-Hartman, Gaston Gonzalez, Ojaswin Mujoo, linux-staging, Krzysztof Kozlowski Hi Stefan, Thanks for your feedback. > Could you please explain your approach, especially leaving out 36 bit > DMA support? I realize I overlooked this 36 bit DMA support issue, I need to think it through a little bit more. > This is a really bad idea and caused a lot of trouble in the past. A lot > of the issues in the Fedora or Arch Linux forums or mailing lists > results from this idea. It wastes the time of the kernel developer since > these DT files has never been reviewed by the devicetree maintainers. I understand, thanks! I find the downstream dtbs convenient because of the overlay system that allows you to easily enable certain drivers, but I get your point. Best regards, Adrien ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2022-04-07 14:04 UTC | newest] Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2022-03-24 17:26 [PATCH v2 0/2] Add support for bcm2711 in vchiq_arm Adrien Thierry 2022-03-24 17:26 ` [PATCH v2 1/2] dt-bindings: soc: bcm: bcm2835-vchiq: Add support for bcm2711 Adrien Thierry 2022-03-24 18:47 ` Krzysztof Kozlowski 2022-03-25 7:16 ` Krzysztof Kozlowski 2022-03-24 17:26 ` [PATCH v2 2/2] staging: vchiq_arm: Use bcm2711 compatible string for bcm2711-based RPi Adrien Thierry 2022-03-24 18:49 ` Krzysztof Kozlowski 2022-03-26 9:04 ` [PATCH v2 0/2] Add support for bcm2711 in vchiq_arm Stefan Wahren 2022-04-07 14:03 ` Adrien Thierry
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).