2023-12-11 07:42:05

by Xinhu Wu

[permalink] [raw]
Subject: [PATCH V2 0/2] usb: typec: sprd: Add Unisoc PMIC typec driver

Support typec driver on unisoc related pmic, using extcon mechanism framework
to notify client driver

change in V2
-Modify the commit message

Xinhu Wu (2):
usb: typec: Support sprd_pmic_typec driver
dt-bindings: usb: Add an Spreadtrum pmic typec yaml

.../bindings/usb/sprd,pmic_typec.yaml | 65 ++
drivers/usb/typec/Kconfig | 11 +
drivers/usb/typec/Makefile | 1 +
drivers/usb/typec/sprd_pmic_typec.c | 587 ++++++++++++++++++
4 files changed, 664 insertions(+)
create mode 100644 Documentation/devicetree/bindings/usb/sprd,pmic_typec.yaml
create mode 100644 drivers/usb/typec/sprd_pmic_typec.c

--
2.17.1


2023-12-11 07:42:15

by Xinhu Wu

[permalink] [raw]
Subject: [PATCH V2 2/2] dt-bindings: usb: Add an Spreadtrum pmic typec yaml

Add device tree binding Documentation details for
Spreadtrum pmic typec driver

Signed-off-by: Xinhu Wu <[email protected]>
---
.../bindings/usb/sprd,pmic_typec.yaml | 65 +++++++++++++++++++
1 file changed, 65 insertions(+)
create mode 100644 Documentation/devicetree/bindings/usb/sprd,pmic_typec.yaml

diff --git a/Documentation/devicetree/bindings/usb/sprd,pmic_typec.yaml b/Documentation/devicetree/bindings/usb/sprd,pmic_typec.yaml
new file mode 100644
index 000000000000..e522ac02026b
--- /dev/null
+++ b/Documentation/devicetree/bindings/usb/sprd,pmic_typec.yaml
@@ -0,0 +1,65 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/usb/sprd,pmic-typec.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Unisoc SC27xx Type-C port controller
+
+maintainers:
+ - Xinhu Wu <[email protected]>
+
+description:
+ Supports the typec found on these PMICs.
+
+properties:
+ compatible:
+ enum:
+ - sprd,sc2730-typec
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ sprd,mode:
+ maxItems: 1
+ description: the number indicates src, snk or drp.
+ enum: [0, 1, 2]
+
+ nvmem-cells:
+ maxItems: 2
+ description:
+ A phandle to the 'cc resistance' trim data provided by
+ a nvmem device.
+
+ nvmem-cell-names:
+ items:
+ - const: typec_cc1_cal
+ - const: typec_cc2_cal
+
+required:
+ - compatible
+ - reg
+ - interrupts
+ - sprd,mode
+ - nvmem-cells
+ - nvmem-cell-names
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/irq.h>
+ pmic {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ pmic_typec: typec@380 {
+ compatible = "sprd,sc2730-typec";
+ reg = <0x380>;
+ interrupt-parent = <&sc2730_pmic>;
+ interrupts = <8>;
+ sprd,mode = <2>;
+ nvmem-cells = <&typec_cc1_cal>, <&typec_ccc2_cal>;
+ nvmem-cell-names = "typec_cc1_cal","typec_cc2_cal";
+ };
+ };
--
2.17.1

2023-12-11 08:20:35

by Rob Herring

[permalink] [raw]
Subject: Re: [PATCH V2 2/2] dt-bindings: usb: Add an Spreadtrum pmic typec yaml


On Mon, 11 Dec 2023 15:41:20 +0800, Xinhu Wu wrote:
> Add device tree binding Documentation details for
> Spreadtrum pmic typec driver
>
> Signed-off-by: Xinhu Wu <[email protected]>
> ---
> .../bindings/usb/sprd,pmic_typec.yaml | 65 +++++++++++++++++++
> 1 file changed, 65 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/usb/sprd,pmic_typec.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:
./Documentation/devicetree/bindings/usb/sprd,pmic_typec.yaml:28:18: [error] syntax error: mapping values are not allowed here (syntax)

dtschema/dtc warnings/errors:
make[2]: *** Deleting file 'Documentation/devicetree/bindings/usb/sprd,pmic_typec.example.dts'
Documentation/devicetree/bindings/usb/sprd,pmic_typec.yaml:28:18: mapping values are not allowed in this context
make[2]: *** [Documentation/devicetree/bindings/Makefile:26: Documentation/devicetree/bindings/usb/sprd,pmic_typec.example.dts] Error 1
make[2]: *** Waiting for unfinished jobs....
./Documentation/devicetree/bindings/usb/sprd,pmic_typec.yaml:28:18: mapping values are not allowed in this context
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/usb/sprd,pmic_typec.yaml: ignoring, error parsing file
make[1]: *** [/builds/robherring/dt-review-ci/linux/Makefile:1424: dt_binding_check] Error 2
make: *** [Makefile:234: __sub-make] Error 2

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/[email protected]

The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.

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 after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.

2023-12-11 19:38:27

by kernel test robot

[permalink] [raw]
Subject: Re: [PATCH V2 2/2] dt-bindings: usb: Add an Spreadtrum pmic typec yaml

Hi Xinhu,

kernel test robot noticed the following build warnings:

[auto build test WARNING on usb/usb-testing]
[also build test WARNING on usb/usb-next usb/usb-linus robh/for-next westeri-thunderbolt/next linus/master v6.7-rc5 next-20231211]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url: https://github.com/intel-lab-lkp/linux/commits/Xinhu-Wu/usb-typec-Support-sprd_pmic_typec-driver/20231211-154328
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing
patch link: https://lore.kernel.org/r/20231211074120.27958-3-xinhu.wu%40unisoc.com
patch subject: [PATCH V2 2/2] dt-bindings: usb: Add an Spreadtrum pmic typec yaml
compiler: loongarch64-linux-gcc (GCC) 13.2.0
reproduce: (https://download.01.org/0day-ci/archive/20231212/[email protected]/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

dtcheck warnings: (new ones prefixed by >>)
>> Documentation/devicetree/bindings/usb/sprd,pmic_typec.yaml:28:18: [error] syntax error: mapping values are not allowed here (syntax)
--
>> Documentation/devicetree/bindings/usb/sprd,pmic_typec.yaml:28:18: mapping values are not allowed in this context
Documentation/devicetree/bindings/iio/pressure/honeywell,mprls0025pa.yaml: properties:honeywell,pmin-pascal: '$ref' should not be valid under {'const': '$ref'}
hint: Standard unit suffix properties don't need a type $ref
from schema $id: http://devicetree.org/meta-schemas/core.yaml#
Documentation/devicetree/bindings/iio/pressure/honeywell,mprls0025pa.yaml: properties:honeywell,pmax-pascal: '$ref' should not be valid under {'const': '$ref'}
hint: Standard unit suffix properties don't need a type $ref
from schema $id: http://devicetree.org/meta-schemas/core.yaml#
--
>> Documentation/devicetree/bindings/usb/sprd,pmic_typec.yaml: ignoring, error parsing file

vim +28 Documentation/devicetree/bindings/usb/sprd,pmic_typec.yaml

8
9 maintainers:
10 - Xinhu Wu <[email protected]>
11
12 description:
13 Supports the typec found on these PMICs.
14
15 properties:
16 compatible:
17 enum:
18 - sprd,sc2730-typec
19
20 reg:
21 maxItems: 1
22
23 interrupts:
24 maxItems: 1
25
26 sprd,mode:
27 maxItems: 1
> 28 description: the number indicates src, snk or drp.

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki