Skip to contentSkip to conversation

Add cpuidle driver for Sunplus SP7021

PATCH Superseded Edwin chiu 3 participants 9 messages Nov 8, 2021 – Dec 3, 2021

Subsystems (2)

v1 of 5 Superseded Latest is v5 →

lore
Share & tools
lore

Edwin chiu

author
#0 lore raw

cover Add cpuidle driver for Sunplus SP7021

This is a patch series for cpuidle driver for Sunplus SP7021 SoC.

Sunplus SP7021 is an ARM Cortex A7 (4 cores) based SoC. It integrates many peripherals (ex: UART, I2C, SPI, SDIO, eMMC, USB, SD card and etc.) into a single chip. It is designed for industrial control.

Refer to:
https://sunplus-tibbo.atlassian.net/wiki/spaces/doc/overview
https://tibbo.com/store/plus1.html

Edwin chiu (2):
dt-bingings:arm:sunplus:add sp7021 compatible string to
sunplus,idle-state.yaml
cpuidle:sunplus:create cpuidle driver for sunplus sp7021

 .../bindings/arm/sunplus/sunplus,idle-state.yaml   |  55 ++++++
 MAINTAINERS                                        |   9 +
 drivers/cpuidle/Kconfig.arm                        |   7 +
 drivers/cpuidle/Makefile                           |   1 +
 drivers/cpuidle/cpuidle-sunplus.c                  | 185 +++++++++++++++++++++
 include/linux/platform_data/cpuidle-sunplus.h      |  14 ++
 6 files changed, 271 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/arm/sunplus/sunplus,idle-state.yaml
 create mode 100644 drivers/cpuidle/cpuidle-sunplus.c
 create mode 100644 include/linux/platform_data/cpuidle-sunplus.h
Signature · 1 line
2.7.4
author
#1 lore raw

PATCH 1/2 dt-bingings:arm:sunplus:add sp7021 compatible string to sunplus,idle-state.yaml

Add the compatible string for cpuidle state on sp7021

---
 .../bindings/arm/sunplus/sunplus,idle-state.yaml   | 55 ++++++++++++++++++++++
 MAINTAINERS                                        |  6 +++
 2 files changed, 61 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/arm/sunplus/sunplus,idle-state.yaml
Documentation/devicetree/bindings/arm/sunplus/sunplus,idle-state.yaml new file +55 -0
new file mode 100644
index 0000000..649e953
@@ -0,0 +1,55 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+# Copyright (C) Sunplus Co., Ltd. 2021
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/arm/sunplus/sunplus,idle-state.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Sunplus cpuidle state
+
+maintainers:
+  - edwin.chiu <[email protected]>
+
+description: |
+  Sunplus SOC cpuidle state
+
+properties:
+  compatible:
+    const: arm,idle-state
+
+  entry-latency-us:
+    description:
+      Worst case latency in microseconds required to enter the idle state.
+
+  exit-latency-us:
+    description:
+      Worst case latency in microseconds required to exit the idle state.
+      The exit-latency-us duration may be guaranteed only after
+      entry-latency-us has passed.
+
+  min-residency-us:
+    description:
+      Minimum residency duration in microseconds, inclusive of preparation
+      and entry, for this idle state to be considered worthwhile energy wise
+      (refer to section 2 of this document for a complete description).
+
+required:
+  - compatible
+  - entry-latency-us
+  - exit-latency-us
+  - min-residency-us
+
+additionalProperties: true
+
+examples:
+  - |
+    idle-states {
+      CLUSTER_SLEEP_BIG: cluster-sleep-big {
+        compatible = "arm,idle-state";
+        entry-latency-us = <8000>;
+        exit-latency-us = <700>;
+        min-residency-us = <9000>;
+      };
+    };
+
+...
MAINTAINERS +6 -0
index 3b79fd4..52f17ec 100644
@@ -17945,6 +17945,12 @@ L:	[email protected]
 S:	Maintained
 F:	drivers/net/ethernet/dlink/sundance.c
 
+SUNPLUS CPUIDLE DRIVER
+M:	Edwin Chiu <[email protected]>
+S:	Maintained
+F:	Documentation/devicetree/bindings/arm/sunplus/sunplus,idle-state.yaml
+
+
 SUPERH
 M:	Yoshinori Sato <[email protected]>
 M:	Rich Felker <[email protected]>
Signature · 1 line
2.7.4
maintainer
#2 lore raw

Re: [PATCH 1/2] dt-bingings:arm:sunplus:add sp7021 compatible string to sunplus,idle-state.yaml

Quoted 9 lines · Edwin chiu

Add the compatible string for cpuidle state on sp7021

---
 .../bindings/arm/sunplus/sunplus,idle-state.yaml   | 55 ++++++++++++++++++++++
 MAINTAINERS                                        |  6 +++
 2 files changed, 61 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/arm/sunplus/sunplus,idle-state.yaml

Running 'make dtbs_check' with the schema in this patch gives the following warnings. Consider if they are expected or the schema is incorrect. These may not be new warnings.

Note that it is not yet a requirement to have 0 warnings for dtbs_check. This will change in the future.

Full log is available here: https://patchwork.ozlabs.org/patch/1552228

spc: compatible:0: 'arm,idle-state' was expected

	arch/arm/boot/dts/qcom-apq8064-asus-nexus7-flo.dt.yaml
	arch/arm/boot/dts/qcom-apq8064-cm-qs600.dt.yaml
	arch/arm/boot/dts/qcom-apq8064-ifc6410.dt.yaml
	arch/arm/boot/dts/qcom-apq8064-sony-xperia-yuga.dt.yaml
	arch/arm/boot/dts/qcom-apq8074-dragonboard.dt.yaml
	arch/arm/boot/dts/qcom-apq8084-ifc6540.dt.yaml
	arch/arm/boot/dts/qcom-apq8084-mtp.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-fairphone-fp2.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-samsung-klte.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-sony-xperia-amami.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-sony-xperia-castor.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-sony-xperia-honami.dt.yaml

spc: compatible: Additional items are not allowed ('arm,idle-state' was unexpected)

	arch/arm/boot/dts/qcom-apq8064-asus-nexus7-flo.dt.yaml
	arch/arm/boot/dts/qcom-apq8064-cm-qs600.dt.yaml
	arch/arm/boot/dts/qcom-apq8064-ifc6410.dt.yaml
	arch/arm/boot/dts/qcom-apq8064-sony-xperia-yuga.dt.yaml
	arch/arm/boot/dts/qcom-apq8074-dragonboard.dt.yaml
	arch/arm/boot/dts/qcom-apq8084-ifc6540.dt.yaml
	arch/arm/boot/dts/qcom-apq8084-mtp.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-fairphone-fp2.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-samsung-klte.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-sony-xperia-amami.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-sony-xperia-castor.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-sony-xperia-honami.dt.yaml

