Skip to contentSkip to conversation

Add initial support for MA35D1 SoC

PATCH NAK Jacky Huang 5 participants 17 messages Mar 7, 2022 – Apr 7, 2022

Subsystems (5)
lore
Share & tools
lore

Jacky Huang

author maintainer
#0 lore raw

cover Add initial support for MA35D1 SoC

This patch series adds initial support for Nuvoton MA35D1 SoC, include initial dts and clock controller binding.

Jacky Huang (3):
dt-bindings: clock: add binding for MA35D1 clock controller
dt-bindings: clock: Document MA35D1 clock controller bindings
arm64: dts: nuvoton: Add initial support for MA35D1

 .../bindings/clock/nuvoton,ma35d1-clk.yaml    |  66 +++++
 arch/arm64/boot/dts/Makefile                  |   1 +
 arch/arm64/boot/dts/nuvoton/Makefile          |   2 +
 arch/arm64/boot/dts/nuvoton/ma35d1-evb.dts    |  23 ++
 arch/arm64/boot/dts/nuvoton/ma35d1.dtsi       | 106 +++++++
 .../dt-bindings/clock/nuvoton,ma35d1-clk.h    | 262 ++++++++++++++++++
 6 files changed, 460 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/clock/nuvoton,ma35d1-clk.yaml
 create mode 100644 arch/arm64/boot/dts/nuvoton/Makefile
 create mode 100644 arch/arm64/boot/dts/nuvoton/ma35d1-evb.dts
 create mode 100644 arch/arm64/boot/dts/nuvoton/ma35d1.dtsi
 create mode 100644 include/dt-bindings/clock/nuvoton,ma35d1-clk.h

--
2.17.1

________________________________
________________________________
The privileged confidential information contained in this email is intended for use only by the addressees as indicated by the original sender of this email. If you are not the addressee indicated in this email or are not responsible for delivery of the email to such a person, please kindly reply to the sender indicating this fact and delete all copies of it from your computer and network server immediately. Your cooperation is highly appreciated. It is advised that any unauthorized use of confidential information of Nuvoton is strictly prohibited; and any information in this email irrelevant to the official business of Nuvoton shall be deemed as neither given nor endorsed by Nuvoton.

author maintainer
#1 lore raw

PATCH 1/3 dt-bindings: clock: add binding for MA35D1 clock controller

Add the dt-bindings header for Nuvoton MA35D1, that gets shared between the clock controller and clock references in the dts.

---
 .../dt-bindings/clock/nuvoton,ma35d1-clk.h    | 262 ++++++++++++++++++
 1 file changed, 262 insertions(+)
 create mode 100644 include/dt-bindings/clock/nuvoton,ma35d1-clk.h
