Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp2483032rwb; Sat, 29 Jul 2023 07:40:35 -0700 (PDT) X-Google-Smtp-Source: APBJJlF3UnCtX7S0hbueid3Ex2G7zGgnk23NcC+yGzDiNs2WExpqAyoESvdO/xsW1DhZ0+eImYfd X-Received: by 2002:a17:902:a618:b0:1b1:9802:a31b with SMTP id u24-20020a170902a61800b001b19802a31bmr4660851plq.41.1690641635620; Sat, 29 Jul 2023 07:40:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690641635; cv=none; d=google.com; s=arc-20160816; b=xL1GWnxX8G3GhMzt/ykQrsNyr/bigpuVjYKWAmyTEWnCx4bGbTVEzd5jg9fSQm5yNq pB1Ve7VsYLkrmCCjdCf9rJChiQ4LWKMFKkC2pfiG2qviKhGRsWO/A4LbTgI4Oxx+ivM7 aoiLYrJ0WUQHz3RVKbojsmibSWdWsrTs32ofedijLC4mJTGNWPpfDq24f0mERSCKagbl tHQFp5qrgQ05wip/7krX5zpUmrnbHcwtRKqJfsW2AK+LHvca92LKzJ6TVMrPzN0MF5xO ybqKJUp9djPM2cE7vIRBJFOK67p7y1K2fYPSba084IPczuS/aJnq7YxebbDEkamNcgOt GqUg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=wpr63tUB9bl7NCtcSC/cknTWVMMZqD7akwFhnm/mca4=; fh=ifpYacT0KZQ30J86Uul59nuvdyFO+Oov/r6N4ooDcgc=; b=W3WdmrisrNLDyOGX0Ki0PxyFM6LpQJyVsVyThrazZShxZTFYe0AyTQsAsjODnTpBKI kbloyVsVWxV34RTtBv/UzbxEgsOk8mykn+FvsAfa+I4XsBfb9rLnEpWcyLouRiMWm7pr mf+dmlvqDu72QKJhyoSHCt74VbmAgBONIddLULTy3FlH3vjSO1U+rt+HuuFDZq76uqOC Ht9czJ3GOOdB03vicXFtgyjCktelVCotlkSJmZAzX0EXur70P8zkH7lEiaZSZlWI+cyP EJ2SOyVpotWGEthhAfqjp5SKZZ2PySlYy4O/QEveOdPiSMD8n2Q6G/zn83wSk4+eMXGW 3zqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b="nzrmwsC/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q12-20020a170902dacc00b001b864e277e1si229175plx.494.2023.07.29.07.40.23; Sat, 29 Jul 2023 07:40:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b="nzrmwsC/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231565AbjG2NpQ (ORCPT + 99 others); Sat, 29 Jul 2023 09:45:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39640 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231316AbjG2NpG (ORCPT ); Sat, 29 Jul 2023 09:45:06 -0400 Received: from mail-pf1-x42e.google.com (mail-pf1-x42e.google.com [IPv6:2607:f8b0:4864:20::42e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 402B03C04; Sat, 29 Jul 2023 06:44:39 -0700 (PDT) Received: by mail-pf1-x42e.google.com with SMTP id d2e1a72fcca58-68706d67ed9so1644709b3a.2; Sat, 29 Jul 2023 06:44:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1690638254; x=1691243054; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=wpr63tUB9bl7NCtcSC/cknTWVMMZqD7akwFhnm/mca4=; b=nzrmwsC/bqoPJk8triPLF/OkHJR5KSKI7f+cD4xuH2VdJmSw86hwPKf+4nX5ZbmLA0 GS1Czc1rP0JIGitD5+ylfT0gBihh24nkYjO0D95qGAoYFc5ahESWxF8FWy76dLzmmu/w InDx/ZkeobUpOcR2cwJrLGx5xAAJtHqHrPVLRFYRgl3mauOMj8hgm6R82QcsLPT6Lz/U fey6AFhbJm2h2NL9j/cobtlMs8iWMfLaMmfEtjWsfail2JN5ghhiEbttaiF+j0vOCSfc ShCiJBm/IXUefPrc0ROezsWpmjdwKY2QNi+nvx8YUTbs9i4VcTVGDe9esr3VSXTKYrj5 zWXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690638254; x=1691243054; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=wpr63tUB9bl7NCtcSC/cknTWVMMZqD7akwFhnm/mca4=; b=XOvLTgmPCLGO7HTlk3zuxc9hri6xAvoCS4kusQAdrclPMgYtyeaqZ+yWDI7Qy7xgnX yJPhpz3cbs/1/zPkEaPTiiQVOSyGuv0Mx4a57ml4uXV/aS2Y1D1mH4oSPqjpD4+toTRK m9TDcLjz2Qa0CixiM9awxBOcQB8W0LjR+et7i1QSdKDta4xKHjuuQnrvLvcz4ObyLmo8 8E+LpLEpNKnE8vcbAld6p9dzvIPD9XfJLtQxXWxc6aDDDIktQOyoJHlDquNyVWwL26+M YVhjUtSqDhu7/buRv7n0HplgVhOI5JqMibm4HyV2aCaMR5cvcGCXQwn6kGpl2++xhT/c eFpQ== X-Gm-Message-State: ABy/qLbGxgM+9UmfhSAybphmtU0Ghu0Vqsc3rvK+3Q6AILtqYN3AFfmX hvCeZqyNEO1MXkNqe3Z+hxlB2b0vFLou8w== X-Received: by 2002:a05:6a00:189d:b0:64a:2dd6:4f18 with SMTP id x29-20020a056a00189d00b0064a2dd64f18mr6675489pfh.13.1690638253856; Sat, 29 Jul 2023 06:44:13 -0700 (PDT) Received: from kelvin-ThinkPad-L14-Gen-1.. ([38.114.108.131]) by smtp.gmail.com with ESMTPSA id x13-20020aa793ad000000b006871bea2eeesm1257166pff.34.2023.07.29.06.44.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 29 Jul 2023 06:44:13 -0700 (PDT) From: Keguang Zhang To: linux-mips@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Thomas Bogendoerfer , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Keguang Zhang Subject: [PATCH 12/17] MIPS: loongson32: Convert RTC platform device to DT Date: Sat, 29 Jul 2023 21:43:13 +0800 Message-Id: <20230729134318.1694467-13-keguang.zhang@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230729134318.1694467-1-keguang.zhang@gmail.com> References: <20230729134318.1694467-1-keguang.zhang@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 Add RTC device node for Loongson-1 boards, and drop the legacy platform device and data accordingly. Signed-off-by: Keguang Zhang --- arch/mips/boot/dts/loongson/loongson1b.dtsi | 12 ++++++++++++ arch/mips/boot/dts/loongson/loongson1c.dtsi | 9 +++++++++ arch/mips/boot/dts/loongson/lsgz_1b_dev.dts | 4 ++++ arch/mips/boot/dts/loongson/smartloong_1c.dts | 4 ++++ arch/mips/loongson32/common/platform.c | 6 ------ arch/mips/loongson32/ls1b/board.c | 1 - arch/mips/loongson32/ls1c/board.c | 1 - 7 files changed, 29 insertions(+), 8 deletions(-) diff --git a/arch/mips/boot/dts/loongson/loongson1b.dtsi b/arch/mips/boot/dts/loongson/loongson1b.dtsi index 7b4914c358df..935e559016d6 100644 --- a/arch/mips/boot/dts/loongson/loongson1b.dtsi +++ b/arch/mips/boot/dts/loongson/loongson1b.dtsi @@ -132,6 +132,18 @@ phy1: ethernet-phy@0 { }; }; +&apb { + rtc: rtc@1fe64000 { + compatible = "loongson,ls1b-rtc"; + reg = <0x1fe64000 0x78>; + + interrupt-parent = <&intc0>; + interrupts = <24 IRQ_TYPE_LEVEL_HIGH>; + + status = "disabled"; + }; +}; + &gpio0 { ngpios = <31>; }; diff --git a/arch/mips/boot/dts/loongson/loongson1c.dtsi b/arch/mips/boot/dts/loongson/loongson1c.dtsi index 7204b829c801..f68bef1f65d3 100644 --- a/arch/mips/boot/dts/loongson/loongson1c.dtsi +++ b/arch/mips/boot/dts/loongson/loongson1c.dtsi @@ -88,6 +88,15 @@ ohci0: usb@1fe28000 { }; }; +&apb { + rtc: rtc@1fe64000 { + compatible = "loongson,ls1c-rtc"; + reg = <0x1fe64000 0x78>; + + status = "disabled"; + }; +}; + &gpio0 { ngpios = <32>; }; diff --git a/arch/mips/boot/dts/loongson/lsgz_1b_dev.dts b/arch/mips/boot/dts/loongson/lsgz_1b_dev.dts index 71838f867f8c..d3988d789c0f 100644 --- a/arch/mips/boot/dts/loongson/lsgz_1b_dev.dts +++ b/arch/mips/boot/dts/loongson/lsgz_1b_dev.dts @@ -63,6 +63,10 @@ &ohci0 { status = "okay"; }; +&rtc { + status = "okay"; +}; + &uart0 { status = "okay"; }; diff --git a/arch/mips/boot/dts/loongson/smartloong_1c.dts b/arch/mips/boot/dts/loongson/smartloong_1c.dts index 3277770c33fe..1b7741dcb87f 100644 --- a/arch/mips/boot/dts/loongson/smartloong_1c.dts +++ b/arch/mips/boot/dts/loongson/smartloong_1c.dts @@ -59,6 +59,10 @@ &ohci0 { status = "okay"; }; +&rtc { + status = "okay"; +}; + &uart0 { status = "okay"; }; diff --git a/arch/mips/loongson32/common/platform.c b/arch/mips/loongson32/common/platform.c index 3b984c805eb0..7d0120fe9a5b 100644 --- a/arch/mips/loongson32/common/platform.c +++ b/arch/mips/loongson32/common/platform.c @@ -16,12 +16,6 @@ #include #include -/* Real Time Clock */ -struct platform_device ls1x_rtc_pdev = { - .name = "ls1x-rtc", - .id = -1, -}; - /* Watchdog */ static struct resource ls1x_wdt_resources[] = { { diff --git a/arch/mips/loongson32/ls1b/board.c b/arch/mips/loongson32/ls1b/board.c index ecc405aa9016..59c70c7ffe1a 100644 --- a/arch/mips/loongson32/ls1b/board.c +++ b/arch/mips/loongson32/ls1b/board.c @@ -13,7 +13,6 @@ #include static struct platform_device *ls1b_platform_devices[] __initdata = { - &ls1x_rtc_pdev, &ls1x_wdt_pdev, }; diff --git a/arch/mips/loongson32/ls1c/board.c b/arch/mips/loongson32/ls1c/board.c index 29bc467fd149..4c2d44f9f6f2 100644 --- a/arch/mips/loongson32/ls1c/board.c +++ b/arch/mips/loongson32/ls1c/board.c @@ -6,7 +6,6 @@ #include static struct platform_device *ls1c_platform_devices[] __initdata = { - &ls1x_rtc_pdev, &ls1x_wdt_pdev, }; -- 2.39.2