mbox series

[0/4] Add DTS and bindings for Unisoc's UMS9620

Message ID 20231215085630.984892-1-chunyan.zhang@unisoc.com
Headers show
Series Add DTS and bindings for Unisoc's UMS9620 | expand

Message

Chunyan Zhang Dec. 15, 2023, 8:56 a.m. UTC
Add a basic DTS for UMS9620 SoC and UMS9620-2H10 board, with this patchset
the board can run into console.

Chunyan Zhang (4):
  dt-bindings: mfd: sprd: Add support for UMS9620
  dt-bindings: arm: Add compatible strings for Unisoc's UMS9620
  dt-bindings: serial: Add a new compatible string for UMS9620
  arm64: dts: sprd: Add support for Unisoc's UMS9620

 .../devicetree/bindings/arm/sprd/sprd.yaml    |   5 +
 .../bindings/mfd/sprd,ums512-glbreg.yaml      |   4 +-
 .../devicetree/bindings/serial/sprd-uart.yaml |   1 +
 arch/arm64/boot/dts/sprd/Makefile             |   3 +-
 arch/arm64/boot/dts/sprd/ums9620-2h10.dts     |  38 +++
 arch/arm64/boot/dts/sprd/ums9620.dtsi         | 247 ++++++++++++++++++
 6 files changed, 296 insertions(+), 2 deletions(-)
 create mode 100644 arch/arm64/boot/dts/sprd/ums9620-2h10.dts
 create mode 100644 arch/arm64/boot/dts/sprd/ums9620.dtsi

Comments

Krzysztof Kozlowski Dec. 15, 2023, 10:36 a.m. UTC | #1
On 15/12/2023 09:56, Chunyan Zhang wrote:
> Add basic support for Unisoc's UMS9620, with this patch,
> the board ums9620-2h10 can run into console.
> 

...

> +
> +	soc: soc {

Are you sure you do not have here W=1 warnings?

> +		compatible = "simple-bus";
> +		#address-cells = <2>;
> +		#size-cells = <2>;
> +		ranges;
> +
> +		gic: interrupt-controller@12000000 {
> +			compatible = "arm,gic-v3";
> +			reg = <0x0 0x12000000 0 0x20000>,	/* GICD */
> +			      <0x0 0x12040000 0 0x100000>;	/* GICR */
> +			#interrupt-cells = <3>;
> +			#address-cells = <2>;
> +			#size-cells = <2>;
> +			ranges;

Put ranges after reg, if they are needed. Are they needed, BTW?

> +			redistributor-stride = <0x0 0x20000>;	/* 128KB stride */
> +			#redistributor-regions = <1>;
> +			interrupt-controller;
> +			interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_HIGH>;
> +		};
> +
> +		apb@20200000 {
> +			compatible = "simple-bus";
> +			#address-cells = <1>;
> +			#size-cells = <1>;
> +			ranges = <0 0 0x20200000 0x100000>;

ranges is after reg, which is after compatible, so here it is the second
property.

> +
> +			uart0: serial@0 {
> +				compatible = "sprd,ums9620-uart",
> +					     "sprd,sc9836-uart";
> +				reg = <0 0x100>;
> +				interrupts = <GIC_SPI 196 IRQ_TYPE_LEVEL_HIGH>;
> +				clocks = <&ext_26m>;
> +				status = "disabled";
> +			};
> +
> +			uart1: serial@10000 {
> +				compatible = "sprd,ums9620-uart",
> +					     "sprd,sc9836-uart";
> +				reg = <0x10000 0x100>;
> +				interrupts = <GIC_SPI 195 IRQ_TYPE_LEVEL_HIGH>;
> +				clocks = <&ext_26m>;
> +				status = "disabled";
> +			};
> +		};
> +	};


