Devicetree
 help / color / mirror / Atom feed
From: nina_kuo@novatek.com.tw
To: robh@kernel.org
Cc: andi.shyti@kernel.org, conor+dt@kernel.org,
	devicetree@vger.kernel.org, krzk+dt@kernel.org,
	linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org,
	shihpei_hsu@novatek.com.tw, toby_chui@novatek.com.tw,
	Ben Huang <Ben_Huang@novatek.com.tw>
Subject: Re: [PATCH v8 1/3] dt-bindings: i2c: Add Novatek NT72676 I2C controller
Date: Fri,  4 Sep 2026 13:40:25 +0800	[thread overview]
Message-ID: <20260904054024.35245-1-nina_kuo@novatek.com.tw> (raw)
In-Reply-To: <20260903160434.GA3629759-robh@kernel.org>

From: Ben Huang <Ben_Huang@novatek.com.tw>

Hi,

Thanks for the review.

On Friday, September 4, 2026 12:05 AM, Rob Herring <robh@kernel.org> wrote:
>> +description:
>> +  Novatek NT72676 SoC provides two I2C controller variants, generic I2C and
>> +  STBC I2C.
>
> blank line between paragraphs and you need a '>' modifier on 
> 'description'.

I will change the top-level description to use the folded block style and
add blank lines between paragraphs.

>> +  The generic I2C controllers are accessible only by the host CPU and driven
>> +  by a 96 MHz AHB clock.
>> +  On the other hand, the STBC I2C controllers can be controlled by either the
>> +  host CPU or STBC (Standby Controller, an 8051-based microcontroller) and
>> +  driven by a 12 MHz STBC clock. Authentication with STBC is required before
>> +  the host CPU can access the STBC I2C controller registers.
>
> Is the programming model of the I2C controller different? If not, the 
> compatible should be the same.

The register layout and transfer programming model are the same, but these
are separate physical IP blocks with different hardware integration. They
have different interrupt sources and input clocks, and the STBC instance
requires an authentication and ownership-switch sequence before its
registers can be accessed by the host CPU. These differences are fixed
properties of the two IP blocks, so separate compatible strings are used.

>> +  novatek,stbc-syscon:
>> +    $ref: /schemas/types.yaml#/definitions/phandle
>> +    description:
>> +      Phandle to the STBC system controller registers used to authenticate
>> +      host access and switch ownership of the STBC I2C controller.
>
> Sounds like this could be modelled as a hwlock? That's other platforms 
> mediate access to shared h/w. We really only want to have these syscon 
> phandles as a last resort.

The ownership mechanism is a one-time switch rather than a hardware lock.
The presence of the STBC I2C node in the Device Tree means that the
controller is assigned to the host CPU. The driver authenticates and switches
ownership during initialization, after which the controller remains under
host CPU control. The STBC does not access the controller concurrently, and
there is no runtime acquire/release or lock arbitration. Therefore, the
generic hwlock binding does not match this hardware mechanism.
 
I will update the binding description to make these hardware characteristics
explicit.

Sincerely,
Ben Huang

  reply	other threads:[~2026-09-04  5:44 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-02  9:13 [PATCH v8 0/3] i2c: Add Novatek NT72676 SoC I2C controller nina_kuo
2026-09-02  9:13 ` [PATCH v8 1/3] dt-bindings: i2c: Add Novatek NT72676 " nina_kuo
2026-09-03 16:04   ` Rob Herring
2026-09-04  5:40     ` nina_kuo [this message]
2026-09-02  9:13 ` [PATCH v8 2/3] i2c: nt72676: Add Novatek NT72676 I2C controller driver nina_kuo
2026-09-02  9:29   ` sashiko-bot
2026-09-02  9:13 ` [PATCH v8 3/3] MAINTAINERS: Add entry for " nina_kuo

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=20260904054024.35245-1-nina_kuo@novatek.com.tw \
    --to=nina_kuo@novatek.com.tw \
    --cc=Ben_Huang@novatek.com.tw \
    --cc=andi.shyti@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=shihpei_hsu@novatek.com.tw \
    --cc=toby_chui@novatek.com.tw \
    /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