Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp1176496rdh; Mon, 25 Sep 2023 05:40:25 -0700 (PDT) X-Google-Smtp-Source: AGHT+IECE7PGN7GLufAhKKLJBf6HbKs4/wZBCDWeedRftn4bk7k8/v2RgsYC8/Nqr+QnL4x1cAc2 X-Received: by 2002:a05:6359:209:b0:143:8469:5cc7 with SMTP id ej9-20020a056359020900b0014384695cc7mr3885517rwb.2.1695645625102; Mon, 25 Sep 2023 05:40:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695645625; cv=none; d=google.com; s=arc-20160816; b=pzmDYVd1gvk34kuCsP2nHC1xZP+t8rlX7GzBs/RitcpVPvNCbuEQ8td9NYrd9IFy4j bzADgaS1ybqaOUc/4y7Bv0NbPwO5T88JkqxpynNFtrLUoAt2/hkAvtt3S4ETdINfih25 XE8mBJHWHxrwqa+bVoE6VkV5RiL7aSFzF/HCcpaXPRtubcDvpTOXPa3TFOckiHkqx+IM 81H86d8z/LDoyBZCfsVR/ccJo/LBsjSQwHI0dXCo6SdbAX9X5yKk2IJkWY6IrqmgaqC2 YBpP5IPp5jTOt/cJNJTiYVn5ZYKsPziNVQaLvuZwCpuZnybMQGdHs/4F1q+Y6VkKBf8J crTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=8aDz349SKKv9+MQGXfZ+z1/ikbG1yq6pnD7zJlqgtSM=; fh=Eui6Z0GVIy6H2TGTPR4D8MAlhSgDRYZf2Dadz9hLz30=; b=yFgaL00W0aNHYnRbRB8n63CREnpBeWzl5eFnMAxfXaCFvPoi4NHqHbs9dYD3qSQFX+ ERfYXjCxQpN//zNC37QST3bWwMxaRFoE15lOpIC+4abo09RXZeoO0Memr0rz+N6aVGbK sRIgokMXaQuhDkFm9bV+ai0lyo7bwkrnOfeqT3DhOcEzs572hI9U6+An2dPPU63toejv Pe30Ii1w85+WwhQEP80J0VGSqmUmSzsgpFvP0Wt0AUsGoTNQEZ/gjjhKW5KBOn9R02T7 U8nRr0dNiLQAs8MRG9vBGdsUHxzaURZWQVGMiPYZGgPkgzuwh17fMovq9aorKXMc3Pr7 1IPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=J+V3bpzy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id m127-20020a632685000000b0056949ba3f3fsi10616685pgm.253.2023.09.25.05.40.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Sep 2023 05:40:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=J+V3bpzy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 71D1580755C8; Mon, 25 Sep 2023 00:03:09 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232343AbjIYHDM (ORCPT + 99 others); Mon, 25 Sep 2023 03:03:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57068 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232320AbjIYHDJ (ORCPT ); Mon, 25 Sep 2023 03:03:09 -0400 Received: from mail-ot1-x334.google.com (mail-ot1-x334.google.com [IPv6:2607:f8b0:4864:20::334]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 015D6BF; Mon, 25 Sep 2023 00:03:01 -0700 (PDT) Received: by mail-ot1-x334.google.com with SMTP id 46e09a7af769-6c0a3a2cc20so3669852a34.0; Mon, 25 Sep 2023 00:03:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1695625381; x=1696230181; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=8aDz349SKKv9+MQGXfZ+z1/ikbG1yq6pnD7zJlqgtSM=; b=J+V3bpzy0mNtOz/q0k1jWsD9mRigO9qiVssqo/nhUe6grIYErEltxSTD0aj4g9BNE+ ZKXTlu3D7EoTdw/Iz21WglGGPpZ7RBj+4egF56I31/swnKnNR6o5OZqcF0mqNZJkoE0S zeNL3sSW5tEwrtl2n2JaRGXYskJB0cLESiIbDvFAxLM3DQvz0LZkuThpvNTS6OrrJ8rI hbjpQupjTn8IG09LyWQi9uqxZK+ZWPqgWSm24njc6uuMIHUUxm2pfKv556SBuMlTp9jI XVSa9VnO25aL6d1kxJxxJcEKzLC1vjoGq8Vw52LbusTeDlSC5rgbV+LCr+CfdmD2NCSg npeQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695625381; x=1696230181; 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=8aDz349SKKv9+MQGXfZ+z1/ikbG1yq6pnD7zJlqgtSM=; b=QYn2C6nNfU1eptX2TYheTu9H7V+1GIleDcjsBGkYF8YLqOOtveHBTOYFBUeKU4T8J7 /6s2yaMDXSvhGMBRBNy2RYN5LVG/pJLH+UDuJd5xEznCNJvjDNUVxIdyhUI0b4SL2mug 2p2wGhm9J+5nXyxWFtWQmbIFoIRmPgtrT1e2cBkprjtTBDVrSmHUahL7dkqfr6Q23IWA j45BpeuJ0jfpFO2RQ9oLBDK3DWFW9v4dOMm3+muIF72y3i9dq+3l2WyrG5cu8S4W6fIn Ml47YjewjYKvcOqLd5v29dfzL9ebSeBF6QeJqqpeOabSymM6L05tzFSaIEEQZl3zerP4 TC3g== X-Gm-Message-State: AOJu0YxT/gO66eZuaL3NkpNk2+yPfZZcr8kAyljik3RJ43GEopDUlFhd EXWvAiRG40sVIsKeTq0/rnYqKBL7JiA= X-Received: by 2002:a05:6830:c9:b0:6be:fe1e:c13 with SMTP id x9-20020a05683000c900b006befe1e0c13mr7754598oto.0.1695625380989; Mon, 25 Sep 2023 00:03:00 -0700 (PDT) Received: from a28aa0606c51.. (60-250-192-107.hinet-ip.hinet.net. [60.250.192.107]) by smtp.gmail.com with ESMTPSA id y5-20020a62b505000000b0068ffb8da107sm7349833pfe.212.2023.09.25.00.02.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Sep 2023 00:03:00 -0700 (PDT) From: Jacky Huang To: a.zummo@towertech.it, alexandre.belloni@bootlin.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org Cc: linux-rtc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, mjchen@nuvoton.com, schung@nuvoton.com, Jacky Huang Subject: [PATCH v4 0/3] Add support for Nuvoton ma35d1 rtc controller Date: Mon, 25 Sep 2023 07:02:48 +0000 Message-Id: <20230925070251.28-1-ychuang570808@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Mon, 25 Sep 2023 00:03:09 -0700 (PDT) From: Jacky Huang This patch series adds the rtc driver for the nuvoton ma35d1 ARMv8 SoC. It includes DT binding documentation, the ma35d1 rtc driver, and device tree updates. The ma35d1 rtc controller provides real-time and calendar messaging capabilities. It supports programmable time tick and alarm match interrupts. The time and calendar messages are expressed in BCD format. This rtc driver has been tested on the ma35d1 som board with Linux 6.5-rc2. It passed the rtctest and rtc-range 2000 ~ 2099. v4: This version is actually a resend of v3. - Updated drivers/rtc/Kconfig due to this file was modified in the recent mainline update. v3: - Update ma35d1 rtc driver - Renamed "TICKIEN" to "UIEN" as their functional equivalence. - Eliminated the usage of 'struct ma35_bcd_time' and associated ma35d1 bcd functions; instead, opted to directly utilize the "bin2bcd()" function - Employed "ma35d1_alarm_irq_enable()" to accommodate the "alrm->enabled" feature - Revised the probe sequence and implemented a check to verify if the rtc was initialized - Other minor fixes v2: - Updated nuvoton,ma35d1-rtc.yaml - Modified patch title and fixed typo - Added reference to rtc.yaml - Used unevaluatedProperties instead of additionalProperties - Modified rtc driver - Used dev_err_probe() - Removed ma35d1_rtc_remove() - Made other minor fixes Jacky Huang (3): dt-bindings: rtc: Add Nuvoton ma35d1 rtc arm64: dts: nuvoton: Add rtc for ma35d1 rtc: Add driver for Nuvoton ma35d1 rtc controller .../bindings/rtc/nuvoton,ma35d1-rtc.yaml | 48 +++ .../boot/dts/nuvoton/ma35d1-iot-512m.dts | 4 + .../boot/dts/nuvoton/ma35d1-som-256m.dts | 4 + arch/arm64/boot/dts/nuvoton/ma35d1.dtsi | 8 + drivers/rtc/Kconfig | 11 + drivers/rtc/Makefile | 1 + drivers/rtc/rtc-ma35d1.c | 324 ++++++++++++++++++ 7 files changed, 400 insertions(+) create mode 100644 Documentation/devicetree/bindings/rtc/nuvoton,ma35d1-rtc.yaml create mode 100644 drivers/rtc/rtc-ma35d1.c -- 2.34.1