Best regards,
Krzysztof
Chunyan Zhang Dec. 18, 2023, 2:31 a.m. UTC | #2
On Fri, 15 Dec 2023 at 18:36, Krzysztof Kozlowski
<krzysztof.kozlowski@linaro.org> wrote:
>
> On 15/12/2023 09:56, Chunyan Zhang wrote:
> > Add basic support for Unisoc's UMS9620, with this patch,
> > the board ums9620-2h10 can run into console.
> >
>
> ...
>
> > +
> > +     soc: soc {
>
> Are you sure you do not have here W=1 warnings?

Do you mean warnings generated by running "make W=1"? I tried just now
and didn't see warnings on this dts.

Thanks,
Chunyan
Krzysztof Kozlowski Dec. 18, 2023, 7 a.m. UTC | #3
On 18/12/2023 03:31, Chunyan Zhang wrote:
> On Fri, 15 Dec 2023 at 18:36, Krzysztof Kozlowski
> <krzysztof.kozlowski@linaro.org> wrote:
>>
>> On 15/12/2023 09:56, Chunyan Zhang wrote:
>>> Add basic support for Unisoc's UMS9620, with this patch,
>>> the board ums9620-2h10 can run into console.
>>>
>>
>> ...
>>
>>> +
>>> +     soc: soc {
>>
>> Are you sure you do not have here W=1 warnings?
> 
> Do you mean warnings generated by running "make W=1"? I tried just now
> and didn't see warnings on this dts.

No, I meant `dtbs_check W=1` or W=1 coming from dtc (dtbs).

Best regards,
Krzysztof
Chunyan Zhang Dec. 18, 2023, 7:18 a.m. UTC | #4
On Mon, 18 Dec 2023 at 15:00, Krzysztof Kozlowski
<krzysztof.kozlowski@linaro.org> wrote:
>
> On 18/12/2023 03:31, Chunyan Zhang wrote:
> > On Fri, 15 Dec 2023 at 18:36, Krzysztof Kozlowski
> > <krzysztof.kozlowski@linaro.org> wrote:
> >>
> >> On 15/12/2023 09:56, Chunyan Zhang wrote:
> >>> Add basic support for Unisoc's UMS9620, with this patch,
> >>> the board ums9620-2h10 can run into console.
> >>>
> >>
> >> ...
> >>
> >>> +
> >>> +     soc: soc {
> >>
> >> Are you sure you do not have here W=1 warnings?
> >
> > Do you mean warnings generated by running "make W=1"? I tried just now
> > and didn't see warnings on this dts.
>
> No, I meant `dtbs_check W=1` or W=1 coming from dtc (dtbs).

Yes, I just run "make W=1 dtbs",  also have tried `dtbs_check W=1`,
didn't see warnings on ums9620-2h10.dtb
Krzysztof Kozlowski Dec. 18, 2023, 7:31 a.m. UTC | #5
On 18/12/2023 08:18, Chunyan Zhang wrote:
> On Mon, 18 Dec 2023 at 15:00, Krzysztof Kozlowski
> <krzysztof.kozlowski@linaro.org> wrote:
>>
>> On 18/12/2023 03:31, Chunyan Zhang wrote:
>>> On Fri, 15 Dec 2023 at 18:36, Krzysztof Kozlowski
>>> <krzysztof.kozlowski@linaro.org> wrote:
>>>>
>>>> On 15/12/2023 09:56, Chunyan Zhang wrote:
>>>>> Add basic support for Unisoc's UMS9620, with this patch,
>>>>> the board ums9620-2h10 can run into console.
>>>>>
>>>>
>>>> ...
>>>>
>>>>> +
>>>>> +     soc: soc {
>>>>
>>>> Are you sure you do not have here W=1 warnings?
>>>
>>> Do you mean warnings generated by running "make W=1"? I tried just now
>>> and didn't see warnings on this dts.
>>
>> No, I meant `dtbs_check W=1` or W=1 coming from dtc (dtbs).
> 
> Yes, I just run "make W=1 dtbs",  also have tried `dtbs_check W=1`,
> didn't see warnings on ums9620-2h10.dtb

Ah, because it does not even compile!

ums9620.dtsi:8:10: fatal error: dt-bindings/clock/sprd,ums9620-clk.h: No
such file or directory


Best regards,
Krzysztof
Krzysztof Kozlowski Dec. 18, 2023, 7:33 a.m. UTC | #6
On 15/12/2023 09:56, Chunyan Zhang wrote:
> Add a basic DTS for UMS9620 SoC and UMS9620-2H10 board, with this patchset
> the board can run into console.
> 

This was never tested and never built on the upstream kernel. Please
work on upstream, not on downstream fork.

Best regards,
Krzysztof
Chunyan Zhang Dec. 18, 2023, 7:37 a.m. UTC | #7
On Mon, 18 Dec 2023 at 15:31, Krzysztof Kozlowski
<krzysztof.kozlowski@linaro.org> wrote:
>
> On 18/12/2023 08:18, Chunyan Zhang wrote:
> > On Mon, 18 Dec 2023 at 15:00, Krzysztof Kozlowski
> > <krzysztof.kozlowski@linaro.org> wrote:
> >>
> >> On 18/12/2023 03:31, Chunyan Zhang wrote:
> >>> On Fri, 15 Dec 2023 at 18:36, Krzysztof Kozlowski
> >>> <krzysztof.kozlowski@linaro.org> wrote:
> >>>>
> >>>> On 15/12/2023 09:56, Chunyan Zhang wrote:
> >>>>> Add basic support for Unisoc's UMS9620, with this patch,
> >>>>> the board ums9620-2h10 can run into console.
> >>>>>
> >>>>
> >>>> ...
> >>>>
> >>>>> +
> >>>>> +     soc: soc {
> >>>>
> >>>> Are you sure you do not have here W=1 warnings?
> >>>
> >>> Do you mean warnings generated by running "make W=1"? I tried just now
> >>> and didn't see warnings on this dts.
> >>
> >> No, I meant `dtbs_check W=1` or W=1 coming from dtc (dtbs).
> >
> > Yes, I just run "make W=1 dtbs",  also have tried `dtbs_check W=1`,
> > didn't see warnings on ums9620-2h10.dtb
>
> Ah, because it does not even compile!

The patch was generated from a middle commit (that was my mistake of course).

But I've fixed the issue. I ran the command just now according to your
comments, and didn't see the warnings on this dtb.

If I'm missing something, please correct me.

Thanks,
Chunyan
Krzysztof Kozlowski Dec. 18, 2023, 9:17 a.m. UTC | #8
On 18/12/2023 08:37, Chunyan Zhang wrote:
> On Mon, 18 Dec 2023 at 15:31, Krzysztof Kozlowski
> <krzysztof.kozlowski@linaro.org> wrote:
>>
>> On 18/12/2023 08:18, Chunyan Zhang wrote:
>>> On Mon, 18 Dec 2023 at 15:00, Krzysztof Kozlowski
>>> <krzysztof.kozlowski@linaro.org> wrote:
>>>>
>>>> On 18/12/2023 03:31, Chunyan Zhang wrote:
>>>>> On Fri, 15 Dec 2023 at 18:36, Krzysztof Kozlowski
>>>>> <krzysztof.kozlowski@linaro.org> wrote:
>>>>>>
>>>>>> On 15/12/2023 09:56, Chunyan Zhang wrote:
>>>>>>> Add basic support for Unisoc's UMS9620, with this patch,
>>>>>>> the board ums9620-2h10 can run into console.
>>>>>>>
>>>>>>
>>>>>> ...
>>>>>>
>>>>>>> +
>>>>>>> +     soc: soc {
>>>>>>
>>>>>> Are you sure you do not have here W=1 warnings?
>>>>>
>>>>> Do you mean warnings generated by running "make W=1"? I tried just now
>>>>> and didn't see warnings on this dts.
>>>>
>>>> No, I meant `dtbs_check W=1` or W=1 coming from dtc (dtbs).
>>>
>>> Yes, I just run "make W=1 dtbs",  also have tried `dtbs_check W=1`,
>>> didn't see warnings on ums9620-2h10.dtb
>>
>> Ah, because it does not even compile!
> 
> The patch was generated from a middle commit (that was my mistake of course).
> 
> But I've fixed the issue. I ran the command just now according to your
> comments, and didn't see the warnings on this dtb.
> 
> If I'm missing something, please correct me.

You don't have unit address for soc node, but could be fine if
address/size cells match. Don't remember, but also cannot verify because
it does not build. :(

Best regards,
Krzysztof