mirror of https://lore.kernel.org/linux-amlogic/
 help / color / mirror / Atom feed
From: Xianwei Zhao <xianwei.zhao@amlogic.com>
To: Krzysztof Kozlowski <krzk@kernel.org>
Cc: Mark Brown <broonie@kernel.org>, Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Liang Yang <liang.yang@amlogic.com>,
	Feng Chen <feng.chen@amlogic.com>,
	linux-spi@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-amlogic@lists.infradead.org
Subject: Re: [PATCH 1/3] spi: dt-bindings: add doc for Amlogic A113L2 SFC
Date: Thu, 14 Aug 2025 14:38:54 +0800	[thread overview]
Message-ID: <cf825229-7294-4fc5-b7dd-09dc1198db74@amlogic.com> (raw)
In-Reply-To: <017a4d15-286d-4e0a-89ff-f658009a6de6@kernel.org>

Hi Krzysztof,
    Thanks for your reply.

On 2025/8/14 00:19, Krzysztof Kozlowski wrote:
> [ EXTERNAL EMAIL ]
> 
> On 13/08/2025 11:34, Xianwei Zhao wrote:
>> Hi Krzysztof,
>>      Thanks  for your reply.
>>
>> On 2025/8/13 15:36, Krzysztof Kozlowski wrote:
>>> [ EXTERNAL EMAIL ]
>>>
>>> On 13/08/2025 08:13, Xianwei Zhao wrote:
>>>>>> +allOf:
>>>>>> +  - $ref: /schemas/spi/spi-controller.yaml#
>>>>>> +
>>>>>> +properties:
>>>>>> +  compatible:
>>>>>> +    const: amlogic,a4-spifc
>>>>>> +
>>>>>> +  reg:
>>>>>> +    items:
>>>>>> +      - description: core registers
>>>>>> +      - description: parent clk control registers
>>>>>
>>>>> Why are you poking to parent node or to clock registers? This looks like
>>>>> mixing up device address spaces.
>>>>>
>>>>
>>>> The SPIFC bus clock multiplexes EMMC modules, so the corresponding
>>>> frequency division register is also in EMMC module. The SPIFC and the
>>>> EMMC modules cannot be used simultaneously.
>>>
>>> Then obviously you cannot put here EMMC or parent registers.
>>>
>>> It looks really like you miss proper hardware representation.
>>>
>>
>> It does seem a bit unusual. However, in our hardware design, EMMC and
>> SFC modules are integrated, and they share common resources such as the
>> clock and I/O pins .They are mutually exclusive.
>>
> 
> How did you express it in DT? This looks similar to serial engines and
> such are not implemented independently.
> 

The hardware design provides this clock for both modules — EMMC and 
SPIFC. A control bit (bit 31: Cfg_NAND, where 0 = Port C only, 1 = NAND) 
is used to determine which module uses the clock.

It's not that NAND is using EMMC’s resources; rather, the configuration 
register controlling this selection is located within the EMMC module, 
which makes the setup appear somewhat unusual.

In the device tree (DT), I'll just refer directly to the clock frequency 
division control register.

If I don't describe it here, then when SPIFC needs to operate, EMMC will 
  be disabled. In that case, I won’t be able to access the corresponding 
clock division setting, which means SPIFC won't be able to function either.

>> Here, I'll modify the register description. Do you think it's feasible
> 
> No, because it changes nothing... Clock provider pokes clock divider
> registers. Not clock consumer.
> 
> Best regards,
> Krzysztof

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

  reply	other threads:[~2025-08-14  6:43 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-08  2:00 [PATCH 0/3] support for Amlogic SPI Flash Controller IP Xianwei Zhao via B4 Relay
2025-08-08  2:00 ` [PATCH 1/3] spi: dt-bindings: add doc for Amlogic A113L2 SFC Xianwei Zhao via B4 Relay
2025-08-08  8:03   ` Krzysztof Kozlowski
2025-08-13  6:13     ` Xianwei Zhao
2025-08-13  7:36       ` Krzysztof Kozlowski
2025-08-13  9:34         ` Xianwei Zhao
2025-08-13 16:19           ` Krzysztof Kozlowski
2025-08-14  6:38             ` Xianwei Zhao [this message]
2025-08-17  7:20               ` Krzysztof Kozlowski
2025-08-19  5:32                 ` Xianwei Zhao
2025-08-08  2:00 ` [PATCH 2/3] spi: amlogic: add driver for Amlogic SPI Flash Controller Xianwei Zhao via B4 Relay
2025-08-08  2:00 ` [PATCH 3/3] MAINTAINERS: Add an entry for Amlogic spifc driver Xianwei Zhao via B4 Relay

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=cf825229-7294-4fc5-b7dd-09dc1198db74@amlogic.com \
    --to=xianwei.zhao@amlogic.com \
    --cc=broonie@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=feng.chen@amlogic.com \
    --cc=krzk+dt@kernel.org \
    --cc=krzk@kernel.org \
    --cc=liang.yang@amlogic.com \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=robh@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

all inboxes | Powered by JetHome®