Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp999452pxb; Fri, 22 Apr 2022 16:22:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw/SQtQfC4pUBke/MQCoy4MN0lbTUV14qC9ylPuPt+aAx3IVeNeTW4KrHKI0RwnUNojYHve X-Received: by 2002:a17:902:b582:b0:14c:a63d:3df6 with SMTP id a2-20020a170902b58200b0014ca63d3df6mr6954996pls.51.1650669765845; Fri, 22 Apr 2022 16:22:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650669765; cv=none; d=google.com; s=arc-20160816; b=NizF8wk4EwIZuJajVSYQShdzmOgDgnwp0egfblG5lbY44WN5jlzhDA6MqSZBKQdLMV JWebg+stYXiFh4ju1hbeWUdsy0OR32Q7temR+BhfO5bgVazsG9y9qzww5AegeXsQJ6Aw otdYitbQqEp1lNY+a2Pn4mRyOSnyW/quZ1AHTXFwgMMojiPOKyVtGxt05wUJwotuF/5C UUWZF6q8eVpRbez/n+ul4tykMLZxQZ7MgfQAQf96b8T6yiwMMAufK6CSI9ECt7J0NZcV RgmQ8qulyrCX8SSNg9AEjrqTW9yAiQ0E8Ws0cV+hTVZCoo5hgdiFfnRYw2cikhOMOuCP Xcow== 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=y6oeKn795SExBq5VpV0JHUaPNk0Jp0YryUXnsb5Aorc=; b=w4mV0csRcC3IDL3dvCknDJyPHs1dKm1iNAqODMfRR5MXXuZ2/CUHWS6LinqFXJ4WY/ sxYZooXRKuikHnUOvQH7AxYigcR/J/tRysL+EsgIKlxQZtYOZ1PJqRM6BAD0iSVoTVWe gi8r4yxnPbmJRmT2C/SOXqBeTUs2JIfbHbIsv5tgbQKxqgkg7Ds+FWkgTTK6yE1Xe7NT zaYWxyQbi7eV2T/9f0lhGBELdsy6EtNVtGRXqMkiiTon0g3+yIInmjg+o58fbN2hTBHO As6SRdWq5Jos3ZMC3neSv4NDFalGoR47uAgGtA9tC/iWelcSsHWpYbfZ+MDCu73CzrKm 9sXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b=MrF6gSUs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmx.net Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id il11-20020a17090b164b00b001cba3b7d546si14259161pjb.188.2022.04.22.16.22.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Apr 2022 16:22:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b=MrF6gSUs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmx.net Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id DA437217621; Fri, 22 Apr 2022 15:40:31 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233287AbiDVWnN (ORCPT + 99 others); Fri, 22 Apr 2022 18:43:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43524 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234084AbiDVWm4 (ORCPT ); Fri, 22 Apr 2022 18:42:56 -0400 Received: from mout.gmx.net (mout.gmx.net [212.227.15.19]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 58C35214124; Fri, 22 Apr 2022 14:42:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1650663739; bh=FASJJR2Tx4uF4/s/WY7/LWoW20ycDshiMItQZbSs9bU=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date; b=MrF6gSUstM2zHBTkft9N0k3blkosRvqMDcnr9VfSgB9oE0Tk7dlp6H/3X/WJoySuP jjWEmtDakDxs0kIm/6IuW+ednbCRxCMKR6wxsa/M97RWFFNtorI/+SlFDXCCmTUPux jd/Xl67fKHd4mFmM315ulL76Men47npBl1g4TnZE= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from longitude ([87.78.190.74]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1Mlw3N-1o7vEZ2TLf-00izyL; Fri, 22 Apr 2022 20:31:44 +0200 From: =?UTF-8?q?Jonathan=20Neusch=C3=A4fer?= To: linux-clk@vger.kernel.org, openbmc@lists.ozlabs.org Cc: linux-kernel@vger.kernel.org, linux-watchdog@vger.kernel.org, devicetree@vger.kernel.org, =?UTF-8?q?Jonathan=20Neusch=C3=A4fer?= , Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , Avi Fishman , Tomer Maimon , Tali Perry , Patrick Venture , Nancy Yuen , Benjamin Fair , Daniel Lezcano , Thomas Gleixner , Philipp Zabel , Wim Van Sebroeck , Guenter Roeck Subject: [PATCH 0/7] Nuvoton WPCM450 clock and reset driver Date: Fri, 22 Apr 2022 20:30:05 +0200 Message-Id: <20220422183012.444674-1-j.neuschaefer@gmx.net> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:lUBjNycijZc1q4is3LS9ZHsMWEXwBB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fKVvU6qW B+fMHHpWsNQXr9+9yYFnbNsCS8VDeDMyxwwBvwBuLNlZCcDcPRbWW2xI68cwq0Yjr5tNN6kWr nRQxNO7bfijbecvStWMHXz9JhnimyTIH2IoZbLhxAk7SDk8X5huW8a12eT88J9ybgvvzzT29L A2MzGdyvkCP8WKSPEZLjlnxTSsjt1wGZ12qx+FnXx4S+lZ9KJ03gZ42TNb6VwL6+qndS28Tyo Qkc1o9rt6op8eurWjqszM8dZvxNEE5IgVesnczDGjWU3YAZxHJpMuWj70z8iI5kuep6aR9uHa oB3Xi3d5P4WNmU= X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE autolearn=no 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 This series adds support for the clock and reset controller in the Nuvoton WPCM450 SoC. This means that the clock rates for peripherals will be calcu= lated automatically based on the clock tree as it was preconfigured by the bootl= oader. The 24 MHz dummy clock, that is currently in the devicetree, is no longer = needed. Somewhat unfortunately, this also means that there is a breaking change on= ce the devicetree starts relying on the clock driver, but I find it acceptabl= e in this case, because WPCM450 is still at a somewhat early stage. Upstreaming plan (although other suggestions are welcome): Once reviewed, - The ARM/dts changes should go through Joel Stanley's bmc tree - The clocksource/timer changes should probably go via Daniel Lezcano and = TIP - The watchdog patch should go via the watchdog tree - The clock controller bindings and driver should go through the clk tree - It might make sense to delay the final ARM/dts patch ("ARM: dts: wpcm450= : Switch clocks to clock controller") until next cycle to make sure it is merged after the clock driver. Jonathan Neusch=C3=A4fer (7): dt-bindings: timer: nuvoton,npcm7xx-timer: Allow specifying all clocks clocksource: timer-npcm7xx: Enable timer 1 clock before use watchdog: npcm: Enable clock if provided dt-bindings: clock: Add Nuvoton WPCM450 clock/reset controller ARM: dts: wpcm450: Add clock controller node clk: wpcm450: Add Nuvoton WPCM450 clock/reset controller driver ARM: dts: wpcm450: Switch clocks to clock controller .../bindings/clock/nuvoton,wpcm450-clk.yaml | 74 ++++ .../bindings/timer/nuvoton,npcm7xx-timer.yaml | 8 +- arch/arm/boot/dts/nuvoton-wpcm450.dtsi | 29 +- drivers/clk/Makefile | 1 + drivers/clk/clk-wpcm450.c | 378 ++++++++++++++++++ drivers/clocksource/timer-npcm7xx.c | 14 +- drivers/reset/Kconfig | 2 +- drivers/watchdog/npcm_wdt.c | 9 + .../dt-bindings/clock/nuvoton,wpcm450-clk.h | 67 ++++ 9 files changed, 572 insertions(+), 10 deletions(-) create mode 100644 Documentation/devicetree/bindings/clock/nuvoton,wpcm45= 0-clk.yaml create mode 100644 drivers/clk/clk-wpcm450.c create mode 100644 include/dt-bindings/clock/nuvoton,wpcm450-clk.h =2D- 2.35.1