include/dt-bindings/clock/nuvoton,ma35d1-clk.h new file +262 -0
new file mode 100644
index 000000000000..3634e5edcac5
@@ -0,0 +1,262 @@
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
+/*
+ * Copyright (c) 2022 Nuvoton Technology Corporation.
+ */
+
+#ifndef __DT_BINDINGS_MA35D1_CLK_H
+#define __DT_BINDINGS_MA35D1_CLK_H
+
+/* Clock Sources */
+/* External and Internal oscillator clocks */
+#define        HXT             0
+#define        HXT_GATE        1
+#define        LXT             2
+#define        LXT_GATE        3
+#define        HIRC            4
+#define        HIRC_GATE       5
+#define        LIRC            6
+#define        LIRC_GATE       7
+
+/* PLLs */
+#define        CAPLL           8
+#define        SYSPLL          9
+#define        DDRPLL          10
+#define        APLL            11
+#define        EPLL            12
+#define        VPLL            13
+
+/* EPLL Divider */
+#define        EPLL_DIV2       14
+#define        EPLL_DIV4       15
+#define        EPLL_DIV8       16
+
+/* CA35 CPU Clock, System Clock, AXI, HCLK and PCLK */
+#define        CA35CLK_MUX     17
+#define        AXICLK_DIV2     18
+#define        AXICLK_DIV4     19
+#define        AXICLK_MUX      20
+#define        SYSCLK0_MUX     21
+#define        SYSCLK1_MUX     22
+#define        SYSCLK1_DIV2    23
+#define        HCLK0           24
+#define        HCLK1           25
+#define        HCLK2           26
+#define        PCLK0           27
+#define        PCLK1           28
+#define        PCLK2           29
+#define        HCLK3           30
+#define        PCLK3           31
+#define        PCLK4           32
+
+/* Peripheral clocks */
+/* AXI and AHB Clocks */
+#define        USBPHY0         33
+#define        USBPHY1         34
+#define        DDR0_GATE       35
+#define        DDR6_GATE       36
+#define        CAN0_MUX        37
+#define        CAN0_DIV        38
+#define        CAN0_GATE       39
+#define        CAN1_MUX        40
+#define        CAN1_DIV        41
+#define        CAN1_GATE       42
+#define        CAN2_MUX        43
+#define        CAN2_DIV        44
+#define        CAN2_GATE       45
+#define        CAN3_MUX        46
+#define        CAN3_DIV        47
+#define        CAN3_GATE       48
+#define        SDH0_MUX        49
+#define        SDH0_GATE       50
+#define        SDH1_MUX        51
+#define        SDH1_GATE       52
+#define        NAND_GATE       53
+#define        USBD_GATE       54
+#define        USBH_GATE       55
+#define        HUSBH0_GATE     56
+#define        HUSBH1_GATE     57
+#define        GFX_MUX         58
+#define        GFX_GATE        59
+#define        VC8K_GATE       60
+#define        DCU_MUX         61
+#define        DCU_GATE        62
+#define        DCUP_DIV        63
+#define        EMAC0_GATE      64
+#define        EMAC1_GATE      65
+#define        CCAP0_MUX       66
+#define        CCAP0_DIV       67
+#define        CCAP0_GATE      68
+#define        CCAP1_MUX       69
+#define        CCAP1_DIV       70
+#define        CCAP1_GATE      71
+#define        PDMA0_GATE      72
+#define        PDMA1_GATE      73
+#define        PDMA2_GATE      74
+#define        PDMA3_GATE      75
+#define        WH0_GATE        76
+#define        WH1_GATE        77
+#define        HWS_GATE        78
+#define        EBI_GATE        79
+#define        SRAM0_GATE      80
+#define        SRAM1_GATE      81
+#define        ROM_GATE        82
+#define        TRA_GATE        83
+#define        DBG_MUX         84
+#define        DBG_GATE        85
+#define        CKO_MUX         86
+#define        CKO_DIV         87
+#define        CKO_GATE        88
+#define        GTMR_GATE       89
+#define        GPA_GATE        90
+#define        GPB_GATE        91
+#define        GPC_GATE        92
+#define        GPD_GATE        93
+#define        GPE_GATE        94
+#define        GPF_GATE        95
+#define        GPG_GATE        96
+#define        GPH_GATE        97
+#define        GPI_GATE        98
+#define        GPJ_GATE        99
+#define        GPK_GATE        100
+#define        GPL_GATE        101
+#define        GPM_GATE        102
+#define        GPN_GATE        103
+
+/* APB Clocks */
+#define        TMR0_MUX        104
+#define        TMR0_GATE       105
+#define        TMR1_MUX        106
+#define        TMR1_GATE       107
+#define        TMR2_MUX        108
+#define        TMR2_GATE       109
+#define        TMR3_MUX        110
+#define        TMR3_GATE       111
+#define        TMR4_MUX        112
+#define        TMR4_GATE       113
+#define        TMR5_MUX        114
+#define        TMR5_GATE       115
+#define        TMR6_MUX        116
+#define        TMR6_GATE       117
+#define        TMR7_MUX        118
+#define        TMR7_GATE       119
+#define        TMR8_MUX        120
+#define        TMR8_GATE       121
+#define        TMR9_MUX        122
+#define        TMR9_GATE       123
+#define        TMR10_MUX       124
+#define        TMR10_GATE      125
+#define        TMR11_MUX       126
+#define        TMR11_GATE      127
+#define        UART0_MUX       128
+#define        UART0_DIV       129
+#define        UART0_GATE      130
+#define        UART1_MUX       131
+#define        UART1_DIV       132
+#define        UART1_GATE      133
+#define        UART2_MUX       134
+#define        UART2_DIV       135
+#define        UART2_GATE      136
+#define        UART3_MUX       137
+#define        UART3_DIV       138
+#define        UART3_GATE      139
+#define        UART4_MUX       140
+#define        UART4_DIV       141
+#define        UART4_GATE      142
+#define        UART5_MUX       143
+#define        UART5_DIV       144
+#define        UART5_GATE      145
+#define        UART6_MUX       146
+#define        UART6_DIV       147
+#define        UART6_GATE      148
+#define        UART7_MUX       149
+#define        UART7_DIV       150
+#define        UART7_GATE      151
+#define        UART8_MUX       152
+#define        UART8_DIV       153
+#define        UART8_GATE      154
+#define        UART9_MUX       155
+#define        UART9_DIV       156
+#define        UART9_GATE      157
+#define        UART10_MUX      158
+#define        UART10_DIV      159
+#define        UART10_GATE     160
+#define        UART11_MUX      161
+#define        UART11_DIV      162
+#define        UART11_GATE     163
+#define        UART12_MUX      164
+#define        UART12_DIV      165
+#define        UART12_GATE     166
+#define        UART13_MUX      167
+#define        UART13_DIV      168
+#define        UART13_GATE     169
+#define        UART14_MUX      170
+#define        UART14_DIV      171
+#define        UART14_GATE     172
+#define        UART15_MUX      173
+#define        UART15_DIV      174
+#define        UART15_GATE     175
+#define        UART16_MUX      176
+#define        UART16_DIV      177
+#define        UART16_GATE     178
+#define        RTC_GATE        179
+#define        DDR_GATE        180
+#define        KPI_MUX         181
+#define        KPI_DIV         182
+#define        KPI_GATE        183
+#define        I2C0_GATE       184
+#define        I2C1_GATE       185
+#define        I2C2_GATE       186
+#define        I2C3_GATE       187
+#define        I2C4_GATE       188
+#define        I2C5_GATE       189
+#define        QSPI0_MUX       190
+#define        QSPI0_GATE      191
+#define        QSPI1_MUX       192
+#define        QSPI1_GATE      193
+#define        SMC0_MUX        194
+#define        SMC0_DIV        195
+#define        SMC0_GATE       196
+#define        SMC1_MUX        197
+#define        SMC1_DIV        198
+#define        SMC1_GATE       199
+#define        WDT0_MUX        200
+#define        WDT0_GATE       201
+#define        WDT1_MUX        202
+#define        WDT1_GATE       203
+#define        WDT2_MUX        204
+#define        WDT2_GATE       205
+#define        WWDT0_MUX       206
+#define        WWDT1_MUX       207
+#define        WWDT2_MUX       208
+#define        EPWM0_GATE      209
+#define        EPWM1_GATE      210
+#define        EPWM2_GATE      211
+#define        I2S0_MUX        212
+#define        I2S0_GATE       213
+#define        I2S1_MUX        214
+#define        I2S1_GATE       215
+#define        SSMCC_GATE      216
+#define        SSPCC_GATE      217
+#define        SPI0_MUX        218
+#define        SPI0_GATE       219
+#define        SPI1_MUX        220
+#define        SPI1_GATE       221
+#define        SPI2_MUX        222
+#define        SPI2_GATE       223
+#define        SPI3_MUX        224
+#define        SPI3_GATE       225
+#define        ECAP0_GATE      226
+#define        ECAP1_GATE      227
+#define        ECAP2_GATE      228
+#define        QEI0_GATE       229
+#define        QEI1_GATE       230
+#define        QEI2_GATE       231
+#define        ADC_DIV         232
+#define        ADC_GATE        233
+#define        EADC_DIV        234
+#define        EADC_GATE       235
+#define        CLK_MAX         236
+
+#define        MA35D1_CLK_MAX_IDX      236
+
+#endif /* __DT_BINDINGS_MA35D1_CLK_H */

--
2.17.1

________________________________
________________________________
The privileged confidential information contained in this email is intended for use only by the addressees as indicated by the original sender of this email. If you are not the addressee indicated in this email or are not responsible for delivery of the email to such a person, please kindly reply to the sender indicating this fact and delete all copies of it from your computer and network server immediately. Your cooperation is highly appreciated. It is advised that any unauthorized use of confidential information of Nuvoton is strictly prohibited; and any information in this email irrelevant to the official business of Nuvoton shall be deemed as neither given nor endorsed by Nuvoton.

#2 lore raw

Re: [PATCH 1/3] dt-bindings: clock: add binding for MA35D1 clock controller

Quoted 15 lines · Jacky Huang

Add the dt-bindings header for Nuvoton MA35D1, that gets shared between the clock controller and clock references in the dts.

---
 .../dt-bindings/clock/nuvoton,ma35d1-clk.h    | 262 ++++++++++++++++++
 1 file changed, 262 insertions(+)
 create mode 100644 include/dt-bindings/clock/nuvoton,ma35d1-clk.h
include/dt-bindings/clock/nuvoton,ma35d1-clk.h new file +0 -0
new file mode 100644
index 000000000000..3634e5edcac5

include/dt-bindings/clock/nuvoton,ma35d1-clk.h line 6

Quoted 6 lines
include/dt-bindings/clock/nuvoton,ma35d1-clk.h new file +6 -0
@@ -0,0 +1,262 @@
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
+/*
+ * Copyright (c) 2022 Nuvoton Technology Corporation.
+ */
+
+#ifndef __DT_BINDINGS_MA35D1_CLK_H

Please use header guard matching more parts of path, so:
__DT_BINDINGS_CLOCK_ NUVOTON_MA35D1_CLK_H

Quoted 2 lines
include/dt-bindings/clock/nuvoton,ma35d1-clk.h new file +2 -0
+#define __DT_BINDINGS_MA35D1_CLK_H
+

(...)

Quoted 3 lines

________________________________
________________________________
The privileged confidential information contained in this email is intended for use only by the addressees as indicated by the original sender of this email. If you are not the addressee indicated in this email or are not responsible for delivery of the email to such a person, please kindly reply to the sender indicating this fact and delete all copies of it from your computer and network server immediately. Your cooperation is highly appreciated. It is advised that any unauthorized use of confidential information of Nuvoton is strictly prohibited; and any information in this email irrelevant to the official business of Nuvoton shall be deemed as neither given nor endorsed by Nuvoton.

