From patchwork Tue Jun 23 02:50:37 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: 11619613 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 A0F576C1 for ; Tue, 23 Jun 2020 02:53: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 78BDA20786 for ; Tue, 23 Jun 2020 02:53: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="VRbQp2MV"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="I87UW92z" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 78BDA20786 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: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=+FDaHmiitlfFW4tw/jndnXtldI3AUC0aIo5n4dLcL8w=; b=VRbQp2MVXD58Mf6KQkHEkCLde+ +Pq7aF7MXB4rkVIuEGEYsRY0L14ia86lzsyNElTPHy8y1NhM1xWGqk/JNklSG6RVdon3tQZmV0N+B UKqbDeY22DSRV5nMdkmOV+rSPh6SkM03XWc6oOFfzxYz3e6vUIgu1EGUk5N3LR3Fl7B8B2C5+rrEj YjbUmKpHal+S0nMs+qvdGB2OGUyA6bDIXhvZwrzm3rVHAsVZ7h5w2MGLqWl1XvGXpsY12hSEQS3hp EovNHYawycithhSFURlugMa5ALGer77Gwj9VRiVVn9B/PsUvUV+Qao1BzhjS7snXq41or3nHTdeme S+AujyzA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jnZ2A-0001lM-HB; Tue, 23 Jun 2020 02:51:38 +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 1jnZ27-0001kO-Kw; Tue, 23 Jun 2020 02:51: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:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:In-Reply-To:References; bh=acWXCoQMlkroVWiqLZqhkwSnApEmVXqgAv8WAJOyFKE=; b=I87UW92z7CyBcl2pCFDRxOQJ6F vXZzcuM7glEBP69yOVYMk1aAcoWMO64Pp9kE+B5jD1jJHb+aSYaEhuI/vZzL28h3Q01sy7JxGVnMl tIE5J6/7C6lLeFogH+D1Cl1E6B3KlbTCAdBDUFfFmPR8G3PhmCc/gmx8CI4Wf19aWhr2yNY/oe39S gQtZOyvpT6lJufq/MiZW7zJjDVpr8w0CnsAoZI0FQRY7ydy1w+ZmIyLkjsJCGSjeb3s6wu3utsfW/ MyPMV9h9O76Mo60IHVJPszV5NOeEhIPPfvVzXfSU+3xdkuD2cJI5/wAl3jmLWpyGVdIvnZ6FAgH1/ z+iG5woQ==; Received: from mx2.suse.de ([195.135.220.15]) by casper.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jnZ23-0005LN-J1; Tue, 23 Jun 2020 02:51: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 1833EAE33; 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 00/29] ARM: Realtek DHC SoC info Date: Tue, 23 Jun 2020 04:50:37 +0200 Message-Id: <20200623025106.31273-1-afaerber@suse.de> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200623_035132_243451_425C09C2 X-CRM114-Status: GOOD ( 13.96 ) 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] 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [195.135.220.15 listed in wl.mailspike.net] -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==?= , hp@ligomedia.com, =?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 Hello, This series adds a soc bus driver for Realtek Digital Home Center SoC families. v2 is rebased on syscon and RTD1319, adjusts field widths and incorporates data additions from Stanley's monolithic patch. The previous RFC's reg hack is superseded in v2 with a trivial read-only eFuse driver, along with an extension of the nvmem consumer API. Reminder: For RTD1293 I had to invent my own detection logic, possibly flawed. Nor have the names of the magic register bits been disclosed. We have no RTD1294 nor RTD1392 DT in mainline, so their detection is included mainly as proof of concept. No EVB names were visible in public BSP sources; Ligomedia seems the only vendor so far with publicly announced RTD1392 STBs, for RTD1294 I only find one all-Chinese page and some Russian forum posts - patches and testing welcome. Otherwise we can only test that the other models are not misdetected as RTD1392 or RTD1294. DHC upstreaming progress is being tracked at: https://en.opensuse.org/HCL:Realtek_DHC Latest experimental patches at: https://github.com/afaerber/linux/commits/rtd1295-next Have a lot of fun! Cheers, Andreas v1 -> v2: * Cleaned up binding schema (Rob) * Rebased onto syscon mfd refactoring of containing SB2, Iso, etc. * Limit chip id and rev to 16 bits, as per old header files * Include mentioned RTD1395, RTD1619 and RTD1319 patches * Incorporate RTD1392 and RTD1319 bits from Stanley's API export patch * Add eFuse nvmem driver and adopt and extend nvmem cell API Cc: devicetree@vger.kernel.org Cc: Rob Herring Cc: Srinivas Kandagatla Cc: James Tai Cc: Stanley Chang [昌育德] Cc: Edgar Lee Cc: hp@ligomedia.com Andreas Färber (27): dt-bindings: soc: Add Realtek RTD1195 chip info binding soc: Add Realtek DHC 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: Add iso-syscon property soc: realtek: chip: Detect RTD1296 arm64: dts: realtek: rtd129x: Extend chip-info reg with CHIP_INFO1 soc: realtek: chip: Detect RTD1293 soc: realtek: chip: Add RTD1395 info arm64: dts: realtek: rtd139x: Add chip info node soc: realtek: chip: Add RTD1619 info arm64: dts: realtek: rtd16xx: Add chip info node soc: realtek: chip: Add RTD1319 info arm64: dts: realtek: rtd13xx: Add chip info node dt-bindings: nvmem: Add Realtek RTD1195 eFuse nvmem: Add Realtek DHC eFuse driver ARM: dts: rtd1195: Add eFuse node arm64: dts: realtek: rtd129x: Add eFuse node arm64: dts: realtek: rtd139x: Add eFuse node arm64: dts: realtek: rtd16xx: Add eFuse node arm64: dts: realtek: rtd13xx: Add eFuse node dt-bindings: soc: realtek: rtd1195-chip: Allow nvmem-cells property arm64: dts: realtek: rtd129x: Add eFuse package_id to chip-info soc: realtek: chip: Detect RTD1294 nvmem: core: Grammar fixes for help text nvmem: core: Add nvmem_cell_read_u8() soc: realtek: chip: Adopt nvmem_cell_read_u8() helper Stanley Chang (2): soc: realtek: chip: Add RTD1319 revisions soc: realtek: chip: Detect RTD1392 .../bindings/nvmem/realtek,rtd1195-efuse.yaml | 53 ++++ .../soc/realtek/realtek,rtd1195-chip.yaml | 55 ++++ MAINTAINERS | 4 + arch/arm/boot/dts/rtd1195.dtsi | 13 + arch/arm64/boot/dts/realtek/rtd129x.dtsi | 23 ++ arch/arm64/boot/dts/realtek/rtd139x.dtsi | 15 +- arch/arm64/boot/dts/realtek/rtd13xx.dtsi | 15 + arch/arm64/boot/dts/realtek/rtd16xx.dtsi | 15 + drivers/nvmem/Kconfig | 9 + drivers/nvmem/Makefile | 2 + drivers/nvmem/core.c | 27 +- drivers/nvmem/rtk-dhc-efuse.c | 86 ++++++ drivers/soc/Kconfig | 1 + drivers/soc/Makefile | 1 + drivers/soc/realtek/Kconfig | 13 + drivers/soc/realtek/Makefile | 2 + drivers/soc/realtek/chip.c | 269 ++++++++++++++++++ include/linux/nvmem-consumer.h | 1 + 18 files changed, 597 insertions(+), 7 deletions(-) create mode 100644 Documentation/devicetree/bindings/nvmem/realtek,rtd1195-efuse.yaml create mode 100644 Documentation/devicetree/bindings/soc/realtek/realtek,rtd1195-chip.yaml create mode 100644 drivers/nvmem/rtk-dhc-efuse.c create mode 100644 drivers/soc/realtek/Kconfig create mode 100644 drivers/soc/realtek/Makefile create mode 100644 drivers/soc/realtek/chip.c