Received: by 2002:ab2:7b86:0:b0:1f7:5705:b850 with SMTP id q6csp37609lqh; Fri, 3 May 2024 12:33:50 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUWUzrD8qZJSQH+fLF9hxhuWZVtdd5+LgnhwVRtz2/Jb/zEifKAg5LB6pyAcC3JHCzaDhd/cUjpLC8G/FaFbeimmS7yvFPo+rcbGqN/aA== X-Google-Smtp-Source: AGHT+IFbHZL6AemEtEOAQs6xPt0hGKqahQ/UlZDieDwiWmUHQTO6RLenWLM1SNdODvGul8IZMNfI X-Received: by 2002:a05:6808:1b21:b0:3c7:366b:980a with SMTP id bx33-20020a0568081b2100b003c7366b980amr4853535oib.5.1714764830173; Fri, 03 May 2024 12:33:50 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714764830; cv=pass; d=google.com; s=arc-20160816; b=Y4uJVffg3edIAI3sPhUfAXOQm5dJZj46eaxV7RqTK0iynqqw/qtvi0NyaJEq/xUZg6 kFKT2GBmr1BC4pnDgoDGkFHYyiv5Vh6HtbWdEP9u4/tq+4nWsApD+obEyTPVd11+t28A 4a2l5WvMMy7hcZTgBNtF93SUTgfkcEsfZGff5BlXqdgJRCM6D8hrRFQpXZPpk5KLw4LG DhaeCEiQj/a8+BKAz30zz5DNunIyJEQ7Gjh9u/Z44ni1tTryOndAswt0u3oN7NGXRadP BaB+2uO+y/MH6CR9kZE8JeorZEXX72wUHEiSLuM4Rj0NYxmrOK40mR7jnW+xLlWyUAiD RlEw== 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:subject:cc:to:from :date:message-id:dkim-signature; bh=UbjwZx8MEe2bGhAnyoiiAxBTi8jV9NStJqBk4W+NrSE=; fh=CG7z0pf1SbSwjTERikTTOO/8rsXh9Zhee7k2cUK7iZo=; b=vZqmUQSyIudqbfcXZxDffw3GPzbmGfPhrhyMvoYpF6IwEy434Z2fRWu0y7R2FI89UP 6Dvhqs1Biqvyj++/gHiEkGrVdqr0WKZIGNMan4Nl88icECEoShGaXbY2qZaWnqO7+EN7 39HXf4+Uaw3NGgTHgXjz+8gorF7YvYJeXcXqVVxnxQXbGyKBP2Vk1Wr7fIPid3+J3OkY QQVluPz0nJ4roFCj2paOoAa5mxRgKT3ANWfBKyJ6ejVirkZFey6YREA6SHOjtaSddANv cIKJSAB6B/Y2TogDKb1hdwdpnwz/r2jrHtynVTvUmjTw6q7/1LbKG0TwzD46sFjKNVDE 6GMQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=DrAs+DQF; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-168137-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-168137-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id 4-20020a0562140d4400b006a0ce0ced42si4061703qvr.607.2024.05.03.12.33.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 May 2024 12:33:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-168137-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=DrAs+DQF; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-168137-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-168137-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id CEA941C20DC6 for ; Fri, 3 May 2024 19:33:49 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 22B8C339A1; Fri, 3 May 2024 19:33:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="DrAs+DQF" Received: from mail-wr1-f53.google.com (mail-wr1-f53.google.com [209.85.221.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 995BE134B1; Fri, 3 May 2024 19:33:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.53 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714764822; cv=none; b=YqGqAwdRhWh85IUegXlPrJaf//LAGlWDPGMASyU9e2Kbomy19vXvClDBWGxrM07BLdA85sJf688VpJ1LfFMSCnW6wZLVs1Ndr1ArHpaU+j2gYtsuTMsna2tcnLShS9699fdSz/+dsMsH9pop4sagiZXSvh2nXSasgv00E96v5lk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714764822; c=relaxed/simple; bh=WnxtnG5F2ZSL/UrBBiWEVqdNo/iZ7mg4Zelf0DhwJxQ=; h=Message-ID:Date:From:To:Cc:Subject:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=bRgRpZKBCrYZEl/Wz4RMfkjfHBUFFjmrY4aI2k5N9auzZ/mbU2/H5Xt2NgLHrcHEqVfTP/8KuAGljNBWBTxtckF4ndlENJ5NHFMGmDa6JOfJkTyRp70Z6jpAqTJ+ozAZcNFYSgvAiZNbTPo8GWUPgnj/MEXDkQvwbcckgATRYek= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=DrAs+DQF; arc=none smtp.client-ip=209.85.221.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wr1-f53.google.com with SMTP id ffacd0b85a97d-34db9a38755so17805f8f.1; Fri, 03 May 2024 12:33:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1714764819; x=1715369619; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:subject:cc :to:from:date:message-id:from:to:cc:subject:date:message-id:reply-to; bh=UbjwZx8MEe2bGhAnyoiiAxBTi8jV9NStJqBk4W+NrSE=; b=DrAs+DQFQxof1k8TdfrTPbD4Bm6gOTB85mevASfsK1riDv6PsDCc4G5Xiq0kF14YE5 ZFdMilYrN+fPf00pxM80PDKXuAW/5Viv2Uc3CMGhuLW1L7w1mKRqzxb7pauSJsE7kHQR PYQWIUuVVo7GGn0g6SZi1QnSi9EuNfyWwELgTasbp6rdyMf7T2eb1wMWIeOcoWgzoSde wSpWtWJThYcFTcTOrxNXeH0O0/u8CS8WofOa72BXdz9D/V4Exwe/07QsvQZElVHrOJ6r GLkG9nSfS3h+VnarFnSg9i408poc+3QnMxJKhhT6iiyhFUelUp/R013D4YJW27smhyAx TF5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714764819; x=1715369619; h=in-reply-to:content-disposition:mime-version:references:subject:cc :to:from:date:message-id:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=UbjwZx8MEe2bGhAnyoiiAxBTi8jV9NStJqBk4W+NrSE=; b=FvYqXD3s90lfB9JG9ggrwi1FcnnAy6vULij0WqjJDrhseKOCvqwN2HC221IVPGGEA9 UGR+uCpR8EvtitJ+LKLKeNy+KxOGo2ROUOOT7hAL8qXP7dKEh0Bg6w2xg0XfFkBMYgYD 72U/7H1Jg1qVvejuc5jT0Yx4R1hdDfwn4X9KBBOs5c6JshaugKoYqkdyy2uNWorSO+u3 5ZWjvdUWWY3mF7RTIfFy4wjUFZfmGrezOXpeVHrGai/Zn9jXRqplT1rag0a0owzzarPG RfBwZXofHvFHFDoD4GWARtTZqD07FklcwRowE81mXl1IQ1lEUeLXo6uYG1hQfqaDoqj5 4IOw== X-Forwarded-Encrypted: i=1; AJvYcCUTOMPjClPu3qKieCsq58I/KGeuZMRh7iF2QpCOVciS4qUlSIF05R28ifYWj3rTPOgHelq+uLvac7K8QEGbGm+cX9Kkjb6jT02NAOJFikD7FwDj7LfxRP+/ZgmI3sGpw9iPJjpU/g2oBQH9KEepKpCidG3mjz5DrvGShYHdpIzOQXrcQb0= X-Gm-Message-State: AOJu0YymOq5wPThFWuC1JNSiM9zSIyuVG8FGAgDNKJJQBgBgfHNpcOUS 384B2eXsBUddqPUw9YI16lhoQ3ddot0goIUYihhSLEZEveoDyQhs X-Received: by 2002:a5d:5483:0:b0:34a:35c7:22a3 with SMTP id h3-20020a5d5483000000b0034a35c722a3mr3218989wrv.20.1714764818605; Fri, 03 May 2024 12:33:38 -0700 (PDT) Received: from Ansuel-XPS. (93-34-90-105.ip49.fastwebnet.it. [93.34.90.105]) by smtp.gmail.com with ESMTPSA id g4-20020a5d5404000000b0034ca136f0e9sm4457292wrv.88.2024.05.03.12.33.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 May 2024 12:33:37 -0700 (PDT) Message-ID: <66353c11.5d0a0220.bb93c.fb57@mx.google.com> X-Google-Original-Message-ID: Date: Fri, 3 May 2024 21:33:35 +0200 From: Christian Marangi To: Conor Dooley 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 References: <20240503135455.966-1-ansuelsmth@gmail.com> <20240503135455.966-4-ansuelsmth@gmail.com> <20240503-oncoming-taste-bab71375b67c@spud> 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: <20240503-oncoming-taste-bab71375b67c@spud> 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. > > > > 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 > > "mips-broken-cbr-reg" can be used to ignore any value already set in the > > registers for CBR address. > > > > 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..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 > > > > + 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. > > 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? > I described this in the cover letter. 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. > > + type: boolean > > + > > + mips-cbr-reg: > > Missing a vendor prefix. > I will change this to bmips,cbr-reg hope it's O.K. > > + 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 > > s/init/initialise/ please :) > Sure! > Thanks, > Conor. > > > + 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 > > > > +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 > > > > examples: > > -- > > 2.43.0 > > -- Ansuel