Since I was not intended recipient, I am going to NAK it and delete all copies.

NAK. Cannot be included in Linux kernel.

Deleted from my computer, but I cannot delete it from network servers. There are just too many of them...

Best regards,
Krzysztof

author maintainer
#3 lore raw

Re: [PATCH 1/3] dt-bindings: clock: add binding for MA35D1 clock controller

Quoted 36 lines · Krzysztof Kozlowski
Quoted 15 lines · Jacky Huang

Add the dt-bindings header for Nuvoton MA35D1, that gets shared between the clock controller and clock references in the dts.

---
  .../dt-bindings/clock/nuvoton,ma35d1-clk.h    | 262 ++++++++++++++++++
  1 file changed, 262 insertions(+)

create mode 100644 include/dt-bindings/clock/nuvoton,ma35d1-clk.h

include/dt-bindings/clock/nuvoton,ma35d1-clk.h new file +0 -0
new file mode 100644
index 000000000000..3634e5edcac5

include/dt-bindings/clock/nuvoton,ma35d1-clk.h line 6

Quoted 6 lines
include/dt-bindings/clock/nuvoton,ma35d1-clk.h new file +6 -0
@@ -0,0 +1,262 @@
+/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
+/*
+ * Copyright (c) 2022 Nuvoton Technology Corporation.
+ */
+
+#ifndef __DT_BINDINGS_MA35D1_CLK_H

Please use header guard matching more parts of path, so:
__DT_BINDINGS_CLOCK_ NUVOTON_MA35D1_CLK_H

Quoted 2 lines
include/dt-bindings/clock/nuvoton,ma35d1-clk.h new file +2 -0
+#define __DT_BINDINGS_MA35D1_CLK_H
+

(...)

Quoted 3 lines

________________________________
________________________________
The privileged confidential information contained in this email is intended for use only by the addressees as indicated by the original sender of this email. If you are not the addressee indicated in this email or are not responsible for delivery of the email to such a person, please kindly reply to the sender indicating this fact and delete all copies of it from your computer and network server immediately. Your cooperation is highly appreciated. It is advised that any unauthorized use of confidential information of Nuvoton is strictly prohibited; and any information in this email irrelevant to the official business of Nuvoton shall be deemed as neither given nor endorsed by Nuvoton.

Since I was not intended recipient, I am going to NAK it and delete all copies.

Quoted 7 lines

NAK. Cannot be included in Linux kernel.

Deleted from my computer, but I cannot delete it from network servers. There are just too many of them...

Best regards,
Krzysztof

Dear Sir,

I didn't notice the additional message in the email, it was my mistake.

The problem with the mail server is still unresolved, and there may still be additional messages in this reply.

We will fix it and re-send a clean patch series.

Thanks for your reminding.

Best Regards,

Jacky

________________________________
________________________________
The privileged confidential information contained in this email is intended for use only by the addressees as indicated by the original sender of this email. If you are not the addressee indicated in this email or are not responsible for delivery of the email to such a person, please kindly reply to the sender indicating this fact and delete all copies of it from your computer and network server immediately. Your cooperation is highly appreciated. It is advised that any unauthorized use of confidential information of Nuvoton is strictly prohibited; and any information in this email irrelevant to the official business of Nuvoton shall be deemed as neither given nor endorsed by Nuvoton.

author maintainer
#4 lore raw

PATCH 2/3 dt-bindings: clock: Document MA35D1 clock controller bindings

In reply to Jacky Huang

Add documentation to describe Nuvoton MA35D1 clock driver bindings.

---
 .../bindings/clock/nuvoton,ma35d1-clk.yaml    | 66 +++++++++++++++++++
 1 file changed, 66 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/clock/nuvoton,ma35d1-clk.yaml
Documentation/devicetree/bindings/clock/nuvoton,ma35d1-clk.yaml new file +66 -0
new file mode 100644
index 000000000000..f08b6f29bdcf
@@ -0,0 +1,66 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/nuvoton,ma35d1-clk.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Nuvoton MA35D1 Clock Control Module Binding
+
+maintainers:
+  - Chi-Fang Li <[email protected]>
+  - Jacky Huang <[email protected]>
+
+description: |
+  The MA35D1 clock controller generates clocks for the whole chip,
+  including system clocks and all peripheral clocks.
+
+  See also:
+    dt-bindings/clock/ma35d1-clk.h
+
+properties:
+  compatible:
+    const: nuvoton,ma35d1-clk
+
+  reg:
+    maxItems: 1
+
+  '#clock-cells':
+    const: 1
+
+  assigned-clocks:
+    maxItems: 4
+
+  assigned-clock-rates:
+    maxItems: 4
+
+  clock-pll-mode:
+    maxItems: 4
+
+required:
+  - compatible
+  - reg
+  - '#clock-cells'
+  - assigned-clocks
+  - assigned-clock-rates
+  - clock-pll-mode
+
+additionalProperties: false
+
+examples:
+  # clock control module node:
+  - |
+    clk: clock-controller@40460200 {
+        compatible = "nuvoton,ma35d1-clk";
+        reg = <0x00000000 0x40460200 0x0 0x100>;
+        #clock-cells = <1>;
+        assigned-clocks = <&clk DDRPLL>,
+                          <&clk APLL>,
+                          <&clk EPLL>,
+                          <&clk VPLL>;
+        assigned-clock-rates = <266000000>,
+                               <180000000>,
+                               <500000000>,
+                               <102000000>;
+        clock-pll-mode = <1>, <0>, <0>, <0>;
+    };
+...

--
2.17.1

________________________________
________________________________
The privileged confidential information contained in this email is intended for use only by the addressees as indicated by the original sender of this email. If you are not the addressee indicated in this email or are not responsible for delivery of the email to such a person, please kindly reply to the sender indicating this fact and delete all copies of it from your computer and network server immediately. Your cooperation is highly appreciated. It is advised that any unauthorized use of confidential information of Nuvoton is strictly prohibited; and any information in this email irrelevant to the official business of Nuvoton shall be deemed as neither given nor endorsed by Nuvoton.

maintainer NAK
#5 lore raw

Re: [PATCH 2/3] dt-bindings: clock: Document MA35D1 clock controller bindings

Quoted 4 lines · Jacky Huang

Add documentation to describe Nuvoton MA35D1 clock driver bindings.

---

(...)

Quoted 4 lines

________________________________
________________________________
The privileged confidential information contained in this email is intended for use only by the addressees as indicated by the original sender of this email. If you are not the addressee indicated in this email or are not responsible for delivery of the email to such a person, please kindly reply to the sender indicating this fact and delete all copies of it from your computer and network server immediately. Your cooperation is highly appreciated. It is advised that any unauthorized use of confidential information of Nuvoton is strictly prohibited; and any information in this email irrelevant to the official business of Nuvoton shall be deemed as neither given nor endorsed by Nuvoton.

NAK.

Best regards,
Krzysztof

maintainer
#6 lore raw

Re: [PATCH 2/3] dt-bindings: clock: Document MA35D1 clock controller bindings

In reply to Jacky Huang
Quoted 8 lines · Jacky Huang

Add documentation to describe Nuvoton MA35D1 clock driver bindings.

---
 .../bindings/clock/nuvoton,ma35d1-clk.yaml    | 66 +++++++++++++++++++
 1 file changed, 66 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/clock/nuvoton,ma35d1-clk.yaml

