diff mbox series

[V2,4/4] mmc: Add dt-bindings for realtek mmc driver

Message ID 20231018055326.18256-5-jyanchou@realtek.com
State New
Headers show
Series Add DesignWare Mobile mmc driver | expand

Commit Message

Jyan Chou [周芷安] Oct. 18, 2023, 5:53 a.m. UTC
Document the device-tree bindings for Realtek SoCs mmc driver.

Signed-off-by: Jyan Chou <jyanchou@realtek.com>

---
v0 -> v2:
- Add dt-binding.
---
---
 .../bindings/mmc/realtek-dw-mshc.yaml         | 119 ++++++++++++++++++
 1 file changed, 119 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/mmc/realtek-dw-mshc.yaml

Comments

Krzysztof Kozlowski Oct. 18, 2023, 2:24 p.m. UTC | #1
On 18/10/2023 07:53, Jyan Chou wrote:
> Document the device-tree bindings for Realtek SoCs mmc driver.
> 
> Signed-off-by: Jyan Chou <jyanchou@realtek.com>

Please use subject prefixes matching the subsystem. You can get them for
example with `git log --oneline -- DIRECTORY_OR_FILE` on the directory
your patch is touching.

Please use scripts/get_maintainers.pl to get a list of necessary people
and lists to CC. It might happen, that command when run on an older
kernel, gives you outdated entries. Therefore please be sure you base
your patches on recent Linux kernel.

You missed at least devicetree list (maybe more), so this won't be
tested by automated tooling. Performing review on untested code might be
a waste of time, thus I will skip this patch entirely till you follow
the process allowing the patch to be tested.

Please kindly resend and include all necessary To/Cc entries.

Also, coding style of your example is messy.

Best regards,
Krzysztof
Jyan Chou [周芷安] Oct. 20, 2023, 5:18 a.m. UTC | #2
Hi Krzysztof,

> Please use subject prefixes matching the subsystem. You can get them for example with `git log --oneline -- DIRECTORY_OR_FILE` on the directory your patch is touching.
> Please use scripts/get_maintainers.pl to get a list of necessary people and lists to CC. It might happen, that command when run on an older kernel, gives you outdated entries. Therefore please be sure you base your patches on recent Linux kernel.

Thanks for your remind. We had modified our code and resend new patches.

> You missed at least devicetree list (maybe more), so this won't be tested by automated tooling. Performing review on untested code might be a waste of time, thus I will skip this patch entirely till you follow the process allowing the > patch to be tested.
> Also, coding style of your example is messy.

It was our mistake that didn't check dt-bindings accurately. We had corrected it and resend to all necessary To/Cc entries. Thanks.

Best regards,
Jyan


-----Original Message-----
From: Krzysztof Kozlowski <krzk@kernel.org> 
Sent: Wednesday, October 18, 2023 10:25 PM
To: Jyan Chou [周芷安] <jyanchou@realtek.com>; adrian.hunter@intel.com; ulf.hansson@linaro.org; jh80.chung@samsung.com
Cc: linux-mmc@vger.kernel.org; linux-kernel@vger.kernel.org; benchuanggli@gmail.com
Subject: Re: [PATCH V2][4/4] mmc: Add dt-bindings for realtek mmc driver


External mail.



On 18/10/2023 07:53, Jyan Chou wrote:
> Document the device-tree bindings for Realtek SoCs mmc driver.
>
> Signed-off-by: Jyan Chou <jyanchou@realtek.com>

Please use subject prefixes matching the subsystem. You can get them for example with `git log --oneline -- DIRECTORY_OR_FILE` on the directory your patch is touching.

Please use scripts/get_maintainers.pl to get a list of necessary people and lists to CC. It might happen, that command when run on an older kernel, gives you outdated entries. Therefore please be sure you base your patches on recent Linux kernel.

You missed at least devicetree list (maybe more), so this won't be tested by automated tooling. Performing review on untested code might be a waste of time, thus I will skip this patch entirely till you follow the process allowing the patch to be tested.