spc: compatible: ['qcom,idle-state-spc', 'arm,idle-state'] is too long

	arch/arm/boot/dts/qcom-apq8064-asus-nexus7-flo.dt.yaml
	arch/arm/boot/dts/qcom-apq8064-cm-qs600.dt.yaml
	arch/arm/boot/dts/qcom-apq8064-ifc6410.dt.yaml
	arch/arm/boot/dts/qcom-apq8064-sony-xperia-yuga.dt.yaml
	arch/arm/boot/dts/qcom-apq8074-dragonboard.dt.yaml
	arch/arm/boot/dts/qcom-apq8084-ifc6540.dt.yaml
	arch/arm/boot/dts/qcom-apq8084-mtp.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-fairphone-fp2.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-samsung-klte.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-sony-xperia-amami.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-sony-xperia-castor.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-sony-xperia-honami.dt.yaml
#3 lore raw

RE: [PATCH 1/2] dt-bingings:arm:sunplus:add sp7021 compatible string to sunplus,idle-state.yaml

Hi Rob:

Look into the full log, it show you check 3 programs
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Context Check Description
robh/checkpatch warning total: 0 errors, 1 warnings, 67 lines checked
robh/dt-meta-schema success
robh/dtbs-check fail build log
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

1) The checkpatch warning is WARNING: From:/Signed-off-by: email address mismatch: 'From: Edwin chiu <[email protected]>' != 'Signed-off-by: Edwin chiu <[email protected]>' ==> I want explain to you that <[email protected]> is my email in the company, but it disagree operate by "git send-email".
So I used <[email protected]> in my linux system to operate with "git send-email".
Actually I checkpatch in my side was 0 error 0 warning.

2) Regarding to dtbs-check issue, your list warnings related to others company's yaml file, it not my yaml file case. What is the purpose you want? Or what should I do?

3) Execute=>make dtbs_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/arm/sunplus/sunplus,idle-state.yaml There are many config select items…..I don't know how to select them.
(I execute "make config " and "make all" were pass)
Can you teach me how to do "make dtbs_check"?

邱垂峰 EdwinChiu
智能運算專案
T: +886-3-5786005 ext.2590
[email protected]
300 新竹科學園區創新一路19號

-----Original Message-----
From: Rob Herring <[email protected]>
Sent: Monday, November 8, 2021 9:03 PM
To: Edwin chiu <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Edwin Chiu 邱垂峰 <[email protected]>
Subject: Re: [PATCH 1/2] dt-bingings:arm:sunplus:add sp7021 compatible string to sunplus,idle-state.yaml

Quoted 10 lines · Edwin chiu

Add the compatible string for cpuidle state on sp7021

---
 .../bindings/arm/sunplus/sunplus,idle-state.yaml   | 55 ++++++++++++++++++++++
 MAINTAINERS                                        |  6 +++
 2 files changed, 61 insertions(+)
 create mode 100644 

Documentation/devicetree/bindings/arm/sunplus/sunplus,idle-state.yaml

Running 'make dtbs_check' with the schema in this patch gives the following warnings. Consider if they are expected or the schema is incorrect. These may not be new warnings.

Note that it is not yet a requirement to have 0 warnings for dtbs_check. This will change in the future.

Full log is available here: https://patchwork.ozlabs.org/patch/1552228

spc: compatible:0: 'arm,idle-state' was expected

	arch/arm/boot/dts/qcom-apq8064-asus-nexus7-flo.dt.yaml
	arch/arm/boot/dts/qcom-apq8064-cm-qs600.dt.yaml
	arch/arm/boot/dts/qcom-apq8064-ifc6410.dt.yaml
	arch/arm/boot/dts/qcom-apq8064-sony-xperia-yuga.dt.yaml
	arch/arm/boot/dts/qcom-apq8074-dragonboard.dt.yaml
	arch/arm/boot/dts/qcom-apq8084-ifc6540.dt.yaml
	arch/arm/boot/dts/qcom-apq8084-mtp.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-fairphone-fp2.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-samsung-klte.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-sony-xperia-amami.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-sony-xperia-castor.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-sony-xperia-honami.dt.yaml

spc: compatible: Additional items are not allowed ('arm,idle-state' was unexpected)

	arch/arm/boot/dts/qcom-apq8064-asus-nexus7-flo.dt.yaml
	arch/arm/boot/dts/qcom-apq8064-cm-qs600.dt.yaml
	arch/arm/boot/dts/qcom-apq8064-ifc6410.dt.yaml
	arch/arm/boot/dts/qcom-apq8064-sony-xperia-yuga.dt.yaml
	arch/arm/boot/dts/qcom-apq8074-dragonboard.dt.yaml
	arch/arm/boot/dts/qcom-apq8084-ifc6540.dt.yaml
	arch/arm/boot/dts/qcom-apq8084-mtp.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-fairphone-fp2.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-samsung-klte.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-sony-xperia-amami.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-sony-xperia-castor.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-sony-xperia-honami.dt.yaml

spc: compatible: ['qcom,idle-state-spc', 'arm,idle-state'] is too long

	arch/arm/boot/dts/qcom-apq8064-asus-nexus7-flo.dt.yaml
	arch/arm/boot/dts/qcom-apq8064-cm-qs600.dt.yaml
	arch/arm/boot/dts/qcom-apq8064-ifc6410.dt.yaml
	arch/arm/boot/dts/qcom-apq8064-sony-xperia-yuga.dt.yaml
	arch/arm/boot/dts/qcom-apq8074-dragonboard.dt.yaml
	arch/arm/boot/dts/qcom-apq8084-ifc6540.dt.yaml
	arch/arm/boot/dts/qcom-apq8084-mtp.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-fairphone-fp2.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-samsung-klte.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-sony-xperia-amami.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-sony-xperia-castor.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-sony-xperia-honami.dt.yaml
maintainer
#4 lore raw

Re: [PATCH 1/2] dt-bingings:arm:sunplus:add sp7021 compatible string to sunplus,idle-state.yaml

Quoted 10 lines · Edwin Chiu 邱垂峰

Hi Rob:

Look into the full log, it show you check 3 programs
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Context Check Description
robh/checkpatch warning total: 0 errors, 1 warnings, 67 lines checked
robh/dt-meta-schema success
robh/dtbs-check fail build log
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Quoted 4 lines

1) The checkpatch warning is WARNING: From:/Signed-off-by: email address mismatch: 'From: Edwin chiu <[email protected]>' != 'Signed-off-by: Edwin chiu <[email protected]>' ==> I want explain to you that <[email protected]> is my email in the company, but it disagree operate by "git send-email".
So I used <[email protected]> in my linux system to operate with "git send-email".
Actually I checkpatch in my side was 0 error 0 warning.

The email used to send and the author emails are independent in git. There should be a 'From:' line in the resulting patch when the sender and author don't match.

Maybe you need to set sendemail.from config option to your corp email.

Quoted 3 lines

2) Regarding to dtbs-check issue, your list warnings related to others company's yaml file, it not my yaml file case. What is the purpose you want? Or what should I do?

You aren't adding anything custom, so why are you even adding the schema? arm/idle-states.yaml should be enough.

Quoted 5 lines

3) Execute=>make dtbs_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/arm/sunplus/sunplus,idle-state.yaml There are many config select items…..I don't know how to select them.
(I execute "make config " and "make all" were pass)
Can you teach me how to do "make dtbs_check"?

