Received: by 2002:ab2:788f:0:b0:1ee:8f2e:70ae with SMTP id b15csp580063lqi; Thu, 7 Mar 2024 06:08:19 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWj6hGanvpmoI9jWyvCjPA8HFgJbHfOwW8dPcpMjKNNhawJ3giUJjLFnHMU++nfxA/UMnYiecwPlOuW3gYTIbqATY00fojlrrQwwMRnTA== X-Google-Smtp-Source: AGHT+IH9tv07UbHiYLyKaIJkGGF6qP0XUpyTacya6Wv9lMbll1S0sjiXZ3ZBx02YV4Uo5fCIvNly X-Received: by 2002:a17:906:b059:b0:a45:b492:325f with SMTP id bj25-20020a170906b05900b00a45b492325fmr3931845ejb.13.1709820499082; Thu, 07 Mar 2024 06:08:19 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709820499; cv=pass; d=google.com; s=arc-20160816; b=CexjnaxJ7lETCpNc3TJvkWM5XnaFCGLIt3GLBqnEhHnAn9WLbh3oj6YWZZAq3v+i9d 7Qe/6JeXPzs/D5y496l327qnM+VldrYgSO+qVSyxc8W4Dow3ggZx3m65vnfG9P0uTM/L YI7KP74zwPvZKKixbUY8ExGAYz37cFOgh78pvQIlnuLS2ZrnXLzHRMzkER9bLJulzArl yi6QvHbNo/Js279AxmFhUChkJDMzEROKbfCARfJNO6jkS/GY3v2eT770LOc8RAklLIhu 9Hr8RttMNqul6s//Up8Og6uI6NEhwxSyGxvm+8TXZpVoH4X2aqYr0UPbQklZgcFeV8BF kxbg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=7qvoqgbf8BgmpB/WA74qzufv4GkITZwzS6+LGmIQY3Q=; fh=kpZPRl0IfnZk9z4Ekk8G5IktcuCx098f0Z/vYjw4Vtg=; b=zprq9uewRQv5aCjuXO0MpcKU4n6CdZ5IYR4Tq8PvgHAOpFbxBLBYnzus8/hj1gd4Os mp9YSUDYkS1BopElL5LfPzlR89mKk9ZssmHNUTALC89EAkwgmp9/yBQYdfk/xMIazCe1 n1JF5EtQ88FKTteBrXqI5uXKN3Zl/FRbk7ia1CXFKyBkckmsf3Ejfm7gp57E21lSfqrC ahX40tsFFVj2DlhJmXKUb5z3GY/k1fu7liOUHBF5pbHcUlY+mVnsORyLAVJnLa3AOV1y r59CfdJF2XIa59ZC21Wfa85d+Kh/kT8qT6I2vYLZoaI+yERtQ6RxVu6g2dxSTwqimaQ6 P0Tw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@tuxon.dev header.s=google header.b=FGb6tuPu; arc=pass (i=1 spf=pass spfdomain=tuxon.dev dkim=pass dkdomain=tuxon.dev); spf=pass (google.com: domain of linux-kernel+bounces-95694-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-95694-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id x17-20020a170906135100b00a4427c4fd5csi6914463ejb.315.2024.03.07.06.08.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Mar 2024 06:08:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-95694-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@tuxon.dev header.s=google header.b=FGb6tuPu; arc=pass (i=1 spf=pass spfdomain=tuxon.dev dkim=pass dkdomain=tuxon.dev); spf=pass (google.com: domain of linux-kernel+bounces-95694-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-95694-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id A5A781F251B9 for ; Thu, 7 Mar 2024 14:08:18 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DB28112C7E2; Thu, 7 Mar 2024 14:07:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="FGb6tuPu" Received: from mail-ej1-f47.google.com (mail-ej1-f47.google.com [209.85.218.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E90BE12D779 for ; Thu, 7 Mar 2024 14:07:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.47 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709820468; cv=none; b=nos1Kt1o7w5t8VO0FwVefrXLkF3XtIWfVKyZvRSAUXabsGT9GP9ih5d1YoIDcGtTeEoa7PPWoHAYus8gQ+rFSQ/G9myZBPsiYXP0YHyM/QPo7R8yib6pmBjYkXGsWBphxpEFGx+3xYZGNNuK1DjOQWM1rd2/IRICd64uSmeF0+E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709820468; c=relaxed/simple; bh=X6mr7ss3hBz+KcOkyD+aKlFcN4fw3b05uNnI+q4ZcYM=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=XwbB27xLRL1Y8UE+JY97DkFemcHsPiCsCsdCnzWaj3rWqQopoAZPzFOEBEptc/YH26G7jW6RDJ3Db7EQD6H7JrItg8aKT/briR8hGgPdrex8HiXi8Sb0PIwh7KwlBgRLji4HPsxDIG0lrACFzAghP6Lq3rIwuTw15pQVmMIyEGM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev; spf=pass smtp.mailfrom=tuxon.dev; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b=FGb6tuPu; arc=none smtp.client-ip=209.85.218.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tuxon.dev Received: by mail-ej1-f47.google.com with SMTP id a640c23a62f3a-a458eb7db13so138626866b.2 for ; Thu, 07 Mar 2024 06:07:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1709820465; x=1710425265; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=7qvoqgbf8BgmpB/WA74qzufv4GkITZwzS6+LGmIQY3Q=; b=FGb6tuPupwuScfJUpsAclHLb6UlcXo5srLgd4RT5EWMttHM0wm2zpc5YYsqYvfi1Nt NS0VZl8Zx6i0FRrmMHp0bpMDa8tEwR1H7h8VjPe8u3dHKQ65z9DM24FzJvL/TDAuxXiT /OkrPt7O63MOz452hviSp9BAQVz65eN5kIuHjlU+/b6LsVBF8KeiAiwpI68sMOWJcGPV 2rr4QZsPYIhiZcDlSD+3/NV6gnWnhb7HYsrI7+2efduWYcBFduATMfvBT8ScxLUSPOKW /YxRMxPk3Sa7QMPYDil01STQfwBV3a9z65TYLnCx9ndnIFUhZo5outFmh3xh4GgRCVpr Zx/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709820465; x=1710425265; 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=7qvoqgbf8BgmpB/WA74qzufv4GkITZwzS6+LGmIQY3Q=; b=h7JjtsimRvaptmSjjjP9W/5q2lJ5bXpmvSVArEZzEGgvZ4rGCM0COs08MWKncRONXW mudyTFe60bSruWWXbID0KLlj5S/OeHDx5LUizasaD/geifbmhylgB9IGkfgq+en8VLEJ b2g6ZqaXVN36ocjvWIqTtfFkUkjwSiNVT6YNU5ZpCwcp2iqEyJiEE2YVsrag5vTE98M3 a3CmKIjjJycv6ujgWUWSu7bZP2B+FlZUopaECdTZziyJMa2i2QpbW0xh5sScomFgTjGf g/KH1iLnKfgBp8t8FG4wYqDozsp5sGVl/IhJyUMdoVdNqTkOe7dM/5FmaosEdFS+M8rm OQgg== X-Forwarded-Encrypted: i=1; AJvYcCV8mmNfRJDQy/p2GqNEqQeLDgMlWXV1jgbFj8DHV7gKc0PiuFl0LkMdJVKrtrUF3QYnC5WbC9SthjF38qjQF4cED4nMnFWj1GkzEWbZ X-Gm-Message-State: AOJu0Yw6uZ5NOSkhTznqBpPCLFjF6F5PrQphuzOLOQ3WGoKmK44y1A0c qJqrsKrhEMRYJGEMlorD3+iRXk1K3TvK6e1sNcwPfYX3VoypY1CkZoFK4HdTgOg= X-Received: by 2002:a17:906:138d:b0:a45:abec:cff4 with SMTP id f13-20020a170906138d00b00a45abeccff4mr5234619ejc.32.1709820465129; Thu, 07 Mar 2024 06:07:45 -0800 (PST) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.38]) by smtp.gmail.com with ESMTPSA id v23-20020a1709067d9700b00a42ee62b634sm8200648ejo.106.2024.03.07.06.07.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Mar 2024 06:07:44 -0800 (PST) From: Claudiu X-Google-Original-From: Claudiu To: geert+renesas@glider.be, mturquette@baylibre.com, sboyd@kernel.org, robh@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, magnus.damm@gmail.com Cc: linux-renesas-soc@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, claudiu.beznea@tuxon.dev, Claudiu Beznea Subject: [PATCH v2 00/10] clk: renesas: rzg2l: Add support for power domains Date: Thu, 7 Mar 2024 16:07:18 +0200 Message-Id: <20240307140728.190184-1-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Claudiu Beznea Hi, Series adds support for power domains on rzg2l driver. RZ/G2L kind of devices support a functionality called MSTOP (module stop/standby). According to hardware manual the module could be switch to standby after its clocks are disabled. The reverse order of operation should be done when enabling a module (get the module out of standby, enable its clocks etc). In [1] the MSTOP settings were implemented by adding code in driver to attach the MSTOP state to the IP clocks. But it has been proposed to implement it as power domain. The result is this series. Along with MSTOP functionality there is also module power down functionality (which is currently available only on RZ/G3S). This has been also implemented through power domains. The DT bindings were updated with power domain IDs (plain integers that matches the DT with driver data structures). The current DT bindings were updated with module IDs for the modules listed in tables with name "Registers for Module Standby Mode" (see HW manual) exception being RZ/G3S where, due to the power down functionality, the DDR, TZCDDR, OTFDE_DDR were also added, to avoid system being blocked due to the following lines of code from patch 7/17. + /* Prepare for power down the BUSes in power down mode. */ + if (info->pm_domain_pwrdn_mstop) + writel(CPG_PWRDN_MSTOP_ENABLE, priv->base + CPG_PWRDN_MSTOP); Domain IDs were added to all SoC specific bindings. Thank you, Claudiu Beznea Changes in v2: - addressed review comments - dropped: - dt-bindings: clock: r9a09g011-cpg: Add always-on power domain IDs - clk: renesas: r9a07g043: Add initial support for power domains - clk: renesas: r9a07g044: Add initial support for power domains - clk: renesas: r9a09g011: Add initial support for power domains - clk: renesas: r9a09g011: Add initial support for power domains - arm64: dts: renesas: r9a07g043: Update #power-domain-cells = <1> - arm64: dts: renesas: r9a07g044: Update #power-domain-cells = <1> - arm64: dts: renesas: r9a07g054: Update #power-domain-cells = <1> - arm64: dts: renesas: r9a09g011: Update #power-domain-cells = <1> as suggested in the review process - dropped "arm64: dts: renesas: rzg3s-smarc-som: Guard the ethernet IRQ GPIOs with proper flags" patch as it was integrated - added suspend to RAM support - collected tag [1] https://lore.kernel.org/all/20231120070024.4079344-4-claudiu.beznea.uj@bp.renesas.com/ Claudiu Beznea (10): dt-bindings: clock: r9a07g043-cpg: Add power domain IDs dt-bindings: clock: r9a07g044-cpg: Add power domain IDs dt-bindings: clock: r9a07g054-cpg: Add power domain IDs dt-bindings: clock: r9a08g045-cpg: Add power domain IDs dt-bindings: clock: renesas,rzg2l-cpg: Update #power-domain-cells = <1> for RZ/G3S clk: renesas: rzg2l: Extend power domain support clk: renesas: r9a08g045: Add support for power domains clk: renesas: rzg2l-cpg: Add suspend/resume support for power domains clk: renesas: r9a08g045: Add the RZG2L_PD_F_CONSOLE flag to scif0 PM domain arm64: dts: renesas: r9a08g045: Update #power-domain-cells = <1> .../bindings/clock/renesas,rzg2l-cpg.yaml | 18 +- arch/arm64/boot/dts/renesas/r9a08g045.dtsi | 20 +- drivers/clk/renesas/r9a08g045-cpg.c | 61 ++++ drivers/clk/renesas/rzg2l-cpg.c | 267 +++++++++++++++++- drivers/clk/renesas/rzg2l-cpg.h | 78 +++++ include/dt-bindings/clock/r9a07g043-cpg.h | 52 ++++ include/dt-bindings/clock/r9a07g044-cpg.h | 58 ++++ include/dt-bindings/clock/r9a07g054-cpg.h | 58 ++++ include/dt-bindings/clock/r9a08g045-cpg.h | 70 +++++ 9 files changed, 658 insertions(+), 24 deletions(-) -- 2.39.2