My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check' on your patch (DT_CHECKER_FLAGS is new in v5.13):

yamllint warnings/errors:

dtschema/dtc warnings/errors:
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/clock/nuvoton,ma35d1-clk.yaml: properties: 'clocks' is a dependency of 'assigned-clocks'
from schema $id: http://devicetree.org/meta-schemas/clocks.yaml#
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/clock/nuvoton,ma35d1-clk.yaml: ignoring, error in schema: properties
Error: Documentation/devicetree/bindings/clock/nuvoton,ma35d1-clk.example.dts:24.37-38 syntax error
FATAL ERROR: Unable to parse input tree
make[1]: *** [scripts/Makefile.lib:378: Documentation/devicetree/bindings/clock/nuvoton,ma35d1-clk.example.dt.yaml] Error 1 make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:1398: dt_binding_check] Error 2

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/patch/1601972

This check can fail if there are any dependencies. The base for a patch series is generally the most recent rc1.

If you already ran 'make dt_binding_check' and didn't see the above error(s), then make sure 'yamllint' is installed and dt-schema is up to date:

pip3 install dtschema --upgrade

Please check and re-submit.

author maintainer
#7 lore raw

Re: [PATCH 2/3] dt-bindings: clock: Document MA35D1 clock controller bindings

Quoted 31 lines · Rob Herring
Quoted 8 lines · Jacky Huang

Add documentation to describe Nuvoton MA35D1 clock driver bindings.

---
  .../bindings/clock/nuvoton,ma35d1-clk.yaml    | 66 +++++++++++++++++++
  1 file changed, 66 insertions(+)

create mode 100644 Documentation/devicetree/bindings/clock/nuvoton,ma35d1-clk.yaml

My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check' on your patch (DT_CHECKER_FLAGS is new in v5.13):

yamllint warnings/errors:

dtschema/dtc warnings/errors:
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/clock/nuvoton,ma35d1-clk.yaml: properties: 'clocks' is a dependency of 'assigned-clocks'
from schema $id: http://devicetree.org/meta-schemas/clocks.yaml#
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/clock/nuvoton,ma35d1-clk.yaml: ignoring, error in schema: properties
Error: Documentation/devicetree/bindings/clock/nuvoton,ma35d1-clk.example.dts:24.37-38 syntax error
FATAL ERROR: Unable to parse input tree
make[1]: *** [scripts/Makefile.lib:378: Documentation/devicetree/bindings/clock/nuvoton,ma35d1-clk.example.dt.yaml] Error 1 make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:1398: dt_binding_check] Error 2

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/patch/1601972

This check can fail if there are any dependencies. The base for a patch series is generally the most recent rc1.

Quoted 7 lines

If you already ran 'make dt_binding_check' and didn't see the above error(s), then make sure 'yamllint' is installed and dt-schema is up to date:

pip3 install dtschema --upgrade

Please check and re-submit.

Hi Rob,

Thanks for your review and guidance.

I will run the check script and fix errors before re-submit.

Best Regards,

Jacky

Quoted 1 line

________________________________
________________________________
The privileged confidential information contained in this email is intended for use only by the addressees as indicated by the original sender of this email. If you are not the addressee indicated in this email or are not responsible for delivery of the email to such a person, please kindly reply to the sender indicating this fact and delete all copies of it from your computer and network server immediately. Your cooperation is highly appreciated. It is advised that any unauthorized use of confidential information of Nuvoton is strictly prohibited; and any information in this email irrelevant to the official business of Nuvoton shall be deemed as neither given nor endorsed by Nuvoton.

author maintainer
#8 lore raw

PATCH 3/3 arm64: dts: nuvoton: Add initial support for MA35D1

In reply to Jacky Huang

Add the initial device tree files for Nuvoton MA35D1 Soc.

---
 arch/arm64/boot/dts/Makefile               |   1 +
 arch/arm64/boot/dts/nuvoton/Makefile       |   2 +
 arch/arm64/boot/dts/nuvoton/ma35d1-evb.dts |  23 +++++
 arch/arm64/boot/dts/nuvoton/ma35d1.dtsi    | 106 +++++++++++++++++++++
 4 files changed, 132 insertions(+)
 create mode 100644 arch/arm64/boot/dts/nuvoton/Makefile
 create mode 100644 arch/arm64/boot/dts/nuvoton/ma35d1-evb.dts
 create mode 100644 arch/arm64/boot/dts/nuvoton/ma35d1.dtsi
arch/arm64/boot/dts/Makefile +1 -0
index 639e01a4d855..28e01442094f 100644
@@ -30,3 +30,4 @@ subdir-y += synaptics
 subdir-y += ti
 subdir-y += toshiba
 subdir-y += xilinx
+subdir-y += nuvoton
arch/arm64/boot/dts/nuvoton/Makefile new file +2 -0
new file mode 100644
index 000000000000..e1e0c466bf5e
@@ -0,0 +1,2 @@
+# SPDX-License-Identifier: GPL-2.0
+dtb-$(CONFIG_ARCH_NUVOTON) += ma35d1-evb.dtb
arch/arm64/boot/dts/nuvoton/ma35d1-evb.dts new file +23 -0
new file mode 100644
index 000000000000..38e4f734da0f
@@ -0,0 +1,23 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Device Tree Source for MA35D1 Evaluation Board (EVB)
+ *
+ * Copyright (C) 2021 Nuvoton Technology Corp.
+ */
+
+/dts-v1/;
+#include "ma35d1.dtsi"
+
+/ {
+       model = "Nuvoton MA35D1-EVB";
+
+       chosen {
+               bootargs = "console=ttyS0,115200n8";
+       };
+
+       memory@80000000 {
+               device_type = "memory";
+               reg = <0x00000000 0x80000000 0 0x10000000>;
+       };
+};
+
arch/arm64/boot/dts/nuvoton/ma35d1.dtsi new file +106 -0

106 lines not on this page · raw message

--
2.17.1

________________________________
________________________________
The privileged confidential information contained in this email is intended for use only by the addressees as indicated by the original sender of this email. If you are not the addressee indicated in this email or are not responsible for delivery of the email to such a person, please kindly reply to the sender indicating this fact and delete all copies of it from your computer and network server immediately. Your cooperation is highly appreciated. It is advised that any unauthorized use of confidential information of Nuvoton is strictly prohibited; and any information in this email irrelevant to the official business of Nuvoton shall be deemed as neither given nor endorsed by Nuvoton.

#9 lore raw

Re: [PATCH 3/3] arm64: dts: nuvoton: Add initial support for MA35D1

Quoted 28 lines · Jacky Huang

Add the initial device tree files for Nuvoton MA35D1 Soc.

---
 arch/arm64/boot/dts/Makefile               |   1 +
 arch/arm64/boot/dts/nuvoton/Makefile       |   2 +
 arch/arm64/boot/dts/nuvoton/ma35d1-evb.dts |  23 +++++
 arch/arm64/boot/dts/nuvoton/ma35d1.dtsi    | 106 +++++++++++++++++++++
 4 files changed, 132 insertions(+)
 create mode 100644 arch/arm64/boot/dts/nuvoton/Makefile
 create mode 100644 arch/arm64/boot/dts/nuvoton/ma35d1-evb.dts
 create mode 100644 arch/arm64/boot/dts/nuvoton/ma35d1.dtsi