Did you read Documentation/devicetree/bindings/writing-schema.rst?

To check all dts files (for an arch) and run the validation, do:

make allmodconfig
make dtbs_check

Rob

Quoted 79 lines

邱垂峰 EdwinChiu
智能運算專案
T: +886-3-5786005 ext.2590
[email protected]
300 新竹科學園區創新一路19號

-----Original Message-----
From: Rob Herring <[email protected]>
Sent: Monday, November 8, 2021 9:03 PM
To: Edwin chiu <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Edwin Chiu 邱垂峰 <[email protected]>
Subject: Re: [PATCH 1/2] dt-bingings:arm:sunplus:add sp7021 compatible string to sunplus,idle-state.yaml

Quoted 10 lines · Edwin chiu

Add the compatible string for cpuidle state on sp7021

---
 .../bindings/arm/sunplus/sunplus,idle-state.yaml   | 55 ++++++++++++++++++++++
 MAINTAINERS                                        |  6 +++
 2 files changed, 61 insertions(+)
 create mode 100644 

Documentation/devicetree/bindings/arm/sunplus/sunplus,idle-state.yaml

Running 'make dtbs_check' with the schema in this patch gives the following warnings. Consider if they are expected or the schema is incorrect. These may not be new warnings.

Note that it is not yet a requirement to have 0 warnings for dtbs_check. This will change in the future.

Full log is available here: https://patchwork.ozlabs.org/patch/1552228

spc: compatible:0: 'arm,idle-state' was expected

	arch/arm/boot/dts/qcom-apq8064-asus-nexus7-flo.dt.yaml
	arch/arm/boot/dts/qcom-apq8064-cm-qs600.dt.yaml
	arch/arm/boot/dts/qcom-apq8064-ifc6410.dt.yaml
	arch/arm/boot/dts/qcom-apq8064-sony-xperia-yuga.dt.yaml
	arch/arm/boot/dts/qcom-apq8074-dragonboard.dt.yaml
	arch/arm/boot/dts/qcom-apq8084-ifc6540.dt.yaml
	arch/arm/boot/dts/qcom-apq8084-mtp.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-fairphone-fp2.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-samsung-klte.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-sony-xperia-amami.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-sony-xperia-castor.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-sony-xperia-honami.dt.yaml

spc: compatible: Additional items are not allowed ('arm,idle-state' was unexpected)

	arch/arm/boot/dts/qcom-apq8064-asus-nexus7-flo.dt.yaml
	arch/arm/boot/dts/qcom-apq8064-cm-qs600.dt.yaml
	arch/arm/boot/dts/qcom-apq8064-ifc6410.dt.yaml
	arch/arm/boot/dts/qcom-apq8064-sony-xperia-yuga.dt.yaml
	arch/arm/boot/dts/qcom-apq8074-dragonboard.dt.yaml
	arch/arm/boot/dts/qcom-apq8084-ifc6540.dt.yaml
	arch/arm/boot/dts/qcom-apq8084-mtp.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-fairphone-fp2.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-samsung-klte.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-sony-xperia-amami.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-sony-xperia-castor.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-sony-xperia-honami.dt.yaml

spc: compatible: ['qcom,idle-state-spc', 'arm,idle-state'] is too long

	arch/arm/boot/dts/qcom-apq8064-asus-nexus7-flo.dt.yaml
	arch/arm/boot/dts/qcom-apq8064-cm-qs600.dt.yaml
	arch/arm/boot/dts/qcom-apq8064-ifc6410.dt.yaml
	arch/arm/boot/dts/qcom-apq8064-sony-xperia-yuga.dt.yaml
	arch/arm/boot/dts/qcom-apq8074-dragonboard.dt.yaml
	arch/arm/boot/dts/qcom-apq8084-ifc6540.dt.yaml
	arch/arm/boot/dts/qcom-apq8084-mtp.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-fairphone-fp2.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-samsung-klte.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-sony-xperia-amami.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-sony-xperia-castor.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-sony-xperia-honami.dt.yaml
#5 lore raw

RE: [PATCH 1/2] dt-bingings:arm:sunplus:add sp7021 compatible string to sunplus,idle-state.yaml

Hi Rob:

Thanks your response.
Reply your question as below:

Quoted 12 lines
Quoted 1 line

1) The checkpatch warning is WARNING: From:/Signed-off-by: email address mismatch: 'From: Edwin

chiu <[email protected]>' != 'Signed-off-by: Edwin chiu <[email protected]>'

Quoted 1 line

==> I want explain to you that <[email protected]> is my email in the company, but it disagree

operate by "git send-email".

Quoted 2 lines

So I used <[email protected]> in my linux system to operate with "git send-email".
Actually I checkpatch in my side was 0 error 0 warning.

The email used to send and the author emails are independent in git.
There should be a 'From:' line in the resulting patch when the sender and author don't match.

Maybe you need to set sendemail.from config option to your corp email.

==> Please understanding it is our company secure policy.
It disagree operate by "git send-email".
But I am pretty sure I can receive email on both [email protected] and [email protected] .

Quoted 8 lines
Quoted 2 lines

2) Regarding to dtbs-check issue, your list warnings related to others company's yaml file, it not my

yaml file case.

Quoted 1 line

What is the purpose you want? Or what should I do?

You aren't adding anything custom, so why are you even adding the schema? arm/idle-states.yaml should be enough.

===> Yes, I want to apply arm/idle-state structure to my idle function.
I thought every function submit, all need edit yaml file together. Do you mean I can submit cpuidle-sunplus.c without my sunplus,idle-state.yaml ?

On the other hand, I confirm my yaml file can pass dt_binding_check and dtbs_check as below:

edwinchiu@scdiu3:~/code/code1/linux/kernel$ make dt_binding_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/arm/sunplus/sunplus,idle-state.yaml
  DTEX    Documentation/devicetree/bindings/arm/sunplus/sunplus,idle-state.example.dts
  DTC     Documentation/devicetree/bindings/arm/sunplus/sunplus,idle-state.example.dt.yaml
  CHECK   Documentation/devicetree/bindings/arm/sunplus/sunplus,idle-state.example.dt.yaml
