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 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 95700C433EF for ; Sun, 31 Oct 2021 22:01:51 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 51507604DC for ; Sun, 31 Oct 2021 22:01:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 51507604DC Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=9BQwPAdgocHrKqEd7dNQuvCWEM/5hiPxYEkxjmRTpHI=; b=GGX6iDPWeL55mK aEhxsX/uW5YLy/T/Jdj1X055I4Mqg0Tarpmnhwv0GWGD9sWQAh+DuFAs8h+xI595Gq7EJL6RRwcvi +cDRZZE+eGAsO3JrDygaokFWQcUZyjYEutg8eWFnZndSXo93GyilfYysumq3EfDfQiotuPa8yVWxN 5dNLss/8428TN2PUgK3yObu6X83fPmwxNYrQo1vybFk6aX+MuCCCm1FmO5w+RCTZI/UganGLhvhDZ 4ZGAWyF6h6hk7+MkOFe5pyinTjDPDoS+lKpvPxdINWOU/Ax0ZZDB84nCk6YJsh2w9BOHKrPlWyVIw 9Dml5wnWb7IG/eRhZ2rg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mhIrr-00EloQ-FC; Sun, 31 Oct 2021 21:59:55 +0000 Received: from mail-ed1-x532.google.com ([2a00:1450:4864:20::532]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mhIrn-00ElnM-6g for linux-arm-kernel@lists.infradead.org; Sun, 31 Oct 2021 21:59:52 +0000 Received: by mail-ed1-x532.google.com with SMTP id h7so58795238ede.8 for ; Sun, 31 Oct 2021 14:59:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=09tEUv5Pi4zmLS18Hb1uKDpyMm0U+qPl49dllrip6RQ=; b=NCaENn9MM8pVshKjZ3XkwgH1nJLaF7wVaIqe83GIw3IcBzaTo8QlodYGYjzCO/H66K JcuLMmPQteF2Tgs79MnSAefh7nRqHgSXdcdVIeuVmlNNMNyqTV71RrXRct9cJBL2Pu6K ERORJIn3gsuWRezs/1AJPeu0T4GW7VwhUU6pNKdmXgs/ixMScmml9QuRH+Ex2rZ3kO8y 1TR4T+O+jjO7j1gu/y+W6EV5cY/YnA0qnsJdV8NVguDTOC3FfjGaKAJqXAB8KzCCJH9G kiXVedYmkdKHk9h0pcJH1GS3bjYA4ADsmANSeiwslzLfjqCyIE8/vx29j5cZ+Lk+DyG3 KoIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=09tEUv5Pi4zmLS18Hb1uKDpyMm0U+qPl49dllrip6RQ=; b=TCjY/yjVLSkvG/0tIpv6OYy4Ep+/R0diiChMW9GFCBvEQ2gwo/3QnyzKVp3ztRbroZ F7IvI5lUY7bPdk2eLbUCStaylkSxfhFbr1ei2YLfT9z2ceVnjetx5pEKVnyZd6rLrtTy dezwJUM2e1M2f32XN38s5JcQGirSxn2Gf5h4BC8a7E86kE6d6Sa5zX/NJnmRouWcrhU/ Rf5NkkAGJvSKZtm7UU4ND1sRd4L08Zh9xPc4aoRxPaytyTJOiCgWIdezvH2lcIzt2+5k yZcoxl6AzRKwOMpm0kj+VgBQGtFmc6ZB3iaFWLSpnnqc1ME7VlW+ClBF8hpKx07Hzdre pCFA== X-Gm-Message-State: AOAM5323UfIGGjfg0/aqwDKmd9Fk8+ThGI1R3Rh/indfTifkI/mnb0KD /IMSLvut84YOxSOF20iUa60= X-Google-Smtp-Source: ABdhPJyxGAZwDuU/sGXUZ7wuLLoOLXRibhHMwUNBUNeuP/UMhvIcym3JFe6v0ISzHeTRSn1i1iJSJg== X-Received: by 2002:aa7:df8f:: with SMTP id b15mr23157253edy.202.1635717586307; Sun, 31 Oct 2021 14:59:46 -0700 (PDT) Received: from ArchLaptop ([2a02:ab88:368f:2080:eab:126a:947d:3008]) by smtp.gmail.com with ESMTPSA id lb12sm6038887ejc.28.2021.10.31.14.59.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 31 Oct 2021 14:59:45 -0700 (PDT) Date: Sun, 31 Oct 2021 22:59:46 +0100 From: David Virag To: Krzysztof Kozlowski Cc: linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] samsung: exynos-chipid: add Exynos7885 SoC support Message-ID: References: <20211031175329.27843-1-virag.david003@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211031_145951_282266_1E1E112E X-CRM114-Status: GOOD ( 41.67 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Sun, Oct 31, 2021 at 09:56:01PM +0100, Krzysztof Kozlowski wrote: > On 31/10/2021 18:53, David Virag wrote: > > Exynos 7885 has product id "0xE7885000". Add this id to the ids with > > the name. > > > > Thanks for the patch! > > > The downstream driver sets sub_rev to 2 if we are on Exynos 7885, we > > detected sub_rev 1 and the 27th bit of the revision register is set. > > There is no revision register in older Exynos boards, so it seems you > speak about new version, but please mention it explicitly. > Yes, the 7885 has the new version with seperate registers, that can be used with the 850 compatible. > > This is presumably because Samsung might have set the wrong bits on > > rev2 of the SoC in the chipid, but we may never know as we have no > > manual. > > > > Both the SM-A530F/jackpotlte with Exynos7885 and the SM-M305/m30lte > > with Exynos7904 (rebranded Exynos7885 with lower clock speeds) seem > > to have this bit set to 1 and have a sub_rev of 1 otherwise, but the > > downstream driver corrects it to 2. > > Let's replicate this behaviour in upstream too! > > No, let's don't replicate weird vendor behavior without understanding > it, unless there is reason to. Please describe the reason or drop it. > Fair enough, I included it because as I understand Samsung made a mistake in this revision's chipid regs and set a wrong bit, so if that bit is set we should report revision 2 as it is actually rev2 just with a broken chipid. At least this is what I think has happened but we'll probably never know. Will remove in v2 then. > > > > Signed-off-by: David Virag > > --- > > drivers/soc/samsung/exynos-chipid.c | 9 +++++++++ > > 1 file changed, 9 insertions(+) > > > > diff --git a/drivers/soc/samsung/exynos-chipid.c b/drivers/soc/samsung/exynos-chipid.c > > index a28053ec7e6a..ec8c76275aec 100644 > > --- a/drivers/soc/samsung/exynos-chipid.c > > +++ b/drivers/soc/samsung/exynos-chipid.c > > @@ -55,6 +55,7 @@ static const struct exynos_soc_id { > > { "EXYNOS5440", 0xE5440000 }, > > { "EXYNOS5800", 0xE5422000 }, > > { "EXYNOS7420", 0xE7420000 }, > > + { "EXYNOS7885", 0xE7885000 }, > > This looks good, but please rebase on: > https://lore.kernel.org/linux-samsung-soc/20211031205212.59505-1-krzysztof.kozlowski@canonical.com/T/#u > because we use one compatible for entire family and I would like to have > it documented which family is this here. > Sure. > > { "EXYNOS850", 0xE3830000 }, > > { "EXYNOSAUTOV9", 0xAAA80000 }, > > }; > > @@ -88,6 +89,14 @@ static int exynos_chipid_get_chipid_info(struct regmap *regmap, > > } > > main_rev = (val >> data->main_rev_shift) & EXYNOS_REV_PART_MASK; > > sub_rev = (val >> data->sub_rev_shift) & EXYNOS_REV_PART_MASK; > > + > > + //Exynos 7885 revision 2 apparently has the 27th bit set instead of having > > + //a sub_rev of 2. Correct for this! > > Not a Linux kernel comment. This will go away anyway, but please read > the coding style and use scripts/checkpatch.pl for future patches. > I did run checkpatch on it and it said nothing but yeah I forgot about that. My bad! > > + if (soc_info->product_id == 0xE7885000) { > > + if ((sub_rev == 1) && (val & 0x04000000)) > > + sub_rev = 2; > > + } > > + > > soc_info->revision = (main_rev << EXYNOS_REV_PART_SHIFT) | sub_rev; > > > > return 0; > > > > > Best regards, > Krzysztof Best regards, David _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel