From patchwork Wed Sep 13 15:16:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Romain Perier X-Patchwork-Id: 13383293 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1BD8DEDEC70 for ; Wed, 13 Sep 2023 15:17:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; 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=s6PFCDKsfxkaInPNpJN4CJ3vaG4Ow85eL06K1Jl8Il0=; b=VDUTPo3izlHScF b3MXB7DqMVxXw/7Zs9WbeTOnimzUAPt6xTb+tXZPPN/BHCCP8ADHRIHm1c8+UxLiQuanfTqz0dN4N hUOVe5MVq4L4d9QgUeuba8eDBYMfgb5RLyHaYlMKD8eMtjzjVMiEJDySF/zO04mISLrhIlFA0bGuQ tYT2F6vCKjeFppT+bJFzpGiNXrJS88RxP+yy3oTfDI9vNEGZtL4gxGeUI8vU3gDa+Ru3ufkgNIOhl 3GSO1lNfWfs1rhxu7vgWoJ7JmXXsni+tnTsgTAf2KenxKNppOC5Muvt8gmZ+XGuUUNmmoIH+6uobe Ln7I4QZSP3WlyiUTgL7A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qgRbQ-006CBK-0N; Wed, 13 Sep 2023 15:16:28 +0000 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qgRbN-006C9e-23 for linux-arm-kernel@lists.infradead.org; Wed, 13 Sep 2023 15:16:27 +0000 Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-401d10e3e54so75340435e9.2 for ; Wed, 13 Sep 2023 08:16:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1694618181; x=1695222981; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=+wHlb4TZdTg18dIQRSMHj1vLV5U+xhED8U8Tcp/nIAY=; b=nUGjx+RDOPtvEaMCQKW0szhRx65eYrLLtsnlxVw4rMHYgtJBRbnQp28jextKvU9xV7 OCUDWMG30UgwFakER5NRMXKzm2gpE1PFhhMv3ow2YqneKzh+97A9pmNXYPhO821m+z7J LgovymIPdG4aGQ2bXhfL5a+uX8LqRZopOC6M51SeG25H04dQXDdZM0GuQbNRVW6Z2mgw NxTZv+jAUmqmu61L9w9MhW4QHiTadoPwdbQz7+mNYCg+huqwinNQJfDekQpH8aDO93Eu PD1UnmrbL1NvzRk56iH50W7WZOOlbg7ifZ+jj1VyRTFVSChfdVlKUs5QM4PA/H0fqSKZ 34WQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694618181; x=1695222981; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=+wHlb4TZdTg18dIQRSMHj1vLV5U+xhED8U8Tcp/nIAY=; b=jSigu815JjdSGwuqjxHy4phvAIm3+YaOePQ+J0yxUKxjhKSpkE37EzKIObICvhl8Qd 3XrnfoqY8tSwy42rqWrtuIaQlDLLPFasYxIRHekeXtecxHoXWJlFMfJKvxskQYUyyZwi 5eBWXM3R2fZLnEeEeJbJmaDlBH83nb1Kf+0NNG357KAvOSm7fESN9/sm5w9oT2mBrRI8 ouchi8MugYD8TRCfwOIwIRkfw1fe+xQdD51u6FwxfXgQw/6sZ225BucM5G+0x7vEuJK7 QuZS/IQLPLNigT1NyXKK84TnvIwvQVBaaCtpyMpf6zLJVfMxVznR/zPheZxDbcG6C9mk 4+yA== X-Gm-Message-State: AOJu0YxXySYq+ybnIRrvWUiPaNFvrP9pXxcFROQ/tL3y4naayGIDeqgH i+kQGeVuG3lRh6gRTRB5n53q7dBqWPbi9g== X-Google-Smtp-Source: AGHT+IHDFXk9pLwaVNEfoWDOMr0cNYlA7ShKyzzr1OimlPOFw7rJqT0nMt26qj4IyJRDn5otb6IwgA== X-Received: by 2002:a7b:c416:0:b0:403:bb04:2908 with SMTP id k22-20020a7bc416000000b00403bb042908mr2217447wmi.23.1694618180871; Wed, 13 Sep 2023 08:16:20 -0700 (PDT) Received: from debby ([2a01:e0a:a6d:a8d0:7ff4:8f61:5574:9f95]) by smtp.gmail.com with ESMTPSA id w18-20020a5d6092000000b0031c52e81490sm15886631wrt.72.2023.09.13.08.16.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Sep 2023 08:16:20 -0700 (PDT) From: Romain Perier To: Alessandro Zummo , Alexandre Belloni , Daniel Palmer , Romain Perier , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: linux-rtc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 0/3] Add RTC for MStar SSD20xD SoCs Date: Wed, 13 Sep 2023 17:16:03 +0200 Message-Id: <20230913151606.69494-1-romain.perier@gmail.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230913_081625_674671_70010D0F X-CRM114-Status: GOOD ( 19.07 ) 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 patches series adds a new driver for the RTC found in the Mstar SSD202D SoCs. It adds a basic rtc driver, the corresponding devicetree bindings. The rtctest (from selftests) has been passed on this driver, with the following output: # rtctest TAP version 13 1..8 # Starting 8 tests from 1 test cases. # RUN rtc.date_read ... # rtctest.c:52:date_read:Current RTC date/time is 17/05/2023 15:58:12. # OK rtc.date_read ok 1 rtc.date_read # RUN rtc.date_read_loop ... # rtctest.c:95:date_read_loop:Continuously reading RTC time for 30s (with 11ms breaks after every read). # rtctest.c:122:date_read_loop:Performed 888 RTC time reads. # OK rtc.date_read_loop ok 2 rtc.date_read_loop # RUN rtc.uie_read ... # rtctest.c:137:uie_read:skip update IRQs not supported. # OK rtc.uie_read ok 3 rtc.uie_read # RUN rtc.uie_select ... # rtctest.c:166:uie_select:skip update IRQs not supported. # OK rtc.uie_select ok 4 rtc.uie_select # RUN rtc.alarm_alm_set ... # rtctest.c:214:alarm_alm_set:skip alarms are not supported. # OK rtc.alarm_alm_set ok 5 rtc.alarm_alm_set # RUN rtc.alarm_wkalm_set ... # rtctest.c:274:alarm_wkalm_set:skip alarms are not supported. # OK rtc.alarm_wkalm_set ok 6 rtc.alarm_wkalm_set # RUN rtc.alarm_alm_set_minute ... # rtctest.c:324:alarm_alm_set_minute:skip alarms are not supported. # OK rtc.alarm_alm_set_minute ok 7 rtc.alarm_alm_set_minute # RUN rtc.alarm_wkalm_set_minute ... # rtctest.c:384:alarm_wkalm_set_minute:skip alarms are not supported. # OK rtc.alarm_wkalm_set_minute ok 8 rtc.alarm_wkalm_set_minute # PASSED: 8 / 8 tests passed. # Totals: pass:8 fail:0 xfail:0 xpass:0 skip:0 error:0 Changes since v1: - Changed the compatible from mstar,ssd20xd-rtc to mstar,ssd20d-rtc. So the driver, its documentation and the commit messages have been reworked accordingly. - Re-worked the dt-binding, I have also simplified the commit message - Re-worked the commit message for the driver - Remove redundant logging message for the user in the driver, as requested by the subsystem maintainer. As these messages are helpful for debugging purpose, I have switched these to dev_dbg(). - Updated the list of maintainers (sorry for that). Romain Perier (3): rtc: Add support for the SSD202D RTC dt-bindings: rtc: Add Mstar SSD202D RTC ARM: dts: mstar: Enable rtc for SSD202D .../bindings/rtc/mstar,ssd202d-rtc.yaml | 35 +++ .../boot/dts/sigmastar/mstar-infinity2m.dtsi | 5 + drivers/rtc/Kconfig | 11 + drivers/rtc/Makefile | 1 + drivers/rtc/rtc-ssd202d.c | 249 ++++++++++++++++++ 5 files changed, 301 insertions(+) create mode 100644 Documentation/devicetree/bindings/rtc/mstar,ssd202d-rtc.yaml create mode 100644 drivers/rtc/rtc-ssd202d.c