edwinchiu@scdiu3:~/code/code1/linux/kernel$
edwinchiu@scdiu3:~/code/code1/linux/kernel$ export ARCH=arm
edwinchiu@scdiu3:~/code/code1/linux/kernel$ echo $ARCH
arm
edwinchiu@scdiu3:~/code/code1/linux/kernel$ make dtbs_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/arm/sunplus/sunplus,idle-state.yaml
  SYNC    include/config/auto.conf.cmd
  SCHEMA  Documentation/devicetree/bindings/processed-schema.json
  UPD     include/config/kernel.release
  DTC     arch/arm/boot/dts/sp7021-bpi-f2p.dtb
  DTC     arch/arm/boot/dts/sp7021-bpi-f2s.dtb
  DTC     arch/arm/boot/dts/sp7021-demov2.dtb
  DTC     arch/arm/boot/dts/sp7021-demov3.dtb
  DTC     arch/arm/boot/dts/sp7021-ev.dtb
  DTC     arch/arm/boot/dts/sp7021-ev-ttl.dtb
  DTC     arch/arm/boot/dts/sp7021-ltpp3g2revD.dtb
  DTC     arch/arm/boot/dts/sp7021-ltpp3g2-sunplus.dtb
  DTC     arch/arm/boot/dts/sp7021-bpi-f2p.dt.yaml
  CHECK   arch/arm/boot/dts/sp7021-bpi-f2p.dt.yaml
  DTC     arch/arm/boot/dts/sp7021-bpi-f2s.dt.yaml
  CHECK   arch/arm/boot/dts/sp7021-bpi-f2s.dt.yaml
  DTC     arch/arm/boot/dts/sp7021-demov2.dt.yaml
  CHECK   arch/arm/boot/dts/sp7021-demov2.dt.yaml
  DTC     arch/arm/boot/dts/sp7021-demov3.dt.yaml
  CHECK   arch/arm/boot/dts/sp7021-demov3.dt.yaml
  DTC     arch/arm/boot/dts/sp7021-ev.dt.yaml
  CHECK   arch/arm/boot/dts/sp7021-ev.dt.yaml
  DTC     arch/arm/boot/dts/sp7021-ev-ttl.dt.yaml
  CHECK   arch/arm/boot/dts/sp7021-ev-ttl.dt.yaml
  DTC     arch/arm/boot/dts/sp7021-ltpp3g2revD.dt.yaml
  CHECK   arch/arm/boot/dts/sp7021-ltpp3g2revD.dt.yaml
  DTC     arch/arm/boot/dts/sp7021-ltpp3g2-sunplus.dt.yaml
  CHECK   arch/arm/boot/dts/sp7021-ltpp3g2-sunplus.dt.yaml
edwinchiu@scdiu3:~/code/code1/linux/kernel$

邱垂峰 EdwinChiu
智能運算專案
T: +886-3-5786005 ext.2590
[email protected]
300 新竹科學園區創新一路19號

Quoted 142 lines

-----Original Message-----
From: Rob Herring <[email protected]>
Sent: Saturday, November 13, 2021 6:59 AM
To: Edwin Chiu 邱垂峰 <[email protected]>
Cc: Edwin chiu <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Subject: Re: [PATCH 1/2] dt-bingings:arm:sunplus:add sp7021 compatible string to sunplus,idle-state.yaml

Quoted 11 lines · Edwin Chiu 邱垂峰

Hi Rob:

Look into the full log, it show you check 3 programs
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Context Check Description
robh/checkpatch warning total: 0 errors, 1 warnings, 67 lines checked
robh/dt-meta-schema success
robh/dtbs-check fail build log
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

1) The checkpatch warning is WARNING: From:/Signed-off-by: email address mismatch: 'From: Edwin

chiu <[email protected]>' != 'Signed-off-by: Edwin chiu <[email protected]>'

Quoted 1 line

==> I want explain to you that <[email protected]> is my email in the company, but it disagree

operate by "git send-email".

Quoted 2 lines

So I used <[email protected]> in my linux system to operate with "git send-email".
Actually I checkpatch in my side was 0 error 0 warning.

The email used to send and the author emails are independent in git.
There should be a 'From:' line in the resulting patch when the sender and author don't match.

Maybe you need to set sendemail.from config option to your corp email.

Quoted 2 lines

2) Regarding to dtbs-check issue, your list warnings related to others company's yaml file, it not my

yaml file case.

Quoted 1 line

What is the purpose you want? Or what should I do?

You aren't adding anything custom, so why are you even adding the schema? arm/idle-states.yaml should be enough.

Quoted 7 lines

3) Execute=>make dtbs_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/arm/sunplus/sunplus, idle-state.yaml There are many config select items…..I don't know how to select them.
(I execute "make config " and "make all" were pass) Can you teach me how to do "make dtbs_check"?

Did you read Documentation/devicetree/bindings/writing-schema.rst?

To check all dts files (for an arch) and run the validation, do:

make allmodconfig
make dtbs_check

Rob

Quoted 31 lines

邱垂峰 EdwinChiu
智能運算專案
T: +886-3-5786005 ext.2590
[email protected]
300 新竹科學園區創新一路19號

-----Original Message-----
From: Rob Herring <[email protected]>
Sent: Monday, November 8, 2021 9:03 PM
To: Edwin chiu <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Edwin Chiu 邱垂峰 <[email protected]>
Subject: Re: [PATCH 1/2] dt-bingings:arm:sunplus:add sp7021 compatible string to sunplus,idle-state.yaml

Quoted 11 lines · Edwin chiu

Add the compatible string for cpuidle state on sp7021

---
 .../bindings/arm/sunplus/sunplus,idle-state.yaml   | 55 ++++++++++++++++++++++
 MAINTAINERS                                        |  6 +++
 2 files changed, 61 insertions(+)
 create mode 100644

Documentation/devicetree/bindings/arm/sunplus/sunplus,idle-state.yam l

Quoted 1 line

Running 'make dtbs_check' with the schema in this patch gives the following warnings. Consider if

they are expected or the schema is incorrect. These may not be new warnings.

Quoted 52 lines

Note that it is not yet a requirement to have 0 warnings for dtbs_check. This will change in the future.

Full log is available here: https://patchwork.ozlabs.org/patch/1552228

spc: compatible:0: 'arm,idle-state' was expected

	arch/arm/boot/dts/qcom-apq8064-asus-nexus7-flo.dt.yaml
	arch/arm/boot/dts/qcom-apq8064-cm-qs600.dt.yaml
	arch/arm/boot/dts/qcom-apq8064-ifc6410.dt.yaml
	arch/arm/boot/dts/qcom-apq8064-sony-xperia-yuga.dt.yaml
	arch/arm/boot/dts/qcom-apq8074-dragonboard.dt.yaml
	arch/arm/boot/dts/qcom-apq8084-ifc6540.dt.yaml
	arch/arm/boot/dts/qcom-apq8084-mtp.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-fairphone-fp2.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-samsung-klte.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-sony-xperia-amami.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-sony-xperia-castor.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-sony-xperia-honami.dt.yaml

spc: compatible: Additional items are not allowed ('arm,idle-state' was unexpected)

	arch/arm/boot/dts/qcom-apq8064-asus-nexus7-flo.dt.yaml
	arch/arm/boot/dts/qcom-apq8064-cm-qs600.dt.yaml
	arch/arm/boot/dts/qcom-apq8064-ifc6410.dt.yaml
	arch/arm/boot/dts/qcom-apq8064-sony-xperia-yuga.dt.yaml
	arch/arm/boot/dts/qcom-apq8074-dragonboard.dt.yaml
	arch/arm/boot/dts/qcom-apq8084-ifc6540.dt.yaml
	arch/arm/boot/dts/qcom-apq8084-mtp.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-fairphone-fp2.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-samsung-klte.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-sony-xperia-amami.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-sony-xperia-castor.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-sony-xperia-honami.dt.yaml

