From patchwork Fri Feb 23 07:23:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 1903108 X-Patchwork-Delegate: hauke@hauke-m.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=GP/VNLFU; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=prO24/o2; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Th1nk3G9zz23d2 for ; Fri, 23 Feb 2024 18:28:09 +1100 (AEDT) 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:Cc:To:Message-Id:MIME-Version:Subject: Date: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=aT/8icFougbQ1aCrxTru5fVRrgCjhsY/owBKzpb2yNY=; b=GP/VNLFUUGGUB0 6Dxiu8MyDZuc6wAFlGrUmLLl3ZgTJBbfyYl8mj+PBRu32bHMh+ZX0hoHA3u1z2n9KkCDsV1BXQfIy lLmCupvpMMVn9zL1ZqvDaKi4Y86JV2lgqcytDzk2etcPZ2mjcTeTm7Yvj2/7lIKmUNeF3K+oaEXSx jmh/210F72YHNl7sIUQtjdRHG7CnjqPUqp5weaQQUwoKH+h26fhBJU/MtUOQ3ceb6xUdikUHzcgXL YAS8l9rCm2Hc6ihKQXgIg3r+1SrXlQ7QN7rxTZW/VBhCVNSDMbR9FGEnMrbs6f5JarLc3XS/gJE35 gFx294KGjyTBpX3iOQig==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rdPuX-00000008Hkc-2FNz; Fri, 23 Feb 2024 07:24:15 +0000 Received: from mail-lf1-x135.google.com ([2a00:1450:4864:20::135]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rdPuS-00000008HiU-0wPr for openwrt-devel@lists.openwrt.org; Fri, 23 Feb 2024 07:23:54 +0000 Received: by mail-lf1-x135.google.com with SMTP id 2adb3069b0e04-512db550e3fso757865e87.2 for ; Thu, 22 Feb 2024 23:23:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708673030; x=1709277830; darn=lists.openwrt.org; h=cc:to:message-id:content-transfer-encoding:mime-version:subject :date:from:from:to:cc:subject:date:message-id:reply-to; bh=5nxKfFtFgDO8BYLJGxlxWxyVcbsrWtfOBANMtHVsdws=; b=prO24/o29JUSGBPkquEYSMoNBZC7usmnTH2A+C7/sGB0FXljjau3d9gE8eCEzVh1CN fcrY16GyZcVMtlhxzrGg6pkIWan1dm84lH1rq5QxnXGGERC4SZ/GSkFRs3/7STEyA2cz THz2HU8dTLTXbhsyGcJX1kKqJbtu6ezwDItdQ8gFLsNdqAAMv7CQ+Qus0RGyKnEIqITD Mn5zZy28mh8SpK4poQ0Uf8+0Cm8uNfqLfU6sdKJKXL2cwW5q8whKpWmxbHtKwpl/r6kg krSgIG7Wjh8OkDG9CD9hHWGgy5TUPTuDLL0RmuPyHnbvCHNDNzO6SJ6yKJllBywvR67N 8Fzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708673030; x=1709277830; h=cc:to:message-id:content-transfer-encoding:mime-version:subject :date:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=5nxKfFtFgDO8BYLJGxlxWxyVcbsrWtfOBANMtHVsdws=; b=fXOueWN/fIrU632z81yrqQ94wVN70W/DdvGjtBOLE/jRnciy7xfIorbuNDcdirFb/m BR1DJp9QSeJEyfMiOwDNChsVlXdeLV6mR1HCajC7LPrkI3/yqZihFLZx2IIvQFWzmq+2 DPRe+mbpB6YZZtY35WVXYEYY0WBUXOU5RSLWutLiA+mGZWPxCMKqQ00B4dCcp+sR5Vgo xTxBcjk0K4Gq3pcB/am+Q1Lh1+gMk/juC4lDuAh94Ixm6bXtVUMkOhk1jDDfcqCkEVpx 5XmTk/QJ+ZMDOwzJtaeMjgsF/cQrUeKQvFJ1sBJ8+5p45ktDu4iFIgalo1z13oGuCBTO fNgw== X-Forwarded-Encrypted: i=1; AJvYcCU9Y60flQHmmZ+NEjcn55BrdvU7wDhlvQq+g41YC/8Na3geF4YURpY+VCC/pOJWjky/oZZ7PtVFUKOj/Tx85mvtY674OZXxEKRxvohw0SZu X-Gm-Message-State: AOJu0YzvTyj2FwmEKAW8+BnOCdbLGn6fW9qCWgdhFfUs3ELIpgsJbQuM iEXpGlPFxSl7uqkC5GQsN4MQgINnFg+fcZiRIROT6NWOn9JiyeUDzmt/Umy3PGAbJhNdsg3FW4U A X-Google-Smtp-Source: AGHT+IE39AgEJGruAOGHd44sHbfG221eclLnYJefQNfjvsZCi1bm9gvyR7n9ghFsvzvf44xk+8XC4A== X-Received: by 2002:a05:6512:3285:b0:512:ce6c:1906 with SMTP id p5-20020a056512328500b00512ce6c1906mr801250lfe.50.1708673029658; Thu, 22 Feb 2024 23:23:49 -0800 (PST) Received: from [127.0.1.1] ([85.235.12.238]) by smtp.gmail.com with ESMTPSA id y11-20020a50e60b000000b00563d03030e8sm6133251edm.55.2024.02.22.23.23.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Feb 2024 23:23:49 -0800 (PST) From: Linus Walleij Date: Fri, 23 Feb 2024 08:23:47 +0100 Subject: [PATCH] kirkwood: Add Marvell RTC to all machines with nothing else MIME-Version: 1.0 Message-Id: <20240223-kirkwood-rtc-v1-1-1e6721233d8f@linaro.org> X-B4-Tracking: v=1; b=H4sIAAJI2GUC/6tWKk4tykwtVrJSqFYqSi3LLM7MzwNyDHUUlJIzE vPSU3UzU4B8JSMDIxMDIyMj3ezMouzy/PwU3aKSZF2L5MTUZEuDFDNz4xQloJaCotS0zAqwcdG xtbUApnmkgV4AAAA= To: Sungbo Eo , Michael Trinidad , Sander van Deijck , Christian Marangi , openwrt-devel@lists.openwrt.org Cc: Linus Walleij X-Mailer: b4 0.12.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240222_232352_528197_41AA43F9 X-CRM114-Status: GOOD ( 11.81 ) X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: The Kirkwood SoCs all have an onchip RTC that can hold the time over e.g. a reboot which will help if no NTP servers are available. Create a kernel module package for the Marvell RTC, and add it to all Kirkwood devices that do not have their own discrete battery-backed RTC. Adding it to platforms with a proper RTC is just surplus. Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:135 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.0 T_SCC_BODY_TEXT_LINE No description available. X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org The Kirkwood SoCs all have an onchip RTC that can hold the time over e.g. a reboot which will help if no NTP servers are available. Create a kernel module package for the Marvell RTC, and add it to all Kirkwood devices that do not have their own discrete battery-backed RTC. Adding it to platforms with a proper RTC is just surplus. All Kirkwoods have at least one RTC so add RTC to the features list for Kirkwood as well. Signed-off-by: Linus Walleij --- package/kernel/linux/modules/other.mk | 17 +++++++++++++++++ target/linux/kirkwood/Makefile | 2 +- target/linux/kirkwood/image/Makefile | 30 +++++++++++++++++------------- 3 files changed, 35 insertions(+), 14 deletions(-) --- base-commit: e222c8054c7f46192bc89ad1f3ab61b3861af8b9 change-id: 20240222-kirkwood-rtc-8caec90d673d Best regards, diff --git a/package/kernel/linux/modules/other.mk b/package/kernel/linux/modules/other.mk index 4a061974c333..e227fd6a0f98 100644 --- a/package/kernel/linux/modules/other.mk +++ b/package/kernel/linux/modules/other.mk @@ -578,6 +578,23 @@ endef $(eval $(call KernelPackage,rtc-isl1208)) +define KernelPackage/rtc-mv + SUBMENU:=$(OTHER_MENU) + TITLE:=Marvell SoC RTC support + DEFAULT:=m if ALL_KMODS && RTC_SUPPORT + KCONFIG:=CONFIG_RTC_DRV_MV \ + CONFIG_RTC_CLASS=y + FILES:=$(LINUX_DIR)/drivers/rtc/rtc-mv.ko + AUTOLOAD:=$(call AutoProbe,rtc-mv) +endef + +define KernelPackage/rtc-mv/description + Kernel module for Marvell SoC RTC. +endef + +$(eval $(call KernelPackage,rtc-mv)) + + define KernelPackage/rtc-pcf8563 SUBMENU:=$(OTHER_MENU) TITLE:=Philips PCF8563/Epson RTC8564 RTC support diff --git a/target/linux/kirkwood/Makefile b/target/linux/kirkwood/Makefile index 54f26281a497..424e699157bf 100644 --- a/target/linux/kirkwood/Makefile +++ b/target/linux/kirkwood/Makefile @@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk ARCH:=arm BOARD:=kirkwood BOARDNAME:=Marvell Kirkwood -FEATURES:=usb nand squashfs ramdisk +FEATURES:=rtc usb nand squashfs ramdisk CPU_TYPE:=xscale SUBTARGETS:=generic diff --git a/target/linux/kirkwood/image/Makefile b/target/linux/kirkwood/image/Makefile index 0fa14b89f32c..49d0124f43a0 100644 --- a/target/linux/kirkwood/image/Makefile +++ b/target/linux/kirkwood/image/Makefile @@ -105,7 +105,7 @@ define Device/cisco_on100 KERNEL_IN_UBI := UBINIZE_OPTS := -E 5 IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi - DEVICE_PACKAGES := kmod-mvsdio + DEVICE_PACKAGES := kmod-mvsdio kmod-rtc-mv SUPPORTED_DEVICES += on100 endef TARGET_DEVICES += cisco_on100 @@ -114,6 +114,7 @@ define Device/cloudengines_pogoe02 DEVICE_VENDOR := Cloud Engines DEVICE_MODEL := Pogoplug E02 DEVICE_DTS := kirkwood-pogo_e02 + DEVICE_PACKAGES := kmod-rtc-mv SUPPORTED_DEVICES += pogo_e02 endef TARGET_DEVICES += cloudengines_pogoe02 @@ -123,7 +124,7 @@ define Device/cloudengines_pogoplugv4 DEVICE_MODEL := Pogoplug V4 DEVICE_DTS := kirkwood-pogoplug-series-4 DEVICE_PACKAGES := kmod-ata-marvell-sata kmod-fs-ext4 kmod-mvsdio kmod-usb3 \ - kmod-gpio-button-hotplug + kmod-gpio-button-hotplug kmod-rtc-mv endef TARGET_DEVICES += cloudengines_pogoplugv4 @@ -145,7 +146,7 @@ define Device/endian_4i-edge-200 DEVICE_MODEL := 4i Edge 200 DEVICE_ALT0_VENDOR := Endian DEVICE_ALT0_MODEL := UTM Mini Firewall - DEVICE_PACKAGES := kmod-ath9k kmod-mvsdio wpad-basic-mbedtls + DEVICE_PACKAGES := kmod-ath9k kmod-mvsdio wpad-basic-mbedtls kmod-rtc-mv KERNEL_SIZE := 4096k IMAGES := sysupgrade.bin endef @@ -154,13 +155,14 @@ TARGET_DEVICES += endian_4i-edge-200 define Device/globalscale_sheevaplug DEVICE_VENDOR := Globalscale DEVICE_MODEL := Sheevaplug - DEVICE_PACKAGES := kmod-mvsdio + DEVICE_PACKAGES := kmod-mvsdio kmod-rtc-mv endef TARGET_DEVICES += globalscale_sheevaplug define Device/iom_iconnect-1.1 DEVICE_VENDOR := Iomega DEVICE_MODEL := Iconnect + DEVICE_PACKAGES := kmod-rtc-mv DEVICE_DTS := kirkwood-iconnect SUPPORTED_DEVICES += iconnect endef @@ -171,7 +173,7 @@ define Device/iom_ix2-200 DEVICE_MODEL := StorCenter ix2-200 DEVICE_DTS := kirkwood-iomega_ix2_200 DEVICE_PACKAGES := kmod-ata-marvell-sata kmod-fs-ext4 \ - kmod-gpio-button-hotplug kmod-hwmon-lm63 + kmod-gpio-button-hotplug kmod-hwmon-lm63 kmod-rtc-mv PAGESIZE := 512 SUBPAGESIZE := 256 BLOCKSIZE := 16k @@ -189,7 +191,7 @@ define Device/iom_ix4-200d DEVICE_MODEL := StorCenter ix4-200d DEVICE_PACKAGES := kmod-ata-marvell-sata kmod-fs-ext4 \ kmod-gpio-button-hotplug kmod-gpio-nxp-74hc164 \ - kmod-hwmon-adt7475 kmod-mvsdio kmod-spi-gpio + kmod-hwmon-adt7475 kmod-mvsdio kmod-spi-gpio kmod-rtc-mv PAGESIZE := 512 SUBPAGESIZE := 256 BLOCKSIZE := 16k @@ -207,7 +209,7 @@ define Device/iptime_nas1 DEVICE_MODEL := NAS1 DEVICE_PACKAGES := kmod-ata-marvell-sata kmod-fs-ext4 \ kmod-gpio-button-hotplug kmod-gpio-pca953x kmod-hwmon-drivetemp \ - kmod-hwmon-gpiofan kmod-usb-ledtrig-usbport -uboot-envtools + kmod-hwmon-gpiofan kmod-usb-ledtrig-usbport kmod-rtc-mv -uboot-envtools KERNEL := $$(KERNEL) | iptime-naspkg nas1 BLOCKSIZE := 256k IMAGE_SIZE := 15872k @@ -219,7 +221,8 @@ TARGET_DEVICES += iptime_nas1 define Device/linksys DEVICE_VENDOR := Linksys - DEVICE_PACKAGES := kmod-mwl8k wpad-basic-mbedtls kmod-gpio-button-hotplug + DEVICE_PACKAGES := kmod-mwl8k wpad-basic-mbedtls kmod-gpio-button-hotplug \ + kmod-rtc-mv KERNEL_IN_UBI := UBINIZE_OPTS := -E 5 IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi @@ -272,7 +275,7 @@ define Device/raidsonic_ib-nas62x0 DEVICE_VENDOR := RaidSonic DEVICE_MODEL := ICY BOX IB-NAS62x0 DEVICE_DTS := kirkwood-ib62x0 - DEVICE_PACKAGES := kmod-ata-marvell-sata kmod-fs-ext4 + DEVICE_PACKAGES := kmod-ata-marvell-sata kmod-fs-ext4 kmod-rtc-mv SUPPORTED_DEVICES += ib62x0 endef TARGET_DEVICES += raidsonic_ib-nas62x0 @@ -281,7 +284,7 @@ define Device/seagate_blackarmor-nas220 DEVICE_VENDOR := Seagate DEVICE_MODEL := Blackarmor NAS220 DEVICE_PACKAGES := kmod-hwmon-adt7475 kmod-fs-ext4 kmod-ata-marvell-sata \ - mdadm kmod-gpio-button-hotplug + mdadm kmod-gpio-button-hotplug kmod-rtc-mv PAGESIZE := 512 SUBPAGESIZE := 256 BLOCKSIZE := 16k @@ -292,6 +295,7 @@ TARGET_DEVICES += seagate_blackarmor-nas220 define Device/seagate_dockstar DEVICE_VENDOR := Seagate DEVICE_MODEL := FreeAgent Dockstar + DEVICE_PACKAGES := kmod-rtc-mv SUPPORTED_DEVICES += dockstar endef TARGET_DEVICES += seagate_dockstar @@ -299,7 +303,7 @@ TARGET_DEVICES += seagate_dockstar define Device/seagate_goflexnet DEVICE_VENDOR := Seagate DEVICE_MODEL := GoFlexNet - DEVICE_PACKAGES := kmod-ata-marvell-sata kmod-fs-ext4 + DEVICE_PACKAGES := kmod-ata-marvell-sata kmod-fs-ext4 kmod-rtc-mv SUPPORTED_DEVICES += goflexnet endef TARGET_DEVICES += seagate_goflexnet @@ -307,7 +311,7 @@ TARGET_DEVICES += seagate_goflexnet define Device/seagate_goflexhome DEVICE_VENDOR := Seagate DEVICE_MODEL := GoFlexHome - DEVICE_PACKAGES := kmod-ata-marvell-sata kmod-fs-ext4 + DEVICE_PACKAGES := kmod-ata-marvell-sata kmod-fs-ext4 kmod-rtc-mv SUPPORTED_DEVICES += goflexhome endef TARGET_DEVICES += seagate_goflexhome @@ -316,7 +320,7 @@ define Device/zyxel_nsa310b DEVICE_VENDOR := ZyXEL DEVICE_MODEL := NSA310b DEVICE_PACKAGES := kmod-ata-marvell-sata kmod-r8169 kmod-fs-ext4 \ - kmod-gpio-button-hotplug kmod-hwmon-lm85 + kmod-gpio-button-hotplug kmod-hwmon-lm85 kmod-rtc-mv SUPPORTED_DEVICES += nsa310b endef TARGET_DEVICES += zyxel_nsa310b