arch/arm64/boot/dts/Makefile +1 -0
index 639e01a4d855..28e01442094f 100644
@@ -30,3 +30,4 @@ subdir-y += synaptics
 subdir-y += ti
 subdir-y += toshiba
 subdir-y += xilinx
+subdir-y += nuvoton
arch/arm64/boot/dts/nuvoton/Makefile new file +0 -0
new file mode 100644
index 000000000000..e1e0c466bf5e

arch/arm64/boot/dts/nuvoton/Makefile line 2

Quoted 2 lines
arch/arm64/boot/dts/nuvoton/Makefile new file +2 -0
@@ -0,0 +1,2 @@
+# SPDX-License-Identifier: GPL-2.0
+dtb-$(CONFIG_ARCH_NUVOTON) += ma35d1-evb.dtb

ARCH_NUVOTON does not exist.

Quoted 11 lines
arch/arm64/boot/dts/nuvoton/ma35d1-evb.dts new file +5 -0
new file mode 100644
index 000000000000..38e4f734da0f
@@ -0,0 +1,23 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Device Tree Source for MA35D1 Evaluation Board (EVB)
+ *
+ * Copyright (C) 2021 Nuvoton Technology Corp.

arch/arm64/boot/dts/nuvoton/ma35d1-evb.dts line 15

Quoted 10 lines
arch/arm64/boot/dts/nuvoton/ma35d1-evb.dts new file +10 -0
+ */
+
+/dts-v1/;
+#include "ma35d1.dtsi"
+
+/ {
+       model = "Nuvoton MA35D1-EVB";
+
+       chosen {
+               bootargs = "console=ttyS0,115200n8";

No bootargs. "chosen", please.

arch/arm64/boot/dts/nuvoton/ma35d1-evb.dts line 16

Quoted 1 line
arch/arm64/boot/dts/nuvoton/ma35d1-evb.dts new file +1 -0
+       };

You need compatible and bindings.

Quoted 15 lines
arch/arm64/boot/dts/nuvoton/ma35d1-evb.dts new file +7 -0
+
+       memory@80000000 {
+               device_type = "memory";
+               reg = <0x00000000 0x80000000 0 0x10000000>;
+       };
+};
+
arch/arm64/boot/dts/nuvoton/ma35d1.dtsi new file +2 -0
new file mode 100644
index 000000000000..27adac4975c3
@@ -0,0 +1,106 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*

arch/arm64/boot/dts/nuvoton/ma35d1.dtsi line 12

Quoted 10 lines
arch/arm64/boot/dts/nuvoton/ma35d1.dtsi new file +10 -0
+ * Copyright (c) 2022 Nuvoton Technology Corp.
+ */
+
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/clock/nuvoton,ma35d1-clk.h>
+
+/ {
+       compatible = "nuvoton,ma35d1";

Please run checkpatch. This compatible looks undocumented.

Quoted 7 lines
arch/arm64/boot/dts/nuvoton/ma35d1.dtsi new file +7 -0
+       interrupt-parent = <&gic>;
+       #address-cells = <2>;
+       #size-cells = <2>;
+
+       cpus {
+               #address-cells = <2>;
+               #size-cells = <0>;

arch/arm64/boot/dts/nuvoton/ma35d1.dtsi line 29

Quoted 10 lines
arch/arm64/boot/dts/nuvoton/ma35d1.dtsi new file +10 -0
+               cpu-map {
+                       cluster0 {
+                               core0 {
+                                       cpu = <&cpu0>;
+                               };
+                               core1 {
+                                       cpu = <&cpu1>;
+                               };
+                       };
+               };

Line break between each nodes, here and below.

Quoted 80 lines
arch/arm64/boot/dts/nuvoton/ma35d1.dtsi new file +77 -1
+               cpu0: cpu@0 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a35";
+                       reg = <0x0 0x0>;
+                       enable-method = "psci";
+                       next-level-cache = <&L2_0>;
+               };
+               cpu1: cpu@1 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a35";
+                       reg = <0x0 0x1>;
+                       enable-method = "psci";
+                       next-level-cache = <&L2_0>;
+               };
+               L2_0: l2-cache0 {
+                       compatible = "cache";
+                       cache-level = <2>;
+               };
+       };
+
+       psci {
+               compatible = "arm,psci-0.2";
+               method = "smc";
+       };
+
+       timer {
+               compatible = "arm,armv8-timer";
+               interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(4) |
+                                         IRQ_TYPE_LEVEL_LOW)>,
+                            <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(4) |
+                                         IRQ_TYPE_LEVEL_LOW)>,
+                            <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(4) |
+                                         IRQ_TYPE_LEVEL_LOW)>,
+                            <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(4) |
+                                         IRQ_TYPE_LEVEL_LOW)>;
+               clock-frequency = <12000000>;
+       };
+
+       sys: system-controller@40460000 {
+               compatible = "nuvoton,ma35d1-sys", "syscon", "simple-mfd";
+               reg = <0x0 0x40460000 0x0 0x200>;
+       };
+
+       reset: reset-controller {
+               compatible = "nuvoton,ma35d1-reset";
+               nuvoton,ma35d1-sys = <&sys>;
+               #reset-cells = <1>;
+       };
+
+       clk: clock-controller@40460200 {
+               compatible = "nuvoton,ma35d1-clk";
+               reg = <0x00000000 0x40460200 0x0 0x100>;
+               #clock-cells = <1>;
+               assigned-clocks = <&clk DDRPLL>,
+                                 <&clk APLL>,
+                                 <&clk EPLL>,
+                                 <&clk VPLL>;
+               assigned-clock-rates = <266000000>,
+                                      <180000000>,
+                                      <500000000>,
+                                      <102000000>;
+               clock-pll-mode = <1>, <0>, <0>, <0>;
+       };
+
+       gic: interrupt-controller@50800000 {
+               compatible = "arm,gic-400";
+               #interrupt-cells = <3>;
+               interrupt-parent = <&gic>;
+               interrupt-controller;
+               reg = <0x0 0x50801000 0 0x1000>,
+                     <0x0 0x50802000 0 0x2000>,
+                     <0x0 0x50804000 0 0x2000>,
+                     <0x0 0x50806000 0 0x2000>;
+               interrupts = <GIC_PPI 9 (GIC_CPU_MASK_RAW(0x13) |
+                                        IRQ_TYPE_LEVEL_HIGH)>;
+       };
+};
--

2.17.1

Quoted 6 lines

________________________________
________________________________
The privileged confidential information contained in this email is intended for use only by the addressees as indicated by the original sender of this email. If you are not the addressee indicated in this email or are not responsible for delivery of the email to such a person, please kindly reply to the sender indicating this fact and delete all copies of it from your computer and network server immediately.

Your cooperation is highly appreciated...

Cooperation seems futile... :)

Best regards,
Krzysztof

author maintainer
#10 lore raw

Re: [PATCH 3/3] arm64: dts: nuvoton: Add initial support for MA35D1

Quoted 24 lines · Krzysztof Kozlowski
Quoted 23 lines · Jacky Huang

Add the initial device tree files for Nuvoton MA35D1 Soc.

