From patchwork Sun Nov 3 01:36:35 2019 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: 11224255 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 1D02C1599 for ; Sun, 3 Nov 2019 01:37:13 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B026820862 for ; Sun, 3 Nov 2019 01:37: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="WtIrTd0V" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B026820862 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=bombadil.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=XrXIJN0XEiLc2JL9EZOORhYGGKqJgDeAjH51ufDZF6M=; b=WtIrTd0VNsc0qJ v1+l+dKusWZQ90Q6o4CxFgFsQYQfNS5MfXjR8AnrLRB7FLfbH78we/tZA6GtD30Juc7Ln2N7ykyMJ xDXmQAr6UHn2S0iCnRx8WS3u1eTHGhXFXd/+KxH3htlemUTsEjFoWMLvr2wUWTFE5ebn9j7Gysb/s tpMbMAbeOOZTjHB1372/fXUm2+Bb+ClHIm3EwzK3xL/OJGoQjPFVT1IY+Zkt2rmzQxzxQEV58ZpIn uZBu44BCywsjQCTgwa4+l7BbXmGQQwwrrMUwvFA8GAJ5vF+ciLb3+vOlJqHy/XANyg9yaO90o1FKb ClND6BHjJVjfayZRPosA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iR4pJ-00054n-JR; Sun, 03 Nov 2019 01:37:09 +0000 Received: from mx2.suse.de ([195.135.220.15] helo=mx1.suse.de) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iR4p7-0004n6-OZ; Sun, 03 Nov 2019 01:36:59 +0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id DAAC3AF26; Sun, 3 Nov 2019 01:36:52 +0000 (UTC) From: =?utf-8?q?Andreas_F=C3=A4rber?= To: linux-realtek-soc@lists.infradead.org Subject: [RFC 01/11] dt-bindings: soc: Add Realtek RTD1195 chip info binding Date: Sun, 3 Nov 2019 02:36:35 +0100 Message-Id: <20191103013645.9856-2-afaerber@suse.de> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20191103013645.9856-1-afaerber@suse.de> References: <20191103013645.9856-1-afaerber@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191102_183657_956445_789C1517 X-CRM114-Status: GOOD ( 12.08 ) X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.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 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 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: Mark Rutland , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Rob Herring , =?utf-8?q?A?= =?utf-8?q?ndreas_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 Define a binding for RTD1195 and later SoCs' chip info registers. Add the new directory to MAINTAINERS. Signed-off-by: Andreas Färber --- Note: The binding gets extended compatibly later for up to three reg entries. .../bindings/soc/realtek/realtek,rtd1195-chip.yaml | 32 ++++++++++++++++++++++ MAINTAINERS | 1 + 2 files changed, 33 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..565ad2419553 --- /dev/null +++ b/Documentation/devicetree/bindings/soc/realtek/realtek,rtd1195-chip.yaml @@ -0,0 +1,32 @@ +# 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 RTD1195 chip identification + +maintainers: + - Andreas Färber + +description: | + The Realtek SoCs have some registers to identify the chip and revision. + +properties: + compatible: + const: "realtek,rtd1195-chip" + + reg: + maxItems: 1 + +required: + - compatible + - reg + +examples: + - | + chip-info@1801a200 { + compatible = "realtek,rtd1195-chip"; + reg = <0x1801a200 0x8>; + }; +... diff --git a/MAINTAINERS b/MAINTAINERS index f33adc430230..5c61cf5a44cb 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2188,6 +2188,7 @@ L: linux-realtek-soc@lists.infradead.org (moderated for non-subscribers) S: Maintained F: arch/arm64/boot/dts/realtek/ F: Documentation/devicetree/bindings/arm/realtek.yaml +F: Documentation/devicetree/bindings/soc/realtek/ ARM/RENESAS ARM64 ARCHITECTURE M: Geert Uytterhoeven From patchwork Sun Nov 3 01:36:36 2019 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: 11224259 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 3E2C31599 for ; Sun, 3 Nov 2019 01:37:43 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 07BBE20663 for ; Sun, 3 Nov 2019 01:37:43 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="auqX0cux" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 07BBE20663 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=bombadil.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=eOXl5yU3TOyV36Pt/Zp+qDgM6TQt5vq5eAymybuda7A=; b=auqX0cuxcCoawC 8SgQyQ6/qF8BCUHzbZSReIPRZgW8up2+2FRLP0tcRsWrANoa+Gqb36B7ivXFWazaGkFBD3+9QvsOK vvO9Jq+giBdFto9Sh+CpSFqE38nhqKkzak1oP85EMlHEazRHe/JnYdqKYKbgHZ48Q0RU2Qv+ZKw3d Q9CbFsZL+ihKQJXpyWUmxlEWWqE7necHyDEW8LBEb/1MZo78LZdEH3xB0FNMes+qhJ/9o0O3cI7Xq 8EeAhS9vdTIKoPOoRrapc6aGsL/bpU4Si14mIQkPmhS0FpU2WroJIbCI77o3CB3LdTQzZb+8vRW2I oPZ4Q571G8LfY0DU0kew==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iR4pq-0005ef-Ed; Sun, 03 Nov 2019 01:37:42 +0000 Received: from mx2.suse.de ([195.135.220.15] helo=mx1.suse.de) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iR4p7-0004nU-Ol; Sun, 03 Nov 2019 01:37:01 +0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 7D1C0AF55; Sun, 3 Nov 2019 01:36:53 +0000 (UTC) From: =?utf-8?q?Andreas_F=C3=A4rber?= To: linux-realtek-soc@lists.infradead.org Subject: [RFC 02/11] soc: Add Realtek chip info driver for RTD1195 and RTD1295 Date: Sun, 3 Nov 2019 02:36:36 +0100 Message-Id: <20191103013645.9856-3-afaerber@suse.de> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20191103013645.9856-1-afaerber@suse.de> References: <20191103013645.9856-1-afaerber@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191102_183658_118212_1D7CE101 X-CRM114-Status: GOOD ( 14.85 ) X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.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 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 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: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, =?utf-8?q?Andreas_F=C3=A4rber?= 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 --- Naming: What to call the family vs. soc_id? drivers/soc/Kconfig | 1 + drivers/soc/Makefile | 1 + drivers/soc/realtek/Kconfig | 13 ++++ drivers/soc/realtek/Makefile | 2 + drivers/soc/realtek/chip.c | 164 +++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 181 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/drivers/soc/Kconfig b/drivers/soc/Kconfig index 833e04a7835c..06ae9d97321c 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 2ec355003524..1d55d838a342 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..9d13422e9936 --- /dev/null +++ b/drivers/soc/realtek/chip.c @@ -0,0 +1,164 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* + * Realtek System-on-Chip info + * + * Copyright (c) 2017-2019 Andreas Färber + */ + +#include +#include +#include +#include +#include +#include +#include + +#define REG_CHIP_ID 0x0 +#define REG_CHIP_REV 0x4 + +struct rtd_soc_revision { + const char *name; + u32 chip_rev; +}; + +static const struct rtd_soc_revision rtd1195_revisions[] = { + { "A", 0x00000000 }, + { "B", 0x00010000 }, + { "C", 0x00020000 }, + { "D", 0x00030000 }, + { } +}; + +static const struct rtd_soc_revision rtd1295_revisions[] = { + { "A00", 0x00000000 }, + { "A01", 0x00010000 }, + { "B00", 0x00020000 }, + { "B01", 0x00030000 }, + { } +}; + +struct rtd_soc { + u32 chip_id; + const char *family; + const char *(*get_name)(struct device *dev, const struct rtd_soc *s); + const struct rtd_soc_revision *revisions; + const char *codename; +}; + +static const char *default_name(struct device *dev, const struct rtd_soc *s) +{ + return s->family; +} + +static const struct rtd_soc rtd_soc_families[] = { + { 0x00006329, "RTD1195", default_name, rtd1195_revisions, "Phoenix" }, + { 0x00006421, "RTD1295", default_name, rtd1295_revisions, "Kylin" }, +}; + +static const struct rtd_soc *rtd_soc_by_chip_id(u32 chip_id) +{ + int i; + + for (i = 0; i < ARRAY_SIZE(rtd_soc_families); i++) { + const struct rtd_soc *family = &rtd_soc_families[i]; + + if (family->chip_id == chip_id) + return family; + } + return NULL; +} + +static const char *rtd_soc_rev(const struct rtd_soc *family, u32 chip_rev) +{ + if (family) { + const struct rtd_soc_revision *rev = family->revisions; + + while (rev && rev->name) { + if (rev->chip_rev == chip_rev) + return rev->name; + rev++; + } + } + return "unknown"; +} + +static int rtd_soc_probe(struct platform_device *pdev) +{ + const struct rtd_soc *s; + struct soc_device_attribute *soc_dev_attr; + struct soc_device *soc_dev; + struct device_node *node; + void __iomem *base; + u32 chip_id, chip_rev; + + base = of_iomap(pdev->dev.of_node, 0); + if (!base) + return -ENODEV; + + soc_dev_attr = kzalloc(sizeof(*soc_dev_attr), GFP_KERNEL); + if (!soc_dev_attr) + return -ENOMEM; + + chip_id = readl_relaxed(base + REG_CHIP_ID); + chip_rev = readl_relaxed(base + REG_CHIP_REV); + + node = of_find_node_by_path("/"); + of_property_read_string(node, "model", &soc_dev_attr->machine); + of_node_put(node); + + s = rtd_soc_by_chip_id(chip_id); + + soc_dev_attr->family = kasprintf(GFP_KERNEL, "Realtek %s", + (s && s->codename) ? s->codename : + ((s && s->family) ? s->family : "Digital Home Center")); + + if (likely(s && s->get_name)) + soc_dev_attr->soc_id = s->get_name(&pdev->dev, s); + else + soc_dev_attr->soc_id = "unknown"; + + soc_dev_attr->revision = rtd_soc_rev(s, chip_rev); + + 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); + + dev_info(soc_device_to_device(soc_dev), + "%s %s (0x%08x) rev %s (0x%08x) detected\n", + soc_dev_attr->family, soc_dev_attr->soc_id, chip_id, + soc_dev_attr->revision, chip_rev); + + return 0; +} + +static int rtd_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 rtd_soc_dt_ids[] = { + { .compatible = "realtek,rtd1195-chip" }, + { } +}; + +static struct platform_driver rtd_soc_driver = { + .probe = rtd_soc_probe, + .remove = rtd_soc_remove, + .driver = { + .name = "rtd1195-soc", + .of_match_table = rtd_soc_dt_ids, + }, +}; +module_platform_driver(rtd_soc_driver); + +MODULE_DESCRIPTION("Realtek SoC identification"); +MODULE_LICENSE("GPL"); From patchwork Sun Nov 3 01:36:37 2019 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: 11224257 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 E1D12112B for ; Sun, 3 Nov 2019 01:37:32 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BFD4E21855 for ; Sun, 3 Nov 2019 01:37: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="EYLg7rf0" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BFD4E21855 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=bombadil.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=xvbeKO2oCNTYUb9wosy3v79RekJvcXcHkwJQ78wjedQ=; b=EYLg7rf0cOQ7d3 xz3gII2L94VpV4ERhTwTfLMVykhbeUSZsQOWlKwV7GJ66mZgPLEHzYA7sYJ7IZoMizw7fa3o8BLt3 7n8tiagqbDJ0EPi1f0F35M6yp1+2ymwKuoWY6BRcibC/V6OUM/YkOcE8WU/v4QMOjEkIPRX3GuK8f 2EfoOk2QzxvFcw0zRdeb++vj4PF6Gq1LOSvwoBD9Y9B2vcQirtrMbCerHg6mBd9N7M1aaJtEb5GX1 XkVYXT+vxkd8dO5Ou7InlALgiX/ZPCWLXjoL5KGlU6eetJ0JYe1fj+MmYHfKC4hpJ5yZ89zKyGZO7 pIstL/bz3enPOzw3/O2g==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iR4pc-0005PX-9n; Sun, 03 Nov 2019 01:37:28 +0000 Received: from mx2.suse.de ([195.135.220.15] helo=mx1.suse.de) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iR4p7-0004qR-Od; Sun, 03 Nov 2019 01:37:00 +0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id E1C8FAF6B; Sun, 3 Nov 2019 01:36:53 +0000 (UTC) From: =?utf-8?q?Andreas_F=C3=A4rber?= To: linux-realtek-soc@lists.infradead.org Subject: [RFC 03/11] arm64: dts: realtek: rtd129x: Add chip info node Date: Sun, 3 Nov 2019 02:36:37 +0100 Message-Id: <20191103013645.9856-4-afaerber@suse.de> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20191103013645.9856-1-afaerber@suse.de> References: <20191103013645.9856-1-afaerber@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191102_183657_954137_0B52BB4E X-CRM114-Status: UNSURE ( 9.12 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.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 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 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: Mark Rutland , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Rob Herring , =?utf-8?q?A?= =?utf-8?q?ndreas_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 node for chip identification. Signed-off-by: Andreas Färber Acked-by: James Tai Acked-by: James Tai Tested-by: Stanley Chang Reviewed-by: Stanley Chang --- 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 4433114476f5..15a7c249155d 100644 --- a/arch/arm64/boot/dts/realtek/rtd129x.dtsi +++ b/arch/arm64/boot/dts/realtek/rtd129x.dtsi @@ -84,6 +84,11 @@ status = "disabled"; }; + chip-info@9801a200 { + compatible = "realtek,rtd1195-chip"; + reg = <0x9801a200 0x8>; + }; + uart1: serial@9801b200 { compatible = "snps,dw-apb-uart"; reg = <0x9801b200 0x100>; From patchwork Sun Nov 3 01:36:38 2019 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: 11224253 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 81EE41599 for ; Sun, 3 Nov 2019 01:37:11 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5904F21726 for ; Sun, 3 Nov 2019 01:37:11 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="ROAGYdCX" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5904F21726 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=bombadil.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=rElM6T9OPSgQ+F25hQ5bGWtFjbxRpy3SSl0hiRrescA=; b=ROAGYdCXde2YYk 6gKbz2zNMUlCKRuiygaVFdM1WH9iRnb4J0TYuctWQp5Wd6yHovTqZkUca97ARHgXSbCanAMxyBPgy 0T8NzI/zcvLtfhyzgDAKjsdrofuYIV8tqKXgXfd2rHyI9uPyupGCWuxERjMRNTxh4YefW1/ix78rs 8IlL8s9/wDNU48gpaO2cLjNJDl5HHVoFQOz4y5OgK3cuEjxtsMPj2bMsHF0gfZ5KHKggveEEliKIC gATTLtyLvPeByqQQd1wICg2TDVJR0BhWWP//F142vw7SN8bONn7nWD4ChkRE2HxYVuP5lEmvr965Y LBvsC10tlWF/w4GyR5ug==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iR4pB-0004x2-Gz; Sun, 03 Nov 2019 01:37:01 +0000 Received: from mx2.suse.de ([195.135.220.15] helo=mx1.suse.de) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iR4p7-0004sf-Oi; Sun, 03 Nov 2019 01:36:59 +0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 5C9D5AF92; Sun, 3 Nov 2019 01:36:54 +0000 (UTC) From: =?utf-8?q?Andreas_F=C3=A4rber?= To: linux-realtek-soc@lists.infradead.org Subject: [RFC 04/11] ARM: dts: rtd1195: Add chip info node Date: Sun, 3 Nov 2019 02:36:38 +0100 Message-Id: <20191103013645.9856-5-afaerber@suse.de> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20191103013645.9856-1-afaerber@suse.de> References: <20191103013645.9856-1-afaerber@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191102_183657_963490_1B50947E X-CRM114-Status: UNSURE ( 9.33 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-2.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record -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 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 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: Mark Rutland , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Rob Herring , =?utf-8?q?A?= =?utf-8?q?ndreas_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 node for chip identification. Signed-off-by: Andreas Färber --- 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 9e088f669bd7..dd4f3ee6be43 100644 --- a/arch/arm/boot/dts/rtd1195.dtsi +++ b/arch/arm/boot/dts/rtd1195.dtsi @@ -133,6 +133,11 @@ status = "disabled"; }; + chip-info@1801a200 { + compatible = "realtek,rtd1195-chip"; + reg = <0x1801a200 0x8>; + }; + uart1: serial@1801b200 { compatible = "snps,dw-apb-uart"; reg = <0x1801b200 0x100>; From patchwork Sun Nov 3 01:36:39 2019 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: 11224265 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 1848E112B for ; Sun, 3 Nov 2019 01:38:31 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DEFC120679 for ; Sun, 3 Nov 2019 01:38:30 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Mi4ESPrM" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DEFC120679 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=bombadil.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=aPauoYhsEHS+Dt6rsZDVySfe9NgB9dk44CMLXCky8kU=; b=Mi4ESPrMztfYRC SaVV6neboHi8fj66VHVTM2ebPEDVD+kEZFu3BIsVJTUYgzppnzNmNx7RaV6q/WBWUUHtOsHIw1OMz rV6/mOCp8L+x30dJWe8MeWOYVS7znsaA2cyb+z/JHkgO+akZglfDAnfLDhUso2oWm0d5GhRzFTtsT S7NVn/aSOhHpjTL+ojakBOStbAdhjL1tvTfS8z8jwWwsp93hUAw+ezcpkj8F5h3TFaoK2S9/I5Jfq IVQ5r3KDffIm3TM1ryt+PRzVVYnC85JmEQdD/TeRCWHhepMC+9tmG7EDSyH0V+Zp6B8eA+eBz6IjC Dq1k+RNHG0yeMxzFQiDA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iR4qZ-0006OJ-Gx; Sun, 03 Nov 2019 01:38:27 +0000 Received: from mx2.suse.de ([195.135.220.15] helo=mx1.suse.de) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iR4pA-0004w3-Oi; Sun, 03 Nov 2019 01:37:02 +0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id BE909AFA8; Sun, 3 Nov 2019 01:36:54 +0000 (UTC) From: =?utf-8?q?Andreas_F=C3=A4rber?= To: linux-realtek-soc@lists.infradead.org Subject: [RFC 05/11] dt-bindings: soc: realtek: rtd1195-chip: Extend reg property Date: Sun, 3 Nov 2019 02:36:39 +0100 Message-Id: <20191103013645.9856-6-afaerber@suse.de> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20191103013645.9856-1-afaerber@suse.de> References: <20191103013645.9856-1-afaerber@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191102_183700_955207_F7EA763C X-CRM114-Status: GOOD ( 10.26 ) X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.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 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 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: Mark Rutland , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Rob Herring , =?utf-8?q?A?= =?utf-8?q?ndreas_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 Allow to optionally specify a second register to identify the chip. Whether needed and which register to specify depends on the family; RTD1295 family will want the CHIP_INFO1 register. Signed-off-by: Andreas Färber --- A SoC specific binding would defeat the purpose of the generic Linux driver; is it possible to check the root node's compatible in an if: expression to prohibit using more than one reg on "realtek,rtd1195"? .../devicetree/bindings/soc/realtek/realtek,rtd1195-chip.yaml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/soc/realtek/realtek,rtd1195-chip.yaml b/Documentation/devicetree/bindings/soc/realtek/realtek,rtd1195-chip.yaml index 565ad2419553..e431cf559b66 100644 --- a/Documentation/devicetree/bindings/soc/realtek/realtek,rtd1195-chip.yaml +++ b/Documentation/devicetree/bindings/soc/realtek/realtek,rtd1195-chip.yaml @@ -11,13 +11,15 @@ maintainers: description: | The Realtek SoCs have some registers to identify the chip and revision. + To identify the exact model within a family, further registers are needed. properties: compatible: const: "realtek,rtd1195-chip" reg: - maxItems: 1 + minItems: 1 + maxItems: 2 required: - compatible @@ -29,4 +31,10 @@ examples: compatible = "realtek,rtd1195-chip"; reg = <0x1801a200 0x8>; }; + - | + chip-info@9801a200 { + compatible = "realtek,rtd1195-chip"; + reg = <0x9801a200 0x8>, + <0x98007028 0x4>; + }; ... From patchwork Sun Nov 3 01:36:40 2019 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: 11224263 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 AEABD112B for ; Sun, 3 Nov 2019 01:38:17 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5B05D20679 for ; Sun, 3 Nov 2019 01:38:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="K1EU/OIY" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5B05D20679 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=bombadil.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=u7uK4vG9gj5FBr6PodXebA+//oDSuMqe9cKJJwjDA7A=; b=K1EU/OIYQfqMzl WxZi27MsdjLN9JhqAqTnJoynv55hjd9R3EbqoQb0sfU8M6h8tkQ6b66iL00HvOtRU8ydzX5W+HLAj zioYKCViqkENhDWqodFVMAhrsX0wMNw38kkkbzWSzVWlcWmvH8Jv7M95rU4neCTQX9UFU+sTqYuyL 672MdXYGTRAzjvgVV8RPaO4J4Ng4kSTsPTcrwUUkfj/A95Wi27Ijaom+RsQWRz5wwzaukONx7Up/J 7I6mwg5IyXXS7Ic6Ybj3obK5PBmroDOBsuk661ZnEgwNk5zeprKKkNym+X3I4bhJnNseCdWk7HTa+ JGFiezUcwtD4ZMqHEk2Q==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iR4qM-0006BT-NA; Sun, 03 Nov 2019 01:38:14 +0000 Received: from mx2.suse.de ([195.135.220.15] helo=mx1.suse.de) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iR4pA-0004w2-MX; Sun, 03 Nov 2019 01:37:02 +0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 20627AFD4; Sun, 3 Nov 2019 01:36:55 +0000 (UTC) From: =?utf-8?q?Andreas_F=C3=A4rber?= To: linux-realtek-soc@lists.infradead.org Subject: [RFC 06/11] soc: realtek: chip: Detect RTD1296 Date: Sun, 3 Nov 2019 02:36:40 +0100 Message-Id: <20191103013645.9856-7-afaerber@suse.de> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20191103013645.9856-1-afaerber@suse.de> References: <20191103013645.9856-1-afaerber@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191102_183700_892540_25B0018E X-CRM114-Status: UNSURE ( 9.43 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.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 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 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: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, =?utf-8?q?Andreas_F=C3=A4rber?= 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. Signed-off-by: Andreas Färber Acked-by: James Tai --- drivers/soc/realtek/chip.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/drivers/soc/realtek/chip.c b/drivers/soc/realtek/chip.c index 9d13422e9936..ba653c097644 100644 --- a/drivers/soc/realtek/chip.c +++ b/drivers/soc/realtek/chip.c @@ -50,9 +50,25 @@ static const char *default_name(struct device *dev, const struct rtd_soc *s) return s->family; } +static const char *rtd1295_name(struct device *dev, const struct rtd_soc *s) +{ + void __iomem *base; + + base = of_iomap(dev->of_node, 1); + if (base) { + u32 chipinfo1 = readl_relaxed(base); + iounmap(base); + if (chipinfo1 & BIT(11)) { + return "RTD1296"; + } + } + + return "RTD1295"; +} + static const struct rtd_soc rtd_soc_families[] = { { 0x00006329, "RTD1195", default_name, rtd1195_revisions, "Phoenix" }, - { 0x00006421, "RTD1295", default_name, rtd1295_revisions, "Kylin" }, + { 0x00006421, "RTD1295", rtd1295_name, rtd1295_revisions, "Kylin" }, }; static const struct rtd_soc *rtd_soc_by_chip_id(u32 chip_id) From patchwork Sun Nov 3 01:36:41 2019 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: 11224269 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 9A5B5112B for ; Sun, 3 Nov 2019 01:39:00 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6D14120663 for ; Sun, 3 Nov 2019 01:39:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="DgcIoPsf" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6D14120663 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=bombadil.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=EdhWpCILRZocfeUt+ihPNkQs4buSPkKeyOM0Y2rXYvI=; b=DgcIoPsfRo6rKi 5cBanmt7PV2DzC9DVUID5mw2kgIJfEu7PAyOGWI35IQOeWjMWCpWnG2iB2kL7JPyj2jdz+q90aHT/ BtHut2JrnjYf/kGGVFfhDquUkQSEGBXZSEff71MB0tBEOv/uO/Pk8l0rE2dL7VkTJEqfiaJrViikC OQswOqqI/IuO67GVc0nUwymz9alQTdmBUideoGbV9otARS7oeLV3sDHzoB0qxwFaLACHoZwo44nEi V/Uqzd79QRDccJR0r13lX+0q0CG6LFV4XLi7Iy4PRGbokHEI2W5oj6aLToPcCvD8kV1Aog9qnj+Dj Sox/dWF1PaWMqPls/1OA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iR4r4-0006t6-Pw; Sun, 03 Nov 2019 01:38:58 +0000 Received: from mx2.suse.de ([195.135.220.15] helo=mx1.suse.de) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iR4pA-0004w8-SL; Sun, 03 Nov 2019 01:37:03 +0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 8EA30B1F0; Sun, 3 Nov 2019 01:36:55 +0000 (UTC) From: =?utf-8?q?Andreas_F=C3=A4rber?= To: linux-realtek-soc@lists.infradead.org Subject: [RFC 07/11] arm64: dts: realtek: rtd129x: Extend chip-info reg with CHIP_INFO1 Date: Sun, 3 Nov 2019 02:36:41 +0100 Message-Id: <20191103013645.9856-8-afaerber@suse.de> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20191103013645.9856-1-afaerber@suse.de> References: <20191103013645.9856-1-afaerber@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191102_183701_086309_47175EA4 X-CRM114-Status: UNSURE ( 9.20 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.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 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 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: Mark Rutland , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Rob Herring , =?utf-8?q?A?= =?utf-8?q?ndreas_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 This additional register is needed to distinguish RTD1296 from RTD1295. Signed-off-by: Andreas Färber --- arch/arm64/boot/dts/realtek/rtd129x.dtsi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/realtek/rtd129x.dtsi b/arch/arm64/boot/dts/realtek/rtd129x.dtsi index 15a7c249155d..fea7c1ed7d08 100644 --- a/arch/arm64/boot/dts/realtek/rtd129x.dtsi +++ b/arch/arm64/boot/dts/realtek/rtd129x.dtsi @@ -86,7 +86,8 @@ chip-info@9801a200 { compatible = "realtek,rtd1195-chip"; - reg = <0x9801a200 0x8>; + reg = <0x9801a200 0x8>, + <0x98007028 0x4>; }; uart1: serial@9801b200 { From patchwork Sun Nov 3 01:36:42 2019 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: 11224267 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 D0792112B for ; Sun, 3 Nov 2019 01:38:43 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8ABC420663 for ; Sun, 3 Nov 2019 01:38:43 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="hmy0tYT7" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8ABC420663 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=bombadil.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=KS6Hpc+l3wfKbX/iQIguGnEPZQGCGfS9wbgi3X0xt5Q=; b=hmy0tYT7yA7fLF UOw9ML7GBXncGGwVLgaFpoGvyg7BQprz7ufZ7D/EdaTr7rWnc62OrysKvIT7+fd1VxjiGR3PvlIvX qbYpH+QsQEzlrEoRDrhzVxDDWMU7i3fP1pxZAtiDakt5tQbzklluKX40oNBnf9PZ5HBMap8eFSc/E 4wp4etgz1umfkmy6gkodaDYWSxh1N9r6Y2uf1e8uRuZXwbhGalkEtdEsZlExLbMLmml6JKgnB73DQ RlUqcPuMHWxhxDphKQb4R/qkNxbmzj9+YxoIcNELk4OkA3GKF429FYE3ojUCO6YID4tgjEVwNDo2W ALKu1IN8PsHRsVKoLIfg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iR4qn-0006d3-9b; Sun, 03 Nov 2019 01:38:41 +0000 Received: from mx2.suse.de ([195.135.220.15] helo=mx1.suse.de) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iR4pA-0004w7-R8; Sun, 03 Nov 2019 01:37:03 +0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id ED297B248; Sun, 3 Nov 2019 01:36:55 +0000 (UTC) From: =?utf-8?q?Andreas_F=C3=A4rber?= To: linux-realtek-soc@lists.infradead.org Subject: [RFC 08/11] soc: realtek: chip: Detect RTD1293 Date: Sun, 3 Nov 2019 02:36:42 +0100 Message-Id: <20191103013645.9856-9-afaerber@suse.de> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20191103013645.9856-1-afaerber@suse.de> References: <20191103013645.9856-1-afaerber@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191102_183701_075071_6B9488A4 X-CRM114-Status: UNSURE ( 8.45 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.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 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 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: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, =?utf-8?q?Andreas_F=C3=A4rber?= 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 --- drivers/soc/realtek/chip.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/soc/realtek/chip.c b/drivers/soc/realtek/chip.c index ba653c097644..f4b26fb048c7 100644 --- a/drivers/soc/realtek/chip.c +++ b/drivers/soc/realtek/chip.c @@ -59,6 +59,8 @@ static const char *rtd1295_name(struct device *dev, const struct rtd_soc *s) u32 chipinfo1 = readl_relaxed(base); iounmap(base); if (chipinfo1 & BIT(11)) { + if (chipinfo1 & BIT(4)) + return "RTD1293"; return "RTD1296"; } } From patchwork Sun Nov 3 01:36:43 2019 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: 11224273 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 A18591599 for ; Sun, 3 Nov 2019 01:39:26 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7193820679 for ; Sun, 3 Nov 2019 01:39: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="fw0gVg6U" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7193820679 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=bombadil.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=M3mHyKBLh6699/1pu6Z4qcq5dQ6d06NFZ7EMYQZSjUY=; b=fw0gVg6UUx+vq0 Md6S5yGmOO8LmXJ3mkveObQ5YWrbd41rcTLuxuYOoaFtD/3G7gyHIaRq3qQNxr4ZEBh8C0FRj7r/X NJMJzVqKapdiVIVdfpJN3fudPfdIMHFKxU0Vp9x+xfg5mfoPdKUoou2r9hI1RmOlPA9KbyPGYunLh hWqna0WErCAoVTNq137IjdzedmLi3YdE6SrCMOmxACMQwGRDfQGtW0MoBfu2YnFht3AF9e9I7Gqid VzLFdxjTq1kU7+sLsXmhWXL/3nRBpVD/F4aKRlEMO1RkMxGP2BrvewUJMBetrxWN+X47KXlJ+Kq1s tirk9fl5r0k5wkPZCR/w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iR4rT-0007ON-UA; Sun, 03 Nov 2019 01:39:23 +0000 Received: from mx2.suse.de ([195.135.220.15] helo=mx1.suse.de) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iR4pB-0004wd-VL; Sun, 03 Nov 2019 01:37:04 +0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 5DFD7B300; Sun, 3 Nov 2019 01:36:56 +0000 (UTC) From: =?utf-8?q?Andreas_F=C3=A4rber?= To: linux-realtek-soc@lists.infradead.org Subject: [RFC 09/11] dt-bindings: soc: realtek: rtd1195-chip: Extend reg node again Date: Sun, 3 Nov 2019 02:36:43 +0100 Message-Id: <20191103013645.9856-10-afaerber@suse.de> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20191103013645.9856-1-afaerber@suse.de> References: <20191103013645.9856-1-afaerber@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191102_183702_159679_97E63F2A X-CRM114-Status: UNSURE ( 8.51 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.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 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 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: Mark Rutland , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Rob Herring , =?utf-8?q?A?= =?utf-8?q?ndreas_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 Allow to optionally specify a third register to identify the chip. Whether needed and which register to specify depends on the family; RTD1295 family will want an efuse register. Signed-off-by: Andreas Färber --- I don't like specifying an efuse register here, which seems its own IP block. .../devicetree/bindings/soc/realtek/realtek,rtd1195-chip.yaml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/soc/realtek/realtek,rtd1195-chip.yaml b/Documentation/devicetree/bindings/soc/realtek/realtek,rtd1195-chip.yaml index e431cf559b66..249737e116d7 100644 --- a/Documentation/devicetree/bindings/soc/realtek/realtek,rtd1195-chip.yaml +++ b/Documentation/devicetree/bindings/soc/realtek/realtek,rtd1195-chip.yaml @@ -19,7 +19,7 @@ properties: reg: minItems: 1 - maxItems: 2 + maxItems: 3 required: - compatible @@ -37,4 +37,11 @@ examples: reg = <0x9801a200 0x8>, <0x98007028 0x4>; }; + - | + chip-info@9801a200 { + compatible = "realtek,rtd1195-chip"; + reg = <0x9801a200 0x8>, + <0x98007028 0x4>, + <0x980171d8 0x4>; + }; ... From patchwork Sun Nov 3 01:36:44 2019 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: 11224271 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 A7D06112B for ; Sun, 3 Nov 2019 01:39:15 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8580220679 for ; Sun, 3 Nov 2019 01:39: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="gK2j9Avu" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8580220679 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=bombadil.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=FezUxeE+aIP2Rgi9f/YGM5b//F0tdE5am+btJdHrTQk=; b=gK2j9AvuIz253q ZAagcNuk0RT3Wj3Z6ks2smZRvj+fpnUeHtr3GmqfLK1l4nPhmNHymzbA4yDSTBxv2oxFN1l5U+Liq DqYSd8CQE6ialIV+7739pDDOtf1AlRy5Bi7AltskQR+CxQF8MJ0fcLlh9/pVkr2syEyp7XkoHI6ol o5UzwA6SrWZpB6ilV5KJra17lXLHYrXQdhrInifpaYmKZORqw9HuDvSuyl5swQe+Y3ogqbKey0yCq Eb9Zml3etj1TOtF7m+hjw2UAh1+3ZPN809z6zrAp+F0FN9i/pT3zVxhCNb2g13itOHMrvfufCm+oe isyG0adCAgobLs4+Eesw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iR4rH-000761-1O; Sun, 03 Nov 2019 01:39:11 +0000 Received: from mx2.suse.de ([195.135.220.15] helo=mx1.suse.de) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iR4pB-0004wc-VK; Sun, 03 Nov 2019 01:37:03 +0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id B597CB30C; Sun, 3 Nov 2019 01:36:56 +0000 (UTC) From: =?utf-8?q?Andreas_F=C3=A4rber?= To: linux-realtek-soc@lists.infradead.org Subject: [RFC 10/11] soc: realtek: chip: Detect RTD1294 Date: Sun, 3 Nov 2019 02:36:44 +0100 Message-Id: <20191103013645.9856-11-afaerber@suse.de> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20191103013645.9856-1-afaerber@suse.de> References: <20191103013645.9856-1-afaerber@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191102_183702_191107_94B8BCC2 X-CRM114-Status: UNSURE ( 8.65 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.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 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 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: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, =?utf-8?q?Andreas_F=C3=A4rber?= 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 --- 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 f4b26fb048c7..e13339a4ca2e 100644 --- a/drivers/soc/realtek/chip.c +++ b/drivers/soc/realtek/chip.c @@ -54,6 +54,14 @@ static const char *rtd1295_name(struct device *dev, const struct rtd_soc *s) { void __iomem *base; + base = of_iomap(dev->of_node, 2); + if (base) { + u32 efuse = readl_relaxed(base); + iounmap(base); + if ((efuse & 0x3) == 0x1) + return "RTD1294"; + } + base = of_iomap(dev->of_node, 1); if (base) { u32 chipinfo1 = readl_relaxed(base); From patchwork Sun Nov 3 01:36:45 2019 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: 11224275 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 085731599 for ; Sun, 3 Nov 2019 01:39:44 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DA63320663 for ; Sun, 3 Nov 2019 01:39:43 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="K6ch5iw4" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DA63320663 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=bombadil.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=nsNGyEMqgSLk9mIt9qCJPJbLXF9axE6swOko84XIOl4=; b=K6ch5iw4Zfg5Bl a1WXbKaQsfHIAZlD5t/b1jCn88IdTdpsFWsdWrno3URGouoXzlpTq+goG4cnJWnZwME6d3rK2nxqn c6LyaDezBtlfR2yHYAQq6+wL4fqZbyYpKVnW19B7oq2HGtaTc+X2JzVPry7rD77u1XJ2du90v93p7 C07vM11pc5hnhh3D16UXeC408iGKVYpUspI+F523iUIoVxy7Bgqdzds78F5s7FUo1z9ruTRM8QIP/ uBxbCLSFPmDKx2nUxXvOID7KBrorwWKf85F2qu66qk3kVzEL2HCPeRkrWrlbxc2aYBIuRj9kEd+rS 72mUqpsyQ2x4sejETh0Q==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iR4rm-0007kx-J0; Sun, 03 Nov 2019 01:39:42 +0000 Received: from mx2.suse.de ([195.135.220.15] helo=mx1.suse.de) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iR4pC-0004xQ-F7; Sun, 03 Nov 2019 01:37:04 +0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 31BCFB30D; Sun, 3 Nov 2019 01:36:57 +0000 (UTC) From: =?utf-8?q?Andreas_F=C3=A4rber?= To: linux-realtek-soc@lists.infradead.org Subject: [RFC 11/11] arm64: dts: realtek: rtd129x: Extend chip-info reg with efuse Date: Sun, 3 Nov 2019 02:36:45 +0100 Message-Id: <20191103013645.9856-12-afaerber@suse.de> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20191103013645.9856-1-afaerber@suse.de> References: <20191103013645.9856-1-afaerber@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191102_183702_657599_45C6F2EF X-CRM114-Status: UNSURE ( 9.17 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.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 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 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: Mark Rutland , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Rob Herring , =?utf-8?q?A?= =?utf-8?q?ndreas_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 This register is needed to detect RTD1294. Signed-off-by: Andreas Färber --- arch/arm64/boot/dts/realtek/rtd129x.dtsi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/realtek/rtd129x.dtsi b/arch/arm64/boot/dts/realtek/rtd129x.dtsi index fea7c1ed7d08..670efa86f661 100644 --- a/arch/arm64/boot/dts/realtek/rtd129x.dtsi +++ b/arch/arm64/boot/dts/realtek/rtd129x.dtsi @@ -87,7 +87,8 @@ chip-info@9801a200 { compatible = "realtek,rtd1195-chip"; reg = <0x9801a200 0x8>, - <0x98007028 0x4>; + <0x98007028 0x4>, + <0x980171d8 0x4>; }; uart1: serial@9801b200 {