Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp2357104pxb; Sun, 31 Oct 2021 13:57:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy45Pg4TQUhjlJbVNyqaG6ReJL5qcumHHg7qDw7LLmt0I1JsL96yWkRrFHeuaiuFbFktVRq X-Received: by 2002:a05:6638:134f:: with SMTP id u15mr18018777jad.7.1635713831673; Sun, 31 Oct 2021 13:57:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635713831; cv=none; d=google.com; s=arc-20160816; b=iJeZnYOxVZgH5rKiqBnfveiOacNnPDMOLHxoXyEhJ8+1t63rnhizTt6LuZOLzOi5UP y3227235WiMB9hMSab/IHQMSAU0y1Y0Hbm0ZSl/73CrU7PIkYUaW6VrdSGzjLcSwrb2E pnnmo0Q9krUlCHDCdkMOjOZTkc+AvtvBRFz1r1xcTg+Z/t6IZQHj0rFeEmPMX1qJIuQT pXZSLGxwm7LX/cuIci7q4nYDke2kOy1i8yaYpsi63WDkCaouH/TI1nOAsFv43Ya0LKeC q+Zz8cU46KKRlzvG+Zuoaxz3xpeDEzrv/I8kmqCGxIbaIjVrIGYAaj3xy1GXrD9KgvGZ XYFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=7KiWIckEg5DsudTTcPUNNjrowRj4bFQWmsKz8u+RWuU=; b=GudRtLUp5JrJnCC0UvvqJSFd5emR8WwOW0a+qNBhSJ9zmu4+svA9RFd15DnLtOiHMQ H3XBPlw2Q4wk9PnJe81W/mD+5S0G+o+EzZZXnqXGmR2c/jcC+8He8WDBwAQ+yMc2uvmi dlUHLAUW8i+l1X88FysRL8y6lMoNYmsTJaX9zh8GG3Dnk/SSGocvvfqbDrkwDTMlfGtR Em7EOFJQ4pZ37Yl32eo7HqPFDx1pilKuzpajqNOvvV87aC1jh3ifRzdC3yq4Yl1WtxGW E5ax0fhckBcOy3DJPtEghrrzdyTT+xdIwsSHZYL/XmCRfyIcXoEZP8wykQTmILfRhaXO TdKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b="AEYOECt/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 15si14002748ilt.5.2021.10.31.13.57.00; Sun, 31 Oct 2021 13:57:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b="AEYOECt/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230152AbhJaU6h (ORCPT + 99 others); Sun, 31 Oct 2021 16:58:37 -0400 Received: from smtp-relay-internal-0.canonical.com ([185.125.188.122]:48790 "EHLO smtp-relay-internal-0.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230121AbhJaU6g (ORCPT ); Sun, 31 Oct 2021 16:58:36 -0400 Received: from mail-lj1-f200.google.com (mail-lj1-f200.google.com [209.85.208.200]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id 4B4023F16F for ; Sun, 31 Oct 2021 20:56:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1635713763; bh=7KiWIckEg5DsudTTcPUNNjrowRj4bFQWmsKz8u+RWuU=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=AEYOECt/0sECea+eC9L8DNRA5KL7TtLlJ0Hz1NQcCkVoeppDy2d5griuaKrFks1kK btd43w9KtNRRJf3CsdHt9duN2RZ6fqMX97WgY11Js/PSEU06Lt2mucdmnohdFo42Sm q0tNAtAyNpkXTUb8xA6kZbwgM12bZANQxbWVQbbmGdsfGu7PqkFq5r6q+XybXDxHRc D3rp3LhMA2bXJOwryNDCew7r9jgCBeAu98rHaNskE7ubQBJyubvJw4y6n3Lc37pfex 5+Yg4CwQLkFTCBvk7QK1VzKeUby1p2KenWhlsen4XIpw93qCG1oQkpDQiP+pXqRX74 MsSSthfEqfkPQ== Received: by mail-lj1-f200.google.com with SMTP id s17-20020a2e2c11000000b002119b8e1336so5090774ljs.23 for ; Sun, 31 Oct 2021 13:56:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=7KiWIckEg5DsudTTcPUNNjrowRj4bFQWmsKz8u+RWuU=; b=ii04P3A7a8nYQaP4O+jYYBfr3Uw2Q9KOQFv7dByUHKngQ8o6LOm270wM7T30uR5M1w Qc1ZAZI2Bdp3Jd96kUXWqI3A4CD8b4ajcfTYylhR21iz/EJ8pBRN1riMqDBbi4rJCIOT 5E4gk5Aj0MOmvO15pHjQ/zlVK3L0TVNC79o/6ToYysY8Kv4dJsPVRN7IMIzc3Ydtxdx5 e6DdbNqgRYdyipQNPcAbAyXqt9XuhOpspWkqU41cxBE9vdaGOCv4F4zscIcnU8cExWEv hcaVXylNSMLJUNefBosUxwXIVk/BWMciGALtUnO2NMyaf91ZqFTBZ4QpCXr6n/EwEpfn wmKQ== X-Gm-Message-State: AOAM531I9/wlcgCl+ioboLpJ/lic4BkgECTcYM36m+msdOBS6bDjJ8xm 2TDHK+h442yuKIft7nh9SB7eVCdjAy1CaY6HjUWBDNuUzcAUw4s+QLjLQipb2HF1DRn7tTpwLcR LrhR9OqKVVf1bTUCTWsZzMDd10Spu46IAlvwPuZ1Giw== X-Received: by 2002:ac2:5f58:: with SMTP id 24mr3812068lfz.22.1635713762472; Sun, 31 Oct 2021 13:56:02 -0700 (PDT) X-Received: by 2002:ac2:5f58:: with SMTP id 24mr3812057lfz.22.1635713762279; Sun, 31 Oct 2021 13:56:02 -0700 (PDT) Received: from [192.168.3.67] (89-77-68-124.dynamic.chello.pl. [89.77.68.124]) by smtp.gmail.com with ESMTPSA id 185sm978769ljj.23.2021.10.31.13.56.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 31 Oct 2021 13:56:01 -0700 (PDT) Message-ID: Date: Sun, 31 Oct 2021 21:56:01 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.1.2 Subject: Re: [PATCH] samsung: exynos-chipid: add Exynos7885 SoC support Content-Language: en-US To: David Virag Cc: linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org References: <20211031175329.27843-1-virag.david003@gmail.com> From: Krzysztof Kozlowski In-Reply-To: <20211031175329.27843-1-virag.david003@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. > 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. > > 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. > { "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. > + 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