From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B4E2EC433DB for ; Tue, 9 Feb 2021 14:02:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7ADB064EE4 for ; Tue, 9 Feb 2021 14:02:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231652AbhBIOBy (ORCPT ); Tue, 9 Feb 2021 09:01:54 -0500 Received: from mx2.suse.de ([195.135.220.15]:59208 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230000AbhBIOBD (ORCPT ); Tue, 9 Feb 2021 09:01:03 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id DA66EAFE2; Tue, 9 Feb 2021 14:00:19 +0000 (UTC) Message-ID: <56e237a8d0646c03d4ff44e439d1b0f81c800a9b.camel@suse.de> Subject: Re: [RFC/PATCH v2 09/16] soc: bcm: bcm2835-power: Add support for BCM2711's Argon ASB From: Nicolas Saenz Julienne To: Phil Elwell Cc: Florian Fainelli , linux-kernel@vger.kernel.org, Ray Jui , Scott Branden , "maintainer:BROADCOM BCM7XXX ARM ARCHITECTURE" , "moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE" , wahrenst@gmx.net, linux-arm-kernel@lists.infradead.org, mripard@kernel.org, eric@anholt.net Date: Tue, 09 Feb 2021 15:00:18 +0100 In-Reply-To: References: <20210209125912.3398-1-nsaenzjulienne@suse.de> <20210209125912.3398-10-nsaenzjulienne@suse.de> Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-vLmExgH5XDAroXW33oQ4" User-Agent: Evolution 3.38.3 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-vLmExgH5XDAroXW33oQ4 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, 2021-02-09 at 13:19 +0000, Phil Elwell wrote: > Hi Nicolas, >=20 > On Tue, 9 Feb 2021 at 13:00, Nicolas Saenz Julienne > wrote: > >=20 > > In BCM2711 the new ARGON ASB took over V3D. The old ASB is still presen= t > > with the ISP and H264 bits, and V3D is in the same place in the new ASB > > as the old one. > >=20 > > Use the fact that 'pm->argon_asb' is populated as a hint that we're on > > BCM2711. On top of that introduce the macro ASB_BASE() which will selec= t > > the correct ASB register base, based on whether we're trying to access > > V3D and which platform we're on. >=20 > Please don't refer to this block as ARGON - it is the IP of Raspberry > Pi Trading and it's name is RPiVid. OK, sorry for that. I, again, mixed both ASB names. I'll rename the Argon A= SB to RPiVid. How should I call the one present in older RPis? > > Signed-off-by: Nicolas Saenz Julienne > >=20 > > --- > >=20 > > Changes since v1: > > =C2=A0- Correct names > >=20 > > =C2=A0drivers/soc/bcm/bcm2835-power.c | 68 ++++++++++++++++++++--------= ----- > > =C2=A01 file changed, 42 insertions(+), 26 deletions(-) > >=20 > > diff --git a/drivers/soc/bcm/bcm2835-power.c b/drivers/soc/bcm/bcm2835-= power.c > > index 59b8abfc5617..42e105758b47 100644 > > --- a/drivers/soc/bcm/bcm2835-power.c [...] > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0case BCM2835_POWER_DOMA= IN_USB: > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0PM_WRITE(PM_USB, 0); > > @@ -626,13 +633,22 @@ static int bcm2835_power_probe(struct platform_de= vice *pdev) > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0power->dev =3D dev; > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0power->base =3D pm->bas= e; > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0power->rpivid_asb =3D p= m->rpivid_asb; > > + power->argon_asb =3D pm->argon_asb; > >=20 > > - id =3D ASB_READ(ASB_AXI_BRDG_ID); > > + id =3D ASB_READ(ASB_AXI_BRDG_ID, false); > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0if (id !=3D 0x62726467 = /* "BRDG" */) { > > - dev_err(dev, "ASB register ID returned 0x%08x\n", id); > > + dev_err(dev, "RPiVid ASB register ID returned 0x%08x\n"= , id); > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0return -ENODEV; > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0} > >=20 > > + if (pm->argon_asb) { > > + id =3D ASB_READ(ASB_AXI_BRDG_ID, true); > > + if (id !=3D 0x62726467 /* "BRDG" */) { > > + dev_err(dev, "Argon ASB register ID returned 0x= %08x\n", id); > > + return -ENODEV; > > + } > > + } > > + > > Surely these are the same register. Is this the result of a bad merge? AFAIU There are two ASBs the old one at 0x7e00a000 and the new RPiVid one a= t 0x7ec11000. They both can be checked for valid IDs. Note the new argument i= n ASB_READ(). Regards, Nicolas --=-vLmExgH5XDAroXW33oQ4 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEErOkkGDHCg2EbPcGjlfZmHno8x/4FAmAilXIACgkQlfZmHno8 x/4YiQf+IWndOxKAscGGPf/kslh7HScKXnZucnff76qyQ3qV4RdHObcPRF9xgDoY B3SFOOxIxcmRLHBDt7ze2OWr/hpC1JxDIcHEsAgQe91zC6TD/53HXdS3aX0nAO56 4XFP0VS1zvr7iJPbOsxrDdM13Jv6bU0K20O0AraVvoiDUGMs0ZniH7/7AgpmtZDe yEFSun6M9UmmVY9uYRzHkk8XPRhXpECxnMewrEHfm1IUFId6Kmw7I4HwPArvTPf9 kDOi+rSofxS9ZIUgxFpWV3tRxxYAjxSx8mEHEbiF2cQZ08Vy0U4559tKS6flGh44 D1Mo6eq/KrsBsJ88VRcpKB6NcmWWug== =PFPS -----END PGP SIGNATURE----- --=-vLmExgH5XDAroXW33oQ4-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5C72CC433DB for ; Tue, 9 Feb 2021 14:01:39 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 016CB64DE7 for ; Tue, 9 Feb 2021 14:01:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 016CB64DE7 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Type:Cc: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: MIME-Version:References:In-Reply-To:Date:To:From:Subject:Message-ID:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=p3TROpNbdmBeywqDpVeghSreOJH/OZsfxeGxHXpPT1g=; b=W5bqUw3X8us9y28Zprcwib+py gLOUpk83kC0Hlz60lX6v4wrPCTgDmRKt6ZJxLMaSZIi375VSYmYJBo626DrwDRcsiLiI84YsJB9hN UrlXpcNcVmQxnfugZ39dupq7/ln73FZ9TdwzagJXX4SpkAzV5oxHGN99Nx1+4T/kLVS6Bk29HZByI zA8IqptLPdrnhlbdJi3/0Ar7gKvX53OvrAVv8PBSz5fCUSZPvo/F8S+FPugekzrHGw49gScUdMwaS gqbjLaqg8wu5BQdjGmF1NlzgzfLuCam61rScyC3gbvwn96yUc/KsG9vvCJTivPp7wDNmNphFilqSI PPeCrr8TQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l9TZ2-0004sT-H4; Tue, 09 Feb 2021 14:00:24 +0000 Received: from mx2.suse.de ([195.135.220.15]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l9TYy-0004re-Uq; Tue, 09 Feb 2021 14:00:22 +0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id DA66EAFE2; Tue, 9 Feb 2021 14:00:19 +0000 (UTC) Message-ID: <56e237a8d0646c03d4ff44e439d1b0f81c800a9b.camel@suse.de> Subject: Re: [RFC/PATCH v2 09/16] soc: bcm: bcm2835-power: Add support for BCM2711's Argon ASB From: Nicolas Saenz Julienne To: Phil Elwell Date: Tue, 09 Feb 2021 15:00:18 +0100 In-Reply-To: References: <20210209125912.3398-1-nsaenzjulienne@suse.de> <20210209125912.3398-10-nsaenzjulienne@suse.de> User-Agent: Evolution 3.38.3 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210209_090021_225866_BCCE92C7 X-CRM114-Status: GOOD ( 23.55 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Florian Fainelli , Scott Branden , Ray Jui , linux-kernel@vger.kernel.org, mripard@kernel.org, eric@anholt.net, "maintainer:BROADCOM BCM7XXX ARM ARCHITECTURE" , "moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE" , linux-arm-kernel@lists.infradead.org, wahrenst@gmx.net Content-Type: multipart/mixed; boundary="===============6764164156605738972==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============6764164156605738972== Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-vLmExgH5XDAroXW33oQ4" --=-vLmExgH5XDAroXW33oQ4 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, 2021-02-09 at 13:19 +0000, Phil Elwell wrote: > Hi Nicolas, >=20 > On Tue, 9 Feb 2021 at 13:00, Nicolas Saenz Julienne > wrote: > >=20 > > In BCM2711 the new ARGON ASB took over V3D. The old ASB is still presen= t > > with the ISP and H264 bits, and V3D is in the same place in the new ASB > > as the old one. > >=20 > > Use the fact that 'pm->argon_asb' is populated as a hint that we're on > > BCM2711. On top of that introduce the macro ASB_BASE() which will selec= t > > the correct ASB register base, based on whether we're trying to access > > V3D and which platform we're on. >=20 > Please don't refer to this block as ARGON - it is the IP of Raspberry > Pi Trading and it's name is RPiVid. OK, sorry for that. I, again, mixed both ASB names. I'll rename the Argon A= SB to RPiVid. How should I call the one present in older RPis? > > Signed-off-by: Nicolas Saenz Julienne > >=20 > > --- > >=20 > > Changes since v1: > > =C2=A0- Correct names > >=20 > > =C2=A0drivers/soc/bcm/bcm2835-power.c | 68 ++++++++++++++++++++--------= ----- > > =C2=A01 file changed, 42 insertions(+), 26 deletions(-) > >=20 > > diff --git a/drivers/soc/bcm/bcm2835-power.c b/drivers/soc/bcm/bcm2835-= power.c > > index 59b8abfc5617..42e105758b47 100644 > > --- a/drivers/soc/bcm/bcm2835-power.c [...] > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0case BCM2835_POWER_DOMA= IN_USB: > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0PM_WRITE(PM_USB, 0); > > @@ -626,13 +633,22 @@ static int bcm2835_power_probe(struct platform_de= vice *pdev) > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0power->dev =3D dev; > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0power->base =3D pm->bas= e; > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0power->rpivid_asb =3D p= m->rpivid_asb; > > + power->argon_asb =3D pm->argon_asb; > >=20 > > - id =3D ASB_READ(ASB_AXI_BRDG_ID); > > + id =3D ASB_READ(ASB_AXI_BRDG_ID, false); > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0if (id !=3D 0x62726467 = /* "BRDG" */) { > > - dev_err(dev, "ASB register ID returned 0x%08x\n", id); > > + dev_err(dev, "RPiVid ASB register ID returned 0x%08x\n"= , id); > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0return -ENODEV; > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0} > >=20 > > + if (pm->argon_asb) { > > + id =3D ASB_READ(ASB_AXI_BRDG_ID, true); > > + if (id !=3D 0x62726467 /* "BRDG" */) { > > + dev_err(dev, "Argon ASB register ID returned 0x= %08x\n", id); > > + return -ENODEV; > > + } > > + } > > + > > Surely these are the same register. Is this the result of a bad merge? AFAIU There are two ASBs the old one at 0x7e00a000 and the new RPiVid one a= t 0x7ec11000. They both can be checked for valid IDs. Note the new argument i= n ASB_READ(). Regards, Nicolas --=-vLmExgH5XDAroXW33oQ4 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEErOkkGDHCg2EbPcGjlfZmHno8x/4FAmAilXIACgkQlfZmHno8 x/4YiQf+IWndOxKAscGGPf/kslh7HScKXnZucnff76qyQ3qV4RdHObcPRF9xgDoY B3SFOOxIxcmRLHBDt7ze2OWr/hpC1JxDIcHEsAgQe91zC6TD/53HXdS3aX0nAO56 4XFP0VS1zvr7iJPbOsxrDdM13Jv6bU0K20O0AraVvoiDUGMs0ZniH7/7AgpmtZDe yEFSun6M9UmmVY9uYRzHkk8XPRhXpECxnMewrEHfm1IUFId6Kmw7I4HwPArvTPf9 kDOi+rSofxS9ZIUgxFpWV3tRxxYAjxSx8mEHEbiF2cQZ08Vy0U4559tKS6flGh44 D1Mo6eq/KrsBsJ88VRcpKB6NcmWWug== =PFPS -----END PGP SIGNATURE----- --=-vLmExgH5XDAroXW33oQ4-- --===============6764164156605738972== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel --===============6764164156605738972==--