Please kindly resend and include all necessary To/Cc entries.

Also, coding style of your example is messy.

Best regards,
Krzysztof
kernel test robot Oct. 21, 2023, 11:46 a.m. UTC | #3
Hi Jyan,

kernel test robot noticed the following build warnings:

[auto build test WARNING on robh/for-next]
[also build test WARNING on ulf-hansson-mmc-mirror/next linus/master v6.6-rc6 next-20231020]
[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/Jyan-Chou/mmc-Add-dt-bindings-for-realtek-mmc-driver/20231018-135538
base:   https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
patch link:    https://lore.kernel.org/r/20231018055326.18256-5-jyanchou%40realtek.com
patch subject: [PATCH V2][4/4] mmc: Add dt-bindings for realtek mmc driver
compiler: loongarch64-linux-gcc (GCC) 13.2.0
reproduce: (https://download.01.org/0day-ci/archive/20231021/202310211903.42KO5zwa-lkp@intel.com/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 <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202310211903.42KO5zwa-lkp@intel.com/

dtcheck warnings: (new ones prefixed by >>)
>> Documentation/devicetree/bindings/mmc/realtek-dw-mshc.yaml:46:7: [error] string value is redundantly quoted with any quotes (quoted-strings)
>> Documentation/devicetree/bindings/mmc/realtek-dw-mshc.yaml:46:13: [error] syntax error: expected <block end>, but found '<scalar>' (syntax)
--
>> Documentation/devicetree/bindings/mmc/realtek-dw-mshc.yaml:46:13: did not find expected key
--
>> Documentation/devicetree/bindings/mmc/realtek-dw-mshc.yaml: ignoring, error parsing file

vim +46 Documentation/devicetree/bindings/mmc/realtek-dw-mshc.yaml

     8	
     9	description:
    10	  Realtek uses the Synopsys designware mobile storage host controller
    11	  to interface a SoC with storage medium. This file documents the Realtek
    12	  specific extensions.
    13	
    14	allOf:
    15	  - $ref: synopsys-dw-mshc-common.yaml#
    16	
    17	maintainers:
    18	  - Jyan Chou <jyanchou@realtek.com>
    19	
    20	# Everything else is described in the common file
    21	properties:
    22	  compatible:
    23	    enum:
    24	      - realtek,rtd-dw-cqe-emmc
    25	  reg:
    26	    maxItems: 1
    27	
    28	  interrupts:
    29	    maxItems: 1
    30	
    31	  clocks:
    32	    minItems: 2
    33	    maxItems: 4
    34	    description:
    35	      Handle to "biu" and "ciu" clocks for the bus interface unit clock and
    36	      the card interface unit clock.
    37	
    38	  clock-names:
    39	    minItems: 2
    40	    items:
    41	      - const: biu
    42	      - const: ciu
    43	      - const: vp0
    44	      - const: vp1
    45	    description:
  > 46	      "vp0" and "vp1" are used to control the clock phases.
    47	
    48	  power-domains:
    49	    maxItems: 1
    50	
    51	  resets:
    52	    maxItems: 1
    53	
    54	  reset-names:
    55	    const: reset
    56	
    57	  speed-step:
    58	    maxItems: 1
    59	    description:
    60		"speed-step" represents the bus speed mode of emmc. "3" means HS400,
    61		"2" means HS200, "0" means HS.
    62	
    63	  pinctrl-names:
    64	    maxItems: 10
    65	    items:
    66	      - const: default
    67	      - const: sdr50
    68	      - const: ddr50
    69	      - const: hs200
    70	      - const: hs400
    71	      - const: tune0
    72	      - const: tune1
    73	      - const: tune2
    74	      - const: tune3
    75	      - const: tune4
    76	
    77	required:
    78	  - compatible
    79	  - reg
    80	  - interrupts
    81	  - clocks
    82	  - clock-names
    83	  - pinctrl-names
    84	  - pinctrl
    85
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/mmc/realtek-dw-mshc.yaml b/Documentation/devicetree/bindings/mmc/realtek-dw-mshc.yaml
new file mode 100644
index 000000000000..f398a595c5c5
--- /dev/null
+++ b/Documentation/devicetree/bindings/mmc/realtek-dw-mshc.yaml
@@ -0,0 +1,119 @@ 
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/mmc/realtek-dw-mshc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Realtek designware mobile storage host controller
+
+description:
+  Realtek uses the Synopsys designware mobile storage host controller
+  to interface a SoC with storage medium. This file documents the Realtek
+  specific extensions.
+
+allOf:
+  - $ref: synopsys-dw-mshc-common.yaml#
+
+maintainers:
+  - Jyan Chou <jyanchou@realtek.com>
+
+# Everything else is described in the common file
+properties:
+  compatible:
+    enum:
+      - realtek,rtd-dw-cqe-emmc
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+  clocks:
+    minItems: 2
+    maxItems: 4
+    description:
+      Handle to "biu" and "ciu" clocks for the bus interface unit clock and
+      the card interface unit clock.
+
+  clock-names:
+    minItems: 2
+    items:
+      - const: biu
+      - const: ciu
+      - const: vp0
+      - const: vp1
+    description:
+      "vp0" and "vp1" are used to control the clock phases.
+
+  power-domains:
+    maxItems: 1
+
+  resets:
+    maxItems: 1
+
+  reset-names:
+    const: reset
+
+  speed-step:
+    maxItems: 1
+    description:
+	"speed-step" represents the bus speed mode of emmc. "3" means HS400,
+	"2" means HS200, "0" means HS.
+
+  pinctrl-names:
+    maxItems: 10
+    items:
+      - const: default
+      - const: sdr50
+      - const: ddr50
+      - const: hs200
+      - const: hs400
+      - const: tune0
+      - const: tune1
+      - const: tune2
+      - const: tune3
+      - const: tune4
+
+required:
+  - compatible
+  - reg
+  - interrupts
+  - clocks
+  - clock-names
+  - pinctrl-names
+  - pinctrl
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    emmc: emmc@12000 {
+        compatible = "realtek,rtd-dw-cqe-emmc";
+        reg = <0x00012000 0x00600>,
+		<0x00012180 0x00060>;
+        reg-names = "emmc","cqhci";
+        interrupts = <0 42 4>;
+        clocks = <&cc RTD1319D_CRT_CLK_EN_EMMC>,
+		<&cc RTD1319D_CRT_CLK_EN_EMMC_IP>,
+                <&cc RTD1319D_CRT_PLL_EMMC_VP0>,
+                <&cc RTD1319D_CRT_PLL_EMMC_VP1>;
+        clock-names = "biu", "ciu", "vp0", "vp1";
+        clock-freq-min-max = <300000 400000000>;
+        clock-frequency = <400000>;
+        vmmc-supply = <&reg_vcc1v8>;
+        resets = <&cc RTD1319D_CRT_RSTN_EMMC>;
+        reset-names = "reset";
+        speed-step = <3>;
+        cqe = <1>;
+        pinctrl-names = "default", "sdr50", "ddr50", "hs200", "hs400", "tune0", "tune1", "tune2", "tune3", "tune4";
+	pinctrl-0 = <&emmc_pins_sdr50>;
+        pinctrl-1 = <&emmc_pins_sdr50>;
+        pinctrl-2 = <&emmc_pins_ddr50>;
+        pinctrl-3 = <&emmc_pins_hs200>;
+        pinctrl-4 = <&emmc_pins_hs400>;
+        pinctrl-5 = <&emmc_pins_tune0>;
+	pinctrl-6 = <&emmc_pins_tune1>;
+	pinctrl-7 = <&emmc_pins_tune2>;
+	pinctrl-8 = <&emmc_pins_tune3>;
+	pinctrl-9 = <&emmc_pins_tune4>;
+        };