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: 178374 Delivered-To: patch@linaro.org Received: by 2002:a92:409a:0:0:0:0:0 with SMTP id d26csp2570390ill; Sat, 2 Nov 2019 18:37:40 -0700 (PDT) X-Google-Smtp-Source: APXvYqym0TPCwXCrqdB9z7zGQYDovNom2UMO4useX2CugZ3xMCNxKybeSIfbYG2hJrxCfffFmWio X-Received: by 2002:a17:906:5004:: with SMTP id s4mr17550675ejj.26.1572745060834; Sat, 02 Nov 2019 18:37:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572745060; cv=none; d=google.com; s=arc-20160816; b=jEJ0jbVPWYsOVwLnAFlRw5ajOE0jTzq6aaKtNArcfZSyf2avwSKPWUU7zkW/fW4zQl jV7U9VfedP0XRY4vexZ/EUX46yTxOaMDMntjyrk1StP+pNRMkCP3lSGKp6C6OMVJYtiM MVwq7QVgeNGYI1juBIlPYMIFtMw/qBwR3wWl3bs7n1qwcVw+AiCxik+NUTal67sIFyKJ xdAor8U9pAVxs8Vnm4Z8q+xGHZDwFRmKSizhiTJu3/gAiQmyhKVWpRIQSjbJoMSgvVib u3yqFFymOU2ZGePtI05KG0bSEFHBqwzgKH4vS/1yxToszFVtzfvZfVmWGh3p0/BsGwHa IyQg== 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 :message-id:date:subject:cc:to:from; bh=r26h3CLXZPBt2QJUSgncttI3xi0fvrnLWyclpKKiDQM=; b=0BFr8tW50UPBH7n6X2Mry5UJTrPn/3L3TPdSq8IEB/XivSf7fjFMh7I3YWethebYY+ 1uyUpYqqV1owet+zQlJBCjqUzodzp38DEtiDiOVa8tqGimuP20HryabrlLE9DKPsm2T6 uviXzTOY9sL7d/7cghBLJR4Ipe04x4hvUvPOM/89xLw+iyh8nAgtHVnRch4ynwhL4iIL GsCrzlA2unv1ELj7v3fSmX6561pe0JJNANXKaNfhpanZPhNaqa1IPECHiH1G4msOQvEN 3V9eMJ0u52TFUCwpKGHffiuyH21jPkR+l2niKbriizIswu09aMf2zzpRR50anxY+lH6Q 88lg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b22si322725ejv.159.2019.11.02.18.37.40; Sat, 02 Nov 2019 18:37:40 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727715AbfKCBhh (ORCPT + 26 others); Sat, 2 Nov 2019 21:37:37 -0400 Received: from mx2.suse.de ([195.135.220.15]:59400 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727335AbfKCBgy (ORCPT ); Sat, 2 Nov 2019 21:36:54 -0400 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 Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, =?utf-8?q?Andreas_F=C3=A4rber?= , devicetree@vger.kernel.org, Rob Herring 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 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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 -- 2.16.4