From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Dinh Nguyen <dinguyen@kernel.org>, Ulf Hansson <ulf.hansson@linaro.org>
Cc: jh80.chung@samsung.com, robh+dt@kernel.org,
krzysztof.kozlowski+dt@linaro.org, linux-mmc@vger.kernel.org,
linux-kernel@vger.kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCHv4 1/3] dt-bindings: mmc: synopsys-dw-mshc: document "altr,sysmgr-syscon"
Date: Sat, 1 Oct 2022 12:06:11 +0200 [thread overview]
Message-ID: <a12831f1-c9ab-357f-f7c9-f04310fbfe72@linaro.org> (raw)
In-Reply-To: <76b5195a-a11c-0c75-b3dd-36aa78c58397@kernel.org>
On 29/09/2022 17:18, Dinh Nguyen wrote:
>
>
> On 9/29/22 09:38, Krzysztof Kozlowski wrote:
>> On 29/09/2022 16:20, Dinh Nguyen wrote:
>>>>
>>>> So this change will not be backwards compatible with existing DTBs. I
>>>> noticed that patch2 updates the DTS files for the arm64 platforms, but
>>>> there seems to be some arm32 platforms too. Isn't this going to be a
>>>> problem?
>>>>
>>>
>>> The arm32 platforms makes the clk-phase adjustment through the clock
>>> driver. There was a discussion when I originally submitted the support
>>> for the arm32 platforms, and we landed on going through the clock driver
>>> instead of using the MMC driver. The updates to the arm32 platforms can
>>> be done after this patch series.
>>
>> How the update "can be done after"? Didn't you break all boards in- and
>> out-of-tree?
>>
>
> I don't think so! At least, I don't see how, for the arm32 boards, here
> are the dts entry for setting the clock-phase:
>
> sdmmc_clk: sdmmc_clk {
> #clock-cells = <0>;
> compatible = "altr,socfpga-gate-clk";
> clocks = <&f2s_periph_ref_clk>, <&main_nand_sdmmc_clk>,<&per_nand_mmc_clk>;
> clk-gate = <0xa0 8>;
> clk-phase = <0 135>; <-----
It's different node...
> };
>
> sdmmc_clk_divided: sdmmc_clk_divided {
> #clock-cells = <0>;
> compatible = "altr,socfpga-gate-clk";
> clocks = <&sdmmc_clk>;
> clk-gate = <0xa0 8>;
> fixed-divider = <4>;
> };
>
> ...
> mmc: dwmmc0@ff704000 {
> compatible = "altr,socfpga-dw-mshc";
> reg = <0xff704000 0x1000>;
> interrupts = <0 139 4>;
> fifo-depth = <0x400>;
> #address-cells = <1>;
> #size-cells = <0>;
> clocks = <&l4_mp_clk>, <&sdmmc_clk_divided>;
> clock-names = "biu", "ciu";
> resets = <&rst SDMMC_RESET>;
> status = "disabled";
And this one does not have clk-phase-sd-hs
> };
>
>
> So the setting for the clk-phase is done in the clock driver,
> (drivers/clk/socfpga/clk-gate.c). This has been done many years now,
> before the clk-phase-hs-sd concept was added to the sdmmc driver.
Yes and the driver now requires clk-phase-sd-hs or altr,sysmgr-syscon
which is not present in DTS.
>
> When I originally submitted the patches for the ARM64 clock driver
> support, I forgot to add the clk-phase support for the SD controller.
> Now that I realized we needed it, the concept to set the clk-phase is in
> the SD driver, thus I'm just adding the support for arm64.
>
> The arm32 support does not change in any way, so I don't see how it will
> break it.
Isn't your driver returning ERRNO for all existing DTS (so without patch
#2) and for all out of tree DTS?
>
> I can update the arm32 support with the same function in patch3 after
> this series. Because updating the arm32 will require me to remove the
> support in the clock driver, thus, I want to break it out.
Best regards,
Krzysztof
prev parent reply other threads:[~2022-10-01 10:06 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-28 16:54 [PATCHv4 1/3] dt-bindings: mmc: synopsys-dw-mshc: document "altr,sysmgr-syscon" Dinh Nguyen
2022-09-28 16:54 ` [PATCHv4 2/3] arm64: dts: socfpga: Add clk-phase-sd-hs property to the sdmmc node Dinh Nguyen
2022-09-28 16:54 ` [PATCHv4 3/3] mmc: dw_mmc-pltfm: socfpga: add method to configure clk-phase Dinh Nguyen
2022-09-29 11:20 ` Ulf Hansson
2022-09-28 17:15 ` [PATCHv4 1/3] dt-bindings: mmc: synopsys-dw-mshc: document "altr,sysmgr-syscon" Krzysztof Kozlowski
2022-09-28 18:37 ` Dinh Nguyen
2022-09-29 6:49 ` Krzysztof Kozlowski
2022-09-28 22:37 ` Rob Herring
2022-09-29 9:24 ` Ulf Hansson
2022-09-29 9:38 ` Krzysztof Kozlowski
2022-09-29 11:04 ` Ulf Hansson
2022-09-29 11:13 ` Krzysztof Kozlowski
2022-09-29 14:20 ` Dinh Nguyen
2022-09-29 14:38 ` Krzysztof Kozlowski
2022-09-29 15:18 ` Dinh Nguyen
2022-10-01 10:06 ` Krzysztof Kozlowski [this message]
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=a12831f1-c9ab-357f-f7c9-f04310fbfe72@linaro.org \
--to=krzysztof.kozlowski@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=dinguyen@kernel.org \
--cc=jh80.chung@samsung.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=robh+dt@kernel.org \
--cc=ulf.hansson@linaro.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).