diff mbox series

[07/14] riscv: dts: canaan: fix the k210's memory node

Message ID 20220618123035.563070-8-mail@conchuod.ie (mailing list archive)
State New, archived
Headers show
Series Canaan devicetree fixes | expand

Commit Message

Conor Dooley June 18, 2022, 12:30 p.m. UTC
From: Conor Dooley <conor.dooley@microchip.com>

The k210 memory node has a compatible string that does not match with
any driver or dt-binding & has several non standard properties.
Replace the reg names with a comment and delete the rest.

Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
---
---
 arch/riscv/boot/dts/canaan/k210.dtsi | 6 ------
 1 file changed, 6 deletions(-)

Comments

Conor Dooley June 21, 2022, 9:49 a.m. UTC | #1
On 20/06/2022 01:25, Damien Le Moal wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> 
> On 6/20/22 08:54, Conor.Dooley@microchip.com wrote:
>> On 20/06/2022 00:38, Damien Le Moal wrote:
>>> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
>>>
>>> On 6/18/22 21:30, Conor Dooley wrote:
>>>> From: Conor Dooley <conor.dooley@microchip.com>
>>>>
>>>> The k210 memory node has a compatible string that does not match with
>>>> any driver or dt-binding & has several non standard properties.
>>>> Replace the reg names with a comment and delete the rest.
>>>>
>>>> Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
>>>> ---
>>>> ---
>>>>   arch/riscv/boot/dts/canaan/k210.dtsi | 6 ------
>>>>   1 file changed, 6 deletions(-)
>>>>
>>>> diff --git a/arch/riscv/boot/dts/canaan/k210.dtsi b/arch/riscv/boot/dts/canaan/k210.dtsi
>>>> index 44d338514761..287ea6eebe47 100644
>>>> --- a/arch/riscv/boot/dts/canaan/k210.dtsi
>>>> +++ b/arch/riscv/boot/dts/canaan/k210.dtsi
>>>> @@ -69,15 +69,9 @@ cpu1_intc: interrupt-controller {
>>>>
>>>>        sram: memory@80000000 {
>>>>                device_type = "memory";
>>>> -             compatible = "canaan,k210-sram";
>>>>                reg = <0x80000000 0x400000>,
>>>>                      <0x80400000 0x200000>,
>>>>                      <0x80600000 0x200000>;
>>>> -             reg-names = "sram0", "sram1", "aisram";
>>>> -             clocks = <&sysclk K210_CLK_SRAM0>,
>>>> -                      <&sysclk K210_CLK_SRAM1>,
>>>> -                      <&sysclk K210_CLK_AI>;
>>>> -             clock-names = "sram0", "sram1", "aisram";
>>>>        };
>>>
>>> These are used by u-boot to setup the memory clocks and initialize the
>>> aisram. Sure the kernel actually does not use this, but to be in sync with
>>> u-boot DT, I would prefer keeping this as is. Right now, u-boot *and* the
>>> kernel work fine with both u-boot internal DT and the kernel DT.
>>
>> Right, but unfortunately that desire alone doesn't do anything about
>> the dtbs_check complaints.
>>
>> I guess the alternative approach of actually documenting the compatible
>> would be more palatable?
> 
> Yes, I think so. That would allow keeping the fields without the DTB build
> warnings.

Hmm looks like that approach contradicts the dt-schema;
https://github.com/devicetree-org/dt-schema/blob/main/dtschema/schemas/memory.yaml

@Rob,Krzysztof what is one meant to do here?

Thanks,
Conor.
diff mbox series

Patch

diff --git a/arch/riscv/boot/dts/canaan/k210.dtsi b/arch/riscv/boot/dts/canaan/k210.dtsi
index 44d338514761..287ea6eebe47 100644
--- a/arch/riscv/boot/dts/canaan/k210.dtsi
+++ b/arch/riscv/boot/dts/canaan/k210.dtsi
@@ -69,15 +69,9 @@  cpu1_intc: interrupt-controller {
 
 	sram: memory@80000000 {
 		device_type = "memory";
-		compatible = "canaan,k210-sram";
 		reg = <0x80000000 0x400000>,
 		      <0x80400000 0x200000>,
 		      <0x80600000 0x200000>;
-		reg-names = "sram0", "sram1", "aisram";
-		clocks = <&sysclk K210_CLK_SRAM0>,
-			 <&sysclk K210_CLK_SRAM1>,
-			 <&sysclk K210_CLK_AI>;
-		clock-names = "sram0", "sram1", "aisram";
 	};
 
 	clocks {