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: 1188493 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=suse.de Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 475JST6Kr6z9sPT for ; Sun, 3 Nov 2019 12:36:57 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727364AbfKCBgy (ORCPT ); Sat, 2 Nov 2019 21:36:54 -0400 Received: from mx2.suse.de ([195.135.220.15]:59408 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727346AbfKCBgy (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 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 Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, =?utf-8?q?Andreas_F=C3=A4rber?= , Rob Herring , Mark Rutland , devicetree@vger.kernel.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 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.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: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: 1188495 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=suse.de Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 475JT35Ptrz9sR8 for ; Sun, 3 Nov 2019 12:37:27 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727480AbfKCBg4 (ORCPT ); Sat, 2 Nov 2019 21:36:56 -0400 Received: from mx2.suse.de ([195.135.220.15]:59452 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727346AbfKCBg4 (ORCPT ); Sat, 2 Nov 2019 21:36:56 -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 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 Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, =?utf-8?q?Andreas_F=C3=A4rber?= , Rob Herring , Mark Rutland , devicetree@vger.kernel.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 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.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: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: 1188494 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=suse.de Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 475JSq21yTz9sR1 for ; Sun, 3 Nov 2019 12:37:15 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727590AbfKCBhF (ORCPT ); Sat, 2 Nov 2019 21:37:05 -0400 Received: from mx2.suse.de ([195.135.220.15]:59462 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727488AbfKCBg5 (ORCPT ); Sat, 2 Nov 2019 21:36:57 -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 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 Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, =?utf-8?q?Andreas_F=C3=A4rber?= , Rob Herring , Mark Rutland , devicetree@vger.kernel.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 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.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>; + }; ...