From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Chris Packham <Chris.Packham@alliedtelesis.co.nz>,
"robh+dt@kernel.org" <robh+dt@kernel.org>,
"krzysztof.kozlowski+dt@linaro.org"
<krzysztof.kozlowski+dt@linaro.org>,
"catalin.marinas@arm.com" <catalin.marinas@arm.com>,
"will@kernel.org" <will@kernel.org>,
"andrew@lunn.ch" <andrew@lunn.ch>,
"gregory.clement@bootlin.com" <gregory.clement@bootlin.com>,
"sebastian.hesselbarth@gmail.com"
<sebastian.hesselbarth@gmail.com>,
"kostap@marvell.com" <kostap@marvell.com>,
"robert.marko@sartura.hr" <robert.marko@sartura.hr>,
Vadym Kochan <vadym.kochan@plvision.eu>
Cc: "devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v6 2/3] arm64: dts: marvell: Add Armada 98DX2530 SoC and RD-AC5X board
Date: Thu, 12 May 2022 16:45:24 +0200 [thread overview]
Message-ID: <5ec00142-dc46-06e6-c991-c33394db614c@linaro.org> (raw)
In-Reply-To: <48c5ce46-906b-3aaa-afcc-8d0eafbd098c@alliedtelesis.co.nz>
On 12/05/2022 01:49, Chris Packham wrote:
>
>>> + spi_clock: spi-clock {
>>> + compatible = "fixed-clock";
>>> + #clock-cells = <0>;
>>> + clock-frequency = <200000000>;
>>> + };
>> My questions about these clocks are still unanswered. Why do you define
>> fixed-clocks. Aren't these part of clock controller?
>
> Not one that I have any information on. Marvell don't put it in their
> customer facing documentation so I can only speculate. The 25MHz
> oscillator goes into the chip, from there I guess that it is fed in some
> fashion to both the CPU block (CnM in Marvell speak) and to the switch
> block. Where exactly it gets divided into these individual peripheral
> clocks I don't really know.
Hm, so it seems you do not have a proper clock-controller (or cannot
create one). OK then, but these are silly stubs, you know. :)
>
>>> + };
>>> +};
>>> diff --git a/arch/arm64/boot/dts/marvell/rd-ac5x.dts b/arch/arm64/boot/dts/marvell/rd-ac5x.dts
>>> new file mode 100644
>>> index 000000000000..7ac87413e023
>>> --- /dev/null
>>> +++ b/arch/arm64/boot/dts/marvell/rd-ac5x.dts
>>> @@ -0,0 +1,90 @@
>>> +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
>>> +/*
>>> + * Device Tree For AC5X.
>>> + *
>>> + * Copyright (C) 2021 Marvell
>>> + *
>>> + */
>>> +/*
>>> + * Device Tree file for Marvell Alleycat 5X development board
>>> + * This board file supports the B configuration of the board
>>> + */
>>> +
>>> +/dts-v1/;
>>> +
>>> +#include "armada-98dx2530.dtsi"
>>> +
>>> +/ {
>>> + model = "Marvell RD-AC5X Board";
>>> + compatible = "marvell,ac5x", "marvell,ac5";
>> From the bindings I understood ac5x is a SoC, not board. If ac5x is a
>> board, not a SoC, then compatible should be rather "marvell,rd-ac5x".
>
> So If I understand the convention the full compatible would be:
>
> compatible = "marvell,rd-ac5x", "marvell,ac5x", "marvell,ac5";
Yes, this looks correct.
>
>>
>>> +
>>> + memory@0 {
>>> + device_type = "memory";
>>> + reg = <0x2 0x00000000 0x0 0x40000000>;
>>> + };
>>> +};
>>> +
>>> +&mdio {
>>> + phy0: ethernet-phy@0 {
>>> + reg = <0>;
>>> + };
>>> +};
>>> +
>>> +&i2c0 {
>>> + status = "okay";
>>> +};
>>> +
>>> +&i2c1 {
>>> + status = "okay";
>>> +};
>>> +
>>> +ð0 {
>>> + status = "okay";
>>> + phy-handle = <&phy0>;
>>> +};
>>> +
>>> +&usb0 {
>>> + status = "okay";
>>> +};
>>> +
>>> +&usb1 {
>>> + status = "okay";
>>> +};
>>> +
>>> +&spi0 {
>>> + status = "okay";
>>> +
>>> + spiflash0: flash@0 {
>>> + compatible = "jedec,spi-nor";
>>> + spi-max-frequency = <50000000>;
>>> + spi-tx-bus-width = <1>; /* 1-single, 2-dual, 4-quad */
>>> + spi-rx-bus-width = <1>; /* 1-single, 2-dual, 4-quad */
>>> + reg = <0>;
>>> +
>>> + #address-cells = <1>;
>>> + #size-cells = <1>;
>>> +
>>> + partition@0 {
>>> + label = "spi_flash_part0";
>>> + reg = <0x0 0x800000>;
>>> + };
>>> +
>>> + parition@1 {
>>> + label = "spi_flash_part1";
>>> + reg = <0x800000 0x700000>;
>>> + };
>>> +
>>> + parition@2 {
>>> + label = "spi_flash_part2";
>>> + reg = <0xF00000 0x100000>;
>>> + };
>>> + };
>>> +};
>>> +
>>> +&usb1 {
>>> + compatible = "chipidea,usb2";
>> Why compatible is defined per board?
>
> That came from the Marvell SDK. On some boards this is used as a
> device/OTG interface. But regardless it should have one in the SoC dtsi.
Yes, please.
> As for why they used the "chipidea,usb2" compatible I have no idea. I'll
> remove this and add the correct compatible to the SoC.
They could reuse some other block. Pretty often for such cases there is
a dedicated compatible and fallback, e.g.:
Documentation/devicetree/bindings/usb/rockchip,dwc3.yaml
Best regards,
Krzysztof
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
WARNING: multiple messages have this Message-ID (diff)
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Chris Packham <Chris.Packham@alliedtelesis.co.nz>,
"robh+dt@kernel.org" <robh+dt@kernel.org>,
"krzysztof.kozlowski+dt@linaro.org"
<krzysztof.kozlowski+dt@linaro.org>,
"catalin.marinas@arm.com" <catalin.marinas@arm.com>,
"will@kernel.org" <will@kernel.org>,
"andrew@lunn.ch" <andrew@lunn.ch>,
"gregory.clement@bootlin.com" <gregory.clement@bootlin.com>,
"sebastian.hesselbarth@gmail.com"
<sebastian.hesselbarth@gmail.com>,
"kostap@marvell.com" <kostap@marvell.com>,
"robert.marko@sartura.hr" <robert.marko@sartura.hr>,
Vadym Kochan <vadym.kochan@plvision.eu>
Cc: "devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v6 2/3] arm64: dts: marvell: Add Armada 98DX2530 SoC and RD-AC5X board
Date: Thu, 12 May 2022 16:45:24 +0200 [thread overview]
Message-ID: <5ec00142-dc46-06e6-c991-c33394db614c@linaro.org> (raw)
In-Reply-To: <48c5ce46-906b-3aaa-afcc-8d0eafbd098c@alliedtelesis.co.nz>
On 12/05/2022 01:49, Chris Packham wrote:
>
>>> + spi_clock: spi-clock {
>>> + compatible = "fixed-clock";
>>> + #clock-cells = <0>;
>>> + clock-frequency = <200000000>;
>>> + };
>> My questions about these clocks are still unanswered. Why do you define
>> fixed-clocks. Aren't these part of clock controller?
>
> Not one that I have any information on. Marvell don't put it in their
> customer facing documentation so I can only speculate. The 25MHz
> oscillator goes into the chip, from there I guess that it is fed in some
> fashion to both the CPU block (CnM in Marvell speak) and to the switch
> block. Where exactly it gets divided into these individual peripheral
> clocks I don't really know.
Hm, so it seems you do not have a proper clock-controller (or cannot
create one). OK then, but these are silly stubs, you know. :)
>
>>> + };
>>> +};
>>> diff --git a/arch/arm64/boot/dts/marvell/rd-ac5x.dts b/arch/arm64/boot/dts/marvell/rd-ac5x.dts
>>> new file mode 100644
>>> index 000000000000..7ac87413e023
>>> --- /dev/null
>>> +++ b/arch/arm64/boot/dts/marvell/rd-ac5x.dts
>>> @@ -0,0 +1,90 @@
>>> +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
>>> +/*
>>> + * Device Tree For AC5X.
>>> + *
>>> + * Copyright (C) 2021 Marvell
>>> + *
>>> + */
>>> +/*
>>> + * Device Tree file for Marvell Alleycat 5X development board
>>> + * This board file supports the B configuration of the board
>>> + */
>>> +
>>> +/dts-v1/;
>>> +
>>> +#include "armada-98dx2530.dtsi"
>>> +
>>> +/ {
>>> + model = "Marvell RD-AC5X Board";
>>> + compatible = "marvell,ac5x", "marvell,ac5";
>> From the bindings I understood ac5x is a SoC, not board. If ac5x is a
>> board, not a SoC, then compatible should be rather "marvell,rd-ac5x".
>
> So If I understand the convention the full compatible would be:
>
> compatible = "marvell,rd-ac5x", "marvell,ac5x", "marvell,ac5";
Yes, this looks correct.
>
>>
>>> +
>>> + memory@0 {
>>> + device_type = "memory";
>>> + reg = <0x2 0x00000000 0x0 0x40000000>;
>>> + };
>>> +};
>>> +
>>> +&mdio {
>>> + phy0: ethernet-phy@0 {
>>> + reg = <0>;
>>> + };
>>> +};
>>> +
>>> +&i2c0 {
>>> + status = "okay";
>>> +};
>>> +
>>> +&i2c1 {
>>> + status = "okay";
>>> +};
>>> +
>>> +ð0 {
>>> + status = "okay";
>>> + phy-handle = <&phy0>;
>>> +};
>>> +
>>> +&usb0 {
>>> + status = "okay";
>>> +};
>>> +
>>> +&usb1 {
>>> + status = "okay";
>>> +};
>>> +
>>> +&spi0 {
>>> + status = "okay";
>>> +
>>> + spiflash0: flash@0 {
>>> + compatible = "jedec,spi-nor";
>>> + spi-max-frequency = <50000000>;
>>> + spi-tx-bus-width = <1>; /* 1-single, 2-dual, 4-quad */
>>> + spi-rx-bus-width = <1>; /* 1-single, 2-dual, 4-quad */
>>> + reg = <0>;
>>> +
>>> + #address-cells = <1>;
>>> + #size-cells = <1>;
>>> +
>>> + partition@0 {
>>> + label = "spi_flash_part0";
>>> + reg = <0x0 0x800000>;
>>> + };
>>> +
>>> + parition@1 {
>>> + label = "spi_flash_part1";
>>> + reg = <0x800000 0x700000>;
>>> + };
>>> +
>>> + parition@2 {
>>> + label = "spi_flash_part2";
>>> + reg = <0xF00000 0x100000>;
>>> + };
>>> + };
>>> +};
>>> +
>>> +&usb1 {
>>> + compatible = "chipidea,usb2";
>> Why compatible is defined per board?
>
> That came from the Marvell SDK. On some boards this is used as a
> device/OTG interface. But regardless it should have one in the SoC dtsi.
Yes, please.
> As for why they used the "chipidea,usb2" compatible I have no idea. I'll
> remove this and add the correct compatible to the SoC.
They could reuse some other block. Pretty often for such cases there is
a dedicated compatible and fallback, e.g.:
Documentation/devicetree/bindings/usb/rockchip,dwc3.yaml
Best regards,
Krzysztof
next prev parent reply other threads:[~2022-05-12 14:46 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-10 23:09 [PATCH v6 0/3] arm64: mvebu: Support for Marvell 98DX2530 (and variants) Chris Packham
2022-05-10 23:09 ` Chris Packham
2022-05-10 23:10 ` [PATCH v6 1/3] dt-bindings: marvell: Document the AC5/AC5X compatibles Chris Packham
2022-05-10 23:10 ` Chris Packham
2022-05-11 16:34 ` Krzysztof Kozlowski
2022-05-11 16:34 ` Krzysztof Kozlowski
2022-05-12 1:20 ` Chris Packham
2022-05-12 1:20 ` Chris Packham
2022-05-12 1:51 ` Chris Packham
2022-05-12 1:51 ` Chris Packham
2022-05-12 14:45 ` Krzysztof Kozlowski
2022-05-12 14:45 ` Krzysztof Kozlowski
2022-05-12 10:10 ` Krzysztof Kozlowski
2022-05-12 10:10 ` Krzysztof Kozlowski
2022-05-11 17:02 ` Andrew Lunn
2022-05-11 17:02 ` Andrew Lunn
2022-05-11 23:14 ` Chris Packham
2022-05-11 23:14 ` Chris Packham
2022-05-12 0:27 ` Andrew Lunn
2022-05-12 0:27 ` Andrew Lunn
2022-05-12 0:38 ` Chris Packham
2022-05-12 0:38 ` Chris Packham
2022-05-12 0:45 ` Andrew Lunn
2022-05-12 0:45 ` Andrew Lunn
2022-05-12 0:54 ` Chris Packham
2022-05-12 0:54 ` Chris Packham
2022-05-10 23:10 ` [PATCH v6 2/3] arm64: dts: marvell: Add Armada 98DX2530 SoC and RD-AC5X board Chris Packham
2022-05-10 23:10 ` Chris Packham
2022-05-11 16:38 ` Krzysztof Kozlowski
2022-05-11 16:38 ` Krzysztof Kozlowski
2022-05-11 23:49 ` Chris Packham
2022-05-11 23:49 ` Chris Packham
2022-05-12 14:45 ` Krzysztof Kozlowski [this message]
2022-05-12 14:45 ` Krzysztof Kozlowski
2022-05-10 23:10 ` [PATCH v6 3/3] arm64: marvell: enable the 98DX2530 pinctrl driver Chris Packham
2022-05-10 23:10 ` Chris Packham
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=5ec00142-dc46-06e6-c991-c33394db614c@linaro.org \
--to=krzysztof.kozlowski@linaro.org \
--cc=Chris.Packham@alliedtelesis.co.nz \
--cc=andrew@lunn.ch \
--cc=catalin.marinas@arm.com \
--cc=devicetree@vger.kernel.org \
--cc=gregory.clement@bootlin.com \
--cc=kostap@marvell.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robert.marko@sartura.hr \
--cc=robh+dt@kernel.org \
--cc=sebastian.hesselbarth@gmail.com \
--cc=vadym.kochan@plvision.eu \
--cc=will@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.