From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (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 3302C1EE7D3; Mon, 3 Mar 2025 09:35:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=140.211.166.183 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740994520; cv=none; b=RozIdKeZEGnF5PqKuum/jwpZB2zZ0nRL+i5Wists13JEB8NunO6mFnxPQ1OmKFMqYFVtZmBZYf+YjjX0DHXQzq6mGg+C2riPtWDU6udCv9ToVP8Bv2MkM139A0D99qFykBRm3D7EpLpQU78tQR9ea5zVsnytTxNifRdzDbRrQS0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740994520; c=relaxed/simple; bh=gCpNNSve1jlt1V5SnYQVpGjhoChNTjthXctFbRk7RpM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=jG6W0za3fTapzwPCSeztAPnSGKK8+Qsf4cFdpCRHS9f/T75/kTEj0xk7OqueGsAkxhBLBr24e9F8GJ3iUxRJvG1NCJfJvjs+S6TCR7t490Pt6HwyO3yZITG4CvRe8F/FP9PwJnyBvyIacI09068+PySqbPNPoT0YV0H93UgNWBc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gentoo.org; spf=pass smtp.mailfrom=gentoo.org; arc=none smtp.client-ip=140.211.166.183 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gentoo.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gentoo.org Received: from localhost (unknown [116.232.55.252]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: dlan) by smtp.gentoo.org (Postfix) with ESMTPSA id 06910342FAE; Mon, 03 Mar 2025 09:35:16 +0000 (UTC) Date: Mon, 3 Mar 2025 09:35:06 +0000 From: Yixun Lan To: Troy Mitchell Cc: Andi Shyti , Rob Herring , Krzysztof Kozlowski , Conor Dooley , linux-riscv@lists.infradead.org, linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, spacemit@lists.linux.dev, Conor Dooley Subject: Re: [PATCH RESEND v5 1/2] dt-bindings: i2c: spacemit: add support for K1 SoC Message-ID: <20250303093506-GYA58937@gentoo> References: <20250303-k1-i2c-master-v5-0-21dfc7adfe37@gmail.com> <20250303-k1-i2c-master-v5-1-21dfc7adfe37@gmail.com> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20250303-k1-i2c-master-v5-1-21dfc7adfe37@gmail.com> On 13:30 Mon 03 Mar , Troy Mitchell wrote: > The I2C of K1 supports fast-speed-mode and high-speed-mode, > and supports FIFO transmission. > > Reviewed-by: Conor Dooley > Signed-off-by: Troy Mitchell > --- > .../devicetree/bindings/i2c/spacemit,k1-i2c.yaml | 59 ++++++++++++++++++++++ > 1 file changed, 59 insertions(+) > > diff --git a/Documentation/devicetree/bindings/i2c/spacemit,k1-i2c.yaml b/Documentation/devicetree/bindings/i2c/spacemit,k1-i2c.yaml > new file mode 100644 > index 0000000000000000000000000000000000000000..db49f1f473e6f166f534b276c86b3951d86341c3 > --- /dev/null > +++ b/Documentation/devicetree/bindings/i2c/spacemit,k1-i2c.yaml > @@ -0,0 +1,59 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/i2c/spacemit,k1-i2c.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: I2C controller embedded in SpacemiT's K1 SoC > + > +maintainers: > + - Troy Mitchell > + > +properties: > + compatible: > + const: spacemit,k1-i2c > + > + reg: > + maxItems: 1 > + > + interrupts: > + maxItems: 1 > + .. > + clocks: > + minItems: 2 > + maxItems: 2 > + > + clock-names: > + minItems: 2 > + maxItems: 2 I'd suggest to give a brief description and explicit clock name here, you can consult marvell,mv64xxx-i2c.yaml for example > + > + clock-frequency: > + description: | > + K1 support three different modes which running different frequencies > + standard speed mode: up to 100000 (100Hz) > + fast speed mode : up to 400000 (400Hz) > + high speed mode : up to 3300000 (3.3Mhz) > + default: 400000 > + maximum: 3300000 > + > +required: > + - compatible > + - reg > + - interrupts > + - clocks > + > +unevaluatedProperties: false > + > +examples: > + - | > + i2c@d4010800 { > + compatible = "spacemit,k1-i2c"; > + reg = <0xd4010800 0x38>; > + interrupt-parent = <&plic>; > + interrupts = <36>; > + clocks = <&ccu 176>, <&ccu 90>; > + clock-names = "apb", "twsi"; 9.1.4.61 TWSI0 CLOCK RESET CONTROL REGISTER(APBC_TWSI0_CLK_RST) https://developer.spacemit.com/documentation?token=LCrKwWDasiJuROkVNusc2pWTnEb#part594 from above docs, there are two clocks bit[1] - FNCLK, TWSI0 Functional Clock Enable/Disable bit[0] - APBCLK, TWSI0 APB Bus Clock Enable/Disable I'd suggest to name it according to the functionality, thus 'func', 'bus' clock, not its source.. which would make it more system wide consistent > + clock-frequency = <100000>; > + }; > + > +... > > -- > 2.34.1 > -- Yixun Lan (dlan) Gentoo Linux Developer GPG Key ID AABEFD55