mbox series

[RFC/PATCH,00/11] Raspberry PI 4 V3D enablement

Message ID 20210205135249.2924-1-nsaenzjulienne@suse.de
Headers show
Series Raspberry PI 4 V3D enablement | expand

Message

Nicolas Saenz Julienne Feb. 5, 2021, 1:52 p.m. UTC
This series attempts to enable V3D on BCM2711, the SoC available on the
Raspberry Pi 4 family of boards.

Due to the lack of documentation some things are taken as it from
testing/downstream implementation[1], which I'm hilighting here:

- It's not clear that the following is 100% true, maybe someone can confirm:

	"In BCM2711 the new ARGON ASB took over V3D. The old ASB is still
	present with the ISP and H264 bits, and V3D is in the same place in the
	new ASB as the old one."

- Patch #6 I took as is from the downstream implementation, I can't really
  provide an exact explanation on what changed HW wise.

Ultimately, I need confirmation from the Broadcom folks that they are alright
with patch #7.

With all this, I get a more or less stable experience using mesa 20.3.4 and
X11/Gnome.

Regards,
Nicolas

---

Nicolas Saenz Julienne (11):
  dt-bindings: soc: bcm: bcm2835-pm: Convert bindings to DT schema
  dt-bindings: soc: bcm: brcm,bcm2835-pm: Add support for bcm2711
  ARM: dts: bcm2711: Use proper compatible in PM/Watchdog node
  mfd: bcm2835-pm: Add support for BCM2711
  soc: bcm: bcm2835-power: Add support for BCM2711's ARSAN ASB
  soc: bcm: bcm2835-power: Bypass power_on/off() calls
  drm/v3d: Get rid of pm code
  drm/v3d: Add support for bcm2711
  ARM: dts: bcm2711: Enable V3D
  ARM: configs: Enable DRM_V3D
  arm64: config: Enable DRM_V3D

 .../bindings/soc/bcm/brcm,bcm2835-pm.txt      | 46 -----------
 .../bindings/soc/bcm/brcm,bcm2835-pm.yaml     | 80 +++++++++++++++++++
 arch/arm/boot/dts/bcm2711.dtsi                | 14 +++-
 arch/arm/configs/multi_v7_defconfig           |  1 +
 arch/arm64/configs/defconfig                  |  1 +
 drivers/gpu/drm/v3d/Kconfig                   |  2 +-
 drivers/gpu/drm/v3d/v3d_debugfs.c             | 18 +----
 drivers/gpu/drm/v3d/v3d_drv.c                 | 12 +--
 drivers/gpu/drm/v3d/v3d_gem.c                 |  9 ---
 drivers/mfd/bcm2835-pm.c                      | 55 ++++++++++---
 drivers/soc/bcm/bcm2835-power.c               | 74 +++++++++++------
 include/linux/mfd/bcm2835-pm.h                |  1 +
 12 files changed, 190 insertions(+), 123 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-pm.txt
 create mode 100644 Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-pm.yaml

Comments

Stefan Wahren Feb. 6, 2021, 11:50 a.m. UTC | #1
Hi,

Am 05.02.21 um 14:52 schrieb Nicolas Saenz Julienne:
> This enables V3D for bcm2711 (used in the Raspberry Pi 4).
>
> Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
> ---
>  arch/arm/boot/dts/bcm2711.dtsi | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
>
> diff --git a/arch/arm/boot/dts/bcm2711.dtsi b/arch/arm/boot/dts/bcm2711.dtsi
> index 537498a93a3a..dd8376f474db 100644
> --- a/arch/arm/boot/dts/bcm2711.dtsi
> +++ b/arch/arm/boot/dts/bcm2711.dtsi
> @@ -548,6 +548,18 @@ genet_mdio: mdio@e14 {
>  				#size-cells = <0x1>;
>  			};
>  		};
> +
> +		v3d: gpu@7ec04000 {
just a nit. I prefer the lowest register value here.
> +			compatible = "brcm,bcm2711-v3d";
> +			reg = <0x0 0x7ec00000 0x4000>,
> +			      <0x0 0x7ec04000 0x4000>;
> +			reg-names = "hub", "core0";
> +
> +			power-domains = <&pm BCM2835_POWER_DOMAIN_GRAFX_V3D>;
> +			resets = <&pm BCM2835_RESET_V3D>;
> +			clocks = <&firmware_clocks 5>;
> +			interrupts = <GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH>;
> +		};
>  	};
>  };
>