From patchwork Tue Mar 30 13:48:15 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cristian Ciocaltea X-Patchwork-Id: 12172617 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.7 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BBA9FC433C1 for ; Tue, 30 Mar 2021 13:52:59 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 4D85961994 for ; Tue, 30 Mar 2021 13:52:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4D85961994 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc: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=Oo/lO70o0ipodkZSpzc51gR/5fMxUGEshnTRHsxQpxM=; b=D0A+sBFG+0bwXm30usEVzg4nl3 FxLQMNjHyPv2W9iw6W3YpnUU8ekXEFSzT3SOgSp+VQgQZamBte/jjyjtWL1ag/hTcoP1EBxwiXs7m wBpDPjpOgDRmyBQVc5WVX1PGNjO5WYUj82wUqHy98vVcUlhkgFCS23J4XBTxEv+cMaY0jiN4pz9hX WRfSLJ6cZwiwMXJY0efgNZuLDjOeo/tbnotVaBavB+HthosvD+Lq/d8/ms9+VAwvew5yWWz5Kptil vtvBpz7w0PmMNE1C5B8fdCXiwCbl7ofRllmrkCUrQHIhFI6qH+jdUY/U05cxBO/g74BIn/Yp+YHKV za75dbTg==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lREmJ-003rvY-Cb; Tue, 30 Mar 2021 13:51:31 +0000 Received: from mail-ej1-x634.google.com ([2a00:1450:4864:20::634]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lREjL-003rcS-Gz; Tue, 30 Mar 2021 13:50:31 +0000 Received: by mail-ej1-x634.google.com with SMTP id hq27so24919696ejc.9; Tue, 30 Mar 2021 06:48:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=nHesdm8MfmQq/Mx8NCgtXN0WgABESjsUY5mxQL3k6c0=; b=HU+nGVhHLhCXmZLHy9oIKWEpLG2TT7397bG0JOVGqK++Lu3k5mhhHDMXAbhCdrPk4o NKp+l1J4f3QcUxOIfgD50GzqUtDg5l/lNIvrfRiPaPwad4JLOrT2D17wVDyK/Rxgc+oh 1LDnNAUYkXr6x+HO8aWwWn6Bc1b78+qBaBWAlAHbmRyO9C5KE7DzKXpYAcZ6T19ceewp 8nhL8D4jXyybEejBBS6y2CfseUAlgWtl6SJDz7cD77ZZ8Eye+EMnBGdYmIGjmxhkncYj +WGDYdMgCErgTSTUr0B16ngdNvAH8ZV8PpARH/iiQqYaNTnG2K5nkPv+FmxM3cSlz8iQ PcGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=nHesdm8MfmQq/Mx8NCgtXN0WgABESjsUY5mxQL3k6c0=; b=r7UdNXyl3sMNJtu0L69CxODlpFkeKVlzA6rirS4aSXtxElWpWQRFGNPh/PQOZnq2w+ InRshydj0beGvg0x9tTaI5eKMEkAGVgneAB0aq/8zGwIAuX175rrS/cyM7gvyNSOnRme z6bEvvBMhnnO/GHJNTl6u/z89FNGHtHNvH3gLyCcpNDArDAUU/D85vF+GrVhOFhh4yA9 hpNNiVxEtYWhbSYKVUMkOxWszbRgDPJtBe4FdSRE5Yz+8y5rHl34T5yNIPGyYLvm+AMy S0BXqqz5BR+iGzy+0AL8M0cxbYNuoYbo1mtozU1WXU7TwOUm8eWwMopMM/bMbl/OLZ9P SUoA== X-Gm-Message-State: AOAM530lUEWrKdtrVhn4SrqqR3CN0KwOsUD5EbHwx2f5Q+IDFuzrk3g/ hR3At6t2xtHc2niGXjsK0p4= X-Google-Smtp-Source: ABdhPJybuNlr/uWKtmzBSulIZS8xUoDGyJn5OtJZVqQ+xY3jp5m1fxhITb3prHky6PSlJwU9nUNSMw== X-Received: by 2002:a17:907:2d9f:: with SMTP id gt31mr33128669ejc.233.1617112104324; Tue, 30 Mar 2021 06:48:24 -0700 (PDT) Received: from localhost.localdomain ([188.24.140.160]) by smtp.gmail.com with ESMTPSA id l12sm11114681edb.39.2021.03.30.06.48.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Mar 2021 06:48:23 -0700 (PDT) From: Cristian Ciocaltea To: Rob Herring , =?utf-8?q?Andreas_F=C3=A4rber?= , Manivannan Sadhasivam Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-actions@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 0/6] Add support for Actions Semi Owl socinfo Date: Tue, 30 Mar 2021 16:48:15 +0300 Message-Id: X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210330_145027_709066_B3B597D6 X-CRM114-Status: GOOD ( 15.38 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This patchset adds a socinfo driver which provides information about Actions Semi Owl SoCs to user space via sysfs: machine, family, soc_id, serial_number. Please note the serial number is currently available only for the S500 SoC variant. This has been tested on the S500 SoC based RoseapplePi SBC. Thanks, Cristi Changes in v2: - Exposed the memory range for reading the SoC serial number under /reserved-memory DT node, according to Rob's review; as a consequence added a new binding document (actions,owl-soc-serial.yaml) and updated owl-socinfo.yaml - Replaced the unportable usage of system_serial_{low,high} globals with a public API to provide external access to SoC serial number parts (e.g. Owl Ethernet MAC driver will use this to generate a stable MAC address) - Rebased patch series on v5.12-rc5 Cristian Ciocaltea (6): dt-bindings: reserved-memory: Add Owl SoC serial number binding dt-bindings: soc: actions: Add Actions Semi Owl socinfo binding soc: actions: Add Actions Semi Owl socinfo driver arm: dts: owl-s500: Add reserved-memory range for Owl SoC serial number arm: dts: owl-s500: Add socinfo support MAINTAINERS: Add entries for Owl reserved-memory and socinfo bindings .../actions,owl-soc-serial.yaml | 53 ++++++ .../bindings/soc/actions/owl-socinfo.yaml | 57 +++++++ MAINTAINERS | 2 + arch/arm/boot/dts/owl-s500.dtsi | 13 +- drivers/soc/actions/Kconfig | 8 + drivers/soc/actions/Makefile | 1 + drivers/soc/actions/owl-socinfo.c | 152 ++++++++++++++++++ include/linux/soc/actions/owl-serial-number.h | 20 +++ 8 files changed, 305 insertions(+), 1 deletion(-) create mode 100644 Documentation/devicetree/bindings/reserved-memory/actions,owl-soc-serial.yaml create mode 100644 Documentation/devicetree/bindings/soc/actions/owl-socinfo.yaml create mode 100644 drivers/soc/actions/owl-socinfo.c create mode 100644 include/linux/soc/actions/owl-serial-number.h