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: 191414 Delivered-To: patch@linaro.org Received: by 2002:a92:1f07:0:0:0:0:0 with SMTP id i7csp1590207ile; Mon, 22 Jun 2020 19:53:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwxzOEip4WjOqqeshuBluc5w7rEuQ3Mft3m5Kq7/6eVQXqUj9pYP3DXxHaCq3apt/w53jIq X-Received: by 2002:a17:906:e2d5:: with SMTP id gr21mr17709430ejb.219.1592880826843; Mon, 22 Jun 2020 19:53:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592880826; cv=none; d=google.com; s=arc-20160816; b=Mq70VGqLewb3+HAbsCiRfpUs4M4whiV9N0kqT9SykD98DhBN5AGDCuAGSEgv4QsXaI lZXoL8prq9CzKBOlUhuc6pKdhF2Bh2UqcdbIAAfOBy4fZhRMRcXfTqWVYXGFGXS4Vme5 8q8E/Z0l2bciVhZdQQs4awaupgSQQht7daqf0Cpa6SPaHQNJhJQvaWHg7DUf+TmDGOUD bQWXDL4pmbJ0qKmgerTkB20JhoOpekdPqK44TdGK9LjZ0rEzW7SM5bOFa6xims9IeUOJ vU6spwosxtqGPI6jUfS6YgjgNNNXLm4HtEcUJf0UH7wBMkfRbk3mEuYdqQqESRSO7xZ9 GSdw== 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=acWXCoQMlkroVWiqLZqhkwSnApEmVXqgAv8WAJOyFKE=; b=tbG+WdmcIPkb3xGh4BZI5uzT29UQhq8Li/9aGK4AvjkQoWXpyQi3FnZpp/ckxTLclX oOWi2XKzJbw1pP02OepN1L+lkfGBTXsbc4p624Wcv+K/9CmlHZpoaXRFUcaQzh+O/SnA 4lQ7+skWJxCG/vY/hZ8kBKjpK7GdNRlTjB1HexYtQ53MeKM1zpK1jjvC77ZJdhP9+K0r 6PJ56/TVqiC+sYN0KbGIzIMj/L0yj1lDktYCzT3OPsyfKPHgdxXLM44JOOE72zgULJ5i 5w+dZcmDJhFx+AqY+NKLp1wlB60YEjG85tmtkY/I0Jn4yqw2XpsQe/v/MZod8EVynSjH O40A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-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 l22si490302edv.546.2020.06.22.19.53.46; Mon, 22 Jun 2020 19:53:46 -0700 (PDT) Received-SPF: pass (google.com: domain of devicetree-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 devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731857AbgFWCvd (ORCPT + 6 others); Mon, 22 Jun 2020 22:51:33 -0400 Received: from mx2.suse.de ([195.135.220.15]:32908 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731434AbgFWCvb (ORCPT ); Mon, 22 Jun 2020 22:51:31 -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 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 Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, =?utf-8?b?SmFtZXMgVGFpIFvmiLTlv5fls7Bd?= , =?utf-8?b?U3RhbmxleSBDaGFuZyBb5piM6IKy5b63?= =?utf-8?q?=5D?= , Edgar Lee , =?utf-8?q?Andreas_F=C3=A4rber?= , devicetree@vger.kernel.org, Rob Herring , Srinivas Kandagatla , hp@ligomedia.com 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 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.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 -- 2.26.2