---
  arch/arm64/boot/dts/Makefile               |   1 +
  arch/arm64/boot/dts/nuvoton/Makefile       |   2 +
  arch/arm64/boot/dts/nuvoton/ma35d1-evb.dts |  23 +++++
  arch/arm64/boot/dts/nuvoton/ma35d1.dtsi    | 106 +++++++++++++++++++++
  4 files changed, 132 insertions(+)

create mode 100644 arch/arm64/boot/dts/nuvoton/Makefile create mode 100644 arch/arm64/boot/dts/nuvoton/ma35d1-evb.dts create mode 100644 arch/arm64/boot/dts/nuvoton/ma35d1.dtsi

arch/arm64/boot/dts/Makefile +1 -0
index 639e01a4d855..28e01442094f 100644
@@ -30,3 +30,4 @@ subdir-y += synaptics
  subdir-y += ti
  subdir-y += toshiba
  subdir-y += xilinx
+subdir-y += nuvoton
arch/arm64/boot/dts/nuvoton/Makefile +0 -0
Quoted 8 lines

arch/arm64/boot/dts/nuvoton/Makefile line 2

Quoted 7 lines

new file mode 100644
index 000000000000..e1e0c466bf5e

arch/arm64/boot/dts/nuvoton/Makefile new file +2 -0
@@ -0,0 +1,2 @@
+# SPDX-License-Identifier: GPL-2.0
+dtb-$(CONFIG_ARCH_NUVOTON) += ma35d1-evb.dtb

ARCH_NUVOTON does not exist.

I would add the following to end of arch/arm64/Kconfig.platforms, and add the modification to this patch series.

config ARCH_MA35D1
    bool "Nuvoton MA35D1 SOC Family"
    select PINCTRL
    select PINCTRL_MA35D1
    select PM
    select GPIOLIB
    select SOC_BUS
    select VIDEOMODE_HELPERS
    select FB_MODE_HELPERS
    help
      This enables support for Nuvoton MA35D1 SOC Family.

Quoted 14 lines
Quoted 14 lines
arch/arm64/boot/dts/nuvoton/ma35d1-evb.dts new file +8 -0
new file mode 100644
index 000000000000..38e4f734da0f
@@ -0,0 +1,23 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Device Tree Source for MA35D1 Evaluation Board (EVB)
+ *
+ * Copyright (C) 2021 Nuvoton Technology Corp.
+ */
+
+/dts-v1/;
Quoted 8 lines

arch/arm64/boot/dts/nuvoton/ma35d1-evb.dts line 15

Quoted 7 lines
arch/arm64/boot/dts/nuvoton/ma35d1-evb.dts new file +7 -0
+#include "ma35d1.dtsi"
+
+/ {
+       model = "Nuvoton MA35D1-EVB";
+
+       chosen {
+               bootargs = "console=ttyS0,115200n8";

No bootargs. "chosen", please.

OK, I would modify it as:

chosen {
        stdout-path = "serial0:115200n8";
    };

Quoted 2 lines

arch/arm64/boot/dts/nuvoton/ma35d1-evb.dts line 16

Quoted 1 line
arch/arm64/boot/dts/nuvoton/ma35d1-evb.dts new file +1 -0
+       };

You need compatible and bindings.

I will add the compatible here
compatible = "nuvoton,ma35d1-evb", "nuvoton,ma35d1"

And, I should create a new binding file Documentation/devicetree/bindings/arm/nuvoton.yaml to this patch series. And the property would be:

properties:
  compatible:
    description: Nuvoton MA35D1-EVB
    items:
      - const: nuvoton,ma35d1-evb
      - const: nuvoton,ma35d1

Is it OK?

Quoted 18 lines
Quoted 18 lines
arch/arm64/boot/dts/nuvoton/ma35d1-evb.dts new file +7 -0
+
+       memory@80000000 {
+               device_type = "memory";
+               reg = <0x00000000 0x80000000 0 0x10000000>;
+       };
+};
+
arch/arm64/boot/dts/nuvoton/ma35d1.dtsi new file +5 -0
new file mode 100644
index 000000000000..27adac4975c3
@@ -0,0 +1,106 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2022 Nuvoton Technology Corp.
+ */
+
Quoted 8 lines

arch/arm64/boot/dts/nuvoton/ma35d1.dtsi line 12

Quoted 7 lines
arch/arm64/boot/dts/nuvoton/ma35d1.dtsi new file +7 -0
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/clock/nuvoton,ma35d1-clk.h>
+
+/ {
+       compatible = "nuvoton,ma35d1";

Please run checkpatch. This compatible looks undocumented.

I will create a new binding file Documentation/devicetree/bindings/arm/nuvoton.yaml to this patch series.

Quoted 17 lines
Quoted 7 lines
arch/arm64/boot/dts/nuvoton/ma35d1.dtsi new file +7 -0
+       interrupt-parent = <&gic>;
+       #address-cells = <2>;
+       #size-cells = <2>;
+
+       cpus {
+               #address-cells = <2>;
+               #size-cells = <0>;

arch/arm64/boot/dts/nuvoton/ma35d1.dtsi line 29

Quoted 10 lines
arch/arm64/boot/dts/nuvoton/ma35d1.dtsi new file +10 -0
+               cpu-map {
+                       cluster0 {
+                               core0 {
+                                       cpu = <&cpu0>;
+                               };
+                               core1 {
+                                       cpu = <&cpu1>;
+                               };
+                       };
+               };
Quoted 1 line

Line break between each nodes, here and below.

OK, I will fix it in the next version.

Quoted 85 lines
Quoted 84 lines
arch/arm64/boot/dts/nuvoton/ma35d1.dtsi new file +77 -1
+               cpu0: cpu@0 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a35";
+                       reg = <0x0 0x0>;
+                       enable-method = "psci";
+                       next-level-cache = <&L2_0>;
+               };
+               cpu1: cpu@1 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a35";
+                       reg = <0x0 0x1>;
+                       enable-method = "psci";
+                       next-level-cache = <&L2_0>;
+               };
+               L2_0: l2-cache0 {
+                       compatible = "cache";
+                       cache-level = <2>;
+               };
+       };
+
+       psci {
+               compatible = "arm,psci-0.2";
+               method = "smc";
+       };
+
+       timer {
+               compatible = "arm,armv8-timer";
+               interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(4) |
+                                         IRQ_TYPE_LEVEL_LOW)>,
+                            <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(4) |
+                                         IRQ_TYPE_LEVEL_LOW)>,
+                            <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(4) |
+                                         IRQ_TYPE_LEVEL_LOW)>,
+                            <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(4) |
+                                         IRQ_TYPE_LEVEL_LOW)>;
+               clock-frequency = <12000000>;
+       };
+
+       sys: system-controller@40460000 {
+               compatible = "nuvoton,ma35d1-sys", "syscon", "simple-mfd";
+               reg = <0x0 0x40460000 0x0 0x200>;
+       };
+
+       reset: reset-controller {
+               compatible = "nuvoton,ma35d1-reset";
+               nuvoton,ma35d1-sys = <&sys>;
+               #reset-cells = <1>;
+       };
+
+       clk: clock-controller@40460200 {
+               compatible = "nuvoton,ma35d1-clk";
+               reg = <0x00000000 0x40460200 0x0 0x100>;
+               #clock-cells = <1>;
+               assigned-clocks = <&clk DDRPLL>,
+                                 <&clk APLL>,
+                                 <&clk EPLL>,
+                                 <&clk VPLL>;
+               assigned-clock-rates = <266000000>,
+                                      <180000000>,
+                                      <500000000>,
+                                      <102000000>;
+               clock-pll-mode = <1>, <0>, <0>, <0>;
+       };
+
+       gic: interrupt-controller@50800000 {
+               compatible = "arm,gic-400";
+               #interrupt-cells = <3>;
+               interrupt-parent = <&gic>;
+               interrupt-controller;
+               reg = <0x0 0x50801000 0 0x1000>,
+                     <0x0 0x50802000 0 0x2000>,
+                     <0x0 0x50804000 0 0x2000>,
+                     <0x0 0x50806000 0 0x2000>;
+               interrupts = <GIC_PPI 9 (GIC_CPU_MASK_RAW(0x13) |
+                                        IRQ_TYPE_LEVEL_HIGH)>;
+       };
+};
--

