Thread (1 message) 1 message, 1 author, 2021-11-29

Re: [PATCH v2 2/2] devicetree bindings mmc Add bindings doc for Sunplus SP7021

From: Rob Herring <robh@kernel.org>
Date: 2021-11-29 19:57:58
Also in: linux-mmc, lkml

On Sun, Nov 28, 2021 at 11:30 PM Lh Kuo 郭力豪 [off-list ref] wrote:
quoted
quoted
+
+properties:
+  compatible:
+    enum:
+      - sunplus,sp7021-card1
+      - sunplus,sp7021-sdio
What's the difference between these 2 blocks?
One for SD card One for SDIO
If the programming model is the same, then it should be the same
compatible string. We have various properties to handle differences
like bus width, card detect or not, etc.
quoted
quoted
+  reg:
+    items:
+      - description: Base address and length of the SD/SDIO registers
Just 'maxItems: 1' is sufficient.
quoted
+
+  interrupts:
+    maxItems: 1
+
+  clocks:
+    maxItems: 1
+
+  resets:
+    maxItems: 1
+
+  pinctrl-names:
+    description:
+      A pinctrl state named "default" must be defined.
+    const: default
+
+  pinctrl-0:
+    description:
+      A phandle to the default pinctrl state.
+
+  max-frequency: true
+
+allOf:
+  - $ref: "mmc-controller.yaml"
+
+required:
+  - compatible
+  - reg
+  - interrupts
+  - clocks
+  - resets
+  - pinctrl-names
+  - pinctrl-0
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/clock/sp-sp7021.h>
+    #include <dt-bindings/reset/sp-sp7021.h>
+    #include <dt-bindings/interrupt-controller/irq.h>
+    mmc1: mmc@9C003e80 {
Use lower case hex.
Do you mean as follows? ?

mmc1: mmc@3e80 {
No, 'mmc@9c003e80 {'

You also don't need 'mmc1'.
quoted
quoted
+       compatible = "sunplus,sp7021-card1";
+       reg = <0x9c003e80 0x280>;
+       interrupts = <21 IRQ_TYPE_LEVEL_HIGH>;
+       clocks = <&clkc CARD_CTL1>;
+       resets = <&rstc RST_CARD_CTL1>;
+       pinctrl-names = "default";
+       pinctrl-0 = <&mmc1_mux &mmc1_mux_cd>;
+       max-frequency = <52000000>;
+    };
+    sdio: mmc@9C008400 {
Do you mean as follows? ?

mmc1: mmc@8400 {

quoted
Use lower case hex.
quoted
+       compatible = "sunplus,sp7021-sdio";
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help