Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp3250517ybt; Mon, 22 Jun 2020 19:56:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxDD03MkYkRahgGuiurq+ajkMzW0VGBddfcWekKIGm3LYl+cDKC8eF8NzwBGnN8s9HJeQY3 X-Received: by 2002:a05:6402:1761:: with SMTP id da1mr19517685edb.68.1592880999749; Mon, 22 Jun 2020 19:56:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592880999; cv=none; d=google.com; s=arc-20160816; b=oLSFNz3YHIykCVHWGaL1Ogg/rGwQvJDfxHfTZipFET/tAeK/hsSTiS1wgTPEURPVK2 GNsY2N7brrYRn4yMqI+SR+CWw8kWnXd7Tlrohz9+ZWEj6uXc1Y6SfsuzYzHLKxfMkIpE UDlosFiKhw1WluV6Q4C9gLwKWBTcT3k+PxoVowJWzwv7e0/oVLvvIOmU73ZFk3lDs8pR Rra+Vr3u3zmxvZxfzQS64cKoDwImzUyL7ipRclXVDoWfTc7IfxxVOzIgJjp4/NOJ0Vr7 kVXq8107ttzkD8/lNTS40rbRbfA1UVVYO2fdajYI5g5MQcPF8kZaGf9YZ6fprNa1rCQY FnPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=k05qtQ0R6xiFIc9dpLOFRtvRqdLaVK/oJkjT94BQKmo=; b=MW9+idVb0XgUd3IDNV2tmmnMc2dxHuxWO8toJHJvXhtXQCngmY/aHr2bpWetJdlMr0 uzlofRow/t38jGNvCw3GddtL6FZ2b4P47PQDaVQJwtOCEw1kRgNjSENQkVe7Z6HtwE2L SWRUlA0CA1m0bIWF/M/Dw+7tiszoafJRw/9lUqjm1M0rRO5raUztsxk5zk1R2zRXDJi8 PQ3U7pi+jjg2FVwsXCa3Tn1XyXGn7so8FkMLRM20DFxrMLqytizh3fwvBDMPRb7A1MBw 1aCr8J8PafSkdbq6aUW6DNRP3aU6q+Cyy1sQlm9jPuFLNMQma0dQtF8SRBsRmjjJwpCy HAtg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ds15si14429430ejc.14.2020.06.22.19.56.17; Mon, 22 Jun 2020 19:56:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732450AbgFWCxb (ORCPT + 99 others); Mon, 22 Jun 2020 22:53:31 -0400 Received: from mx2.suse.de ([195.135.220.15]:33056 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731873AbgFWCve (ORCPT ); Mon, 22 Jun 2020 22:51:34 -0400 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=20F=C3=A4rber?= To: linux-realtek-soc@lists.infradead.org Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, =?UTF-8?q?James=20Tai=20=5B=E6=88=B4=E5=BF=97=E5=B3=B0=5D?= , =?UTF-8?q?Stanley=20Chang=20=5B=E6=98=8C=E8=82=B2=E5=BE=B7=5D?= , Edgar Lee , =?UTF-8?q?Andreas=20F=C3=A4rber?= 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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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"; -- 2.26.2