From patchwork Sun Nov 3 01:36:34 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: 11224261 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 42E4F1599 for ; Sun, 3 Nov 2019 01:37:58 +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 2115720663 for ; Sun, 3 Nov 2019 01:37:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Xk5mxzWo" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2115720663 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: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:In-Reply-To:References: List-Owner; bh=+Riv30RBT8wlAcnNAHQS0afDGnCtPacFvSDai07k5l8=; b=Xk5mxzWo8aKavQ 342/fLdAU2z3/r8j6kPcFDqe7bI485sujS97Sd0qVBnPVyGOeU10VrCO/8DYgYe9KQDf3qIlNsdv7 q8dmxU8iLDUf2yu98yjOGHRfRlgKvNYjf7A1MIdek83t1USe20nhUP2XBnGSkP05+lZPfsM4QoEou GBFANdiIWbxowMxh8jqdLPAwfeOVtcEMWub3Z5SKTZVI+mJPVeJoCLbyQWS2/b1jvL8q5i59EynyU yVSkifAtspf6Lp++AEVRtN/maS7OidQSEk3GC4xkSfFAQw0Ld2mlSIE8C42VQd1oJsT8FZiLYKaLL Roq9xY7THdaaNxYc1TqQ==; 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 1iR4q2-0005sd-OK; Sun, 03 Nov 2019 01:37:54 +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-0004n7-Oa; 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 6EF21AF23; 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 00/11] ARM: Realtek RTD1195/RTD1295 SoC info Date: Sun, 3 Nov 2019 02:36:34 +0100 Message-Id: <20191103013645.9856-1-afaerber@suse.de> X-Mailer: git-send-email 2.16.4 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191102_183658_114458_3880C07F X-CRM114-Status: GOOD ( 12.84 ) 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: devicetree@vger.kernel.org, Rob Herring , 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 Hello, This series adds a soc bus driver for Realtek RTD1195 and RTD1295 SoC families. The detection magic for RTD1295 family was mostly borrowed from downstream code and the bit meanings are entirely undocumented. In case of RTD1293 I had to invent my own detection logic, possibly flawed. It is expected that this driver will need to be tweaked as new models emerge. One general consideration here is that some register accesses are not well self-contained within a block so that a syscon might in theory help - but for lack of documentation we don't really have an overview of the IP blocks and their names, starts and sizes; downstream trees just hardcoded addresses. I therefore split off the DT change to add a second/third reg entry for now, so that we could move ahead with a basic driver initially. We have no RTD1294 DT, so it is included here mainly for illustration of the unpredictable register dependencies affecting this binding/driver. Using reg-names might clean this up a little but would blow up the driver code as there appears to be no handy helper function provided. Finally, I've been struggling to find an overarching name for the SoC families. Realtek.com groups them as "Digital Home Center" - not sure whether that fits? For now I use Phoenix/Kylin/etc. with DHC only as fallback, but I wonder whether those family names should rather be soc_id than family contents? Prepared but not included here is: * RTD1395 family, which we don't have a DT for yet, * RTD1619 family, which we don't have a DT for yet, Chip ID to be verified, * RTD1319 family, which we don't have a DT for yet, with TODO for its Chip ID. Latest experimental patches at: https://github.com/afaerber/linux/commits/rtd1295-next Have a lot of fun! Cheers, Andreas Cc: devicetree@vger.kernel.org Cc: Rob Herring Andreas Färber (11): dt-bindings: soc: Add Realtek RTD1195 chip info binding soc: Add Realtek chip info driver for RTD1195 and RTD1295 arm64: dts: realtek: rtd129x: Add chip info node ARM: dts: rtd1195: Add chip info node dt-bindings: soc: realtek: rtd1195-chip: Extend reg property soc: realtek: chip: Detect RTD1296 arm64: dts: realtek: rtd129x: Extend chip-info reg with CHIP_INFO1 soc: realtek: chip: Detect RTD1293 dt-bindings: soc: realtek: rtd1195-chip: Extend reg node again soc: realtek: chip: Detect RTD1294 arm64: dts: realtek: rtd129x: Extend chip-info reg with efuse .../bindings/soc/realtek/realtek,rtd1195-chip.yaml | 47 +++++ MAINTAINERS | 1 + arch/arm/boot/dts/rtd1195.dtsi | 5 + arch/arm64/boot/dts/realtek/rtd129x.dtsi | 7 + drivers/soc/Kconfig | 1 + drivers/soc/Makefile | 1 + drivers/soc/realtek/Kconfig | 13 ++ drivers/soc/realtek/Makefile | 2 + drivers/soc/realtek/chip.c | 190 +++++++++++++++++++++ 9 files changed, 267 insertions(+) create mode 100644 Documentation/devicetree/bindings/soc/realtek/realtek,rtd1195-chip.yaml create mode 100644 drivers/soc/realtek/Kconfig create mode 100644 drivers/soc/realtek/Makefile create mode 100644 drivers/soc/realtek/chip.c