2.17.1

________________________________
________________________________
The privileged confidential information contained in this email is intended for use only by the addressees as indicated by the original sender of this email. If you are not the addressee indicated in this email or are not responsible for delivery of the email to such a person, please kindly reply to the sender indicating this fact and delete all copies of it from your computer and network server immediately.

Quoted 5 lines
Quoted 1 line

Your cooperation is highly appreciated...

Cooperation seems futile... :)

Best regards,
Krzysztof

I am sorry. I have requested mail server manager to add exception rule. The unpleasant official declarations are removed.

Thanks for your review.

Sincerely,

Jacky

#11 lore raw

Re: [PATCH 3/3] arm64: dts: nuvoton: Add initial support for MA35D1

Quoted 19 lines · Jacky Huang
Quoted 10 lines
Quoted 10 lines
arch/arm64/boot/dts/Makefile +1 -0
index 639e01a4d855..28e01442094f 100644
@@ -30,3 +30,4 @@ subdir-y += synaptics
  subdir-y += ti
  subdir-y += toshiba
  subdir-y += xilinx
+subdir-y += nuvoton
arch/arm64/boot/dts/nuvoton/Makefile +0 -0
Quoted 8 lines

arch/arm64/boot/dts/nuvoton/Makefile line 2

Quoted 7 lines

new file mode 100644
index 000000000000..e1e0c466bf5e

arch/arm64/boot/dts/nuvoton/Makefile new file +2 -0
@@ -0,0 +1,2 @@
+# SPDX-License-Identifier: GPL-2.0
+dtb-$(CONFIG_ARCH_NUVOTON) += ma35d1-evb.dtb

ARCH_NUVOTON does not exist.

Quoted 1 line

I would add the following to end of arch/arm64/Kconfig.platforms,

Don't add things at the end of files but rather in respective place without messing the order.

Quoted 6 lines

and
add the
modification to this patch series.

config ARCH_MA35D1
    bool "Nuvoton MA35D1 SOC Family"

We do not add options for specific SoCs, but for entire families, so ARCH_NUVOTON is correct.

Quoted 59 lines

    select PINCTRL
    select PINCTRL_MA35D1
    select PM
    select GPIOLIB
    select SOC_BUS
    select VIDEOMODE_HELPERS
    select FB_MODE_HELPERS
    help
      This enables support for Nuvoton MA35D1 SOC Family.

Quoted 14 lines
Quoted 14 lines
arch/arm64/boot/dts/nuvoton/ma35d1-evb.dts new file +8 -0
new file mode 100644
index 000000000000..38e4f734da0f
@@ -0,0 +1,23 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Device Tree Source for MA35D1 Evaluation Board (EVB)
+ *
+ * Copyright (C) 2021 Nuvoton Technology Corp.
+ */
+
+/dts-v1/;
Quoted 8 lines

arch/arm64/boot/dts/nuvoton/ma35d1-evb.dts line 15

