2024-01-09 13:36:12

by Quentin Schulz

[permalink] [raw]
Subject: [PATCH 0/2] arm64: dts: rockchip: add SPI controller aliases to RK3399

There are 6 SPI controllers on RK3399 and they are all numbered in the

TRM, so let's add the appropriate aliases to the main DTSI so that any

RK3399-based board doesn't need to define the aliases themselves to

benefit from stable SPI indices in userspace.



Helios64 is the only RK3399-based device that defined aliases for SPI

controllers, but since they are now in RK3399 main DTSI, let's remove

the duplication.



Signed-off-by: Quentin Schulz <[email protected]>

---

Quentin Schulz (2):

arm64: dts: rockchip: add spi controller aliases on rk3399

arm64: dts: rockchip: remove duplicate SPI aliases for helios64



arch/arm64/boot/dts/rockchip/rk3399-kobol-helios64.dts | 3 ---

arch/arm64/boot/dts/rockchip/rk3399.dtsi | 6 ++++++

2 files changed, 6 insertions(+), 3 deletions(-)

---

base-commit: 9f8413c4a66f2fb776d3dc3c9ed20bf435eb305e

change-id: 20240109-rk3399-spi-aliases-a2ce468a04a3



Best regards,

--

Quentin Schulz <[email protected]>





2024-01-09 13:36:19

by Quentin Schulz

[permalink] [raw]
Subject: [PATCH 2/2] arm64: dts: rockchip: remove duplicate SPI aliases for helios64

From: Quentin Schulz <[email protected]>



An earlier commit defined an alias for all SPI controllers found on the

RK3399, so there's no need to duplicate the aliases in helios64's device

tree.



Cc: Quentin Schulz <[email protected]>

Signed-off-by: Quentin Schulz <[email protected]>

---

arch/arm64/boot/dts/rockchip/rk3399-kobol-helios64.dts | 3 ---

1 file changed, 3 deletions(-)



diff --git a/arch/arm64/boot/dts/rockchip/rk3399-kobol-helios64.dts b/arch/arm64/boot/dts/rockchip/rk3399-kobol-helios64.dts

index 1eb287a3f8c03..d664ac18a941e 100644

--- a/arch/arm64/boot/dts/rockchip/rk3399-kobol-helios64.dts

+++ b/arch/arm64/boot/dts/rockchip/rk3399-kobol-helios64.dts

@@ -21,9 +21,6 @@ / {

aliases {

mmc0 = &sdmmc;

mmc1 = &sdhci;

- spi1 = &spi1;

- spi2 = &spi2;

- spi5 = &spi5;

};



avdd_0v9_s0: avdd-0v9-s0 {



--

2.43.0




2024-01-09 15:16:28

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH 2/2] arm64: dts: rockchip: remove duplicate SPI aliases for helios64

On 09/01/2024 14:35, Quentin Schulz wrote:
> From: Quentin Schulz <[email protected]>
>
> An earlier commit defined an alias for all SPI controllers found on the
> RK3399, so there's no need to duplicate the aliases in helios64's device
> tree.

That's not what we want. Boards should define aliases for what is
available, according to the board labeling.

Best regards,
Krzysztof


2024-01-09 15:23:56

by Heiko Stuebner

[permalink] [raw]
Subject: Re: [PATCH 2/2] arm64: dts: rockchip: remove duplicate SPI aliases for helios64

Am Dienstag, 9. Januar 2024, 16:16:15 CET schrieb Krzysztof Kozlowski:
> On 09/01/2024 14:35, Quentin Schulz wrote:
> > From: Quentin Schulz <[email protected]>
> >
> > An earlier commit defined an alias for all SPI controllers found on the
> > RK3399, so there's no need to duplicate the aliases in helios64's device
> > tree.
>
> That's not what we want. Boards should define aliases for what is
> available, according to the board labeling.

and the board labeling for spi2 has always been spi2-miso, spi2-miso etc.
In the last 10 years of doing Rockchip stuff, I haven't seen any schematic
doing it differently.



2024-01-09 19:15:41

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH 2/2] arm64: dts: rockchip: remove duplicate SPI aliases for helios64

On 09/01/2024 16:23, Heiko Stübner wrote:
> Am Dienstag, 9. Januar 2024, 16:16:15 CET schrieb Krzysztof Kozlowski:
>> On 09/01/2024 14:35, Quentin Schulz wrote:
>>> From: Quentin Schulz <[email protected]>
>>>
>>> An earlier commit defined an alias for all SPI controllers found on the
>>> RK3399, so there's no need to duplicate the aliases in helios64's device
>>> tree.
>>
>> That's not what we want. Boards should define aliases for what is
>> available, according to the board labeling.
>
> and the board labeling for spi2 has always been spi2-miso, spi2-miso etc.
> In the last 10 years of doing Rockchip stuff, I haven't seen any schematic
> doing it differently.

OK, this could be a case... but then you add aliases for things which
are not labeled on the board.

Let's bring Arnd again:
https://lore.kernel.org/linux-rockchip/CAK8P3a0ALgbhTVJ7t3XRXALs9vBM=XBvkGhNKXxB+QTepo-3AQ@mail.gmail.com/

Best regards,
Krzysztof


2024-01-10 11:20:51

by Heiko Stuebner

[permalink] [raw]
Subject: Re: [PATCH 2/2] arm64: dts: rockchip: remove duplicate SPI aliases for helios64

Hi Krzysztof,

[I'll limit myself to this thread, as we're essentially discussing the same in both]

Am Dienstag, 9. Januar 2024, 20:14:38 CET schrieb Krzysztof Kozlowski:
> On 09/01/2024 16:23, Heiko St?bner wrote:
> > Am Dienstag, 9. Januar 2024, 16:16:15 CET schrieb Krzysztof Kozlowski:
> >> On 09/01/2024 14:35, Quentin Schulz wrote:
> >>> From: Quentin Schulz <[email protected]>
> >>>
> >>> An earlier commit defined an alias for all SPI controllers found on the
> >>> RK3399, so there's no need to duplicate the aliases in helios64's device
> >>> tree.
> >>
> >> That's not what we want. Boards should define aliases for what is
> >> available, according to the board labeling.
> >
> > and the board labeling for spi2 has always been spi2-miso, spi2-miso etc.
> > In the last 10 years of doing Rockchip stuff, I haven't seen any schematic
> > doing it differently.
>
> OK, this could be a case... but then you add aliases for things which
> are not labeled on the board.

On the other hand, we did this dance last year for some other SoCs.
And having to repeat the same list of never-changing aliases for every
board was a sore spot for a lot of people it seemed.
Most boards follow the reference schematics quite closely afterall.

Like very shortly after the last discussion I got patches moving the
aliases to their then agreed upon position. (numeric busses in the
soc dtsi, everything else in board dts).

And back in november we ended with [0] - Krzysztof saying that
"it is just generic guideline, so up to Heiko what to do with it" ;-) .


I also made sure to send the changes upwards way before christmas
to give soc maintainers time to complain if needed and especially did
point out that change in my pull request text [1] ;-) .


Heiko

> Let's bring Arnd again:
> https://lore.kernel.org/linux-rockchip/CAK8P3a0ALgbhTVJ7t3XRXALs9vBM=XBvkGhNKXxB+QTepo-3AQ@mail.gmail.com/


[0] https://lore.kernel.org/linux-rockchip/[email protected]/
[1] https://patchwork.kernel.org/project/linux-soc/patch/3535836.iIbC2pHGDl@phil/