Received: by 2002:ab2:7b86:0:b0:1f7:5705:b850 with SMTP id q6csp109578lqh; Fri, 3 May 2024 15:14:24 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX7TcCHVeyvXqlJadEqXa2Ve+K54qJ5CXr4sHNpxJqGXYRkmqzAovaZHiobqXhK5EtMGSmVV8lQkHJNgEqPWdboQ1I9GTY/5NLhTMCjrg== X-Google-Smtp-Source: AGHT+IEPSRgwuTSjQ/YAa8Sha+60bPMWCuMx48xnBVuIsRqbqIqYqiq0coFhKN/J3AkOLCa68H97 X-Received: by 2002:a17:906:5f84:b0:a59:a83b:d43d with SMTP id a4-20020a1709065f8400b00a59a83bd43dmr15367eju.16.1714774464491; Fri, 03 May 2024 15:14:24 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714774464; cv=pass; d=google.com; s=arc-20160816; b=WbTxNQKKYWTpiVTLHx36e/4MnJ7TQzKcu/y+iuQl33F7bKR8rPPaPI9jqQJMycnuAO 6OmDvJVsavcP1gXiF8aSFWcs60AQdlfJ4L0gdiWwpjBohThIkgrH6CdeREuavIwxpe6k JRROpbl8mypxHvJ5rWiVJWCbzHukPyHMclgeT903xXdjsNmWfGRea9eHAQQvE5LgtCNk 466Q5zK6iDjuIz14XEq1yoPW4ZXd+MB4wQA9qAqTOYUFkeIlw8BKaAMfR0SRL/UdaIVS zX+R3jMiRFjm5Qm//oqNyd5h7UCCOD3LfgF2y6/lzY7ncIUei9lRwRtsTm1YzpAy5C3G VBqQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=onAzj9EAvHxRM0CRXyvbU0QGZEdkPdDKmu0hmuY3mT0=; fh=q9bCjntz0fvlxppnbIYx+OJTYn8LvERCKK/hFj8jOsU=; b=d6va/fLXByyTbcy1boJutHF0PbLck17f6UJUxA4bapOVVtx/bKPqSMC44KMslTa4+F 7gdouarCM6wLuI72Yd/qOx0u0dLucOwmYchUu3A6AR7UMSIvLKu6sMwWvwPs3NHSPgKN ysUug4iTmJvasz4fJbquCxFb/niTuS5xHfW5giVSgo8pICWxXKlDuVxsz2Wwg8p1O4xb LG2KXhiDtklbe1N/szznzT2NndfstuHTUl6VL+e6fKkPqk/WDAiTtzqcMINUfqnwKhaZ rL9fo1DxdgZZweL3fFE4Ve/b0iRt4X7VPZPPQtKlPaLmS9FYUR/hhwYIKgLqT+WFm8Wg X3JQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Fgck2mNa; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-168338-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-168338-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id g22-20020a1709063b1600b00a599bfd94f5si634358ejf.936.2024.05.03.15.14.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 May 2024 15:14:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-168338-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Fgck2mNa; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-168338-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-168338-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 12F801F25655 for ; Fri, 3 May 2024 22:14:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 57C585BAD7; Fri, 3 May 2024 22:14:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Fgck2mNa" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6EC401EB21; Fri, 3 May 2024 22:14:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714774455; cv=none; b=CALuxEe8T3HMfcFwfduAp5ICml87CDklbU4lK2RgocitygV0e7rCRkuEOYhj3h66PKmUwla0xXolfb2OIaMZvT3lJUbHTep46wI/yiVOEx5AnDwVpnMV72udDYrjB3eD0mA0VJWYg+CP5afm+H24CAP/1due6D66MQojd1jKk44= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714774455; c=relaxed/simple; bh=zHMgoQFGqXCS0wSQQOdTlljNIzCktqC8tmQAhXSc1bs=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=HjfEnomaFp1KbodBdCmhbBp7/hCr8KhfnjoGZhNNG6vzPKp/dtSD/P17HYw2e5LqxkGXkxlnLYFs8LolHdcBhoHJLwXotZLowuBYd9h+hxm86C8vduy1ktXlVFodDl9AwKbDxNG7ncPVK1g+UZp+3wU/be44EwUZvLXvRga2IYY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Fgck2mNa; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7C948C116B1; Fri, 3 May 2024 22:14:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1714774455; bh=zHMgoQFGqXCS0wSQQOdTlljNIzCktqC8tmQAhXSc1bs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Fgck2mNae+YY4hsUBEkQ5FJ/w2FO1bLtdG/4lsuVeURk392XWBZw9mf/DK4zQ8zXS atnZG7SkpVc6tZaFIWSuz7UF3jj7p2oL49MrDDKiFrZBFWVnbyZnJi8Br50QLSXv50 yyhqns4c8VeTjQGcWcOPzI4kwmM864riDRG3JFavF1HJ+5wo/XV1tcPiHfn6qM1IuT LYTJZd93I6/ld+8K/C1g2CCuvSAVaTxs+LvVbHOoYH5j9Gkksu09k/od9vSrC6evfQ lHjtaruLnjto5a7Lkus5bBGeT/FyBAmfFPRpalDstko2sTF6bX2s0EvvL3yLxQbFRA D/BxYTeggJ9Yw== Date: Fri, 3 May 2024 23:14:10 +0100 From: Conor Dooley To: Christian Marangi Cc: Hauke Mehrtens , =?utf-8?B?UmFmYcWCIE1pxYJlY2tp?= , Thomas Bogendoerfer , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Florian Fainelli , Broadcom internal kernel review list , =?iso-8859-1?Q?=C1lvaro_Fern=E1ndez?= Rojas , linux-mips@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Daniel =?iso-8859-1?Q?Gonz=E1lez?= Cabanelas Subject: Re: [PATCH 3/6] dt-bindings: mips: brcm: Document mips-cbr-reg property Message-ID: <20240503-dreamboat-satin-4e51e27643b1@spud> References: <20240503135455.966-1-ansuelsmth@gmail.com> <20240503135455.966-4-ansuelsmth@gmail.com> <20240503-oncoming-taste-bab71375b67c@spud> <66353c11.5d0a0220.bb93c.fb57@mx.google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="KIHwxf5kbowPiFqn" Content-Disposition: inline In-Reply-To: <66353c11.5d0a0220.bb93c.fb57@mx.google.com> --KIHwxf5kbowPiFqn Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, May 03, 2024 at 09:33:35PM +0200, Christian Marangi wrote: > On Fri, May 03, 2024 at 05:21:41PM +0100, Conor Dooley wrote: > > On Fri, May 03, 2024 at 03:54:03PM +0200, Christian Marangi wrote: > > > Document mips-cbr-reg and mips-broken-cbr-reg property. > > >=20 > > > Some SoC suffer from a BUG where read_c0_brcm_cbr() might return 0 > > > if called from TP1. The CBR address is always the same on the SoC > > > hence it can be provided in DT to handle broken case where bootloader > > > doesn't init it or SMP where read_c0_brcm_cbr() returns 0 from TP1. > > >=20 > > > Usage of this property is to give an address also in these broken > > > configuration/bootloader. > > >=20 > > > If the SoC/Bootloader ALWAYS provide a broken CBR address the property > > > "mips-broken-cbr-reg" can be used to ignore any value already set in = the > > > registers for CBR address. > > >=20 > > > Signed-off-by: Christian Marangi > > > --- > > > .../devicetree/bindings/mips/brcm/soc.yaml | 32 +++++++++++++++++= ++ > > > 1 file changed, 32 insertions(+) > > >=20 > > > diff --git a/Documentation/devicetree/bindings/mips/brcm/soc.yaml b/D= ocumentation/devicetree/bindings/mips/brcm/soc.yaml > > > index 975945ca2888..12d394b7e011 100644 > > > --- a/Documentation/devicetree/bindings/mips/brcm/soc.yaml > > > +++ b/Documentation/devicetree/bindings/mips/brcm/soc.yaml > > > @@ -55,6 +55,21 @@ properties: > > > under the "cpus" node. > > > $ref: /schemas/types.yaml#/definitions/uint32 > > > =20 > > > + mips-broken-cbr-reg: > > > + description: Declare that the Bootloader init a broken > > > + CBR address in the registers and the one provided from > > > + DT should always be used. > >=20 > > Why is this property even needed, is it not sufficient to just add the > > mips-cbr-reg property to the DT for SoCs that need it and use the > > property when present? > > >=20 > I described this in the cover letter. It needs to be described in /this patch/. Cover letters usually don't end up in the commit history and I din't read them while looking for the justification for a change :) > CBR might be set by the Bootloader > and might be not 0. In that case the value is ignored as an extra > precaution and the broken propetry is needed. I dunno, if the bootloader is bad, you need to set a property anyway, so why not set mips-cbr-reg? > > > + type: boolean > > > + > > > + mips-cbr-reg: > >=20 > > Missing a vendor prefix. > >=20 >=20 > I will change this to bmips,cbr-reg hope it's O.K. >=20 > > > + description: Reference address of the CBR. > > > + Some SoC suffer from a BUG where read_c0_brcm_cbr() might > > > + return 0 if called from TP1. The CBR address is always the > > > + same on the SoC hence it can be provided in DT to handle > > > + broken case where bootloader doesn't init it or SMP where > >=20 > > s/init/initialise/ please :) > >=20 >=20 > Sure! >=20 > > Thanks, > > Conor. > >=20 > > > + read_c0_brcm_cbr() returns 0 from TP1. > > > + $ref: /schemas/types.yaml#/definitions/uint32 > > > + > > > patternProperties: > > > "^cpu@[0-9]$": > > > type: object > > > @@ -64,6 +79,23 @@ properties: > > > required: > > > - mips-hpt-frequency > > > =20 > > > +dependencies: > > > + mips-broken-cbr-reg: [ mips-cbr-reg ] > > > + > > > +if: > > > + properties: > > > + compatible: > > > + contains: > > > + anyOf: > > > + - const: brcm,bcm6358 > > > + - const: brcm,bcm6368 > > > + > > > +then: > > > + properties: > > > + cpus: > > > + required: > > > + - mips-cbr-reg > > > + > > > additionalProperties: true > > > =20 > > > examples: > > > --=20 > > > 2.43.0 > > >=20 >=20 >=20 >=20 > --=20 > Ansuel --KIHwxf5kbowPiFqn Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZjVhsgAKCRB4tDGHoIJi 0hnUAP9FW/ZnwZiInKq0TjTp29MaHp+FKIvw21I9oy9q1490XAEA9Sbv1NW3gSNK H7aTa7HcDyIr55Qx/JZmKHV8oKeXnQQ= =zLrm -----END PGP SIGNATURE----- --KIHwxf5kbowPiFqn--