From patchwork Fri Sep 6 13:34:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Brunet X-Patchwork-Id: 13794211 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4914ECE7B13 for ; Fri, 6 Sep 2024 13:40:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To: Content-Transfer-Encoding:Content-Type:MIME-Version:Message-Id:Date:Subject: 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=bqsINef6QfApstNyiYZ/qe6fj6A2ZIDvZyFkLMashjw=; b=XWwrqrlPoY8OtG mlsEDhv9H8aFk9CtdCkxP4Tq11SCf+3aZwTj/5bymcpWpyGg8v1f+j3Zqc7xY3FgNq1iQPlXPyZ1R tSAOPgkaFpSYFl45jIftVztMqPeNxu01ExcdRgELik+gEIRzn0v3tJg0QNqcTpxGmFpaxTiqKCE7S yDdYgl/yzGOCQAiDxaGdoSLBsnH5RDgF14s5OmkG6TyPro0uYDCpSmX0whyXL9mlWDYZikEq7+R6y kPyCl9AooASZ8QDUrPRDPkW9WZI26XJpDxF8oiZWounx8Qqot898rJXkoavxQ3s2DcYB5O6xmK6A0 bvdpmH+SfQ7IDuzJzmfg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1smZC3-0000000CNJX-1ghr; Fri, 06 Sep 2024 13:40:07 +0000 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1smZ7S-0000000CMAM-3nrU for linux-arm-kernel@lists.infradead.org; Fri, 06 Sep 2024 13:35:26 +0000 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-42bbd16fca8so17723245e9.0 for ; Fri, 06 Sep 2024 06:35:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1725629720; x=1726234520; darn=lists.infradead.org; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:from:to:cc:subject:date:message-id:reply-to; bh=bqsINef6QfApstNyiYZ/qe6fj6A2ZIDvZyFkLMashjw=; b=ImA87DRdPkZ+tWmjIyQNoO7Wbr/tXH3v8jm7huXSHD6Bfj7zdBG6gjfn7dNuWXPCK+ MWzkrA7qnDg7kAHuTIoJEOFSmu+CG0LypTQKZJj6Itv9F2ABvFy0r0TyTtsHHzxiwDP5 Wm/WD7uaxusK3cJyoKJ37FLWUZXABVoxV0zIAvnBkrJSdpDG+4K82TR9PHW63x6ykkWp JzQNfDYpl3SOpprmZmTerUZ6YgqO03Gkvi23bwR/Qk/SUstBNe8NWZk1p9LVxVjtpJfs 7y3GNKr+KNJO4IyDS8L5SuChcckSYyIizypMUhT99yDZQ3KJ7+ulYbdLlbPadd4JMQ49 1hqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725629720; x=1726234520; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=bqsINef6QfApstNyiYZ/qe6fj6A2ZIDvZyFkLMashjw=; b=TwO0XxKmxrdLgUGPc2BtFkP0QSbRkHYyAnx3/tAJWlf5GKLgkFy6gxPjtGc5tXRjer Yk9bFYoKGBeXIlK4OWAomYO3ypCc+wEkwf4WGYc+T0Oz4eDasIb1VcY/1W3z+sQbBV0q VLX0i9pKUregzscT+TJChWPTUXuI96zg08OW+AwnWVgh4anwPyqxnYShTNaj185r02Yo jcdMJ8mcIfYOVSa59ZTm1bYTCRYk4HGVM9XY2CbCqI+nU+m9iSSCZRBm/OJR0/xCGEsF pdqoHtDkdL57FthpKjo2TcTujf7hgSrr5wwoWPCRjAKk+7SKChh550GTnsxDOnQYV4w5 zccg== X-Gm-Message-State: AOJu0YwoaUngNiI3Nv5Ts2A1AgOsmytW/fN1Z0Irn2Vsc5k9bpVsyhHH mFCB2lz3QuQ+o8GWwQhZxGkqMetJsqfa1MWrE95DoOoHhMyYCQXkrqLRLU30rJc= X-Google-Smtp-Source: AGHT+IFehkkKna75GAh88+0SyunaTdQfdtNnUax09bgaJD7vSsHcPJcX0846piZ3PpY8OCSraqbCZQ== X-Received: by 2002:a5d:62c3:0:b0:374:c407:4e07 with SMTP id ffacd0b85a97d-378896a5b83mr1942649f8f.46.1725629719363; Fri, 06 Sep 2024 06:35:19 -0700 (PDT) Received: from toaster.baylibre.com ([2a01:e0a:3c5:5fb1:b0ad:b504:10d4:481d]) by smtp.googlemail.com with ESMTPSA id ffacd0b85a97d-3749eea60e2sm21684597f8f.62.2024.09.06.06.35.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Sep 2024 06:35:18 -0700 (PDT) From: Jerome Brunet Subject: [PATCH v4 0/9] reset: amlogic: move audio reset drivers out of CCF Date: Fri, 06 Sep 2024 15:34:45 +0200 Message-Id: <20240906-meson-rst-aux-v4-0-08824c3d108b@baylibre.com> MIME-Version: 1.0 X-B4-Tracking: v=1; b=H4sIAPUE22YC/0XMQQ6CMBBA0auQWTtk2lQBV97DuGjLIDXSmikYD OHuNm5cvsX/G2SWwBnO1QbC75BDigXmUIEfbbwzhr4YNGlDHZ1w4pwiSp7RLivaRrvek3K9Yij NS3gI6+93vRUPkiacR2H7v7TUKtKN0XU5HjsyqPDhZIk8X5z9PIMTrn2aYN+/b3cqhp8AAAA= To: Philipp Zabel , Stephen Boyd , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Jiucheng Xu Cc: linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org X-Mailer: b4 0.14.1 X-Developer-Signature: v=1; a=openpgp-sha256; l=3279; i=jbrunet@baylibre.com; h=from:subject:message-id; bh=Zy8XGx7Pz9xI8ihyiXuhQRn7J6bXXBkEnZLes9E9AaI=; b=owEBbQKS/ZANAwAKAeb8Dxw38tqFAcsmYgBm2wUNU+ER2XIrHr1uWuBlyVb11DIqM0PpyYs/n 0w+pNJrhAqJAjMEAAEKAB0WIQT04VmuGPP1bV8btxvm/A8cN/LahQUCZtsFDQAKCRDm/A8cN/La hXgcD/4vY+/TwpUv2d9iGss5Ei5ETLzTZzezXR9fchb5UUOFfAkie9ZJ1MQ/49sa0M39yQnRIYm D8yRpxeCpQoTxo1xcsOkwZ2s4PNflZoNQ1YvaBi+lqtrfmWuHpZ4jwa/5SsbSaGkxX0fzJspCbX 1Zfry90XLPq1iNQnq4HIPyACarXbeb9uGhKWHSVPjHI9hnWVre1CLr3fyVEnWmwB2GfCqjAJ0bH 5BKimN+rh9AuSU9M0MnmhSp676j5yYNzi7KoPTGb+vpjXIOSIKtv9MZVoMrISkJ0/9M6OHHUge7 nbd1QPEqOu007ywWJSwy5+e77z2EBNexJPaWBj2ldAuuHUfIuCl85XpSGB6ju1Vyq+FDPo4Bukk jTcN0nvIshXFFlBOKjwJPWwvdGcHbaYfww2Y7xJjN0XQCEhUE9jb6dE6dFxYPOOewKBBmXRUQaR aKs+xm/F10oxmakiYSz8lTwHcmpXmPSDy1Tl8tIWmpeQerkhQ2lAVmttNp/50M3o3VGe3/3paCy FVq4JwmsmmVKgVtTBbDu4UdYbBJGb3YhHzz5Cwxhev93e6Luu2HpF9AuOikX0E9wiFyq0m0BcXs 6lHvjmwSXEFYnaI9iej1Yblnikoi/F+bqGVhK+56DLny3X9gA952P3six43XzxEa20RKyqj4QEn mKFNt5M+Wv3mt2A== X-Developer-Key: i=jbrunet@baylibre.com; a=openpgp; fpr=F29F26CF27BAE1A9719AE6BDC3C92AAF3E60AED9 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240906_063523_170881_9B56C4F0 X-CRM114-Status: GOOD ( 16.78 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This patchset follows the discussion about having reset driver in the clock tree [1]. Ideally those should reside in the reset part of tree. Also the code of the amlogic reset driver is very similar between the 2 trees and could use the same driver code. This patcheset alignes the reset drivers present in the reset and clock then adds support for the reset driver of audio clock controller found in the g12 and sm1 SoC family to the reset tree, using the auxiliary bus. The infrastructure put in place is meant to be generic enough so we may eventually also move the reset drivers in the meson8b and aoclk clock controllers. This was tested on sm1 vim3l and gxl aml-s905x-cc. Changes since v3 [5]: * Drop pltf/platform as suggested Changes since v2 [4]: * Fix undefined read access of the reset register * Fix Kconfig symbol description Changes since v1 [3]: * Fixes formatting errors reported by Stephen. * Changed parameters type to unsigned * Fix usage of ops passed as parameters, previously ignored. * Return 0 instead of an error if reset support is absent to properly decouple from the clock and have a weak dependency * Split the platform and auxiliary modules in 2 distinct modules to fix the COMPILE_TEST error reported by ktest robot. Change since RFC [2]: * Move the aux registration helper out of clock too. [1] https://lore.kernel.org/linux-clk/e3a85852b911fdf16dd9ae158f42b3ef.sboyd@kernel.org [2] https://lore.kernel.org/linux-clk/20240516150842.705844-1-jbrunet@baylibre.com [3] https://lore.kernel.org/linux-clk/20240710162526.2341399-1-jbrunet@baylibre.com [4] https://lore.kernel.org/linux-clk/20240718095755.3511992-1-jbrunet@baylibre.com [5] https://lore.kernel.org/linux-clk/20240808102742.4095904-1-jbrunet@baylibre.com --- Jerome Brunet (9): reset: amlogic: convert driver to regmap reset: amlogic: use generic data matching function reset: amlogic: make parameters unsigned reset: amlogic: add driver parameters reset: amlogic: use reset number instead of register count reset: amlogic: add reset status support reset: amlogic: move drivers to a dedicated directory reset: amlogic: split the device core and platform probe reset: amlogic: add auxiliary reset driver support drivers/reset/Kconfig | 15 +- drivers/reset/Makefile | 3 +- drivers/reset/amlogic/Kconfig | 27 ++++ drivers/reset/amlogic/Makefile | 4 + .../reset/{ => amlogic}/reset-meson-audio-arb.c | 0 drivers/reset/amlogic/reset-meson-aux.c | 136 ++++++++++++++++++ drivers/reset/amlogic/reset-meson-common.c | 142 ++++++++++++++++++ drivers/reset/amlogic/reset-meson.c | 105 ++++++++++++++ drivers/reset/amlogic/reset-meson.h | 28 ++++ drivers/reset/reset-meson.c | 159 --------------------- include/soc/amlogic/reset-meson-aux.h | 23 +++ 11 files changed, 467 insertions(+), 175 deletions(-) --- base-commit: 487b1b32e317b85c2948eb4013f3e089a0433d49 change-id: 20240906-meson-rst-aux-a72bdc01bd1e Best regards,