Received: by 2002:a89:288:0:b0:1f7:eeee:6653 with SMTP id j8csp505772lqh; Tue, 7 May 2024 06:10:44 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWioPp9zc0GiMRfBreuewLUhBa1j31ohzm1X0PDzB7L1m1HkMU8eeaVtwS6MEgNxnHs81lauZLWj7WpmStYLW2wQt0WPYaljjs0uN0pWw== X-Google-Smtp-Source: AGHT+IFgQgGTfsqDGte5xfK/tdUt4B/bm2GzrG0DvIfEUBUMabTS+tKfn0WHad+W57b+OD2zdK12 X-Received: by 2002:a05:6808:1898:b0:3c8:7599:d6a3 with SMTP id bi24-20020a056808189800b003c87599d6a3mr16813800oib.11.1715087444238; Tue, 07 May 2024 06:10:44 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715087444; cv=pass; d=google.com; s=arc-20160816; b=ucrWLRI7253NDKYX+40ExAQsWAYSzrmM8JTLXucivZtHa32ha1oNmgKqhMmcV/kq7d NEi6kj60sjKOcrYNBrNhrz/kdQQWtc8QfJ6jbb0woQtVqzaUJuHctFQrkrvATWWgSz52 zhKvwAeFx1CRkVDrVZcQuffvNsHQwDCCigoaS67u9ytKNfgcnc58u8/eD3ChZXrx9XiX l/thdNddHos0Z+6ZlX/I8KxEbDZZGvcarSzkPQ7R6ier0LEKJQHZRdhVB7lbLufuDzy2 wXY2mQbjjvbIviy8SQgrSbgKuclXB2k0cPlbLaKQG5JPdoDa3Cn9jUs1NA3B7gvdeoyy VSPQ== 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=Ium5QtV4Zm+fkgKH5HUjlfKQr8Jc4bbJfgJ+c3MOGsQ=; fh=7wGmzw1UO2Erq5MzXphDlHhFdb1u2UDyS0VzslOrevw=; b=dKGsEg5w/2FBmUj7JwNvvKZaolW3YAE5Iqb1Vefr+dM1Kht1V7pevKLL7J4h+4m4kN VhYwT7USejZOzjCpFELTL43VsjBLqSpL4sLayroDWhgcAyw4Qdp5ll0MVaw1KvvjN6Vz WcHoN8rliegTUFwSkYNfAMb7RpGSxtXY/r29cIjDrxXo2id6O1FPEA6Q8j0hSq5juu4S 6LD9hzk+DkJxjwTcfLqNwy5ewPOEDLedfpby7XWW12tPKm0cxIWKHyAtsAc7EDJCGF3K 8VRdPeW7j1r22uxP4xJd5BABtdq7bSFM1O7gv8EFoxfZXylLQTQ9Yx0Lt2iPtLXJCaol Bqcg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=M3ee16o3; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-171343-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-171343-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id 18-20020aca1212000000b003c96fa12d36si1332203ois.52.2024.05.07.06.10.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 May 2024 06:10:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-171343-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=M3ee16o3; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-171343-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-171343-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 3F20828553A for ; Tue, 7 May 2024 13:07:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 63FDE15E1FD; Tue, 7 May 2024 13:07:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="M3ee16o3" 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 844D615D5C8; Tue, 7 May 2024 13:07:32 +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=1715087252; cv=none; b=GNNFBn8PjcqlGt4M2RQx9EU4m2o8RoHg/PiBZREOFXX+7ErqK2JGz093ycUiLM8y0c6iZTlihwSzO21+W27OwVYhXCQPHdrWq2AaQeXA1dFwxu1gsaD+kInX7s0aDedlHEyqb0Qv+4KefVA0EJ9PnfKTHwC2EyHI34YOF566U4o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715087252; c=relaxed/simple; bh=07xKq6uVQTOhZY1PkzNIAHYYpUnqYhkmoVQ+zhvB8bk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=jXR2TZ6UJEZsTrtOJos79XzDcFg0MktrH2nV5QtHkCFBkDO+BTu1gS9+R6rufcWesWYZmDGOo00bd5bOwsVqJEvhg09JqVQXTRUANn/HARxys/KnjnI45gvlgBkZXDwvaxF6jLB7Mk4NUi0vwbhNqDWC++NVgV7c75qP8G0pn/A= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=M3ee16o3; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id D4074C4AF66; Tue, 7 May 2024 13:07:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1715087252; bh=07xKq6uVQTOhZY1PkzNIAHYYpUnqYhkmoVQ+zhvB8bk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=M3ee16o3tJya6jdSpMwrMODwS3xpR7LVqzMd2sfXnEaMWgRrvo/PD1fYFfraXarDl GNhPz4+37jHHVtZDgkLkj1/KG9w3bx//fmkolbNT8gV0c5bZUlh/emW7rl63XV5bUi QS0QFAzoSfE56v0PgKCKBkY5s+oz8gCwSDMRFLMgtMdqmJNjaJaStmhbtmTU7Puhx0 uHxEgb1a/8+xxLgxV5cKQuCaiCHMF2DIITnznvlt4ESsZEoaEPL4VupnYkzTBK0bNk Zf8ZmIY/8XvcG1XEeSZVBYbUBYlF7QuV2CcL1mb1XBjRHboqBmafjXE0B280/Bw/sU +9EWo4Er6QUxQ== Date: Tue, 7 May 2024 08:07:28 -0500 From: Rob Herring To: Christian Marangi Cc: Hauke Mehrtens , =?utf-8?B?UmFmYcWCIE1pxYJlY2tp?= , Thomas Bogendoerfer , 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 v2 3/5] dt-bindings: mips: brcm: Document brcm,bmips-cbr-reg property Message-ID: <20240507130728.GA43076-robh@kernel.org> References: <20240503212139.5811-1-ansuelsmth@gmail.com> <20240503212139.5811-4-ansuelsmth@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240503212139.5811-4-ansuelsmth@gmail.com> On Fri, May 03, 2024 at 11:20:59PM +0200, Christian Marangi wrote: > Document brcm,bmips-cbr-reg and brcm,bmips-broken-cbr-reg property. > > 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. > > Usage of this property is to give an address also in these broken > configuration/bootloader. > > If the SoC/Bootloader ALWAYS provide a broken CBR address the property > "brcm,bmips-broken-cbr-reg" can be used to ignore any value already set > in the registers for CBR address. Why can't these be implied from an SoC specific compatible? It's not a great design where you have to update the DT which should be provided from the bootloader in order to work-around bootloader issues... > > Signed-off-by: Christian Marangi > --- > .../devicetree/bindings/mips/brcm/soc.yaml | 32 +++++++++++++++++++ > 1 file changed, 32 insertions(+) > > diff --git a/Documentation/devicetree/bindings/mips/brcm/soc.yaml b/Documentation/devicetree/bindings/mips/brcm/soc.yaml > index 975945ca2888..29af8f0db785 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 > > + brcm,bmips-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. Why wouldn't brcm,bmips-cbr-reg being present indicate to use it? > + type: boolean > + > + brcm,bmips-cbr-reg: > + 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 initialise it or SMP > + where read_c0_brcm_cbr() returns 0 from TP1. > + $ref: /schemas/types.yaml#/definitions/uint32 CBR is never defined anywhere in this patch. > + > patternProperties: > "^cpu@[0-9]$": > type: object > @@ -64,6 +79,23 @@ properties: > required: > - mips-hpt-frequency > > +dependencies: > + brcm,bmips-broken-cbr-reg: [ brcm,bmips-cbr-reg ] The inline syntax (i.e. []) means you need quotes for commas. This has no effect because you are applying it to the root node. Needs to be a the same level as the properties. > + > +if: > + properties: > + compatible: > + contains: > + anyOf: > + - const: brcm,bcm6358 > + - const: brcm,bcm6368 Replace anyOf+const with enum. > + > +then: > + properties: > + cpus: > + required: > + - brcm,bmips-cbr-reg > + > additionalProperties: true > > examples: > -- > 2.43.0 >