From: "Jiawen Wu" <jiawenwu@trustnetic.com>
To: "'Wolfram Sang'" <wsa@kernel.org>,
"'Jarkko Nikula'" <jarkko.nikula@linux.intel.com>
Cc: <netdev@vger.kernel.org>, <linux@armlinux.org.uk>,
<linux-i2c@vger.kernel.org>, <linux-gpio@vger.kernel.org>,
<mengyuanlou@net-swift.com>
Subject: RE: [PATCH net-next v2 2/6] net: txgbe: Implement I2C bus master driver
Date: Mon, 17 Apr 2023 11:17:07 +0800 [thread overview]
Message-ID: <024701d970db$17335890$459a09b0$@trustnetic.com> (raw)
In-Reply-To: <01ec01d96ec0$f2e10670$d8a31350$@trustnetic.com>
On Friday, April 14, 2023 7:05 PM, Jiawen Wu wrote:
> On Friday, April 14, 2023 12:29 AM, Wolfram Sang wrote:
> > > > > Implement I2C bus driver to send and receive I2C messages.
> > > > >
> > > > > This I2C license the IP of Synopsys Designware, but without interrupt
> > > > > support on the hardware design. It seems that polling mode needs to be
> > > > > added in Synopsys Designware I2C driver. But currently it can only be
> > > > > driven by this I2C bus master driver.
> > > > >
> > > > > Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
> > > > > ---
> > > > > drivers/net/ethernet/wangxun/Kconfig | 1 +
> > > > > .../net/ethernet/wangxun/txgbe/txgbe_phy.c | 153
> > > > > ++++++++++++++++++
> > > > > .../net/ethernet/wangxun/txgbe/txgbe_type.h | 23 +++
> > > > > 3 files changed, 177 insertions(+)
> > > > >
> > > Looks like your use case has similarities with the commit 17631e8ca2d3
> > > ("i2c: designware: Add driver support for AMD NAVI GPU").
> >
> > Yes, can you please check if you can't use the current i2c designware
> > driver?
>
> Hi Jarkko & Wolfram,
>
> I read the i2c designware driver code, and found that 'dev->ss_hcnt' can
> only be obtained by i2c_dw_acpi_configure() or calculated by clock rate.
>
> I don't quite understand how to get the clock rate. I tried to add a software
> node of clock with property ("clock-frequency", 100000) and referenced by
> I2C node. But it didn't work.
>
> Can I deliver 'dev->ss_hcnt' via platform data? Or how should I fill in the
> software node?
>
The above question is in the case of platform driver.
Moreover, why 'dev->fs_hcnt' and 'dev->fs_lcont' must be set when I use the
standard mode? Should it be set only if I2C_MAX_FAST_MODE_* ?
next prev parent reply other threads:[~2023-04-17 3:17 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-11 9:27 [PATCH net-next v2 0/6] TXGBE PHYLINK support Jiawen Wu
2023-04-11 9:27 ` [PATCH net-next v2 1/6] net: txgbe: Add software nodes to support phylink Jiawen Wu
2023-04-11 12:51 ` Andrew Lunn
2023-04-11 9:27 ` [PATCH net-next v2 2/6] net: txgbe: Implement I2C bus master driver Jiawen Wu
2023-04-11 9:32 ` Jiawen Wu
2023-04-11 10:08 ` Jarkko Nikula
2023-04-13 16:28 ` Wolfram Sang
2023-04-14 11:04 ` Jiawen Wu
2023-04-15 15:11 ` Andrew Lunn
2023-04-17 1:46 ` Jiawen Wu
2023-04-17 3:17 ` Jiawen Wu [this message]
2023-04-11 9:27 ` [PATCH net-next v2 3/6] net: txgbe: Add SFP module identify Jiawen Wu
2023-04-11 12:52 ` Andrew Lunn
2023-04-11 9:27 ` [PATCH net-next v2 4/6] net: txgbe: Support GPIO to SFP socket Jiawen Wu
2023-04-11 9:27 ` [PATCH net-next v2 5/6] net: txgbe: Implement phylink pcs Jiawen Wu
2023-04-11 10:36 ` Russell King (Oracle)
2023-04-11 11:03 ` Simon Horman
2023-04-17 14:47 ` kernel test robot
2023-04-11 9:27 ` [PATCH net-next v2 6/6] net: txgbe: Support phylink MAC layer Jiawen Wu
2023-04-11 10:44 ` Russell King (Oracle)
2023-04-11 12:43 ` Andrew Lunn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='024701d970db$17335890$459a09b0$@trustnetic.com' \
--to=jiawenwu@trustnetic.com \
--cc=jarkko.nikula@linux.intel.com \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=mengyuanlou@net-swift.com \
--cc=netdev@vger.kernel.org \
--cc=wsa@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).