diff mbox series

[3/3] riscv: dts: sophgo: add Sophgo SPI NOR controller driver

Message ID 20250224101213.26003-4-looong.bin@gmail.com (mailing list archive)
State Superseded
Headers show
Series spi: sophgo: add Sophgo SPI NOR controller driver | expand

Commit Message

Longbin Li Feb. 24, 2025, 10:12 a.m. UTC
Add SPI NOR device node for Sophgo.

Signed-off-by: Longbin Li <looong.bin@gmail.com>
---
 .../boot/dts/sophgo/sg2044-sophgo-sd3-10.dts  | 18 ++++++++++++++
 arch/riscv/boot/dts/sophgo/sg2044.dtsi        | 24 +++++++++++++++++++
 2 files changed, 42 insertions(+)

--
2.48.1

Comments

Chen Wang Feb. 25, 2025, 12:23 a.m. UTC | #1
On 2025/2/24 18:12, Longbin Li wrote:
> Add SPI NOR device node for Sophgo.
>
> Signed-off-by: Longbin Li <looong.bin@gmail.com>
> ---
>   .../boot/dts/sophgo/sg2044-sophgo-sd3-10.dts  | 18 ++++++++++++++
>   arch/riscv/boot/dts/sophgo/sg2044.dtsi        | 24 +++++++++++++++++++
>   2 files changed, 42 insertions(+)
>
> diff --git a/arch/riscv/boot/dts/sophgo/sg2044-sophgo-sd3-10.dts b/arch/riscv/boot/dts/sophgo/sg2044-sophgo-sd3-10.dts
> index c50e61a50013..9c634920f37e 100644
> --- a/arch/riscv/boot/dts/sophgo/sg2044-sophgo-sd3-10.dts
> +++ b/arch/riscv/boot/dts/sophgo/sg2044-sophgo-sd3-10.dts
> @@ -80,6 +80,24 @@ &sd {
>   	status = "okay";
>   };
>
> +&spifmc0 {
> +	status = "okay";
> +
> +	flash@0 {
> +		compatible = "jedec,spi-nor";
> +		reg = <0>;
> +	};
> +};
> +
> +&spifmc1 {
> +	status = "okay";
> +
> +	flash@0 {
> +		compatible = "jedec,spi-nor";
> +		reg = <0>;
> +	};
> +};
> +
>   &uart1 {
>   	status = "okay";
>   };

What is your baseline? I can't see "sg2044-sophgo-sd3-10.dts " on the 
latest mainline yet.

BTW,  the name "sg2044-sophgo-sd3-10" seems a bit redundant. Wouldn't 
"sg2044-sd3-10" be better?

[......]
Inochi Amaoto Feb. 25, 2025, 12:38 a.m. UTC | #2
On Tue, Feb 25, 2025 at 08:23:36AM +0800, Chen Wang wrote:
> 
> On 2025/2/24 18:12, Longbin Li wrote:
> > Add SPI NOR device node for Sophgo.
> > 
> > Signed-off-by: Longbin Li <looong.bin@gmail.com>
> > ---
> >   .../boot/dts/sophgo/sg2044-sophgo-sd3-10.dts  | 18 ++++++++++++++
> >   arch/riscv/boot/dts/sophgo/sg2044.dtsi        | 24 +++++++++++++++++++
> >   2 files changed, 42 insertions(+)
> > 
> > diff --git a/arch/riscv/boot/dts/sophgo/sg2044-sophgo-sd3-10.dts b/arch/riscv/boot/dts/sophgo/sg2044-sophgo-sd3-10.dts
> > index c50e61a50013..9c634920f37e 100644
> > --- a/arch/riscv/boot/dts/sophgo/sg2044-sophgo-sd3-10.dts
> > +++ b/arch/riscv/boot/dts/sophgo/sg2044-sophgo-sd3-10.dts
> > @@ -80,6 +80,24 @@ &sd {
> >   	status = "okay";
> >   };
> > 
> > +&spifmc0 {
> > +	status = "okay";
> > +
> > +	flash@0 {
> > +		compatible = "jedec,spi-nor";
> > +		reg = <0>;
> > +	};
> > +};
> > +
> > +&spifmc1 {
> > +	status = "okay";
> > +
> > +	flash@0 {
> > +		compatible = "jedec,spi-nor";
> > +		reg = <0>;
> > +	};
> > +};
> > +
> >   &uart1 {
> >   	status = "okay";
> >   };
> 
> What is your baseline? I can't see "sg2044-sophgo-sd3-10.dts " on the latest
> mainline yet.
> 

