Message ID | 20250115073026.31552-1-ansuelsmth@gmail.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | [1/2] dt-bindings: mmc: mtk-sd: Add eMMC for AN7581 | expand |
On Wed, 15 Jan 2025 08:29:50 +0100, Christian Marangi wrote: > Document eMMC compatible for AN7581. This eMMC controller doesn't have > regulator exposed to the system and have a single clock only for source > clock and only default pintctrl. > > Rework the schema to permit these new requirements and make supply > optional only for airoha,an7581-mmc compatible. > > Also provide an example for airoha,an7581-mmc. > > Signed-off-by: Christian Marangi <ansuelsmth@gmail.com> > --- > This depends on patch merged in clk-next > bfe257f9780d8f77045a7da6ec959ee0659d2f98 > > .../devicetree/bindings/mmc/mtk-sd.yaml | 64 +++++++++++++++++-- > 1 file changed, 58 insertions(+), 6 deletions(-) > My bot found errors running 'make dt_binding_check' on your patch: yamllint warnings/errors: dtschema/dtc warnings/errors: Error: Documentation/devicetree/bindings/mmc/mtk-sd.example.dts:104.31-32 syntax error FATAL ERROR: Unable to parse input tree make[2]: *** [scripts/Makefile.dtbs:131: Documentation/devicetree/bindings/mmc/mtk-sd.example.dtb] Error 1 make[2]: *** Waiting for unfinished jobs.... make[1]: *** [/builds/robherring/dt-review-ci/linux/Makefile:1506: dt_binding_check] Error 2 make: *** [Makefile:251: __sub-make] Error 2 doc reference errors (make refcheckdocs): See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20250115073026.31552-1-ansuelsmth@gmail.com 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.
On Wed, Jan 15, 2025 at 02:37:50AM -0600, Rob Herring (Arm) wrote: > > On Wed, 15 Jan 2025 08:29:50 +0100, Christian Marangi wrote: > > Document eMMC compatible for AN7581. This eMMC controller doesn't have > > regulator exposed to the system and have a single clock only for source > > clock and only default pintctrl. > > > > Rework the schema to permit these new requirements and make supply > > optional only for airoha,an7581-mmc compatible. > > > > Also provide an example for airoha,an7581-mmc. > > > > Signed-off-by: Christian Marangi <ansuelsmth@gmail.com> > > --- > > This depends on patch merged in clk-next > > bfe257f9780d8f77045a7da6ec959ee0659d2f98 > > > > .../devicetree/bindings/mmc/mtk-sd.yaml | 64 +++++++++++++++++-- > > 1 file changed, 58 insertions(+), 6 deletions(-) > > > > My bot found errors running 'make dt_binding_check' on your patch: > > yamllint warnings/errors: > > dtschema/dtc warnings/errors: > Error: Documentation/devicetree/bindings/mmc/mtk-sd.example.dts:104.31-32 syntax error > FATAL ERROR: Unable to parse input tree > make[2]: *** [scripts/Makefile.dtbs:131: Documentation/devicetree/bindings/mmc/mtk-sd.example.dtb] Error 1 > make[2]: *** Waiting for unfinished jobs.... > make[1]: *** [/builds/robherring/dt-review-ci/linux/Makefile:1506: dt_binding_check] Error 2 > make: *** [Makefile:251: __sub-make] Error 2 > > doc reference errors (make refcheckdocs): > > See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20250115073026.31552-1-ansuelsmth@gmail.com > > 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. > Hi Rob, I think this fails as the CLK define is still not merged as said this patch depends on bfe257f9780d8f77045a7da6ec959ee0659d2f98. Any hint how to make your bot work with that?
On Wed, Jan 15, 2025 at 09:39:34AM +0100, Christian Marangi wrote: > > dtschema/dtc warnings/errors: > > Error: Documentation/devicetree/bindings/mmc/mtk-sd.example.dts:104.31-32 syntax error > > FATAL ERROR: Unable to parse input tree > > make[2]: *** [scripts/Makefile.dtbs:131: Documentation/devicetree/bindings/mmc/mtk-sd.example.dtb] Error 1 > > make[2]: *** Waiting for unfinished jobs.... > > make[1]: *** [/builds/robherring/dt-review-ci/linux/Makefile:1506: dt_binding_check] Error 2 > > make: *** [Makefile:251: __sub-make] Error 2 > > > > doc reference errors (make refcheckdocs): > > > > See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20250115073026.31552-1-ansuelsmth@gmail.com > > > > 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. > > > > Hi Rob, I think this fails as the CLK define is still not merged as said > this patch depends on bfe257f9780d8f77045a7da6ec959ee0659d2f98. > > Any hint how to make your bot work with that? Don't use the define, but raw number or just some fake phandle. Best regards, Krzysztof
On Wed, Jan 15, 2025 at 08:29:50AM +0100, Christian Marangi wrote: > Document eMMC compatible for AN7581. This eMMC controller doesn't have > regulator exposed to the system and have a single clock only for source > clock and only default pintctrl. > > Rework the schema to permit these new requirements and make supply > optional only for airoha,an7581-mmc compatible. > > Also provide an example for airoha,an7581-mmc. > > Signed-off-by: Christian Marangi <ansuelsmth@gmail.com> > --- > This depends on patch merged in clk-next > bfe257f9780d8f77045a7da6ec959ee0659d2f98 > > .../devicetree/bindings/mmc/mtk-sd.yaml | 64 +++++++++++++++++-- > 1 file changed, 58 insertions(+), 6 deletions(-) > > diff --git a/Documentation/devicetree/bindings/mmc/mtk-sd.yaml b/Documentation/devicetree/bindings/mmc/mtk-sd.yaml > index f86ebd81f5a5..6dad5455b369 100644 > --- a/Documentation/devicetree/bindings/mmc/mtk-sd.yaml > +++ b/Documentation/devicetree/bindings/mmc/mtk-sd.yaml > @@ -27,6 +27,7 @@ properties: > - mediatek,mt8183-mmc > - mediatek,mt8196-mmc > - mediatek,mt8516-mmc > + - airoha,an7581-mmc Please keep things ordered. The list is nicely ordered so far. > - items: > - const: mediatek,mt7623-mmc > - const: mediatek,mt2701-mmc > @@ -48,11 +49,11 @@ properties: > clocks: > description: > Should contain phandle for the clock feeding the MMC controller. > - minItems: 2 > + minItems: 1 > maxItems: 7 > > clock-names: > - minItems: 2 > + minItems: 1 > maxItems: 7 > > interrupts: > @@ -72,7 +73,7 @@ properties: > Should at least contain default and state_uhs. To support SDIO in-band wakeup, dat1 pin > will be switched between GPIO mode and SDIO DAT1 mode, state_eint is mandatory in this > scenario. > - minItems: 2 > + minItems: 1 > items: > - const: default > - const: state_uhs > @@ -170,9 +171,6 @@ required: > - clock-names > - pinctrl-names > - pinctrl-0 > - - pinctrl-1 > - - vmmc-supply > - - vqmmc-supply > > allOf: > - $ref: mmc-controller.yaml# > @@ -335,6 +333,40 @@ allOf: > - const: axi_cg > - const: ahb_cg > > + - if: > + properties: > + compatible: > + contains: > + const: airoha,an7581-mmc > + then: > + properties: > + clocks: > + items: > + - description: source clock > + > + clock-names: > + items: > + - const: source > + > + pinctrl-names: > + items: > + - const: default > + else: No else, you are now duplicating other "if:then" cases. There is already such for "reg" so it does not really make it more readable. Just be sure each variant has a strict, upper and lower, constraints. > + properties: > + clocks: > + minItems: 2 > + > + clock-names: > + minItems: 2 > + > + pinctrl-names: > + minItems: 2 > + > + required: > + - pinctrl-1 > + - vmmc-supply > + - vqmmc-supply These should go to each variant's if:then: or separate if:then: covering all existing variants for the required fields. > + > unevaluatedProperties: false > > examples: > @@ -389,5 +421,25 @@ examples: > vqmmc-supply = <&mt6397_vgp3_reg>; > mmc-pwrseq = <&wifi_pwrseq>; > }; > + - | > + #include <dt-bindings/interrupt-controller/irq.h> > + #include <dt-bindings/interrupt-controller/arm-gic.h> > + #include <dt-bindings/clock/en7523-clk.h> > + mmc@1fa0e000 { > + compatible = "airoha,an7581-mmc"; > + reg = <0x1fa0e000 0x1000>, > + <0x1fa0c000 0x60>; > + clocks = <&scuclk EN7581_CLK_EMMC>; > + clock-names = "source"; > + interrupts = <GIC_SPI 170 IRQ_TYPE_LEVEL_HIGH>; > + pinctrl-names = "default"; > + pinctrl-0 = <&mmc_pins>; > + bus-width = <4>; > + max-frequency = <52000000>; > + disable-wp; > + cap-mmc-highspeed; > + non-removable; > + Drop blank line. Best regards, Krzysztof
diff --git a/Documentation/devicetree/bindings/mmc/mtk-sd.yaml b/Documentation/devicetree/bindings/mmc/mtk-sd.yaml index f86ebd81f5a5..6dad5455b369 100644 --- a/Documentation/devicetree/bindings/mmc/mtk-sd.yaml +++ b/Documentation/devicetree/bindings/mmc/mtk-sd.yaml @@ -27,6 +27,7 @@ properties: - mediatek,mt8183-mmc - mediatek,mt8196-mmc - mediatek,mt8516-mmc + - airoha,an7581-mmc - items: - const: mediatek,mt7623-mmc - const: mediatek,mt2701-mmc @@ -48,11 +49,11 @@ properties: clocks: description: Should contain phandle for the clock feeding the MMC controller. - minItems: 2 + minItems: 1 maxItems: 7 clock-names: - minItems: 2 + minItems: 1 maxItems: 7 interrupts: @@ -72,7 +73,7 @@ properties: Should at least contain default and state_uhs. To support SDIO in-band wakeup, dat1 pin will be switched between GPIO mode and SDIO DAT1 mode, state_eint is mandatory in this scenario. - minItems: 2 + minItems: 1 items: - const: default - const: state_uhs @@ -170,9 +171,6 @@ required: - clock-names - pinctrl-names - pinctrl-0 - - pinctrl-1 - - vmmc-supply - - vqmmc-supply allOf: - $ref: mmc-controller.yaml# @@ -335,6 +333,40 @@ allOf: - const: axi_cg - const: ahb_cg + - if: + properties: + compatible: + contains: + const: airoha,an7581-mmc + then: + properties: + clocks: + items: + - description: source clock + + clock-names: + items: + - const: source + + pinctrl-names: + items: + - const: default + else: + properties: + clocks: + minItems: 2 + + clock-names: + minItems: 2 + + pinctrl-names: + minItems: 2 + + required: + - pinctrl-1 + - vmmc-supply + - vqmmc-supply + unevaluatedProperties: false examples: @@ -389,5 +421,25 @@ examples: vqmmc-supply = <&mt6397_vgp3_reg>; mmc-pwrseq = <&wifi_pwrseq>; }; + - | + #include <dt-bindings/interrupt-controller/irq.h> + #include <dt-bindings/interrupt-controller/arm-gic.h> + #include <dt-bindings/clock/en7523-clk.h> + mmc@1fa0e000 { + compatible = "airoha,an7581-mmc"; + reg = <0x1fa0e000 0x1000>, + <0x1fa0c000 0x60>; + clocks = <&scuclk EN7581_CLK_EMMC>; + clock-names = "source"; + interrupts = <GIC_SPI 170 IRQ_TYPE_LEVEL_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&mmc_pins>; + bus-width = <4>; + max-frequency = <52000000>; + disable-wp; + cap-mmc-highspeed; + non-removable; + + }; ...
Document eMMC compatible for AN7581. This eMMC controller doesn't have regulator exposed to the system and have a single clock only for source clock and only default pintctrl. Rework the schema to permit these new requirements and make supply optional only for airoha,an7581-mmc compatible. Also provide an example for airoha,an7581-mmc. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com> --- This depends on patch merged in clk-next bfe257f9780d8f77045a7da6ec959ee0659d2f98 .../devicetree/bindings/mmc/mtk-sd.yaml | 64 +++++++++++++++++-- 1 file changed, 58 insertions(+), 6 deletions(-)