From patchwork Sun Feb 13 22:56:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Robinson X-Patchwork-Id: 12744718 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 769F7C433F5 for ; Sun, 13 Feb 2022 22:58:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=5pcl4Mv6holJ48Hx9bqpaFGyFqpepgaHRQnyKJ1NfDc=; b=SyzjZJKaEDUUf2 bJPdRQST7noXLmuLJ0lln//l1ABjpl/y1FTn37E1mUa/GkBZoRMqXSdv+VhonKlIkFO+3Bi0HwFFb 9OwOdMU7EIVcEqZQu4e1IlrXfv9NjwJRMzfzumMALub28l5Cl0q8Nsg2wADr6AgUha0shYX7aCK0N nnD+ae2gKtr6SEh8okke5/4l2GKnq/7BgKCkCRMSzPS3bdHKraYC9hwhNGTX+wUoJB7SeCUrXOZ21 AGRBX3F4ROP/JUm9CNfEjIOxWpyh2kZAEIWdsEKFZUuAGwaCTggsX+LWbIJl0VKm1LXYHxuo7jMmy 2liNBqA2LuoS5EZwT9SQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nJNny-00ChwP-0i; Sun, 13 Feb 2022 22:57:18 +0000 Received: from mail-ej1-x635.google.com ([2a00:1450:4864:20::635]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nJNnu-00Chv8-4h; Sun, 13 Feb 2022 22:57:15 +0000 Received: by mail-ej1-x635.google.com with SMTP id j13so3559685ejk.1; Sun, 13 Feb 2022 14:57:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ahBDyKkGJoSJ9jy1/Vj2IXHjIDBehskfpXYYu5ne7vU=; b=RxnCgmQZIKQWFYVlJZVQ+cGxcP9rIZeKTyuPRgMWIQIMm1KrSZPF5HVu2+yH6VGqnN ErJasVTgl6jDerxHNEVbqXce6jRh1Ei7RcpMyzAHlfQVMEZQFuEAVsYAlDQiFtaruupQ jvLh448n2Zvq5erF8AOIrTHxUzVdGV9ieymiKPBbq2J2brGWkDVPxg6g4mfc1l4jclhr 4AbKRVWi6CxwLJ0hmblfOcFlPrCFG64eg2uVA+z3qMOhlG80GUh2PVvmKWkZRp+1xjyh p4KsHXu6v97TrfGlpHF/C3fgR7/4ljetRUfYX+EVlRhBAFkluQDJULO1RGNUnsiL0g9p 7rHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ahBDyKkGJoSJ9jy1/Vj2IXHjIDBehskfpXYYu5ne7vU=; b=m6dNzQd6T97bJSCILL5Mz0bhJcjL3lzErTkiKkMKo2vKzvTjy77FGdjjpp2mHSmA+P wFgwNSacAhdjgZ5xI/4C2FiRkidxeJ1o+q80gECsx0rEyRPm/dMsea1+G1mMxl9Z6L2H f2mvDSB5uphKYB4DsGIbEL7fMqswK2v6xKUnb/AIatUT7fAm54THFuyVbcFadUCqpfLw QJ4JAzkNO7sDZXoHjWFP+bbbrb7OSfMqOMDaTmimYGo9IqiAh3mIcfA8DWCN4Q1oyvtR QX8J2A9BTBbFfrd0qPHCwNu/PcNEHNPaydQh/aDYCzs8YwpG1U29fJ7uF2ap91K2b5Qt fxfQ== X-Gm-Message-State: AOAM531uxFnetr9NbLl0Js4erGmr11Q7C1OIduZQMcsagIHVaL459E2s VxtpvHAfxC4/+rkI3gn6U+g= X-Google-Smtp-Source: ABdhPJz2d8LI21xyitZK7B6KH0Wz5LvgdzcmMofSUlguJMCTkwb8L/68peXUZSDz3Zq894i/B/wvVw== X-Received: by 2002:a17:906:51ce:: with SMTP id v14mr4887824ejk.424.1644793028454; Sun, 13 Feb 2022 14:57:08 -0800 (PST) Received: from morpheus.home.roving-it.com (3.e.2.0.0.0.0.0.0.0.0.0.0.0.0.0.1.8.6.2.1.1.b.f.0.b.8.0.1.0.0.2.ip6.arpa. [2001:8b0:fb11:2681::2e3]) by smtp.googlemail.com with ESMTPSA id g14sm3189163edb.55.2022.02.13.14.57.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 13 Feb 2022 14:57:08 -0800 (PST) From: Peter Robinson To: Nicolas Saenz Julienne , Rob Herring , Florian Fainelli , Ray Jui , Scott Branden , bcm-kernel-feedback-list@broadcom.com, devicetree@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Lee Jones , Emma Anholt , David Airlie , Daniel Vetter , Russell King , Arnd Bergmann , Catalin Marinas , Will Deacon Cc: Peter Robinson Subject: [PATCH v4 00/15] Raspberry PI 4 V3D enablement Date: Sun, 13 Feb 2022 22:56:31 +0000 Message-Id: <20220213225646.67761-1-pbrobinson@gmail.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220213_145714_196133_D850F705 X-CRM114-Status: GOOD ( 15.58 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This is purely a rebased of Nicolas's v3 patch set from around a year ago. I've tested this using mesa 21.3.x and Wayland/Gnome on Fedora 35, it's more or less stable with basic testing. From his original cover letter: 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 #9 ("soc: bcm: bcm2835-power: Bypass power_on/off() calls"), 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 #11 ("drm/v3d: Get rid of pm code") --- Changes since v3: - Rebase to 5.17-rc1 Changes since v2: - Correct ASB names - Address dt-binding comments Changes since v1: - Use 'reg-names' - Correct ASB names - Add missing binding patch for V3D - Address Stefan's comments Nicolas Saenz Julienne (11): dt-bindings: soc: bcm: bcm2835-pm: Convert bindings to DT schema dt-bindings: soc: bcm: bcm2835-pm: Introduce reg-names dt-bindings: soc: bcm: bcm2835-pm: Add support for bcm2711 ARM: dts: bcm2835/bcm2711: Introduce reg-names in watchdog node ARM: dts: bcm2711: Use proper compatible in PM/Watchdog node mfd: bcm2835-pm: Use 'reg-names' to get resources mfd: bcm2835-pm: Add support for BCM2711 soc: bcm: bcm2835-power: Add support for BCM2711's RPiVid ASB soc: bcm: bcm2835-power: Bypass power_on/off() calls dt-bindings: gpu: v3d: Add BCM2711's compatible arm64: config: Enable DRM_V3D Peter Robinson (4): drm/v3d: Get rid of pm code drm/v3d: Add support for bcm2711 ARM: dts: bcm2711: Enable V3D ARM: configs: Enable DRM_V3D .../devicetree/bindings/gpu/brcm,bcm-v3d.yaml | 1 + .../bindings/soc/bcm/brcm,bcm2835-pm.txt | 46 ---------- .../bindings/soc/bcm/brcm,bcm2835-pm.yaml | 87 +++++++++++++++++++ arch/arm/boot/dts/bcm2711.dtsi | 15 +++- arch/arm/boot/dts/bcm2835-common.dtsi | 1 + 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 | 12 +-- drivers/mfd/bcm2835-pm.c | 80 ++++++++++++----- drivers/soc/bcm/bcm2835-power.c | 74 ++++++++++------ include/linux/mfd/bcm2835-pm.h | 1 + 14 files changed, 218 insertions(+), 133 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