From patchwork Tue Dec 22 13:04:46 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 346633 Delivered-To: patch@linaro.org Received: by 2002:a02:85a7:0:0:0:0:0 with SMTP id d36csp5306984jai; Tue, 22 Dec 2020 05:05:35 -0800 (PST) X-Google-Smtp-Source: ABdhPJyH47BYg2D9rAL5/8fhGxspy49I/68cvJlLb+gHpsO5FTcWjieXr7YeNWCTC7wkCvzpyvLo X-Received: by 2002:aa7:df91:: with SMTP id b17mr20597016edy.272.1608642335707; Tue, 22 Dec 2020 05:05:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608642335; cv=none; d=google.com; s=arc-20160816; b=T/61QdPckK74hxkNQmAsi1J2/cE9en6LRBdVM8u1TySK94e8EYJkSu7fBqSr5+ov1t f2zYlFXMYSVeip6bW/cjRv/Rk4V0/GWJDCV9Ur5hL4syuMoZSfR5gNhG7rebC2zRkAeB fHsSQT9VIZGr58tEuYXhO+ZCprhTZagE2/FY68c5rWmKVo9oT1Jw1/jRZe4u2cIUKd8n j+AmXocPVf+1YdHILP6sYFfTSjM4sIAKq4IYGcgohweigT3MX7fVrvmDF9GQ0eQAEjqa qSobvF+pD67r7Bn1kkTJ8zOu9LT5ncr1vRvchSVbGNqepDlM6mBRf5Vd5cUNt9SOBXrG X8dQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=Wpybqc2zF0sExp4ldyJqh4OgXlDOdXRdjhp24OFKG1g=; b=VCdHcg9IJ9MfmU7TOhFb3DTFjScJSdgERVhq9OJEj+/8WtnKq7eCFf/uCEOb1ks+ud rNx4Uy+tCZo8ZwyBSE5XQpCm0w1+Ut4MZdq9pW0+Z8+MRm8vhR3pYv/LQDLKEkkrVhjL 99E7gY4SKWfnOix5dZsljoNTexi2bZbg94rBLrFX1MqB9juRJKEzcZzM6zBU9hskv3Iv CgQrBkfThMvjJ8tA/Qa3sUlijASa5FAj8X/ynmNUu3nGRNbvfkiNfxRs01gCme6y1gmU k8x3T5mEMDTVoaS1r3IFgZiiaLF97Nu+MbYVjozD4tHWGLsBy2wR8mxugR0Mseia6YAy WXBQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Ja7q77qb; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u24si10236863ejb.106.2020.12.22.05.05.34; Tue, 22 Dec 2020 05:05:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-arm-msm-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=@linaro.org header.s=google header.b=Ja7q77qb; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726549AbgLVNFd (ORCPT + 15 others); Tue, 22 Dec 2020 08:05:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54894 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726518AbgLVNFd (ORCPT ); Tue, 22 Dec 2020 08:05:33 -0500 Received: from mail-lf1-x12a.google.com (mail-lf1-x12a.google.com [IPv6:2a00:1450:4864:20::12a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0712EC0613D3 for ; Tue, 22 Dec 2020 05:04:52 -0800 (PST) Received: by mail-lf1-x12a.google.com with SMTP id l11so31865893lfg.0 for ; Tue, 22 Dec 2020 05:04:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Wpybqc2zF0sExp4ldyJqh4OgXlDOdXRdjhp24OFKG1g=; b=Ja7q77qbiXPz6qhOj8tbOZpq0HNDMBXjs3FQx1SJ6st9hNmdIdnOphBctK/Y82Ttdv aORcR8xO2lqRjYq//AKd51ro2F7xifUoY5/2RC3g4hrt90jBc6LYzj2GQIWvEGu/rhgh wZJ70oUKB4qeZdZSzYZj5wZ/Ckt4GCgj3hhJrSVeedDoIXrNUogt6neMIySIrbfnGIsE lU1j3SgbbjOwX2tWFHvvr/cNYQ/B/bm5Db7Cosrsmmiu7Y9sDRcpb2CubYWSe/JuOC9Z 71n1Pz3oL9Y9BpX5FoEvWECWSLeN5piPHj2w1JEvasFO3GOIF8ESc/t1CNj5ueQ1fLgx de1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Wpybqc2zF0sExp4ldyJqh4OgXlDOdXRdjhp24OFKG1g=; b=azt9HL6Zqb2s+4sA58r3ULQHZJi7JoaJnHZbD1ZYz0NgKvfJWUYUu1zHZDiMcgQmvM k1wTG3fEJHZg81MORhi3EhvYtSGedffyKhMISeNdiiz5vzxiCS1rpLRnRZOpHHaGwkNS xh09giaCzEUXDHqMmaKcrzj0FbG+P4sCn/rhTfc7W6JrN8HDTTPZVhyBI5eN2ndRjXA8 MuUiNC7WNUI+e3bABIxXkgmns3msk+wj4zoMm4DsTkK+jdCif7BbvLPzhwRSdtbdXq0u QWsI8uo69GXjJk3zFcr0ABS2qV3wEyI6qlsjb4fa78ZvdTJvdTBdOt27mEjHMCjoqUbs S2uA== X-Gm-Message-State: AOAM532UrY+UdFhuN/WboUfSnOLJW5Tbv61dVA19grrfUFxIOR00EAAS 9jhcSt2/KG6O6y9Jr4qChWzG6w== X-Received: by 2002:a05:651c:118a:: with SMTP id w10mr6340515ljo.13.1608642291460; Tue, 22 Dec 2020 05:04:51 -0800 (PST) Received: from eriador.lumag.spb.ru ([94.25.228.224]) by smtp.gmail.com with ESMTPSA id k18sm2864235ljb.80.2020.12.22.05.04.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Dec 2020 05:04:50 -0800 (PST) From: Dmitry Baryshkov To: Andy Gross , Bjorn Andersson Cc: linux-arm-msm@vger.kernel.org Subject: [PATCH 1/3] soc: qcom: socinfo: add qrb5165 SoC ID Date: Tue, 22 Dec 2020 16:04:46 +0300 Message-Id: <20201222130448.4125297-1-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Signed-off-by: Dmitry Baryshkov --- drivers/soc/qcom/socinfo.c | 1 + 1 file changed, 1 insertion(+) -- 2.29.2 diff --git a/drivers/soc/qcom/socinfo.c b/drivers/soc/qcom/socinfo.c index b44ede48decc..cbd59937aac5 100644 --- a/drivers/soc/qcom/socinfo.c +++ b/drivers/soc/qcom/socinfo.c @@ -228,6 +228,7 @@ static const struct soc_id soc_id[] = { { 356, "SM8250" }, { 402, "IPQ6018" }, { 425, "SC7180" }, + { 455, "QRB5165" }, }; static const char *socinfo_machine(struct device *dev, unsigned int id) From patchwork Tue Dec 22 13:04:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 346634 Delivered-To: patch@linaro.org Received: by 2002:a02:85a7:0:0:0:0:0 with SMTP id d36csp5308281jai; Tue, 22 Dec 2020 05:06:57 -0800 (PST) X-Google-Smtp-Source: ABdhPJyUjX/hdmn3SiArc0UaaA/nH1yPoG4StI2YNFqSSG++iIfGsQk9SHVgoxxPi0emGLyMXe+5 X-Received: by 2002:a17:906:3899:: with SMTP id q25mr19386310ejd.173.1608642417583; Tue, 22 Dec 2020 05:06:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608642417; cv=none; d=google.com; s=arc-20160816; b=yWwdmCSOuSVRARGGA9O0b/gZpSabkB5LHubZWioSYBY0uB02zeymQivDXZLpwTZ5Xe 1ha8klGZofOZ1881+r22iJEZUBOKyC1FCMHbrHeRJcdDHQI9FK+xtU20nItQ+UulahFY YJUFDHptnhxDJQVnUgTFjiQj2DSvC4xDyDba5vOCtsrprIpgnQlV4mM6ikKcGSe42dbw tYo1iswWaVY5mZZBbk1dSKIbHVqw48XRLSUMeNG3zKgn6zqDq6N3anMQy96a60755IlA y32XhsXl/u8VMwem+CVfrIVkzxcNIiC7sX39+XG8wUlbGPQZf7y7E6NhKjXEV3izt6Yl Is6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=s3V/TtIufHPkQhmtTrjVzj5+nIzx7UpDGpZLYRgMPKs=; b=GqhtSgCa85dayvczn2NI0CVVQJ1YDKGa9WL8Pk3kUT9sm2GdDEUwwPJVIx3rVWuT2u 6Bo8bEvP/hy86Xv1WyYQQyUnH+wbj9WW8VtZqDkjuUhQoNyB0ek2kBd8OZf1QcbKPf7f dTsn488OYLU+llnXwMvbkAVxxcEM2dfGgCHBd82Q2xnN/G6RVSwknDuBAuofXCeVPmkG qT/A3MPDz5bTZb00L3P5RdlGnLxEW87u5Z9LcpPmBzg7UbDNQ9UVz+Cf58BFqoqD05F1 AL1M5DCU994PkOJo8xnOfZIOiw8oRjQ1V7B8HEd5KPGHYlGCbqVhxgumP2YOxDkUrrC9 OEDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=irN+kovV; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ga30si3298054ejc.733.2020.12.22.05.06.57; Tue, 22 Dec 2020 05:06:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-arm-msm-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=@linaro.org header.s=google header.b=irN+kovV; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726557AbgLVNFf (ORCPT + 15 others); Tue, 22 Dec 2020 08:05:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54902 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726518AbgLVNFe (ORCPT ); Tue, 22 Dec 2020 08:05:34 -0500 Received: from mail-lf1-x12e.google.com (mail-lf1-x12e.google.com [IPv6:2a00:1450:4864:20::12e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 57174C0613D6 for ; Tue, 22 Dec 2020 05:04:54 -0800 (PST) Received: by mail-lf1-x12e.google.com with SMTP id o13so31811262lfr.3 for ; Tue, 22 Dec 2020 05:04:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=s3V/TtIufHPkQhmtTrjVzj5+nIzx7UpDGpZLYRgMPKs=; b=irN+kovVrKnG5RJweP71z1TelLa1u9KQVwH0GR4kcFdtNJ2IgkP8j9TMyfJmrZb+ZO gsIzeTkTGgeNpgW+cOOMz666APb1CiZ/ZpQmyqDXOjdj2MVrK85eL2uaATSwKdXwyyK3 yvQv94CCrXFmaQa77iCluGxPSJqmx0ApAcnckgY/ga9gieZPad5/6wKigrdKW/Xz1nJ0 iIjZfA8EtQdg1qzvINZCIOpxVjgmNxl0Xv2ovEGg8gBh4CZgz9xzKMx6FDQYNbJX0anL TgMEbEBULznVgxoIC/aiWAHEmd/fC4PSXsPaDaNhla2L2UZAGtup3PmwRt5LM128N7F+ klwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=s3V/TtIufHPkQhmtTrjVzj5+nIzx7UpDGpZLYRgMPKs=; b=oz0UCyM5Y3dacUOqV3I0foTxe7jwKLhW/qCjKSGBYqoL9SGz0ev3ug0lEvx/I+lppU qGjFWVoZyEXvodhpNQLAHbVy+Gh6f/lGtTtCxt4Bcl+FdStsHCpghmnRW+OjGER88NUe /qkGokvPtcjht4cRcer/ZHM3AFc7fU0ZocQfUN2d/H4FAQ11uGn2DeAgW212JH8l6F/Z 37TdWEauLRAQHxppPf+I8KPBZZRfZzaksixew+1wSlkp4AVfZFT81NvmjXRrUCv+s084 kql/FSf+BqdpZ4DlL1AwMyC1c6gaya4JZHan8FhgLBGPXzGNgNh5wMsSW1Zrj+2Ylye7 69gw== X-Gm-Message-State: AOAM531jx4VEJyyLn7S/0BBuWc285OgTOd97UlCBAP20U8WCc6VCmk/y fkb2goJzsxxLYhaKHLjdgWRs0g== X-Received: by 2002:a2e:b52c:: with SMTP id z12mr10184160ljm.250.1608642292872; Tue, 22 Dec 2020 05:04:52 -0800 (PST) Received: from eriador.lumag.spb.ru ([94.25.228.224]) by smtp.gmail.com with ESMTPSA id k18sm2864235ljb.80.2020.12.22.05.04.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Dec 2020 05:04:52 -0800 (PST) From: Dmitry Baryshkov To: Andy Gross , Bjorn Andersson Cc: linux-arm-msm@vger.kernel.org Subject: [PATCH 2/3] soc: qcom: socinfo: add several PMIC IDs Date: Tue, 22 Dec 2020 16:04:47 +0300 Message-Id: <20201222130448.4125297-2-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201222130448.4125297-1-dmitry.baryshkov@linaro.org> References: <20201222130448.4125297-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add several PMIC IDs found on Qualcomm RB5 platform. Signed-off-by: Dmitry Baryshkov --- drivers/soc/qcom/socinfo.c | 5 +++++ 1 file changed, 5 insertions(+) -- 2.29.2 diff --git a/drivers/soc/qcom/socinfo.c b/drivers/soc/qcom/socinfo.c index cbd59937aac5..7229c3c04083 100644 --- a/drivers/soc/qcom/socinfo.c +++ b/drivers/soc/qcom/socinfo.c @@ -83,6 +83,11 @@ static const char *const pmic_models[] = { [23] = "PM8038", [24] = "PM8922", [25] = "PM8917", + [30] = "PM8150", + [31] = "PM8150L", + [32] = "PM8150B", + [33] = "PMK8002", + [36] = "PM8009", }; #endif /* CONFIG_DEBUG_FS */ From patchwork Tue Dec 22 13:04:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 346635 Delivered-To: patch@linaro.org Received: by 2002:a02:85a7:0:0:0:0:0 with SMTP id d36csp5308285jai; Tue, 22 Dec 2020 05:06:58 -0800 (PST) X-Google-Smtp-Source: ABdhPJxp0YtKZVpqErlYkF1TpJ0BiuaovldOrGUQ58PHPfPu4YE2eyg5eLBbE94YRLyU4OawPytJ X-Received: by 2002:a17:907:2070:: with SMTP id qp16mr19439545ejb.503.1608642418050; Tue, 22 Dec 2020 05:06:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608642418; cv=none; d=google.com; s=arc-20160816; b=q450Wa+HQaJ33PG9RAt8mSPqT0MlkyspcEN8FSIWW2RNGW/+OLXngDNjTJXfXRhUf2 HfY1dkuzNHhHbm1II7aPI4jLcFb4Qo37rf6hyq2aEXBiSrHCcu4RFKuQGgjl77o7IPY6 l73kqGt4XknxLT9YnjFvcnPNLKD9SFwPAOrduHJlBSMdqGJ/KpQqUFhcd93ZpbBDbR9b qDyvnLr2U/lQ+YFI0MViQnKGvAFiErJfW4wXNYz14VeLEmeyTbb4RzKZ3L1wDPzYBqmO VrKqip6xi9hbqzEPA+q7UVp6zgPFrDEcymXqyfMTsJgP5WzCASdZ+1kvuyjPOpBR5C8h dFHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=cYkvDM+JjtsHyuhPBxoKAqQnB1uujIDD73cQOpWHLB8=; b=azSukUFn6+IfcEDqsVe+poLGJPna8MjIx9gV/fYRu0w8EfyhJyjb4il83nnCGL7Agi CkeS9vJjQePq4COE7+b96O1bCaSgBj1Kl1wHldSl6njEVui6Sl0m0wNCNdw++AfiJe+e yz2RFIeWyZNUuf0Y9b3SvQxm2UB6Q2Mr8a5t6REPCa+ZXCFX+iZS20yridPNdrijD/Ia i5DJlauemjnJOikk+Oe1+CGFjBmjsfAWlYIBgEnvu3TE0y28OFwus6OwQ7ffYU+HVwqc 2c+rqWddbt4RUrTsY7j594Da/w8W9B0vQvihnUtMV4oLI9woMeXPZaxxIDA5XsLJHRjn fVLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GIr1606H; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ga30si3298054ejc.733.2020.12.22.05.06.57; Tue, 22 Dec 2020 05:06:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-arm-msm-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=@linaro.org header.s=google header.b=GIr1606H; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726631AbgLVNFg (ORCPT + 15 others); Tue, 22 Dec 2020 08:05:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54906 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726518AbgLVNFg (ORCPT ); Tue, 22 Dec 2020 08:05:36 -0500 Received: from mail-lf1-x129.google.com (mail-lf1-x129.google.com [IPv6:2a00:1450:4864:20::129]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B3935C061793 for ; Tue, 22 Dec 2020 05:04:55 -0800 (PST) Received: by mail-lf1-x129.google.com with SMTP id o13so31811398lfr.3 for ; Tue, 22 Dec 2020 05:04:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=cYkvDM+JjtsHyuhPBxoKAqQnB1uujIDD73cQOpWHLB8=; b=GIr1606Hi8p7LResTLRhR/y/hVYL30TsuwUx4zViJsDcCCLqS8INs8GYBvn0EtchFX i26FLy+/6Y0OFffrdKTRgE4sxZb+Hjv4dVwPV5pvjA9d0GP1T0P/T9Unk8YF6qs/xsL4 e7lCSOwmFKbwdWDDGd/XTh1jF/9EeKEIud2Pw3blSBx1FPrtCCgBIwX9JCpyMimuNhbV StCCarFE2kabxpDzLGrXc+c3vj6QDJESD8L5+eO3vbxegYlFylruV9JAg6lMeThG8djz eT2Yz+4e0AMM10ZIQWMMO9inJ3q/9+Gjd20XfjJIoheTGKgxzSEa5S7vIRKffxCUm8cz EdZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=cYkvDM+JjtsHyuhPBxoKAqQnB1uujIDD73cQOpWHLB8=; b=MQIoDtLjpWUmxbBHe/Ag5gkqRJH+r4WiVjglyozO0YOfDcZb2J37vyD58CPOc4LQ1i BlOLas6ZX4DVTRLhZJ2Frjkds2YEcdqX8IYExYndGoCGRhVgCxfNcqdG+5iez1b/F3vL Fd+HTGXyhSUFLDjkmsGKjWzZD30rH7jBF3f6OHfK0zkK5FbqWtxDi04MYKli6HVBPX2E 1tbV1N8aOmrGNGPqnu+XQCxk1ZT4YtOATvUptGTNmlBF67se4+tUupPofGxAWhJojl1m UbdbEM4gYsmjZGHfMUVI4K5BiUFEJZWNJ2B18C1Qi4rpVhjfdDyZHOPfJhRPebiSuNJP Ra/g== X-Gm-Message-State: AOAM5309iuD31qekoWdKkqLfk0KwFCt4iL6xbCgo9XjMEA3UNbYvVF8q 3uKoKfCVQbBe9T+HdcUbmFpd2w== X-Received: by 2002:a2e:a402:: with SMTP id p2mr9559714ljn.270.1608642294284; Tue, 22 Dec 2020 05:04:54 -0800 (PST) Received: from eriador.lumag.spb.ru ([94.25.228.224]) by smtp.gmail.com with ESMTPSA id k18sm2864235ljb.80.2020.12.22.05.04.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Dec 2020 05:04:53 -0800 (PST) From: Dmitry Baryshkov To: Andy Gross , Bjorn Andersson Cc: linux-arm-msm@vger.kernel.org Subject: [PATCH 3/3] soc: qcom: socinfo: add info from PMIC models array Date: Tue, 22 Dec 2020 16:04:48 +0300 Message-Id: <20201222130448.4125297-3-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201222130448.4125297-1-dmitry.baryshkov@linaro.org> References: <20201222130448.4125297-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add debugfs file showing information from PMIC model array. Signed-off-by: Dmitry Baryshkov --- drivers/soc/qcom/socinfo.c | 42 +++++++++++++++++++++++++++++++++++--- 1 file changed, 39 insertions(+), 3 deletions(-) -- 2.29.2 diff --git a/drivers/soc/qcom/socinfo.c b/drivers/soc/qcom/socinfo.c index 7229c3c04083..d255034a2b6f 100644 --- a/drivers/soc/qcom/socinfo.c +++ b/drivers/soc/qcom/socinfo.c @@ -15,6 +15,8 @@ #include #include +#include + /* * SoC version type with major number in the upper 16 bits and minor * number in the lower 16 bits. @@ -294,6 +296,32 @@ static int qcom_show_pmic_model(struct seq_file *seq, void *p) return 0; } +static int qcom_show_pmic_model_array(struct seq_file *seq, void *p) +{ + struct socinfo *socinfo = seq->private; + unsigned int num_pmics = le32_to_cpu(socinfo->num_pmics); + unsigned int pmic_array_offset = le32_to_cpu(socinfo->pmic_array_offset); + int i; + void *ptr = socinfo; + + ptr += pmic_array_offset; + + /* No need for bounds checking, it happened at socinfo_debugfs_init */ + for (i = 0; i < num_pmics; i++) { + unsigned int model = SOCINFO_MINOR(get_unaligned_le32(ptr + 2 * i * sizeof(u32))); + unsigned int die_rev = get_unaligned_le32(ptr + (2 * i + 1) * sizeof(u32)); + + if (model <= ARRAY_SIZE(pmic_models) && pmic_models[model]) + seq_printf(seq, "%s %u.%u\n", pmic_models[model], + SOCINFO_MAJOR(le32_to_cpu(die_rev)), + SOCINFO_MINOR(le32_to_cpu(die_rev))); + else + seq_printf(seq, "unknown (%d)\n", model); + } + + return 0; +} + static int qcom_show_pmic_die_revision(struct seq_file *seq, void *p) { struct socinfo *socinfo = seq->private; @@ -316,6 +344,7 @@ static int qcom_show_chip_id(struct seq_file *seq, void *p) QCOM_OPEN(build_id, qcom_show_build_id); QCOM_OPEN(pmic_model, qcom_show_pmic_model); +QCOM_OPEN(pmic_model_array, qcom_show_pmic_model_array); QCOM_OPEN(pmic_die_rev, qcom_show_pmic_die_revision); QCOM_OPEN(chip_id, qcom_show_chip_id); @@ -344,12 +373,14 @@ DEFINE_IMAGE_OPS(variant); DEFINE_IMAGE_OPS(oem); static void socinfo_debugfs_init(struct qcom_socinfo *qcom_socinfo, - struct socinfo *info) + struct socinfo *info, size_t info_size) { struct smem_image_version *versions; struct dentry *dentry; size_t size; int i; + unsigned int num_pmics; + unsigned int pmic_array_offset; qcom_socinfo->dbg_root = debugfs_create_dir("qcom_socinfo", NULL); @@ -405,6 +436,11 @@ static void socinfo_debugfs_init(struct qcom_socinfo *qcom_socinfo, &qcom_socinfo->info.raw_device_num); fallthrough; case SOCINFO_VERSION(0, 11): + num_pmics = le32_to_cpu(info->num_pmics); + pmic_array_offset = le32_to_cpu(info->pmic_array_offset); + if (pmic_array_offset + 2 * num_pmics * sizeof(u32) <= info_size) + DEBUGFS_ADD(info, pmic_model_array); + fallthrough; case SOCINFO_VERSION(0, 10): case SOCINFO_VERSION(0, 9): qcom_socinfo->info.foundry_id = __le32_to_cpu(info->foundry_id); @@ -482,7 +518,7 @@ static void socinfo_debugfs_exit(struct qcom_socinfo *qcom_socinfo) } #else static void socinfo_debugfs_init(struct qcom_socinfo *qcom_socinfo, - struct socinfo *info) + struct socinfo *info, size_t info_size) { } static void socinfo_debugfs_exit(struct qcom_socinfo *qcom_socinfo) { } @@ -522,7 +558,7 @@ static int qcom_socinfo_probe(struct platform_device *pdev) if (IS_ERR(qs->soc_dev)) return PTR_ERR(qs->soc_dev); - socinfo_debugfs_init(qs, info); + socinfo_debugfs_init(qs, info, item_size); /* Feed the soc specific unique data into entropy pool */ add_device_randomness(info, item_size);