spc: compatible: ['qcom,idle-state-spc', 'arm,idle-state'] is too long

	arch/arm/boot/dts/qcom-apq8064-asus-nexus7-flo.dt.yaml
	arch/arm/boot/dts/qcom-apq8064-cm-qs600.dt.yaml
	arch/arm/boot/dts/qcom-apq8064-ifc6410.dt.yaml
	arch/arm/boot/dts/qcom-apq8064-sony-xperia-yuga.dt.yaml
	arch/arm/boot/dts/qcom-apq8074-dragonboard.dt.yaml
	arch/arm/boot/dts/qcom-apq8084-ifc6540.dt.yaml
	arch/arm/boot/dts/qcom-apq8084-mtp.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-fairphone-fp2.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-samsung-klte.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-sony-xperia-amami.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-sony-xperia-castor.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-sony-xperia-honami.dt.yaml
#6 lore raw

RE: [PATCH 1/2] dt-bingings:arm:sunplus:add sp7021 compatible string to sunplus,idle-state.yaml

In reply to Rob Herring

Hi Rob:

What is the status now?
Are you agree my submit?

邱垂峰 EdwinChiu
智能運算專案
T: +886-3-5786005 ext.2590
[email protected]
300 新竹科學園區創新一路19號

Quoted 243 lines

-----Original Message-----
From: Edwin Chiu 邱垂峰
Sent: Monday, November 15, 2021 5:08 PM
To: 'Rob Herring' <[email protected]>
Cc: Edwin chiu <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Subject: RE: [PATCH 1/2] dt-bingings:arm:sunplus:add sp7021 compatible string to sunplus,idle-state.yaml

Hi Rob:

Thanks your response.
Reply your question as below:

Quoted 5 lines
Quoted 2 lines

1) The checkpatch warning is WARNING: From:/Signed-off-by: email address mismatch: 'From: Edwin

chiu <[email protected]>' != 'Signed-off-by: Edwin chiu <[email protected]>'

Quoted 2 lines

==> I want explain to you that <[email protected]> is my email in the company, but it disagree

Quoted 9 lines

operate by "git send-email".

Quoted 2 lines

So I used <[email protected]> in my linux system to operate with "git send-email".
Actually I checkpatch in my side was 0 error 0 warning.

The email used to send and the author emails are independent in git.
There should be a 'From:' line in the resulting patch when the sender and author don't match.

Maybe you need to set sendemail.from config option to your corp email.

==> Please understanding it is our company secure policy.
It disagree operate by "git send-email".
But I am pretty sure I can receive email on both [email protected] and
[email protected] .

Quoted 9 lines
Quoted 3 lines

2) Regarding to dtbs-check issue, your list warnings related to others company's yaml file, it not my

yaml file case.

Quoted 1 line

What is the purpose you want? Or what should I do?

You aren't adding anything custom, so why are you even adding the schema? arm/idle-states.yaml should be enough.

===> Yes, I want to apply arm/idle-state structure to my idle function.
I thought every function submit, all need edit yaml file together. Do you mean I can submit cpuidle-sunplus.c without my sunplus,idle-state.yaml ?

On the other hand, I confirm my yaml file can pass dt_binding_check and dtbs_check as below:

edwinchiu@scdiu3:~/code/code1/linux/kernel$ make dt_binding_check
DT_SCHEMA_FILES=Documentation/devicetree/bindings/arm/sunplus/sunplus,idle-state.yaml
  DTEX    Documentation/devicetree/bindings/arm/sunplus/sunplus,idle-state.example.dts
  DTC     Documentation/devicetree/bindings/arm/sunplus/sunplus,idle-state.example.dt.yaml
  CHECK   Documentation/devicetree/bindings/arm/sunplus/sunplus,idle-state.example.dt.yaml
edwinchiu@scdiu3:~/code/code1/linux/kernel$
edwinchiu@scdiu3:~/code/code1/linux/kernel$ export ARCH=arm
edwinchiu@scdiu3:~/code/code1/linux/kernel$ echo $ARCH arm
edwinchiu@scdiu3:~/code/code1/linux/kernel$ make dtbs_check
DT_SCHEMA_FILES=Documentation/devicetree/bindings/arm/sunplus/sunplus,idle-state.yaml
  SYNC    include/config/auto.conf.cmd
  SCHEMA  Documentation/devicetree/bindings/processed-schema.json
  UPD     include/config/kernel.release
  DTC     arch/arm/boot/dts/sp7021-bpi-f2p.dtb
  DTC     arch/arm/boot/dts/sp7021-bpi-f2s.dtb
  DTC     arch/arm/boot/dts/sp7021-demov2.dtb
  DTC     arch/arm/boot/dts/sp7021-demov3.dtb
  DTC     arch/arm/boot/dts/sp7021-ev.dtb
  DTC     arch/arm/boot/dts/sp7021-ev-ttl.dtb
  DTC     arch/arm/boot/dts/sp7021-ltpp3g2revD.dtb
  DTC     arch/arm/boot/dts/sp7021-ltpp3g2-sunplus.dtb
  DTC     arch/arm/boot/dts/sp7021-bpi-f2p.dt.yaml
  CHECK   arch/arm/boot/dts/sp7021-bpi-f2p.dt.yaml
  DTC     arch/arm/boot/dts/sp7021-bpi-f2s.dt.yaml
  CHECK   arch/arm/boot/dts/sp7021-bpi-f2s.dt.yaml
  DTC     arch/arm/boot/dts/sp7021-demov2.dt.yaml
  CHECK   arch/arm/boot/dts/sp7021-demov2.dt.yaml
  DTC     arch/arm/boot/dts/sp7021-demov3.dt.yaml
  CHECK   arch/arm/boot/dts/sp7021-demov3.dt.yaml
  DTC     arch/arm/boot/dts/sp7021-ev.dt.yaml
  CHECK   arch/arm/boot/dts/sp7021-ev.dt.yaml
  DTC     arch/arm/boot/dts/sp7021-ev-ttl.dt.yaml
  CHECK   arch/arm/boot/dts/sp7021-ev-ttl.dt.yaml
  DTC     arch/arm/boot/dts/sp7021-ltpp3g2revD.dt.yaml
  CHECK   arch/arm/boot/dts/sp7021-ltpp3g2revD.dt.yaml
  DTC     arch/arm/boot/dts/sp7021-ltpp3g2-sunplus.dt.yaml
  CHECK   arch/arm/boot/dts/sp7021-ltpp3g2-sunplus.dt.yaml
edwinchiu@scdiu3:~/code/code1/linux/kernel$

邱垂峰 EdwinChiu
智能運算專案
T: +886-3-5786005 ext.2590
[email protected]
300 新竹科學園區創新一路19號

Quoted 148 lines

-----Original Message-----
From: Rob Herring <[email protected]>
Sent: Saturday, November 13, 2021 6:59 AM
To: Edwin Chiu 邱垂峰 <[email protected]>
Cc: Edwin chiu <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Subject: Re: [PATCH 1/2] dt-bingings:arm:sunplus:add sp7021 compatible string to sunplus,idle-state.yaml

Quoted 10 lines · Edwin Chiu 邱垂峰

Hi Rob:

Look into the full log, it show you check 3 programs
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Context Check Description
robh/checkpatch warning total: 0 errors, 1 warnings, 67 lines checked
robh/dt-meta-schema success
robh/dtbs-check fail build log
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Quoted 2 lines

