From patchwork Sun Feb 13 22:56:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Robinson X-Patchwork-Id: 542428 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9A4ACC433F5 for ; Sun, 13 Feb 2022 22:58:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238658AbiBMW6K (ORCPT ); Sun, 13 Feb 2022 17:58:10 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:60172 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231864AbiBMW6J (ORCPT ); Sun, 13 Feb 2022 17:58:09 -0500 Received: from mail-ed1-x536.google.com (mail-ed1-x536.google.com [IPv6:2a00:1450:4864:20::536]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B25DB54BE0 for ; Sun, 13 Feb 2022 14:58:03 -0800 (PST) Received: by mail-ed1-x536.google.com with SMTP id b14so95705ede.9 for ; Sun, 13 Feb 2022 14:58:03 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=Jkh/ZThBVxR3iCrqSQ641kQC+DxWzCqRmSFjFdd592M=; b=KLPTt8yhHW7LK5Bz9+nth65FJde0niGbdiuZgNTkesIzbg9w/2D6Xio4Zvj+1yvlzP pr2UMTgNr4VzC7XtfhGBrQMtP8Wl+WXscQwZlqAbexPpgUREs2jHP0smWqz9KBonBTc7 lf0y2t2vK1dbS0GPw7Hpqzt2LWPv6e++Mnoa0CGpL2K9P2RnJLVUGSL40XDG01Ykfbbw CIx2XV46XjobKeg+Tx82fFiFw5uyGBeWXY5P2HsuIpOwA5ToiWqznC6ucaYU6gNdsLEG 2VB9RhuyHAmH7SvD1nWNmd5t4W8wlAyRMwpQUZ6nSkTtEZKLJsE9EbgFClQLKpikwePE N7oQ== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=Jkh/ZThBVxR3iCrqSQ641kQC+DxWzCqRmSFjFdd592M=; b=iC+HqJPkP8clL5ps+D3PeYosJ+m0OI91tiRpmPVquAdE3idB7XSVY1Lm3GKfneJpPx CfVxzKuORt9bPkqSc0VKmiIdIl3P3Fp1jN3I2FV+3zFb/zgNMy6q1alu1WI6shPhHKCL HNT+OirFDZsmsR6WU1eOxpkcfd/3UJa2cRIsib66wx0D0pEpzwpaN2NBkyLlgTkq302D uusV/0/kWC+gwpV7/79ZPUx4AXje0QGEZl3Vs5Z+EyCtgLijArVUG7Jhs9epbQg9xJ1x +4R+XOXod9W7vtSJxpeY64H2zhEY7ceZ1uR0Jv+6ZxKjAlvPm01+ENPdOuFpfqrW46bN V14w== X-Gm-Message-State: AOAM530sLkC2l9C4gI/HLvWYBtCJ47BcCBF9KCA947XUI/SEqULjUBV+ r8kRnjYLnkAwmf/gI06DZak= X-Google-Smtp-Source: ABdhPJwD3CmtM9qOTOKVh2wft4puLi9UOAVBT0IZACYp8gl4G7AUK2brppfMcwdW4SJS2IYJp/qV9A== X-Received: by 2002:aa7:c3cb:: with SMTP id l11mr4703839edr.427.1644793082291; Sun, 13 Feb 2022 14:58:02 -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.58.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 13 Feb 2022 14:58:01 -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: Nicolas Saenz Julienne , Rob Herring , Peter Robinson Subject: [PATCH v4 03/15] dt-bindings: soc: bcm: bcm2835-pm: Add support for bcm2711 Date: Sun, 13 Feb 2022 22:56:35 +0000 Message-Id: <20220213225646.67761-4-pbrobinson@gmail.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220213225646.67761-1-pbrobinson@gmail.com> References: <20220213225646.67761-1-pbrobinson@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Nicolas Saenz Julienne Add a new compatible string for BCM2711 and the option to provide a third reg property for the board's new RPiVid ASB. In BCM2711 the new RPiVid ASB took over V3D, which is our only consumer of this driver so far. The old ASB is still be present with ISP and H264 bits but no V3D. Signed-off-by: Nicolas Saenz Julienne Reviewed-by: Rob Herring Signed-off-by: Peter Robinson --- Changes since v2: - Correct names s/argon/rpivid/ .../devicetree/bindings/soc/bcm/brcm,bcm2835-pm.yaml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-pm.yaml b/Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-pm.yaml index 837963e9f219..0dd264f80fb3 100644 --- a/Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-pm.yaml +++ b/Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-pm.yaml @@ -19,19 +19,22 @@ allOf: properties: compatible: items: - - const: brcm,bcm2835-pm + - enum: + - brcm,bcm2835-pm + - brcm,bcm2711-pm - const: brcm,bcm2835-pm-wdt reg: minItems: 1 - maxItems: 2 + maxItems: 3 reg-names: minItems: 1 - maxItems: 2 + maxItems: 3 items: - const: pm - const: asb + - const: rpivid_asb "#power-domain-cells": const: 1 @@ -74,7 +77,7 @@ examples: #reset-cells = <1>; reg = <0x7e100000 0x114>, <0x7e00a000 0x24>; - reg-names = "pm", "asb"; + reg-names = "pm", "asb", "rpivid_asb"; clocks = <&clocks BCM2835_CLOCK_V3D>, <&clocks BCM2835_CLOCK_PERI_IMAGE>, <&clocks BCM2835_CLOCK_H264>, From patchwork Sun Feb 13 22:56:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Robinson X-Patchwork-Id: 542427 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id AB02AC433EF for ; Sun, 13 Feb 2022 22:58:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238655AbiBMW6M (ORCPT ); Sun, 13 Feb 2022 17:58:12 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:60202 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238664AbiBMW6L (ORCPT ); Sun, 13 Feb 2022 17:58:11 -0500 Received: from mail-ed1-x52d.google.com (mail-ed1-x52d.google.com [IPv6:2a00:1450:4864:20::52d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D017154BE0 for ; Sun, 13 Feb 2022 14:58:04 -0800 (PST) Received: by mail-ed1-x52d.google.com with SMTP id f17so24630486edd.2 for ; Sun, 13 Feb 2022 14:58:04 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=ho+AJyfUs2ysXgAUMwBRYPkfVfqL9SW0bkmswW8ndZ8=; b=grAOz/ubmR4hw8v/W3sXnNe3HYLPeXGgB3X6Zxb/KVAaJwDombdv/wvJt/rfkRsgv5 nhjR36Jq2bqW6qQnIi0vbWI3gUlJsOEd0D5bkkAu85FaUcEy9lWDLr5540ifjehV3vK7 0DPdqFLflJY0Kn8AZ8maUeBTFUe49Ev+anlgRygJ8u2QVr0fXXoOBNNZzj2MKGU2Xq2o eFHMgloz8i63MCoGLUTjKZdY1DxMe5I2HvfcBu943xOaDkAonyt0QW8lYMVT7x0cb5iw tao16BwPXmdlvqsb/xXR9+TkHPYqKzLHwj9wGT6FnPF5mykX7ubS4M5A/F/JqmFNOAu8 uF0w== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=ho+AJyfUs2ysXgAUMwBRYPkfVfqL9SW0bkmswW8ndZ8=; b=GTi6NjjKlO6nTIrZnqZz+JGPt81qqM7IKqWM9KH+l1ZzXIFvXgcGU7pvrpy0f4VfwI LtezMxPzKLjQCDRHHNUA1IKtZ1VCrf2rLgoDSXC7uoI7DGu8539qDhHsPFSssUYJMFqZ MDkxDu4SpDqypGX5nE28pxhEt0HdWiQBFqOtHzGfkSBEe/ryUbhEZ8Nykof0CEh2N+he r9Kt5NVN+NYjEq+xH7dubQHEIYISvuaGhFVepeMs/hpfecRC8dtf2qKeP6Klzy1nAZza CL/sdoo7VWra/loP/tgh4t4S88VL/qHc+2Mz6Juf4gvcub9T7pnPAta8pSsmM1odBEem EMuA== X-Gm-Message-State: AOAM533ME6wMnwLYK/r9/6qKqxp2SHTQn+m+M4pi1qkepK2D/6Ix02Ax LKOcZ4VuuTG8JOsolf7RbtY= X-Google-Smtp-Source: ABdhPJys+vngxbmlzUjD/f2kkNzlDACXA/vcUUBP7eLLHdDmp3/wk7atJsgDHhh3LNnlwfkC6jaz/A== X-Received: by 2002:a05:6402:3687:: with SMTP id ej7mr12770891edb.335.1644793083382; Sun, 13 Feb 2022 14:58:03 -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.58.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 13 Feb 2022 14:58:02 -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: Nicolas Saenz Julienne , Peter Robinson Subject: [PATCH v4 04/15] ARM: dts: bcm2835/bcm2711: Introduce reg-names in watchdog node Date: Sun, 13 Feb 2022 22:56:36 +0000 Message-Id: <20220213225646.67761-5-pbrobinson@gmail.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220213225646.67761-1-pbrobinson@gmail.com> References: <20220213225646.67761-1-pbrobinson@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Nicolas Saenz Julienne bcm2835-pm's bindings now support explicitly setting 'reg-names,' so use them. Signed-off-by: Nicolas Saenz Julienne Signed-off-by: Peter Robinson --- arch/arm/boot/dts/bcm2711.dtsi | 1 + arch/arm/boot/dts/bcm2835-common.dtsi | 1 + 2 files changed, 2 insertions(+) diff --git a/arch/arm/boot/dts/bcm2711.dtsi b/arch/arm/boot/dts/bcm2711.dtsi index dff18fc9a906..338fd91ec209 100644 --- a/arch/arm/boot/dts/bcm2711.dtsi +++ b/arch/arm/boot/dts/bcm2711.dtsi @@ -113,6 +113,7 @@ pm: watchdog@7e100000 { reg = <0x7e100000 0x114>, <0x7e00a000 0x24>, <0x7ec11000 0x20>; + reg-names = "pm", "asb", "rpivid_asb"; clocks = <&clocks BCM2835_CLOCK_V3D>, <&clocks BCM2835_CLOCK_PERI_IMAGE>, <&clocks BCM2835_CLOCK_H264>, diff --git a/arch/arm/boot/dts/bcm2835-common.dtsi b/arch/arm/boot/dts/bcm2835-common.dtsi index c25e797b9060..a037d2bc5b11 100644 --- a/arch/arm/boot/dts/bcm2835-common.dtsi +++ b/arch/arm/boot/dts/bcm2835-common.dtsi @@ -62,6 +62,7 @@ pm: watchdog@7e100000 { #reset-cells = <1>; reg = <0x7e100000 0x114>, <0x7e00a000 0x24>; + reg-names = "pm", "asb"; clocks = <&clocks BCM2835_CLOCK_V3D>, <&clocks BCM2835_CLOCK_PERI_IMAGE>, <&clocks BCM2835_CLOCK_H264>, From patchwork Sun Feb 13 22:56:38 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Robinson X-Patchwork-Id: 542426 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9CFACC433F5 for ; Sun, 13 Feb 2022 22:58:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238692AbiBMW6P (ORCPT ); Sun, 13 Feb 2022 17:58:15 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:60234 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238693AbiBMW6N (ORCPT ); Sun, 13 Feb 2022 17:58:13 -0500 Received: from mail-ed1-x532.google.com (mail-ed1-x532.google.com [IPv6:2a00:1450:4864:20::532]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E32E754BE0 for ; Sun, 13 Feb 2022 14:58:06 -0800 (PST) Received: by mail-ed1-x532.google.com with SMTP id co28so24588212edb.1 for ; Sun, 13 Feb 2022 14:58:06 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=+88MzjtKS6j33NfAKjT3ZitqU5pJbrVp5tu84yNOBq8=; b=b7REtzY/JvhBJbXT0D8NzJcn4SOWmJeDBABbRL+qh81EYjhvpor1acp5gx6VaWzpBc MA0gXh6UpiLtlnJM7Q2oULI8CXPuW3hDGWweJ7TmlaQAiOdt+NRoAHf6t/qFd1dEKiFh xe8UqM5PBIgHMVgvIa97DfxxQpGC5weN7KD0ExPnP3mKvHkOYYhKVCFNVVajWNI3z6sL GAfJLwGoZPqSPG5EhXXP9l5sDWEZTNgCTom4RJshogG1egcxRL/oYqvmFqV4D5TssDms clPVC7ycCGSjp9BH4tTDTyNUp1z+yEY7c5zaHhJ9EX0TZjFVESXHT/n+1H3oFKKGoRQ4 42tg== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=+88MzjtKS6j33NfAKjT3ZitqU5pJbrVp5tu84yNOBq8=; b=kgQ5ppXrEeA9p6BDMMBpzk//6xJhK7yCCCXPcejaeCz2LcZ6hoYXZ4Gh37uXZGk6Kr jwGHM/OhWYhudqgt8nTGiLTi+P8eH0vB/c7vTsE/FrUCaEa6meLzfOPM6vvsMLiuEQVy qZRMow6t3IEav7MzauMbvsQkCEnIw41fh886ofBkiU5+1FlRnnsZLdM2fbM58IUPC2s3 I/VRKexxZUYvR4+iATwe0l79zy0XRsPxfZt8IlvV1fMCAEjugMVVyb7NYBlGtvXh1yLN SPpcIl037qSCwW0+ByXUZIJK5nl2iIwqAV5/0qpHgQI+QURNdbmVztEeHp3OU7nu8vqa fZOg== X-Gm-Message-State: AOAM532cbBOlTfFEifb+RXrZtLipxe3F6lIb+cjbBixqTYYBEcNtd3Bq DDB7Q98hPhn26FaHTWt+J9o= X-Google-Smtp-Source: ABdhPJxvbQaHzI63ftYUju86HpJS58ngGCI8VPlF27GSAWqVjn0k5gIlPOm+FppvaTyiik2aOpwk8A== X-Received: by 2002:aa7:da13:: with SMTP id r19mr11509923eds.266.1644793085496; Sun, 13 Feb 2022 14:58:05 -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.58.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 13 Feb 2022 14:58:05 -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: Nicolas Saenz Julienne , Peter Robinson Subject: [PATCH v4 06/15] mfd: bcm2835-pm: Use 'reg-names' to get resources Date: Sun, 13 Feb 2022 22:56:38 +0000 Message-Id: <20220213225646.67761-7-pbrobinson@gmail.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220213225646.67761-1-pbrobinson@gmail.com> References: <20220213225646.67761-1-pbrobinson@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Nicolas Saenz Julienne If available in firmware, find resources by their 'reg-names' position instead of relying on hardcoded offsets. Care is taken to support old firmware nonetheless. Signed-off-by: Nicolas Saenz Julienne Signed-off-by: Peter Robinson --- Changes since v2: - correct names drivers/mfd/bcm2835-pm.c | 55 ++++++++++++++++++++++++++-------------- 1 file changed, 36 insertions(+), 19 deletions(-) diff --git a/drivers/mfd/bcm2835-pm.c b/drivers/mfd/bcm2835-pm.c index 42fe67f1538e..36fede92775c 100644 --- a/drivers/mfd/bcm2835-pm.c +++ b/drivers/mfd/bcm2835-pm.c @@ -25,9 +25,37 @@ static const struct mfd_cell bcm2835_power_devs[] = { { .name = "bcm2835-power" }, }; +static int bcm2835_pm_get_pdata(struct platform_device *pdev, + struct bcm2835_pm *pm) +{ + /* If no 'reg-names' property is found we can assume we're using old + * firmware. + */ + if (!of_find_property(pm->dev->of_node, "reg-names", NULL)) { + dev_warn(pm->dev, "Old devicetree detected, please update your firmware.\n"); + + pm->base = devm_platform_ioremap_resource(pdev, 0); + if (IS_ERR(pm->base)) + return PTR_ERR(pm->base); + + pm->asb = devm_platform_ioremap_resource(pdev, 1); + if (IS_ERR(pm->asb)) + pm->asb = NULL; + } else { + pm->base = devm_platform_ioremap_resource_byname(pdev, "pm"); + if (IS_ERR(pm->base)) + return PTR_ERR(pm->base); + + pm->asb = devm_platform_ioremap_resource_byname(pdev, "asb"); + if (IS_ERR(pm->base)) + pm->asb = NULL; + } + + return 0; +} + static int bcm2835_pm_probe(struct platform_device *pdev) { - struct resource *res; struct device *dev = &pdev->dev; struct bcm2835_pm *pm; int ret; @@ -39,10 +67,9 @@ static int bcm2835_pm_probe(struct platform_device *pdev) pm->dev = dev; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - pm->base = devm_ioremap_resource(dev, res); - if (IS_ERR(pm->base)) - return PTR_ERR(pm->base); + ret = bcm2835_pm_get_pdata(pdev, pm); + if (ret) + return ret; ret = devm_mfd_add_devices(dev, -1, bcm2835_pm_devs, ARRAY_SIZE(bcm2835_pm_devs), @@ -54,20 +81,10 @@ static int bcm2835_pm_probe(struct platform_device *pdev) * bcm2835-pm binding as the key for whether we can reference * the full PM register range and support power domains. */ - res = platform_get_resource(pdev, IORESOURCE_MEM, 1); - if (res) { - pm->asb = devm_ioremap_resource(dev, res); - if (IS_ERR(pm->asb)) - return PTR_ERR(pm->asb); - - ret = devm_mfd_add_devices(dev, -1, - bcm2835_power_devs, - ARRAY_SIZE(bcm2835_power_devs), - NULL, 0, NULL); - if (ret) - return ret; - } - + if (pm->asb) + return devm_mfd_add_devices(dev, -1, bcm2835_power_devs, + ARRAY_SIZE(bcm2835_power_devs), + NULL, 0, NULL); return 0; } From patchwork Sun Feb 13 22:56:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Robinson X-Patchwork-Id: 542425 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8E773C433FE for ; Sun, 13 Feb 2022 22:58:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238712AbiBMW6Q (ORCPT ); Sun, 13 Feb 2022 17:58:16 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:60272 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238666AbiBMW6P (ORCPT ); Sun, 13 Feb 2022 17:58:15 -0500 Received: from mail-ej1-x62b.google.com (mail-ej1-x62b.google.com [IPv6:2a00:1450:4864:20::62b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0C20C54BE0 for ; Sun, 13 Feb 2022 14:58:09 -0800 (PST) Received: by mail-ej1-x62b.google.com with SMTP id qk11so13532087ejb.2 for ; Sun, 13 Feb 2022 14:58:08 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=Mdx7I5Eo8oBah9t8/cpT7ExRF6D3O1Ycqvlfz85E7CA=; b=l4JPVCQeLEpqHBwiyDM7FZuMwpCo8D7yYfnnZbSIQKtACgK2kHw8qP1u2IPItn575X XFF5mQ6cP24SV2wWk88zKdZ+xoUo6u57lmelWOe77w5l1DFRcr6yoPpdFJSoUmHQbp2p jIPWfdD8168RS9i2EH0Jekrt6J0xKhYkiGyKraMmWDEEWue3hI69IACLyyV0uP4y7+8H Fkg7L3McdTJumeEahXgIprbSgoDsDEVvMyHvJhOm+YXRERz9KBqOwuFMFtFYdKu2iDbH zSQZ8eThBGuHXFI/gLEB4359z2wrxVUP4nPn/v1k7uWl75M4WH7DFvXuV2MF/cvScdRf 5zFg== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=Mdx7I5Eo8oBah9t8/cpT7ExRF6D3O1Ycqvlfz85E7CA=; b=EzLLCZhzxmjE2LN5gnKHQjh+U9knnQhu0kSzb9uc6D0yPKTP+bPq90Cvr4Jj7IBUb1 7IpZJLSieYOmByNw2rLxvEmjcQkDNFhhvne6LIzNuxK7u38dcSSs+WqcY4ggM/Bp2wmD 4d+BaJyvnoT7qLLfqfuBowhMyZkpBpD5QASbVmKJZ5pJ5mW+A1g0IoLoz/F+wVg6TEBm 1rBvVdh/Udamxcxb/CP7UklYlarNmIhkCBrWHFupd4PfavcM4Znd+d6MsihPvCTkDyI5 GEmA7D7QJurESjCQF304lCW6NzAhqcT5e0mBA9RZSxFe1PI+buzp1o+5WBD0yOh+Jfz2 jNYg== X-Gm-Message-State: AOAM5327TqR36fDlIsVMjVSf4DtoSXyxVKIh4f4cq3TIXg/urcrwF+sM qD92VYUYOedJP34ruHomXbdaACyztkj2BA== X-Google-Smtp-Source: ABdhPJwEC3TJGmKXsvO1w6ER7exMZMJ0Xc+Rid1ieNp9AtEFq2/oU//USalQA4a31llIDs2PBK/4ug== X-Received: by 2002:a17:907:9805:: with SMTP id ji5mr4505197ejc.489.1644793087598; Sun, 13 Feb 2022 14:58:07 -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.58.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 13 Feb 2022 14:58:07 -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: Nicolas Saenz Julienne , Peter Robinson Subject: [PATCH v4 08/15] soc: bcm: bcm2835-power: Add support for BCM2711's RPiVid ASB Date: Sun, 13 Feb 2022 22:56:40 +0000 Message-Id: <20220213225646.67761-9-pbrobinson@gmail.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220213225646.67761-1-pbrobinson@gmail.com> References: <20220213225646.67761-1-pbrobinson@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Nicolas Saenz Julienne In BCM2711 the new RPiVid 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. Use the fact that 'pm->rpivid_asb' is populated as a hint that we're on BCM2711. On top of that introduce the macro ASB_BASE() which will select the correct ASB register base, based on whether we're trying to access V3D and which platform we're on. Signed-off-by: Nicolas Saenz Julienne Signed-off-by: Peter Robinson --- Changes since v2: - Correct names again Changes since v1: - Correct names drivers/soc/bcm/bcm2835-power.c | 66 ++++++++++++++++++++------------- 1 file changed, 41 insertions(+), 25 deletions(-) diff --git a/drivers/soc/bcm/bcm2835-power.c b/drivers/soc/bcm/bcm2835-power.c index 1e0041ec8132..eea31f75dc64 100644 --- a/drivers/soc/bcm/bcm2835-power.c +++ b/drivers/soc/bcm/bcm2835-power.c @@ -126,8 +126,9 @@ #define ASB_AXI_BRDG_ID 0x20 -#define ASB_READ(reg) readl(power->asb + (reg)) -#define ASB_WRITE(reg, val) writel(PM_PASSWORD | (val), power->asb + (reg)) +#define ASB_BASE(is_v3d) (is_v3d && power->rpivid_asb ? power->rpivid_asb : power->asb) +#define ASB_READ(reg, is_v3d) readl(ASB_BASE(is_v3d) + (reg)) +#define ASB_WRITE(reg, val, is_v3d) writel(PM_PASSWORD | (val), ASB_BASE(is_v3d) + (reg)) struct bcm2835_power_domain { struct generic_pm_domain base; @@ -142,13 +143,16 @@ struct bcm2835_power { void __iomem *base; /* AXI Async bridge registers. */ void __iomem *asb; + /* RPiVid bridge registers. */ + void __iomem *rpivid_asb; struct genpd_onecell_data pd_xlate; struct bcm2835_power_domain domains[BCM2835_POWER_DOMAIN_COUNT]; struct reset_controller_dev reset; }; -static int bcm2835_asb_enable(struct bcm2835_power *power, u32 reg) +static int bcm2835_asb_enable(struct bcm2835_power *power, u32 reg, + bool is_v3d) { u64 start; @@ -158,8 +162,8 @@ static int bcm2835_asb_enable(struct bcm2835_power *power, u32 reg) start = ktime_get_ns(); /* Enable the module's async AXI bridges. */ - ASB_WRITE(reg, ASB_READ(reg) & ~ASB_REQ_STOP); - while (ASB_READ(reg) & ASB_ACK) { + ASB_WRITE(reg, ASB_READ(reg, is_v3d) & ~ASB_REQ_STOP, is_v3d); + while (ASB_READ(reg, is_v3d) & ASB_ACK) { cpu_relax(); if (ktime_get_ns() - start >= 1000) return -ETIMEDOUT; @@ -168,7 +172,8 @@ static int bcm2835_asb_enable(struct bcm2835_power *power, u32 reg) return 0; } -static int bcm2835_asb_disable(struct bcm2835_power *power, u32 reg) +static int bcm2835_asb_disable(struct bcm2835_power *power, u32 reg, + bool is_v3d) { u64 start; @@ -178,8 +183,8 @@ static int bcm2835_asb_disable(struct bcm2835_power *power, u32 reg) start = ktime_get_ns(); /* Enable the module's async AXI bridges. */ - ASB_WRITE(reg, ASB_READ(reg) | ASB_REQ_STOP); - while (!(ASB_READ(reg) & ASB_ACK)) { + ASB_WRITE(reg, ASB_READ(reg, is_v3d) | ASB_REQ_STOP, is_v3d); + while (!(ASB_READ(reg, is_v3d) & ASB_ACK)) { cpu_relax(); if (ktime_get_ns() - start >= 1000) return -ETIMEDOUT; @@ -274,7 +279,8 @@ static int bcm2835_asb_power_on(struct bcm2835_power_domain *pd, u32 pm_reg, u32 asb_m_reg, u32 asb_s_reg, - u32 reset_flags) + u32 reset_flags, + bool is_v3d) { struct bcm2835_power *power = pd->power; int ret; @@ -301,13 +307,13 @@ static int bcm2835_asb_power_on(struct bcm2835_power_domain *pd, goto err_enable_resets; } - ret = bcm2835_asb_enable(power, asb_m_reg); + ret = bcm2835_asb_enable(power, asb_m_reg, is_v3d); if (ret) { dev_err(power->dev, "Failed to enable ASB master for %s\n", pd->base.name); goto err_disable_clk; } - ret = bcm2835_asb_enable(power, asb_s_reg); + ret = bcm2835_asb_enable(power, asb_s_reg, is_v3d); if (ret) { dev_err(power->dev, "Failed to enable ASB slave for %s\n", pd->base.name); @@ -317,7 +323,7 @@ static int bcm2835_asb_power_on(struct bcm2835_power_domain *pd, return 0; err_disable_asb_master: - bcm2835_asb_disable(power, asb_m_reg); + bcm2835_asb_disable(power, asb_m_reg, is_v3d); err_disable_clk: clk_disable_unprepare(pd->clk); err_enable_resets: @@ -329,22 +335,23 @@ static int bcm2835_asb_power_off(struct bcm2835_power_domain *pd, u32 pm_reg, u32 asb_m_reg, u32 asb_s_reg, - u32 reset_flags) + u32 reset_flags, + bool is_v3d) { struct bcm2835_power *power = pd->power; int ret; - ret = bcm2835_asb_disable(power, asb_s_reg); + ret = bcm2835_asb_disable(power, asb_s_reg, is_v3d); if (ret) { dev_warn(power->dev, "Failed to disable ASB slave for %s\n", pd->base.name); return ret; } - ret = bcm2835_asb_disable(power, asb_m_reg); + ret = bcm2835_asb_disable(power, asb_m_reg, is_v3d); if (ret) { dev_warn(power->dev, "Failed to disable ASB master for %s\n", pd->base.name); - bcm2835_asb_enable(power, asb_s_reg); + bcm2835_asb_enable(power, asb_s_reg, is_v3d); return ret; } @@ -369,7 +376,7 @@ static int bcm2835_power_pd_power_on(struct generic_pm_domain *domain) case BCM2835_POWER_DOMAIN_GRAFX_V3D: return bcm2835_asb_power_on(pd, PM_GRAFX, ASB_V3D_M_CTRL, ASB_V3D_S_CTRL, - PM_V3DRSTN); + PM_V3DRSTN, true); case BCM2835_POWER_DOMAIN_IMAGE: return bcm2835_power_power_on(pd, PM_IMAGE); @@ -377,17 +384,17 @@ static int bcm2835_power_pd_power_on(struct generic_pm_domain *domain) case BCM2835_POWER_DOMAIN_IMAGE_PERI: return bcm2835_asb_power_on(pd, PM_IMAGE, 0, 0, - PM_PERIRSTN); + PM_PERIRSTN, false); case BCM2835_POWER_DOMAIN_IMAGE_ISP: return bcm2835_asb_power_on(pd, PM_IMAGE, ASB_ISP_M_CTRL, ASB_ISP_S_CTRL, - PM_ISPRSTN); + PM_ISPRSTN, false); case BCM2835_POWER_DOMAIN_IMAGE_H264: return bcm2835_asb_power_on(pd, PM_IMAGE, ASB_H264_M_CTRL, ASB_H264_S_CTRL, - PM_H264RSTN); + PM_H264RSTN, false); case BCM2835_POWER_DOMAIN_USB: PM_WRITE(PM_USB, PM_USB_CTRLEN); @@ -435,7 +442,7 @@ static int bcm2835_power_pd_power_off(struct generic_pm_domain *domain) case BCM2835_POWER_DOMAIN_GRAFX_V3D: return bcm2835_asb_power_off(pd, PM_GRAFX, ASB_V3D_M_CTRL, ASB_V3D_S_CTRL, - PM_V3DRSTN); + PM_V3DRSTN, true); case BCM2835_POWER_DOMAIN_IMAGE: return bcm2835_power_power_off(pd, PM_IMAGE); @@ -443,17 +450,17 @@ static int bcm2835_power_pd_power_off(struct generic_pm_domain *domain) case BCM2835_POWER_DOMAIN_IMAGE_PERI: return bcm2835_asb_power_off(pd, PM_IMAGE, 0, 0, - PM_PERIRSTN); + PM_PERIRSTN, false); case BCM2835_POWER_DOMAIN_IMAGE_ISP: return bcm2835_asb_power_off(pd, PM_IMAGE, ASB_ISP_M_CTRL, ASB_ISP_S_CTRL, - PM_ISPRSTN); + PM_ISPRSTN, false); case BCM2835_POWER_DOMAIN_IMAGE_H264: return bcm2835_asb_power_off(pd, PM_IMAGE, ASB_H264_M_CTRL, ASB_H264_S_CTRL, - PM_H264RSTN); + PM_H264RSTN, false); case BCM2835_POWER_DOMAIN_USB: PM_WRITE(PM_USB, 0); @@ -626,13 +633,22 @@ static int bcm2835_power_probe(struct platform_device *pdev) power->dev = dev; power->base = pm->base; power->asb = pm->asb; + power->rpivid_asb = pm->rpivid_asb; - id = ASB_READ(ASB_AXI_BRDG_ID); + id = ASB_READ(ASB_AXI_BRDG_ID, false); if (id != 0x62726467 /* "BRDG" */) { dev_err(dev, "ASB register ID returned 0x%08x\n", id); return -ENODEV; } + if (pm->rpivid_asb) { + id = ASB_READ(ASB_AXI_BRDG_ID, true); + if (id != 0x62726467 /* "BRDG" */) { + dev_err(dev, "RPiVid ASB register ID returned 0x%08x\n", id); + return -ENODEV; + } + } + power->pd_xlate.domains = devm_kcalloc(dev, ARRAY_SIZE(power_domain_names), sizeof(*power->pd_xlate.domains), From patchwork Sun Feb 13 22:56:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Robinson X-Patchwork-Id: 542424 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E90ECC433EF for ; Sun, 13 Feb 2022 22:58:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238709AbiBMW6S (ORCPT ); Sun, 13 Feb 2022 17:58:18 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:60322 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238693AbiBMW6R (ORCPT ); Sun, 13 Feb 2022 17:58:17 -0500 Received: from mail-ej1-x631.google.com (mail-ej1-x631.google.com [IPv6:2a00:1450:4864:20::631]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4448354BE1 for ; Sun, 13 Feb 2022 14:58:11 -0800 (PST) Received: by mail-ej1-x631.google.com with SMTP id fy20so33743679ejc.0 for ; Sun, 13 Feb 2022 14:58:11 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=uOtzuc3KzFq47CE3a/IsqBsnHGlymFWoyRNcsMqoiCg=; b=YiDIKqi/fQuw5dMJ0QefKoK9ZeFs49A3dPOXLRakNIOD0uSpKsCvYQsyyfIEHqDGS3 7yr+D+3YX/VNOWNvrky91rd4Oh5peT+ucBd+P8XoxhFFKaoFGIxUYTbfZnKifZ/Niy7U 4jDfQuzXojLAZTk8u4OSDZp6g/Og0ZnO9oBi4rD1ZbCUX+EevGoX2Lgog8G9eH9b1oxu tq0RGyugvJz1wv2ytAlABKs7QkbnNHgwKPhNqTnQ0GALuvL7vzUzliUR1f7t4T6LKG1m Ctv/YObAqWWWWCe7AJbWTCI/eo4Oq9mSgXfm7QrLPTEKpVKu+BDYngMU4DxBTGJ9346L Dq/A== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=uOtzuc3KzFq47CE3a/IsqBsnHGlymFWoyRNcsMqoiCg=; b=r9zgvQsjs2Igux1n5KHmUrCaH3Wb1W7MVGJACaZR3yj1lr3Owxd9Nm2qZ0E68V8vCt m4EhoKP7Co9Ef6Prfy6sRyea1/cSdpb0wW6kT57lRuz/iYqFwxkafPQN07Rg8Ctjsg0h wilFufX3Ca+H5xjGGi2EqWT5ofgyyyCn02DUbQ2+GHTmOOexYRCRe0EpqLUdS/0DDymy g8agurQfnvnKsPLim/D6YmPR0pBISsTOm54x/0Lr8BQMyfo7z7lqVXC/na0tivT1r3jV kZR/vYazBi7x2kjlsFg3IT5IZHG3NR7alKAGdCmqkimGB8KsznQ+zLDFyNXmins9aNDu IgDg== X-Gm-Message-State: AOAM530EDTP6/HU6LhFAuQprijeAkFeFm+YDZQo9CFzH126vYa1E5kjv f5zMtt8vXrqIe9yRV69YoIE= X-Google-Smtp-Source: ABdhPJw/v69niJY3V35RD22I+6ray2UOpcJkO51J6fugJ40hgNvNZ1/dH8/fS+BWnWvMU+bguMAnHg== X-Received: by 2002:a17:906:3d72:: with SMTP id r18mr9192051ejf.111.1644793089885; Sun, 13 Feb 2022 14:58:09 -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.58.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 13 Feb 2022 14:58:09 -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: Nicolas Saenz Julienne , Rob Herring , Peter Robinson Subject: [PATCH v4 10/15] dt-bindings: gpu: v3d: Add BCM2711's compatible Date: Sun, 13 Feb 2022 22:56:42 +0000 Message-Id: <20220213225646.67761-11-pbrobinson@gmail.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220213225646.67761-1-pbrobinson@gmail.com> References: <20220213225646.67761-1-pbrobinson@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Nicolas Saenz Julienne BCM2711, Raspberry Pi 4's SoC, contains a V3D core. So add its specific compatible to the bindings. Signed-off-by: Nicolas Saenz Julienne Reviewed-by: Rob Herring Signed-off-by: Peter Robinson --- Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.yaml b/Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.yaml index e6485f7b046f..a08532909513 100644 --- a/Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.yaml +++ b/Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.yaml @@ -18,6 +18,7 @@ properties: enum: - brcm,7268-v3d - brcm,7278-v3d + - brcm,bcm2711-v3d reg: items: From patchwork Sun Feb 13 22:56:45 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Robinson X-Patchwork-Id: 542423 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8E95CC4332F for ; Sun, 13 Feb 2022 22:58:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238715AbiBMW6V (ORCPT ); Sun, 13 Feb 2022 17:58:21 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:60420 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238708AbiBMW6U (ORCPT ); Sun, 13 Feb 2022 17:58:20 -0500 Received: from mail-ej1-x62e.google.com (mail-ej1-x62e.google.com [IPv6:2a00:1450:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 822E354BE1 for ; Sun, 13 Feb 2022 14:58:14 -0800 (PST) Received: by mail-ej1-x62e.google.com with SMTP id hw13so5427637ejc.9 for ; Sun, 13 Feb 2022 14:58:14 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=ivZTnCer36jidFVyFQSe8jli8F6HVOlgrV0ncoMunP4=; b=BXiB0JZopaxdoC1803g5A+DWZq7uajcMVcVYnOWpUaOMo3zm5i8Hyj9hjtpBxzbj8S RgdypbHdhIs5j/9qSKoxpaEmFglkt0vkBZgg+YO3FwM2EexqempXPMf2aE5dBfYHMg8o 2oqau8hyn1LycZuBazvFgFbyrWkjZntCSEQ9Il68joSCy8K3fS81kvIjKxLNI8qR3mji fs5xp3SXCN4m/HnTjQymcznUSkNifdlwNRVIGWD9F+NJHM3qQW+moTqiJtmcqWqk8eAg d1yCN3V+FGbcdvp21GzndVWmXxcw5vjDhDKBR7I1asevS7oRm3ZwjfB0GcuSQntUV19M CmwA== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=ivZTnCer36jidFVyFQSe8jli8F6HVOlgrV0ncoMunP4=; b=BddW/mM7xQ2lCy8XgsHOZ8bEBMglOSCKSYiQ8rQjQHPOip38459NOlJF1HS/JBe0f4 61xnPZy4aFDyhFHyH7Zzfd7hv0z0IjKRCKr/0+XxDU3Ilu/R21/ip+ZLrnU4GGkeZPDH qsKzD+kkQitw9T5UMFYMBj724RNVOI3LJVTTu1wX/mrdSZbaKEQ2DuKdia5lmnkNuiFG Ds4EOlRnWzVaXXR6iqYBVYsDYaO9/NAqFhINfT7GcMcHFZAkETMVtz8NrDuRw5JrfkyV qjhaJYBBLz/oicSMGBjZJify7qQ7f2Hr4vFngjP3RIfrTNQBsjfSqDZ2RaUpNeQ29V8H Lckw== X-Gm-Message-State: AOAM533Z0AKoGatd/lt4fCH4miGkcNXUVHDdmQCu72MHEW6DD/u/g3rd MhF1qrO4oO41hfS65kHFWUc= X-Google-Smtp-Source: ABdhPJy1zgJHXR0xG+NxoKA/QqJCpy7K517B38I8JXVyJ+Vaa6qE0TSCVoiJKHHg4//tdK7D5GOW5g== X-Received: by 2002:a17:907:6298:: with SMTP id nd24mr9051878ejc.76.1644793093157; Sun, 13 Feb 2022 14:58:13 -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.58.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 13 Feb 2022 14:58:12 -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 , Nicolas Saenz Julienne Subject: [PATCH v4 13/15] ARM: dts: bcm2711: Enable V3D Date: Sun, 13 Feb 2022 22:56:45 +0000 Message-Id: <20220213225646.67761-14-pbrobinson@gmail.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220213225646.67761-1-pbrobinson@gmail.com> References: <20220213225646.67761-1-pbrobinson@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org This enables V3D for bcm2711 (used in the Raspberry Pi 4). Signed-off-by: Nicolas Saenz Julienne Signed-off-by: Peter Robinson --- Changes since v3: - Minor updates for rebase Changes since v1: - Correct node's name address 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 171fc5d2acef..9514c0ba481c 100644 --- a/arch/arm/boot/dts/bcm2711.dtsi +++ b/arch/arm/boot/dts/bcm2711.dtsi @@ -551,6 +551,18 @@ genet_mdio: mdio@e14 { #size-cells = <0x0>; }; }; + + v3d: gpu@7ec00000 { + 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 = ; + }; }; }; From patchwork Sun Feb 13 22:56:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Robinson X-Patchwork-Id: 542422 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DF6D7C433F5 for ; Sun, 13 Feb 2022 22:58:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238723AbiBMW6W (ORCPT ); Sun, 13 Feb 2022 17:58:22 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:60448 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238719AbiBMW6V (ORCPT ); Sun, 13 Feb 2022 17:58:21 -0500 Received: from mail-ed1-x52c.google.com (mail-ed1-x52c.google.com [IPv6:2a00:1450:4864:20::52c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8BEF454BEF for ; Sun, 13 Feb 2022 14:58:15 -0800 (PST) Received: by mail-ed1-x52c.google.com with SMTP id co28so24588609edb.1 for ; Sun, 13 Feb 2022 14:58:15 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=jQq/5Dh8W6JAfGKpRneZGJ1QMWx3eBuPlC7vcniS1Us=; b=Cjhw4u6ixFdzFPiBa4vUlu6gHXr9KnKSSTtmmp067Q7owC5JErVjkFvvhTp2sOFXYK m7ddyB6ls6+fgx3lCwxuKD83eYl6F1VWlX5KDhEzf/yzty/El2i/mToODicHmUYSoHBn sgzmyTd52UpmG/mzQuJi0tjsmhfrtUe1r4hPUuVD7n/Dr1/wlQCnjOsHhVVrhuRfVPsh DBKKUCEnn0JuuhKkssWgPYx05HLjVp+sOwQQTpi5D/vToT8fgleVT2WZtCVm9+jNtTTr KgLkrkm8CmnSDPMInp+eomU5rzsGWOPlN+YDTkKI/9lJ4bQUV44bvfAs7zUJc86aF2Iq MyUg== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=jQq/5Dh8W6JAfGKpRneZGJ1QMWx3eBuPlC7vcniS1Us=; b=D/uT/C2sGOdBJyhoBtXqopzmauyNOOMNQDGVCV7epv2zFn9lqEzT1C3IDkwXXHgqig ztuUOx2KfPWWm6bZOhDvGOEe/oaDphvo42WQkGhi/xe7xJH75SkrApuREn2HnNUTIEHy uJk7gISf4l3LhZzWqkbuCD+04mrYR9UeCdJDu7+jaqbQOswmSPybB5W3tHiV/ZtU/qZD +sURclPg5v4ykUDCazIY9sjc2kouzqHFOgtmHdwZYhLvoVco3aPoPJnF1u2/4EYy/2UO ulfF5u6dUpW8cDbTSJivPBQEThUS4fZMFTIgEMsd/5pol0xCKh9g7wcTAvclX2GG9LsW DQkA== X-Gm-Message-State: AOAM5314XO4E/RLEFLZDiOPkmuRl4mMhX+VnU1B/1hCMfi3DlMYccdqa uHb7orrSSbCRMt/kDJZI5cM= X-Google-Smtp-Source: ABdhPJwpbXvqTXPWfanIegqeSSXMc/D9nuYZSbPn6wO4ZrFisazGe1Lh+e6WfTkhT9/s/L+Urt2sZA== X-Received: by 2002:a05:6402:b44:: with SMTP id bx4mr8714266edb.59.1644793094192; Sun, 13 Feb 2022 14:58:14 -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.58.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 13 Feb 2022 14:58:13 -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 , Nicolas Saenz Julienne Subject: [PATCH v4 14/15] ARM: configs: Enable DRM_V3D Date: Sun, 13 Feb 2022 22:56:46 +0000 Message-Id: <20220213225646.67761-15-pbrobinson@gmail.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220213225646.67761-1-pbrobinson@gmail.com> References: <20220213225646.67761-1-pbrobinson@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org BCM2711, the SoC used on the Raspberry Pi 4 has a different GPU than its predecessors. Enable it. Signed-off-by: Nicolas Saenz Julienne Signed-off-by: Peter Robinson --- Changes since v1: - Correct node's name address arch/arm/configs/multi_v7_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/configs/multi_v7_defconfig b/arch/arm/configs/multi_v7_defconfig index 8863fa969ede..d203587194a1 100644 --- a/arch/arm/configs/multi_v7_defconfig +++ b/arch/arm/configs/multi_v7_defconfig @@ -706,6 +706,7 @@ CONFIG_DRM_IMX_PARALLEL_DISPLAY=m CONFIG_DRM_IMX_TVE=m CONFIG_DRM_IMX_LDB=m CONFIG_DRM_IMX_HDMI=m +CONFIG_DRM_V3D=m CONFIG_DRM_VC4=m CONFIG_DRM_ETNAVIV=m CONFIG_DRM_MXSFB=m