Quoted 7 lines
arch/arm64/boot/dts/nuvoton/ma35d1-evb.dts new file +7 -0
+#include "ma35d1.dtsi"
+
+/ {
+       model = "Nuvoton MA35D1-EVB";
+
+       chosen {
+               bootargs = "console=ttyS0,115200n8";

No bootargs. "chosen", please.

OK, I would modify it as:

chosen {
        stdout-path = "serial0:115200n8";
    };

Quoted 2 lines

arch/arm64/boot/dts/nuvoton/ma35d1-evb.dts line 16

Quoted 1 line
arch/arm64/boot/dts/nuvoton/ma35d1-evb.dts new file +1 -0
+       };

You need compatible and bindings.

I will add the compatible here
compatible = "nuvoton,ma35d1-evb", "nuvoton,ma35d1"

And, I should create a new binding file Documentation/devicetree/bindings/arm/nuvoton.yaml to this patch series. And the property would be:

properties:
  compatible:
    description: Nuvoton MA35D1-EVB
    items:
      - const: nuvoton,ma35d1-evb
      - const: nuvoton,ma35d1

Quoted 1 line

Is it OK?

Yes

Best regards,
Krzysztof

author maintainer
#12 lore raw

Re: [PATCH 3/3] arm64: dts: nuvoton: Add initial support for MA35D1

Quoted 19 lines · Krzysztof Kozlowski
Quoted 18 lines · Jacky Huang
Quoted 18 lines
Quoted 15 lines
arch/arm64/boot/dts/Makefile +1 -0
index 639e01a4d855..28e01442094f 100644
@@ -30,3 +30,4 @@ subdir-y += synaptics
   subdir-y += ti
   subdir-y += toshiba
   subdir-y += xilinx
+subdir-y += nuvoton
arch/arm64/boot/dts/nuvoton/Makefile new file +0 -0
new file mode 100644
index 000000000000..e1e0c466bf5e

arch/arm64/boot/dts/nuvoton/Makefile line 2

Quoted 2 lines
arch/arm64/boot/dts/nuvoton/Makefile new file +2 -0
@@ -0,0 +1,2 @@
+# SPDX-License-Identifier: GPL-2.0
+dtb-$(CONFIG_ARCH_NUVOTON) += ma35d1-evb.dtb

ARCH_NUVOTON does not exist.

Quoted 3 lines
Quoted 1 line

I would add the following to end of arch/arm64/Kconfig.platforms,

Don't add things at the end of files but rather in respective place without messing the order.

OK, I will put it to the right place in alphanumeric order. It should be between ARCH_MXC and ARCH_QCOM.

Quoted 9 lines
Quoted 7 lines

and
add the
modification to this patch series.

config ARCH_MA35D1
    bool "Nuvoton MA35D1 SOC Family"

We do not add options for specific SoCs, but for entire families, so ARCH_NUVOTON is correct.

Yes, I would like to modify it as the following:

config ARCH_NUVOTON
    bool "Nuvoton SoC Family"
    select PINCTRL
    select PINCTRL_MA35D1
    select PM
    select GPIOLIB
    select SOC_BUS
    help
      This enables support for Nuvoton MA35D1 ARMv8 SoC.

(Currently, we have MA35D1 only in the support list for arm64 SoC.).

Quoted 57 lines
Quoted 57 lines

    select PINCTRL
    select PINCTRL_MA35D1
    select PM
    select GPIOLIB
    select SOC_BUS
    select VIDEOMODE_HELPERS
    select FB_MODE_HELPERS
    help
      This enables support for Nuvoton MA35D1 SOC Family.

Quoted 14 lines
Quoted 14 lines
arch/arm64/boot/dts/nuvoton/ma35d1-evb.dts new file +8 -0
new file mode 100644
index 000000000000..38e4f734da0f
@@ -0,0 +1,23 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Device Tree Source for MA35D1 Evaluation Board (EVB)
+ *
+ * Copyright (C) 2021 Nuvoton Technology Corp.
+ */
+
+/dts-v1/;
Quoted 8 lines

arch/arm64/boot/dts/nuvoton/ma35d1-evb.dts line 15

Quoted 7 lines
arch/arm64/boot/dts/nuvoton/ma35d1-evb.dts new file +7 -0
+#include "ma35d1.dtsi"
+
+/ {
+       model = "Nuvoton MA35D1-EVB";
+
+       chosen {
+               bootargs = "console=ttyS0,115200n8";

No bootargs. "chosen", please.

OK, I would modify it as:

chosen {
        stdout-path = "serial0:115200n8";
    };

Quoted 2 lines

arch/arm64/boot/dts/nuvoton/ma35d1-evb.dts line 16

Quoted 1 line
arch/arm64/boot/dts/nuvoton/ma35d1-evb.dts new file +1 -0
+       };

You need compatible and bindings.

I will add the compatible here
compatible = "nuvoton,ma35d1-evb", "nuvoton,ma35d1"

And, I should create a new binding file Documentation/devicetree/bindings/arm/nuvoton.yaml to this patch series. And the property would be:

properties:
  compatible:
    description: Nuvoton MA35D1-EVB
    items:
      - const: nuvoton,ma35d1-evb
      - const: nuvoton,ma35d1

Quoted 7 lines
Quoted 1 line

Is it OK?

Yes

Best regards,
Krzysztof

Thanks for your review.

Sincerely,
Jacky

maintainer
#13 lore raw

Re: [PATCH 3/3] arm64: dts: nuvoton: Add initial support for MA35D1

Quoted 19 lines · Jacky Huang
Quoted 5 lines · Krzysztof Kozlowski
Quoted 2 lines · Jacky Huang

config ARCH_MA35D1
bool "Nuvoton MA35D1 SOC Family"

We do not add options for specific SoCs, but for entire families, so ARCH_NUVOTON is correct.

Yes, I would like to modify it as the following:

config ARCH_NUVOTON
bool "Nuvoton SoC Family"
select PINCTRL
select PINCTRL_MA35D1
select PM
select GPIOLIB
select SOC_BUS
help
This enables support for Nuvoton MA35D1 ARMv8 SoC.

Quoted 1 line

(Currently, we have MA35D1 only in the support list for arm64 SoC.).

You could reword this to "This enables support for Nuvoton ARMv8 SoCs such as the MA35D1", to prevent this from getting stale, or repeatedly updated when future SoCs are added.

Another change you can consider is to remove the 'select PINCTRL_MA35D1' here and instead change the pinctrl Kconfig entry to

config PINCTRL_MA35D1

           bool "..."
           depends on ARCH_NUVOTON || COMPILE_TEST
           default ARCH_NUVOTON

That way you get it default-enabled when ARCH_NUVOTON is turned on, or disabled in configurations without ARCH_NUVOTON, but can make a more fine-grained selection for a particular SoC if you get more than one such driver in the future.

Arnd

author maintainer
#14 lore raw

Re: [PATCH 3/3] arm64: dts: nuvoton: Add initial support for MA35D1

Quoted 32 lines · Arnd Bergmann
Quoted 18 lines · Jacky Huang
Quoted 5 lines · Krzysztof Kozlowski
Quoted 2 lines · Jacky Huang

config ARCH_MA35D1
bool "Nuvoton MA35D1 SOC Family"

We do not add options for specific SoCs, but for entire families, so ARCH_NUVOTON is correct.

Yes, I would like to modify it as the following:

config ARCH_NUVOTON
bool "Nuvoton SoC Family"
select PINCTRL
select PINCTRL_MA35D1
select PM
select GPIOLIB
select SOC_BUS
help
This enables support for Nuvoton MA35D1 ARMv8 SoC.

Quoted 1 line

(Currently, we have MA35D1 only in the support list for arm64 SoC.).

You could reword this to "This enables support for Nuvoton ARMv8 SoCs such as the MA35D1", to prevent this from getting stale, or repeatedly updated when future SoCs are added.

Another change you can consider is to remove the 'select PINCTRL_MA35D1' here and instead change the pinctrl Kconfig entry to

config PINCTRL_MA35D1

            bool "..."
            depends on ARCH_NUVOTON || COMPILE_TEST
            default ARCH_NUVOTON
Quoted 6 lines

That way you get it default-enabled when ARCH_NUVOTON is turned on, or disabled in configurations without ARCH_NUVOTON, but can make a more fine-grained selection for a particular SoC if you get more than one such driver in the future.

Arnd

Yes, it looks better.
So, I will modify it as:

config ARCH_NUVOTON
    bool "Nuvoton SoC Family"
    select PINCTRL
    select PM
    select GPIOLIB
    select SOC_BUS
    help
      This enables support for Nuvoton MA35D1 ARMv8 SoC such as MA35D1.

And move PINCTRL_MA35D1 to pinctrl Kconfig when we submit the pictrl driver.

Thanks you.

Jacky

maintainer
#15 lore raw

Re: [PATCH 3/3] arm64: dts: nuvoton: Add initial support for MA35D1

In reply to Jacky Huang
Quoted 7 lines · Jacky Huang
Quoted 1 line · Krzysztof Kozlowski

On 07/03/2022 10:19, Jacky Huang wrote:

I would add the following to end of arch/arm64/Kconfig.platforms, and add the
modification to this patch series.

Quoted 11 lines

config ARCH_MA35D1
bool "Nuvoton MA35D1 SOC Family"
select PINCTRL
select PINCTRL_MA35D1
select PM
select GPIOLIB
select SOC_BUS
select VIDEOMODE_HELPERS
select FB_MODE_HELPERS
help
This enables support for Nuvoton MA35D1 SOC Family.

Selecting SOC_BUS and the gpio/pinctrl stuff is ok, but please don't select the video helpers from the platform config, those should not be essential for building a kernel.

Arnd

author maintainer
#16 lore raw

Re: [PATCH 3/3] arm64: dts: nuvoton: Add initial support for MA35D1

Quoted 18 lines · Arnd Bergmann
Quoted 6 lines · Jacky Huang
Quoted 1 line · Krzysztof Kozlowski

On 07/03/2022 10:19, Jacky Huang wrote:

I would add the following to end of arch/arm64/Kconfig.platforms, and add the
modification to this patch series.

Quoted 11 lines

config ARCH_MA35D1
bool "Nuvoton MA35D1 SOC Family"
select PINCTRL
select PINCTRL_MA35D1
select PM
select GPIOLIB
select SOC_BUS
select VIDEOMODE_HELPERS
select FB_MODE_HELPERS
help
This enables support for Nuvoton MA35D1 SOC Family.

Quoted 5 lines

Selecting SOC_BUS and the gpio/pinctrl stuff is ok, but please don't select the video helpers from the platform config, those should not be essential for building a kernel.

Arnd

Yes, I will remove  VIDEOMODE_HELPERS and FB_MODE_HELPERS.

Best Regards,
Jacky