1) The checkpatch warning is WARNING: From:/Signed-off-by: email address mismatch: 'From: Edwin

chiu <[email protected]>' != 'Signed-off-by: Edwin chiu <[email protected]>'

Quoted 2 lines

==> I want explain to you that <[email protected]> is my email in the company, but it disagree

operate by "git send-email".

Quoted 2 lines

So I used <[email protected]> in my linux system to operate with "git send-email".
Actually I checkpatch in my side was 0 error 0 warning.

The email used to send and the author emails are independent in git.
There should be a 'From:' line in the resulting patch when the sender and author don't match.

Maybe you need to set sendemail.from config option to your corp email.

Quoted 3 lines

2) Regarding to dtbs-check issue, your list warnings related to others company's yaml file, it not my

yaml file case.

Quoted 1 line

What is the purpose you want? Or what should I do?

You aren't adding anything custom, so why are you even adding the schema? arm/idle-states.yaml should be enough.

Quoted 7 lines

3) Execute=>make dtbs_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/arm/sunplus/sunplu s, idle-state.yaml There are many config select items…..I don't know how to select them.
(I execute "make config " and "make all" were pass) Can you teach me how to do "make dtbs_check"?

Did you read Documentation/devicetree/bindings/writing-schema.rst?

To check all dts files (for an arch) and run the validation, do:

make allmodconfig
make dtbs_check

Rob

Quoted 31 lines

邱垂峰 EdwinChiu
智能運算專案
T: +886-3-5786005 ext.2590
[email protected]
300 新竹科學園區創新一路19號

-----Original Message-----
From: Rob Herring <[email protected]>
Sent: Monday, November 8, 2021 9:03 PM
To: Edwin chiu <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Edwin Chiu 邱垂峰 <[email protected]>
Subject: Re: [PATCH 1/2] dt-bingings:arm:sunplus:add sp7021 compatible string to sunplus,idle-state.yaml

Quoted 11 lines · Edwin chiu

Add the compatible string for cpuidle state on sp7021

---
 .../bindings/arm/sunplus/sunplus,idle-state.yaml   | 55 ++++++++++++++++++++++
 MAINTAINERS                                        |  6 +++
 2 files changed, 61 insertions(+)  create mode 100644

Documentation/devicetree/bindings/arm/sunplus/sunplus,idle-state.y am
l

Quoted 2 lines

Running 'make dtbs_check' with the schema in this patch gives the following warnings. Consider if

they are expected or the schema is incorrect. These may not be new warnings.

Quoted 53 lines

Note that it is not yet a requirement to have 0 warnings for dtbs_check. This will change in the future.

Full log is available here:
https://patchwork.ozlabs.org/patch/1552228

spc: compatible:0: 'arm,idle-state' was expected

	arch/arm/boot/dts/qcom-apq8064-asus-nexus7-flo.dt.yaml
	arch/arm/boot/dts/qcom-apq8064-cm-qs600.dt.yaml
	arch/arm/boot/dts/qcom-apq8064-ifc6410.dt.yaml
	arch/arm/boot/dts/qcom-apq8064-sony-xperia-yuga.dt.yaml
	arch/arm/boot/dts/qcom-apq8074-dragonboard.dt.yaml
	arch/arm/boot/dts/qcom-apq8084-ifc6540.dt.yaml
	arch/arm/boot/dts/qcom-apq8084-mtp.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-fairphone-fp2.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-samsung-klte.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-sony-xperia-amami.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-sony-xperia-castor.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-sony-xperia-honami.dt.yaml

spc: compatible: Additional items are not allowed ('arm,idle-state' was unexpected)

	arch/arm/boot/dts/qcom-apq8064-asus-nexus7-flo.dt.yaml
	arch/arm/boot/dts/qcom-apq8064-cm-qs600.dt.yaml
	arch/arm/boot/dts/qcom-apq8064-ifc6410.dt.yaml
	arch/arm/boot/dts/qcom-apq8064-sony-xperia-yuga.dt.yaml
	arch/arm/boot/dts/qcom-apq8074-dragonboard.dt.yaml
	arch/arm/boot/dts/qcom-apq8084-ifc6540.dt.yaml
	arch/arm/boot/dts/qcom-apq8084-mtp.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-fairphone-fp2.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-samsung-klte.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-sony-xperia-amami.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-sony-xperia-castor.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-sony-xperia-honami.dt.yaml

spc: compatible: ['qcom,idle-state-spc', 'arm,idle-state'] is too long

	arch/arm/boot/dts/qcom-apq8064-asus-nexus7-flo.dt.yaml
	arch/arm/boot/dts/qcom-apq8064-cm-qs600.dt.yaml
	arch/arm/boot/dts/qcom-apq8064-ifc6410.dt.yaml
	arch/arm/boot/dts/qcom-apq8064-sony-xperia-yuga.dt.yaml
	arch/arm/boot/dts/qcom-apq8074-dragonboard.dt.yaml
	arch/arm/boot/dts/qcom-apq8084-ifc6540.dt.yaml
	arch/arm/boot/dts/qcom-apq8084-mtp.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-fairphone-fp2.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-samsung-klte.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-sony-xperia-amami.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-sony-xperia-castor.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-sony-xperia-honami.dt.yaml
#7 lore raw

RE: [PATCH 1/2] dt-bingings:arm:sunplus:add sp7021 compatible string to sunplus,idle-state.yaml

In reply to Rob Herring

Hi Rob :

Are you agree my answer?
Should I send patch again?

邱垂峰 EdwinChiu
智能運算專案
T: +886-3-5786005 ext.2590
[email protected]
300 新竹科學園區創新一路19號

Quoted 271 lines

-----Original Message-----
From: Edwin Chiu 邱垂峰
Sent: Friday, November 26, 2021 1:59 PM
To: 'Rob Herring' <[email protected]>
Cc: 'Edwin chiu' <[email protected]>; '[email protected]' <[email protected]>; '[email protected]' <[email protected]>; '[email protected]' <[email protected]>; '[email protected]' <[email protected]>; '[email protected]' <[email protected]>
Subject: RE: [PATCH 1/2] dt-bingings:arm:sunplus:add sp7021 compatible string to sunplus,idle-state.yaml

Hi Rob:

What is the status now?
Are you agree my submit?

邱垂峰 EdwinChiu
智能運算專案
T: +886-3-5786005 ext.2590
[email protected]
300 新竹科學園區創新一路19號

Quoted 10 lines

-----Original Message-----
From: Edwin Chiu 邱垂峰
Sent: Monday, November 15, 2021 5:08 PM
To: 'Rob Herring' <[email protected]>
Cc: Edwin chiu <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Subject: RE: [PATCH 1/2] dt-bingings:arm:sunplus:add sp7021 compatible string to sunplus,idle-state.yaml

Quoted 11 lines

Hi Rob:

Thanks your response.
Reply your question as below:

Quoted 7 lines
Quoted 2 lines

1) The checkpatch warning is WARNING: From:/Signed-off-by: email address mismatch: 'From: Edwin

chiu <[email protected]>' != 'Signed-off-by: Edwin chiu <[email protected]>'