It seems like he forgot to remove this patch as the baseline is not
submitted.

> BTW,  the name "sg2044-sophgo-sd3-10" seems a bit redundant. Wouldn't
> "sg2044-sd3-10" be better?
> 

I do not think so. we want <soc-vendor-board> format. In this format.
sophgo is a must.

Regards,
Inochi
Chen Wang Feb. 25, 2025, 12:44 a.m. UTC | #3
On 2025/2/25 8:38, Inochi Amaoto wrote:
> On Tue, Feb 25, 2025 at 08:23:36AM +0800, Chen Wang wrote:
>> On 2025/2/24 18:12, Longbin Li wrote:
>>> Add SPI NOR device node for Sophgo.
>>>
>>> Signed-off-by: Longbin Li <looong.bin@gmail.com>
>>> ---
>>>    .../boot/dts/sophgo/sg2044-sophgo-sd3-10.dts  | 18 ++++++++++++++
>>>    arch/riscv/boot/dts/sophgo/sg2044.dtsi        | 24 +++++++++++++++++++
>>>    2 files changed, 42 insertions(+)
>>>
>>> diff --git a/arch/riscv/boot/dts/sophgo/sg2044-sophgo-sd3-10.dts b/arch/riscv/boot/dts/sophgo/sg2044-sophgo-sd3-10.dts
>>> index c50e61a50013..9c634920f37e 100644
>>> --- a/arch/riscv/boot/dts/sophgo/sg2044-sophgo-sd3-10.dts
>>> +++ b/arch/riscv/boot/dts/sophgo/sg2044-sophgo-sd3-10.dts
>>> @@ -80,6 +80,24 @@ &sd {
>>>    	status = "okay";
>>>    };
>>>
>>> +&spifmc0 {
>>> +	status = "okay";
>>> +
>>> +	flash@0 {
>>> +		compatible = "jedec,spi-nor";
>>> +		reg = <0>;
>>> +	};
>>> +};
>>> +
>>> +&spifmc1 {
>>> +	status = "okay";
>>> +
>>> +	flash@0 {
>>> +		compatible = "jedec,spi-nor";
>>> +		reg = <0>;
>>> +	};
>>> +};
>>> +
>>>    &uart1 {
>>>    	status = "okay";
>>>    };
>> What is your baseline? I can't see "sg2044-sophgo-sd3-10.dts " on the latest
>> mainline yet.
>>
> It seems like he forgot to remove this patch as the baseline is not
> submitted.
>
>> BTW,  the name "sg2044-sophgo-sd3-10" seems a bit redundant. Wouldn't
>> "sg2044-sd3-10" be better?
>>
> I do not think so. we want <soc-vendor-board> format. In this format.
> sophgo is a must.

All these dts* files are under "sophgo" folder, that's why I think 
"sophgo" is redundant for file name.

Anyway, if you do WANT the format, I won't object strongly.

>
> Regards,
> Inochi
Chen Wang Feb. 25, 2025, 12:58 a.m. UTC | #4
hi, Longbin,

sg2044.dtsi  seems also does not exist on the master yet, please double 
check.

Regards,

Chen

