From patchwork Tue Jun 23 02:50:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andreas_F=C3=A4rber?= X-Patchwork-Id: 11619621 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 123F56C1 for ; Tue, 23 Jun 2020 02:54:33 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 B4A522076A for ; Tue, 23 Jun 2020 02:54:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="0tG0+4WP" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B4A522076A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=fT0apM/o5ATHrTr/4T9ORshykNAExYevgusfRATuiT4=; b=0tG0+4WPxn8CEbbs0opy8Z2Vv 3aZQJoJIaqN4HSAT563m/OiHfYnz1Y8NuU8EphJiSXbKOvCgQIQ80h0pG3y64iAtPosuU0QehCQFM vxutHg/F1rAlAkOz0+Oy3AC3ouEnGXIIVMKBNIkGrByYYaTPGMw0cuui75FhzOqknPcDzgSTIONgm Bm/S+40+HcPmCWHYdyqO40ufim9XEbam98BUsilg8OJfLstXScpB/o0McYSUuWcCOaodu2PzG4rcp s3QGwXPymj068fY2naTjbL+NqgGvLMntKGqLaDAzq2SqDJSr0eZrnVOK4T8wVKmD/Z3SoowYQH3Kr fLqeE1aIg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jnZ2f-00023S-NM; Tue, 23 Jun 2020 02:52:09 +0000 Received: from mx2.suse.de ([195.135.220.15]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jnZ2Y-0001zY-My; Tue, 23 Jun 2020 02:52:06 +0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 6AA9FAE35; Tue, 23 Jun 2020 02:51:29 +0000 (UTC) From: =?utf-8?q?Andreas_F=C3=A4rber?= To: linux-realtek-soc@lists.infradead.org Subject: [PATCH v2 01/29] dt-bindings: soc: Add Realtek RTD1195 chip info binding Date: Tue, 23 Jun 2020 04:50:38 +0200 Message-Id: <20200623025106.31273-2-afaerber@suse.de> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200623025106.31273-1-afaerber@suse.de> References: <20200623025106.31273-1-afaerber@suse.de> MIME-Version: 1.0 X-Spam-Note: CRM114 invocation failed X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-2.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [195.135.220.15 listed in list.dnswl.org] 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [195.135.220.15 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, =?utf-8?b?SmFtZXMgVGFpIFvmiLTlv5fls7Bd?= , Edgar Lee , linux-kernel@vger.kernel.org, Rob Herring , =?utf-8?b?U3RhbmxleSBDaGFuZyBb5piM6IKy?= =?utf-8?b?5b63XQ==?= , =?utf-8?q?Andreas_F=C3=A4?= =?utf-8?q?rber?= , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Define a binding for RTD1195 and later DHC SoCs' chip info registers. Add the new directory to MAINTAINERS. Signed-off-by: Andreas Färber Reviewed-by: Rob Herring --- Note: The binding gets extended compatibly twice with additional properties. Could be squashed later if approved. v1 -> v2: * Dropped quotes for compatible (Rob) * Added additionalProperties: false (Rob) .../soc/realtek/realtek,rtd1195-chip.yaml | 34 +++++++++++++++++++ MAINTAINERS | 1 + 2 files changed, 35 insertions(+) create mode 100644 Documentation/devicetree/bindings/soc/realtek/realtek,rtd1195-chip.yaml diff --git a/Documentation/devicetree/bindings/soc/realtek/realtek,rtd1195-chip.yaml b/Documentation/devicetree/bindings/soc/realtek/realtek,rtd1195-chip.yaml new file mode 100644 index 000000000000..86a1de214782 --- /dev/null +++ b/Documentation/devicetree/bindings/soc/realtek/realtek,rtd1195-chip.yaml @@ -0,0 +1,34 @@ +# SPDX-License-Identifier: (GPL-2.0-or-later OR BSD-2-Clause) +%YAML 1.2 +--- +$id: "http://devicetree.org/schemas/soc/realtek/realtek,rtd1195-chip.yaml#" +$schema: "http://devicetree.org/meta-schemas/core.yaml#" + +title: Realtek Digital Home Center chip identification + +maintainers: + - Andreas Färber + +description: | + The Realtek DHC SoCs have some registers to identify the chip and revision. + +properties: + compatible: + const: realtek,rtd1195-chip + + reg: + maxItems: 1 + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + chip-info@1801a200 { + compatible = "realtek,rtd1195-chip"; + reg = <0x1801a200 0x8>; + }; +... diff --git a/MAINTAINERS b/MAINTAINERS index d282ee3492e0..78adbc3cc101 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2307,6 +2307,7 @@ L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) L: linux-realtek-soc@lists.infradead.org (moderated for non-subscribers) S: Maintained F: Documentation/devicetree/bindings/arm/realtek.yaml +F: Documentation/devicetree/bindings/soc/realtek/ F: arch/arm/boot/dts/rtd* F: arch/arm/mach-realtek/ F: arch/arm64/boot/dts/realtek/ From patchwork Tue Jun 23 02:50:39 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andreas_F=C3=A4rber?= X-Patchwork-Id: 11619615 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2A13B6C1 for ; Tue, 23 Jun 2020 02:53:56 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 E8B6520786 for ; Tue, 23 Jun 2020 02:53:55 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="rUfGN3En"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="jjMY3ise" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E8B6520786 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=H3FeH7jUheRQANNZmKkbaYwQTPGd9QFXhCkdQzpID5I=; b=rUfGN3EnScAwmKJX9dtm9DQqj C9C/rRFay7a7Mwb3PSXKpPg2qCuEGV+M6vMaqGauOwM4R1Knaorj6CZLrij5NWq+EKzc8SPBu1ktQ rXf7LAglKv33R/BgkWoUmYZuBMg4UMaBE1Mgm48nNJpsnHioA8EZTut+i6QZgXGlUTGBR2G9JziwE kPtE/VkGf73rXjwt7udgko4LyhpMKA25iCkxz96NgbWUQ1yHixjGWcKGdpZJJcMZGnW4mFAYViOvE mz/NUzUEYB/5+sgn45o3ZH7e6mtBXMrvSs41K6O8CUlMHhQ1zIB0Lt4CEbMsopsMl653eDvkQx77l kz3jdnlqw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jnZ2O-0001ua-HD; Tue, 23 Jun 2020 02:51:52 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jnZ2L-0001tO-Po; Tue, 23 Jun 2020 02:51:49 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:Content-Type: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-ID:Content-Description; bh=MwE8yDT91XWz8mRuonx7XLJE7vkMreGgxn9fHNLQroo=; b=jjMY3ise9ODOVZ/Ov+j8ouqxUD 6UB0I6OSm3MBHY9JqX9aRbsuLUb+vxIgRWp6SucMjdtA2yL8FmVkA1ujvG2KXD/SSet0/g3OaOekZ ulblFKp8vX9xI4b/fSKPMXjDKjVWmgD4i3qhdMZe5Akg4eGrwQb9L0dB1U1zpIeHEqE3l6vAlXZBe VEswJ4fay7h9nQ66mSiEtISYGD1f6ObADGwcGlyQV8J7bll5iVGkeLjM04lZyYFhEctnp98mY0T4y t1820CAuvBU1+sVVmfqWki642jsbUWVjfOfMBv81PGP/mv0WAk5mLdYijREE0qw4Irsp/8AeoUHaD FosPTb6w==; Received: from mx2.suse.de ([195.135.220.15]) by casper.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jnZ2I-0005NZ-GZ; Tue, 23 Jun 2020 02:51:49 +0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 6AA97AE71; Tue, 23 Jun 2020 02:51:30 +0000 (UTC) From: =?utf-8?q?Andreas_F=C3=A4rber?= To: linux-realtek-soc@lists.infradead.org Subject: [PATCH v2 02/29] soc: Add Realtek DHC chip info driver for RTD1195 and RTD1295 Date: Tue, 23 Jun 2020 04:50:39 +0200 Message-Id: <20200623025106.31273-3-afaerber@suse.de> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200623025106.31273-1-afaerber@suse.de> References: <20200623025106.31273-1-afaerber@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200623_035146_704604_C1BE6C18 X-CRM114-Status: GOOD ( 21.59 ) X-Spam-Score: -4.2 (----) X-Spam-Report: SpamAssassin version 3.4.4 on casper.infradead.org summary: Content analysis details: (-4.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [195.135.220.15 listed in wl.mailspike.net] -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [195.135.220.15 listed in list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?b?SmFtZXMgVGFpIFvmiLTlv5fls7Bd?= , Edgar Lee , linux-kernel@vger.kernel.org, =?utf-8?b?U3RhbmxleSBDaGFuZyBb5piM6IKy5b63XQ==?= , =?utf-8?q?Andreas_F=C3=A4rber?= , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Add a soc bus driver to print chip model and revision details. Revisions from downstream drivers/soc/realtek/rtd{119x,129x}/rtk_chip.c. Signed-off-by: Andreas Färber Tested-by: Stanley Chang Reviewed-by: Stanley Chang --- v1 -> v2: * Added entry to MAINTAINERS * Changed chip_id and chip_rev from u32 to u16, based on reg field definitions * Added error return path for get_name for deferred probing, reordered code MAINTAINERS | 1 + drivers/soc/Kconfig | 1 + drivers/soc/Makefile | 1 + drivers/soc/realtek/Kconfig | 13 +++ drivers/soc/realtek/Makefile | 2 + drivers/soc/realtek/chip.c | 181 +++++++++++++++++++++++++++++++++++ 6 files changed, 199 insertions(+) create mode 100644 drivers/soc/realtek/Kconfig create mode 100644 drivers/soc/realtek/Makefile create mode 100644 drivers/soc/realtek/chip.c diff --git a/MAINTAINERS b/MAINTAINERS index 78adbc3cc101..ff0ee48fee6f 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2311,6 +2311,7 @@ F: Documentation/devicetree/bindings/soc/realtek/ F: arch/arm/boot/dts/rtd* F: arch/arm/mach-realtek/ F: arch/arm64/boot/dts/realtek/ +F: drivers/soc/realtek/ ARM/RENESAS ARM64 ARCHITECTURE M: Geert Uytterhoeven diff --git a/drivers/soc/Kconfig b/drivers/soc/Kconfig index 425ab6f7e375..925647993119 100644 --- a/drivers/soc/Kconfig +++ b/drivers/soc/Kconfig @@ -11,6 +11,7 @@ source "drivers/soc/imx/Kconfig" source "drivers/soc/ixp4xx/Kconfig" source "drivers/soc/mediatek/Kconfig" source "drivers/soc/qcom/Kconfig" +source "drivers/soc/realtek/Kconfig" source "drivers/soc/renesas/Kconfig" source "drivers/soc/rockchip/Kconfig" source "drivers/soc/samsung/Kconfig" diff --git a/drivers/soc/Makefile b/drivers/soc/Makefile index 36452bed86ef..cdcf00bbad10 100644 --- a/drivers/soc/Makefile +++ b/drivers/soc/Makefile @@ -17,6 +17,7 @@ obj-$(CONFIG_SOC_XWAY) += lantiq/ obj-y += mediatek/ obj-y += amlogic/ obj-y += qcom/ +obj-y += realtek/ obj-y += renesas/ obj-$(CONFIG_ARCH_ROCKCHIP) += rockchip/ obj-$(CONFIG_SOC_SAMSUNG) += samsung/ diff --git a/drivers/soc/realtek/Kconfig b/drivers/soc/realtek/Kconfig new file mode 100644 index 000000000000..be75c1889c61 --- /dev/null +++ b/drivers/soc/realtek/Kconfig @@ -0,0 +1,13 @@ +# SPDX-License-Identifier: GPL-2.0-or-later +if ARCH_REALTEK || COMPILE_TEST + +config REALTEK_SOC + tristate "Realtek chip info" + default ARCH_REALTEK + select SOC_BUS + help + Say 'y' here to enable support for SoC info on Realtek RTD1195 and + RTD1295 SoC families. + If unsure, say 'n'. + +endif diff --git a/drivers/soc/realtek/Makefile b/drivers/soc/realtek/Makefile new file mode 100644 index 000000000000..49900273905b --- /dev/null +++ b/drivers/soc/realtek/Makefile @@ -0,0 +1,2 @@ +# SPDX-License-Identifier: GPL-2.0-or-later +obj-$(CONFIG_REALTEK_SOC) += chip.o diff --git a/drivers/soc/realtek/chip.c b/drivers/soc/realtek/chip.c new file mode 100644 index 000000000000..c4650d512c91 --- /dev/null +++ b/drivers/soc/realtek/chip.c @@ -0,0 +1,181 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* + * Realtek Digital Home Center System-on-Chip info + * + * Copyright (c) 2017-2020 Andreas Färber + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define REG_SB2_CHIP_ID 0x200 +#define REG_SB2_CHIP_INFO 0x204 + +#define SB2_CHIP_ID_CHIP_ID GENMASK(15, 0) + +#define SB2_CHIP_INFO_REVISE_ID GENMASK(31, 16) + +struct dhc_soc_revision { + const char *name; + u16 chip_rev; +}; + +static const struct dhc_soc_revision rtd1195_revisions[] = { + { "A", 0x0000 }, + { "B", 0x0001 }, + { "C", 0x0002 }, + { "D", 0x0003 }, + { } +}; + +static const struct dhc_soc_revision rtd1295_revisions[] = { + { "A00", 0x0000 }, + { "A01", 0x0001 }, + { "B00", 0x0002 }, + { "B01", 0x0003 }, + { } +}; + +struct dhc_soc { + u16 chip_id; + const char *family; + const char *(*get_name)(struct device *dev, const struct dhc_soc *s); + const struct dhc_soc_revision *revisions; + const char *codename; +}; + +static const char *default_name(struct device *dev, const struct dhc_soc *s) +{ + return s->family; +} + +static const struct dhc_soc dhc_soc_families[] = { + { 0x6329, "RTD1195", default_name, rtd1195_revisions, "Phoenix" }, + { 0x6421, "RTD1295", default_name, rtd1295_revisions, "Kylin" }, +}; + +static const struct dhc_soc *dhc_soc_by_chip_id(u16 chip_id) +{ + int i; + + for (i = 0; i < ARRAY_SIZE(dhc_soc_families); i++) { + const struct dhc_soc *family = &dhc_soc_families[i]; + + if (family->chip_id == chip_id) + return family; + } + return NULL; +} + +static const char *dhc_soc_rev(const struct dhc_soc *family, u16 chip_rev) +{ + if (family) { + const struct dhc_soc_revision *rev = family->revisions; + + while (rev && rev->name) { + if (rev->chip_rev == chip_rev) + return rev->name; + rev++; + } + } + return "unknown"; +} + +static int dhc_soc_probe(struct platform_device *pdev) +{ + const struct dhc_soc *s; + struct soc_device_attribute *soc_dev_attr; + struct soc_device *soc_dev; + struct device_node *node; + struct regmap *regmap; + u16 chip_id, chip_rev; + unsigned int val; + int ret; + + regmap = syscon_node_to_regmap(pdev->dev.of_node->parent); + if (IS_ERR(regmap)) + return PTR_ERR(regmap); + + ret = regmap_read(regmap, REG_SB2_CHIP_ID, &val); + if (ret) + return ret; + chip_id = FIELD_GET(SB2_CHIP_ID_CHIP_ID, val); + + ret = regmap_read(regmap, REG_SB2_CHIP_INFO, &val); + if (ret) + return ret; + chip_rev = FIELD_GET(SB2_CHIP_INFO_REVISE_ID, val); + + soc_dev_attr = kzalloc(sizeof(*soc_dev_attr), GFP_KERNEL); + if (!soc_dev_attr) + return -ENOMEM; + + node = of_find_node_by_path("/"); + of_property_read_string(node, "model", &soc_dev_attr->machine); + of_node_put(node); + + s = dhc_soc_by_chip_id(chip_id); + + if (likely(s && s->get_name)) { + soc_dev_attr->soc_id = s->get_name(&pdev->dev, s); + if (IS_ERR(soc_dev_attr->soc_id)) + return PTR_ERR(soc_dev_attr->soc_id); + } else + soc_dev_attr->soc_id = "unknown"; + + soc_dev_attr->revision = dhc_soc_rev(s, chip_rev); + + soc_dev_attr->family = kasprintf(GFP_KERNEL, "Realtek %s", + (s && s->codename) ? s->codename : + ((s && s->family) ? s->family : "Digital Home Center")); + + soc_dev = soc_device_register(soc_dev_attr); + if (IS_ERR(soc_dev)) { + kfree(soc_dev_attr->family); + kfree(soc_dev_attr); + return PTR_ERR(soc_dev); + } + + platform_set_drvdata(pdev, soc_dev); + + pr_info("%s %s (0x%04x) rev %s (0x%04x) detected\n", + soc_dev_attr->family, soc_dev_attr->soc_id, (u32)chip_id, + soc_dev_attr->revision, (u32)chip_rev); + + return 0; +} + +static int dhc_soc_remove(struct platform_device *pdev) +{ + struct soc_device *soc_dev = platform_get_drvdata(pdev); + + soc_device_unregister(soc_dev); + + return 0; +} + +static const struct of_device_id dhc_soc_dt_ids[] = { + { .compatible = "realtek,rtd1195-chip" }, + { } +}; + +static struct platform_driver dhc_soc_driver = { + .probe = dhc_soc_probe, + .remove = dhc_soc_remove, + .driver = { + .name = "dhc-soc", + .of_match_table = dhc_soc_dt_ids, + }, +}; +module_platform_driver(dhc_soc_driver); + +MODULE_DESCRIPTION("Realtek DHC SoC identification driver"); +MODULE_LICENSE("GPL"); From patchwork Tue Jun 23 02:50:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andreas_F=C3=A4rber?= X-Patchwork-Id: 11619651 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4D5BA13A0 for ; Tue, 23 Jun 2020 02:58:40 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 250C02078E for ; Tue, 23 Jun 2020 02:58:40 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="jdw8VRFW"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="MVld21iX" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 250C02078E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Ec+mgC7J+OerTE6cPBMb57hSMVXilj6alP3aZD72iRU=; b=jdw8VRFWvs1cpAVa+gGhJEp3O GTGL0V1DR1bDsnt76/CsL0qM8EsKPTbLkZFKEaqh5lQKlpotOI1xcDgCNmJvYBITWDhBOREs9k+x3 5IXcWsxVNVncnY6VjroDVuQZKAAcjFDiBHvZ6opCKcnuA8zHAUYns1jmNO8CTUUuZAkk9CgZx1zD2 7QnpKEtIVSPNq6KTffHBSDT0jRTBWb41zdlT+lZ4iEF1/00unn+7hT+sSUiLe/XbCxTF5VR9frRfr x8/XFz4jQzWqyWG870oTUMGZY9eyie0g0Kp6NwZI99a4tI4x4Y6L678I71CiQr11ThG78xfans0yY NU0uQ6iXA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jnZ6U-0004yH-Vd; Tue, 23 Jun 2020 02:56:07 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jnZ35-0002KT-5M; Tue, 23 Jun 2020 02:52:35 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:Content-Type: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-ID:Content-Description; bh=0YH2uljtALUy0BsKOt+EZ2u0vwG8VMIz/MvbYT4M+ps=; b=MVld21iXXbz4VJ6J0RBGtB+SXn Zm2b+gTckN23Tfuv8Hz9L9+8v8FzaOBZBowPop/CFT17cENz/ExxScH1D/mL8U4SaBQZeAqAYZnGH PwCay9EzW+SAN5gGF9EkIcwxmPzh9sTcEvfk6knoDHZOYs9ZGduyeCwWTAO/GqpaJucrkycKZNb2W cdZpa/JZ6JBHVpjajxdmsHYkzAYbJwVGYXk6o+HvvVUCTYGtRg0ZRbvLGxXviO+nM/leXYmjBrqvD ScCXs0uP7gDAZcFtLIVKujbLQdKkE6aOWAcjYdwknwcNY/0PZeXpqsdhym6kBWzUoCTmHkV6Nt4CI hdk1CsbA==; Received: from mx2.suse.de ([195.135.220.15]) by casper.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jnZ31-0005Sq-NP; Tue, 23 Jun 2020 02:52:34 +0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id DADD2AE7B; Tue, 23 Jun 2020 02:51:30 +0000 (UTC) From: =?utf-8?q?Andreas_F=C3=A4rber?= To: linux-realtek-soc@lists.infradead.org Subject: [PATCH v2 03/29] arm64: dts: realtek: rtd129x: Add chip info node Date: Tue, 23 Jun 2020 04:50:40 +0200 Message-Id: <20200623025106.31273-4-afaerber@suse.de> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200623025106.31273-1-afaerber@suse.de> References: <20200623025106.31273-1-afaerber@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200623_035232_242385_A44CCE47 X-CRM114-Status: UNSURE ( 8.21 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -4.2 (----) X-Spam-Report: SpamAssassin version 3.4.4 on casper.infradead.org summary: Content analysis details: (-4.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [195.135.220.15 listed in list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [195.135.220.15 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, =?utf-8?b?SmFtZXMgVGFpIFvmiLTlv5fls7Bd?= , Edgar Lee , linux-kernel@vger.kernel.org, Rob Herring , =?utf-8?b?U3RhbmxleSBDaGFuZyBb5piM6IKy?= =?utf-8?b?5b63XQ==?= , =?utf-8?q?Andreas_F=C3=A4?= =?utf-8?q?rber?= , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Add a DT node for chip identification. Acked-by: James Tai Signed-off-by: Andreas Färber Reviewed-by: Stanley Chang --- v1 -> v2: * Rebased onto SB2 syscon arch/arm64/boot/dts/realtek/rtd129x.dtsi | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/arm64/boot/dts/realtek/rtd129x.dtsi b/arch/arm64/boot/dts/realtek/rtd129x.dtsi index 93ab6fdd03d4..b5be9df80dae 100644 --- a/arch/arm64/boot/dts/realtek/rtd129x.dtsi +++ b/arch/arm64/boot/dts/realtek/rtd129x.dtsi @@ -201,6 +201,11 @@ sb2_hd_sem: hwspinlock@0 { #hwlock-cells = <0>; }; + chip-info@200 { + compatible = "realtek,rtd1195-chip"; + reg = <0x200 0x8>; + }; + sb2_hd_sem_new: hwspinlock@620 { compatible = "realtek,rtd1195-sb2-sem"; reg = <0x620 0x20>; From patchwork Tue Jun 23 02:50:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andreas_F=C3=A4rber?= X-Patchwork-Id: 11619649 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4A45E6C1 for ; Tue, 23 Jun 2020 02:58:16 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 F0A212076A for ; Tue, 23 Jun 2020 02:58:15 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="WszM6lzF" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F0A212076A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=qDrHKCcDKjRjGDASf1xaJnPl/cpSJRd1p97pA4rfB/4=; b=WszM6lzFY91nNBb/XnkQFcCwc ZPG8zkzm/+4dGu8JT9d+y+TFDRUt7rOjnlSNI0E6HoJXujYkewUtIM5QnM2tU1w3C8ptQ7PQMTWjB Dn3srkF8Q2Z8Vj0JBOsnW70A9Ihot2bX1OpQQ6WsfQUAVX6Lbj8H95+JLkKxrgWxptPHh0SOoX+9X wrjh3scNnMhukWVkemAUjm6BgCWgfkn0Nhx9+6Qisx/SwlHe6JzV2NfPbrGem8o5+IQkf+Bq70MpN LETCTO9q54YsHITNagfc/so608xYkkw1rORagD3wWNleWP2EqISEuoBo0LeKjR10bFHCNOJoZ3jJJ X3aMggrDg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jnZ6E-0004nw-Np; Tue, 23 Jun 2020 02:55:50 +0000 Received: from mx2.suse.de ([195.135.220.15]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jnZ33-0002Ja-Cj; Tue, 23 Jun 2020 02:52:34 +0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 52C0DAE7A; Tue, 23 Jun 2020 02:51:31 +0000 (UTC) From: =?utf-8?q?Andreas_F=C3=A4rber?= To: linux-realtek-soc@lists.infradead.org Subject: [PATCH v2 04/29] ARM: dts: rtd1195: Add chip info node Date: Tue, 23 Jun 2020 04:50:41 +0200 Message-Id: <20200623025106.31273-5-afaerber@suse.de> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200623025106.31273-1-afaerber@suse.de> References: <20200623025106.31273-1-afaerber@suse.de> MIME-Version: 1.0 X-Spam-Note: CRM114 invocation failed X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-2.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [195.135.220.15 listed in list.dnswl.org] 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [195.135.220.15 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, =?utf-8?b?SmFtZXMgVGFpIFvmiLTlv5fls7Bd?= , Edgar Lee , linux-kernel@vger.kernel.org, Rob Herring , =?utf-8?b?U3RhbmxleSBDaGFuZyBb5piM6IKy?= =?utf-8?b?5b63XQ==?= , =?utf-8?q?Andreas_F=C3=A4?= =?utf-8?q?rber?= , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Add a DT node for chip identification. Signed-off-by: Andreas Färber Reviewed-by: Stanley Chang --- v1 -> v2: * Rebased onto SB2 syscon arch/arm/boot/dts/rtd1195.dtsi | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/arm/boot/dts/rtd1195.dtsi b/arch/arm/boot/dts/rtd1195.dtsi index 6fd12a2d766e..5ad0e81c37af 100644 --- a/arch/arm/boot/dts/rtd1195.dtsi +++ b/arch/arm/boot/dts/rtd1195.dtsi @@ -223,6 +223,11 @@ sb2_hd_sem: hwspinlock@0 { #hwlock-cells = <0>; }; + chip-info@200 { + compatible = "realtek,rtd1195-chip"; + reg = <0x200 0x8>; + }; + sb2_hd_sem_new: hwspinlock@620 { compatible = "realtek,rtd1195-sb2-sem"; reg = <0x620 0x20>; From patchwork Tue Jun 23 02:50:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andreas_F=C3=A4rber?= X-Patchwork-Id: 11619797 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 87AAC1392 for ; Tue, 23 Jun 2020 05:25:51 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 60ADA20716 for ; Tue, 23 Jun 2020 05:25:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="nyIKnsGt"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="mvZWRC18" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 60ADA20716 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Y2MDeMYRJ98WnAehO5WKqY2iR6DVhevxGztgJv2DHVc=; b=nyIKnsGtRuG9G7wBdgIiiBwzl hRe0MSZpSrDBiY7hBw37Zio/ExIsxaIFp/h1880R09rJVIzlsV64Uy/8ALkwiPyHalwougxpNhKmc bk+h3b5EphS0Exw8Ibh6j2eOZDeXjwOfN6LcuhS2LzhGXqfP/ZfyeFSGx0G7j57ToLgNkDxRuSibz HJkz0oJZ6TnFZpRjfYI/d3acL06TV8wznB+byTm6Y3tftP75NPE+YcJtFjtEjXdyk+iL9rI17nHdb R3RAnhkawN/9rcQhKw2fcE2o/nlZZCKsxSqTzOWkp8drqNjvRHRmgIeezcR4fS5nSF6ObezAOmDbv ddS+zdy9Q==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jnZ7j-0005wf-Sq; Tue, 23 Jun 2020 02:57:24 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jnZ38-0002Mv-8K; Tue, 23 Jun 2020 02:52:38 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:Content-Type: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-ID:Content-Description; bh=5WPM/wtqX5R78+w4hNJT615kaa/5c2HUiRdfJ5fBNW4=; b=mvZWRC18IrBx+pVh66I9gFJAKD snT+j2HimI/y/IwihXofZuzf4m6fVn4CH46zoKI6IlsqZxWoyvECssXSyYFeu+6EUOsPq2k69YKsr 5wX+xJYGgN0Y95sbLfBXHa+SUgo3LcKnk3Ug3/eg+tnedEFATPBf2kfas9EyOczDroEeL3ubyQ/3N H39K65CSegUCDyhru7txk0jGea9+ys2mhJfwZAJpV9y8Z8RgI35TGmTl/3DhNMCN13dwKX2KdhTvR nilDThSVY3C6mrnKHGrmM0+/7L4aEMwcVh+8iOZpGTYfyFkBPnDLg8mFK2D7y0zRiPlCEFi9fxnDL 3ZLw+gJQ==; Received: from mx2.suse.de ([195.135.220.15]) by casper.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jnZ35-0005TU-4n; Tue, 23 Jun 2020 02:52:37 +0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id C6987AE70; Tue, 23 Jun 2020 02:51:31 +0000 (UTC) From: =?utf-8?q?Andreas_F=C3=A4rber?= To: linux-realtek-soc@lists.infradead.org Subject: [PATCH v2 05/29] dt-bindings: soc: realtek: rtd1195-chip: Add iso-syscon property Date: Tue, 23 Jun 2020 04:50:42 +0200 Message-Id: <20200623025106.31273-6-afaerber@suse.de> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200623025106.31273-1-afaerber@suse.de> References: <20200623025106.31273-1-afaerber@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200623_035235_364406_94660D7F X-CRM114-Status: GOOD ( 10.38 ) X-Spam-Score: -4.2 (----) X-Spam-Report: SpamAssassin version 3.4.4 on casper.infradead.org summary: Content analysis details: (-4.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [195.135.220.15 listed in wl.mailspike.net] -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [195.135.220.15 listed in list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, =?utf-8?b?SmFtZXMgVGFpIFvmiLTlv5fls7Bd?= , Edgar Lee , linux-kernel@vger.kernel.org, Rob Herring , =?utf-8?b?U3RhbmxleSBDaGFuZyBb5piM6IKy?= =?utf-8?b?5b63XQ==?= , =?utf-8?q?Andreas_F=C3=A4?= =?utf-8?q?rber?= , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Allow to optionally specify a phandle to iso syscon to identify the chip. RTD1295 family will want to check the ISO_CHIP_INFO1 register. Signed-off-by: Andreas Färber --- A SoC specific binding would defeat the purpose of the generic Linux driver detecting the SoC based on registers. Simply allowing it all for SoC families seems the most flexible. v1 -> v2: * Instead of extending reg, allow optional iso-syscon property for RTD129x. Iso syscon currently does not have a compatible, and it may need to differ across SoC families. .../bindings/soc/realtek/realtek,rtd1195-chip.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Documentation/devicetree/bindings/soc/realtek/realtek,rtd1195-chip.yaml b/Documentation/devicetree/bindings/soc/realtek/realtek,rtd1195-chip.yaml index 86a1de214782..dfe33c95f68d 100644 --- a/Documentation/devicetree/bindings/soc/realtek/realtek,rtd1195-chip.yaml +++ b/Documentation/devicetree/bindings/soc/realtek/realtek,rtd1195-chip.yaml @@ -11,6 +11,7 @@ maintainers: description: | The Realtek DHC SoCs have some registers to identify the chip and revision. + To identify the exact model within a family, further registers are needed. properties: compatible: @@ -19,6 +20,8 @@ properties: reg: maxItems: 1 + iso-syscon: true + required: - compatible - reg @@ -31,4 +34,10 @@ examples: compatible = "realtek,rtd1195-chip"; reg = <0x1801a200 0x8>; }; + - | + chip-info@9801a200 { + compatible = "realtek,rtd1195-chip"; + reg = <0x9801a200 0x8>; + iso-syscon = <&iso>; + }; ... From patchwork Tue Jun 23 02:50:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andreas_F=C3=A4rber?= X-Patchwork-Id: 11619653 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 40FE713A0 for ; Tue, 23 Jun 2020 02:59:39 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 1A7952078E for ; Tue, 23 Jun 2020 02:59:39 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="JJYwXE71" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1A7952078E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=KDRNAYmmBsNg2xOSaOOL9y1de031AMLXA9Oe2IfBtzE=; b=JJYwXE71O+ku7Cq2WM8rEina0 RkMeG2x6NaGCgT3XRdqmhg/pkJHN6Ug/BlLHys7AAL+feOL3lAq5xcwRDZptgVYK+M2/E7bsSMovr RWLGcJ0sCpofRYVKgxB4UZ7DRM+thkby2xwtWgVOdMoq51g2rkhGErucpGFVgL46H775sHIwQilrq o3LTIyyqwy4K4KuSHvdoq17vE+KepcDUieUtQB9VNWMr5uCrW0wQLYp4dcLbt08uyfP7PzKDQE1Du DQe4UC0RzlxRHhXlcddEctTxbRl5pNEI+WO06QqxDnRwdsWhRfVxXz/lf7mFcthYr1GGyeWybhhD1 8AqxjpsNg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jnZ7J-0005f4-Cu; Tue, 23 Jun 2020 02:56:57 +0000 Received: from mx2.suse.de ([195.135.220.15]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jnZ36-0002KY-29; Tue, 23 Jun 2020 02:52:36 +0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 3925CAE84; Tue, 23 Jun 2020 02:51:32 +0000 (UTC) From: =?utf-8?q?Andreas_F=C3=A4rber?= To: linux-realtek-soc@lists.infradead.org Subject: [PATCH v2 06/29] soc: realtek: chip: Detect RTD1296 Date: Tue, 23 Jun 2020 04:50:43 +0200 Message-Id: <20200623025106.31273-7-afaerber@suse.de> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200623025106.31273-1-afaerber@suse.de> References: <20200623025106.31273-1-afaerber@suse.de> MIME-Version: 1.0 X-Spam-Note: CRM114 invocation failed X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-2.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [195.135.220.15 listed in list.dnswl.org] 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [195.135.220.15 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?b?SmFtZXMgVGFpIFvmiLTlv5fls7Bd?= , Edgar Lee , linux-kernel@vger.kernel.org, =?utf-8?b?U3RhbmxleSBDaGFuZyBb5piM6IKy5b63XQ==?= , =?utf-8?q?Andreas_F=C3=A4rber?= , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Detection logic from downstream drivers/soc/realtek/rtd129x/rtk_chip.c. Acked-by: James Tai Signed-off-by: Andreas Färber Reviewed-by: Stanley Chang --- TODO: Name the bit in ISO_CHIP_INFO1:bound_opts. v1 -> v2: * Instead of direct iso register access use the new syscon regmap drivers/soc/realtek/chip.c | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/drivers/soc/realtek/chip.c b/drivers/soc/realtek/chip.c index c4650d512c91..103f564aad7f 100644 --- a/drivers/soc/realtek/chip.c +++ b/drivers/soc/realtek/chip.c @@ -23,6 +23,8 @@ #define SB2_CHIP_INFO_REVISE_ID GENMASK(31, 16) +#define REG_ISO_CHIP_INFO1 0x028 + struct dhc_soc_revision { const char *name; u16 chip_rev; @@ -57,9 +59,32 @@ static const char *default_name(struct device *dev, const struct dhc_soc *s) return s->family; } +static const char *rtd1295_name(struct device *dev, const struct dhc_soc *s) +{ + struct regmap *regmap; + unsigned int val; + int ret; + + regmap = syscon_regmap_lookup_by_phandle(dev->of_node, "iso-syscon"); + if (IS_ERR(regmap)) { + ret = PTR_ERR(regmap); + if (ret == -EPROBE_DEFER) + return ERR_PTR(ret); + dev_warn(dev, "Could not check iso (%d)\n", ret); + } else { + ret = regmap_read(regmap, REG_ISO_CHIP_INFO1, &val); + if (ret) + dev_warn(dev, "Could not read chip_info1 (%d)\n", ret); + else if (val & BIT(11)) + return "RTD1296"; + } + + return "RTD1295"; +} + static const struct dhc_soc dhc_soc_families[] = { { 0x6329, "RTD1195", default_name, rtd1195_revisions, "Phoenix" }, - { 0x6421, "RTD1295", default_name, rtd1295_revisions, "Kylin" }, + { 0x6421, "RTD1295", rtd1295_name, rtd1295_revisions, "Kylin" }, }; static const struct dhc_soc *dhc_soc_by_chip_id(u16 chip_id) From patchwork Tue Jun 23 02:50:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andreas_F=C3=A4rber?= X-Patchwork-Id: 11619619 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 03FB313A0 for ; Tue, 23 Jun 2020 02:54:13 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 C20A22076A for ; Tue, 23 Jun 2020 02:54:12 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="ulXMwz/N"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="h6lzJYC/" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C20A22076A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=fvnv5DeuPe1kWSvG72xmj6sA5hmhwpZrWPhp5d9QZOs=; b=ulXMwz/NLXq8b1g5mQLpE21uw YqUphBE6z4Dv5hzHC9RjMakQaAmPxCCIYMpF+V9AjTC0uyztoKeUze66jNqmJ1IlXAmHjHx6mRpHn QwMqyvgnUHMNtdMAABN7Wtj8l74IEeaZ44IMiXyIqiLYovV2HbFHqLABlfU8aN9YCrcE8yIjpIS9J 9atCCBKcDM4Xq1S3gwEZNEBhBj6MACI/GYs9i7Yh7nIVY41dLbptVtgqTjHcSk+HgWwWBzuy6uN88 GUhrad08dk+QrXxdX+RmuE6FPA+nVr8wV3bk/+fZ8IkdY0gwYIIzXYgFq8L21rh1683ZRExOIf4eJ JBuLMYPcA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jnZ2X-0001z5-Hu; Tue, 23 Jun 2020 02:52:01 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jnZ2O-0001vJ-PG; Tue, 23 Jun 2020 02:51:52 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:Content-Type: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-ID:Content-Description; bh=5bYRVCZRiplsWEmicrYbPTHAZCti5245jcIroh9ni4Q=; b=h6lzJYC/pDd6emJ21vylB/75wG OayWSRUVCsjyuvB2uMNvZfqIyKOR5GiKtt16HP8z4S6MjDlxDqkIEStwiLgn3QG5qe99YDwLLTPvS a1+9dFD/Tz3NbMn9pHozd7mx1GfnfyjtOO6zIdX9MFKhs4LhyG+3+zJZVUJQ4oWVtG5TqLj1ZhV5C Gm6ue0v/Jvo7GGdcm2xykpDr8me+27QyFCgRUQNKZ7fzDWbK20uaPR4Up+EqIs3M7J4fPmgFvYamG 5Vcc1+GfNYXPr8/JbJ0gvuCeC6mv9DnZa+a+72G7y1kQoStv6GE6ZsmgtU2HOeRSIxvDeqvcnQMQd nmPePXKA==; Received: from mx2.suse.de ([195.135.220.15]) by casper.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jnZ2L-0005O6-OB; Tue, 23 Jun 2020 02:51:51 +0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id A858EAE7F; Tue, 23 Jun 2020 02:51:32 +0000 (UTC) From: =?utf-8?q?Andreas_F=C3=A4rber?= To: linux-realtek-soc@lists.infradead.org Subject: [PATCH v2 07/29] arm64: dts: realtek: rtd129x: Extend chip-info reg with CHIP_INFO1 Date: Tue, 23 Jun 2020 04:50:44 +0200 Message-Id: <20200623025106.31273-8-afaerber@suse.de> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200623025106.31273-1-afaerber@suse.de> References: <20200623025106.31273-1-afaerber@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200623_035150_240775_8BB33BFC X-CRM114-Status: UNSURE ( 7.78 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -4.2 (----) X-Spam-Report: SpamAssassin version 3.4.4 on casper.infradead.org summary: Content analysis details: (-4.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [195.135.220.15 listed in wl.mailspike.net] -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [195.135.220.15 listed in list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, =?utf-8?b?SmFtZXMgVGFpIFvmiLTlv5fls7Bd?= , Edgar Lee , linux-kernel@vger.kernel.org, Rob Herring , =?utf-8?b?U3RhbmxleSBDaGFuZyBb5piM6IKy?= =?utf-8?b?5b63XQ==?= , =?utf-8?q?Andreas_F=C3=A4?= =?utf-8?q?rber?= , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org This additional register is needed to distinguish RTD1296 from RTD1295. Signed-off-by: Andreas Färber Reviewed-by: Stanley Chang --- v1 -> v2: * Switched from reg to new iso-syscon phandle arch/arm64/boot/dts/realtek/rtd129x.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/boot/dts/realtek/rtd129x.dtsi b/arch/arm64/boot/dts/realtek/rtd129x.dtsi index b5be9df80dae..30a7782aa0d9 100644 --- a/arch/arm64/boot/dts/realtek/rtd129x.dtsi +++ b/arch/arm64/boot/dts/realtek/rtd129x.dtsi @@ -204,6 +204,7 @@ sb2_hd_sem: hwspinlock@0 { chip-info@200 { compatible = "realtek,rtd1195-chip"; reg = <0x200 0x8>; + iso-syscon = <&iso>; }; sb2_hd_sem_new: hwspinlock@620 { From patchwork Tue Jun 23 02:50:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andreas_F=C3=A4rber?= X-Patchwork-Id: 11619617 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 84BA8161F for ; Tue, 23 Jun 2020 02:53:56 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 5F0F620786 for ; Tue, 23 Jun 2020 02:53:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Mn6rc8wb" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5F0F620786 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=S7DvXi/mG2YdmPc3QMnUWfzaCkShDgwBifD/Xfst3pI=; b=Mn6rc8wbSNxEniwvCGZrGKMge +0u+lH/YjbgVCecZglNgr4AJmFTQWXEDqhPe7jC+PiaFF5v4AwaCVNT51ZRTkOZVX0w/rS9Kd7nOS el4qCmySwkSq1+8R56xTnWTttEvNRnKhRchK9njnjBsni6+UHpac1Hi6mhxNCXdZK/SA5QGVzGYp5 ss5VE5aJ1SNCMftpXiDFEmqad5FnSaZjvXrl1Pyrtb0Q0XYB4XNS0+KmCVrQ++SIT2H/6sE/dKIC/ GHpZTOTaStx32kH03MjE67dMWBFJPFUVzHAOJOLB4Syhml8wHsgqRkgKscGhssBNIzptGSBJWFpeA IL8w8DQDw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jnZ2S-0001ws-Cu; Tue, 23 Jun 2020 02:51:56 +0000 Received: from mx2.suse.de ([195.135.220.15]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jnZ2M-0001td-N2; Tue, 23 Jun 2020 02:51:51 +0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 18F55AE83; Tue, 23 Jun 2020 02:51:33 +0000 (UTC) From: =?utf-8?q?Andreas_F=C3=A4rber?= To: linux-realtek-soc@lists.infradead.org Subject: [PATCH v2 08/29] soc: realtek: chip: Detect RTD1293 Date: Tue, 23 Jun 2020 04:50:45 +0200 Message-Id: <20200623025106.31273-9-afaerber@suse.de> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200623025106.31273-1-afaerber@suse.de> References: <20200623025106.31273-1-afaerber@suse.de> MIME-Version: 1.0 X-Spam-Note: CRM114 invocation failed X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-2.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [195.135.220.15 listed in list.dnswl.org] 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [195.135.220.15 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?b?SmFtZXMgVGFpIFvmiLTlv5fls7Bd?= , Edgar Lee , linux-kernel@vger.kernel.org, =?utf-8?b?U3RhbmxleSBDaGFuZyBb5piM6IKy5b63XQ==?= , =?utf-8?q?Andreas_F=C3=A4rber?= , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Logic self-determined by comparing DS418j and DS418 registers. Signed-off-by: Andreas Färber --- TODO: Identify the bit in ISO_CHIP_INFO1:bound_opts and what it really means. v1 -> v2: * Rebased onto iso syscon regmap drivers/soc/realtek/chip.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/soc/realtek/chip.c b/drivers/soc/realtek/chip.c index 103f564aad7f..32ed0e4a3646 100644 --- a/drivers/soc/realtek/chip.c +++ b/drivers/soc/realtek/chip.c @@ -75,8 +75,11 @@ static const char *rtd1295_name(struct device *dev, const struct dhc_soc *s) ret = regmap_read(regmap, REG_ISO_CHIP_INFO1, &val); if (ret) dev_warn(dev, "Could not read chip_info1 (%d)\n", ret); - else if (val & BIT(11)) + else if (val & BIT(11)) { + if (val & BIT(4)) + return "RTD1293"; return "RTD1296"; + } } return "RTD1295"; From patchwork Tue Jun 23 02:50:46 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andreas_F=C3=A4rber?= X-Patchwork-Id: 11619679 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id EB1B1618 for ; Tue, 23 Jun 2020 03:38:55 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 C45D920780 for ; Tue, 23 Jun 2020 03:38:55 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="qAy/3jk9" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C45D920780 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=qSHYYsX/PDg8C1ZXY9LrT1QhNOJcO846+z8S/azEosI=; b=qAy/3jk98yDsowGRgaQZo/lzA 766MaR1O1szoh9xV59PfJdxIczKC/d7l10A6oKYm4Xzgu2m0G/9o9gmm90gE4+9Zp6O9sSGlmWRO8 j0hJFjeigoHedYOrGBHec89go63B4mTrc9EQjRicD5cuAUQi9bCe7pT9VmH6k1g9ruasXjYrjuV1L D+Vcvucefni86eAqJgfD3DmxfDc6HbKuAkYSAMJwDdJUuenCRjEjR5uoIsPApOUICh/cPFPy0ZptE DDF19emVm8FUS6sDnsSZAmJey3SSSJwR+6Pp7tknPBmnXWBua6yabBpwtPxyehWqyXXRdVk9VifwZ 1+lF21QCg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jnZ9q-0007BM-UZ; Tue, 23 Jun 2020 02:59:35 +0000 Received: from mx2.suse.de ([195.135.220.15]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jnZ3N-0002Wp-5p; Tue, 23 Jun 2020 02:52:54 +0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 834CFAEA8; Tue, 23 Jun 2020 02:51:33 +0000 (UTC) From: =?utf-8?q?Andreas_F=C3=A4rber?= To: linux-realtek-soc@lists.infradead.org Subject: [PATCH v2 09/29] soc: realtek: chip: Add RTD1395 info Date: Tue, 23 Jun 2020 04:50:46 +0200 Message-Id: <20200623025106.31273-10-afaerber@suse.de> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200623025106.31273-1-afaerber@suse.de> References: <20200623025106.31273-1-afaerber@suse.de> MIME-Version: 1.0 X-Spam-Note: CRM114 invocation failed X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-2.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [195.135.220.15 listed in list.dnswl.org] 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [195.135.220.15 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?b?SmFtZXMgVGFpIFvmiLTlv5fls7Bd?= , Edgar Lee , linux-kernel@vger.kernel.org, =?utf-8?b?U3RhbmxleSBDaGFuZyBb5piM6IKy5b63XQ==?= , =?utf-8?q?Andreas_F=C3=A4rber?= , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Chip ID from BPi-M4. Revisions based on downstream drivers/soc/realtek/rtd139x/rtk_chip.c. Signed-off-by: Andreas Färber Tested-by: Stanley Chang Reviewed-by: Stanley Chang --- v2: New drivers/soc/realtek/chip.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/soc/realtek/chip.c b/drivers/soc/realtek/chip.c index 32ed0e4a3646..aa7ca6bb1e64 100644 --- a/drivers/soc/realtek/chip.c +++ b/drivers/soc/realtek/chip.c @@ -46,6 +46,13 @@ static const struct dhc_soc_revision rtd1295_revisions[] = { { } }; +static const struct dhc_soc_revision rtd1395_revisions[] = { + { "A00", 0x0000 }, + { "A01", 0x0001 }, + { "A02", 0x0002 }, + { } +}; + struct dhc_soc { u16 chip_id; const char *family; @@ -88,6 +95,7 @@ static const char *rtd1295_name(struct device *dev, const struct dhc_soc *s) static const struct dhc_soc dhc_soc_families[] = { { 0x6329, "RTD1195", default_name, rtd1195_revisions, "Phoenix" }, { 0x6421, "RTD1295", rtd1295_name, rtd1295_revisions, "Kylin" }, + { 0x6481, "RTD1395", default_name, rtd1395_revisions, "Hercules" }, }; static const struct dhc_soc *dhc_soc_by_chip_id(u16 chip_id) From patchwork Tue Jun 23 02:50:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andreas_F=C3=A4rber?= X-Patchwork-Id: 11619799 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 97B251392 for ; Tue, 23 Jun 2020 05:33:23 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 6B9982064B for ; Tue, 23 Jun 2020 05:33:23 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Upmcjisy" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6B9982064B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=MYlJxjPSS7VCf+AS+i48uxeOp9rRANkumIyyaQafq6A=; b=UpmcjisyAUUrI3gc1W1akJHgV gFqkTL28gq4OLqAgmAwy0w16z+9mhwMxTz6KFOjEygTYvKK4w4OalqMSGxQFG6xngUFsyl7uc3Keu rZ1N8xagyjFIW9BYNXkRuYAMwuQ9e+i1RlglMx2OiTKBF6U20afcR+zmKVBq49QsGQOceXvRyf8Bk fHdEXuNKJtT/LxHFyr2ls93TTYhCKWWG+4gQrQzPinnXojSs/W/rftNVV4fJyViTcFBkfV4wwgH4F /1ezLJKQ6fpLBlI+7t3RsGl7EQVvMJzvU42uQTIOG+7S5ftywcQR0Vj0VvepWIs5sZk0sEZe8Ayxk EDDNhOJ+Q==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jnZ9S-0006rE-7c; Tue, 23 Jun 2020 02:59:10 +0000 Received: from mx2.suse.de ([195.135.220.15]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jnZ3N-0002Wq-5p; Tue, 23 Jun 2020 02:52:54 +0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id F4034B196; Tue, 23 Jun 2020 02:51:33 +0000 (UTC) From: =?utf-8?q?Andreas_F=C3=A4rber?= To: linux-realtek-soc@lists.infradead.org Subject: [PATCH v2 10/29] arm64: dts: realtek: rtd139x: Add chip info node Date: Tue, 23 Jun 2020 04:50:47 +0200 Message-Id: <20200623025106.31273-11-afaerber@suse.de> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200623025106.31273-1-afaerber@suse.de> References: <20200623025106.31273-1-afaerber@suse.de> MIME-Version: 1.0 X-Spam-Note: CRM114 invocation failed X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-2.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [195.135.220.15 listed in list.dnswl.org] 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [195.135.220.15 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, =?utf-8?b?SmFtZXMgVGFpIFvmiLTlv5fls7Bd?= , Edgar Lee , linux-kernel@vger.kernel.org, Rob Herring , =?utf-8?b?U3RhbmxleSBDaGFuZyBb5piM6IKy?= =?utf-8?b?5b63XQ==?= , =?utf-8?q?Andreas_F=C3=A4?= =?utf-8?q?rber?= , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Add a DT node for chip identification. Signed-off-by: Andreas Färber Tested-by: Stanley Chang Reviewed-by: Stanley Chang --- v2: New arch/arm64/boot/dts/realtek/rtd139x.dtsi | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/arm64/boot/dts/realtek/rtd139x.dtsi b/arch/arm64/boot/dts/realtek/rtd139x.dtsi index 586b05350274..3d4d2323294b 100644 --- a/arch/arm64/boot/dts/realtek/rtd139x.dtsi +++ b/arch/arm64/boot/dts/realtek/rtd139x.dtsi @@ -199,6 +199,11 @@ sb2_hd_sem: hwspinlock@0 { #hwlock-cells = <0>; }; + chip-info@200 { + compatible = "realtek,rtd1195-chip"; + reg = <0x200 0x8>; + }; + sb2_hd_sem_new: hwspinlock@620 { compatible = "realtek,rtd1195-sb2-sem"; reg = <0x620 0x20>; From patchwork Tue Jun 23 02:50:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andreas_F=C3=A4rber?= X-Patchwork-Id: 11619657 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id BCE976C1 for ; Tue, 23 Jun 2020 03:03:40 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 94CAD20786 for ; Tue, 23 Jun 2020 03:03:40 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="AChqwId8"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="YH4y9hk1" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 94CAD20786 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=9nBLjDBp8UW07sYEZWR/rxG34Y5ojV4ioE9QlzefhXQ=; b=AChqwId8Db1j8q3KecAbpsr2I bXOyuZk/2eJzJBOUjBaP9YcOY5j+UnXRYm20Ulep3uD19pkdRIzLAiGLzmv9RJPi3DAed+OHQqrnU SU0Ctx5pPj7JWFIv74b2yOluu3D0DtQOmuC+WBPvKWHEBq2Lw8HeTv3REV4zZ5sIATAZtrBiUV0bA bky66DaRTCMbL70i1xYdPRxQFAUoFaePis5Qai1d5ds+KZHPC92jRQHVcCFg5VUR9afGJCUqqIaKf XAzRLLxjcPaoLLHh4HAVVBZi//z5HNV00g2a6VfqvWTaP/sHImnhHSbxQmohhyOEx+0Oogdr8aP0z CMOhLaFuQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jnZBb-0000JC-66; Tue, 23 Jun 2020 03:01:23 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jnZ3P-0002YV-73; Tue, 23 Jun 2020 02:52:55 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:Content-Type: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-ID:Content-Description; bh=cTcuy/nlll1OVWLSXLHzS9ZUxC5IqGSgl64v3T3o1iA=; b=YH4y9hk1ZxX3FDLah/kMifObXl 1+u+R10x3aBagUhCn8vkfJdrVCMOqYuakoefN89pSYC012koJH7DqbxA0I1UfeIssmPf7wb41U74m EkXg+C3A8MwA+WwwKi+n8jOTisWqpe5lPpT2TloC6yIODES7nwsns5Y5e/j1tqP8VBYHncVlMTSGb H3H1j+sEsW9YM56l+g8da7YAAOhGVmfNml05xqMLnuhgU+pMJKhXfLTFlYSj9iJaQh1IpjG12aCcH BsV39lZsU9/M+DQlj2GjCbxYd/jOB+qFxSObSFUAljbBeLL4RkNM68bBH6L+HYqTDkQS6+GOzzcP3 GETQNJ1Q==; Received: from mx2.suse.de ([195.135.220.15]) by casper.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jnZ3M-0005VE-9B; Tue, 23 Jun 2020 02:52:54 +0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 613C4AE33; Tue, 23 Jun 2020 02:51:34 +0000 (UTC) From: =?utf-8?q?Andreas_F=C3=A4rber?= To: linux-realtek-soc@lists.infradead.org Subject: [PATCH v2 11/29] soc: realtek: chip: Add RTD1619 info Date: Tue, 23 Jun 2020 04:50:48 +0200 Message-Id: <20200623025106.31273-12-afaerber@suse.de> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200623025106.31273-1-afaerber@suse.de> References: <20200623025106.31273-1-afaerber@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200623_035252_469147_F8EED3B8 X-CRM114-Status: UNSURE ( 7.76 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -4.2 (----) X-Spam-Report: SpamAssassin version 3.4.4 on casper.infradead.org summary: Content analysis details: (-4.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [195.135.220.15 listed in wl.mailspike.net] -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [195.135.220.15 listed in list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?b?SmFtZXMgVGFpIFvmiLTlv5fls7Bd?= , Edgar Lee , linux-kernel@vger.kernel.org, =?utf-8?b?U3RhbmxleSBDaGFuZyBb5piM6IKy5b63XQ==?= , =?utf-8?q?Andreas_F=C3=A4rber?= , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Revisions based on downstream drivers/soc/realtek/rtd16xx/rtk_chip.c. Signed-off-by: Andreas Färber Tested-by: Stanley Chang Reviewed-by: Stanley Chang --- v2: New drivers/soc/realtek/chip.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/soc/realtek/chip.c b/drivers/soc/realtek/chip.c index aa7ca6bb1e64..e3220187e336 100644 --- a/drivers/soc/realtek/chip.c +++ b/drivers/soc/realtek/chip.c @@ -53,6 +53,12 @@ static const struct dhc_soc_revision rtd1395_revisions[] = { { } }; +static const struct dhc_soc_revision rtd1619_revisions[] = { + { "A00", 0x0000 }, + { "A01", 0x0001 }, + { } +}; + struct dhc_soc { u16 chip_id; const char *family; @@ -96,6 +102,7 @@ static const struct dhc_soc dhc_soc_families[] = { { 0x6329, "RTD1195", default_name, rtd1195_revisions, "Phoenix" }, { 0x6421, "RTD1295", rtd1295_name, rtd1295_revisions, "Kylin" }, { 0x6481, "RTD1395", default_name, rtd1395_revisions, "Hercules" }, + { 0x6525, "RTD1619", default_name, rtd1619_revisions, "Thor" }, }; static const struct dhc_soc *dhc_soc_by_chip_id(u16 chip_id) From patchwork Tue Jun 23 02:50:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andreas_F=C3=A4rber?= X-Patchwork-Id: 11619635 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1E06F913 for ; Tue, 23 Jun 2020 02:56:03 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 EB8862076A for ; Tue, 23 Jun 2020 02:56:02 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="q+MYOoST" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EB8862076A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=dxJrNMXtrnsSocuvvIpeiEMhDfxBSlC0lfbCyh7eQjs=; b=q+MYOoSTyBEqhhHPCCqI1R/Qe 7erYlLdFweYwBETFEcgzbSqDOcAOsbqgsiy0Rg4Mn4JevSy4PLqSN2Pu/i3hF9uXHFqrGj7d1c1zi JXkzvZHLw7lXEnZYM3EQZ6EWSZf6LCH/bKdR2jMMHDUX3ImhXQ942mRCh+bDBAXnUeFkmCfNKfwaP nomnYwPE0AD+3oOgHJk5U7akJrs1W2PQkQKLG9rLImnO5VTXgQM/5fl96pTtYmBlreO8XuedEmnM1 U8RWs4KC+BJ2etyj0MoPwFiuyeDHYMoqmF869KMtfGJK43slRgX8KaUt+vVvGOWzFodWHes43/bAp QY3Zf9VVg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jnZ4C-000369-QW; Tue, 23 Jun 2020 02:53:44 +0000 Received: from mx2.suse.de ([195.135.220.15]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jnZ2u-0002Dk-4O; Tue, 23 Jun 2020 02:52:24 +0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id CE9A9B188; Tue, 23 Jun 2020 02:51:34 +0000 (UTC) From: =?utf-8?q?Andreas_F=C3=A4rber?= To: linux-realtek-soc@lists.infradead.org Subject: [PATCH v2 12/29] arm64: dts: realtek: rtd16xx: Add chip info node Date: Tue, 23 Jun 2020 04:50:49 +0200 Message-Id: <20200623025106.31273-13-afaerber@suse.de> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200623025106.31273-1-afaerber@suse.de> References: <20200623025106.31273-1-afaerber@suse.de> MIME-Version: 1.0 X-Spam-Note: CRM114 invocation failed X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-2.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [195.135.220.15 listed in list.dnswl.org] 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [195.135.220.15 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, =?utf-8?b?SmFtZXMgVGFpIFvmiLTlv5fls7Bd?= , Edgar Lee , linux-kernel@vger.kernel.org, Rob Herring , =?utf-8?b?U3RhbmxleSBDaGFuZyBb5piM6IKy?= =?utf-8?b?5b63XQ==?= , =?utf-8?q?Andreas_F=C3=A4?= =?utf-8?q?rber?= , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Add a DT node for chip identification. Signed-off-by: Andreas Färber Tested-by: Stanley Chang Reviewed-by: Stanley Chang --- v2: New arch/arm64/boot/dts/realtek/rtd16xx.dtsi | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/arch/arm64/boot/dts/realtek/rtd16xx.dtsi b/arch/arm64/boot/dts/realtek/rtd16xx.dtsi index afba5f04c8ec..04cb546142a0 100644 --- a/arch/arm64/boot/dts/realtek/rtd16xx.dtsi +++ b/arch/arm64/boot/dts/realtek/rtd16xx.dtsi @@ -227,3 +227,10 @@ uart2: serial2@400 { status = "disabled"; }; }; + +&sb2 { + chip-info@200 { + compatible = "realtek,rtd1195-chip"; + reg = <0x200 0x8>; + }; +}; From patchwork Tue Jun 23 02:50:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andreas_F=C3=A4rber?= X-Patchwork-Id: 11619625 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D180513A0 for ; Tue, 23 Jun 2020 02:54:46 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 AA8692076A for ; Tue, 23 Jun 2020 02:54:46 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Ww4dKXgx" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AA8692076A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=VYluOtIcABpmXNq6IiC+J8Sf8Nn0XpqCTwFh9vo4uc0=; b=Ww4dKXgx53FRz4hUqFOgg0oX7 SN66x0j6SPJ25TXAREn7/HUCfrm3gSJOoc/gKeOxc+nEVPFdoCmOkpfkWY2bT5BRgkO4ykfEczyWO SP5Lc5N86/rdkDCgJfO+RF8gkVlZJG6Jar+tcxDaCdYl54S2VaTCW6ZDCu2ixvrODk1e1czxDfGH/ G/XXcuILiTpja/XV2RBACNkLId3D3p/P3t6DvQmJicss2o2YrAuOUCztl+ml+15ANJYYMi/g6jXb/ B7kT3A9AILfJSrDz5PG3V++x0D2F/VerGXIuNyXEnm+jAB+mJIxP66LS7LmAdHBRBLAXNgETT1N6x TF4afHMqQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jnZ2y-0002FZ-OT; Tue, 23 Jun 2020 02:52:28 +0000 Received: from mx2.suse.de ([195.135.220.15]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jnZ2e-00023P-RV; Tue, 23 Jun 2020 02:52:10 +0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 41276B191; Tue, 23 Jun 2020 02:51:35 +0000 (UTC) From: =?utf-8?q?Andreas_F=C3=A4rber?= To: linux-realtek-soc@lists.infradead.org Subject: [PATCH v2 13/29] soc: realtek: chip: Add RTD1319 info Date: Tue, 23 Jun 2020 04:50:50 +0200 Message-Id: <20200623025106.31273-14-afaerber@suse.de> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200623025106.31273-1-afaerber@suse.de> References: <20200623025106.31273-1-afaerber@suse.de> MIME-Version: 1.0 X-Spam-Note: CRM114 invocation failed X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-2.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [195.135.220.15 listed in list.dnswl.org] 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [195.135.220.15 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?b?SmFtZXMgVGFpIFvmiLTlv5fls7Bd?= , Edgar Lee , linux-kernel@vger.kernel.org, =?utf-8?b?U3RhbmxleSBDaGFuZyBb5piM6IKy5b63XQ==?= , =?utf-8?q?Andreas_F=C3=A4rber?= , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Revision based on downstream drivers/soc/realtek/rtd13xx/rtk_chip.c. Signed-off-by: Stanley Chang Signed-off-by: Andreas Färber Tested-by: Stanley Chang Reviewed-by: Stanley Chang --- v2: New * Filled in chip ID based on Stanley's v1 drivers/soc/realtek/chip.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/soc/realtek/chip.c b/drivers/soc/realtek/chip.c index e3220187e336..ae7c5322f338 100644 --- a/drivers/soc/realtek/chip.c +++ b/drivers/soc/realtek/chip.c @@ -59,6 +59,11 @@ static const struct dhc_soc_revision rtd1619_revisions[] = { { } }; +static const struct dhc_soc_revision rtd1319_revisions[] = { + { "A00", 0x0000 }, + { } +}; + struct dhc_soc { u16 chip_id; const char *family; @@ -103,6 +108,7 @@ static const struct dhc_soc dhc_soc_families[] = { { 0x6421, "RTD1295", rtd1295_name, rtd1295_revisions, "Kylin" }, { 0x6481, "RTD1395", default_name, rtd1395_revisions, "Hercules" }, { 0x6525, "RTD1619", default_name, rtd1619_revisions, "Thor" }, + { 0x6570, "RTD1319", default_name, rtd1319_revisions, "Hank" }, }; static const struct dhc_soc *dhc_soc_by_chip_id(u16 chip_id) From patchwork Tue Jun 23 02:50:51 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andreas_F=C3=A4rber?= X-Patchwork-Id: 11619623 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4E5F66C1 for ; Tue, 23 Jun 2020 02:54:35 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 28E5B2076A for ; Tue, 23 Jun 2020 02:54:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="GsgKpI/c" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 28E5B2076A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=d8eOIT1ELnSzFQNCzdL6HcX616lqwrjfl1T3NfT61d8=; b=GsgKpI/cDJjh6AofbaXdn6qmj eYbomqFPbABjtLWAiXXsfQN8Oo3clWz/mFCq5RZ+/OqQhuypVuyeGj/TAqQn7FEXDRxpEC1bbNSVm lhJDqmbi70H+2omlJDqCOV2ap0ClqhBQeIR0hpyhujPrjdeSrCc5v4E3+MUBFHQYrmkwnCbqofK60 S4YNHWj5E3n0fOO01oInPYBN0QxrtUs4aHKj5BhlcYp8n9yAn9l0X9HpjvgfEholDN3m2Tz0UrlIa 4WE0tAR3Mnfbt+naIR64MhDTV2ND9eyWpEfLhK4fvp9OBS4HXLvqIIeSmvls5ec9ccM54KLBSyKAw Dy81i4ZFA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jnZ2r-0002Aw-VH; Tue, 23 Jun 2020 02:52:22 +0000 Received: from mx2.suse.de ([195.135.220.15]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jnZ2e-00023O-RO; Tue, 23 Jun 2020 02:52:10 +0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id A6EF5B197; Tue, 23 Jun 2020 02:51:35 +0000 (UTC) From: =?utf-8?q?Andreas_F=C3=A4rber?= To: linux-realtek-soc@lists.infradead.org Subject: [PATCH v2 14/29] soc: realtek: chip: Add RTD1319 revisions Date: Tue, 23 Jun 2020 04:50:51 +0200 Message-Id: <20200623025106.31273-15-afaerber@suse.de> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200623025106.31273-1-afaerber@suse.de> References: <20200623025106.31273-1-afaerber@suse.de> MIME-Version: 1.0 X-Spam-Note: CRM114 invocation failed X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-2.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [195.135.220.15 listed in list.dnswl.org] 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [195.135.220.15 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?b?SmFtZXMgVGFpIFvmiLTlv5fls7Bd?= , Edgar Lee , linux-kernel@vger.kernel.org, =?utf-8?b?U3RhbmxleSBDaGFuZyBb5piM6IKy5b63XQ==?= , =?utf-8?q?Andreas_F=C3=A4rber?= , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org From: Stanley Chang Identify RTD1319 SoC revisions B00 to B02. Signed-off-by: Stanley Chang Signed-off-by: Andreas Färber Tested-by: Stanley Chang Reviewed-by: Stanley Chang --- v2: New * Split out from Stanley's v1 drivers/soc/realtek/chip.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/soc/realtek/chip.c b/drivers/soc/realtek/chip.c index ae7c5322f338..6b3d1f3d3816 100644 --- a/drivers/soc/realtek/chip.c +++ b/drivers/soc/realtek/chip.c @@ -3,6 +3,7 @@ * Realtek Digital Home Center System-on-Chip info * * Copyright (c) 2017-2020 Andreas Färber + * Copyright (c) 2019 Realtek Semiconductor Corp. */ #include @@ -61,6 +62,9 @@ static const struct dhc_soc_revision rtd1619_revisions[] = { static const struct dhc_soc_revision rtd1319_revisions[] = { { "A00", 0x0000 }, + { "B00", 0x0001 }, + { "B01", 0x0002 }, + { "B02", 0x0003 }, { } }; From patchwork Tue Jun 23 02:50:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andreas_F=C3=A4rber?= X-Patchwork-Id: 11619897 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id AA088618 for ; Tue, 23 Jun 2020 07:11:26 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 7E6EC206A5 for ; Tue, 23 Jun 2020 07:11:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="ux5wg8tp"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="CF7wNHZT" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7E6EC206A5 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=t2RyL1TSHOdnLCNQY3lLecIooyL3AysXjZHmawe5Vpc=; b=ux5wg8tpafhZ7oG2h/+ptuchT 9SbosXQcNYk9gkvT71+47p6SIyUSgryNHkXVd+KlOrnptoN4FoPM63YDGcIcEWHY3ZXTKY7Rd4qIT oy4jsWDGcHPIyMVA0vS311ZfVpBYTLNV94v7IzjwZN7ECn06xzsUiFySY13uzcHBjKpRSxNHKVngd ZIKISV8DW6EyC7nZbzs+m+c8ZzmJIkZScGVPyZN4D6faMocLK0S+L6M4be2PNYxDkNuopMEjTms8F HCZEZMx/mH2/7hzgUBvAKNdSCXzcNVxdFw8FP0TVZnbyIgZLv3V+ht385+drVlDQRBuzPX58Xtzh2 Q6KSU5nzw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jnZ8e-0006YO-DH; Tue, 23 Jun 2020 02:58:21 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jnZ3E-0002RK-PH; Tue, 23 Jun 2020 02:52:44 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:Content-Type: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-ID:Content-Description; bh=3Hq4HDEOz0lRfxVQ86lu5JOouF1wz3yz2TAgiLb1qig=; b=CF7wNHZTOVkgb61Joz0mlFuNQl QGDDWYPkp1Z7WD4xhnKuCKxvBiSQlHJzer4EFeV6hkVSTBWhG7rvj0KkDrYQSNb+u+PYqqJRiy3tA z9QP0mMACYje904vP4+YtbksJu4L+p4kmEfyyXgPnoDu97VsCKBsxd8GumuoQbbzNQvDs0VbOfTJ5 gsGaRbMcVPKRSQv5x9lUmVkTOG+uoqx1TMG4UmDU8K+9XHYJEou1ScL4Itp7Z2KTo8caRZMBRKWMn GSQBpcEWGU4YcD10/A8tgYYeA6fNQNLoS5hSBDW0i6w6mlZ5iiGx2TEsboVcXpGzKV2K0o6/P8DK5 2NTUA4/w==; Received: from mx2.suse.de ([195.135.220.15]) by casper.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jnZ3C-0005UM-2H; Tue, 23 Jun 2020 02:52:43 +0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 2A507B18C; Tue, 23 Jun 2020 02:51:36 +0000 (UTC) From: =?utf-8?q?Andreas_F=C3=A4rber?= To: linux-realtek-soc@lists.infradead.org Subject: [PATCH v2 15/29] arm64: dts: realtek: rtd13xx: Add chip info node Date: Tue, 23 Jun 2020 04:50:52 +0200 Message-Id: <20200623025106.31273-16-afaerber@suse.de> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200623025106.31273-1-afaerber@suse.de> References: <20200623025106.31273-1-afaerber@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200623_035242_237806_6958D615 X-CRM114-Status: UNSURE ( 7.80 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -4.2 (----) X-Spam-Report: SpamAssassin version 3.4.4 on casper.infradead.org summary: Content analysis details: (-4.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [195.135.220.15 listed in wl.mailspike.net] -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [195.135.220.15 listed in list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, =?utf-8?b?SmFtZXMgVGFpIFvmiLTlv5fls7Bd?= , Edgar Lee , linux-kernel@vger.kernel.org, Rob Herring , =?utf-8?b?U3RhbmxleSBDaGFuZyBb5piM6IKy?= =?utf-8?b?5b63XQ==?= , =?utf-8?q?Andreas_F=C3=A4?= =?utf-8?q?rber?= , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Add a DT node for chip identification. Signed-off-by: Andreas Färber Tested-by: Stanley Chang Reviewed-by: Stanley Chang --- v2: New arch/arm64/boot/dts/realtek/rtd13xx.dtsi | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/arch/arm64/boot/dts/realtek/rtd13xx.dtsi b/arch/arm64/boot/dts/realtek/rtd13xx.dtsi index e41be02f2e3a..e4271ef5cb1e 100644 --- a/arch/arm64/boot/dts/realtek/rtd13xx.dtsi +++ b/arch/arm64/boot/dts/realtek/rtd13xx.dtsi @@ -211,3 +211,10 @@ uart2: serial@400 { status = "disabled"; }; }; + +&sb2 { + chip-info@200 { + compatible = "realtek,rtd1195-chip"; + reg = <0x200 0x8>; + }; +}; From patchwork Tue Jun 23 02:50:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andreas_F=C3=A4rber?= X-Patchwork-Id: 11619687 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 81D0760D for ; Tue, 23 Jun 2020 03:59:52 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 5AD8820771 for ; Tue, 23 Jun 2020 03:59:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="D1oHaUug" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5AD8820771 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=FJs8i6kMSM0dSEh/QnBgId9YEGGrtoJRgDyap7HsBxU=; b=D1oHaUuguN9CP7e/h9w4zdbcS bIDhWxB7PCFkFyVNlfh8GUA6FYoLCjIlqc/lxSs1nwd4mBhU4TJ2sQtQSQI+yNED3HQib2qVsjnc8 uUXNGyeLFnddRCaIgo1u+NSuYcTX+4IEKf5bIYwlvqSltW4Q3/+aX+eYzui5s8Lw/4tQkXfq+q9Kn 9OW/+pTaTDm+6P0EEYEqggYq2SrwOPjo/dkItW7Mf+7wiD43fil8GRcDH2KZCYyTA56j5sJzPzCdY vAUrmF0PSx01hNtkrFSt+5Kuxc1jRyiDREpOagaTiNvGzpx1sGb6oK1XH3exfUWU0enRsu9c1KfW6 lPUNmI+zA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jnZ8Q-0006SO-O2; Tue, 23 Jun 2020 02:58:06 +0000 Received: from mx2.suse.de ([195.135.220.15]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jnZ3D-0002Q3-6p; Tue, 23 Jun 2020 02:52:43 +0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 99FBDB198; Tue, 23 Jun 2020 02:51:36 +0000 (UTC) From: =?utf-8?q?Andreas_F=C3=A4rber?= To: linux-realtek-soc@lists.infradead.org Subject: [PATCH v2 16/29] soc: realtek: chip: Detect RTD1392 Date: Tue, 23 Jun 2020 04:50:53 +0200 Message-Id: <20200623025106.31273-17-afaerber@suse.de> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200623025106.31273-1-afaerber@suse.de> References: <20200623025106.31273-1-afaerber@suse.de> MIME-Version: 1.0 X-Spam-Note: CRM114 invocation failed X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-2.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [195.135.220.15 listed in list.dnswl.org] 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [195.135.220.15 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?b?SmFtZXMgVGFpIFvmiLTlv5fls7Bd?= , Edgar Lee , linux-kernel@vger.kernel.org, =?utf-8?b?U3RhbmxleSBDaGFuZyBb5piM6IKy5b63XQ==?= , =?utf-8?q?Andreas_F=C3=A4rber?= , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org From: Stanley Chang Distinguish RTD1392 from RTD1395 via ISO_CHIP_INFO1 register. Signed-off-by: Stanley Chang Signed-off-by: Andreas Färber Reviewed-by: Stanley Chang --- TODO: Name the bit in ISO_CHIP_INFO1:bound_opts. Note: We don't have any RTD1392 .dtsi/.dts yet. v2: New * Split out from Stanley's v1 drivers/soc/realtek/chip.c | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/drivers/soc/realtek/chip.c b/drivers/soc/realtek/chip.c index 6b3d1f3d3816..9cee760bac35 100644 --- a/drivers/soc/realtek/chip.c +++ b/drivers/soc/realtek/chip.c @@ -107,10 +107,33 @@ static const char *rtd1295_name(struct device *dev, const struct dhc_soc *s) return "RTD1295"; } +static const char *rtd1395_name(struct device *dev, const struct dhc_soc *s) +{ + struct regmap *regmap; + unsigned int val; + int ret; + + regmap = syscon_regmap_lookup_by_phandle(dev->of_node, "iso-syscon"); + if (IS_ERR(regmap)) { + ret = PTR_ERR(regmap); + if (ret == -EPROBE_DEFER) + return ERR_PTR(ret); + dev_warn(dev, "Could not check iso (%d)\n", ret); + } else { + ret = regmap_read(regmap, REG_ISO_CHIP_INFO1, &val); + if (ret) + dev_warn(dev, "Could not read chip_info1 (%d)\n", ret); + else if (val & BIT(12)) + return "RTD1392"; + } + + return "RTD1395"; +} + static const struct dhc_soc dhc_soc_families[] = { { 0x6329, "RTD1195", default_name, rtd1195_revisions, "Phoenix" }, { 0x6421, "RTD1295", rtd1295_name, rtd1295_revisions, "Kylin" }, - { 0x6481, "RTD1395", default_name, rtd1395_revisions, "Hercules" }, + { 0x6481, "RTD1395", rtd1395_name, rtd1395_revisions, "Hercules" }, { 0x6525, "RTD1619", default_name, rtd1619_revisions, "Thor" }, { 0x6570, "RTD1319", default_name, rtd1319_revisions, "Hank" }, }; From patchwork Tue Jun 23 02:50:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andreas_F=C3=A4rber?= X-Patchwork-Id: 11619627 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E61906C1 for ; Tue, 23 Jun 2020 02:55:09 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 BDB082076A for ; Tue, 23 Jun 2020 02:55:09 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="QRRDtDWW"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="BpE8o52M" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BDB082076A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=zrAwYMecDN+Peoh0EEncSuet8DTlftID9P2wpflKiRk=; b=QRRDtDWW82vcFSD82GBPqqGRE maUU52f1n1i83ju0tQ/P29ZjlVSAtchw0ilveftUTuefs2anOYc5ysl8WGZP4ZOYTejam/VhxkFcl fwfbGH33cPPHTSUOrj2qg3KEvbkV4fL9VN/NSYIkDehrNk173P00NN25eDyLU3FqIy7efFk13gagL e/iA1R8QjWXQfAGYBx88iCvkjZsAROu4JLH4hjVDJNUStJkXp5yVefvlg8HNuRExkrKK31tJCmRBO MDi4uyg0/xexocyvjZ6fCm/WPkYLL70cqMjZd/56T7qpmQqEXM1vf2bzENGVjfvdFm0COvGEj1aYX 32Y9KuVtQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jnZ3D-0002Nb-T0; Tue, 23 Jun 2020 02:52:44 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jnZ2k-00027O-OZ; Tue, 23 Jun 2020 02:52:14 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:Content-Type: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-ID:Content-Description; bh=QzRTMw7cGIiDF1EpWKvK1ncbe3cUG4saEVjAPbs+RQ8=; b=BpE8o52MasVKb/C6tHhcTkWOSd 3pbXHQ4PUlqDupbH6MZd09jYxUU0GUybN5tj4FXCtKr7RiHE7opG2sa5pkc0ExFkuDa1vIV4U/+Eq KLc8ZsJAxfM48trJqsKB+G/WWcZZAt3j7lFV3KEAhl5yANLrJnUhbCMx6gmP7DQzHhghiAAt14oaa zEgDhfmuxRP/FzraG9qgWo698cO2TKWZo5H5jrbV5HhMo0tOrqgsG39NJ7kQLcYoBiiUTxvlxF3gl 9T19MbH0G7QHeM2xnjLc2vUgnswA4DZvjlYj8udyxvIvE90NUmPvQSZ3gxGfmrQEfOHEBH45m5OdC QsIu9x9w==; Received: from mx2.suse.de ([195.135.220.15]) by casper.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jnZ2h-0005Py-Cf; Tue, 23 Jun 2020 02:52:13 +0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 4D6B6B199; Tue, 23 Jun 2020 02:51:37 +0000 (UTC) From: =?utf-8?q?Andreas_F=C3=A4rber?= To: linux-realtek-soc@lists.infradead.org Subject: [PATCH v2 17/29] dt-bindings: nvmem: Add Realtek RTD1195 eFuse Date: Tue, 23 Jun 2020 04:50:54 +0200 Message-Id: <20200623025106.31273-18-afaerber@suse.de> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200623025106.31273-1-afaerber@suse.de> References: <20200623025106.31273-1-afaerber@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200623_035211_628602_230C9CC2 X-CRM114-Status: GOOD ( 13.20 ) X-Spam-Score: -4.2 (----) X-Spam-Report: SpamAssassin version 3.4.4 on casper.infradead.org summary: Content analysis details: (-4.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [195.135.220.15 listed in wl.mailspike.net] -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [195.135.220.15 listed in list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, =?utf-8?b?SmFtZXMgVGFpIFvmiLTlv5fls7Bd?= , Edgar Lee , linux-kernel@vger.kernel.org, Rob Herring , Srinivas Kandagatla , =?utf-8?b?U3Rhbmxl?= =?utf-8?b?eSBDaGFuZyBb5piM6IKy5b63XQ==?= , =?utf-8?q?Andreas_F=C3=A4rber?= , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Add a DT binding for eFuse on Realtek Digital Home Center SoCs. Signed-off-by: Andreas Färber Reviewed-by: Rob Herring --- v2: New .../bindings/nvmem/realtek,rtd1195-efuse.yaml | 53 +++++++++++++++++++ MAINTAINERS | 1 + 2 files changed, 54 insertions(+) create mode 100644 Documentation/devicetree/bindings/nvmem/realtek,rtd1195-efuse.yaml diff --git a/Documentation/devicetree/bindings/nvmem/realtek,rtd1195-efuse.yaml b/Documentation/devicetree/bindings/nvmem/realtek,rtd1195-efuse.yaml new file mode 100644 index 000000000000..a616cb22673e --- /dev/null +++ b/Documentation/devicetree/bindings/nvmem/realtek,rtd1195-efuse.yaml @@ -0,0 +1,53 @@ +# SPDX-License-Identifier: (GPL-2.0-or-later OR BSD-2-Clause) +%YAML 1.2 +--- +$id: "http://devicetree.org/schemas/nvmem/realtek,rtd1195-efuse.yaml#" +$schema: "http://devicetree.org/meta-schemas/core.yaml#" + +title: Realtek Digital Home Center eFuse + +maintainers: + - Andreas Färber + +description: | + The Realtek DHC SoCs have an eFuse block with non-volatile OTP memory. + +allOf: + - $ref: "nvmem.yaml#" + +properties: + compatible: + const: realtek,rtd1195-efuse + + reg: + maxItems: 1 + + "#address-cells": + const: 1 + + "#size-cells": + const: 1 + +required: + - compatible + - reg + +examples: + - | + efuse@18017000 { + compatible = "realtek,rtd1195-efuse"; + reg = <0x18017000 0x400>; + }; + - | + efuse@98017000 { + compatible = "realtek,rtd1195-efuse"; + reg = <0x98017000 0x400>; + #address-cells = <1>; + #size-cells = <1>; + + efuse_package_id: package-id@1d8 { + reg = <0x1d8 0x1>; + bits = <0 2>; + }; + }; +... diff --git a/MAINTAINERS b/MAINTAINERS index ff0ee48fee6f..1d0d6ab20451 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2307,6 +2307,7 @@ L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) L: linux-realtek-soc@lists.infradead.org (moderated for non-subscribers) S: Maintained F: Documentation/devicetree/bindings/arm/realtek.yaml +F: Documentation/devicetree/bindings/nvmem/realtek,rtd1195-efuse.yaml F: Documentation/devicetree/bindings/soc/realtek/ F: arch/arm/boot/dts/rtd* F: arch/arm/mach-realtek/ From patchwork Tue Jun 23 02:50:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andreas_F=C3=A4rber?= X-Patchwork-Id: 11619659 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6C8EE14E3 for ; Tue, 23 Jun 2020 03:03:48 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 4424120786 for ; Tue, 23 Jun 2020 03:03:48 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="TkJuABxE"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="c31stJxN" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4424120786 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=H54dM0e4Jp0mj2YSf2rbL8c0z6zXQVq7yKY2U4NBmDI=; b=TkJuABxEVVGmqbOLVxI/DD1Yt OkjDTCd2XQfSpxBKJ5cS0ONbupipqvcDiDV+c/ugyVP6DYwOjVXHeDWS3bElbgqb4GCtE9xA3IpEh v62Apnd6HY3Js9EJSzMylxfzDJRwkEnQ0J+R6H4R3WAbHBDvgDMBKiD+o1E759pXdT43ZoSYxGY9/ nTIgqiIEo/V090Qt4U4sNWrcsRfjb+xRwFtC+N0/CwsL26YE8s1sJF023wRldveiv/QfyC1SXYAn6 jusB5hKJVEKku3ev/ArW/uiY6a9IWJxKVbxx6DObx7185IQr4OztAARnJzeak3H/AzDu7t3oXNxWQ 6zsP/mLag==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jnZBi-0000Kn-Ih; Tue, 23 Jun 2020 03:01:30 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jnZ3i-0002lT-35; Tue, 23 Jun 2020 02:53:14 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:Content-Type: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-ID:Content-Description; bh=1X6JQmlyO/7lB//QQ3nXejnV6kNwzuxP2EVIq4k5O6U=; b=c31stJxNDM/wgAuhfxXPNkzQZF A3nsD7Asjzq7Tf0AbzzTYZJFn3gplDOV3X7XBdThBeLbTSaklWpAA3TvR5SEukSpSVZA9sDNvaA9G RoSBaornx4S832AieOrMAayXFWSSXTkhuYD9fJfvC2NoymJQGdgl+BfE6QAag7EL2fAz93W4nslIV fbr+MYtL/UpuuFzvMhnc7KGSRB/lTkZrBAvkmtTHYxzIDg+U+bmjp0+5HKYWcuwYe489wGaM2h8qj pP7yqS7e4QpVgVDZKtejNtbBKxV2e+1H/fhSN8t9iTmsBJE3xTlI2g+0egouNEClPH+u00rhAA7xZ HMv7QdcQ==; Received: from mx2.suse.de ([195.135.220.15]) by casper.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jnZ3e-0005Wx-Eb; Tue, 23 Jun 2020 02:53:12 +0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 216E2B19B; Tue, 23 Jun 2020 02:51:38 +0000 (UTC) From: =?utf-8?q?Andreas_F=C3=A4rber?= To: linux-realtek-soc@lists.infradead.org Subject: [PATCH v2 18/29] nvmem: Add Realtek DHC eFuse driver Date: Tue, 23 Jun 2020 04:50:55 +0200 Message-Id: <20200623025106.31273-19-afaerber@suse.de> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200623025106.31273-1-afaerber@suse.de> References: <20200623025106.31273-1-afaerber@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200623_035310_627884_48E87224 X-CRM114-Status: GOOD ( 20.88 ) X-Spam-Score: -4.2 (----) X-Spam-Report: SpamAssassin version 3.4.4 on casper.infradead.org summary: Content analysis details: (-4.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [195.135.220.15 listed in wl.mailspike.net] -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [195.135.220.15 listed in list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?b?SmFtZXMgVGFpIFvmiLTlv5fls7Bd?= , Edgar Lee , linux-kernel@vger.kernel.org, Srinivas Kandagatla , =?utf-8?b?U3Rhbmxl?= =?utf-8?b?eSBDaGFuZyBb5piM6IKy5b63XQ==?= , =?utf-8?q?Andreas_F=C3=A4rber?= , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Implement enough of a read-only nvmem driver to easily read efuse cells. Cc: Cheng-Yu Lee Signed-off-by: Andreas Färber --- v2: New MAINTAINERS | 1 + drivers/nvmem/Kconfig | 9 ++++ drivers/nvmem/Makefile | 2 + drivers/nvmem/rtk-dhc-efuse.c | 86 +++++++++++++++++++++++++++++++++++ 4 files changed, 98 insertions(+) create mode 100644 drivers/nvmem/rtk-dhc-efuse.c diff --git a/MAINTAINERS b/MAINTAINERS index 1d0d6ab20451..02117fbf0e57 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2312,6 +2312,7 @@ F: Documentation/devicetree/bindings/soc/realtek/ F: arch/arm/boot/dts/rtd* F: arch/arm/mach-realtek/ F: arch/arm64/boot/dts/realtek/ +F: drivers/nvmem/rtk-dhc-efuse.c F: drivers/soc/realtek/ ARM/RENESAS ARM64 ARCHITECTURE diff --git a/drivers/nvmem/Kconfig b/drivers/nvmem/Kconfig index d7b7f6d688e7..75cf43b16cf9 100644 --- a/drivers/nvmem/Kconfig +++ b/drivers/nvmem/Kconfig @@ -129,6 +129,15 @@ config NVMEM_SPMI_SDAM Qualcomm Technologies, Inc. PMICs. It provides the clients an interface to read/write to the SDAM module's shared memory. +config REALTEK_DHC_EFUSE + tristate "Realtek DHC eFuse Support" + depends on ARCH_REALTEK || COMPILE_TEST + depends on HAS_IOMEM + help + Say y here to enable read-only access to the Realtek Digital Home + This driver can also be built as a module. If so, the module + will be called nvmem-rtk-dhc-efuse. + config ROCKCHIP_EFUSE tristate "Rockchip eFuse Support" depends on ARCH_ROCKCHIP || COMPILE_TEST diff --git a/drivers/nvmem/Makefile b/drivers/nvmem/Makefile index a7c377218341..67cefdfa44e6 100644 --- a/drivers/nvmem/Makefile +++ b/drivers/nvmem/Makefile @@ -33,6 +33,8 @@ obj-$(CONFIG_ROCKCHIP_EFUSE) += nvmem_rockchip_efuse.o nvmem_rockchip_efuse-y := rockchip-efuse.o obj-$(CONFIG_ROCKCHIP_OTP) += nvmem-rockchip-otp.o nvmem-rockchip-otp-y := rockchip-otp.o +obj-$(CONFIG_REALTEK_DHC_EFUSE) += nvmem-rtk-dhc-efuse.o +nvmem-rtk-dhc-efuse-y := rtk-dhc-efuse.o obj-$(CONFIG_NVMEM_SUNXI_SID) += nvmem_sunxi_sid.o nvmem_stm32_romem-y := stm32-romem.o obj-$(CONFIG_NVMEM_STM32_ROMEM) += nvmem_stm32_romem.o diff --git a/drivers/nvmem/rtk-dhc-efuse.c b/drivers/nvmem/rtk-dhc-efuse.c new file mode 100644 index 000000000000..4672db2c2619 --- /dev/null +++ b/drivers/nvmem/rtk-dhc-efuse.c @@ -0,0 +1,86 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* + * Realtek Digital Home Center eFuse + * + * Copyright (c) 2020 Andreas Färber + */ + +#include +#include +#include +#include +#include +#include +#include + +struct dhc_efuse { + struct device *dev; + void __iomem *base; + struct nvmem_device *nvmem; +}; + +static int dhc_efuse_reg_read(void *priv, unsigned int offset, void *val, + size_t bytes) +{ + struct dhc_efuse *efuse = priv; + u8 *buf = val; + + while (bytes--) + *buf++ = readb_relaxed(efuse->base + offset++); + + return 0; +} + +static int dhc_efuse_probe(struct platform_device *pdev) +{ + struct dhc_efuse *efuse; + struct nvmem_config config = {}; + struct resource *res; + + efuse = devm_kzalloc(&pdev->dev, sizeof(*efuse), GFP_KERNEL); + if (!efuse) + return -ENOMEM; + + efuse->base = devm_platform_get_and_ioremap_resource(pdev, 0, &res); + if (IS_ERR(efuse->base)) + return PTR_ERR(efuse->base); + + efuse->dev = &pdev->dev; + + config.dev = &pdev->dev; + config.name = "dhc-efuse"; + config.owner = THIS_MODULE; + config.type = NVMEM_TYPE_OTP; + config.read_only = true, + config.word_size = 4; + config.stride = 1; + config.size = resource_size(res); + config.reg_read = dhc_efuse_reg_read; + config.priv = efuse; + + efuse->nvmem = devm_nvmem_register(&pdev->dev, &config); + if (IS_ERR(efuse->nvmem)) { + dev_err(&pdev->dev, "failed to register nvmem (%ld)\n", + PTR_ERR(efuse->nvmem)); + return PTR_ERR(efuse->nvmem); + } + + return 0; +} + +static const struct of_device_id dhc_efuse_dt_ids[] = { + { .compatible = "realtek,rtd1195-efuse" }, + { } +}; + +static struct platform_driver dhc_efuse_driver = { + .probe = dhc_efuse_probe, + .driver = { + .name = "rtk-dhc-efuse", + .of_match_table = dhc_efuse_dt_ids, + }, +}; +module_platform_driver(dhc_efuse_driver); + +MODULE_DESCRIPTION("Realtek DHC eFuse driver"); +MODULE_LICENSE("GPL"); From patchwork Tue Jun 23 02:50:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andreas_F=C3=A4rber?= X-Patchwork-Id: 11619631 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7865213A0 for ; Tue, 23 Jun 2020 02:55:41 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 508932076A for ; Tue, 23 Jun 2020 02:55:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="ntR610Np"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="ccMbCFKv" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 508932076A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=na8bDxjxOtxIIFVGBI6gURvndiXGJHtQAOzJHuf0bZE=; b=ntR610NppU18rrscZu5tF2WlC hNgApnvYNH21KW6UkrC14Is8uL5cJuzXjGn4Hqqjups2Am/iZZP0exclq0/ILeFIWR00VcxHF0xdB ZgQd5EnaVUvZ5qAzq40vVe5FCzZ5tPCOyYlVJw7nRLCfXdJTRn+PkjDdfawYKPc9ZHIbfDpPqXIAF FACkzhJGPb9pjT3PJRpB0S3Z99fEADWx89eXRtFFiKctuvOhObsPJT+8AQ4RYfyEzSM+CibUXLaBs +aLwsowtovLPr0/PtGiw2D300Q2YZxIF/Oat9PTjFb2U2oUOlNs5zKOm5Px0eoRQDq8lx2Y7U/zw4 4MbAJm+Ew==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jnZ3h-0002k5-4n; Tue, 23 Jun 2020 02:53:13 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jnZ2n-00029I-6C; Tue, 23 Jun 2020 02:52:17 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:Content-Type: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-ID:Content-Description; bh=FZ8mNEOZwDKA+BqRbJyHkuZTBHzqivD423ZALeOEP9Y=; b=ccMbCFKvZzvR3KVT4cg6+FsG3F keEbzt9Is7FG+AHLhmYZ7oV1OX+sM8JOVfnwnXnXNQsQ0lQisPn17SkZdBKuGJ6ub7quFSU2Je9dy 2E38beJMEd0WlImS9vaNLngLb1pQgHYvy2qU15jUReDkKCa7F1OEioaCNPpPoZd6c9K8ll51m43Pc PDgLHxeQH4khXcyp5rgwpr4+/5sXY6Yyu9AlchbpxKwMfLZDsphsfoxX0SvvPVk+1Nzwx5bNnMyGI mLobqCMxBkzxVljQcfShm2e2s8nTAzLS6AxIqmm9ULYq8Z7j1+dYQ0B4aH/e3X9ykm+Oq/GFPb0nq DsbSpL6Q==; Received: from mx2.suse.de ([195.135.220.15]) by casper.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jnZ2k-0005QF-CI; Tue, 23 Jun 2020 02:52:16 +0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 98491AE82; Tue, 23 Jun 2020 02:51:38 +0000 (UTC) From: =?utf-8?q?Andreas_F=C3=A4rber?= To: linux-realtek-soc@lists.infradead.org Subject: [PATCH v2 19/29] ARM: dts: rtd1195: Add eFuse node Date: Tue, 23 Jun 2020 04:50:56 +0200 Message-Id: <20200623025106.31273-20-afaerber@suse.de> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200623025106.31273-1-afaerber@suse.de> References: <20200623025106.31273-1-afaerber@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200623_035214_557004_6C3C476B X-CRM114-Status: UNSURE ( 8.68 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -4.2 (----) X-Spam-Report: SpamAssassin version 3.4.4 on casper.infradead.org summary: Content analysis details: (-4.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [195.135.220.15 listed in wl.mailspike.net] -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [195.135.220.15 listed in list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, =?utf-8?b?SmFtZXMgVGFpIFvmiLTlv5fls7Bd?= , Edgar Lee , linux-kernel@vger.kernel.org, Rob Herring , =?utf-8?b?U3RhbmxleSBDaGFuZyBb5piM6IKy?= =?utf-8?b?5b63XQ==?= , =?utf-8?q?Andreas_F=C3=A4?= =?utf-8?q?rber?= , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Add a DT node for eFuse. Signed-off-by: Andreas Färber --- v2: New arch/arm/boot/dts/rtd1195.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/arm/boot/dts/rtd1195.dtsi b/arch/arm/boot/dts/rtd1195.dtsi index 5ad0e81c37af..2ae08f6da9e8 100644 --- a/arch/arm/boot/dts/rtd1195.dtsi +++ b/arch/arm/boot/dts/rtd1195.dtsi @@ -119,6 +119,14 @@ iso: syscon@7000 { ranges = <0x0 0x7000 0x1000>; }; + efuse: efuse@17000 { + compatible = "realtek,rtd1195-efuse"; + reg = <0x17000 0x400>; + read-only; + #address-cells = <1>; + #size-cells = <1>; + }; + sb2: syscon@1a000 { compatible = "syscon", "simple-mfd"; reg = <0x1a000 0x1000>; From patchwork Tue Jun 23 02:50:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andreas_F=C3=A4rber?= X-Patchwork-Id: 11619629 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 14B5413A0 for ; Tue, 23 Jun 2020 02:55:21 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 E29C12076A for ; Tue, 23 Jun 2020 02:55:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="n/bZ5seS" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E29C12076A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=xqiN++lebJGRtaOxK+OPVa8c2Th6NI5ikcwdvOOqjPk=; b=n/bZ5seSjIYZGmBhJgKros5gk SlZkgriJjBj53G0i3xSi4lru2KaA5ETxok3ugqlDSVT2UOXk78on8np42n61T1+PPF5Dl4ku8VkY3 wIwCk6wm0YZJTg4kXv12cgJz2b7xpH0jmdGYdyHLl2Q1iJoKi5OINqcwy6l7otIwcMwJg26Cj3NpA Bp1WABFueakwhzdecseP7SrA67EmgfPML3U3r2tGrg9EJCtAsN9NAhg/53gtjkyBbDZnJIahQYO7t LDsR6B5n9PkbIrYjRX39iyo3geK7O+mfy0Y7z3y7OGYIjDC/6wBPaUMSNS/HZLsql5Teqkf9aOi0L d1U8m9rSg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jnZ3R-0002Yi-6A; Tue, 23 Jun 2020 02:52:58 +0000 Received: from mx2.suse.de ([195.135.220.15]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jnZ2l-00027V-79; Tue, 23 Jun 2020 02:52:15 +0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 13A89B19A; Tue, 23 Jun 2020 02:51:39 +0000 (UTC) From: =?utf-8?q?Andreas_F=C3=A4rber?= To: linux-realtek-soc@lists.infradead.org Subject: [PATCH v2 20/29] arm64: dts: realtek: rtd129x: Add eFuse node Date: Tue, 23 Jun 2020 04:50:57 +0200 Message-Id: <20200623025106.31273-21-afaerber@suse.de> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200623025106.31273-1-afaerber@suse.de> References: <20200623025106.31273-1-afaerber@suse.de> MIME-Version: 1.0 X-Spam-Note: CRM114 invocation failed X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-2.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [195.135.220.15 listed in list.dnswl.org] 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [195.135.220.15 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, =?utf-8?b?SmFtZXMgVGFpIFvmiLTlv5fls7Bd?= , Edgar Lee , linux-kernel@vger.kernel.org, Rob Herring , =?utf-8?b?U3RhbmxleSBDaGFuZyBb5piM6IKy?= =?utf-8?b?5b63XQ==?= , =?utf-8?q?Andreas_F=C3=A4?= =?utf-8?q?rber?= , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Add a DT node for eFuse. Signed-off-by: Andreas Färber --- v2: New arch/arm64/boot/dts/realtek/rtd129x.dtsi | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/arch/arm64/boot/dts/realtek/rtd129x.dtsi b/arch/arm64/boot/dts/realtek/rtd129x.dtsi index 30a7782aa0d9..8f96d4e4c46b 100644 --- a/arch/arm64/boot/dts/realtek/rtd129x.dtsi +++ b/arch/arm64/boot/dts/realtek/rtd129x.dtsi @@ -81,6 +81,14 @@ iso: syscon@7000 { ranges = <0x0 0x7000 0x1000>; }; + efuse: efuse@17000 { + compatible = "realtek,rtd1195-efuse"; + reg = <0x17000 0x400>; + read-only; + #address-cells = <1>; + #size-cells = <1>; + }; + sb2: syscon@1a000 { compatible = "syscon", "simple-mfd"; reg = <0x1a000 0x1000>; @@ -194,6 +202,13 @@ uart2: serial@400 { }; }; +&otp { + otp_package_id: package-id@1d8 { + reg = <0x1d8 0x1>; + bits = <0 2>; + }; +}; + &sb2 { sb2_hd_sem: hwspinlock@0 { compatible = "realtek,rtd1195-sb2-sem"; From patchwork Tue Jun 23 02:50:58 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andreas_F=C3=A4rber?= X-Patchwork-Id: 11619639 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1FE896C1 for ; Tue, 23 Jun 2020 02:56:40 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 E9E302076A for ; Tue, 23 Jun 2020 02:56:39 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="WtjkMt0x"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="WSgGCES/" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E9E302076A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=wreCbZnWe1iTr44xoOykVlifCdaF4cbcIMribl3yGrI=; b=WtjkMt0xv4Gr+HDxYjd7YUYwK uQYjLqxpoaDRyjzKjIuNRtrUFaZ83t89ly6Ky6O+zR3+WEeREh8u6DxXz20BXTncu1vcF+jb4/yAs rXmEZ+wF53p6V2/D6MvXeKKIRcDHynzm8c+6BSv0LLgnCo6V4OZ92z4zMO1SW+gKds3E4/qJBURpC nXooXWfYrmdpP3v4CoMbKNHwQz8c1hKBgmIx7qV5v2kcYSvYPCctxx1typm6RhYKIzZ4/zkkadnCs bknjScYrVAmoMX+ZeSGpgMOcTik8U6WiAwM1Zas5vrmXB0ObJPqbnUjRmyU6NB/MKgkwMXmzArSnj IoUkGQc9g==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jnZ4k-0003U9-CZ; Tue, 23 Jun 2020 02:54:18 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jnZ2x-0002G4-Dl; Tue, 23 Jun 2020 02:52:27 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:Content-Type: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-ID:Content-Description; bh=iew7H/EVRNXvgh3yVhxMyMxaPBYWFu5r4E4KFncMwUI=; b=WSgGCES/0G12+hIssFPZtsSszj RF+Yc4QAtse0vFY1zAlgosRLCjSdzIoTs0CSx7YWkpxLWISinJIzp8L84M1WaZ8jCY5PIg9sBMD+X ADEycxwkaXRK76OReNT16mjas2HR6M/YizhnopauJNM0i3SXe+I0YF82ZAr0bNRvJOrX39PnWTfZR +kSSe0Tox/slard8VPcOmYSFvmEIUlSxKFIYffBBnqEQSYnPb/RHrXCLPc7UyMWXGTwStpdGnQWam gtuJ9Buu7wvzuW/MdmqLFre+f/FKNhYKqhMGxwXn9bcJYmzxdvbxlPbj8BVa+UcKzO4AbVgyF+41N TZ6KHqbQ==; Received: from mx2.suse.de ([195.135.220.15]) by casper.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jnZ2t-0005RM-LV; Tue, 23 Jun 2020 02:52:26 +0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 83195B19C; Tue, 23 Jun 2020 02:51:39 +0000 (UTC) From: =?utf-8?q?Andreas_F=C3=A4rber?= To: linux-realtek-soc@lists.infradead.org Subject: [PATCH v2 21/29] arm64: dts: realtek: rtd139x: Add eFuse node Date: Tue, 23 Jun 2020 04:50:58 +0200 Message-Id: <20200623025106.31273-22-afaerber@suse.de> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200623025106.31273-1-afaerber@suse.de> References: <20200623025106.31273-1-afaerber@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200623_035223_886488_F1140990 X-CRM114-Status: UNSURE ( 9.44 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -4.2 (----) X-Spam-Report: SpamAssassin version 3.4.4 on casper.infradead.org summary: Content analysis details: (-4.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [195.135.220.15 listed in wl.mailspike.net] -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [195.135.220.15 listed in list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, =?utf-8?b?SmFtZXMgVGFpIFvmiLTlv5fls7Bd?= , Edgar Lee , linux-kernel@vger.kernel.org, Rob Herring , =?utf-8?b?U3RhbmxleSBDaGFuZyBb5piM6IKy?= =?utf-8?b?5b63XQ==?= , =?utf-8?q?Andreas_F=C3=A4?= =?utf-8?q?rber?= , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Add a DT node for eFuse. Signed-off-by: Andreas Färber --- v2: New arch/arm64/boot/dts/realtek/rtd139x.dtsi | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/realtek/rtd139x.dtsi b/arch/arm64/boot/dts/realtek/rtd139x.dtsi index 3d4d2323294b..48746d432328 100644 --- a/arch/arm64/boot/dts/realtek/rtd139x.dtsi +++ b/arch/arm64/boot/dts/realtek/rtd139x.dtsi @@ -2,7 +2,7 @@ /* * Realtek RTD1395 SoC family * - * Copyright (c) 2019 Andreas Färber + * Copyright (c) 2019-2020 Andreas Färber */ /memreserve/ 0x0000000000000000 0x000000000002f000; @@ -79,6 +79,14 @@ iso: syscon@7000 { ranges = <0x0 0x7000 0x1000>; }; + efuse: efuse@17000 { + compatible = "realtek,rtd1195-efuse"; + reg = <0x17000 0x400>; + read-only; + #address-cells = <1>; + #size-cells = <1>; + }; + sb2: syscon@1a000 { compatible = "syscon", "simple-mfd"; reg = <0x1a000 0x1000>; From patchwork Tue Jun 23 02:50:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andreas_F=C3=A4rber?= X-Patchwork-Id: 11619637 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 57EA06C1 for ; Tue, 23 Jun 2020 02:56:25 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 2EC372076A for ; Tue, 23 Jun 2020 02:56:25 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="zo9XfS/3"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="FSla4yag" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2EC372076A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=NBxhHbJ7u0PuA/Qk07y2jTKkvZXCoR0Hk1yx0qIxDyw=; b=zo9XfS/3H6UCsXzfnRuh7p8K/ aEdhC9iAVPU3M1tOUe6ZRjGGG2CJwytWqO9ofiIhLdxzLPVlqxGWgcwl+jQp8WzHePeioTMuo8WFE iAdMPWDkGDGAAwbLZTUV9a9Vw+amQlT4B0vOIBD04JnXtaHUkYLYlSw+l5DwvnzW/F/a+iOUrLtih OdGEBKchQJ2Nmm1Y47MkMifLosgn2gvD7PKVDyCXGJoXzHJto2srwMN8uMfSpKW2qs+EK7epGe8uP 5DPxP1YZNVhu5k81X8FSPWTrBfNVKQPxH3qw8LP3Ec6BjHHOxZck02sD8r3y9BMwRNwGZa3YyzoAY 0SJPxzDjQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jnZ4O-0003FH-B6; Tue, 23 Jun 2020 02:53:56 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jnZ2w-0002FF-I3; Tue, 23 Jun 2020 02:52:26 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:Content-Type: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-ID:Content-Description; bh=7afkiovvBrm38fpuv6bA8fyfg1ErFOdZAkfNdt1UrDo=; b=FSla4yagqJfw5YeoDrivbXPM2r +xQGHFPm/2IsJ9mC45/J9++qysoAzLewyBnSXIbyrJkALl2OqpbjhJEXcnqlpmnva1UNEfW1qJFQQ KRJKMsgkMDERPy6BBG8c6M5cKKgp61Y7TtFmhTTqGXMQvUhBtDxCG/53b/ucd6FoBy7YTsgt/vKq7 bX2rXCsZvIJvDYRbBlwA/PF/L/6//4T7VgYME6AhNl0qrCU3WeCqp0noXLFFmi+16snqp1hOCwBLi A4cijlzCvL8/GHR7Dil+mMDE4lm0EQB5g5kx+7T0gOxOWp7n4Fzb6VoIvhWW+kwN9MY1bMEOsN9jj TM8mP6lw==; Received: from mx2.suse.de ([195.135.220.15]) by casper.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jnZ2t-0005RN-LS; Tue, 23 Jun 2020 02:52:25 +0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id EEDAAB1A2; Tue, 23 Jun 2020 02:51:39 +0000 (UTC) From: =?utf-8?q?Andreas_F=C3=A4rber?= To: linux-realtek-soc@lists.infradead.org Subject: [PATCH v2 22/29] arm64: dts: realtek: rtd16xx: Add eFuse node Date: Tue, 23 Jun 2020 04:50:59 +0200 Message-Id: <20200623025106.31273-23-afaerber@suse.de> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200623025106.31273-1-afaerber@suse.de> References: <20200623025106.31273-1-afaerber@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200623_035223_881215_2028C5B6 X-CRM114-Status: UNSURE ( 8.19 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -3.2 (---) X-Spam-Report: SpamAssassin version 3.4.4 on casper.infradead.org summary: Content analysis details: (-3.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [195.135.220.15 listed in wl.mailspike.net] -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [195.135.220.15 listed in list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders 1.0 SUBJ_BRKN_WORDNUMS Subject contains odd word breaks and numbers X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, =?utf-8?b?SmFtZXMgVGFpIFvmiLTlv5fls7Bd?= , Edgar Lee , linux-kernel@vger.kernel.org, Rob Herring , =?utf-8?b?U3RhbmxleSBDaGFuZyBb5piM6IKy?= =?utf-8?b?5b63XQ==?= , =?utf-8?q?Andreas_F=C3=A4?= =?utf-8?q?rber?= , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Add a DT node for eFuse. Signed-off-by: Andreas Färber --- v2: New arch/arm64/boot/dts/realtek/rtd16xx.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/arm64/boot/dts/realtek/rtd16xx.dtsi b/arch/arm64/boot/dts/realtek/rtd16xx.dtsi index 04cb546142a0..3c955fc7450c 100644 --- a/arch/arm64/boot/dts/realtek/rtd16xx.dtsi +++ b/arch/arm64/boot/dts/realtek/rtd16xx.dtsi @@ -155,6 +155,14 @@ iso: syscon@7000 { ranges = <0x0 0x7000 0x1000>; }; + efuse: efuse@17000 { + compatible = "realtek,rtd1195-efuse"; + reg = <0x17000 0x1000>; + read-only; + #address-cells = <1>; + #size-cells = <1>; + }; + sb2: syscon@1a000 { compatible = "syscon", "simple-mfd"; reg = <0x1a000 0x1000>; From patchwork Tue Jun 23 02:51:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andreas_F=C3=A4rber?= X-Patchwork-Id: 11619633 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9CFC4913 for ; Tue, 23 Jun 2020 02:55:55 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 6A0652076A for ; Tue, 23 Jun 2020 02:55:55 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="MWf53pKG" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6A0652076A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=eUeYZLJb2YOOBmkCBB6rgsOVb/kIkZAPxu85ZUBMNgE=; b=MWf53pKGztpoU8xWBP149159P U/nWtf0n4Ow2oct0e5bq6997qVPX6rs7k5Lt2fSgio5wEQIh5lIyaMAyp+crBmJ82zjooXZPxGQKv 2oJgGk4Dgvspr1AbPSsIwI5eMcxPo7CL8OT3nJ/ottB3WUDs5wM122sIFZtNo/q5xNGDBUWk6UDmg VlAL8VUAfrZhVR5cJPF2aWlDlRX3Kx8CIsvV8+REcDjMe0zjLKmXjB2rvaZehtUijmn9XmkoieeYl RY9cEw2l+pfO3dYVHZ7/cv6/Q3uEbjyJs6umMRzTSoL4p5M3NeHtpEd+OITh83D87aHXosMS1ZG4f N5VvgiaDQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jnZ42-0002uD-LT; Tue, 23 Jun 2020 02:53:34 +0000 Received: from mx2.suse.de ([195.135.220.15]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jnZ2o-00029v-7P; Tue, 23 Jun 2020 02:52:19 +0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 6B2CAB1A3; Tue, 23 Jun 2020 02:51:40 +0000 (UTC) From: =?utf-8?q?Andreas_F=C3=A4rber?= To: linux-realtek-soc@lists.infradead.org Subject: [PATCH v2 23/29] arm64: dts: realtek: rtd13xx: Add eFuse node Date: Tue, 23 Jun 2020 04:51:00 +0200 Message-Id: <20200623025106.31273-24-afaerber@suse.de> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200623025106.31273-1-afaerber@suse.de> References: <20200623025106.31273-1-afaerber@suse.de> MIME-Version: 1.0 X-Spam-Note: CRM114 invocation failed X-Spam-Score: -1.3 (-) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-1.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [195.135.220.15 listed in list.dnswl.org] 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [195.135.220.15 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders 1.0 SUBJ_BRKN_WORDNUMS Subject contains odd word breaks and numbers X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, =?utf-8?b?SmFtZXMgVGFpIFvmiLTlv5fls7Bd?= , Edgar Lee , linux-kernel@vger.kernel.org, Rob Herring , =?utf-8?b?U3RhbmxleSBDaGFuZyBb5piM6IKy?= =?utf-8?b?5b63XQ==?= , =?utf-8?q?Andreas_F=C3=A4?= =?utf-8?q?rber?= , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Add a DT node for eFuse. Signed-off-by: Andreas Färber --- v2: New arch/arm64/boot/dts/realtek/rtd13xx.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/arm64/boot/dts/realtek/rtd13xx.dtsi b/arch/arm64/boot/dts/realtek/rtd13xx.dtsi index e4271ef5cb1e..ed5ee7cc6a44 100644 --- a/arch/arm64/boot/dts/realtek/rtd13xx.dtsi +++ b/arch/arm64/boot/dts/realtek/rtd13xx.dtsi @@ -139,6 +139,14 @@ iso: syscon@7000 { ranges = <0x0 0x7000 0x1000>; }; + efuse: efuse@17000 { + compatible = "realtek,rtd1195-efuse"; + reg = <0x17000 0x1000>; + read-only; + #address-cells = <1>; + #size-cells = <1>; + }; + sb2: syscon@1a000 { compatible = "syscon", "simple-mfd"; reg = <0x1a000 0x1000>; From patchwork Tue Jun 23 02:51:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andreas_F=C3=A4rber?= X-Patchwork-Id: 11619809 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B1AE0618 for ; Tue, 23 Jun 2020 06:02:44 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 8AD2F20771 for ; Tue, 23 Jun 2020 06:02:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="B3A2pjDm" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8AD2F20771 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=kbc4O4loQuOO+c9PX+KeWiPRzqUcYWv2LGQT/rMS+qc=; b=B3A2pjDmZAINQ8JniVTI9oma+ nD3Lqto783spXwY01XzXTXqApbxPFlm6g8oeHg4SMCJeRFNcY9awAodfRlDyHqK3qFEtfLrC4jC4U vgxMqNVQ4Qsyuu2xNAsZNhf+c5x1JcHIyhcfQVrGgLA/x5QcxDzFCymzj2iYk/qGtaElKH2V9WeRT XwgkrM9L6DixQAw/ORH118dCwAMHo6jsEcez2vSyVcQT9etfH2xpmuPsNbErVZxtGxWvVPtJG/2dQ sVX8JAvb1UQlqnmadlg3FDfxxV8KjYMnRxAN/sfXx2Ofk5afM+oku2XsD/+LyuDVdqidYbqPM4Urc CynQpUnoA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jnZ8u-0006ij-4F; Tue, 23 Jun 2020 02:58:36 +0000 Received: from mx2.suse.de ([195.135.220.15]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jnZ3I-0002UG-Qf; Tue, 23 Jun 2020 02:52:49 +0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id DC84FAE89; Tue, 23 Jun 2020 02:51:40 +0000 (UTC) From: =?utf-8?q?Andreas_F=C3=A4rber?= To: linux-realtek-soc@lists.infradead.org Subject: [PATCH v2 24/29] dt-bindings: soc: realtek: rtd1195-chip: Allow nvmem-cells property Date: Tue, 23 Jun 2020 04:51:01 +0200 Message-Id: <20200623025106.31273-25-afaerber@suse.de> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200623025106.31273-1-afaerber@suse.de> References: <20200623025106.31273-1-afaerber@suse.de> MIME-Version: 1.0 X-Spam-Note: CRM114 invocation failed X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-2.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [195.135.220.15 listed in list.dnswl.org] 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [195.135.220.15 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, =?utf-8?b?SmFtZXMgVGFpIFvmiLTlv5fls7Bd?= , Edgar Lee , linux-kernel@vger.kernel.org, Rob Herring , =?utf-8?b?U3RhbmxleSBDaGFuZyBb5piM6IKy?= =?utf-8?b?5b63XQ==?= , =?utf-8?q?Andreas_F=C3=A4?= =?utf-8?q?rber?= , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Allow to optionally specify nvmem cells to identify the chip. RTD1295 family will want the eFuse package_id cell. Signed-off-by: Andreas Färber Reviewed-by: Rob Herring --- v1 -> v2: * Instead of extending reg, allow nvmem-cells reference for eFuse .../bindings/soc/realtek/realtek,rtd1195-chip.yaml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Documentation/devicetree/bindings/soc/realtek/realtek,rtd1195-chip.yaml b/Documentation/devicetree/bindings/soc/realtek/realtek,rtd1195-chip.yaml index dfe33c95f68d..57a6e0df4494 100644 --- a/Documentation/devicetree/bindings/soc/realtek/realtek,rtd1195-chip.yaml +++ b/Documentation/devicetree/bindings/soc/realtek/realtek,rtd1195-chip.yaml @@ -22,6 +22,10 @@ properties: iso-syscon: true + nvmem-cells: true + + nvmem-cell-names: true + required: - compatible - reg @@ -40,4 +44,12 @@ examples: reg = <0x9801a200 0x8>; iso-syscon = <&iso>; }; + - | + chip-info@9801a200 { + compatible = "realtek,rtd1195-chip"; + reg = <0x9801a200 0x8>; + iso-syscon = <&iso>; + nvmem-cells = <&efuse_package_id>; + nvmem-cell-names = "efuse_package_id"; + }; ... From patchwork Tue Jun 23 02:51:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andreas_F=C3=A4rber?= X-Patchwork-Id: 11619643 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 75B646C1 for ; Tue, 23 Jun 2020 02:56:56 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 4BD562076A for ; Tue, 23 Jun 2020 02:56:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="K9EPi+AO"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="Xze2wHz5" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4BD562076A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=A61OaiymKnk+rqMKVAmhUtgb5l5SPUKQT0HFWXsJrFE=; b=K9EPi+AOwjMFllDk3YWzznaGm GhsWxUKX6928fD2Gw45s0v7Ju+r+iXlnfJkrEWXQPQHH5es67M8hiq4czpIT69T0LhU/oB3xSRVnn nnzeBEHZR+C3ZaitjoVksigDGzJie+ut6go1c29QoqIt6Vdy3Y15cblRDnwlOIkp/hs8WHXa2obFe Qw6tB/ohKv4SLfAQagNqMISd1ftZw29eC9ApFCDB8uVy4nrYUxacn9vTcxzUdk2Fy+TxjvplqUSy1 Ke1MJ7jZBcpeBi+Gp2k1euP2tAmM+09LyQ+3VCdBbVOrLNaJNtqS/Pxc8PY/He9iJXK+ET4CgrTuC Ki71zGNPg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jnZ53-0003kV-0C; Tue, 23 Jun 2020 02:54:37 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jnZ2z-0002Hk-NZ; Tue, 23 Jun 2020 02:52:29 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:Content-Type: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-ID:Content-Description; bh=vycTbMaXwdyZH2lntTjF7ag4rfMqvMH+6psOUyIEuwk=; b=Xze2wHz5isIm/McASwbq+KuNq+ PPwtwghoQuzUWkoJlvCnPSp2sERrvnMUbud17Jf3hSZGyc9XmoL8PtePY1hxeuCLhWxg1F8jrvO9e xESTUBQfcyafETYYbFILtXg9RR99P43Hz/mMBE97GF/psNsx9U64DCaMKwbz2OU3DDrgsYmM1+ubI ACmnl8aVZOSGwAIj7BR6VXvrMuY+wPfSbphpCFB9RsqAwyBg7CAehjdfB7yAox68/Rh1EAbl8/IyL q1AdcPiCNK+huUMBkfKV0Sd77GrrwwrRRjxzavT6gPHgA+791wujMJdoVHNviexrIqJHGHS1zKd7v x1SLh9Uw==; Received: from mx2.suse.de ([195.135.220.15]) by casper.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jnZ2w-0005Ro-Nc; Tue, 23 Jun 2020 02:52:28 +0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 54B1AB1A4; Tue, 23 Jun 2020 02:51:41 +0000 (UTC) From: =?utf-8?q?Andreas_F=C3=A4rber?= To: linux-realtek-soc@lists.infradead.org Subject: [PATCH v2 25/29] arm64: dts: realtek: rtd129x: Add eFuse package_id to chip-info Date: Tue, 23 Jun 2020 04:51:02 +0200 Message-Id: <20200623025106.31273-26-afaerber@suse.de> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200623025106.31273-1-afaerber@suse.de> References: <20200623025106.31273-1-afaerber@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200623_035226_929419_E279AE39 X-CRM114-Status: UNSURE ( 8.69 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -4.2 (----) X-Spam-Report: SpamAssassin version 3.4.4 on casper.infradead.org summary: Content analysis details: (-4.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [195.135.220.15 listed in wl.mailspike.net] -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [195.135.220.15 listed in list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, =?utf-8?b?SmFtZXMgVGFpIFvmiLTlv5fls7Bd?= , Edgar Lee , linux-kernel@vger.kernel.org, Rob Herring , =?utf-8?b?U3RhbmxleSBDaGFuZyBb5piM6IKy?= =?utf-8?b?5b63XQ==?= , =?utf-8?q?Andreas_F=C3=A4?= =?utf-8?q?rber?= , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Add the package_id field as sub-node to eFuse and reference it for chip identification. Signed-off-by: Andreas Färber --- v1 -> v2: * Instead of extending reg, use nvmem-cells reference for eFuse arch/arm64/boot/dts/realtek/rtd129x.dtsi | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/arch/arm64/boot/dts/realtek/rtd129x.dtsi b/arch/arm64/boot/dts/realtek/rtd129x.dtsi index 8f96d4e4c46b..c35955e915f4 100644 --- a/arch/arm64/boot/dts/realtek/rtd129x.dtsi +++ b/arch/arm64/boot/dts/realtek/rtd129x.dtsi @@ -156,6 +156,13 @@ reset4: reset-controller@50 { }; }; +&efuse { + efuse_package_id: package-id@1d8 { + reg = <0x1d8 0x1>; + bits = <0 2>; + }; +}; + &iso { iso_reset: reset-controller@88 { compatible = "snps,dw-low-reset"; @@ -202,13 +209,6 @@ uart2: serial@400 { }; }; -&otp { - otp_package_id: package-id@1d8 { - reg = <0x1d8 0x1>; - bits = <0 2>; - }; -}; - &sb2 { sb2_hd_sem: hwspinlock@0 { compatible = "realtek,rtd1195-sb2-sem"; @@ -220,6 +220,8 @@ chip-info@200 { compatible = "realtek,rtd1195-chip"; reg = <0x200 0x8>; iso-syscon = <&iso>; + nvmem-cells = <&efuse_package_id>; + nvmem-cell-names = "efuse_package_id"; }; sb2_hd_sem_new: hwspinlock@620 { From patchwork Tue Jun 23 02:51:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andreas_F=C3=A4rber?= X-Patchwork-Id: 11619647 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 852BD13A0 for ; Tue, 23 Jun 2020 02:57:56 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 4D2D62076A for ; Tue, 23 Jun 2020 02:57:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="N0jCcmD+"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="GDb8bS4R" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4D2D62076A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=JzoHLIX74ZPgCC4A/KF/w3tV9CJu0YillReehgszfmM=; b=N0jCcmD+dI626Cp7zZY+v5b6R iILof/AgBO1wDE5I2bzpLNANUcv9XAzx+5JkjLQMZN/6E+If/3TIoPZ/rrUJ9nhB+qHPBeT2Rq+Xn B/pO/cig0VDtVz/jBUfWtFWRc3oR4hGfOG2CaZ8LIXr/6isyVIEUcg3rgwqvOD1oK13eMgj5BCy/c tz6cxZWF3tqtm73WhVRpi9cu1NIgQ4AHRFlTkdgfTxKN/orgK0xFQSkasbEjc+fNfgbEBUxuQzBwa FkhqTrJXQde1jFDDAjQeRu00kfJGGnSbH+6eIRsHietFQgRUMxH74NM7ATIne9IoRbBB6uayVykcR /atj0Pgwg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jnZ5t-0004Sm-E9; Tue, 23 Jun 2020 02:55:29 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jnZ30-0002IW-U1; Tue, 23 Jun 2020 02:52:31 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:Content-Type: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-ID:Content-Description; bh=BhR4sHXkSgOjtpuGGjpCZQc3KmPPFrg8Jceqqj13eEo=; b=GDb8bS4Rwb7XLWxEfTEiKQw+TF /izQf0D9uV2sQbtWPQt2Mp8KUxXaSrmu+SVdud0Y4kDf/V4/p/873AIDeeibxzDsztxwkPBhrNJfb Kr3KarXZbvLxQEioapxdJwZbF3PIftIp3HzQZ8Zq9YWMLk9bcou+sDCD0/o03zOqGe/uA+w5Jt/Ix rzTVnRV9OAE/dV2aalf3VLarIIeDZgQ0VZ/ibTR4EmdS+tDJp8jbuFsQxGtNt3JuraHpOPXzE6orf D+Bh9OXE+O+nlcLnHIQXO8EYkrIbzu0wPi/ptdP9FTuL6sByGy40HUcIcjXRayDq9xTVWzEBwKYUH WO9bltNw==; Received: from mx2.suse.de ([195.135.220.15]) by casper.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jnZ2w-0005Rp-Nv; Tue, 23 Jun 2020 02:52:30 +0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id C812DB1A5; Tue, 23 Jun 2020 02:51:41 +0000 (UTC) From: =?utf-8?q?Andreas_F=C3=A4rber?= To: linux-realtek-soc@lists.infradead.org Subject: [PATCH v2 26/29] soc: realtek: chip: Detect RTD1294 Date: Tue, 23 Jun 2020 04:51:03 +0200 Message-Id: <20200623025106.31273-27-afaerber@suse.de> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200623025106.31273-1-afaerber@suse.de> References: <20200623025106.31273-1-afaerber@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200623_035227_023686_868C2D82 X-CRM114-Status: GOOD ( 12.57 ) X-Spam-Score: -4.2 (----) X-Spam-Report: SpamAssassin version 3.4.4 on casper.infradead.org summary: Content analysis details: (-4.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [195.135.220.15 listed in wl.mailspike.net] -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [195.135.220.15 listed in list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?b?SmFtZXMgVGFpIFvmiLTlv5fls7Bd?= , Edgar Lee , linux-kernel@vger.kernel.org, =?utf-8?b?U3RhbmxleSBDaGFuZyBb5piM6IKy5b63XQ==?= , =?utf-8?q?Andreas_F=C3=A4rber?= , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Detection logic from downstream include/soc/realtek/rtd129x_cpu.h. Signed-off-by: Andreas Färber Reviewed-by: Stanley Chang --- Note: We don't have any RTD1294 .dtsi/.dts yet. v1 -> v2: * Instead of direct eFuse register access use nvmem cell API * Warn on errors other than deferred probing drivers/soc/realtek/chip.c | 39 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/drivers/soc/realtek/chip.c b/drivers/soc/realtek/chip.c index 9cee760bac35..bed028ce1b16 100644 --- a/drivers/soc/realtek/chip.c +++ b/drivers/soc/realtek/chip.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include @@ -26,6 +27,8 @@ #define REG_ISO_CHIP_INFO1 0x028 +#define REG_EFUSE_PACKAGE_ID 0x1d8 + struct dhc_soc_revision { const char *name; u16 chip_rev; @@ -76,6 +79,33 @@ struct dhc_soc { const char *codename; }; +static int dhc_efuse_read_u8(struct device *dev, const char *cell_id, u8 *val) +{ + struct nvmem_cell *cell; + void *buf; + size_t len; + + cell = nvmem_cell_get(dev, cell_id); + if (IS_ERR(cell)) + return PTR_ERR(cell); + + buf = nvmem_cell_read(cell, &len); + if (IS_ERR(buf)) { + nvmem_cell_put(cell); + return PTR_ERR(buf); + } + if (len != sizeof(*val)) { + kfree(buf); + nvmem_cell_put(cell); + return -EINVAL; + } + memcpy(val, buf, 1); + kfree(buf); + nvmem_cell_put(cell); + + return 0; +} + static const char *default_name(struct device *dev, const struct dhc_soc *s) { return s->family; @@ -86,6 +116,15 @@ static const char *rtd1295_name(struct device *dev, const struct dhc_soc *s) struct regmap *regmap; unsigned int val; int ret; + u8 b; + + ret = dhc_efuse_read_u8(dev, "efuse_package_id", &b); + if (ret == -EPROBE_DEFER) + return ERR_PTR(ret); + else if (ret) + dev_warn(dev, "Could not read efuse package_id (%d)\n", ret); + else if (b == 0x1) + return "RTD1294"; regmap = syscon_regmap_lookup_by_phandle(dev->of_node, "iso-syscon"); if (IS_ERR(regmap)) { From patchwork Tue Jun 23 02:51:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andreas_F=C3=A4rber?= X-Patchwork-Id: 11619993 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4AA26618 for ; Tue, 23 Jun 2020 08:04:09 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 2388A206D4 for ; Tue, 23 Jun 2020 08:04:09 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="d7dg6hYc" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2388A206D4 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=d/PCBeuNNkSVj8u/jc6c7bfkj6K6vxNULfCdHJUETqc=; b=d7dg6hYcqAC4IlLav/mvKkcX4 NlfvBXeMytF2kx9eLMxdzvY1rncuL+4D6U9MZsVm1ZzLlJ0o9s7h/fr5Szqjiaehwna0S1SwybCCI gStMhho/HvjPpKhkFh07U1t//dmHaU0YtVlrbQE6tuRa/HCSQqqCMsms4OvzrKNQgltD6lkbedDaY J1N6OFhgT53HCyFOqif/zV4ioQNcj8av10kHJNgkl5Jv0T6dW5d22lvbd5l3rvrwZXv+Qzd6JBqsY FIPJmnc5Er7PMNyAYPmG/jzSTHKtDFNhTifXt0R2SHQtisNZ4P95xbRSn01BNz9GuTUuR49BTSKyh nrOWpLAYA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jnZ6x-0005Jc-SE; Tue, 23 Jun 2020 02:56:35 +0000 Received: from mx2.suse.de ([195.135.220.15]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jnZ33-0002Jr-Sp; Tue, 23 Jun 2020 02:52:36 +0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 9057EB1A6; Tue, 23 Jun 2020 02:51:42 +0000 (UTC) From: =?utf-8?q?Andreas_F=C3=A4rber?= To: linux-realtek-soc@lists.infradead.org Subject: [PATCH v2 27/29] nvmem: core: Grammar fixes for help text Date: Tue, 23 Jun 2020 04:51:04 +0200 Message-Id: <20200623025106.31273-28-afaerber@suse.de> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200623025106.31273-1-afaerber@suse.de> References: <20200623025106.31273-1-afaerber@suse.de> MIME-Version: 1.0 X-Spam-Note: CRM114 invocation failed X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-2.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [195.135.220.15 listed in list.dnswl.org] 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [195.135.220.15 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Leonard Crestez , =?utf-8?b?SmFtZXMgVGFpIFs=?= =?utf-8?b?5oi05b+X5bOwXQ==?= , Edgar Lee , Yangtao Li , Greg Kroah-Hartman , linux-kernel@vger.kernel.org, Maxime Ripard , Andrey Smirnov , Srinivas Kandagatla , =?utf-8?b?U3Rhbmxl?= =?utf-8?b?eSBDaGFuZyBb5piM6IKy5b63XQ==?= , Fabrice Gasnier , Shawn Guo , =?utf-8?q?Andreas_F=C3=A4rber?= , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org It's "an unsigned" but "a U". Similarly, "an entry" but "a binary entry". While at it, also drop superfluous articles for negative and zero. Fixes: 8b977c5498b8 ("nvmem: core: add nvmem_cell_read_u64") Fixes: 0a9b2d1ce422 ("nvmem: core: add nvmem_cell_read_u16") Fixes: d026d70a2e94 ("nvmem: core: Add nvmem_cell_read_u32") Fixes: f1f50eca5f90 ("nvmem: Introduce devm_nvmem_(un)register()") Fixes: eace75cfdcf7 ("nvmem: Add a simple NVMEM framework for nvmem providers") Signed-off-by: Andreas Färber --- In theory, for clean backports this would need to be split into 5 pieces... Not sure whether anyone would actually do that for help text? Dropping the Fixes headers might be an alternative. v2: New drivers/nvmem/core.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/nvmem/core.c b/drivers/nvmem/core.c index fc480d636be2..95bed31391cd 100644 --- a/drivers/nvmem/core.c +++ b/drivers/nvmem/core.c @@ -573,7 +573,7 @@ static int nvmem_add_cells_from_of(struct nvmem_device *nvmem) /** * nvmem_register() - Register a nvmem device for given nvmem_config. - * Also creates an binary entry in /sys/bus/nvmem/devices/dev-name/nvmem + * Also creates a binary entry in /sys/bus/nvmem/devices/dev-name/nvmem * * @config: nvmem device configuration with which nvmem device is created. * @@ -728,7 +728,7 @@ static void devm_nvmem_release(struct device *dev, void *res) /** * devm_nvmem_register() - Register a managed nvmem device for given * nvmem_config. - * Also creates an binary entry in /sys/bus/nvmem/devices/dev-name/nvmem + * Also creates a binary entry in /sys/bus/nvmem/devices/dev-name/nvmem * * @dev: Device that uses the nvmem device. * @config: nvmem device configuration with which nvmem device is created. @@ -772,7 +772,7 @@ static int devm_nvmem_match(struct device *dev, void *res, void *data) * @dev: Device that uses the nvmem device. * @nvmem: Pointer to previously registered nvmem device. * - * Return: Will be an negative on error or a zero on success. + * Return: Will be negative on error or zero on success. */ int devm_nvmem_unregister(struct device *dev, struct nvmem_device *nvmem) { @@ -1375,7 +1375,7 @@ static int nvmem_cell_read_common(struct device *dev, const char *cell_id, } /** - * nvmem_cell_read_u16() - Read a cell value as an u16 + * nvmem_cell_read_u16() - Read a cell value as a u16 * * @dev: Device that requests the nvmem cell. * @cell_id: Name of nvmem cell to read. @@ -1390,7 +1390,7 @@ int nvmem_cell_read_u16(struct device *dev, const char *cell_id, u16 *val) EXPORT_SYMBOL_GPL(nvmem_cell_read_u16); /** - * nvmem_cell_read_u32() - Read a cell value as an u32 + * nvmem_cell_read_u32() - Read a cell value as a u32 * * @dev: Device that requests the nvmem cell. * @cell_id: Name of nvmem cell to read. @@ -1405,7 +1405,7 @@ int nvmem_cell_read_u32(struct device *dev, const char *cell_id, u32 *val) EXPORT_SYMBOL_GPL(nvmem_cell_read_u32); /** - * nvmem_cell_read_u64() - Read a cell value as an u64 + * nvmem_cell_read_u64() - Read a cell value as a u64 * * @dev: Device that requests the nvmem cell. * @cell_id: Name of nvmem cell to read. From patchwork Tue Jun 23 02:51:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andreas_F=C3=A4rber?= X-Patchwork-Id: 11619645 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5C40313A0 for ; Tue, 23 Jun 2020 02:57:34 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 042A72076A for ; Tue, 23 Jun 2020 02:57:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="idy60Sxl"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="hG0V8jd8" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 042A72076A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=iXqHrm4tCKl/pN2eZBpH2mj5nQvrPGhmLxY/eLQ8SJ0=; b=idy60SxlDHG6kCS0rVjm1n3yE UGm+rS8j9t29dzxl86idiSpMgYFAv6B1lHrE8cnJAdMDfBDrkzt+tRzvf8mJJW5MswwRsbZD7E3PY 4AXXcekryMnrAQYtO/SmaEs5N21BLD80xVqs9aLCTTOVRB1ZwSi1zUhW9zDcFdl11FT6LqkKuQadg uBUrggu4+Q4T7tvVnz6GQWhlHTiUpsUUMW8+rmHvwbzRdmdnaUvOjm5LBy70OkXHKJCT8WpP7/2yH 7dvIjUfvTikwpjdExUi8G5OcAvuVv1MLxZ9cLrIrbSVhYTpAwU3i72VgnonlHZ5pjIff6eV+OTXNI Yy0TotUCQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jnZ5T-000483-Gi; Tue, 23 Jun 2020 02:55:04 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jnZ31-0002Ip-Kg; Tue, 23 Jun 2020 02:52:31 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:Content-Type: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-ID:Content-Description; bh=BYoybkvgg8Itq8q0+d2eTQ6N+xf5d4x6r8gCSu0WW/8=; b=hG0V8jd8ejLFxO2U6h2M+/uJr1 /1KEdsPCG1fWljqXYWcHjWa4tQAjU7nmDeSNcSoj4BHWJdCi0AfbuPxLz4Eq1EGEFw5q6OqyqAdDO F67yxAPx0Lbq5dR3H8A0RBE218hJsrlGUd6wtoRJriLViEAwdZZHWnW4AINI9CWklIxg7JyvG2xk+ p0uqB98W74KOYOZYsCOqU7HmXLjvEltTSziSA9Bbls4gHp8HLgZcOXn8klT1YuqktB6t++jjstdCy /H6IBQXQnVZjYjDKFlKpsZMLLOb5tlair13AV+uUuuRYVYGcFgjUxavIWdhZ7efBOiq527bqAFkMV i9sfmdOQ==; Received: from mx2.suse.de ([195.135.220.15]) by casper.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jnZ2w-0005Rq-No; Tue, 23 Jun 2020 02:52:30 +0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id ED2EFB1A8; Tue, 23 Jun 2020 02:51:42 +0000 (UTC) From: =?utf-8?q?Andreas_F=C3=A4rber?= To: linux-realtek-soc@lists.infradead.org Subject: [PATCH v2 28/29] nvmem: core: Add nvmem_cell_read_u8() Date: Tue, 23 Jun 2020 04:51:05 +0200 Message-Id: <20200623025106.31273-29-afaerber@suse.de> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200623025106.31273-1-afaerber@suse.de> References: <20200623025106.31273-1-afaerber@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200623_035227_027781_ED3CF16A X-CRM114-Status: UNSURE ( 8.90 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -4.2 (----) X-Spam-Report: SpamAssassin version 3.4.4 on casper.infradead.org summary: Content analysis details: (-4.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [195.135.220.15 listed in wl.mailspike.net] -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [195.135.220.15 listed in list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?b?SmFtZXMgVGFpIFvmiLTlv5fls7Bd?= , Edgar Lee , linux-kernel@vger.kernel.org, Srinivas Kandagatla , =?utf-8?b?U3Rhbmxl?= =?utf-8?b?eSBDaGFuZyBb5piM6IKy5b63XQ==?= , =?utf-8?q?Andreas_F=C3=A4rber?= , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Complement the u16, u32 and u64 helpers with a u8 variant to ease accessing byte-sized values. This helper will be useful for Realtek Digital Home Center platforms, which store some byte and sub-byte sized values in non-volatile memory. Signed-off-by: Andreas Färber --- v2: New drivers/nvmem/core.c | 15 +++++++++++++++ include/linux/nvmem-consumer.h | 1 + 2 files changed, 16 insertions(+) diff --git a/drivers/nvmem/core.c b/drivers/nvmem/core.c index 95bed31391cd..d6bacc878500 100644 --- a/drivers/nvmem/core.c +++ b/drivers/nvmem/core.c @@ -1374,6 +1374,21 @@ static int nvmem_cell_read_common(struct device *dev, const char *cell_id, return 0; } +/** + * nvmem_cell_read_u8() - Read a cell value as a u8 + * + * @dev: Device that requests the nvmem cell. + * @cell_id: Name of nvmem cell to read. + * @val: pointer to output value. + * + * Return: 0 on success or negative errno. + */ +int nvmem_cell_read_u8(struct device *dev, const char *cell_id, u8 *val) +{ + return nvmem_cell_read_common(dev, cell_id, val, sizeof(*val)); +} +EXPORT_SYMBOL_GPL(nvmem_cell_read_u8); + /** * nvmem_cell_read_u16() - Read a cell value as a u16 * diff --git a/include/linux/nvmem-consumer.h b/include/linux/nvmem-consumer.h index 1b311d27c9b8..052293f4cbdb 100644 --- a/include/linux/nvmem-consumer.h +++ b/include/linux/nvmem-consumer.h @@ -61,6 +61,7 @@ void nvmem_cell_put(struct nvmem_cell *cell); void devm_nvmem_cell_put(struct device *dev, struct nvmem_cell *cell); void *nvmem_cell_read(struct nvmem_cell *cell, size_t *len); int nvmem_cell_write(struct nvmem_cell *cell, void *buf, size_t len); +int nvmem_cell_read_u8(struct device *dev, const char *cell_id, u8 *val); int nvmem_cell_read_u16(struct device *dev, const char *cell_id, u16 *val); int nvmem_cell_read_u32(struct device *dev, const char *cell_id, u32 *val); int nvmem_cell_read_u64(struct device *dev, const char *cell_id, u64 *val); From patchwork Tue Jun 23 02:51:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andreas_F=C3=A4rber?= X-Patchwork-Id: 11619655 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 47F5B6C1 for ; Tue, 23 Jun 2020 03:03:39 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 20B6E20786 for ; Tue, 23 Jun 2020 03:03:39 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="FRpH+Afp" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 20B6E20786 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=CNXM4YqDZvuzFh2QqcbcjOOcHgyb+6s8gMxidVWhRGk=; b=FRpH+AfpmAJcOTvEvJK6c5eR5 0l297SvoUmPPaEwi7WCunCIXx9RIzaH5BXdDbtB0oWXPnL3ssOEr1yRTKQkzRsH1QrwlFS1wiQub3 a2nfA4SF+WwUpzpOaHMlzpoQnIMfUKM+tJWsTe0NClhKTbd1BNFkP1fp+9SM7KSOHJ6m+UmAO3EsX fgZD0h4Df0z3GPpORw3EN+iNCl5Bu7RinDebQIkVzxYwoCy1XFB/xpkSHi+DssGYrRP00IhWC8GFX TZPnEt/9Ianv1TfZfURMh2y8AWLI5t/r4wynLyjWWVVGVQBQIcNUjX29X6rk+pSA2DfZN9Nf0V+hb cH93nuo5w==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jnZBf-0000KG-HA; Tue, 23 Jun 2020 03:01:27 +0000 Received: from mx2.suse.de ([195.135.220.15]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jnZ3S-0002aP-1R; Tue, 23 Jun 2020 02:52:59 +0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 62E89B1A7; Tue, 23 Jun 2020 02:51:43 +0000 (UTC) From: =?utf-8?q?Andreas_F=C3=A4rber?= To: linux-realtek-soc@lists.infradead.org Subject: [PATCH v2 29/29] soc: realtek: chip: Adopt nvmem_cell_read_u8() helper Date: Tue, 23 Jun 2020 04:51:06 +0200 Message-Id: <20200623025106.31273-30-afaerber@suse.de> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200623025106.31273-1-afaerber@suse.de> References: <20200623025106.31273-1-afaerber@suse.de> MIME-Version: 1.0 X-Spam-Note: CRM114 invocation failed X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-2.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [195.135.220.15 listed in list.dnswl.org] 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [195.135.220.15 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?b?SmFtZXMgVGFpIFvmiLTlv5fls7Bd?= , Edgar Lee , linux-kernel@vger.kernel.org, Srinivas Kandagatla , =?utf-8?b?U3Rhbmxl?= =?utf-8?b?eSBDaGFuZyBb5piM6IKy5b63XQ==?= , =?utf-8?q?Andreas_F=C3=A4rber?= , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Replace the local helper with the newly introduced official one. Cc: Srinivas Kandagatla Signed-off-by: Andreas Färber --- This could be squashed if the new API and this commit were to get merged in subsequent merge windows or with the help of a topic branch. v2: New drivers/soc/realtek/chip.c | 29 +---------------------------- 1 file changed, 1 insertion(+), 28 deletions(-) diff --git a/drivers/soc/realtek/chip.c b/drivers/soc/realtek/chip.c index bed028ce1b16..46e0d9063b5d 100644 --- a/drivers/soc/realtek/chip.c +++ b/drivers/soc/realtek/chip.c @@ -79,33 +79,6 @@ struct dhc_soc { const char *codename; }; -static int dhc_efuse_read_u8(struct device *dev, const char *cell_id, u8 *val) -{ - struct nvmem_cell *cell; - void *buf; - size_t len; - - cell = nvmem_cell_get(dev, cell_id); - if (IS_ERR(cell)) - return PTR_ERR(cell); - - buf = nvmem_cell_read(cell, &len); - if (IS_ERR(buf)) { - nvmem_cell_put(cell); - return PTR_ERR(buf); - } - if (len != sizeof(*val)) { - kfree(buf); - nvmem_cell_put(cell); - return -EINVAL; - } - memcpy(val, buf, 1); - kfree(buf); - nvmem_cell_put(cell); - - return 0; -} - static const char *default_name(struct device *dev, const struct dhc_soc *s) { return s->family; @@ -118,7 +91,7 @@ static const char *rtd1295_name(struct device *dev, const struct dhc_soc *s) int ret; u8 b; - ret = dhc_efuse_read_u8(dev, "efuse_package_id", &b); + ret = nvmem_cell_read_u8(dev, "efuse_package_id", &b); if (ret == -EPROBE_DEFER) return ERR_PTR(ret); else if (ret)