Received: by 2002:a05:6358:701b:b0:131:369:b2a3 with SMTP id 27csp2179347rwo; Sun, 23 Jul 2023 09:09:45 -0700 (PDT) X-Google-Smtp-Source: APBJJlHl/vUfCIt19GHwhbftwWIugfHqH111EpBAQANGbJ/thUdyhphqPmGBpmd/HBEJAuQ4zF3I X-Received: by 2002:a17:902:e841:b0:1b7:e355:d1ea with SMTP id t1-20020a170902e84100b001b7e355d1eamr10280546plg.24.1690128585024; Sun, 23 Jul 2023 09:09:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690128585; cv=none; d=google.com; s=arc-20160816; b=YIjdV+Vf6y0sJBySepP1RfIj0e56IPhpkXnOCzMI5Jlh/36JDWhXXa2KfNu7T5/hLo WIOhPyRJ0Hl509y+7Cg3GTb/W6Bf5Wt7Z9mFAumC1kA8lI16I1255NAuDsLnVEVY4Mas DJfeB+GxmWkEzEpnsvEKzpBrofzF3pml6GVWSinvzgjrHlUFOIk6dR181PfNCJNFlFP1 xbc8qIbXLz6105OgDBndOR5e64GTYcQH2Y9Fw8rxjhCVoEVvoBQIGZQA2CPQ+u5Flg+9 qQ03pq08wpkLaRajrqdp2msqIRG/SXTlLLwIDqzA+B2vodu+NpI2SWPd6WklPpZVsSx5 LqAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id:dkim-signature; bh=QHMivvH+ml3LY6p99d8Wkoqg/EJjRAjBCx6TowpssQA=; fh=P8/pNAFZ5MAngc7BlSZZBy2YvvVH1dwolN/715D4sdo=; b=bM0O82vXlnact/nz+0akjLzVNr9tTu+Ibc8wuhxceRS/9H8B14Spxc3k11foGA0mWz GfkoMOkV/+q+qOnHHlLMB8rh+r3YPuMw5jA9Oa25uDCVEqWeBxVQ2D6Mwzl8hO9Y6yWO y6eygcgBq727JRQF0TD0JBd5tyCHd5u3KrTnE10vK7+Ds9S2YhCX8RFzYMK+loyrokOT sD39S8nM1NhSJrWUvTvBb7lJJqjeIvcv7Fb/Sopozxso/754DxjkAAvR/tw8zHOfJhFK Gm0lgU6vZ7COiIG+Nxb6qxixavouJqsplrFreDNDJORnOPNOM4I8qbSDVdQyiKKGN03m Z8Tw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@maquefel.me header.s=mail header.b=bpWTSuwO; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l2-20020a170903244200b001b86deba2fbsi7464415pls.605.2023.07.23.09.09.33; Sun, 23 Jul 2023 09:09:45 -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=@maquefel.me header.s=mail header.b=bpWTSuwO; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229684AbjGWPUp (ORCPT + 99 others); Sun, 23 Jul 2023 11:20:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57056 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229603AbjGWPUo (ORCPT ); Sun, 23 Jul 2023 11:20:44 -0400 Received: from forward103c.mail.yandex.net (forward103c.mail.yandex.net [178.154.239.214]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 303C4183; Sun, 23 Jul 2023 08:20:39 -0700 (PDT) Received: from mail-nwsmtp-smtp-production-main-10.sas.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-10.sas.yp-c.yandex.net [IPv6:2a02:6b8:c14:2481:0:640:e0:0]) by forward103c.mail.yandex.net (Yandex) with ESMTP id CEA4F60049; Sun, 23 Jul 2023 18:20:35 +0300 (MSK) Received: by mail-nwsmtp-smtp-production-main-10.sas.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id XKKVCAKWwGk0-ryRAJRRp; Sun, 23 Jul 2023 18:20:35 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=maquefel.me; s=mail; t=1690125635; bh=QHMivvH+ml3LY6p99d8Wkoqg/EJjRAjBCx6TowpssQA=; h=References:Date:In-Reply-To:Cc:To:From:Subject:Message-ID; b=bpWTSuwOh3Pq1nNVTeYjZ0rxthaWyc737Iz04dhOC5EO8W6O+NK2iBitqy1D1UrZt OigfEUbOrr/uaP9SpRo8/sazcILmkQQINJQahvE2B7Pqd08P4quXijIhzyQTblFFM0 wPwkU11B16Hhil9uKPQt6maplK4D9B+xDKsx+Vxo= Authentication-Results: mail-nwsmtp-smtp-production-main-10.sas.yp-c.yandex.net; dkim=pass header.i=@maquefel.me Message-ID: <7d304d3a14ad44f1dcb301961c0b7d777b243156.camel@maquefel.me> Subject: Re: [PATCH v3 02/42] dt-bindings: clock: Add Cirrus EP93xx From: Nikita Shubin To: Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Nikita Shubin , Alexander Sverdlin , Arnd Bergmann , Linus Walleij Cc: linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Date: Sun, 23 Jul 2023 21:20:33 +0300 In-Reply-To: <11dbf88d12051497ba1e3b16c0d39066.sboyd@kernel.org> References: <20230605-ep93xx-v3-0-3d63a5f1103e@maquefel.me> <20230605-ep93xx-v3-2-3d63a5f1103e@maquefel.me> <11dbf88d12051497ba1e3b16c0d39066.sboyd@kernel.org> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.46.3 MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 Hello Stephen. On Thu, 2023-07-20 at 16:20 -0700, Stephen Boyd wrote: > Quoting Nikita Shubin via B4 Relay (2023-07-20 04:29:02) > > diff --git a/Documentation/devicetree/bindings/clock/cirrus,ep9301- > > clk.yaml b/Documentation/devicetree/bindings/clock/cirrus,ep9301- > > clk.yaml > > new file mode 100644 > > index 000000000000..111e016601fb > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/clock/cirrus,ep9301- > > clk.yaml > > @@ -0,0 +1,46 @@ > > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) > > +%YAML 1.2 > > +--- > > +$id: http://devicetree.org/schemas/clock/cirrus,ep9301-clk.yaml# > > +$schema: http://devicetree.org/meta-schemas/core.yaml# > > + > > +title: Cirrus Logic ep93xx SoC's clock controller > > + > > +maintainers: > > +=C2=A0 - Nikita Shubin > > +=C2=A0 - Alexander Sverdlin > > + > > +properties: > > +=C2=A0 compatible: > > +=C2=A0=C2=A0=C2=A0 oneOf: > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 - const: cirrus,ep9301-clk > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 - items: > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 - enum: > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 - cirrus,ep9302-clk > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 - cirrus,ep9307-clk > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 - cirrus,ep9312-clk > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 - cirrus,ep9315-clk > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 - const: cirrus= ,ep9301-clk > > + > > +=C2=A0 "#clock-cells": > > +=C2=A0=C2=A0=C2=A0 const: 1 > > + > > +=C2=A0 clocks: > > +=C2=A0=C2=A0=C2=A0 items: > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 - description: reference clock > > + > > +required: > > +=C2=A0 - compatible > > +=C2=A0 - "#clock-cells" > > +=C2=A0 - clocks > > + > > +additionalProperties: false > > + > > +examples: > > +=C2=A0 - | > > +=C2=A0=C2=A0=C2=A0 clock-controller { > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 compatible =3D "cirrus,ep9301-clk"; >=20 > Is there a reg property? The driver grabs some syscon and then iomaps > it, so presumably there is a register range. Is it part of some other > hardware block? If so, can you make that device register sub-devices > with the auxiliary bus instead of using a syscon? Is reg property missing the only thing that doesn't fit ?=20 `devm_of_iomap` was done only for reusing `devm_clk_hw_register_gate` for DMA's and USB clock gates, i can give clk node it's own registers, like: reg =3D <0x80930004 0x04>; Or drop devm_clk_hw_register_gate reusage entirely and just implement non swlocked version of clk enable/disable that will go through syscon regmap. The ep93xx really looks like an syscon device in docs it refers itself as a "Syscon block", also converting into "Auxiliary Bus" won't help with `ep93xx_syscon_swlocked_write` either.