Quoted 2 lines

==> I want explain to you that <[email protected]> is my email in the company, but it disagree

operate by "git send-email".

Quoted 1 line

So I used <[email protected]> in my linux system to operate with "git

send-email".

Quoted 68 lines
Quoted 7 lines
Quoted 1 line

Actually I checkpatch in my side was 0 error 0 warning.

The email used to send and the author emails are independent in git.
There should be a 'From:' line in the resulting patch when the sender and author don't match.

Maybe you need to set sendemail.from config option to your corp email.

==> Please understanding it is our company secure policy.
It disagree operate by "git send-email".
But I am pretty sure I can receive email on both
[email protected] and [email protected] .

Quoted 9 lines
Quoted 3 lines

2) Regarding to dtbs-check issue, your list warnings related to others company's yaml file, it not my

yaml file case.

Quoted 1 line

What is the purpose you want? Or what should I do?

You aren't adding anything custom, so why are you even adding the schema? arm/idle-states.yaml should be enough.

===> Yes, I want to apply arm/idle-state structure to my idle function.
I thought every function submit, all need edit yaml file together. Do you mean I can submit cpuidle-sunplus.c without my sunplus,idle-state.yaml ?

On the other hand, I confirm my yaml file can pass dt_binding_check and dtbs_check as below:

edwinchiu@scdiu3:~/code/code1/linux/kernel$ make dt_binding_check
DT_SCHEMA_FILES=Documentation/devicetree/bindings/arm/sunplus/sunplus,idle-state.yaml
  DTEX    Documentation/devicetree/bindings/arm/sunplus/sunplus,idle-state.example.dts
  DTC     Documentation/devicetree/bindings/arm/sunplus/sunplus,idle-state.example.dt.yaml
  CHECK   Documentation/devicetree/bindings/arm/sunplus/sunplus,idle-state.example.dt.yaml
edwinchiu@scdiu3:~/code/code1/linux/kernel$
edwinchiu@scdiu3:~/code/code1/linux/kernel$ export ARCH=arm
edwinchiu@scdiu3:~/code/code1/linux/kernel$ echo $ARCH arm
edwinchiu@scdiu3:~/code/code1/linux/kernel$ make dtbs_check
DT_SCHEMA_FILES=Documentation/devicetree/bindings/arm/sunplus/sunplus,idle-state.yaml
  SYNC    include/config/auto.conf.cmd
  SCHEMA  Documentation/devicetree/bindings/processed-schema.json
  UPD     include/config/kernel.release
  DTC     arch/arm/boot/dts/sp7021-bpi-f2p.dtb
  DTC     arch/arm/boot/dts/sp7021-bpi-f2s.dtb
  DTC     arch/arm/boot/dts/sp7021-demov2.dtb
  DTC     arch/arm/boot/dts/sp7021-demov3.dtb
  DTC     arch/arm/boot/dts/sp7021-ev.dtb
  DTC     arch/arm/boot/dts/sp7021-ev-ttl.dtb
  DTC     arch/arm/boot/dts/sp7021-ltpp3g2revD.dtb
  DTC     arch/arm/boot/dts/sp7021-ltpp3g2-sunplus.dtb
  DTC     arch/arm/boot/dts/sp7021-bpi-f2p.dt.yaml
  CHECK   arch/arm/boot/dts/sp7021-bpi-f2p.dt.yaml
  DTC     arch/arm/boot/dts/sp7021-bpi-f2s.dt.yaml
  CHECK   arch/arm/boot/dts/sp7021-bpi-f2s.dt.yaml
  DTC     arch/arm/boot/dts/sp7021-demov2.dt.yaml
  CHECK   arch/arm/boot/dts/sp7021-demov2.dt.yaml
  DTC     arch/arm/boot/dts/sp7021-demov3.dt.yaml
  CHECK   arch/arm/boot/dts/sp7021-demov3.dt.yaml
  DTC     arch/arm/boot/dts/sp7021-ev.dt.yaml
  CHECK   arch/arm/boot/dts/sp7021-ev.dt.yaml
  DTC     arch/arm/boot/dts/sp7021-ev-ttl.dt.yaml
  CHECK   arch/arm/boot/dts/sp7021-ev-ttl.dt.yaml
  DTC     arch/arm/boot/dts/sp7021-ltpp3g2revD.dt.yaml
  CHECK   arch/arm/boot/dts/sp7021-ltpp3g2revD.dt.yaml
  DTC     arch/arm/boot/dts/sp7021-ltpp3g2-sunplus.dt.yaml
  CHECK   arch/arm/boot/dts/sp7021-ltpp3g2-sunplus.dt.yaml
edwinchiu@scdiu3:~/code/code1/linux/kernel$
Quoted 36 lines

邱垂峰 EdwinChiu
智能運算專案
T: +886-3-5786005 ext.2590
[email protected]
300 新竹科學園區創新一路19號

Quoted 29 lines

-----Original Message-----
From: Rob Herring <[email protected]>
Sent: Saturday, November 13, 2021 6:59 AM
To: Edwin Chiu 邱垂峰 <[email protected]>
Cc: Edwin chiu <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Subject: Re: [PATCH 1/2] dt-bingings:arm:sunplus:add sp7021 compatible string to sunplus,idle-state.yaml

Quoted 10 lines · Edwin Chiu 邱垂峰

Hi Rob:

Look into the full log, it show you check 3 programs
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Context Check Description
robh/checkpatch warning total: 0 errors, 1 warnings, 67 lines checked
robh/dt-meta-schema success
robh/dtbs-check fail build log
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Quoted 2 lines

1) The checkpatch warning is WARNING: From:/Signed-off-by: email address mismatch: 'From: Edwin

chiu <[email protected]>' != 'Signed-off-by: Edwin chiu <[email protected]>'

Quoted 2 lines

==> I want explain to you that <[email protected]> is my email in the company, but it disagree

operate by "git send-email".

Quoted 1 line

So I used <[email protected]> in my linux system to operate with "git

send-email".

Quoted 121 lines
Quoted 121 lines
Quoted 1 line

Actually I checkpatch in my side was 0 error 0 warning.

The email used to send and the author emails are independent in git.
There should be a 'From:' line in the resulting patch when the sender and author don't match.

Maybe you need to set sendemail.from config option to your corp email.

Quoted 3 lines

2) Regarding to dtbs-check issue, your list warnings related to others company's yaml file, it not my

yaml file case.

Quoted 1 line

What is the purpose you want? Or what should I do?

You aren't adding anything custom, so why are you even adding the schema? arm/idle-states.yaml should be enough.

Quoted 7 lines

3) Execute=>make dtbs_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/arm/sunplus/sunp lu s, idle-state.yaml There are many config select items…..I don't know how to select them.
(I execute "make config " and "make all" were pass) Can you teach me how to do "make dtbs_check"?

Did you read Documentation/devicetree/bindings/writing-schema.rst?

To check all dts files (for an arch) and run the validation, do:

make allmodconfig
make dtbs_check

Rob

Quoted 32 lines

邱垂峰 EdwinChiu
智能運算專案
T: +886-3-5786005 ext.2590
[email protected]
300 新竹科學園區創新一路19號

