From patchwork Wed Oct 26 19:43:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aidan MacDonald X-Patchwork-Id: 740 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp453902wru; Wed, 26 Oct 2022 12:46:04 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5xlkC4td2fraaOXVJIecMunB1TFuCyUumOlsc2jtR217QVBjnkhyFRrf2hiMDSgTf/fjN+ X-Received: by 2002:a17:902:c942:b0:180:3f94:2975 with SMTP id i2-20020a170902c94200b001803f942975mr45228256pla.50.1666813554009; Wed, 26 Oct 2022 12:45:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666813554; cv=none; d=google.com; s=arc-20160816; b=Gssf0GKZBxKHVGW1B8DHe+Dg/bJQprdpVsSiENSdPwIv+4iCvq7yPZvPTYM/lJbwMM 2B6g0kOeIi5bzjs+nwuejRQYv+SKzOJ8tAzVlMDuyBiK5jpcG2I5GxJHVA2pd4ZNj0os nUtxQOJsQUOuiIi0Ks/x5hLhF8taaKG3H8HF47RwWFk57Z6mqyFpbL1uXz9UJK/EGjDT fuaF1x6XzHiSqhY0m99f8xFKVW1L9r2obOgDGmvlJGcngurTeEGK6j2zlYgaRghcWyme 3gRyT7b4IK5SVOtpR6IaAeamfOzozMvgRTZMRQ3ccjetAqzl6ITDoLUZhj+oe57ktMxy wEwQ== 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=ORoQDh2bzxbybTBIICtiM6Bx1pQkzrw52vv9hk0I9Po=; b=ln8+SDn8W6JZDdbX9L1pqwi6gAHw+XN7zz9Pf9wO6Ln5VZyOqnwFEUY4pCOIZcwXvQ Klw/9dD+T0Fob/w8KiEFc1Mqghz2XuUFg5F+Z7NU/Gah8v63kDM+e8IkNKO7/hMQKhHl UODFWNGLlNad//HFjG4ZkkE/cgXQITQK9PMIi8+rSM5UFDSTK2ECqpwJhckyqsB+XGL/ OPNS83ZCwnBpStMrWLVd344bk1e8IUOaENHfsnyGL2EXavys30cN/fBSvRGtEJL+9UQd X3YtWA5RfWI4uLjpSvZH6eZzEGL2jWmdVq70fos1nmayxQsYibwEvditjqx+z8tePNoV O3Xg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=BOPdWFtX; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d7-20020a170903230700b0017f5dfeb82fsi8966062plh.204.2022.10.26.12.45.41; Wed, 26 Oct 2022 12:45:54 -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=20210112 header.b=BOPdWFtX; 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 S235194AbiJZTo5 (ORCPT + 99 others); Wed, 26 Oct 2022 15:44:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39784 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234108AbiJZTo0 (ORCPT ); Wed, 26 Oct 2022 15:44:26 -0400 Received: from mail-wr1-x432.google.com (mail-wr1-x432.google.com [IPv6:2a00:1450:4864:20::432]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A2BF710DE67; Wed, 26 Oct 2022 12:43:52 -0700 (PDT) Received: by mail-wr1-x432.google.com with SMTP id h9so17117671wrt.0; Wed, 26 Oct 2022 12:43:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=ORoQDh2bzxbybTBIICtiM6Bx1pQkzrw52vv9hk0I9Po=; b=BOPdWFtXsbOjApuxxFp/AXYwOkGyCX8muLb77Xw8wCbL9CHgQLXGLFnO0D2YL+I5cr nuHYDS0LxklbZUVjnk6rh9gCErC41oEPZksXW1/r/+1S9HGLRNEoflo2tkmJuMjboezG nzwDF1HsLhV88SLMS/+NJtkuUzZWnN0usRjpZ3sHfw1NDTIvXlIfSzkJAjQVdBd6XS1t 39bG/ZASeAXjGjF5Rz1WctwUYmbbpZfAFz02xin9R1x/lXNaRvMRonVi/271J4oJUzaJ QYbNQ8teYyR4G0reiuTl1xL0tJGwfUPW3ZVUsREYnVKh+nj9fhyAE/D7564rcSpj1Zvd w5nA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=ORoQDh2bzxbybTBIICtiM6Bx1pQkzrw52vv9hk0I9Po=; b=CRgyXfl80/W2A+u32Ij3lPoe6JiSagQROBaOw0MfEHCohYtu/40MNWBZYu3gl4+cWO vsYldeMxSWIhtQNrBdthXDK/iOOBQZHokaO2OldzZOR9HBI4nWBfAm70mTUH0yYpL5jk QRtar7TMPpQ6v8i8gtinMazVUg2SPbjGG0ju86DnsyW1CpSKoat+PwJu09Cnip8p1B7M qN19P52qXuoP2xFXRoIe/XEFbLuGhMt5GT3Kz2S1xz9aW86xiS4YQjkYTafEwPMK1t8e QS7Q3Rbm7cz4btmp4y4O6gs2v840qWExXK+qCoclonasL14IvUEn8kqW0jWyAd6Lp4O7 eflA== X-Gm-Message-State: ACrzQf3QJg91sdh6p5FDHVFousmafpc4AiMuUzz/3K7qRfi2npV4m977 uqBs8q+gQeNzTLZga/QqNyg= X-Received: by 2002:a5d:6d8e:0:b0:22e:60ae:8875 with SMTP id l14-20020a5d6d8e000000b0022e60ae8875mr30435324wrs.676.1666813431237; Wed, 26 Oct 2022 12:43:51 -0700 (PDT) Received: from localhost (188.28.0.84.threembb.co.uk. [188.28.0.84]) by smtp.gmail.com with ESMTPSA id y5-20020adfd085000000b002364c77bcacsm6021198wrh.38.2022.10.26.12.43.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Oct 2022 12:43:50 -0700 (PDT) From: Aidan MacDonald To: paul@crapouillou.net, mturquette@baylibre.com, sboyd@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org Cc: zhouyu@wanyeetech.com, linux-mips@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 0/6] Add support for X1000 audio clocks Date: Wed, 26 Oct 2022 20:43:39 +0100 Message-Id: <20221026194345.243007-1-aidanmacdonald.0x0@gmail.com> MIME-Version: 1.0 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_NONE,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-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747780688913190205?= X-GMAIL-MSGID: =?utf-8?q?1747780688913190205?= The first three patches of this series modify the Ingenic CGU driver to allow the X1000's I2S divider to be modeled as a PLL clock. This is not really true -- it's just a fractional divider -- but doing it this way maximizes code reuse and avoids the need for a custom clock. (Thanks to Zhou Yanjie & Paul Cercueil for the idea.) Patches 04-05 actually add the X1000 SoC's audio clocks. The last patch is just a cosmetic cleanup, feel free to take it or leave it. Aidan MacDonald (6): clk: ingenic: Make PLL clock "od" field optional clk: ingenic: Make PLL clock enable_bit and stable_bit optional clk: ingenic: Add .set_rate_hook() for PLL clocks dt-bindings: ingenic,x1000-cgu: Add audio clocks clk: ingenic: Add X1000 audio clocks clk: ingenic: Minor cosmetic fixups for X1000 drivers/clk/ingenic/cgu.c | 38 ++++-- drivers/clk/ingenic/cgu.h | 17 ++- drivers/clk/ingenic/x1000-cgu.c | 119 ++++++++++++++---- include/dt-bindings/clock/ingenic,x1000-cgu.h | 4 + 4 files changed, 141 insertions(+), 37 deletions(-)