Received: by 2002:ab2:7b86:0:b0:1f7:5705:b850 with SMTP id q6csp87639lqh; Fri, 3 May 2024 14:23:53 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUBX+gapU5M6pwj8vnvLhrIc87M218qD9ULs/m9lWuT68mvbVh80t37LsffpLLB+0tb0FPFD5SUdOXndsAeAaubYibI9OZ5B3GYDyibiw== X-Google-Smtp-Source: AGHT+IHl2Pz93mzyR5qjwD4W6pxfV0hIm79W/4WVFjK9c4rCsQmNWf9Jh35imK1vvH4secO4Cz2t X-Received: by 2002:a05:6a21:339d:b0:1a7:a3ee:5e4a with SMTP id yy29-20020a056a21339d00b001a7a3ee5e4amr4807433pzb.33.1714771433295; Fri, 03 May 2024 14:23:53 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714771433; cv=pass; d=google.com; s=arc-20160816; b=ovNbiSATSM2yQg15SkFLDx1eKgUF1tqgMP2yOApCnApd1U3wXLUGqXPgaro1wrTig+ PJ99P3rU6P3/OXeP84nxG/YSfu5KtQtiZpeK/l66Zqw2g1da8hyJzx4NxaVV5hwigl1t lB8n6+Ibmu7rGhsaxxUimId1zeA2Jsyp8FPmqgakD5AnELyL3xB1BXXgYsggJCri3oMC kYqX4s+MJYNDGmpfemSv/BdsxuyGDAnYF9HYsAQvaFhZGf/WLvCb+g0lIiv5HKidmgHi c7Q+3dlmvrT2OfdnhlUCs0BQjzp9PxFIhcpnpLwWcXudIpSAILpfMZ6D0ascoN0F3FSa ofDQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:to:from:dkim-signature; bh=UxHnyeDaT3SsXXHJpHgStueHSADUwIVIimkKgSvF4qQ=; fh=XDF4aPF6GGy3T5E/kjKZVS75stNoBhBl0Xr33m3WYPg=; b=USddrQ0/6fdnbW2wQ1za81bjUiY23IIBiLAoyVASzJDKOLyLJ29jiJqIpi7a97qMvQ BgZlbs13pHApfOtJr6vPKLrxnvE9O1YVFPMEojcSg1Jssd8zCaMEzRN2knxVWnz5i+bg tTjp9H/hYGrRHOKoxNIZVU07RSuFZnFipcOqGbxDjlEDENgkX5sO7SJTmhMNvd2bJwFI TLELm30VinxcweuPjURXkakQQkNvwNyOhBZ1/Gqp68trqj8hEKTZ5u6/yv8/go+3IBLC w0sAJeTevMTlAzeAIsyswjJX87hpDTWA7Q9xZRtfKRP+VAM0aYDk/GV35F8A/Rcss6H1 jX7A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=iwazBxnK; 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-168240-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-168240-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id bd30-20020a056a00279e00b006eabed49580si3773980pfb.305.2024.05.03.14.23.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 May 2024 14:23:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-168240-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=@gmail.com header.s=20230601 header.b=iwazBxnK; 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-168240-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-168240-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 02D7628320B for ; Fri, 3 May 2024 21:23:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C793A745D9; Fri, 3 May 2024 21:22:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="iwazBxnK" Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) (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 51E085820E; Fri, 3 May 2024 21:22:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.52 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714771371; cv=none; b=OrpnDJlbRfFiMy/NmqIHFuGGZvUN7oDExrAwl+WAUeHHD4LAsbRpPxQHaSJ/P/hMMMCZuEWShg87k7w+SAKrJd98GdFH72Njv1jl7FFcvGnTHwQZYY0pmXJyCKfvOVTFf3Lk9mHgem+elsqVw2iNPx+PY1QjvG+ZmwVNzsAjk+w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714771371; c=relaxed/simple; bh=4Szzoa+TyTyxXCukvaGo65ZhEOjBu2aeG1aUMemN+Cg=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=RafWm10IvTF2tzq5on7U5Q263QK/x6NdoFJJ89iYmWskCVYLAIxk+3iFM2r/gx4qwc+709RizhwJ90SZBLcWP6G7IzqmkHdz1fAbVJoNp8J0f1jUWBo91DNOHG0jEc7Yu2dB9OVFXHI+lKGKLUPLCnPjuvNwz6W/yA7Z5i6fsA0= 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=iwazBxnK; arc=none smtp.client-ip=209.85.128.52 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-wm1-f52.google.com with SMTP id 5b1f17b1804b1-41b79450f8cso1467425e9.3; Fri, 03 May 2024 14:22:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1714771368; x=1715376168; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=UxHnyeDaT3SsXXHJpHgStueHSADUwIVIimkKgSvF4qQ=; b=iwazBxnKrqiL/iY7WkVFQzUl02KwV0erAYgtCiyQyFr8SZRA7fzLzsR1Cwop2K2kgq 5KRrspvl2YBGcBxnwtDNhcBVoA6oXcCyuGOLjrlNpNdhc5NAopM1zqaQq82JI+daw/R7 xmNxSiXA99MqZFim5Bp8SrVd0SHFPPDgARNfCoY7gOPKUmq3Ha/qBFuTyt89aULLH1eO +FX/rptOM0W9GPuMgfOgMpMW9rgcFxfl8LhdPJXAD59Cqq5GguXPcpDI7AuTtkFski+L QVzGXzizcH7mOvtgWlZKoz1OC4b05QE6hn7TUS84swgbuL7V2+F8gSlBfjBFZsVkSn36 kMnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714771368; x=1715376168; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=UxHnyeDaT3SsXXHJpHgStueHSADUwIVIimkKgSvF4qQ=; b=TYCBHTWEnDORSpRkJAkUe4fw/f12fFxzVPu8BVDO8RBPw/GxU1UTu4zLnBcRFxp+TT UfrFMOKMKoIy8O8pIbx+9gy6O77Vz3RNg0ZXKrsXOhamO46ZVod6KRPdSOAscLmG14Q4 WICt3H8SO2Ki0w5xzDezPvhorLsJzGFII0uXrRc6egG3pHblhk2K6fpJrP1J6IFXjrB/ suYVpGhwJ/kIKc43ICWwoS6L8bQ8eq0nGB/BICUDbNqyZsNutpBxT5hDzR1kC/rNPwLs UDNFJV50nVWuDL+l8AXGtyTmLAtPKM71/nq648cMO6cCE1IZxZljtZLxGShuXBgeUqcR Zzqg== X-Forwarded-Encrypted: i=1; AJvYcCXSkjBKN8chAq6fqHti4QG9r8Se8R6/kxa8axPvUNlet8d9PKjWWdwl3Ec1haqstVBTpc3KYGusqYphwH0RTvpy1ItTKAftXrNWrXuDyV2e0B4zg6Zwhw1Eo3s2YjuSQmCMEHJdLNWmzX61+seWsTvabj5RbuElFbUcPxgMbaUqiFaDxb8= X-Gm-Message-State: AOJu0YykYy7QSffzsCjzGM5KFjGram4v2I8BM3j/xggotnME/VQWLY5J jiRxFt6OiF+LdMPzvs3Afu0fpdzoEna7StDfoG0UxJcqYn2+lkPi X-Received: by 2002:a05:600c:500f:b0:41a:446b:10df with SMTP id n15-20020a05600c500f00b0041a446b10dfmr3160205wmr.12.1714771368583; Fri, 03 May 2024 14:22:48 -0700 (PDT) Received: from localhost.localdomain (93-34-90-105.ip49.fastwebnet.it. [93.34.90.105]) by smtp.googlemail.com with ESMTPSA id g7-20020a05600c4ec700b0041902ebc87esm6918729wmq.35.2024.05.03.14.22.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 May 2024 14:22:48 -0700 (PDT) From: Christian Marangi To: Hauke Mehrtens , =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= , Thomas Bogendoerfer , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Florian Fainelli , Broadcom internal kernel review list , Christian Marangi , =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= , linux-mips@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, =?UTF-8?q?Daniel=20Gonz=C3=A1lez=20Cabanelas?= Subject: [PATCH v2 3/5] dt-bindings: mips: brcm: Document brcm,bmips-cbr-reg property Date: Fri, 3 May 2024 23:20:59 +0200 Message-ID: <20240503212139.5811-4-ansuelsmth@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240503212139.5811-1-ansuelsmth@gmail.com> References: <20240503212139.5811-1-ansuelsmth@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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. 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. + 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 + 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 ] + +if: + properties: + compatible: + contains: + anyOf: + - const: brcm,bcm6358 + - const: brcm,bcm6368 + +then: + properties: + cpus: + required: + - brcm,bmips-cbr-reg + additionalProperties: true examples: -- 2.43.0