From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f177.google.com (mail-pl1-f177.google.com [209.85.214.177]) (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 A94843F210B for ; Tue, 9 Jun 2026 11:39:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.177 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781005145; cv=none; b=eoTl+57x/AjZ+rZXt+nQn51Pwa4gcZ6LrW2NfY9HjR4SetVOOQ6j8qQ4YNzSO5czV66q/floSk8QDecWiWOQO9eAJadsCYX1hhz9y4WDjEouhVc6HQYh+jOJbWMmsLiWRuMKRp1cGTvJzRIh4KBmoZr6Otl15Nt8afULxsNCm0s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781005145; c=relaxed/simple; bh=hFuaXMBuOsZvycVnG5qVkZeVz5/9NRuZ7/y9BtjtH7Y=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=JUPe4zsv5FAvMU84B8eYL5L29/9DSRK2zQyx6mJr4l+P94l7WAEODdL+E+/seDzi7BpRBq5I7XZfXPz9GvRhy5Ot2TaK288XH0VO85Qiqlsk/ck8v26p4YGuta4aC3FqA3JFycyutgEIIOMAf1xSCM2YVm4Uiq1wNjmr2ld/rCw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=RnHEGmiV; arc=none smtp.client-ip=209.85.214.177 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="RnHEGmiV" Received: by mail-pl1-f177.google.com with SMTP id d9443c01a7336-2c0aa420401so41745325ad.3 for ; Tue, 09 Jun 2026 04:39:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1781005143; x=1781609943; 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=/ABlpN+jPxbmTB0MnLce2t9pp9M98KB9DN7jc9qFYRY=; b=RnHEGmiVLLbjOKUrJPpus7niF8zeafRAphwpPiN71X9degIXm87nX8M23Uxj3rhFHc KIeysW1KX7lo8DcVFrPli3Mjs2RhRFLtYUsSA4Bu4SQAfLo/PS4PEoM/iqOQxsLqGqCQ zCqXsWziXItLQNR7ZcerxBSK9B1dNq2sAcSAiUUto2ImRb6HfUPipqsceTjrQlEm+dc2 se3rPlHIvoisMdn6vsIzfccMAlglboYrkwDMHUB5ryyPwJTOXuNvkiLzLf+z7/7/gNll vL0CMYVl/ubTyjj4WDoNQJUHcjDejki0bypBOsDYhcWbbJqnjwIETh5plRwVRwny41FP N0kA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781005143; x=1781609943; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=/ABlpN+jPxbmTB0MnLce2t9pp9M98KB9DN7jc9qFYRY=; b=Qin4oZ3a0HduhGi4DZIpZLyTCyfF685UNR1jEhCODZrmTFvunEgOIPFimD7FEQBbo2 A3E0p586Cq67z5+5/fOjoEluEOhuzg81TZvDIctw7OoA8uPsqay56CldmBgt8UIwbu3+ iIf5ykghnfdgwUWEqQj+dGuXjTJBw2YfrznsujTMgpgYnrOtgxYZfVn0jH/T3PmhGEw7 Pq3B3LVJBGUZXgHreK3rDizbOvU4cpK5QZqAuoaTSzD40gCLCj7MpV/nmgrKp0oWMptQ eqjDSX6tw15dtAEUXpIyiuVFgumvw/AI1kaWjsSN082qm1DVUyfh+Jr4sslP2iGOnbq/ NJYw== X-Forwarded-Encrypted: i=1; AFNElJ9A7P9PR0S6IC4fe/8W1gZ4AR1SQvVGGRZ2/kQ8uLNxNMd5yBMMSJY1lXndwfFLJHQauDkvNS10wF4Kh0c=@vger.kernel.org X-Gm-Message-State: AOJu0Yz/JnoaqHti5y28EGmyVH+6NLTFfIrzTYzIPuEfH1xQx+c/AHXN 7jUIcPhDbvz1dMENSDBcfI8ph0Q/Z7ObtzcaUXgPyJpNDvV8XeWLa2HL X-Gm-Gg: Acq92OHsarpGAHYekWhcSWT5r/o4vK8GJuHnO98SjobmoZD5Yc6+MSa4jWi0yz4qkEY pgMHtW+4/QRlfWz/NuikfQy2RlpOcxnqZ7/TkZK4r1KfVNJ0TFYQWLFG8m3ZBhBgGa6p0hoLqsu q0LuEu25mFBQpDj8HUx+Q/t6f/9AGX+Kq2YA5ak7m+MTrSCLN0EPldqynR5Dj8yiEdYNSg+/nrn GtdhaXp33c7GG10Ven87daq5n4rzlj+EEo1S8GpggLtwKWxpZq9Fj4s0FgMxJ30dwd9gPvyP9+Q jeivkUm7aaEdJHsSgbSjTEECY6qHR0pH40I36cINkVbj5NZs7Nm48NTbIyYGGQ6HYnAXfrNTEhH U3ZEhEQtBGy6qS6t5SgPssD2hiOCNMp3bHRZXrCrCPgnl/WMFW/RbGFjzr3AQjH3hTY5cAHkdpP TDOHsMxj1iDE/3bgvwFAZ/PUNAwH7h59fHP0olcuSZbLME78mGgtX0ol3bLoDqw0Yjp3Jh X-Received: by 2002:a17:902:f745:b0:2c2:2a8a:af69 with SMTP id d9443c01a7336-2c22a8ab1a9mr174051145ad.9.1781005142987; Tue, 09 Jun 2026 04:39:02 -0700 (PDT) Received: from phuc-desktop.. ([183.91.15.56]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2c164f70660sm210755635ad.11.2026.06.09.04.38.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jun 2026 04:39:02 -0700 (PDT) From: phucduc.bui@gmail.com To: Kuninori Morimoto , Mark Brown , Geert Uytterhoeven Cc: Liam Girdwood , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Magnus Damm , Jaroslav Kysela , Takashi Iwai , linux-sound@vger.kernel.org, linux-renesas-soc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, bui duc phuc Subject: [PATCH v6 01/11] ASoC: dt-bindings: renesas,fsi: add support multiple clocks Date: Tue, 9 Jun 2026 18:38:26 +0700 Message-ID: <20260609113836.45079-2-phucduc.bui@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260609113836.45079-1-phucduc.bui@gmail.com> References: <20260609113836.45079-1-phucduc.bui@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: bui duc phuc The FSI on r8a7740 requires the SPU bus/bridge clock to be enabled before accessing its registers. Without this clock, any register access leads to a system hang as the FSI block sits behind the SPU bus. Update the binding to support multiple clocks to properly describe the hardware clock tree, including: - SPU bus/bridge clock (spu) for register access. - CPG DIV6 clocks (icka/b) as functional clock. - FSI dividers (diva/b) for audio clock generation. - External clock inputs (xcka/b) provided by the board. The hardware supports several valid clock configurations. For example, when both FSIA and FSIB operate as slaves, only the fck and spu clocks are required. When a port operates as a master, it can use either an internal clock source (ickx + divx) or an external clock source (ickx + xckx). Therefore, while fck and spu are mandatory on r8a7740, the remaining clocks (icka/b, diva/b and xcka/b) are optional and depend on the selected master/slave configuration and clock source. Both sh73a0 and r8a7740 define the SPU DIV6 clock control register at 0xe6150084. The binding therefore documents the clocks supported by the FSI driver for these variants. Signed-off-by: bui duc phuc --- Changes in v6: - DT binding updates (drop uniqueItems, commit message) based on Krzysztof's feedback. Changes in v4: - Update dt-bindings based on feedback from Krzysztof, Rob, and Geert. .../bindings/sound/renesas,fsi.yaml | 60 +++++++++++++++++-- 1 file changed, 55 insertions(+), 5 deletions(-) diff --git a/Documentation/devicetree/bindings/sound/renesas,fsi.yaml b/Documentation/devicetree/bindings/sound/renesas,fsi.yaml index df91991699a7..803945b7f82f 100644 --- a/Documentation/devicetree/bindings/sound/renesas,fsi.yaml +++ b/Documentation/devicetree/bindings/sound/renesas,fsi.yaml @@ -9,9 +9,6 @@ title: Renesas FIFO-buffered Serial Interface (FSI) maintainers: - Kuninori Morimoto -allOf: - - $ref: dai-common.yaml# - properties: $nodename: pattern: "^sound@.*" @@ -38,7 +35,32 @@ properties: maxItems: 1 clocks: - maxItems: 1 + minItems: 1 + items: + - description: Main FSI module clock + - description: | + SPU bus/bridge clock. On R8A7740, this clock must be enabled to allow + register access as the FSI block is connected behind the SPU bus. + - description: CPG DIV6 functional clocks for FSI port A + - description: CPG DIV6 functional clocks for FSI port B + - description: FSI dividers for port A used for audio clock generation + - description: FSI dividers for port B used for audio clock generation + - description: External clock inputs for FSI port A provided by the board + - description: External clock inputs for FSI port B provided by the board + + clock-names: + minItems: 1 + maxItems: 8 + items: + enum: + - fck # Main FSI module clock + - spu # optional SPU bus/bridge clock + - icka # optional CPG DIV6 functional clocks for FSI port A + - ickb # optional CPG DIV6 functional clocks for FSI port B + - diva # optional FSI dividers for port A used for audio clock generation + - divb # optional FSI dividers for port B used for audio clock generation + - xcka # optional External clock inputs for FSI port A provided by the board + - xckb # optional External clock inputs for FSI port B provided by the board power-domains: maxItems: 1 @@ -69,6 +91,30 @@ required: unevaluatedProperties: false +allOf: + - $ref: dai-common.yaml# + - if: + properties: + compatible: + contains: + const: renesas,fsi2-r8a7740 + then: + required: + - clock-names + + properties: + clock-names: + minItems: 2 + items: + - const: fck + - const: spu + - enum: [icka, ickb, diva, divb, xcka, xckb] + - enum: [icka, ickb, diva, divb, xcka, xckb] + - enum: [icka, ickb, diva, divb, xcka, xckb] + - enum: [icka, ickb, diva, divb, xcka, xckb] + - enum: [icka, ickb, diva, divb, xcka, xckb] + - enum: [icka, ickb, diva, divb, xcka, xckb] + examples: - | #include @@ -77,7 +123,11 @@ examples: compatible = "renesas,fsi2-r8a7740", "renesas,sh_fsi2"; reg = <0xfe1f0000 0x400>; interrupts = ; - clocks = <&mstp3_clks R8A7740_CLK_FSI>; + clocks = <&mstp3_clks R8A7740_CLK_FSI>, <&spu_clk>, + <&fsia_clk>, <&fsiack_clk>, <&fsidiva_clk>, + <&fsib_clk>, <&fsibck_clk>, <&fsidivb_clk>; + clock-names = "fck", "spu", "icka", "xcka", "diva", + "ickb", "xckb", "divb"; power-domains = <&pd_a4mp>; #sound-dai-cells = <1>; -- 2.43.0