From nobody Mon Feb 9 10:38:58 2026 Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) (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 066321ADFEB for ; Tue, 26 Nov 2024 09:21:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732612870; cv=none; b=AKm5sOpUjb1XTKT894BM/eh7CGwecMJZRHymLpz75IdEWV+fcOZZUJiXo+AI9yhiOr4HsUy60RPZGh0QFsLsoUL3x41QZmq56JZIr81YC6/0tcX5Vf1qKWy0zY6yBGd4Eg/EJ81DbwAIJmEs8VbJhPGT1/5ezgskg7r64ym9i5I= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732612870; c=relaxed/simple; bh=V/DGxPq334std3OZDw1Q13cvXzTcQ8HKIYrcq1YIJz8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=qJ05UIVeNIKbtfzawu2X9XyKup2HFFFs3feQbcf+10zcI9v/YP4CYvq/cAp2pwxISGgOCa20hOoptsRK0veYI/wc1ez67kmPigdxUIjyAXrc1BprpCTK0QRxv/cn2NuCQpXiKLBmpryBAhcTXUjkfS6NO+Je/47mvEJ+Xc0k/qs= 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=ecJ7nixf; arc=none smtp.client-ip=209.85.128.51 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="ecJ7nixf" Received: by mail-wm1-f51.google.com with SMTP id 5b1f17b1804b1-43494a20379so22230875e9.0 for ; Tue, 26 Nov 2024 01:21:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1732612867; x=1733217667; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=oQlGMIlStcYoMIShuvfUaEr5YyWxZQ2PUL1/5BTbV6c=; b=ecJ7nixfA9OMlsZb5dKVxfMvfwF7PKkDh5DkWFugpB4EsQvjgWSgc3jhd1U+x21D87 QwdsGbBIMykVGFzXhVasqjUgxA3ZosL+0hTJjJcN58OA/T8vPzjfqlnAmk53/VzAwv/5 Pf3tR29uewY1nGXArtHy2jql+0OdIqRm0G3GtViX/9uBqUvHXnBBPxQ+XCgeZgAkSGoz R47QCkotM647N1hHa4kbpDKmOIxWIS1PuzOx1jio5T5scBDHvo0r905IYD0ITSD6kNo9 gMDWbPA7TePcSu4I1jCra3+zkzq2J/8ugnuQJAOxY1Nc69ZpwQkNcMIosU4NjstiMYlK tc0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732612867; x=1733217667; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=oQlGMIlStcYoMIShuvfUaEr5YyWxZQ2PUL1/5BTbV6c=; b=rApj1ItSfwQ5fXkyFbupzeoxYS361plSav2GucMadknuFJ+K0dLMedAE8fHpnORTRy gyvLAjL/gc1dJbRZ32LzVmL2fx/RWCpv7dR0RaSGc2ZDNR1t7rNENkQjQhdtdU+E6yvZ tGV3Q8G9AnMfEUrG650e3aC/G8/m/rDB/lPq7YxxACT36i/qQQ0th+Bou0BQJuTIvg85 rH4qXhJki8pml7q6Qb+3ljE6VPVVvDOQSDFiT9cdYEQHg5SymP6qzu6/seQy4lJwLXBU q/DNMVl1kQn9jd8sXg5WnBNiAvbDsgUp3pKbFh6215EOui1DfxAfYIrEbD4OJRs8707s avIw== X-Forwarded-Encrypted: i=1; AJvYcCV637ngqpda3MgCHXJWw0cw9GhgYt2t6sMEG8t2eKhxsPcGdZD7H+TqbGe7lnfgvhsCSppz5ZvrbEcxpco=@vger.kernel.org X-Gm-Message-State: AOJu0YyVZUKyG1SItDZ6t4DCEZLWjNob1PhG385Hsr3A7wYO2UWoOvqo u+7Dj8ckIFrhQ9CCUwfh+6ln/MWGDQE2Q6nr3fa7XSA1taCfGB0X5upNU5C9r2w= X-Gm-Gg: ASbGnctTDNl/UErNEHttpcXqiTWsTc8aAeuAQcMxX3FlOgqlDeYrUnPPUtBJ4NMx08X FsrQx7Y8i8468/8IHp23qMJlRiiapAithqbkUvzzdbgzlpy5x6vDw5rOxcCUAJHQ5xaYkXDw9ke XA/3bZHL1QKSVCG9+Ril5exQMG/4pUARL6h2lPF96qnEzGQBqfwOGo/AAQMSQF1Yq9iVvwrTs0e 2TcT+3OkufGL1nzBDKqVHGxPaTo09HkIuF+suTHdvpGiXeuMpGETqhjxI+GuxnwHnhyJAxWkBL3 xg8= X-Google-Smtp-Source: AGHT+IGG2IQ+U6IJTaeTyTNQI6LGmc4AjJAHShu01o6855LNNPFEdIbHv35w4G1l6XXNHmNrrqLTjw== X-Received: by 2002:a5d:5984:0:b0:382:415e:a144 with SMTP id ffacd0b85a97d-382608a4b7bmr12377286f8f.0.1732612867211; Tue, 26 Nov 2024 01:21:07 -0800 (PST) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.28]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3825fbc3a47sm13027694f8f.73.2024.11.26.01.21.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Nov 2024 01:21:06 -0800 (PST) From: Claudiu X-Google-Original-From: Claudiu To: vkoul@kernel.org, kishon@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, p.zabel@pengutronix.de, geert+renesas@glider.be, magnus.damm@gmail.com, gregkh@linuxfoundation.org, yoshihiro.shimoda.uh@renesas.com, christophe.jaillet@wanadoo.fr Cc: linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-usb@vger.kernel.org, claudiu.beznea@tuxon.dev, Claudiu Beznea Subject: [PATCH v2 01/15] dt-bindings: soc: renesas: renesas,rzg2l-sysc: Add #renesas,sysc-signal-cells Date: Tue, 26 Nov 2024 11:20:36 +0200 Message-Id: <20241126092050.1825607-2-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20241126092050.1825607-1-claudiu.beznea.uj@bp.renesas.com> References: <20241126092050.1825607-1-claudiu.beznea.uj@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Claudiu Beznea The RZ/G3S system controller (SYSC) has registers to control signals that are routed to various IPs. These signals must be controlled during configuration of the respective IPs. One such signal is the USB PWRRDY, which connects the SYSC and the USB PHY. This signal must to be controlled before and after the power to the USB PHY is turned off/on. Other similar signals include the following (according to the RZ/G3S hardware manual): * PCIe: - ALLOW_ENTER_L1 signal controlled through the SYS_PCIE_CFG register - PCIE_RST_RSM_B signal controlled through the SYS_PCIE_RST_RSM_B register - MODE_RXTERMINATION signal controlled through SYS_PCIE_PHY register * SPI: - SEL_SPI_OCTA signal controlled through SYS_IPCONT_SEL_SPI_OCTA register * I2C/I3C: - af_bypass I2C signals controlled through SYS_I2Cx_CFG registers (x=3D0..3) - af_bypass I3C signal controlled through SYS_I3C_CFG register * Ethernet: - FEC_GIGA_ENABLE Ethernet signals controlled through SYS_GETHx_CFG registers (x=3D0..1) Add #renesas,sysc-signal-cells DT property to allow different SYSC signals consumers to manage these signals. The goal is to enable consumers to specify the required access data for these signals (through device tree) and let their respective drivers control these signals via the syscon regmap provided by the system controller driver. For example, the USB PHY will describe this relation using the following DT property: usb2_phy1: usb-phy@11e30200 { // ... renesas,sysc-signal =3D <&sysc 0xd70 0x1>; // ... }; Along with it, add the syscon to the compatible list as it will be requested by the consumer drivers. The syscon was added to the rest of system controller variants as these are similar with RZ/G3S and can benefit from the implementation proposed in this series. Signed-off-by: Claudiu Beznea --- Changes in v2: - none; this patch is new .../soc/renesas/renesas,rzg2l-sysc.yaml | 23 ++++++++++++++----- 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/Documentation/devicetree/bindings/soc/renesas/renesas,rzg2l-sy= sc.yaml b/Documentation/devicetree/bindings/soc/renesas/renesas,rzg2l-sysc.= yaml index 4386b2c3fa4d..90f827e8de3e 100644 --- a/Documentation/devicetree/bindings/soc/renesas/renesas,rzg2l-sysc.yaml +++ b/Documentation/devicetree/bindings/soc/renesas/renesas,rzg2l-sysc.yaml @@ -19,11 +19,13 @@ description: =20 properties: compatible: - enum: - - renesas,r9a07g043-sysc # RZ/G2UL and RZ/Five - - renesas,r9a07g044-sysc # RZ/G2{L,LC} - - renesas,r9a07g054-sysc # RZ/V2L - - renesas,r9a08g045-sysc # RZ/G3S + items: + - enum: + - renesas,r9a07g043-sysc # RZ/G2UL and RZ/Five + - renesas,r9a07g044-sysc # RZ/G2{L,LC} + - renesas,r9a07g054-sysc # RZ/V2L + - renesas,r9a08g045-sysc # RZ/G3S + - const: syscon =20 reg: maxItems: 1 @@ -42,9 +44,17 @@ properties: - const: cm33stbyr_int - const: ca55_deny =20 + "#renesas,sysc-signal-cells": + description: + The number of cells needed to configure a SYSC controlled signal. Fi= rst + cell specifies the SYSC offset of the configuration register, second= cell + specifies the bitmask in register. + const: 2 + required: - compatible - reg + - "#renesas,sysc-signal-cells" =20 additionalProperties: false =20 @@ -53,7 +63,7 @@ examples: #include =20 sysc: system-controller@11020000 { - compatible =3D "renesas,r9a07g044-sysc"; + compatible =3D "renesas,r9a07g044-sysc", "syscon"; reg =3D <0x11020000 0x10000>; interrupts =3D , , @@ -61,4 +71,5 @@ examples: ; interrupt-names =3D "lpm_int", "ca55stbydone_int", "cm33stbyr_= int", "ca55_deny"; + #renesas,sysc-signal-cells =3D <2>; }; --=20 2.39.2 From nobody Mon Feb 9 10:38:58 2026 Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) (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 D95401B6D04 for ; Tue, 26 Nov 2024 09:21:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.43 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732612873; cv=none; b=P/hjJk50OVvU/E6JxCqZ4ev9LPq9/XmKYcD7Et4J5WV8LUoGfz1YNAYLuGETDb+jRW/9mN61DmUwZHOsEwSHzCokbYFB7KgYJxupUHVlzxXoFWRY9BhvxehmrYxV0ACwURg5xTx0qNkK0thOGzDm4kL1EmncI06XMaoUYdJ0i9Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732612873; c=relaxed/simple; bh=EqyCCrGqEJwg3+iLhcuJrpOwueTe8BY2KShqIIlG8ZY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=F8HmXr6mAT1vYhop+IQibB/vgjZK45fzwTB9iAsUxovKzbgjaAfgTdiFEkfwzttBuiH/IwnVq18VYNIIVnC7LJjZJUWO16lpoDYKw9OFiCAWHMEm6daCbP245e8X2QWD2D2dvl8jbN+5xNxIGr9iaWHE8UlO2y/056aBFkXtNzw= 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=WpmWgXyr; arc=none smtp.client-ip=209.85.128.43 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="WpmWgXyr" Received: by mail-wm1-f43.google.com with SMTP id 5b1f17b1804b1-4315c1c7392so49620265e9.1 for ; Tue, 26 Nov 2024 01:21:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1732612869; x=1733217669; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=5vCamtieJ1Any0nEDdOYudZWF6ph91xcO8/i+h+/3r0=; b=WpmWgXyrfuIkNdGBirDiL0o9+2F5c/OS9QxGPfWXRN14eKKiLmwatebdp8nz/Nq1hk OyohD5xO9pkHRT7odfi4tx+HukktcrVdtHGQQAdH3HQP3SaeSy2B3ynG/nH/1CXe6IG7 WNgEHOhQzJn/cDHa7kS8zUo+PHqz05tblKrdgTJFguG/Xn4Bf4PfUo7KzLHmDhdQ87Yg 1ckjGVQmD+DniYnpUUUeBd8Rj6DmQaXRmc+MteZ4bKIuM0KWYgCfaPoDikTp75gZIF0/ 6bgHXEZ8WK/3KNo5mVKDpQLD2r8/9UYw1GE6grw07hpOb8pq1cqFIjC0OAAXnWTStyeC HxZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732612869; x=1733217669; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=5vCamtieJ1Any0nEDdOYudZWF6ph91xcO8/i+h+/3r0=; b=Z1Mqw2st8Gc5hMfbCORmPBetGcH+7bPCzlBxCBUUZZuahtGL3Hk/3IGpQwoUN30iA1 NTmgD0LeBdI/QBbQY7tXhLvWOE+8oBosnWGckR2MwV3VWfK8jH8q4g9RxF1ICLxr3rm4 moPUtUbgBbEctKfwj3UfKqhW7qWCsk4zieznZKMpYMP5+aVEzG0hdkVsYO6lRe5rzG9z TniZxoY16B9GBdzeqsTSz047VAxZruCWa2LwWR82G9mz/4qQV82gbK+xcczDJhQ3tkf2 yR0O6aJMT8P+GAoQ1jrMXcueTCmB5K9ya5UdfIj+vpESeBpeagwTQeUIBV0fMe8zTBqo jMTQ== X-Forwarded-Encrypted: i=1; AJvYcCXdgVwkIEttL4jXgm36XvyIWDN3ffhrwjHN+kIB7V1GxhLQHqcETPKYa/IuIXQ3fPS5PTJHTieB/7efcM0=@vger.kernel.org X-Gm-Message-State: AOJu0YznqjzjWNMn8Vy+/NYpbG8m6gyaD8Cst+US8gG2+o41O1DqNiax 0rYYSwh7QP4PGXYxZ3VCxdu6DHLciTwc4h9COHEiNFVDIoNTgVmoiOVj0mAM3og= X-Gm-Gg: ASbGncuhIsC+YirzpatZmunDhaE5ZNpnuprNGsSFpK8nK6GddhzcnkHjI6QceJoLmLq yVUdz5EtIGVJ/LsHFND8gcOMbH3iKsnbe6e+W5bj1HlgT3rzHwzCKQU2LMdvAD+6W6LK8BCy/pS 3nipl5NyXtnDQQBOUX+wgYaZCmCqBvBmbAU6B0emW1u+agML2ih7SwfDkA8nnOz/AnMQNIETV2c vg5oMDHTZQk+RU3KyBuwFQO93B7p75oD9/hjHgWom0LM2xufZgV4xGU7enJ62gMy136S8hu7MzF pV0= X-Google-Smtp-Source: AGHT+IHaYOnIDbCpLmYeLO1a6tWYrQIEozAksJelkAeI7VXpQtyjiqqF3I9/uKkLk0h0PGHL3GFAQQ== X-Received: by 2002:a05:6000:2ad:b0:382:4a4e:25bb with SMTP id ffacd0b85a97d-38260bcc4fdmr15091977f8f.46.1732612868973; Tue, 26 Nov 2024 01:21:08 -0800 (PST) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.28]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3825fbc3a47sm13027694f8f.73.2024.11.26.01.21.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Nov 2024 01:21:08 -0800 (PST) From: Claudiu X-Google-Original-From: Claudiu To: vkoul@kernel.org, kishon@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, p.zabel@pengutronix.de, geert+renesas@glider.be, magnus.damm@gmail.com, gregkh@linuxfoundation.org, yoshihiro.shimoda.uh@renesas.com, christophe.jaillet@wanadoo.fr Cc: linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-usb@vger.kernel.org, claudiu.beznea@tuxon.dev, Claudiu Beznea Subject: [PATCH v2 02/15] soc: renesas: Add SYSC driver for Renesas RZ family Date: Tue, 26 Nov 2024 11:20:37 +0200 Message-Id: <20241126092050.1825607-3-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20241126092050.1825607-1-claudiu.beznea.uj@bp.renesas.com> References: <20241126092050.1825607-1-claudiu.beznea.uj@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Claudiu Beznea The RZ/G3S system controller (SYSC) has various registers that control signals specific to individual IPs. IP drivers must control these signals at different configuration phases. Add SYSC driver that allows individual SYSC consumers to control these signals. The SYSC driver exports a syscon regmap enabling IP drivers to use a specific SYSC offset and mask from the device tree, which can then be accessed through regmap_update_bits(). Currently, the SYSC driver provides control to the USB PWRRDY signal, which is routed to the USB PHY. This signal needs to be managed before or after powering the USB PHY off or on. Other SYSC signals candidates (as exposed in the the hardware manual of the RZ/G3S SoC) include: * PCIe: - ALLOW_ENTER_L1 signal controlled through the SYS_PCIE_CFG register - PCIE_RST_RSM_B signal controlled through the SYS_PCIE_RST_RSM_B register - MODE_RXTERMINATION signal controlled through SYS_PCIE_PHY register * SPI: - SEL_SPI_OCTA signal controlled through SYS_IPCONT_SEL_SPI_OCTA register * I2C/I3C: - af_bypass I2C signals controlled through SYS_I2Cx_CFG registers (x=3D0..3) - af_bypass I3C signal controlled through SYS_I3C_CFG register * Ethernet: - FEC_GIGA_ENABLE Ethernet signals controlled through SYS_GETHx_CFG registers (x=3D0..1) As different Renesas RZ SoC shares most of the SYSC functionalities available on the RZ/G3S SoC, the driver if formed of a SYSC core part and a SoC specific part allowing individual SYSC SoC to provide functionalities to the SYSC core. Signed-off-by: Claudiu Beznea --- Change in v2: - this was patch 04/16 in v1 - dropped the initial approach proposed in v1 where a with a reset controller driver was proposed to handle the USB PWRRDY signal - implemented it with syscon regmap and the SYSC signal concept (introduced in this patch) drivers/soc/renesas/Kconfig | 7 + drivers/soc/renesas/Makefile | 2 + drivers/soc/renesas/r9a08g045-sysc.c | 31 +++ drivers/soc/renesas/rz-sysc.c | 286 +++++++++++++++++++++++++++ drivers/soc/renesas/rz-sysc.h | 52 +++++ 5 files changed, 378 insertions(+) create mode 100644 drivers/soc/renesas/r9a08g045-sysc.c create mode 100644 drivers/soc/renesas/rz-sysc.c create mode 100644 drivers/soc/renesas/rz-sysc.h diff --git a/drivers/soc/renesas/Kconfig b/drivers/soc/renesas/Kconfig index 9f7fe02310b9..0686c3ad9e27 100644 --- a/drivers/soc/renesas/Kconfig +++ b/drivers/soc/renesas/Kconfig @@ -378,4 +378,11 @@ config PWC_RZV2M config RST_RCAR bool "Reset Controller support for R-Car" if COMPILE_TEST =20 +config SYSC_RZ + bool "System controller for RZ SoCs" if COMPILE_TEST + +config SYSC_R9A08G045 + bool "Renesas RZ/G3S System controller support" if COMPILE_TEST + select SYSC_RZ + endif # SOC_RENESAS diff --git a/drivers/soc/renesas/Makefile b/drivers/soc/renesas/Makefile index 734f8f8cefa4..8cd139b3dd0a 100644 --- a/drivers/soc/renesas/Makefile +++ b/drivers/soc/renesas/Makefile @@ -6,7 +6,9 @@ obj-$(CONFIG_SOC_RENESAS) +=3D renesas-soc.o ifdef CONFIG_SMP obj-$(CONFIG_ARCH_R9A06G032) +=3D r9a06g032-smp.o endif +obj-$(CONFIG_SYSC_R9A08G045) +=3D r9a08g045-sysc.o =20 # Family obj-$(CONFIG_PWC_RZV2M) +=3D pwc-rzv2m.o obj-$(CONFIG_RST_RCAR) +=3D rcar-rst.o +obj-$(CONFIG_SYSC_RZ) +=3D rz-sysc.o diff --git a/drivers/soc/renesas/r9a08g045-sysc.c b/drivers/soc/renesas/r9a= 08g045-sysc.c new file mode 100644 index 000000000000..ceea738aee72 --- /dev/null +++ b/drivers/soc/renesas/r9a08g045-sysc.c @@ -0,0 +1,31 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * RZ/G3S System controller driver + * + * Copyright (C) 2024 Renesas Electronics Corp. + */ + +#include +#include +#include + +#include "rz-sysc.h" + +#define SYS_USB_PWRRDY 0xd70 +#define SYS_USB_PWRRDY_PWRRDY_N BIT(0) +#define SYS_MAX_REG 0xe20 + +static const struct rz_sysc_signal_init_data rzg3s_sysc_signals_init_data[= ] __initconst =3D { + { + .name =3D "usb-pwrrdy", + .offset =3D SYS_USB_PWRRDY, + .mask =3D SYS_USB_PWRRDY_PWRRDY_N, + .refcnt_incr_val =3D 0 + } +}; + +const struct rz_sysc_init_data rzg3s_sysc_init_data =3D { + .signals_init_data =3D rzg3s_sysc_signals_init_data, + .num_signals =3D ARRAY_SIZE(rzg3s_sysc_signals_init_data), + .max_register_offset =3D SYS_MAX_REG, +}; diff --git a/drivers/soc/renesas/rz-sysc.c b/drivers/soc/renesas/rz-sysc.c new file mode 100644 index 000000000000..dc0edacd7170 --- /dev/null +++ b/drivers/soc/renesas/rz-sysc.c @@ -0,0 +1,286 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * RZ System controller driver + * + * Copyright (C) 2024 Renesas Electronics Corp. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "rz-sysc.h" + +/** + * struct rz_sysc - RZ SYSC private data structure + * @base: SYSC base address + * @dev: SYSC device pointer + * @signals: SYSC signals + * @num_signals: number of SYSC signals + */ +struct rz_sysc { + void __iomem *base; + struct device *dev; + struct rz_sysc_signal *signals; + u8 num_signals; +}; + +static int rz_sysc_reg_read(void *context, unsigned int off, unsigned int = *val) +{ + struct rz_sysc *sysc =3D context; + + *val =3D readl(sysc->base + off); + + return 0; +} + +static struct rz_sysc_signal *rz_sysc_off_to_signal(struct rz_sysc *sysc, = unsigned int offset, + unsigned int mask) +{ + struct rz_sysc_signal *signals =3D sysc->signals; + + for (u32 i =3D 0; i < sysc->num_signals; i++) { + if (signals[i].init_data->offset !=3D offset) + continue; + + /* + * In case mask =3D=3D 0 we just return the signal data w/o checking the= mask. + * This is useful when calling through rz_sysc_reg_write() to check + * if the requested setting is for a mapped signal or not. + */ + if (mask) { + if (signals[i].init_data->mask =3D=3D mask) + return &signals[i]; + } else { + return &signals[i]; + } + } + + return NULL; +} + +static int rz_sysc_reg_update_bits(void *context, unsigned int off, + unsigned int mask, unsigned int val) +{ + struct rz_sysc *sysc =3D context; + struct rz_sysc_signal *signal; + bool update =3D false; + + signal =3D rz_sysc_off_to_signal(sysc, off, mask); + if (signal) { + if (signal->init_data->refcnt_incr_val =3D=3D val) { + if (!refcount_read(&signal->refcnt)) { + refcount_set(&signal->refcnt, 1); + update =3D true; + } else { + refcount_inc(&signal->refcnt); + } + } else { + update =3D refcount_dec_and_test(&signal->refcnt); + } + } else { + update =3D true; + } + + if (update) { + u32 tmp; + + tmp =3D readl(sysc->base + off); + tmp &=3D ~mask; + tmp |=3D val & mask; + writel(tmp, sysc->base + off); + } + + return 0; +} + +static int rz_sysc_reg_write(void *context, unsigned int off, unsigned int= val) +{ + struct rz_sysc *sysc =3D context; + struct rz_sysc_signal *signal; + + /* + * Force using regmap_update_bits() for signals to have reference counter + * per individual signal in case there are multiple signals controlled + * through the same register. + */ + signal =3D rz_sysc_off_to_signal(sysc, off, 0); + if (signal) { + dev_err(sysc->dev, + "regmap_write() not allowed on register controlling a signal. Use regma= p_update_bits()!"); + return -EOPNOTSUPP; + } + + writel(val, sysc->base + off); + + return 0; +} + +static bool rz_sysc_writeable_reg(struct device *dev, unsigned int off) +{ + struct rz_sysc *sysc =3D dev_get_drvdata(dev); + struct rz_sysc_signal *signal; + + /* Any register containing a signal is writeable. */ + signal =3D rz_sysc_off_to_signal(sysc, off, 0); + if (signal) + return true; + + return false; +} + +static bool rz_sysc_readable_reg(struct device *dev, unsigned int off) +{ + struct rz_sysc *sysc =3D dev_get_drvdata(dev); + struct rz_sysc_signal *signal; + + /* Any register containing a signal is readable. */ + signal =3D rz_sysc_off_to_signal(sysc, off, 0); + if (signal) + return true; + + return false; +} + +static int rz_sysc_signals_show(struct seq_file *s, void *what) +{ + struct rz_sysc *sysc =3D s->private; + + seq_printf(s, "%-20s Enable count\n", "Signal"); + seq_printf(s, "%-20s ------------\n", "--------------------"); + + for (u8 i =3D 0; i < sysc->num_signals; i++) { + seq_printf(s, "%-20s %d\n", sysc->signals[i].init_data->name, + refcount_read(&sysc->signals[i].refcnt)); + } + + return 0; +} +DEFINE_SHOW_ATTRIBUTE(rz_sysc_signals); + +static void rz_sysc_debugfs_remove(void *data) +{ + debugfs_remove_recursive(data); +} + +static int rz_sysc_signals_init(struct rz_sysc *sysc, + const struct rz_sysc_signal_init_data *init_data, + u32 num_signals) +{ + struct dentry *root; + int ret; + + sysc->signals =3D devm_kcalloc(sysc->dev, num_signals, sizeof(*sysc->sign= als), + GFP_KERNEL); + if (!sysc->signals) + return -ENOMEM; + + for (u32 i =3D 0; i < num_signals; i++) { + struct rz_sysc_signal_init_data *id; + + id =3D devm_kzalloc(sysc->dev, sizeof(*id), GFP_KERNEL); + if (!id) + return -ENOMEM; + + id->name =3D devm_kstrdup(sysc->dev, init_data->name, GFP_KERNEL); + if (!id->name) + return -ENOMEM; + + id->offset =3D init_data->offset; + id->mask =3D init_data->mask; + id->refcnt_incr_val =3D init_data->refcnt_incr_val; + + sysc->signals[i].init_data =3D id; + refcount_set(&sysc->signals[i].refcnt, 0); + } + + sysc->num_signals =3D num_signals; + + root =3D debugfs_create_dir("renesas-rz-sysc", NULL); + ret =3D devm_add_action_or_reset(sysc->dev, rz_sysc_debugfs_remove, root); + if (ret) + return ret; + debugfs_create_file("signals", 0444, root, sysc, &rz_sysc_signals_fops); + + return 0; +} + +static struct regmap_config rz_sysc_regmap =3D { + .name =3D "rz_sysc_regs", + .reg_bits =3D 32, + .reg_stride =3D 4, + .val_bits =3D 32, + .fast_io =3D true, + .reg_read =3D rz_sysc_reg_read, + .reg_write =3D rz_sysc_reg_write, + .reg_update_bits =3D rz_sysc_reg_update_bits, + .writeable_reg =3D rz_sysc_writeable_reg, + .readable_reg =3D rz_sysc_readable_reg, +}; + +static const struct of_device_id rz_sysc_match[] =3D { +#ifdef CONFIG_SYSC_R9A08G045 + { .compatible =3D "renesas,r9a08g045-sysc", .data =3D &rzg3s_sysc_init_da= ta }, +#endif + { } +}; +MODULE_DEVICE_TABLE(of, rz_sysc_match); + +static int rz_sysc_probe(struct platform_device *pdev) +{ + const struct rz_sysc_init_data *data; + struct device *dev =3D &pdev->dev; + struct rz_sysc *sysc; + struct regmap *regmap; + int ret; + + data =3D device_get_match_data(dev); + if (!data || !data->max_register_offset) + return -EINVAL; + + sysc =3D devm_kzalloc(dev, sizeof(*sysc), GFP_KERNEL); + if (!sysc) + return -ENOMEM; + + sysc->base =3D devm_platform_ioremap_resource(pdev, 0); + if (IS_ERR(sysc->base)) + return PTR_ERR(sysc->base); + + sysc->dev =3D dev; + + ret =3D rz_sysc_signals_init(sysc, data->signals_init_data, data->num_sig= nals); + if (ret) + return ret; + + dev_set_drvdata(dev, sysc); + rz_sysc_regmap.max_register =3D data->max_register_offset; + regmap =3D devm_regmap_init(dev, NULL, sysc, &rz_sysc_regmap); + if (IS_ERR(regmap)) + return PTR_ERR(regmap); + + return of_syscon_register_regmap(dev->of_node, regmap); +} + +static struct platform_driver rz_sysc_driver =3D { + .driver =3D { + .name =3D "renesas-rz-sysc", + .of_match_table =3D rz_sysc_match + }, + .probe =3D rz_sysc_probe +}; + +static int __init rz_sysc_init(void) +{ + return platform_driver_register(&rz_sysc_driver); +} +subsys_initcall(rz_sysc_init); + +MODULE_DESCRIPTION("Renesas RZ System Controller Driver"); +MODULE_AUTHOR("Claudiu Beznea "); +MODULE_LICENSE("GPL"); diff --git a/drivers/soc/renesas/rz-sysc.h b/drivers/soc/renesas/rz-sysc.h new file mode 100644 index 000000000000..bb850310c931 --- /dev/null +++ b/drivers/soc/renesas/rz-sysc.h @@ -0,0 +1,52 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Renesas RZ System Controller + * + * Copyright (C) 2024 Renesas Electronics Corp. + */ + +#ifndef __SOC_RENESAS_RZ_SYSC_H__ +#define __SOC_RENESAS_RZ_SYSC_H__ + +#include +#include + +/** + * struct rz_sysc_signal_init_data - RZ SYSC signals init data + * @name: signal name + * @offset: register offset controling this signal + * @mask: bitmask in register specific to this signal + * @refcnt_incr_val: increment refcnt when setting this value + */ +struct rz_sysc_signal_init_data { + const char *name; + u32 offset; + u32 mask; + u32 refcnt_incr_val; +}; + +/** + * struct rz_sysc_signal - RZ SYSC signals + * @init_data: signals initialization data + * @refcnt: reference counter + */ +struct rz_sysc_signal { + const struct rz_sysc_signal_init_data *init_data; + refcount_t refcnt; +}; + +/** + * struct rz_sysc_init_data - RZ SYSC initialization data + * @signals_init_data: RZ SYSC signals initialization data + * @num_signals: number of SYSC signals + * @max_register_offset: Maximum SYSC register offset to be used by the re= gmap config + */ +struct rz_sysc_init_data { + const struct rz_sysc_signal_init_data *signals_init_data; + u32 num_signals; + u32 max_register_offset; +}; + +extern const struct rz_sysc_init_data rzg3s_sysc_init_data; + +#endif /* __SOC_RENESAS_RZ_SYSC_H__ */ --=20 2.39.2 From nobody Mon Feb 9 10:38:58 2026 Received: from mail-wr1-f42.google.com (mail-wr1-f42.google.com [209.85.221.42]) (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 6D5671BDAA1 for ; Tue, 26 Nov 2024 09:21:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.42 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732612875; cv=none; b=pzTPyDqJJwcC9nErjYPzoQH+QmXwwdSZJ7t7y9tU66LxxQrPSUyqeHimM6szV1ktRV95v4nJbkPQNfivL+hokc+5vtuPV7aD+MMlcvtkwDVHqcUr192XTzw8jr79OJq9Caj3MDOjmx2ckyDYdUooveFU3SuScr6R0PablNKoLIk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732612875; c=relaxed/simple; bh=L3W0t3Ndk3P8WFZClVN2UXeegBaVgcbm+UbE0rvxIiE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=rfJ8/v97RKLeiqSSozWRjF4RZOzzBn2L/B/mVYAvHhjFdqQl4V+0VZNaZ++HsooE2TNcNzNN/cnn3erXHttoLLAubp062OTl83QJhutbgp0plARzaqXZ7GzIEO05lMITJYQuYSMsaINpwdtljkntEwi00/toiQlPtP+MQ6iyLv4= 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=FxVeUVkd; arc=none smtp.client-ip=209.85.221.42 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="FxVeUVkd" Received: by mail-wr1-f42.google.com with SMTP id ffacd0b85a97d-3824709ee03so3875893f8f.2 for ; Tue, 26 Nov 2024 01:21:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1732612871; x=1733217671; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=rHg/UpXu0kAmh5cmR42CQBOhisgGmi+P1vH8bY184Vc=; b=FxVeUVkdWtHtY+sPUI6sqE21pehNBnfcBSO5Fe1XNeyDBtjrbLY3RCNlA9/TolWQID Li6rQ/qS3Qh6mPiK7z9ApvT8z9JjymMMtd+NjW2aisnUHkJu/OsDe2JbsoL+qrGxcDyk CucYUv9Ww06tLU/VIw/gNdOyMI5aYZoAGSBuhu8/SF4RZynySUvU4YTf7CrqB/iyiGdt m2DnCMY/tP4KoUn3LROhr7lKQerMxxcN/EVyGCfBSGZUa1bGP329cqKM9Ijwy9eIK3Fy eP2rPHYrwecpEiSyGDpz6s7hEvgSOjXqhNKs51pqZBZSG+PIxckU5X50yuAjDBkpJuVm ue2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732612871; x=1733217671; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=rHg/UpXu0kAmh5cmR42CQBOhisgGmi+P1vH8bY184Vc=; b=VhmQoFeLQ0Q7yLo6cy1ppZsdTl09a8BWkJuqX79oN8SNqYWG7FkRQGDFK2KKpKiE6T IdlHt8fPo7nHM4eGQBxGwB1yGXqf+5wwgj9Zk0T9Vs2c7hsYujLSFrn/5q2OE5hiKjjX 8MuomoOpnlcZfx6Abi+8ophCzpmMeIHTu2jdjuIVw4rqAyYiBvZze0t9aGb8mhQgWSNC u1Q7lp+SGahLxRjQx3FnPeldzaz6Ac2ZanEt4zIFjY8kbOGfbUQ9ICzgImyN9NQRrg6V iOMBt9WHIl63GbQHFqRgnZTm7L3ODZ5+UHC6S9jtpKBCPWojMQpM176xaynaOs03HSAK Z6Sw== X-Forwarded-Encrypted: i=1; AJvYcCUsdJwgKVBE69GzSrbgeQobIlEO8qGM2FqUOkzsVnJFncIO98Zzb/fo8/PCIxh6ls/yxWpLe4S9JJVT404=@vger.kernel.org X-Gm-Message-State: AOJu0YwMqKfsdPFatFTEb3ESk1V3E9E41zVtutMTv4q1Ek9zbSx6NSYj fN8fkQ0/A0bWgX/eqZV/UykPTJVbIMjgdyeByLoC2bH5DTOj3aB+ZXN6IEIcnus= X-Gm-Gg: ASbGncuxJqeylls3MygPS6ALN/egdAh+6j4rjKJ0zgSTj14YhG+IdL45vkrI5Lb/ZkW NvTMtdZvQnNklzxn6gJn733V/Hb9JHZeRzixcZnk/q4B6z5CNtZEGPqczgM/ZArLsSOxayhI5+f UnPbdmYeD9l6h7bb3OLsWjRACQWlnak6b8p+IjztOJe37jojBlQSJWuUGPTzI9qNNqIwRnHoq5M 88FKMn8TLQ3j1/GxvDCEFeeRamFzJr43Dlwwns7ceEIyjz0qSQW1iJ30U0eUx5igQNKUcJ7Yr0R Ilg= X-Google-Smtp-Source: AGHT+IHWio7klIaUm9lWwgg66sT0uRqFvChifk0YrFUVIwja8OlGoGemJIscbif1ZB71H5mZ9kHl7w== X-Received: by 2002:a5d:5849:0:b0:382:4ce5:f8a4 with SMTP id ffacd0b85a97d-38260be54f9mr11141729f8f.53.1732612870798; Tue, 26 Nov 2024 01:21:10 -0800 (PST) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.28]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3825fbc3a47sm13027694f8f.73.2024.11.26.01.21.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Nov 2024 01:21:10 -0800 (PST) From: Claudiu X-Google-Original-From: Claudiu To: vkoul@kernel.org, kishon@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, p.zabel@pengutronix.de, geert+renesas@glider.be, magnus.damm@gmail.com, gregkh@linuxfoundation.org, yoshihiro.shimoda.uh@renesas.com, christophe.jaillet@wanadoo.fr Cc: linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-usb@vger.kernel.org, claudiu.beznea@tuxon.dev, Claudiu Beznea Subject: [PATCH v2 03/15] soc: renesas: rz-sysc: Enable SYSC driver for RZ/G3S Date: Tue, 26 Nov 2024 11:20:38 +0200 Message-Id: <20241126092050.1825607-4-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20241126092050.1825607-1-claudiu.beznea.uj@bp.renesas.com> References: <20241126092050.1825607-1-claudiu.beznea.uj@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Claudiu Beznea Enable SYSC driver for RZ/G3S. This is necessary for USB support. Signed-off-by: Claudiu Beznea Reviewed-by: Geert Uytterhoeven --- Changes in v2: - none; this patch is new drivers/soc/renesas/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/soc/renesas/Kconfig b/drivers/soc/renesas/Kconfig index 0686c3ad9e27..c8065f25ee53 100644 --- a/drivers/soc/renesas/Kconfig +++ b/drivers/soc/renesas/Kconfig @@ -334,6 +334,7 @@ config ARCH_R9A07G054 config ARCH_R9A08G045 bool "ARM64 Platform support for RZ/G3S" select ARCH_RZG2L + select SYSC_R9A08G045 help This enables support for the Renesas RZ/G3S SoC variants. =20 --=20 2.39.2 From nobody Mon Feb 9 10:38:58 2026 Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com [209.85.128.45]) (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 E3C031C1F02 for ; Tue, 26 Nov 2024 09:21:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.45 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732612875; cv=none; b=uSRxBh+bOzirpUEtLDY/72n0cIUCxIxXNT1wrzWmOfybqiAFc7acCTeNughgU1aYX/l1TtMP0Yu92c6GbCPHZ9yxoMOfJyXJ8dnodPcYKBHWaF05zEeI6B78SD8mamKE8liZmiD6am74/ujcghk8KDMC6TCo/NXNiFIlyWQa9uc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732612875; c=relaxed/simple; bh=okZZML2tc4SYJzj0YGY5NcNIBGhTp8dqg/vTqnmY3SY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=T+EN7X/vUCThaVmipDAk8z6SJTwnxtz4NzXFlCiUwaepTbDBP7i3rBSOUcu9mnDGuN6SJEJREs1vyS/O8ptA+B4dGDNcGcy+rN+WG0f6sd3SGZYUxTSdFO4UF86lJAGwL9NuulMqyQY5dHdImgHxdW6unwXPkUE9ZcFPq4bd35w= 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=bNOjl/S5; arc=none smtp.client-ip=209.85.128.45 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="bNOjl/S5" Received: by mail-wm1-f45.google.com with SMTP id 5b1f17b1804b1-4315c1c7392so49620785e9.1 for ; Tue, 26 Nov 2024 01:21:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1732612872; x=1733217672; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=VDINqiI7eZIxSdpV6EMx/C3NNutYl7b6+j2YZ5M4Qvg=; b=bNOjl/S5uwPrg6QR9r4uvpJWWI/onLN+H2g5+ab6xGa7jvGAwqhfeW4LzMiewJbo15 boAuzeEnL353Hth/rk2rk3Hu7A5Jaz3I9yPDzy0d+Gj8wZSpNQ+1qo+++ZnJMPQ6R/J+ j3FcQnBaPbyd4/OD1QzY7DzDaWM5wa47YZUOtc+mnqYxAZhPdLrTm05A56/Wu6gG9Lxu HPGHABZJmxVeB96ztwfaPEfVKqkXedrvb77nFrAt+bcaZYzOUsx1SoW8rsxRwSwFNUrJ jx1+La3RJ3+eIzKd6dCEZCvX2aXPCT7a7So76dgSyVn9K8kwmCrf92IXtk8LcaQKr/Zk X2nQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732612872; x=1733217672; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=VDINqiI7eZIxSdpV6EMx/C3NNutYl7b6+j2YZ5M4Qvg=; b=q07Y7dno9JO9dWQSeaaCr4IvADIaHJtx1lbNXgwqLX3nC37EFflMBe4jxinSJW6CY0 Tu1eb3DNMYSm1FW3SC5lZsdyo9EPNmjQeAuccZE8axPz0Ybv4q+tkjO24wJZrMki8WwC gCVH77CmTR3BhKq71438R+SrToCQnZ9rPgxooJV9DzxVELGaSfmrGdoNHS61xxhSyBs9 Pd1a6M2PaUnCW8/e280qAZuPK/O0cSP08FWOcrTwOalPnciOK5ubNh83l+0/NpNfpD7S InJLvrbScrspMYj1EHhE1GPCRqTJWYE6DeG5xrcpztFcCsEQ1860GxuPvTinA9QI49AU aldg== X-Forwarded-Encrypted: i=1; AJvYcCVhjiObRFFNhA4k4kJBdViuYbl/alTkCuBfMyvQwxNyVWUk9Y4w6VKjCPNjcBrhnLb4dYZW99nbG4/cXx0=@vger.kernel.org X-Gm-Message-State: AOJu0YxrZ8s6E6AKLlyuWz5dqIElLSDM5IbH5XRHx8mpPAgSW+WNcpWv mahehOvpLa2I29/KyDitU0nO/MKgtGW89i/fzvJufZ0OhGSNV12GhX1vKjTU3uY= X-Gm-Gg: ASbGncu0b/fFzE9yxyUB7si+0OiA45cB4pNLDU7V794d7Si3qsm8fRUbmP14XNcu+4w Us+1Z9V2SCNRmp40dZgQRuDouEchArc72NyW63b5xI+wNf3bNQdXFNmq6ZizF2Q0cb+cuW7C4uo ln92WI+d74p9CDC8+3x0esrZEVJf2BBgLs1bMeBWbKxjt3zRUtWcJvsN1XVIN5LvJmrNMABKNkS EfxVlV+Rx08i8NlwoQVERlRHoz9YKjAczlwJ5kK3SYxDCZPwTtG97YsQwmJ9IXXv6wQHGW4DZ83 W/A= X-Google-Smtp-Source: AGHT+IFiAn9ufP/2lxYbOVs5nw6bxrcqi6yQ6uQejelWxHdSz9crLVthGd227EDJ3fiqmZHYRLomqQ== X-Received: by 2002:a05:600c:1c23:b0:434:9e63:faff with SMTP id 5b1f17b1804b1-4349e63fe62mr73118195e9.2.1732612872339; Tue, 26 Nov 2024 01:21:12 -0800 (PST) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.28]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3825fbc3a47sm13027694f8f.73.2024.11.26.01.21.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Nov 2024 01:21:11 -0800 (PST) From: Claudiu X-Google-Original-From: Claudiu To: vkoul@kernel.org, kishon@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, p.zabel@pengutronix.de, geert+renesas@glider.be, magnus.damm@gmail.com, gregkh@linuxfoundation.org, yoshihiro.shimoda.uh@renesas.com, christophe.jaillet@wanadoo.fr Cc: linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-usb@vger.kernel.org, claudiu.beznea@tuxon.dev, Claudiu Beznea Subject: [PATCH v2 04/15] soc: renesas: rz-sysc: Add SoC detection support Date: Tue, 26 Nov 2024 11:20:39 +0200 Message-Id: <20241126092050.1825607-5-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20241126092050.1825607-1-claudiu.beznea.uj@bp.renesas.com> References: <20241126092050.1825607-1-claudiu.beznea.uj@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Claudiu Beznea The RZ SYSC controller has registers that keep the SoC ID data. Add driver support to retrieve the SoC ID and register a SoC driver. Signed-off-by: Claudiu Beznea --- Changes in v2: - this was patch 05/16 in v1 - changed patch title and description - added SoC initialization code in its own function - addressed the review comments - introduced struct rz_sysc_soc_id_init_data and adjusted the code accordingly - dropped the RZ/G3S SoC detection code (it will be introduced in a separate patch) drivers/soc/renesas/rz-sysc.c | 72 +++++++++++++++++++++++++++++++++-- drivers/soc/renesas/rz-sysc.h | 18 +++++++++ 2 files changed, 86 insertions(+), 4 deletions(-) diff --git a/drivers/soc/renesas/rz-sysc.c b/drivers/soc/renesas/rz-sysc.c index dc0edacd7170..d34d295831b8 100644 --- a/drivers/soc/renesas/rz-sysc.c +++ b/drivers/soc/renesas/rz-sysc.c @@ -14,9 +14,12 @@ #include #include #include +#include =20 #include "rz-sysc.h" =20 +#define field_get(_mask, _reg) (((_reg) & (_mask)) >> (ffs(_mask) - 1)) + /** * struct rz_sysc - RZ SYSC private data structure * @base: SYSC base address @@ -211,6 +214,59 @@ static int rz_sysc_signals_init(struct rz_sysc *sysc, return 0; } =20 +static int rz_sysc_soc_init(struct rz_sysc *sysc, const struct of_device_i= d *match) +{ + const struct rz_sysc_init_data *sysc_data =3D match->data; + const struct rz_sysc_soc_id_init_data *soc_data =3D sysc_data->soc_id_ini= t_data; + struct soc_device_attribute *soc_dev_attr; + const char *soc_id_start, *soc_id_end; + u32 val, revision, specific_id; + struct soc_device *soc_dev; + char soc_id[32] =3D {0}; + u8 size; + + if (!soc_data || !soc_data->family || !soc_data->offset || + !soc_data->revision_mask) + return -EINVAL; + + soc_id_start =3D strchr(match->compatible, ',') + 1; + soc_id_end =3D strchr(match->compatible, '-'); + size =3D soc_id_end - soc_id_start; + if (size > 32) + size =3D 32; + strscpy(soc_id, soc_id_start, size); + + soc_dev_attr =3D devm_kzalloc(sysc->dev, sizeof(*soc_dev_attr), GFP_KERNE= L); + if (!soc_dev_attr) + return -ENOMEM; + + soc_dev_attr->family =3D soc_data->family; + soc_dev_attr->soc_id =3D devm_kstrdup(sysc->dev, soc_id, GFP_KERNEL); + if (!soc_dev_attr->soc_id) + return -ENOMEM; + + val =3D readl(sysc->base + soc_data->offset); + revision =3D field_get(soc_data->revision_mask, val); + specific_id =3D field_get(soc_data->specific_id_mask, val); + soc_dev_attr->revision =3D devm_kasprintf(sysc->dev, GFP_KERNEL, "%u", re= vision); + if (!soc_dev_attr->revision) + return -ENOMEM; + + if (soc_data->id && specific_id !=3D soc_data->id) { + dev_warn(sysc->dev, "SoC mismatch (product =3D 0x%x)\n", specific_id); + return -ENODEV; + } + + dev_info(sysc->dev, "Detected Renesas %s %s Rev %s\n", soc_dev_attr->fami= ly, + soc_dev_attr->soc_id, soc_dev_attr->revision); + + soc_dev =3D soc_device_register(soc_dev_attr); + if (IS_ERR(soc_dev)) + return PTR_ERR(soc_dev); + + return 0; +} + static struct regmap_config rz_sysc_regmap =3D { .name =3D "rz_sysc_regs", .reg_bits =3D 32, @@ -235,14 +291,15 @@ MODULE_DEVICE_TABLE(of, rz_sysc_match); static int rz_sysc_probe(struct platform_device *pdev) { const struct rz_sysc_init_data *data; + const struct of_device_id *match; struct device *dev =3D &pdev->dev; - struct rz_sysc *sysc; struct regmap *regmap; + struct rz_sysc *sysc; int ret; =20 - data =3D device_get_match_data(dev); - if (!data || !data->max_register_offset) - return -EINVAL; + match =3D of_match_node(rz_sysc_match, dev->of_node); + if (!match || !match->data) + return -ENODEV; =20 sysc =3D devm_kzalloc(dev, sizeof(*sysc), GFP_KERNEL); if (!sysc) @@ -253,6 +310,13 @@ static int rz_sysc_probe(struct platform_device *pdev) return PTR_ERR(sysc->base); =20 sysc->dev =3D dev; + ret =3D rz_sysc_soc_init(sysc, match); + if (ret) + return ret; + + data =3D match->data; + if (!data->max_register_offset) + return -EINVAL; =20 ret =3D rz_sysc_signals_init(sysc, data->signals_init_data, data->num_sig= nals); if (ret) diff --git a/drivers/soc/renesas/rz-sysc.h b/drivers/soc/renesas/rz-sysc.h index bb850310c931..babca9c743c7 100644 --- a/drivers/soc/renesas/rz-sysc.h +++ b/drivers/soc/renesas/rz-sysc.h @@ -35,13 +35,31 @@ struct rz_sysc_signal { refcount_t refcnt; }; =20 +/** + * struct rz_syc_soc_id_init_data - RZ SYSC SoC identification initializat= ion data + * @family: RZ SoC family + * @id: RZ SoC expected ID + * @offset: SYSC SoC ID register offset + * @revision_mask: SYSC SoC ID revision mask + * @specific_id_mask: SYSC SoC ID specific ID mask + */ +struct rz_sysc_soc_id_init_data { + const char * const family; + u32 id; + u32 offset; + u32 revision_mask; + u32 specific_id_mask; +}; + /** * struct rz_sysc_init_data - RZ SYSC initialization data + * @soc_id_init_data: RZ SYSC SoC ID initialization data * @signals_init_data: RZ SYSC signals initialization data * @num_signals: number of SYSC signals * @max_register_offset: Maximum SYSC register offset to be used by the re= gmap config */ struct rz_sysc_init_data { + const struct rz_sysc_soc_id_init_data *soc_id_init_data; const struct rz_sysc_signal_init_data *signals_init_data; u32 num_signals; u32 max_register_offset; --=20 2.39.2 From nobody Mon Feb 9 10:38:58 2026 Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) (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 7E05D1B413C for ; Tue, 26 Nov 2024 09:21:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732612877; cv=none; b=Bw+xhkP8VolFZIcO/rKWH+hAueUtNzxQbN/SkzvtfAlr50X4KmUNtrDl60PuLJoXwMt2zmxZr9RJfO0e3rlF/vy4itTj+jiyRMNq6jIb5iqLXPy0gOfmdBm+9baEcfrk0x53VHwgcGoaY5WwF7IfRj9j8DHzvMiJdIcwuroS+Vc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732612877; c=relaxed/simple; bh=4F232ENECAOLomVUSY8tBxTq5zAbQQSu7jUMFMN+Pp4=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=h9qhs/+XBkQtZMKNvq1hbqFGGLYfnLN1fE06rIFiY90/ncP/uAccDYuP06HIyBQyk2oWqaesAoRJFkGXVufLke27MRZlZ2nboD+naNhe3d6QLJMhtt/GPqDex18Ss9OHkfg8e2Bwn7U9BhTeQmRG2vNvBbb+ztXaiipTL84E0Yo= 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=IirP2PBv; arc=none smtp.client-ip=209.85.128.52 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="IirP2PBv" Received: by mail-wm1-f52.google.com with SMTP id 5b1f17b1804b1-43162cf1eaaso67086815e9.0 for ; Tue, 26 Nov 2024 01:21:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1732612874; x=1733217674; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=LKW3EfLpg9xj1NAX34ulRBb1/poqN6qEBq3WFAZfenM=; b=IirP2PBvcho0H6iTKUBPqaFzZSLbr1s7FmnuIkmTtgERTsDdFAzdIRHukfAB2WgkpW 3vGQapU8wAhXsndg+PAL+Mt3Y0nI5ePH+lHgwdVr29Lmf12twCqc0vR/ABqtQvET9ICv ZgXCMAPJdtcginb9Hy+pvQf6zGMIhJhbuv9PaNW3sS0SF4luQBW3CIvAN5+sHujMMCbZ DZjj1EBi/vf0xotjebPF8mbkXsZ/5+GtFUXqPEnnQ3XH9SxrlFxc1ceFghiUYRAnZvJR F6U9iXNYMBbXmP1x5wJbzMroauFk030pDfTT2bnCCa9snMx7W6fNONnlSsML246LhHnu wnbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732612874; x=1733217674; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=LKW3EfLpg9xj1NAX34ulRBb1/poqN6qEBq3WFAZfenM=; b=TyFxaHHawWWx/LEnjvHAJMk8jsSuMvAx8w2kYZNrnB1H7QD0JU1cE0j60XK/Shyk6n 7mA/UyLDHtbrFzJerv4A1SNfFZzMhBf3Buc+xnap+gOWyIl1xqr9OvaqZ8ZM/6mxoXJB 3nHgSe6klA2wYSo4OiQp/oPXTLy982rgiZNsNbYDMkEpTAG+9VcxNEE9xVeGYGjQP5c5 Mjp3tfECKwpPAzd0Dq6oJJLOpGkLSkoQ91oKKtecKexgMSH9KS0tPW0hWcMwDgrpp1Jl HwIJ5GpTOVLKVl+bthsA+jn9X+x8+oqWol2qLwS5P2JK7sPJ1uiiHgoEtYLRhbKAP24e d9pg== X-Forwarded-Encrypted: i=1; AJvYcCWVAZwU2zw7FSbwUt+ihaLM7GV/Vly86wqdDxBISnvW0NB9Eto2Na2Qk4OCXCmt6FRR71s6aXqXX4S7k88=@vger.kernel.org X-Gm-Message-State: AOJu0Yz/oYX9XCnaSlyKSlfG8yKXU4JwPz4ugdQjBbVtqwd/K9HQyQe0 rvsiJVxB4C1BAwEDi4cT4GqoXeZfMvL5UGKOMCHG4q+RF98GpXBLliyYaw8m7IQ= X-Gm-Gg: ASbGncuI6x+qdYWLunuGFJe5wJWZ+/R0VrGMVsdcQmQlUQgW8MiXOkXWzRcWMjSsgah KFObr/aqv67dCQBKQ4mxnY8pR9QEMWbwddAtIkBGu/q8FyVvhXScXA+6XcLkm48YntkN++0qu7f ONMnmiTVXp22sMZesDWN8jGThwKei1nYztib8TBtUXcrfy/CXhE3mXqbfUOdQPDxUioo6Jv8mVa v9ydXGqSg5haUvXELCk+LekQh/ahhwmd8B8Gi0QHDtv8IQM1OpqCxuJ/aY3EukK3//KvIRFUhqu gBc= X-Google-Smtp-Source: AGHT+IE7w+dBoCGCxxbUApCfNcapHwRVn5rVPYIN6Suv5fX7t/i3bspO7Ak4XFCK5NYSFpFy53f9sQ== X-Received: by 2002:a05:600c:5122:b0:428:d31:ef25 with SMTP id 5b1f17b1804b1-433ce41ffc9mr177417025e9.12.1732612874002; Tue, 26 Nov 2024 01:21:14 -0800 (PST) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.28]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3825fbc3a47sm13027694f8f.73.2024.11.26.01.21.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Nov 2024 01:21:13 -0800 (PST) From: Claudiu X-Google-Original-From: Claudiu To: vkoul@kernel.org, kishon@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, p.zabel@pengutronix.de, geert+renesas@glider.be, magnus.damm@gmail.com, gregkh@linuxfoundation.org, yoshihiro.shimoda.uh@renesas.com, christophe.jaillet@wanadoo.fr Cc: linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-usb@vger.kernel.org, claudiu.beznea@tuxon.dev, Claudiu Beznea Subject: [PATCH v2 05/15] soc: renesas: rz-sysc: Move RZ/G3S SoC detection to the SYSC driver Date: Tue, 26 Nov 2024 11:20:40 +0200 Message-Id: <20241126092050.1825607-6-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20241126092050.1825607-1-claudiu.beznea.uj@bp.renesas.com> References: <20241126092050.1825607-1-claudiu.beznea.uj@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Claudiu Beznea Now that we have SoC detection in the RZ SYSC driver, move the RZ/G3S SoC detection to it. The SYSC provides SoC ID in its own registers. Signed-off-by: Claudiu Beznea Reviewed-by: Geert Uytterhoeven --- Changes in v2: - this was handled though patch 05/16 in v1=20 - provide SoC specific init data through the SoC specific driver drivers/soc/renesas/r9a08g045-sysc.c | 12 ++++++++++++ drivers/soc/renesas/renesas-soc.c | 12 ------------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/soc/renesas/r9a08g045-sysc.c b/drivers/soc/renesas/r9a= 08g045-sysc.c index ceea738aee72..81970db300b2 100644 --- a/drivers/soc/renesas/r9a08g045-sysc.c +++ b/drivers/soc/renesas/r9a08g045-sysc.c @@ -11,6 +11,9 @@ =20 #include "rz-sysc.h" =20 +#define SYS_LSI_DEVID 0xa04 +#define SYS_LSI_DEVID_REV GENMASK(31, 28) +#define SYS_LSI_DEVID_SPECIFIC GENMASK(27, 0) #define SYS_USB_PWRRDY 0xd70 #define SYS_USB_PWRRDY_PWRRDY_N BIT(0) #define SYS_MAX_REG 0xe20 @@ -24,7 +27,16 @@ static const struct rz_sysc_signal_init_data rzg3s_sysc_= signals_init_data[] __in } }; =20 +static const struct rz_sysc_soc_id_init_data rzg3s_sysc_soc_id_init_data _= _initconst =3D { + .family =3D "RZ/G3S", + .id =3D 0x85e0447, + .offset =3D SYS_LSI_DEVID, + .revision_mask =3D SYS_LSI_DEVID_REV, + .specific_id_mask =3D SYS_LSI_DEVID_SPECIFIC +}; + const struct rz_sysc_init_data rzg3s_sysc_init_data =3D { + .soc_id_init_data =3D &rzg3s_sysc_soc_id_init_data, .signals_init_data =3D rzg3s_sysc_signals_init_data, .num_signals =3D ARRAY_SIZE(rzg3s_sysc_signals_init_data), .max_register_offset =3D SYS_MAX_REG, diff --git a/drivers/soc/renesas/renesas-soc.c b/drivers/soc/renesas/renesa= s-soc.c index 172d59e6fbcf..425d9037dcd0 100644 --- a/drivers/soc/renesas/renesas-soc.c +++ b/drivers/soc/renesas/renesas-soc.c @@ -71,10 +71,6 @@ static const struct renesas_family fam_rzg2ul __initcons= t __maybe_unused =3D { .name =3D "RZ/G2UL", }; =20 -static const struct renesas_family fam_rzg3s __initconst __maybe_unused = =3D { - .name =3D "RZ/G3S", -}; - static const struct renesas_family fam_rzv2h __initconst __maybe_unused = =3D { .name =3D "RZ/V2H", }; @@ -176,11 +172,6 @@ static const struct renesas_soc soc_rz_g2ul __initcons= t __maybe_unused =3D { .id =3D 0x8450447, }; =20 -static const struct renesas_soc soc_rz_g3s __initconst __maybe_unused =3D { - .family =3D &fam_rzg3s, - .id =3D 0x85e0447, -}; - static const struct renesas_soc soc_rz_v2h __initconst __maybe_unused =3D { .family =3D &fam_rzv2h, .id =3D 0x847a447, @@ -410,9 +401,6 @@ static const struct of_device_id renesas_socs[] __initc= onst __maybe_unused =3D { #ifdef CONFIG_ARCH_R9A07G054 { .compatible =3D "renesas,r9a07g054", .data =3D &soc_rz_v2l }, #endif -#ifdef CONFIG_ARCH_R9A08G045 - { .compatible =3D "renesas,r9a08g045", .data =3D &soc_rz_g3s }, -#endif #ifdef CONFIG_ARCH_R9A09G011 { .compatible =3D "renesas,r9a09g011", .data =3D &soc_rz_v2m }, #endif --=20 2.39.2 From nobody Mon Feb 9 10:38:58 2026 Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.44]) (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 236C51CDFBE for ; Tue, 26 Nov 2024 09:21:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.44 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732612880; cv=none; b=cUnEmVs7mRmzdtKZ2UxdU9Hk78rCCsV1tPdAHoWZaHVl5UBx2+Ux4q54FvGuz4dShu/sW5Cw4mA8b7ScpgZz9XTQtevL6wSNxzfqozQtGa+2jVyJaoxMAKC91RgLxx7g1W6Qun1WqEdekh602fYbshh0HBq1Ryc2K+KstQlmZZk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732612880; c=relaxed/simple; bh=peR4Vif7woHWK7GGXYa577M+2RIwJeK0uX7OsLiQUiU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=hX7hNrrr/b4UaZEy8hGdffTwdPh7F/TC20QQ53D8SOUQYBdbYyFjov4zw2xT6dsgipH4eD0sj5hsPR2ZiJyev0epWwDd3Wbv2nWWID8zaFvvlkFDrTSHcCD+ICpaQeeV0NAQMfBrOXVgclF7gEeickHcLRj+u1J/1Tlgk5mNd6M= 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=k2w87Jjk; arc=none smtp.client-ip=209.85.128.44 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="k2w87Jjk" Received: by mail-wm1-f44.google.com with SMTP id 5b1f17b1804b1-4349e4e252dso18860435e9.0 for ; Tue, 26 Nov 2024 01:21:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1732612876; x=1733217676; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=sn4qpT/iGLCOuVRl/HhbV74eVKZi/FzZDWa4nL4zSFw=; b=k2w87JjkHiabvDLC4jaRhmjbfFPncA2OiY4Gaxwqmhc5ne188YaKHCRXNjLeianRqW 1493NnWQGtdSNN7Axs8Q3bg5IWUWBQcQm4koKNyZAfBQK5lP9tnG2IWpSf8ULwHhQK2p x+3wNDSM2BDkbdFDIqnl1mGB2g7zjbqy6FGGotYxIAHz90d/iw9dWV1N4U8w0wm+hvbt PrhPOrvOevVl+8ZO9I6tY6+yZDQ7vippzhKOM1YmjuuqY4X2HfkZ+rGlW2KcMSPbtR0Z q/iPzepPY3vNz1N5Ec4far7nRrhIgx3o5mpIdhRuY2o0EFGRlTT1+oGZwsyN6rN+GIlL aBhw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732612876; x=1733217676; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=sn4qpT/iGLCOuVRl/HhbV74eVKZi/FzZDWa4nL4zSFw=; b=o2q7JmlBkT1WrQ3X+cYDpkUCDQwS19hnC0ni7EgwgkLMYWPDin73GTzjKdSWA4qrMx hhaTnWDzwSF/g9i+tj6cw0rezleZTXMKKRRJ45l0ppW8cGsAbAeJoRNhxI9AX4rfGJ1C Xgh3jrEukn4LO0Ov0KnWQUr8HTc3Zd+SXN/Y1D/4jKI1kAEB21XubTvQFsdpkkXEs7N7 sp7nHvsAo8tzzv50RghW4aHM5d/wrHZfzir7Iox/zsXaxsvihKY1z8KEGfPFDahTPdkN YPwOePXZIE0aW/KtOkCEyOcTwLlpKAByPuIamHmscpuv9ixf+KMTliEPqaNW+QyGLTpQ wp1w== X-Forwarded-Encrypted: i=1; AJvYcCUk14dZmQ/2tH1LkdAXxUwZf4BZWY8TA8CuDifLnm6glW3XfVVsm2WEEcWitXXbzhoKWo7Mckqq6YWAKqY=@vger.kernel.org X-Gm-Message-State: AOJu0YxoJ6kVFdVhWvaudQygRIuugm9DRk5lf32myUzr+8Acgpx5bOz3 XrHwLDidFVpUojLc/E/wAEevSzkxQ1DOX7ivDQf62MAjy8FcX2HH9YPB0GLj8mE= X-Gm-Gg: ASbGncsfi0vCa1t6+NPE0l+9u3dgimJRyacL3l2eglKL7QO/CbQLhB6RgTBj6Mx4bgX 47dn9MyvLHaD8XzwA2RABzSERfcb/gi6liDYCCZkv8se6PvbpjV8I32gOrGk2vHEHZ/bufGB4Vd jgu3I7FXUc3u/jyfuRIzaxzetDcQHUEIETSpZZTdLeX6yn5lt7IP/53q6VtCgepY+TVVy1TSit4 h/MO5au9EbVQTeYRXh2H1gDTKHay5lI7dOwNuYMFmNg5JRtjV/K7arK81fs+S5HNJmxjvEF0KOf NI8= X-Google-Smtp-Source: AGHT+IEownUh3zO6s9pCDV0Clvw+JlHntDQwx/j8qHfP92J8/y9dWvLESVOAtn+7QOc0lvgJXmcboQ== X-Received: by 2002:a5d:5f4b:0:b0:382:1831:f7db with SMTP id ffacd0b85a97d-38260b59bc9mr13021685f8f.19.1732612875617; Tue, 26 Nov 2024 01:21:15 -0800 (PST) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.28]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3825fbc3a47sm13027694f8f.73.2024.11.26.01.21.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Nov 2024 01:21:15 -0800 (PST) From: Claudiu X-Google-Original-From: Claudiu To: vkoul@kernel.org, kishon@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, p.zabel@pengutronix.de, geert+renesas@glider.be, magnus.damm@gmail.com, gregkh@linuxfoundation.org, yoshihiro.shimoda.uh@renesas.com, christophe.jaillet@wanadoo.fr Cc: linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-usb@vger.kernel.org, claudiu.beznea@tuxon.dev, Claudiu Beznea , Conor Dooley Subject: [PATCH v2 06/15] dt-bindings: usb: renesas,usbhs: Document RZ/G3S SoC Date: Tue, 26 Nov 2024 11:20:41 +0200 Message-Id: <20241126092050.1825607-7-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20241126092050.1825607-1-claudiu.beznea.uj@bp.renesas.com> References: <20241126092050.1825607-1-claudiu.beznea.uj@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Claudiu Beznea The USBHS IP block on RZ/G3S SoC is identitcal to the one found on the RZ/G2L device. Document the RZ/G3S USBHS IP block. Acked-by: Conor Dooley Reviewed-by: Geert Uytterhoeven Signed-off-by: Claudiu Beznea --- Changes in v2: - this was patch 09/16 in v1 - collected tags Documentation/devicetree/bindings/usb/renesas,usbhs.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/usb/renesas,usbhs.yaml b/Doc= umentation/devicetree/bindings/usb/renesas,usbhs.yaml index b23ef29bf794..980f325341d4 100644 --- a/Documentation/devicetree/bindings/usb/renesas,usbhs.yaml +++ b/Documentation/devicetree/bindings/usb/renesas,usbhs.yaml @@ -26,6 +26,7 @@ properties: - renesas,usbhs-r9a07g043 # RZ/G2UL and RZ/Five - renesas,usbhs-r9a07g044 # RZ/G2{L,LC} - renesas,usbhs-r9a07g054 # RZ/V2L + - renesas,usbhs-r9a08g045 # RZ/G3S - const: renesas,rzg2l-usbhs =20 - items: @@ -130,6 +131,7 @@ allOf: - renesas,usbhs-r9a07g043 - renesas,usbhs-r9a07g044 - renesas,usbhs-r9a07g054 + - renesas,usbhs-r9a08g045 then: properties: interrupts: --=20 2.39.2 From nobody Mon Feb 9 10:38:58 2026 Received: from mail-wr1-f54.google.com (mail-wr1-f54.google.com [209.85.221.54]) (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 C5EA81CF2A2 for ; Tue, 26 Nov 2024 09:21:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.54 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732612880; cv=none; b=uOcogeT5V+mCdw3NUUqPDWQB670fwGlg0WRdJBfMlllejoUZSUEEOFAULzWzeP3fWdpEY6rMoK9aOMIkV5CCLi2gFs3UOk4nePoEJQMlkppBwa8haIILn/Uq9/e/SgVajqLN3PuumL9rPuzY3GLoJBcTU3W2GgNc7O5SuJgZjig= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732612880; c=relaxed/simple; bh=lMDTraku/x7/L+HfQFFu+VuQD5cryMGir72e5kDEJHE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=QZCF5bFUOLHBp2dpoOU5lpi86s/SrxdhwiOGO4JbnuKMQbK9OkbxkcKgDKDThQO8twfLq2/c4WV8YxzVZ0J8fDQAjm2GB+gdNNmxg9N3Z3Kh8sVZsIK2A1Q9usalNfGOkMOrTUi0VgIhnh0/cKnb3AaL+o0i1nepLDmn8W0DQyw= 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=pR77m9w4; arc=none smtp.client-ip=209.85.221.54 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="pR77m9w4" Received: by mail-wr1-f54.google.com with SMTP id ffacd0b85a97d-3824aef833bso3901486f8f.0 for ; Tue, 26 Nov 2024 01:21:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1732612877; x=1733217677; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=DWc+F6Re5lYpUThTPl2Jyvuy/tQl0uxdBQ2YGVSL9kM=; b=pR77m9w406KSH80pqt+Rw6/mp3tHCZZNEafG65Xyl92uhWFAujhH0fhEOiyG0O8qBR fT3sNtG/pMXSSjkZ6jgF+4c4CBVtxY+RTCfuK8trH5gSbwEIapgP4HYa41DWoqBNd3Vb BiDdVc/p57SwlGi1JLopl9iZ11ITRfbsPSouF2xqkz4ZvXh/0ei+4SWY78vK/KPdscWZ jqaCYZBmt8X9fUgO3BJvEhILEY2b0ucpVV9iaCvXa0vnIdDZFyzvYU9kEilMvD/cypRl WQQnJl32wXtcJb+pn9far95lOTpZ3LrTNx689T2PDlzchg5d6hnOo1vFDhsjx9IQA4S/ nvAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732612877; x=1733217677; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=DWc+F6Re5lYpUThTPl2Jyvuy/tQl0uxdBQ2YGVSL9kM=; b=vj4BbZVAxARn64wZTfSL/DfFJM9oWIIM7ztVmiD1TsXbdWu4dhyKULIWdnPp4OOKiN 5Yl24I73QfP/cDExLHOenHhjxP3/TyywDM/YV8iuftMmDHJpQhDd6ND0OO6dnShBzPim NkkxyGRDEHtL/SmMKkuku7HLIRth0KIluWdwRi5VnAatjyL/UuMJzxVVF4QiM/Xv0T8q vjVvgx9JOSJ9BJoyvhineI7s/DK5TTEuMlkzSnSd9YhTQrhN/CS3Tm7sYwzJEgxQIwwx CE9lFZ7Qp2A32srmks/umU5vMn2huKJFQjd2NXodK+jjr20CjI1eb4YYY8KIpwEXQL4w 5y9A== X-Forwarded-Encrypted: i=1; AJvYcCVLpzu1gjLIDGCUo9Wc0xG0AQCYBI1oeKmP38ddtzqcijOxMNW7ce3ZkaTNSotrdeCOvxrtm6EZXLqukbc=@vger.kernel.org X-Gm-Message-State: AOJu0YwerXyg6tCz5irBvAX2VOmJd7E7Hcltcid8SSxwz6d1iiHycdG5 ZHw7U4XRv0JayC/k6fZ0buSPzcOLRL5QMgSTQZBoM2Spz9xEmvJv31dlDhcwPP4= X-Gm-Gg: ASbGncu/Y/RtmR2yy/tUMmI729y0VnY5xrBSMFmfE6bDrT3vaOCE2O4tmAs4eEWPuNG HiDlBCkO/OQTL6a+o4fckEylFjbwk4oqUDL+x+WYC3JLOcr+2gxiRs8RhU8LViqh4FQXP48wVOH ydMF75tGx8hBYenqQMGKYkbsTWsZOxg4gvUn6jx9kf8AJxeevg5Vg4Ybpe+45S2kTX48QOHeUTE utH3Ngsv0zLE6yWV25uoTlKgBThQ6slnfVDB0KLmw8QJL6vR8ZQg2MqofU710qez0MsS1gj9KOG XL0= X-Google-Smtp-Source: AGHT+IG3dGq/ZJlhJq/NurIWM/G3VWbjsNdFTR8iP7hMyFJIs0S9/bgfBkT4zkY71Su/dQBJNJTAFQ== X-Received: by 2002:a5d:6da4:0:b0:382:4115:1ccb with SMTP id ffacd0b85a97d-38260b45f98mr11753556f8f.7.1732612877138; Tue, 26 Nov 2024 01:21:17 -0800 (PST) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.28]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3825fbc3a47sm13027694f8f.73.2024.11.26.01.21.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Nov 2024 01:21:16 -0800 (PST) From: Claudiu X-Google-Original-From: Claudiu To: vkoul@kernel.org, kishon@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, p.zabel@pengutronix.de, geert+renesas@glider.be, magnus.damm@gmail.com, gregkh@linuxfoundation.org, yoshihiro.shimoda.uh@renesas.com, christophe.jaillet@wanadoo.fr Cc: linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-usb@vger.kernel.org, claudiu.beznea@tuxon.dev, Claudiu Beznea Subject: [PATCH v2 07/15] dt-bindings: phy: renesas,usb2-phy: Mark resets as required for RZ/G3S Date: Tue, 26 Nov 2024 11:20:42 +0200 Message-Id: <20241126092050.1825607-8-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20241126092050.1825607-1-claudiu.beznea.uj@bp.renesas.com> References: <20241126092050.1825607-1-claudiu.beznea.uj@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Claudiu Beznea The reset lines are mandatory for the Renesas RZ/G3S platform and must be explicitly defined in device tree. Fixes: f3c849855114 ("dt-bindings: phy: renesas,usb2-phy: Document RZ/G3S p= hy bindings") Signed-off-by: Claudiu Beznea Acked-by: Conor Dooley Reviewed-by: Geert Uytterhoeven --- Changes in v2: - none; this patch is new Documentation/devicetree/bindings/phy/renesas,usb2-phy.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/phy/renesas,usb2-phy.yaml b/= Documentation/devicetree/bindings/phy/renesas,usb2-phy.yaml index af275cea3456..2babd200bd98 100644 --- a/Documentation/devicetree/bindings/phy/renesas,usb2-phy.yaml +++ b/Documentation/devicetree/bindings/phy/renesas,usb2-phy.yaml @@ -105,7 +105,9 @@ allOf: properties: compatible: contains: - const: renesas,rzg2l-usb2-phy + enum: + - renesas,rzg2l-usb2-phy + - renesas,usb2-phy-r9a08g045 then: required: - resets --=20 2.39.2 From nobody Mon Feb 9 10:38:58 2026 Received: from mail-wr1-f52.google.com (mail-wr1-f52.google.com [209.85.221.52]) (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 B519E1D2B34 for ; Tue, 26 Nov 2024 09:21:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732612882; cv=none; b=jSaSn5JRlDodCRXQkFOzsQEnnLJu9nkwTwMWxXHqT5KMPuikpAgAGCCI5+52W8rbGZwzdY5WpcgzlM0QYQf5JPvPisXNYVlExd9FJVv9BdYwtSCwxdlfhZwXtAsboHgyg5Ih7UYNXUSF3qzMo0n6UhMgnzds+4dQE9vV/2kbXaA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732612882; c=relaxed/simple; bh=oNWXU+YttETsW6YOLdXCM5FnMtFquAK1N6LvtZPkJkY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=EGumpawsg2oexr15GmAVIBzWDcYPKF7746HBagwBoEVkoh1xvoUbcj2lkFz3LPOoTnebl+2svypLlKZkWwYE0QOprvq0fMS/JVdPhQKDBqVPc50xgNhPFT3Crn+Jy+ISYtD6wIpqGvqQDy9s87iNbWBPUaA3KmaZLMmBmG82dQ4= 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=UdSqcXsp; arc=none smtp.client-ip=209.85.221.52 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="UdSqcXsp" Received: by mail-wr1-f52.google.com with SMTP id ffacd0b85a97d-38245e072e8so5273404f8f.0 for ; Tue, 26 Nov 2024 01:21:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1732612879; x=1733217679; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=/jPyHfXjv1sKCq+VDx+r3KGfTA+9eZQsBfgYv3YFZiw=; b=UdSqcXspX4GlVVQ9ykeNkVCt1X+Jj/LfbN9xD/pmohjLFZrU8SIiOVFdfAqhU6jGu9 JZ+GNbfv3X5aPU8YWnehhC0HTItYCE9ZdHtmzNJ3TASEVVg15zM5UfKc+NaGYpgO75ze 0vEC0f6dcALONwYLOHbUmQl/78LTYeEA6ClBTI8On0/dYUr1gnsrjrj3TNfSc+5Dq5NQ e6TUy+XjsODNZ/0g08nZiCmro+mWP9Y7nhf8YjGuL+pp45FCXcAMypVC1GNG5VKCPbWd m3UEO4KValOWTdgC/HRl1F2BxIVluJhiJSNXFJdhf7VqtWX3QgqxFT9wB40kffi7dQad 5+LQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732612879; x=1733217679; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/jPyHfXjv1sKCq+VDx+r3KGfTA+9eZQsBfgYv3YFZiw=; b=eNsuPeVxVHk873MbvWmLCL+fXra6R5KuS64jSQWa4yMebaeXNFwVLgahhLqOjy23ET H2CDVdItpsvVW1YI/dj1OUpHf95YtXZIQmudrvCADZ/1vy/+C8EpV8O5cEx01+ZblRhA yVe6oQhSG6RP8U3+CXeyr6DVGw4iX+jtDmbBndFPHQhitIUk+jDJ4E+vwYvycpCw6P/+ u/qeNIrPNQJ5VSMCjLMMzZt1fx3OUY6EIErh6WL1oqcr1mhXCWbltG9h92jkrII1m1dA FehsHxhJshqFRlgM2B2384EpC2VW3TS4BG0446gftDHZPLWl/HE9z5PZ0izcTGvjJNTC O+cw== X-Forwarded-Encrypted: i=1; AJvYcCW3e+l9yDPGFIdJFFcQuubMcBhWBOv6vyPFeycbcg29KiHdq5DHqrAEwcX2vYW9RJI96tULTJgbsB4oKHk=@vger.kernel.org X-Gm-Message-State: AOJu0Yzkcvbnel3YkRX0zR0XbarYAWYhHpCy4TNZCSIIulIVembMSXgs /ozuc2EKxUO4s9x70RhcZa1bGnsxVEoOUcqWbxyhRn+uZFupjlHCBQOGitmZRjg= X-Gm-Gg: ASbGncsUKQNIHngfnbgW9Bp9+ZskjfB9RjpLzauO5vSLHHhPCeSHBn3VZDtVAHMkeBQ asIAgq0MjyO5/DGotP+cQ9N/Hs8yiD4Lu4Aybwrz8SSoPHBPAOSSsmeLiYKutmt6HhuLKNWvWgQ /bvA8trHl8nVwWQRPlJVocC3TNHM2YMzvIHIOMyURqGxQpTvpqMs44E0EQa1XBEL0QiG+p2yNNA VMt1Wl8eEOrnTo0nH88vLF45pJJryj5ppUwk9UsUobl8WWnB2aJGpbLsn/DSxu3Z6jEH+wRrGxb 1yQ= X-Google-Smtp-Source: AGHT+IEp0nHr3rTgVabZUcIb7+yLYE3qyOs/bjCx+FjVzVqxsxe18o0APHGg56PeptK8REX7Zr/0Jw== X-Received: by 2002:a5d:64a9:0:b0:382:4fa4:e544 with SMTP id ffacd0b85a97d-38260b3caf5mr16113423f8f.6.1732612879055; Tue, 26 Nov 2024 01:21:19 -0800 (PST) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.28]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3825fbc3a47sm13027694f8f.73.2024.11.26.01.21.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Nov 2024 01:21:18 -0800 (PST) From: Claudiu X-Google-Original-From: Claudiu To: vkoul@kernel.org, kishon@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, p.zabel@pengutronix.de, geert+renesas@glider.be, magnus.damm@gmail.com, gregkh@linuxfoundation.org, yoshihiro.shimoda.uh@renesas.com, christophe.jaillet@wanadoo.fr Cc: linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-usb@vger.kernel.org, claudiu.beznea@tuxon.dev, Claudiu Beznea Subject: [PATCH v2 08/15] dt-bindings: phy: renesas,usb2-phy: Add renesas,sysc-signal Date: Tue, 26 Nov 2024 11:20:43 +0200 Message-Id: <20241126092050.1825607-9-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20241126092050.1825607-1-claudiu.beznea.uj@bp.renesas.com> References: <20241126092050.1825607-1-claudiu.beznea.uj@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Claudiu Beznea On the Renesas RZ/G3S SoC, the USB PHY receives a signal from the system controller that need to be de-asserted/asserted when power is turned on/off. This signal, called PWRRDY, is controlled through a specific register in the system controller memory space. Add the renesas,sysc-signal DT property to describe the relation b/w the system controller and the USB PHY on the Renesas RZ/G3S. This property provides a phandle to the system controller, along with the offset within the system controller memory space that manages the signal and a bitmask that indicates the specific bits required to control the signal. Signed-off-by: Claudiu Beznea Reviewed-by: Geert Uytterhoeven --- Changes in v2: - none; this patch is new .../bindings/phy/renesas,usb2-phy.yaml | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/Documentation/devicetree/bindings/phy/renesas,usb2-phy.yaml b/= Documentation/devicetree/bindings/phy/renesas,usb2-phy.yaml index 2babd200bd98..3b8dcacc3740 100644 --- a/Documentation/devicetree/bindings/phy/renesas,usb2-phy.yaml +++ b/Documentation/devicetree/bindings/phy/renesas,usb2-phy.yaml @@ -85,6 +85,16 @@ properties: =20 dr_mode: true =20 + renesas,sysc-signal: + description: System controller phandle, specifying the register + offset and bitmask associated with a specific system controller sign= al + $ref: /schemas/types.yaml#/definitions/phandle-array + items: + - items: + - description: system controller phandle + - description: register offset associated with a signal + - description: register bitmask associated with a signal + if: properties: compatible: @@ -112,6 +122,18 @@ allOf: required: - resets =20 + - if: + properties: + compatible: + contains: + const: renesas,usb2-phy-r9a08g045 + then: + required: + - renesas,sysc-signal + else: + properties: + renesas,sysc-signal: false + additionalProperties: false =20 examples: --=20 2.39.2 From nobody Mon Feb 9 10:38:58 2026 Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) (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 94CDF1D4340 for ; Tue, 26 Nov 2024 09:21:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.43 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732612884; cv=none; b=qzZw7gozt8fZIXho8WhedD53o0Ozj3Zm16dUVrKvACMIeARfRsTDfmXSlMzQ5LO4ZQMrGXSi67P88PTs6g6MHtmZIfLQPulUQKD/BvfIznhAvTCS+Xr4z0cu71LkgvUoWbOqUz5nfz0dUvGfo+PLa9A27sPvQal8wibk5TC71W0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732612884; c=relaxed/simple; bh=NXJDF4MBu7FpvuqDy7MLLxA2AvI4Q3ZGL1Xa7NwdgKE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=QcSImQHO6F0dmUwRCTk84hdGzdpjmm4FIxnlVqRIZLEQ2rpbyQMMu8C9MGNvABWkBE3wvfwqdGvP/mHL8xH0Td2kLz15wUBdW0Us0aX/V/jJdd8exKc+hsyU7LcY1nQBY1YhCMYkjUhMLpn7yLZ6w70fNmsykt8JMa49nTLsMH8= 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=SjlqGnr3; arc=none smtp.client-ip=209.85.128.43 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="SjlqGnr3" Received: by mail-wm1-f43.google.com with SMTP id 5b1f17b1804b1-434a736518eso3700065e9.1 for ; Tue, 26 Nov 2024 01:21:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1732612881; x=1733217681; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=5TAeC3TsRl4RzsqjkZc75Uu8T1ZZEFzes6iwcvWtBHs=; b=SjlqGnr3vxTaeYiHtkkkYEthgTSp6H25zo0JMQD+O9Tp/AWV/TQ26hYLGG7neB1jiB IiiRtylHgMFMjsYbJDb61/XIk7+EoAUEmfF+gL1Z4Kiz0uVLCW274MbPm5Yn2p8Ah9tx QW900dl64UXQtfu4Mo8xTP9b4ThMkbXz/uqL94SdXn/qGlpWEKQ7wZsS2QSAh2NpzNfF n9t+0/feM2u1YOpk/g632ZAnIwLOlbSu8i6IZraCIf37b26YzslofdyC7zRCGVGqCOaK BgRyXZRUIlQm+HUanifsJBNpSeP7TLHASNH09gygRzwXXTXBq7yXN6+PqA2Ehxv8PEom WqxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732612881; x=1733217681; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=5TAeC3TsRl4RzsqjkZc75Uu8T1ZZEFzes6iwcvWtBHs=; b=dYX/lykiZAY637IbLcrtjqIm1B0gXKaF/qqlsBwHngT67qLBxYWzdyTlie4+YqFYrR sFjiEmPuWa6WKLQcUColc0yvr+M78Mrqxuhk6KjIWNO+yhGuuDvKfTZh02QITAuhSKAA ijOKeMiLZY0KCPj81psI9fCIgdrR52dAOK6mSNHNua5FToTwSKOypj6ggCP36Jog6qqs iV1IVSbWQTha4uPM2Q3ErnqIYRfkdC2VSVp/oQPpaV/x9zhHA1Dbhwrku7xF6PTzc73I efVgeN7S0kijKvSOeiBjY2NjgbRi9a5T0I9qKDEuTCN3eOi00pjwzhz/wQIzDYOIxwI6 JSGw== X-Forwarded-Encrypted: i=1; AJvYcCXbqbejemgInwcp1hutCW/W5milR9VS4FfIJeCoQazAPc3iHwZCHBddqNad72YOwDhVwS4cByRhv/03oXE=@vger.kernel.org X-Gm-Message-State: AOJu0YwmbvkHSzgayiRojrKowZWgBkDKFlB+XM1IOreSZY5jnI4ZJpw0 2IdzJFDH0UnuhB1vxeoCYFXW66KofDvzBAkqHXvHDpja4EzfSBY5OX2Q7sbJolM= X-Gm-Gg: ASbGncsFxOiWkcFkfN/z6wDfCc6qgLpGSMA8j+gWwcoAtYjZHqBC05VJD+4rBMeAI9c y6yT6mJFo1Lab8taeORtF6sZgf2+8TBDvPAPj+BaA9EUL/Rz1DhfXGEnLi2sMYmYUmk8WDVqsCj tNgGk+zse26vPwQbRXleXaNICkG5qh6EKrg5b70QGPqwv1ZXuElNCYWhV81Dc12Hbc2Mq3IU9DG MeQ3yGRz3UL6XEnfmRPvX+S7vuEBUKNEkWNJj2r8ZvrUnK6om+6FCzf3cQVunv4YPChA9BGIV3K hgw= X-Google-Smtp-Source: AGHT+IFQeadsuQ2/OEFHNB2hCpcL0kFnKhATIbhwU87IinDBEjK+aOIArcqyehdnhZrcXQg6gOKtyA== X-Received: by 2002:a05:600c:1c25:b0:434:a5c2:53c1 with SMTP id 5b1f17b1804b1-434a5c2564dmr15857425e9.23.1732612881055; Tue, 26 Nov 2024 01:21:21 -0800 (PST) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.28]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3825fbc3a47sm13027694f8f.73.2024.11.26.01.21.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Nov 2024 01:21:20 -0800 (PST) From: Claudiu X-Google-Original-From: Claudiu To: vkoul@kernel.org, kishon@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, p.zabel@pengutronix.de, geert+renesas@glider.be, magnus.damm@gmail.com, gregkh@linuxfoundation.org, yoshihiro.shimoda.uh@renesas.com, christophe.jaillet@wanadoo.fr Cc: linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-usb@vger.kernel.org, claudiu.beznea@tuxon.dev, Biju Das , Claudiu Beznea Subject: [PATCH v2 09/15] phy: renesas: rcar-gen3-usb2: Fix an error handling path in rcar_gen3_phy_usb2_probe() Date: Tue, 26 Nov 2024 11:20:44 +0200 Message-Id: <20241126092050.1825607-10-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20241126092050.1825607-1-claudiu.beznea.uj@bp.renesas.com> References: <20241126092050.1825607-1-claudiu.beznea.uj@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Christophe JAILLET If an error occurs after the reset_control_deassert(), reset_control_assert() must be called, as already done in the remove function. Use devm_add_action_or_reset() to add the missing call and simplify the .remove() function accordingly. Fixes: 4eae16375357 ("phy: renesas: rcar-gen3-usb2: Add support to initiali= ze the bus") Signed-off-by: Christophe JAILLET Reviewed-by: Biju Das [claudiu.beznea: removed "struct reset_control *rstc =3D data;" from rcar_gen3_reset_assert()] Signed-off-by: Claudiu Beznea Reviewed-by: Geert Uytterhoeven --- Changes in v2: - none; this patch is new; re-spinned the Christophe's work at https://lore.kernel.org/all/TYCPR01MB113329930BA5E2149C9BE2A1986672@TYCPR= 01MB11332.jpnprd01.prod.outlook.com/ drivers/phy/renesas/phy-rcar-gen3-usb2.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/drivers/phy/renesas/phy-rcar-gen3-usb2.c b/drivers/phy/renesas= /phy-rcar-gen3-usb2.c index 775f4f973a6c..59f74aa993ac 100644 --- a/drivers/phy/renesas/phy-rcar-gen3-usb2.c +++ b/drivers/phy/renesas/phy-rcar-gen3-usb2.c @@ -668,6 +668,11 @@ static enum usb_dr_mode rcar_gen3_get_dr_mode(struct d= evice_node *np) return candidate; } =20 +static void rcar_gen3_reset_assert(void *data) +{ + reset_control_assert(data); +} + static int rcar_gen3_phy_usb2_init_bus(struct rcar_gen3_chan *channel) { struct device *dev =3D channel->dev; @@ -686,6 +691,11 @@ static int rcar_gen3_phy_usb2_init_bus(struct rcar_gen= 3_chan *channel) if (ret) goto rpm_put; =20 + ret =3D devm_add_action_or_reset(dev, rcar_gen3_reset_assert, + channel->rstc); + if (ret) + goto rpm_put; + val =3D readl(channel->base + USB2_AHB_BUS_CTR); val &=3D ~USB2_AHB_BUS_CTR_MBL_MASK; val |=3D USB2_AHB_BUS_CTR_MBL_INCR4; @@ -815,7 +825,6 @@ static void rcar_gen3_phy_usb2_remove(struct platform_d= evice *pdev) if (channel->is_otg_channel) device_remove_file(&pdev->dev, &dev_attr_role); =20 - reset_control_assert(channel->rstc); pm_runtime_disable(&pdev->dev); }; =20 --=20 2.39.2 From nobody Mon Feb 9 10:38:58 2026 Received: from mail-wr1-f48.google.com (mail-wr1-f48.google.com [209.85.221.48]) (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 6202D1D47C7 for ; Tue, 26 Nov 2024 09:21:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.48 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732612886; cv=none; b=AM7GktfnNFnQ+aXff7hi/ask0nbU+UuoBjSzfq3yB7oDKILLTbKIBvFz83br3C4YsCOIb8wF5QT/eLMFoesoljDiCjsUVHILM2wfKuPT4dgtWlqVKDuqbYOlDHSQlvNpJ3ExN3Mws1M3UWAAimX8OOTRejEKd1jszOo6Hg+vVjo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732612886; c=relaxed/simple; bh=M5ukcPKgKAfKHyOFRejl++X5XYltOB0VkZUniY5CCHc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=YAYCI++SHjfIiG3TfrlmUa335Jo7Y5aTTf/shv6vq0kvagoVUMPaLOJizb6GJ+YbYB5DbMYNLkFm+cNe6ZlDEWWhloFzONsQlZgIDXZrgHJg2mZsi0MD8EXcEkqCBgrK9Cq0TpJGRZ17XxAbSzYPdu1OsqXkB7c4FRzb1uGFOyA= 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=m4pWcI94; arc=none smtp.client-ip=209.85.221.48 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="m4pWcI94" Received: by mail-wr1-f48.google.com with SMTP id ffacd0b85a97d-382610c7116so2821199f8f.0 for ; Tue, 26 Nov 2024 01:21:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1732612883; x=1733217683; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=GaBexvzYFyRAvmFf5CNX0T/OFU5Y8NOKhiyYn5h/HqM=; b=m4pWcI94uKuc0Xmc6HVPbZp8l38puM95OFw0TWlvjptLypGHVqNdKvSaiOnw5ofqqv DyMF3h31akudE2xSvjUhDCb92Fj2+CtEXLITUhSXzmjmngxnBp0lFFfZIOT+P09U5MLc /Zm5NjMO+kDT8ORny/HxNQ/nZI99yTa8jAqqc165ey2XMHJvcSkOCwr6u9P+wMAOBpHD XJKuFcMjLUr3JN1x8YkXT6rORWr9dCqpfQ8XFB7wPhEilDBEKrHHnN9zKN51SCYDVac5 +cdnTMa+lmnY341dpeo69+vRvDbYIrEyd+lOoBqU95pJO9lTNjOXf1kMbz3tojCdefi4 LrGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732612883; x=1733217683; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=GaBexvzYFyRAvmFf5CNX0T/OFU5Y8NOKhiyYn5h/HqM=; b=PVImqrSmquZTVHhG0xSlnJ06+WQrX8uPBaP78gXHRf/IjagU/WM9krzFB5HRdTygnA G9vMoUpeNz/HzekD2SbWDqaj5Bllutj6PsQzxZG9utbsIe5f6VBjn2Eot3ZDOrOeQfh2 ZRno88e5Mc13fnsEOCNa9u6PN5bRpIgnfKUSLYTi/KuGDQX1CAor7yFGl9qU8yYVyF6w O6cuGw7P1xu5zzZ7ypKy6ggNQjDj8pKXJgDz/a5RVLzgXHGUprOJ/Po/HUgcBP6s0mXO AnewN2Ib7XU6+hvNkYuxUAU+F9f/QKXEpSoxMI+BbcycdttCC0XiPvesVfcMYjRMKZeB mhrA== X-Forwarded-Encrypted: i=1; AJvYcCXlDjmubI8wfIndt42k+qM2zteKr0qpccL0KRNns1LWgcfk2pLBwxhmUJgkRTFy4xLNRAEM5LsSeJTc+Gc=@vger.kernel.org X-Gm-Message-State: AOJu0Yz35+BVv7MRcvePoccKHsu66v/4HMI4OmyHB7iMEhQBIC4z4mGh nCTYKxd3wqVmv1g+COPCLH5KUi9PMTlN8vyvDjN6UBiDV1PDUxIZrk3oQtheVsg= X-Gm-Gg: ASbGncvAM7qaXqxzNLZrUcBS7w3NjAFMgcD4X+cePsPbrRGUq3VVCcbBYW6Fl39JO01 2mpKwPsXVQnlKsXI2/zVl53QP+QHngHlHuHrVNg/jVt2RA96F8bG/6vFhMkh02utx0ibj7D/OCD ekNLueDMIozmGVh0Dod76HZFez8oO+xUW6/eBE5ARKH5xwVo2HJhHxrU+ptIHySqqEayo0fUAKo T9T62TwZNDk6R86CSmclpSI5gCWIdYeua/ruhl5Tem6w1+M/Qr5vrYsLfnsUv+uprGQN/ZjTZWY twQ= X-Google-Smtp-Source: AGHT+IGx29P8JteJsbR7aMf1tNqIx4rHFyFlQRbqnmSPeJkN3FtdMhddq6elNPOMjEa7BoKccqaeCw== X-Received: by 2002:a05:6000:1f8c:b0:382:4378:462a with SMTP id ffacd0b85a97d-38260b759c0mr13201703f8f.24.1732612882831; Tue, 26 Nov 2024 01:21:22 -0800 (PST) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.28]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3825fbc3a47sm13027694f8f.73.2024.11.26.01.21.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Nov 2024 01:21:22 -0800 (PST) From: Claudiu X-Google-Original-From: Claudiu To: vkoul@kernel.org, kishon@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, p.zabel@pengutronix.de, geert+renesas@glider.be, magnus.damm@gmail.com, gregkh@linuxfoundation.org, yoshihiro.shimoda.uh@renesas.com, christophe.jaillet@wanadoo.fr Cc: linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-usb@vger.kernel.org, claudiu.beznea@tuxon.dev, Claudiu Beznea Subject: [PATCH v2 10/15] phy: renesas: rcar-gen3-usb2: Add support for PWRRDY Date: Tue, 26 Nov 2024 11:20:45 +0200 Message-Id: <20241126092050.1825607-11-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20241126092050.1825607-1-claudiu.beznea.uj@bp.renesas.com> References: <20241126092050.1825607-1-claudiu.beznea.uj@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Claudiu Beznea On the Renesas RZ/G3S SoC, the USB PHY has an input signal called PWRRDY. This signal is managed by the system controller and must be de-asserted after powering on the area where USB PHY resides and asserted before powering it off. The connection b/w the system controller and the USB PHY is implemented through the renesas,sysc-signal device tree property. This property specifies the register offset and the bitmask required to control the signal. The system controller exports the syscon regmap, and the read/write access to the memory area of the PWRRDY signal is reference-counted, as the same system controller signal is connected to both RZ/G3S USB PHYs. Add support for the PWRRDY signal control. Signed-off-by: Claudiu Beznea --- Changes in v2: - none; this patch is new drivers/phy/renesas/phy-rcar-gen3-usb2.c | 66 ++++++++++++++++++++++++ 1 file changed, 66 insertions(+) diff --git a/drivers/phy/renesas/phy-rcar-gen3-usb2.c b/drivers/phy/renesas= /phy-rcar-gen3-usb2.c index 59f74aa993ac..84459755adf5 100644 --- a/drivers/phy/renesas/phy-rcar-gen3-usb2.c +++ b/drivers/phy/renesas/phy-rcar-gen3-usb2.c @@ -12,12 +12,14 @@ #include #include #include +#include #include #include #include #include #include #include +#include #include #include #include @@ -111,6 +113,12 @@ struct rcar_gen3_phy { bool powered; }; =20 +struct rcar_gen3_pwrrdy { + struct regmap *regmap; + u32 offset; + u32 mask; +}; + struct rcar_gen3_chan { void __iomem *base; struct device *dev; /* platform_device's device */ @@ -118,6 +126,7 @@ struct rcar_gen3_chan { struct rcar_gen3_phy rphys[NUM_OF_PHYS]; struct regulator *vbus; struct reset_control *rstc; + struct rcar_gen3_pwrrdy *pwrrdy; struct work_struct work; struct mutex lock; /* protects rphys[...].powered */ enum usb_dr_mode dr_mode; @@ -133,6 +142,7 @@ struct rcar_gen3_phy_drv_data { const struct phy_ops *phy_usb2_ops; bool no_adp_ctrl; bool init_bus; + bool pwrrdy; }; =20 /* @@ -587,6 +597,7 @@ static const struct rcar_gen3_phy_drv_data rz_g3s_phy_u= sb2_data =3D { .phy_usb2_ops =3D &rcar_gen3_phy_usb2_ops, .no_adp_ctrl =3D true, .init_bus =3D true, + .pwrrdy =3D true, }; =20 static const struct of_device_id rcar_gen3_phy_usb2_match_table[] =3D { @@ -707,6 +718,55 @@ static int rcar_gen3_phy_usb2_init_bus(struct rcar_gen= 3_chan *channel) return ret; } =20 +static void rcar_gen3_phy_usb2_set_pwrrdy(struct rcar_gen3_chan *channel, = bool power_on) +{ + struct rcar_gen3_pwrrdy *pwrrdy =3D channel->pwrrdy; + + /* N/A on this platform. */ + if (!pwrrdy) + return; + + regmap_update_bits(pwrrdy->regmap, pwrrdy->offset, pwrrdy->mask, !power_o= n); +} + +static void rcar_gen3_phy_usb2_pwrrdy_off(void *data) +{ + rcar_gen3_phy_usb2_set_pwrrdy(data, false); +} + +static int rcar_gen3_phy_usb2_init_pwrrdy(struct rcar_gen3_chan *channel) +{ + struct device *dev =3D channel->dev; + struct rcar_gen3_pwrrdy *pwrrdy; + struct of_phandle_args args; + int ret; + + pwrrdy =3D devm_kzalloc(dev, sizeof(*pwrrdy), GFP_KERNEL); + if (!pwrrdy) + return -ENOMEM; + + ret =3D of_parse_phandle_with_args(dev->of_node, "renesas,sysc-signal", + "#renesas,sysc-signal-cells", 0, &args); + if (ret) + return ret; + + pwrrdy->regmap =3D syscon_node_to_regmap(args.np); + pwrrdy->offset =3D args.args[0]; + pwrrdy->mask =3D args.args[1]; + + of_node_put(args.np); + + if (IS_ERR(pwrrdy->regmap)) + return PTR_ERR(pwrrdy->regmap); + + channel->pwrrdy =3D pwrrdy; + + /* Power it ON. */ + rcar_gen3_phy_usb2_set_pwrrdy(channel, true); + + return devm_add_action_or_reset(dev, rcar_gen3_phy_usb2_pwrrdy_off, chann= el); +} + static int rcar_gen3_phy_usb2_probe(struct platform_device *pdev) { const struct rcar_gen3_phy_drv_data *phy_data; @@ -763,6 +823,12 @@ static int rcar_gen3_phy_usb2_probe(struct platform_de= vice *pdev) platform_set_drvdata(pdev, channel); channel->dev =3D dev; =20 + if (phy_data->pwrrdy) { + ret =3D rcar_gen3_phy_usb2_init_pwrrdy(channel); + if (ret) + goto error; + } + if (phy_data->init_bus) { ret =3D rcar_gen3_phy_usb2_init_bus(channel); if (ret) --=20 2.39.2 From nobody Mon Feb 9 10:38:58 2026 Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) (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 EBB7A1D54F2 for ; Tue, 26 Nov 2024 09:21:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.49 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732612889; cv=none; b=kWjmuwB/e8itQqGn/u024oQanxbVXlq2kuWgzkopL6exdUmdJVeNhEzIzZwyUrouFEQAyqliF2R+HEechqKZs3DIRaLNJtwZMI9nA6plsp+FxDtRn1+K2ChWveBXD8/9evJ6iUzvoXyVM6BTe0BJHgHbVILHsjpVkcKn4/xN6yw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732612889; c=relaxed/simple; bh=65f39XdX+JOlbTHLjNv6Nr2gl6HREhiCkJ3xGoC26cY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=oAUZnD1w4kU1MqqncMhhE4d74Dt7h1IucSiL8bkXbgz7v2ElnqGNdRaZVMhU3PJW/lBODIRw9RjOFRZStA/yDpfdF8rh7AONGNd2vX9b9VRGT40BiscmCj2d6pHNiPR5frzSLUFGnyz6F3/kSp0j7xc10kVOA+EKUvA/UIoL8JI= 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=m8nlkNVh; arc=none smtp.client-ip=209.85.128.49 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="m8nlkNVh" Received: by mail-wm1-f49.google.com with SMTP id 5b1f17b1804b1-434a736518eso3700565e9.1 for ; Tue, 26 Nov 2024 01:21:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1732612884; x=1733217684; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Z4yY5kKHWBOgnydB5P9+GaDat1sMgmo5I0rPUXNWFHQ=; b=m8nlkNVhsaB3jK7XongGdX628G4LHMoP0RQb+Fy2eThGVVjEpYrIwzavXgidYzXjpU Akrc2K7sKR/89kelyfMJHdrFuLjNXnRe7qLuRhmkQL25PTdqWdrLdqfV4KJ7lKxB/Zpe AsBPGroAlW3ebNVbLZ96mDTSxMaeIFRj85CXXA4R0Bu6HfPNCyXQtgrk2t6HhhutSHHk Y4szJqEUgY19SJU1s1cXtwhWV2FIolcF7Op8oeYeKnpetH7MZTiTsWXHmQtIS9K2+2L1 gyHrEC26t/ks/8oydQHYVQ7AmO/LpIoRpakONOsedYvRhYPxKsBRh5E0O5kgtRD89RGD HxMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732612884; x=1733217684; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Z4yY5kKHWBOgnydB5P9+GaDat1sMgmo5I0rPUXNWFHQ=; b=k7hxFip4Y3nDT6QILKIP178vpvbtQorhyHPDv3Xvghpzio9bgAMTxmReoGDtLnQwZT YBYgl8h/6Q6Pz8z5zmgayNkGVH19GKLnfgQaixUATbn2ixpzox+RwEn6E0xd1Vmm6Caw NdDrz1/rDHDCFYqLA2AkTP+MN+Rq9Sq6gp4tokqIG0aE/JHNuRDLW3dHMpQu6KXONo9x vJL+IohUEn/LUhaYEnct/hGYTAvX/jAPqTxBeps60swuhXihbr93Ev9qmV5LqtoZhvCC I2QdEpwqZX3um//E8LmKQo/0bG4B1rSNxlW4MqTMzeFOlPpzp+9zXH4ko2r1N0vbuTEC PftA== X-Forwarded-Encrypted: i=1; AJvYcCWmTQJ03D0iaWwosKSJDxF7tv4zBU2f/xNG7i+td2l5evQk2In1JcLdqp+6dfs5FmgJOP+K335b4NpbYmo=@vger.kernel.org X-Gm-Message-State: AOJu0YyUWuyvSJ/94cyp5kq1bwsz8067oNpz50P3k+hjNEKzCJhnVcs1 eXEIoWR9E0AtCnjyFVRk8mXgacFXLaehAnU2ZVu9dxNMxdA/bATjqRk2Ub0mqXw= X-Gm-Gg: ASbGncsEE6GN+Rm0dxaPeeYavUmrFcQPUzpmzRbLCZc19Ps4vnTCqvKctubWoYWRXyk TozNTH+Sbqq3lpLzpvviMKbQ20GusZAEX1EAWpXOkcv/hPSZpx/On+e696V6XNAU27fsgcHz7fP oUZU1AEiLkNYpkKTmSyKL00A47Qwq55k+rUdqdP7WrcmpTibKKrLFblw4qbZopASIJp1Jp1tifd sanF25QKlGj9nRy8kT4gta822pJVBoPvn8hR0W5JVRa4TEdCxkB+3ygxtnlzc3+bc20mNFM0Ytl BSg= X-Google-Smtp-Source: AGHT+IECNxqnMdsMr8sIEyPl41XrbsF2Eglii8m3iIb2siIoiQVCnnx0E2A0rJ4JNGhhSHg/JoNpCw== X-Received: by 2002:a5d:59ab:0:b0:382:450c:25e9 with SMTP id ffacd0b85a97d-38260b8ce0bmr16781285f8f.35.1732612884408; Tue, 26 Nov 2024 01:21:24 -0800 (PST) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.28]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3825fbc3a47sm13027694f8f.73.2024.11.26.01.21.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Nov 2024 01:21:24 -0800 (PST) From: Claudiu X-Google-Original-From: Claudiu To: vkoul@kernel.org, kishon@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, p.zabel@pengutronix.de, geert+renesas@glider.be, magnus.damm@gmail.com, gregkh@linuxfoundation.org, yoshihiro.shimoda.uh@renesas.com, christophe.jaillet@wanadoo.fr Cc: linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-usb@vger.kernel.org, claudiu.beznea@tuxon.dev, Claudiu Beznea Subject: [PATCH v2 11/15] dt-bindings: reset: renesas,rzg2l-usbphy-ctrl: Document RZ/G3S support Date: Tue, 26 Nov 2024 11:20:46 +0200 Message-Id: <20241126092050.1825607-12-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20241126092050.1825607-1-claudiu.beznea.uj@bp.renesas.com> References: <20241126092050.1825607-1-claudiu.beznea.uj@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Claudiu Beznea The Renesas RZ/G3S USB PHY control block is similar with the one found on the Renesas RZ/G2L. Add documentation for it. Signed-off-by: Claudiu Beznea Acked-by: Conor Dooley Reviewed-by: Geert Uytterhoeven --- Changes in v2: - none; this patch is new .../devicetree/bindings/reset/renesas,rzg2l-usbphy-ctrl.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/reset/renesas,rzg2l-usbphy-c= trl.yaml b/Documentation/devicetree/bindings/reset/renesas,rzg2l-usbphy-ctr= l.yaml index b0b20af15313..ae59c2dcadbf 100644 --- a/Documentation/devicetree/bindings/reset/renesas,rzg2l-usbphy-ctrl.yaml +++ b/Documentation/devicetree/bindings/reset/renesas,rzg2l-usbphy-ctrl.yaml @@ -20,6 +20,7 @@ properties: - renesas,r9a07g043-usbphy-ctrl # RZ/G2UL and RZ/Five - renesas,r9a07g044-usbphy-ctrl # RZ/G2{L,LC} - renesas,r9a07g054-usbphy-ctrl # RZ/V2L + - renesas,r9a08g045-usbphy-ctrl # RZ/G3S - const: renesas,rzg2l-usbphy-ctrl =20 reg: --=20 2.39.2 From nobody Mon Feb 9 10:38:58 2026 Received: from mail-wr1-f47.google.com (mail-wr1-f47.google.com [209.85.221.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 809F21D54D8 for ; Tue, 26 Nov 2024 09:21:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.47 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732612889; cv=none; b=f1BfVDeMDs7LOCxDml0Atac6c7QBsgSWTmPC9WLQBtbYAApb9Oe4jli1SCpQCIOyHc2s5Edx3wcl1oqU3L5hvwUlyGfPk9qSbume20Ds/OPNb6RbZsgqZtHU1QhI0OThtEOei27Zm6MNa9XsA0mNN7OEPuFery42et4EoljTJ7E= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732612889; c=relaxed/simple; bh=pvmXne3/GLaL56C23pmxfpzVcVguFUnVL4SSDyD6KWQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=RuUWj8NJEPjfC1Sfoqcjr8hb0bNXFle352fzPYuMI2U3XPJtNyuwb4P6XbFFLj7TDKSr7Pee5K1rI5Dc8U+zC1hlN3VrT01m1wxgfzGkWUejTaAZSBsVICV2o95yadb39yNk+hYv4PuBggUDvrIXgiwpKB4MAE8VgtYJL8p35qY= 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=ghPR0LO2; arc=none smtp.client-ip=209.85.221.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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="ghPR0LO2" Received: by mail-wr1-f47.google.com with SMTP id ffacd0b85a97d-382610c7116so2821227f8f.0 for ; Tue, 26 Nov 2024 01:21:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1732612886; x=1733217686; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=E4M5g4cOSJdZAIQtrKw1Bn/YMzw7ikJ/cpvkoOSwCx8=; b=ghPR0LO2pC6YkkfzaTqUNsLDZUcp9bERyEyb9YOZEMdOiWVbT9ZUFiF4YmBxMB+D0h Oub/hGH9PTI18stx8oUicM9Zv//kTIHFTaJtBABe/I3aRfGmPoLTemuM3YvtiS+7KenF 4etSN6/T1d+xHmpNRl2gQ2wJflLDShKIhTM8DEsq3IEBl+VW2rNNIJ6/mP5pXZ7lH5k3 lWbWjKdZZaU3XAhS2/3vObsoLDHHN/fZ+64m0/8cHOgfGUhrCaE+r/ZFB9lpkc6CP6c0 OGv6geeuXZTSrY93GlZvKwdyTt3Hn4StKrUnGsFGMOsPjmoCujOlRkDXis81DAb8yqy0 s1TA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732612886; x=1733217686; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=E4M5g4cOSJdZAIQtrKw1Bn/YMzw7ikJ/cpvkoOSwCx8=; b=vBkgh/I5r2uljVEy0moSLgt1v8nRFm2HSA5WVN9Q2Lr/PfA23OCWRi+QrghYAd1yaz D3suZDQXWT6pQLsJ7GO7FQG4lv8+0UN0LRBFXEUMEcs0RKHYzinCgJXPKR27+GH0Igzy l0pkf0hOyy1Jvdb4z5Tq0b/bKBmg8A6/NLZoW7iz6g+02Q4CHue6/FoFeffKAczX1BOU Y0hqdzDMjqrOjEaQYjYNEu3aCMmS9ICp3dsNZ6A/Qps/kx17Sx2lzMYyupceo7njFcxb ujf4i0BFaWegz16/B0UV7/kNgnGDS+s6JW0xkb2FGB7rgZJRabM/8hcagpxZmnPRgtTG yQ9Q== X-Forwarded-Encrypted: i=1; AJvYcCVjBFLobP8AwJ3jMB457KSAHLbg8d3qOET5yFfVT1EgboDco+rWmi2yRzA3HxQRC6PSPPeoddCZBVjTITU=@vger.kernel.org X-Gm-Message-State: AOJu0YwZYMwVlZilVHNgmqdgFRS/70k1R0oWJC9/DqODR9SpxY7cCXnI DRLCob8WMolWtbPHfG/kp5pv1C5xMRZFtHCFFQJQZkAOyTSGX8OtzKIOvbDcssM= X-Gm-Gg: ASbGnctRXmRtg6f0OZuapS5W+tfgJMzVlQllrfWVK7xs9jPAf+rFuPV8T9L4YobpBPA /0F6ZeTRUkLFA/JaX2P05dPTJPaO5L0fkeX6nlI2S16sa0TPeAi3eLFq409Pg/tNKZcJP69GYZd 1vmw9MgbKACyLonba6fJNUANv6v5Te3TbUbu9w/rNlMwI/bVqMNiuxhOkTo6BvlyGGUQ2hL4JSW YrZYrFlOq5HWuevKKkDoN58lTXXDbuK505oJI3IisEfSeqBCgLn+PHgOhB4GTrxXJfLSNqm8AA/ v84= X-Google-Smtp-Source: AGHT+IFFCuS7xBS3otNkuGr2IzoMyH/CTvsuJMT+O34OiuKVD91ks7D0BrVopsaLaBF4QZUasDuXXQ== X-Received: by 2002:a05:6000:18ac:b0:37c:d1bc:2666 with SMTP id ffacd0b85a97d-38260b502dcmr12951812f8f.4.1732612885919; Tue, 26 Nov 2024 01:21:25 -0800 (PST) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.28]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3825fbc3a47sm13027694f8f.73.2024.11.26.01.21.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Nov 2024 01:21:25 -0800 (PST) From: Claudiu X-Google-Original-From: Claudiu To: vkoul@kernel.org, kishon@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, p.zabel@pengutronix.de, geert+renesas@glider.be, magnus.damm@gmail.com, gregkh@linuxfoundation.org, yoshihiro.shimoda.uh@renesas.com, christophe.jaillet@wanadoo.fr Cc: linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-usb@vger.kernel.org, claudiu.beznea@tuxon.dev, Claudiu Beznea Subject: [PATCH v2 12/15] arm64: dts: renesas: Add #renesas,sysc-signal-cells to system controller node Date: Tue, 26 Nov 2024 11:20:47 +0200 Message-Id: <20241126092050.1825607-13-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20241126092050.1825607-1-claudiu.beznea.uj@bp.renesas.com> References: <20241126092050.1825607-1-claudiu.beznea.uj@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Claudiu Beznea The system controller on RZ/G3S can provide control access to its signals. To enable this, add the #renesas,sysc-signal-cells DT property. Consumers can use the renesas,sysc-signal DT property to reference the specific SYSC signal that needs to be controlled. Signed-off-by: Claudiu Beznea Reviewed-by: Geert Uytterhoeven --- Changes in v2: - none; this patch is new arch/arm64/boot/dts/renesas/r9a07g043.dtsi | 3 ++- arch/arm64/boot/dts/renesas/r9a07g044.dtsi | 3 ++- arch/arm64/boot/dts/renesas/r9a07g054.dtsi | 3 ++- arch/arm64/boot/dts/renesas/r9a08g045.dtsi | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/arch/arm64/boot/dts/renesas/r9a07g043.dtsi b/arch/arm64/boot/d= ts/renesas/r9a07g043.dtsi index 593c66b27ad1..2ebb951e6a39 100644 --- a/arch/arm64/boot/dts/renesas/r9a07g043.dtsi +++ b/arch/arm64/boot/dts/renesas/r9a07g043.dtsi @@ -585,8 +585,9 @@ cpg: clock-controller@11010000 { }; =20 sysc: system-controller@11020000 { - compatible =3D "renesas,r9a07g043-sysc"; + compatible =3D "renesas,r9a07g043-sysc", "syscon"; reg =3D <0 0x11020000 0 0x10000>; + #renesas,sysc-signal-cells =3D <2>; status =3D "disabled"; }; =20 diff --git a/arch/arm64/boot/dts/renesas/r9a07g044.dtsi b/arch/arm64/boot/d= ts/renesas/r9a07g044.dtsi index 6b1c77cd8261..9dd229cbf288 100644 --- a/arch/arm64/boot/dts/renesas/r9a07g044.dtsi +++ b/arch/arm64/boot/dts/renesas/r9a07g044.dtsi @@ -877,7 +877,7 @@ cpg: clock-controller@11010000 { }; =20 sysc: system-controller@11020000 { - compatible =3D "renesas,r9a07g044-sysc"; + compatible =3D "renesas,r9a07g044-sysc", "syscon"; reg =3D <0 0x11020000 0 0x10000>; interrupts =3D , , @@ -885,6 +885,7 @@ sysc: system-controller@11020000 { ; interrupt-names =3D "lpm_int", "ca55stbydone_int", "cm33stbyr_int", "ca55_deny"; + #renesas,sysc-signal-cells =3D <2>; status =3D "disabled"; }; =20 diff --git a/arch/arm64/boot/dts/renesas/r9a07g054.dtsi b/arch/arm64/boot/d= ts/renesas/r9a07g054.dtsi index 01f59914dd09..31550b8c3143 100644 --- a/arch/arm64/boot/dts/renesas/r9a07g054.dtsi +++ b/arch/arm64/boot/dts/renesas/r9a07g054.dtsi @@ -884,7 +884,7 @@ cpg: clock-controller@11010000 { }; =20 sysc: system-controller@11020000 { - compatible =3D "renesas,r9a07g054-sysc"; + compatible =3D "renesas,r9a07g054-sysc", "syscon"; reg =3D <0 0x11020000 0 0x10000>; interrupts =3D , , @@ -892,6 +892,7 @@ sysc: system-controller@11020000 { ; interrupt-names =3D "lpm_int", "ca55stbydone_int", "cm33stbyr_int", "ca55_deny"; + #renesas,sysc-signal-cells =3D <2>; status =3D "disabled"; }; =20 diff --git a/arch/arm64/boot/dts/renesas/r9a08g045.dtsi b/arch/arm64/boot/d= ts/renesas/r9a08g045.dtsi index be8a0a768c65..169561386f35 100644 --- a/arch/arm64/boot/dts/renesas/r9a08g045.dtsi +++ b/arch/arm64/boot/dts/renesas/r9a08g045.dtsi @@ -198,7 +198,7 @@ cpg: clock-controller@11010000 { }; =20 sysc: system-controller@11020000 { - compatible =3D "renesas,r9a08g045-sysc"; + compatible =3D "renesas,r9a08g045-sysc", "syscon"; reg =3D <0 0x11020000 0 0x10000>; interrupts =3D , , @@ -206,6 +206,7 @@ sysc: system-controller@11020000 { ; interrupt-names =3D "lpm_int", "ca55stbydone_int", "cm33stbyr_int", "ca55_deny"; + #renesas,sysc-signal-cells =3D <2>; status =3D "disabled"; }; =20 --=20 2.39.2 From nobody Mon Feb 9 10:38:58 2026 Received: from mail-lf1-f51.google.com (mail-lf1-f51.google.com [209.85.167.51]) (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 5C1081D5ABE for ; Tue, 26 Nov 2024 09:21:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732612893; cv=none; b=GUX8JhfkDWYsezY9v7+Bsl3VPo6ZciJrjKaZpxhVjBsQiuqB4ubIM7byk6zylQZskXrF8joloyOvN1Ey6UUH0/G2JrSh6Q1HgAA/mvpB6xavbzIA1qxcdZF2XXz6/U5qKo6UN2tdJT5KtiPYlT9VtosnSaxjwWpHNimHVbyXmyE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732612893; c=relaxed/simple; bh=yx8G5kN1dPvXv5haopV3811q4NYnuaEFQqxgpb3NT9U=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=HdhzetlB4VJxFJUg+OQcDnxDbavcAiVNa9ze7bMHZwGMWTSn0xaZ9X5lTzsZSpwDnsviidqtFXR2K4vO2jjuXJdt1EYcQRjOj6ukg9ecJhL2gppT7tDcKQzl6hrRMWAu0z1dAmbCxQPfjZZM5zn2L5wppuoA+q7VtAMSHGqmM7g= 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=NrfxCNhi; arc=none smtp.client-ip=209.85.167.51 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="NrfxCNhi" Received: by mail-lf1-f51.google.com with SMTP id 2adb3069b0e04-53da209492cso6811283e87.3 for ; Tue, 26 Nov 2024 01:21:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1732612887; x=1733217687; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=YL9Ut0Si+rVh2q7F4JB/asIqIrf6jT+s8Jqs0j7Utvw=; b=NrfxCNhilBiejXHT9F52bpfhlKI8cP9bJGB16MQHlKRZvZwLiRszjJ90dAXJHV2zue VnJV35XznayLZuWj+EUz+sY9/XHmgGqjziXqcjSTzs+zUZ4Oh2HGpGWJicTe/jv9aw5i zKXCZHUQAO7SN2TmaGYUx5K8ioS4bH/T40pMN+WVMo3A9NAOu6iL4jSjycvU5FIOgKyu glDKSLCbYapA1ZzM5HtN+VR7zqxtLgVt1xDTlSPaXJpUMEmF0+rJQif9qTNO4xyMgb5E eGrF3e71XVu8bB5N/ms7UHFyUjoP9NdCjY2HrQ2vUoeBoE20kBz8lpr0gSW69LHIiEa9 Su4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732612887; x=1733217687; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=YL9Ut0Si+rVh2q7F4JB/asIqIrf6jT+s8Jqs0j7Utvw=; b=rdx7blbhY/D7A7Mdy7DPfV5lHYSeRYLVlRZ/g7tExo9PZZzAjRij6FmSHEuy37sJHe go+3610qY2e3jsGlQSFIEQDPBIEmwYmd9RbBocwcH/IjUpmIUIrzbc6vkIH5dnTMLrkZ 9Vx3fKaxj++LwpfSz1v5zfx0Hkr+3Fc8HDvQDnp1k5IVZVLs8kNRBuzJKAb0xw2hbP1r QgFoI4aYkrIsbC1KqXNamduP80ubUA2ZGAeEltb6wPNHDB+kA9XyhES78MuGtnqK/idZ nVfitHDS5yCo57DzAEG+Qq3LinlEkWH/9B+hi/GIb3E6St+C9h1NnrDKg2+YLnS+tiHb Oo+A== X-Forwarded-Encrypted: i=1; AJvYcCVOoldWk/9unLrmymyLWHD9IhYa7H4D5GXCaGgMtyrS04hmtS6ZieIxOGlZq+keyA0qF6HlfPTx7y/Dlnc=@vger.kernel.org X-Gm-Message-State: AOJu0YzBzlZxRQ0WYWzNYf9Tbx+GOlfMoxunpvYXVhOrkzfCvIaKenRN HiIzYn8/5B0B1OsCtTLJFtJvi5v9HGAs7L263Sc1/wdizPMN6mZurUVxkH6UAU0= X-Gm-Gg: ASbGnct32gBtbABpRwOG2hEJL83zSrrpEqB4s9LFxTnsX9Xz30GWPq3wseHS0apQauM CYTQel/pCTFhFUlRmUFDSUuxpW0oShgnGo7Uwq4zeu8noy4HcE0KC53RdABuilcF93c1eS8KhZh ZNTpZf1SKXEOL603N/MvHdY3WIfeIGHyAym5fGuOxjpGFK5xIJpX9xA/j9P00bDPF0tedXa8PBU QHPEqIj1vX1cpxKDafQuYnXbmpZLcfz2+VOC2RpR5QXxJq6582CMEsofnOBcHA8IdflQlnTzZTo 3Pw= X-Google-Smtp-Source: AGHT+IEqjpoyWsGOaOphc9gwJtzIyZu0gka779JBN5g8gKK1cf1hZ2MPQM9ajRauQ6fRNW3ZJEX2Wg== X-Received: by 2002:a05:6512:e86:b0:53d:de36:7069 with SMTP id 2adb3069b0e04-53dde36707cmr4605894e87.6.1732612887547; Tue, 26 Nov 2024 01:21:27 -0800 (PST) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.28]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3825fbc3a47sm13027694f8f.73.2024.11.26.01.21.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Nov 2024 01:21:27 -0800 (PST) From: Claudiu X-Google-Original-From: Claudiu To: vkoul@kernel.org, kishon@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, p.zabel@pengutronix.de, geert+renesas@glider.be, magnus.damm@gmail.com, gregkh@linuxfoundation.org, yoshihiro.shimoda.uh@renesas.com, christophe.jaillet@wanadoo.fr Cc: linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-usb@vger.kernel.org, claudiu.beznea@tuxon.dev, Claudiu Beznea Subject: [PATCH v2 13/15] arm64: dts: renesas: r9a08g045: Enable the system controller Date: Tue, 26 Nov 2024 11:20:48 +0200 Message-Id: <20241126092050.1825607-14-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20241126092050.1825607-1-claudiu.beznea.uj@bp.renesas.com> References: <20241126092050.1825607-1-claudiu.beznea.uj@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Claudiu Beznea Enable the system controller. It is needed for USB and SoC identification. Signed-off-by: Claudiu Beznea --- Changes in v2: - none; this patch is new arch/arm64/boot/dts/renesas/r9a08g045.dtsi | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/arm64/boot/dts/renesas/r9a08g045.dtsi b/arch/arm64/boot/d= ts/renesas/r9a08g045.dtsi index 169561386f35..89cf57eb8389 100644 --- a/arch/arm64/boot/dts/renesas/r9a08g045.dtsi +++ b/arch/arm64/boot/dts/renesas/r9a08g045.dtsi @@ -207,7 +207,6 @@ sysc: system-controller@11020000 { interrupt-names =3D "lpm_int", "ca55stbydone_int", "cm33stbyr_int", "ca55_deny"; #renesas,sysc-signal-cells =3D <2>; - status =3D "disabled"; }; =20 pinctrl: pinctrl@11030000 { --=20 2.39.2 From nobody Mon Feb 9 10:38:58 2026 Received: from mail-wr1-f42.google.com (mail-wr1-f42.google.com [209.85.221.42]) (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 410661D5CFE for ; Tue, 26 Nov 2024 09:21:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.42 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732612893; cv=none; b=Y4Ee6Qfo89pUPZ5qoDFT5UwGG9HePlqnQY7HxutfZzSD9bjrgQg+aMQ4cSbQgSeYYmNH6IgLZKpnsAhv0XHskJDlzpFE6Ag/jVJ8krT6kSHHiUb0NpClaxlpXxiE/Xje8fNUULIAR3hTP40c+mBq7YK4T+3Qr83vc4NzYxsK2UU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732612893; c=relaxed/simple; bh=2DMTJUAMbvgwMO6a642uq7ua8fsNBEbd1Oxy7nZyQa8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=hQcta+ZPYlvOMWuTohqx6AVJYEhdTNypXNR5EYhaXNF4jJstrAJuQq4lOdLGOc2/DlyzPHRbjRFmaYiYDVAlOOn/FHCR1lZ8BaEfuKiOXjZMyTIg1Zob3CBBA3Y/D9ikhZVuFo0QYGdelDEbPgWimvSPpTf6je2T7mO7lspHhXo= 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=GHKxhmxe; arc=none smtp.client-ip=209.85.221.42 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="GHKxhmxe" Received: by mail-wr1-f42.google.com with SMTP id ffacd0b85a97d-382325b0508so3571349f8f.3 for ; Tue, 26 Nov 2024 01:21:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1732612889; x=1733217689; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=qLdnHZoveqIvO5Hl0Ml7DeyDrz+2Vaoq4NvOVCNrZ/A=; b=GHKxhmxesIrI/tdCGHSbmOfQHu6ELwNJAb70ipA17qFwm1GMQH19ccoVbHToRt9Csd 8ZMaa8o9HGLQMySu7g+3G35vE56oMEIkRSZwp/gwiUQTNyOb6Zv0y+J85OrZfkT4K9KD On+9M8MDYDVrBBmofSaeo+X6YOUyTX4PIKCxqhKrNeQPoKffc+oATZ1anrOorshIcM00 d9icarOpmzQNPzRMOOC/h+Ae6rtjfLsOlzBvmmm6QiJ+8cZroT13MoZiWwIytjRS26kY TTZgblhCkoouhIJmS3cglEKtKdQbv38tWxcK9L/teWhzlrUDatIygv/HU1BWOQpP/TnV ZPTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732612889; x=1733217689; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=qLdnHZoveqIvO5Hl0Ml7DeyDrz+2Vaoq4NvOVCNrZ/A=; b=X/QaSPDzqVrY5iR+QWj+biCV/j86+hUsyTQlmYgVgFhkOA2XSgZii3CeCpJjHqnVls QpNcttyZm1GVV9/2FKCQgKZUxYLYVr3UWigQrjFwSV8S6chRAXZREG9PoegC4kc9DQNG ZR7SqIq3fMqWZ5TqAh1ejB3LrFke9Ib7TmWrbee2VW2mA4x35k85I+EJZWU4qFei27SA UtpPwIlmm++62FfA8XASm5W914ENg7HokkqRGTwY5Cto/uNPhv2itvEaDiv5VF6Kzh8K SYyRCiucUZla2rvBTX0f/GKZTJ8SBirGP8Y8djg7m9V4Nmk1Lk/DQBTJzqU+4clfV7Sb tJhA== X-Forwarded-Encrypted: i=1; AJvYcCUjE42afux13N0SDNyqShNQ6lHQkvhGYYgor9H/6kvYc0toHrVmXR+xFDkn5fbco6R4Ux0le8N3epB66Ko=@vger.kernel.org X-Gm-Message-State: AOJu0YwItZbk79VPbBGUZEm4uNvkFIbPkkTmphytzNijHU9GyjZMh8xn 1HZ/iqzNUV5tDHqSmiFoiypSNfVbAmNBjrZNRW1Ylk1w72aTsPjnmQrexaXeIuo= X-Gm-Gg: ASbGncveYO3uZQcaADKPvMIiRZk3O7q60uxGJ3M9jgDy+ugHoRu0+PiSdUe6HzC8Pvw Zn/aHl9u0nRYMxsbJseDMwmQQVisCO2sKdm9H59Gf6Qs6v6qf6a7Su+4I4zo0TfvTa0wEeu4Udw wu3sQaQsd92qxlwksiFFBqoxLFA4NKxspkHXASo0F4KrqzPmJ5r+bnIhQqWT29bugYB5uoloOYU QnMmeigy83pVSS0pZLm5ZKKKzQ91J63pb3WdMFt46njGrgmw7QsXJ02mqgj+dxLM4loBCtNvMxf 3nE= X-Google-Smtp-Source: AGHT+IFJiTv231Q0pA7mNGDg8+ehro7YZHPIBfZNFr1G9xSWhy4hE646eb2huz0yqoJ24h09vlKStA== X-Received: by 2002:a05:6000:1acc:b0:382:450c:2601 with SMTP id ffacd0b85a97d-38260b6b632mr11281224f8f.24.1732612889501; Tue, 26 Nov 2024 01:21:29 -0800 (PST) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.28]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3825fbc3a47sm13027694f8f.73.2024.11.26.01.21.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Nov 2024 01:21:28 -0800 (PST) From: Claudiu X-Google-Original-From: Claudiu To: vkoul@kernel.org, kishon@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, p.zabel@pengutronix.de, geert+renesas@glider.be, magnus.damm@gmail.com, gregkh@linuxfoundation.org, yoshihiro.shimoda.uh@renesas.com, christophe.jaillet@wanadoo.fr Cc: linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-usb@vger.kernel.org, claudiu.beznea@tuxon.dev, Claudiu Beznea Subject: [PATCH v2 14/15] arm64: dts: renesas: r9a08g045: Add USB support Date: Tue, 26 Nov 2024 11:20:49 +0200 Message-Id: <20241126092050.1825607-15-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20241126092050.1825607-1-claudiu.beznea.uj@bp.renesas.com> References: <20241126092050.1825607-1-claudiu.beznea.uj@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Claudiu Beznea Add USB nodes for the Renesas RZ/G3S SoC. This consists of PHY reset, host and device support. Reviewed-by: Geert Uytterhoeven Signed-off-by: Claudiu Beznea --- Changes in v2: - this was patch 14/16 in v1 - added renesas,sysc-signal properties to USB PHYs - collected tags - Geert: I kept your tag; please let me know if you consider otherwise=20 arch/arm64/boot/dts/renesas/r9a08g045.dtsi | 119 +++++++++++++++++++++ 1 file changed, 119 insertions(+) diff --git a/arch/arm64/boot/dts/renesas/r9a08g045.dtsi b/arch/arm64/boot/d= ts/renesas/r9a08g045.dtsi index 89cf57eb8389..6ce94bbecfa6 100644 --- a/arch/arm64/boot/dts/renesas/r9a08g045.dtsi +++ b/arch/arm64/boot/dts/renesas/r9a08g045.dtsi @@ -417,6 +417,125 @@ eth1: ethernet@11c40000 { status =3D "disabled"; }; =20 + phyrst: usbphy-ctrl@11e00000 { + compatible =3D "renesas,r9a08g045-usbphy-ctrl", "renesas,rzg2l-usbphy-c= trl"; + reg =3D <0 0x11e00000 0 0x10000>; + clocks =3D <&cpg CPG_MOD R9A08G045_USB_PCLK>; + resets =3D <&cpg R9A08G045_USB_PRESETN>; + power-domains =3D <&cpg>; + #reset-cells =3D <1>; + status =3D "disabled"; + + usb0_vbus_otg: regulator-vbus { + regulator-name =3D "vbus"; + }; + }; + + ohci0: usb@11e10000 { + compatible =3D "generic-ohci"; + reg =3D <0 0x11e10000 0 0x100>; + interrupts =3D ; + clocks =3D <&cpg CPG_MOD R9A08G045_USB_PCLK>, + <&cpg CPG_MOD R9A08G045_USB_U2H0_HCLK>; + resets =3D <&phyrst 0>, + <&cpg R9A08G045_USB_U2H0_HRESETN>; + phys =3D <&usb2_phy0 1>; + phy-names =3D "usb"; + power-domains =3D <&cpg>; + status =3D "disabled"; + }; + + ehci0: usb@11e10100 { + compatible =3D "generic-ehci"; + reg =3D <0 0x11e10100 0 0x100>; + interrupts =3D ; + clocks =3D <&cpg CPG_MOD R9A08G045_USB_PCLK>, + <&cpg CPG_MOD R9A08G045_USB_U2H0_HCLK>; + resets =3D <&phyrst 0>, + <&cpg R9A08G045_USB_U2H0_HRESETN>; + phys =3D <&usb2_phy0 2>; + phy-names =3D "usb"; + companion =3D <&ohci0>; + power-domains =3D <&cpg>; + status =3D "disabled"; + }; + + usb2_phy0: usb-phy@11e10200 { + compatible =3D "renesas,usb2-phy-r9a08g045"; + reg =3D <0 0x11e10200 0 0x700>; + interrupts =3D ; + clocks =3D <&cpg CPG_MOD R9A08G045_USB_PCLK>, + <&cpg CPG_MOD R9A08G045_USB_U2H0_HCLK>; + resets =3D <&phyrst 0>, + <&cpg R9A08G045_USB_U2H0_HRESETN>; + #phy-cells =3D <1>; + power-domains =3D <&cpg>; + renesas,sysc-signal =3D <&sysc 0xd70 0x1>; + status =3D "disabled"; + }; + + hsusb: usb@11e20000 { + compatible =3D "renesas,usbhs-r9a08g045", + "renesas,rzg2l-usbhs"; + reg =3D <0 0x11e20000 0 0x10000>; + interrupts =3D , + , + , + ; + clocks =3D <&cpg CPG_MOD R9A08G045_USB_PCLK>, + <&cpg CPG_MOD R9A08G045_USB_U2P_EXR_CPUCLK>; + resets =3D <&phyrst 0>, + <&cpg R9A08G045_USB_U2P_EXL_SYSRST>; + renesas,buswait =3D <7>; + phys =3D <&usb2_phy0 3>; + phy-names =3D "usb"; + power-domains =3D <&cpg>; + status =3D "disabled"; + }; + + ohci1: usb@11e30000 { + compatible =3D "generic-ohci"; + reg =3D <0 0x11e30000 0 0x100>; + interrupts =3D ; + clocks =3D <&cpg CPG_MOD R9A08G045_USB_PCLK>, + <&cpg CPG_MOD R9A08G045_USB_U2H1_HCLK>; + resets =3D <&phyrst 1>, + <&cpg R9A08G045_USB_U2H1_HRESETN>; + phys =3D <&usb2_phy1 1>; + phy-names =3D "usb"; + power-domains =3D <&cpg>; + status =3D "disabled"; + }; + + ehci1: usb@11e30100 { + compatible =3D "generic-ehci"; + reg =3D <0 0x11e30100 0 0x100>; + interrupts =3D ; + clocks =3D <&cpg CPG_MOD R9A08G045_USB_PCLK>, + <&cpg CPG_MOD R9A08G045_USB_U2H1_HCLK>; + resets =3D <&phyrst 1>, + <&cpg R9A08G045_USB_U2H1_HRESETN>; + phys =3D <&usb2_phy1 2>; + phy-names =3D "usb"; + companion =3D <&ohci1>; + power-domains =3D <&cpg>; + status =3D "disabled"; + }; + + usb2_phy1: usb-phy@11e30200 { + compatible =3D "renesas,usb2-phy-r9a08g045"; + reg =3D <0 0x11e30200 0 0x700>; + interrupts =3D ; + clocks =3D <&cpg CPG_MOD R9A08G045_USB_PCLK>, + <&cpg CPG_MOD R9A08G045_USB_U2H1_HCLK>; + resets =3D <&phyrst 1>, + <&cpg R9A08G045_USB_U2H1_HRESETN>; + #phy-cells =3D <1>; + power-domains =3D <&cpg>; + renesas,sysc-signal =3D <&sysc 0xd70 0x1>; + status =3D "disabled"; + }; + gic: interrupt-controller@12400000 { compatible =3D "arm,gic-v3"; #interrupt-cells =3D <3>; --=20 2.39.2 From nobody Mon Feb 9 10:38:58 2026 Received: from mail-wr1-f53.google.com (mail-wr1-f53.google.com [209.85.221.53]) (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 D47491D63C7 for ; Tue, 26 Nov 2024 09:21:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.53 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732612894; cv=none; b=flP/US6o/VZCO4DhEfvYTIIPsWJLgfq27zDnJLEJfwnvFSwmJ0cRH4yJA4YbCk4JpHxPnOIfFtlXRyxB0wDtyykt8nCg4KKtoiqZRNLIi7+V2B+RGL7y691F6yzxv5BapJXdVzcNFdqQ1TuAfKxTqKrmb9bS15t157ZgCYmaoNg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732612894; c=relaxed/simple; bh=sCMOLfdCfDxxCZrfpD7yC3KBNfJKGT4d6K4oqUP2q/o=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=tT0YoEjFm9fvNiSTDDveUJA535smc8Ay5JoRra6fK2YRMsWO4mkWoiyRQCJPPtMFyxVglQpR+so1acfC+/D83m9EdLHqfFzs30P1r8Y0tSba/eACNzo2QXf90r4uwbkU4py6uo/RL6P+I/bBD6nSaf7Ak0cygCcQWWJg8CWj/no= 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=DReuwvzV; arc=none smtp.client-ip=209.85.221.53 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="DReuwvzV" Received: by mail-wr1-f53.google.com with SMTP id ffacd0b85a97d-382411ea5eeso3001486f8f.0 for ; Tue, 26 Nov 2024 01:21:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1732612891; x=1733217691; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=WCzqc2TaOMYXuzsxltqgd9yUEqr7UmmqRYfJJbdxixs=; b=DReuwvzV3wTK2sEWOAoVa626fObujUr0SEDjx5SVhvI01JdJoR71zoMkZrScwH7t4t BtaO9y+QIoZyTmjaUTZYBbVgEHNivldhvKowYOP183h7pIBVR+XqdsisQZN+LqGR5Cjj lOWBebEijVtZpL1CFpu3fbnOZnsazafyGJF246MiolVXc2l609QJJ/5bQCBNcj/Rg0L5 49Yf2TcYBI2eZsPykwMyJHytA+zyDa4PKFRcmdVJnFXZZDC/pfneJx8UUlO9DjzoPm8x 8nTh1G8XCQKoSds5PRUoX2Fp6iaDBsvRgGohLfLV9JFurlqhE0v0t27xowkzpWdEQouo BYLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732612891; x=1733217691; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=WCzqc2TaOMYXuzsxltqgd9yUEqr7UmmqRYfJJbdxixs=; b=ipeUr/5zbT0QI7j9O2Kamima8+MlryN49qJaG/AV3Q0rtjJrILxR56XIP3DkWHSY5y Nj+jI6swWJTaDginivrS0rq5i9OK0KmM50l3AKo2uSEETqiDRktv4j27e3kMCTQi1SC9 Ss5Wte7cu+fxZ2lM2ncWRqDDQYF7k5Z2bjXKRXXfIG12WTBlT2m1WpWOJt3BdvNDoZb9 r6COd1dZSaIo623vMsKMdzlOXEZjUbSkoq9MbumVd3v0znsBONbwuCkgmQrdRl/IGYid N8xQUVdQsera2Yk3J2xnveDeH69rx8z5r0tyMNXkaqpD6Zlu9GRk7BMwIaHJ9JPDdqXB 5h7A== X-Forwarded-Encrypted: i=1; AJvYcCXKDpcM9xAFylk9LPX/wsF4ybwKsDR3VmaG6DVho0qBbZBhPP5kZfSYsq7HF+3S34xkeVMoWbLIMay/5Pg=@vger.kernel.org X-Gm-Message-State: AOJu0YwZYJNYZqU0PI1LZtl/uqUL8n268k0+F5Q+3TTLL/he6j0vZTad zzi3rgQpq8Mdv9E62ou0Umr+kxSbuJi2TnEkRmP5K4SQLoLY2VvUG+hQ1HSD+UM= X-Gm-Gg: ASbGncvhZX2xNoMKT450fmQYgyU3/KrAHO1MUJq5urvrRhyZidg5Dwek2Bm0oPMh4p5 EdpcVLn5wBe3efK2N1JaZsqv7MGd7khT7JVAkyZ3l2niGXWFc9rDO0CXnKYG8kufBgZofPC5YHR Rk77ZtRgSoNfYCInNaxgmpTHWB9Dmo95znpS1/WgB0DsYtNMzan8DexYlyEP/b4JhQYMv1RnP7W ZHgssJqudv7PQUwA+SBuAOrIqHHSPovLxqGXJCz6dMsVOM5Phdc+2SxuBrh9I0ZD+NE80W3J3bz dZo= X-Google-Smtp-Source: AGHT+IGt16Gf28ygqBUeg7Z1sI/QNXodT7+mOuBvkflJeOYMzIEcDxZQSC743PyULKBWHu6xn+lhzw== X-Received: by 2002:a5d:47c5:0:b0:382:3cb8:bd4c with SMTP id ffacd0b85a97d-385bfaea942mr2316685f8f.12.1732612891193; Tue, 26 Nov 2024 01:21:31 -0800 (PST) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.28]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3825fbc3a47sm13027694f8f.73.2024.11.26.01.21.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Nov 2024 01:21:30 -0800 (PST) From: Claudiu X-Google-Original-From: Claudiu To: vkoul@kernel.org, kishon@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, p.zabel@pengutronix.de, geert+renesas@glider.be, magnus.damm@gmail.com, gregkh@linuxfoundation.org, yoshihiro.shimoda.uh@renesas.com, christophe.jaillet@wanadoo.fr Cc: linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-usb@vger.kernel.org, claudiu.beznea@tuxon.dev, Claudiu Beznea Subject: [PATCH v2 15/15] arm64: dts: renesas: rzg3s-smarc: Enable USB support Date: Tue, 26 Nov 2024 11:20:50 +0200 Message-Id: <20241126092050.1825607-16-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20241126092050.1825607-1-claudiu.beznea.uj@bp.renesas.com> References: <20241126092050.1825607-1-claudiu.beznea.uj@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Claudiu Beznea Enable USB support (host, device, USB PHYs). Signed-off-by: Claudiu Beznea Reviewed-by: Geert Uytterhoeven --- Changes in v2: - this was patch 15/16 in v1: - dropped sysc enablement as it is now done in SoC dtsi file arch/arm64/boot/dts/renesas/rzg3s-smarc.dtsi | 57 ++++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/arch/arm64/boot/dts/renesas/rzg3s-smarc.dtsi b/arch/arm64/boot= /dts/renesas/rzg3s-smarc.dtsi index 4509151344c4..84523e771ebf 100644 --- a/arch/arm64/boot/dts/renesas/rzg3s-smarc.dtsi +++ b/arch/arm64/boot/dts/renesas/rzg3s-smarc.dtsi @@ -64,12 +64,35 @@ vccq_sdhi1: regulator-vccq-sdhi1 { }; }; =20 +&ehci0 { + dr_mode =3D "otg"; + status =3D "okay"; +}; + +&ehci1 { + status =3D "okay"; +}; + +&hsusb { + dr_mode =3D "otg"; + status =3D "okay"; +}; + &i2c0 { status =3D "okay"; =20 clock-frequency =3D <1000000>; }; =20 +&ohci0 { + dr_mode =3D "otg"; + status =3D "okay"; +}; + +&ohci1 { + status =3D "okay"; +}; + &pinctrl { key-1-gpio-hog { gpio-hog; @@ -128,6 +151,27 @@ cd { pinmux =3D ; /* SD1_CD */ }; }; + + usb0_pins: usb0 { + peri { + pinmux =3D , /* VBUS */ + ; /* OVC */ + }; + + otg { + pinmux =3D ; /* OTG_ID */ + bias-pull-up; + }; + }; + + usb1_pins: usb1 { + pinmux =3D , /* OVC */ + ; /* VBUS */ + }; +}; + +&phyrst { + status =3D "okay"; }; =20 &scif0 { @@ -148,3 +192,16 @@ &sdhi1 { max-frequency =3D <125000000>; status =3D "okay"; }; + +&usb2_phy0 { + pinctrl-0 =3D <&usb0_pins>; + pinctrl-names =3D "default"; + vbus-supply =3D <&usb0_vbus_otg>; + status =3D "okay"; +}; + +&usb2_phy1 { + pinctrl-0 =3D <&usb1_pins>; + pinctrl-names =3D "default"; + status =3D "okay"; +}; --=20 2.39.2