From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E53E3ECE589 for ; Mon, 9 Sep 2024 21:04:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ai6mwmGrKG+3MacFvcJ/DkKbthV/rblU7qYvXhBodO0=; b=Ge7UKJXWK3e3+M fHfo4JloV9BVqPW4IpLXWWijbrZCOiUca2UfbvBwkt2uoaQJMzRI3+6xgqVtHJAwOkyBFp02YQAf7 xBoA41GlEgxnaOP4wi5S0sdUoGyl/0YY1vgFGamCmThMklo8X7Jld5NWTUMfR+MEIfsoDI3IrniVZ SgPck52mZ+ysRqiHq1DEYnkQGPa7+kxMcsDs7+YD0m+57FoFfUyzYc3+0qve0ZJmMcHyz+HYdNcsT LsvoCmthg/6GZaWi1m7NPG+iFmgv5QlUTKO8OuU4vIpOV481OBgUBoTlLDxjv6YNgt1GbolGTmqOP NdNTtGn+JsogWjC9FU0g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1snlZ9-00000003Jnv-0pit; Mon, 09 Sep 2024 21:04:55 +0000 Received: from relay8-d.mail.gandi.net ([217.70.183.201]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1snlXq-00000003JLf-22VM for linux-i3c@lists.infradead.org; Mon, 09 Sep 2024 21:03:36 +0000 Received: by mail.gandi.net (Postfix) with ESMTPSA id 380EA1BF208; Mon, 9 Sep 2024 21:03:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1725915810; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=C94iueCtkgJZqwdOpqmnG2jA8jBtTJ3vB4jL9HoEEOY=; b=YoLGblidTwXhZDm/vQcmx5P989eRq14+XupMbGnNV9Nm4xUQQEFGszO9XU4U4HRIaFAiwF Xyg1V/uhxk0WyPddL8awBSeyTJf9HnUn47Rts9TSnrHRsY3isBJZkqU3tpAR6jbpaG06uM rnHX2QqvrHi/50RLmzh7VSLcIIooxi9Xw2J5+Bn6rTDACmOBUbTUyCbyCM3FX762duKD2U 286Y6Vx4z03mM3wcyS5wreWH3uv/Sas+PskIrDv2OrchsGiu506SeMJVF1+hUGu9Brcq40 34nD8SXvBupMX7k09h7YNDwPmv/3kP5OOwumhZxKRKWfuai8g0Vf4ZGR+gzP8w== Date: Mon, 9 Sep 2024 23:03:29 +0200 From: Alexandre Belloni To: Frank Li Cc: Carlos Song , miquel.raynal@bootlin.com, conor.culhane@silvaco.com, linux-i3c@lists.infradead.org, linux-kernel@vger.kernel.org, imx@lists.linux.dev Subject: Re: [PATCH V4 1/2] i3c: master: support to adjust first broadcast address speed Message-ID: <202409092103290fd1d226@mail.local> References: <20240905074557.3810026-1-carlos.song@nxp.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-GND-Sasl: alexandre.belloni@bootlin.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240909_140335_432295_D24BBFDE X-CRM114-Status: GOOD ( 29.22 ) X-BeenThere: linux-i3c@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-i3c" Errors-To: linux-i3c-bounces+linux-i3c=archiver.kernel.org@lists.infradead.org On 09/09/2024 15:58:40-0400, Frank Li wrote: > On Thu, Sep 05, 2024 at 03:45:56PM +0800, Carlos Song wrote: > > According to I3C spec 6.2 Timing Specification, the Open Drain High Period > > of SCL Clock timing for first broadcast address should be adjusted to 200ns > > at least. I3C device working as i2c device will see the broadcast to close > > its Spike Filter then change to work at I3C mode. After that I3C open drain > > SCL high level should be adjusted back. > > > > Signed-off-by: Carlos Song > > Reviewed-by: Miquel Raynal > > Reviewed-by: Frank Li > > Alexandre Belloni: > > I have not seen these in patch work > https://patchwork.kernel.org/project/linux-i3c/list/ > > Any thing wrong. These two patches is critial for some boards. > Could you please take care it? They didn't make it to the list, please subscribe and resend. Also, it is very very difficult to keep track of all the patches you sent s I'm not sure what actually needs to be applied and what has been dropped r superseded. > > best regards > Frank Li > > > --- > > Change for V4: > > - No change. Send this patch with svc-i3c-master.c fix patch. > > Change for V3: > > - Modify comments from Miquel's suggestion > > Chnage for V2: > > - Fix set_speed description from Frank's comment > > --- > > drivers/i3c/master.c | 12 ++++++++++++ > > include/linux/i3c/master.h | 16 ++++++++++++++++ > > 2 files changed, 28 insertions(+) > > > > diff --git a/drivers/i3c/master.c b/drivers/i3c/master.c > > index 7028f03c2c42..6f3eb710a75d 100644 > > --- a/drivers/i3c/master.c > > +++ b/drivers/i3c/master.c > > @@ -1868,6 +1868,12 @@ static int i3c_master_bus_init(struct i3c_master_controller *master) > > goto err_bus_cleanup; > > } > > > > + if (master->ops->set_speed) { > > + ret = master->ops->set_speed(master, I3C_OPEN_DRAIN_SLOW_SPEED); > > + if (ret) > > + goto err_bus_cleanup; > > + } > > + > > /* > > * Reset all dynamic address that may have been assigned before > > * (assigned by the bootloader for example). > > @@ -1876,6 +1882,12 @@ static int i3c_master_bus_init(struct i3c_master_controller *master) > > if (ret && ret != I3C_ERROR_M2) > > goto err_bus_cleanup; > > > > + if (master->ops->set_speed) { > > + master->ops->set_speed(master, I3C_OPEN_DRAIN_NORMAL_SPEED); > > + if (ret) > > + goto err_bus_cleanup; > > + } > > + > > /* Disable all slave events before starting DAA. */ > > ret = i3c_master_disec_locked(master, I3C_BROADCAST_ADDR, > > I3C_CCC_EVENT_SIR | I3C_CCC_EVENT_MR | > > diff --git a/include/linux/i3c/master.h b/include/linux/i3c/master.h > > index 074f632868d9..2a1ed05d5782 100644 > > --- a/include/linux/i3c/master.h > > +++ b/include/linux/i3c/master.h > > @@ -277,6 +277,20 @@ enum i3c_bus_mode { > > I3C_BUS_MODE_MIXED_SLOW, > > }; > > > > +/** > > + * enum i3c_open_drain_speed - I3C open-drain speed > > + * @I3C_OPEN_DRAIN_SLOW_SPEED: Slow open-drain speed for sending the first > > + * broadcast address. The first broadcast address at this speed > > + * will be visible to all devices on the I3C bus. I3C devices > > + * working in I2C mode will turn off their spike filter when > > + * switching into I3C mode. > > + * @I3C_OPEN_DRAIN_NORMAL_SPEED: Normal open-drain speed in I3C bus mode. > > + */ > > +enum i3c_open_drain_speed { > > + I3C_OPEN_DRAIN_SLOW_SPEED, > > + I3C_OPEN_DRAIN_NORMAL_SPEED, > > +}; > > + > > /** > > * enum i3c_addr_slot_status - I3C address slot status > > * @I3C_ADDR_SLOT_FREE: address is free > > @@ -436,6 +450,7 @@ struct i3c_bus { > > * NULL. > > * @enable_hotjoin: enable hot join event detect. > > * @disable_hotjoin: disable hot join event detect. > > + * @set_speed: adjust I3C open drain mode timing. > > */ > > struct i3c_master_controller_ops { > > int (*bus_init)(struct i3c_master_controller *master); > > @@ -464,6 +479,7 @@ struct i3c_master_controller_ops { > > struct i3c_ibi_slot *slot); > > int (*enable_hotjoin)(struct i3c_master_controller *master); > > int (*disable_hotjoin)(struct i3c_master_controller *master); > > + int (*set_speed)(struct i3c_master_controller *master, enum i3c_open_drain_speed speed); > > }; > > > > /** > > -- > > 2.34.1 > > -- Alexandre Belloni, co-owner and COO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com -- linux-i3c mailing list linux-i3c@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-i3c