-----Original Message-----
From: Rob Herring <[email protected]>
Sent: Monday, November 8, 2021 9:03 PM
To: Edwin chiu <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Edwin Chiu 邱垂峰 <[email protected]>
Subject: Re: [PATCH 1/2] dt-bingings:arm:sunplus:add sp7021 compatible string to sunplus,idle-state.yaml

Quoted 12 lines · Edwin chiu

Add the compatible string for cpuidle state on sp7021

---
 .../bindings/arm/sunplus/sunplus,idle-state.yaml   | 55 ++++++++++++++++++++++
 MAINTAINERS                                        |  6 +++
 2 files changed, 61 insertions(+)  create mode 100644

Documentation/devicetree/bindings/arm/sunplus/sunplus,idle-state .y
am
l

Quoted 2 lines

Running 'make dtbs_check' with the schema in this patch gives the following warnings. Consider if

they are expected or the schema is incorrect. These may not be new warnings.

Quoted 53 lines

Note that it is not yet a requirement to have 0 warnings for dtbs_check. This will change in the future.

Full log is available here:
https://patchwork.ozlabs.org/patch/1552228

spc: compatible:0: 'arm,idle-state' was expected

	arch/arm/boot/dts/qcom-apq8064-asus-nexus7-flo.dt.yaml
	arch/arm/boot/dts/qcom-apq8064-cm-qs600.dt.yaml
	arch/arm/boot/dts/qcom-apq8064-ifc6410.dt.yaml
	arch/arm/boot/dts/qcom-apq8064-sony-xperia-yuga.dt.yaml
	arch/arm/boot/dts/qcom-apq8074-dragonboard.dt.yaml
	arch/arm/boot/dts/qcom-apq8084-ifc6540.dt.yaml
	arch/arm/boot/dts/qcom-apq8084-mtp.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-fairphone-fp2.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-samsung-klte.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-sony-xperia-amami.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-sony-xperia-castor.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-sony-xperia-honami.dt.yaml

spc: compatible: Additional items are not allowed ('arm,idle-state' was unexpected)

	arch/arm/boot/dts/qcom-apq8064-asus-nexus7-flo.dt.yaml
	arch/arm/boot/dts/qcom-apq8064-cm-qs600.dt.yaml
	arch/arm/boot/dts/qcom-apq8064-ifc6410.dt.yaml
	arch/arm/boot/dts/qcom-apq8064-sony-xperia-yuga.dt.yaml
	arch/arm/boot/dts/qcom-apq8074-dragonboard.dt.yaml
	arch/arm/boot/dts/qcom-apq8084-ifc6540.dt.yaml
	arch/arm/boot/dts/qcom-apq8084-mtp.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-fairphone-fp2.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-samsung-klte.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-sony-xperia-amami.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-sony-xperia-castor.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-sony-xperia-honami.dt.yaml

spc: compatible: ['qcom,idle-state-spc', 'arm,idle-state'] is too long

	arch/arm/boot/dts/qcom-apq8064-asus-nexus7-flo.dt.yaml
	arch/arm/boot/dts/qcom-apq8064-cm-qs600.dt.yaml
	arch/arm/boot/dts/qcom-apq8064-ifc6410.dt.yaml
	arch/arm/boot/dts/qcom-apq8064-sony-xperia-yuga.dt.yaml
	arch/arm/boot/dts/qcom-apq8074-dragonboard.dt.yaml
	arch/arm/boot/dts/qcom-apq8084-ifc6540.dt.yaml
	arch/arm/boot/dts/qcom-apq8084-mtp.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-fairphone-fp2.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-samsung-klte.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-sony-xperia-amami.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-sony-xperia-castor.dt.yaml
	arch/arm/boot/dts/qcom-msm8974-sony-xperia-honami.dt.yaml
author
#8 lore raw

PATCH 2/2 cpuidle:sunplus:create cpuidle driver for sunplus sp7021

In reply to Edwin chiu

Create cpuidle driver for sunplus sp7021 chip

---
 MAINTAINERS                                   |   5 +-
 drivers/cpuidle/Kconfig.arm                   |   7 +
 drivers/cpuidle/Makefile                      |   1 +
 drivers/cpuidle/cpuidle-sunplus.c             | 185 ++++++++++++++++++++++++++
 include/linux/platform_data/cpuidle-sunplus.h |  14 ++
 5 files changed, 211 insertions(+), 1 deletion(-)
 create mode 100644 drivers/cpuidle/cpuidle-sunplus.c
 create mode 100644 include/linux/platform_data/cpuidle-sunplus.h
MAINTAINERS +4 -1
index 52f17ec..050fe3b 100644
@@ -17949,7 +17949,10 @@ SUNPLUS CPUIDLE DRIVER
 M:	Edwin Chiu <[email protected]>
 S:	Maintained
 F:	Documentation/devicetree/bindings/arm/sunplus/sunplus,idle-state.yaml
-
+F:	drivers/cpuidle/Kconfig.arm
+F:	drivers/cpuidle/Makefile
+F:	drivers/cpuidle/cpuidle-sunplus.c
+F:	include/linux/platform_data/cpuidle-sunplus.h
 
 SUPERH
 M:	Yoshinori Sato <[email protected]>
drivers/cpuidle/Kconfig.arm +7 -0
index 334f83e..ad9956c 100644
@@ -117,3 +117,10 @@ config ARM_QCOM_SPM_CPUIDLE
 	  The Subsystem Power Manager (SPM) controls low power modes for the
 	  CPU and L2 cores. It interface with various system drivers to put
 	  the cores in low power modes.
+
+config ARM_SUNPLUS_CPUIDLE
+	bool "CPU Idle Driver For SUNPLUS SoCs"
+	depends on !ARM64
+	select DT_IDLE_STATES
+	help
+	  Select this to enable cpuidle on SP7021 processors.
drivers/cpuidle/Makefile +1 -0
index 26bbc5e..0a020d1 100644
@@ -25,6 +25,7 @@ obj-$(CONFIG_ARM_PSCI_CPUIDLE)		+= cpuidle-psci.o
 obj-$(CONFIG_ARM_PSCI_CPUIDLE_DOMAIN)	+= cpuidle-psci-domain.o
 obj-$(CONFIG_ARM_TEGRA_CPUIDLE)		+= cpuidle-tegra.o
 obj-$(CONFIG_ARM_QCOM_SPM_CPUIDLE)	+= cpuidle-qcom-spm.o
+obj-$(CONFIG_ARM_SUNPLUS_CPUIDLE)		+= cpuidle-sunplus.o
 
 ###############################################################################
 # MIPS drivers
drivers/cpuidle/cpuidle-sunplus.c new file +185 -0

185 lines not on this page · raw message

include/linux/platform_data/cpuidle-sunplus.h new file +14 -0
new file mode 100644
index 0000000..43e6001
@@ -0,0 +1,14 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#ifndef __CPUIDLE_SP7021_H
+#define __CPUIDLE_SP7021_H
+
+
+extern int cpu_v7_do_idle(void);
+
+#endif
Signature · 1 line
2.7.4