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: Wed, 13 Aug 2025 14:13:22 +0800	[thread overview]
Message-ID: <7fab19de-8ed1-4fe5-b2a4-a7e9c13d8424@amlogic.com> (raw)
In-Reply-To: <20250808-adamant-fat-raven-38c8b3@kuoka>

Hi Krzysztof,
    Thanks for your reply.

On 2025/8/8 16:03, Krzysztof Kozlowski wrote:
> [ EXTERNAL EMAIL ]
> 
> On Fri, Aug 08, 2025 at 10:00:34AM +0800, Xianwei Zhao wrote:
>> From: Feng Chen <feng.chen@amlogic.com>
>>
>> The Flash Controller is derived by adding an SPI path to the original
>> raw NAND controller. This controller supports two modes: raw mode and
>> SPI mode. The raw mode has already been implemented in the community,
>> and the SPI mode is described here.
>>
> 
> Subject: drop doc, so just "Add Amlogic foo ..."
> 

Will do.

>> Add bindings for Amlogic A113L2 SPI Flash Controller.
>>
>> Signed-off-by: Feng Chen <feng.chen@amlogic.com>
>> Signed-off-by: Xianwei Zhao <xianwei.zhao@amlogic.com>
>> ---
>>   .../devicetree/bindings/spi/amlogic,a4-spifc.yaml  | 104 +++++++++++++++++++++
>>   1 file changed, 104 insertions(+)
>>
>> diff --git a/Documentation/devicetree/bindings/spi/amlogic,a4-spifc.yaml b/Documentation/devicetree/bindings/spi/amlogic,a4-spifc.yaml
>> new file mode 100644
>> index 000000000000..712a17a4b117
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/spi/amlogic,a4-spifc.yaml
>> @@ -0,0 +1,104 @@
>> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
>> +# Copyright (C) 2025 Amlogic, Inc. All rights reserved
>> +%YAML 1.2
>> +---
>> +$id: http://devicetree.org/schemas/spi/amlogic,a4-spifc.yaml#
>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>> +
>> +title: SPI flash controller for Amlogic ARM SoCs
>> +
>> +maintainers:
>> +  - Liang Yang <liang.yang@amlogic.com>
>> +  - Feng Chen <feng.chen@amlogic.com>
>> +  - Xianwei Zhao <xianwei.zhao@amlogic.com>
>> +
>> +description:
>> +  The Amlogic SPI flash controller is an extended version
>> +  of the Amlogic NAND flash controller. It supports SPI Nor
>> +  Flash and SPI NAND Flash(where the Host ECC HW engine could
>> +  be enabled).
> 
> Wrap at coding style, 80.
> 

Will do.

>> +
>> +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.

>> +
>> +  reg-names:
>> +    items:
>> +      - const: core
>> +      - const: pclk
>> +
>> +  clocks:
>> +    items:
>> +      - description: clock gate
> 
> Are you sure this is separate clock input to this device?
> 

This clock is used by the APB interface to access the SPIFC registers.

>> +      - description: clock used for the controller
>> +      - description: clock used for the SPI bus
>> +
>> +  clock-names:
>> +    items:
>> +      - const: gate
>> +      - const: core
>> +      - const: device
>> +
>> +  interrupts:
>> +    maxItems: 1
>> +
>> +  amlogic,sfc-enable-random:
>> +    description: Enable data scrambling
> 
> Why would this be a property of the board?
> 
Will get rid of it.
>> +    type: boolean
>> +
>> +  amlogic,sfc-no-hwecc:
>> +    description: Disable ECC HW engine
> 
> Same question, why not having ECC always?
> 

Will get rid of it.

>> +    type: boolean
>> +
>> +  amlogic,rx-adj:
>> +    description:
>> +      Adjust sample timing for RX, Sampling time
>> +      move later by 1 bus clock.
>> +    $ref: /schemas/types.yaml#/definitions/uint32
>> +    enum: [0, 1, 2, 3]
>> +    default: 0
>> +
>> +required:
>> +  - compatible
>> +  - reg
>> +  - reg-names
>> +  - clocks
>> +  - clock-names
>> +
>> +unevaluatedProperties: false
>> +
>> +examples:
>> +  - |
>> +    sfc0: spi@fe08d000 {
>> +      compatible = "amlogic,a4-spifc";
>> +      reg = <0xfe08d000 0x800>, <0xfe08c000 0x4>;
> 
> One register for the parent clock? This really does not look like part
> of this device.
> 

EMMC bus clock modules were reused.

> 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-13  6:35 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 [this message]
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
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=7fab19de-8ed1-4fe5-b2a4-a7e9c13d8424@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®