On 2025/2/25 8:23, Chen Wang wrote:
>
> On 2025/2/24 18:12, Longbin Li wrote:
>> Add SPI NOR device node for Sophgo.
>>
>> Signed-off-by: Longbin Li <looong.bin@gmail.com>
>> ---
>>   .../boot/dts/sophgo/sg2044-sophgo-sd3-10.dts  | 18 ++++++++++++++
>>   arch/riscv/boot/dts/sophgo/sg2044.dtsi        | 24 +++++++++++++++++++
>>   2 files changed, 42 insertions(+)
>>
>> diff --git a/arch/riscv/boot/dts/sophgo/sg2044-sophgo-sd3-10.dts 
>> b/arch/riscv/boot/dts/sophgo/sg2044-sophgo-sd3-10.dts
>> index c50e61a50013..9c634920f37e 100644
>> --- a/arch/riscv/boot/dts/sophgo/sg2044-sophgo-sd3-10.dts
>> +++ b/arch/riscv/boot/dts/sophgo/sg2044-sophgo-sd3-10.dts
>> @@ -80,6 +80,24 @@ &sd {
>>       status = "okay";
>>   };
>>
>> +&spifmc0 {
>> +    status = "okay";
>> +
>> +    flash@0 {
>> +        compatible = "jedec,spi-nor";
>> +        reg = <0>;
>> +    };
>> +};
>> +
>> +&spifmc1 {
>> +    status = "okay";
>> +
>> +    flash@0 {
>> +        compatible = "jedec,spi-nor";
>> +        reg = <0>;
>> +    };
>> +};
>> +
>>   &uart1 {
>>       status = "okay";
>>   };
>
> What is your baseline? I can't see "sg2044-sophgo-sd3-10.dts " on the 
> latest mainline yet.
>
> BTW,  the name "sg2044-sophgo-sd3-10" seems a bit redundant. Wouldn't 
> "sg2044-sd3-10" be better?
>
> [......]
>
>
diff mbox series

Patch

diff --git a/arch/riscv/boot/dts/sophgo/sg2044-sophgo-sd3-10.dts b/arch/riscv/boot/dts/sophgo/sg2044-sophgo-sd3-10.dts
index c50e61a50013..9c634920f37e 100644
--- a/arch/riscv/boot/dts/sophgo/sg2044-sophgo-sd3-10.dts
+++ b/arch/riscv/boot/dts/sophgo/sg2044-sophgo-sd3-10.dts
@@ -80,6 +80,24 @@  &sd {
 	status = "okay";
 };

+&spifmc0 {
+	status = "okay";
+
+	flash@0 {
+		compatible = "jedec,spi-nor";
+		reg = <0>;
+	};
+};
+
+&spifmc1 {
+	status = "okay";
+
+	flash@0 {
+		compatible = "jedec,spi-nor";
+		reg = <0>;
+	};
+};
+
 &uart1 {
 	status = "okay";
 };
diff --git a/arch/riscv/boot/dts/sophgo/sg2044.dtsi b/arch/riscv/boot/dts/sophgo/sg2044.dtsi
index 6eaf92dd0a90..e45f7218de04 100644
--- a/arch/riscv/boot/dts/sophgo/sg2044.dtsi
+++ b/arch/riscv/boot/dts/sophgo/sg2044.dtsi
@@ -33,6 +33,30 @@  soc {
 		dma-noncoherent;
 		ranges;

+		spifmc0: spi@7001000000 {
+			compatible = "sophgo,sg2044-spifmc-nor";
+			reg = <0x70 0x01000000 0x0 0x4000000>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			clocks = <&clk CLK_GATE_AHB_SPIFMC>;
+			interrupt-parent = <&intc>;
+			interrupts = <37 IRQ_TYPE_LEVEL_HIGH>;
+			resets = <&rst RST_SPIFMC0>;
+			status = "disabled";
+		};
+
+		spifmc1: spi@7005000000 {
+			compatible = "sophgo,sg2044-spifmc-nor";
+			reg = <0x70 0x05000000 0x0 0x4000000>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			clocks = <&clk CLK_GATE_AHB_SPIFMC>;
+			interrupt-parent = <&intc>;
+			interrupts = <38 IRQ_TYPE_LEVEL_HIGH>;
+			resets = <&rst RST_SPIFMC1>;
+			status = "disabled";
+		};
+
 		dmac0: dma-controller@7020000000 {
 			compatible = "snps,axi-dma-1.01a";
 			reg = <0x70 0x20000000 0x0 0x10000>;