From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B5E1FC4321E for ; Sun, 27 Nov 2022 13:05:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To: Subject:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Od/389Eh78hNIiHDkg7kD28b9QotO1N0fKNbxaK0RHg=; b=TQxrXdnt0bLAZI 2wte7mHhctHjOV4DIsSH0L+iQicvLV1ic/lxd9h74pc9hhSRcYGMOvo3q8UIKA8zJw9RE0qVMgwsq d5BtDKr/vA9Spps+CVcux9kbVJuG52BEIOvYi82VUHhUUlryw1/2TPcIM60aoOvHuURDcsxrirk0e w3VysdGOwTARFYA/w//c4/tZn7OejWdSRfx+hfkb82TTZUH4aFyQc1k4P4s3mtdaPskRTRFL0Z7xt s/bmitA+uC+Gih1tomMvLRS7EISDbnRsN4hi8Mx8Bnw1+Uyvk/nPXOueMTNG37CbpVghKUDKTjVEb 0dqEbzCAuOqbItP27joQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ozHL0-00BKSQ-TY; Sun, 27 Nov 2022 13:04:51 +0000 Received: from mail-lf1-x12b.google.com ([2a00:1450:4864:20::12b]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ozHKw-00BKPY-NR for linux-arm-kernel@lists.infradead.org; Sun, 27 Nov 2022 13:04:48 +0000 Received: by mail-lf1-x12b.google.com with SMTP id j16so13516656lfe.12 for ; Sun, 27 Nov 2022 05:04:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=4uv9NLyVdtUPDSFmo+p+xxyh2cAXEC6AD0ovZO/N6E8=; b=y3J5j5lRwuZApCxV9igxu0BtDwjD6P7LeqvkP93Q1OSK4JoMm6pTiK2WXdgHQl1vNY VUzsVV+r1jAKg/uI/np4YeWks10CnqV+YIOlOEQGZlxEn53yqrNWQtb3vn9yfm74I11H alsXNVmQsRtmzq5VN5wiaKfzVWxDdKq3Rh1XJLrujCMFJASEYvvPuQf4xrO56h7PvXKM /QcdPYSdcVGcBHBWyGIyjIdDPFx5RTLL9qFg52vwo0ENIx6/vHW3SurcS9kikcy02Vf7 ggl0Cew+FoBa9prMEMbczVcJZKowMtvrnMEIM0rSbpWnk9BDzlPVXE1+NSUSBuj1UCsd vo9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=4uv9NLyVdtUPDSFmo+p+xxyh2cAXEC6AD0ovZO/N6E8=; b=p02DIL0qETmL9rcnW6c3MlJUmIEjgmurb3YsGZYyZ1SW5bmVKFO4vI+xISDeGIhM3H CHUjTWkNtIvM9FhtvlxlxAVWXrAM4cp67gJsjc9HQsyNUhHP4eozmsYyQH0jeHPTYfRX imisU+04iLRfO4WQD1sCkVxxFq3fOf5Jw3tqBRk5M6RtwMqMSs+EES4NwM72c1wcWcG/ FM19nxLSbe3XmbgyDuGrwjYQfEzP//TfLKkE6ZwL0MGn38MkhkkmLGzLl0acazWFUkmI wKVnDfV+7r3+YXk1hy6QlpEwQeZFF32Ht8CHNn7RIkvvP9h0XcbTDeWAZpsE4FVQjv/B KytQ== X-Gm-Message-State: ANoB5pmN4v11OqCrUiSABHihR9z0xZziQXNohFdUnr+SH1Wxw6/vAbFP lx2txlNCVDpmLDk5hHi31jc4xA== X-Google-Smtp-Source: AA0mqf4pCS3dyEaJ5waPK1zi9fCTtlO14uQl3Soiryfi5LpCuEPfg3klj+cVNDrbtzGueCzcv8XeBg== X-Received: by 2002:a05:6512:20cb:b0:4a2:23f5:c1f6 with SMTP id u11-20020a05651220cb00b004a223f5c1f6mr16412604lfr.472.1669554279695; Sun, 27 Nov 2022 05:04:39 -0800 (PST) Received: from [192.168.0.20] (088156142067.dynamic-2-waw-k-3-2-0.vectranet.pl. [88.156.142.67]) by smtp.gmail.com with ESMTPSA id d7-20020a196b07000000b00497a32e2576sm1280391lfa.32.2022.11.27.05.04.37 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 27 Nov 2022 05:04:39 -0800 (PST) Message-ID: Date: Sun, 27 Nov 2022 14:04:37 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.0 Subject: Re: [PATCH v6 05/10] dt-bindings: soc: mediatek: convert pwrap documentation Content-Language: en-US To: Alexandre Mergnat , Krzysztof Kozlowski , Sean Wang , Rob Herring , Matthias Brugger , Chen Zhong , Fabien Parent , Alessandro Zummo , Mark Brown , Alexandre Belloni , Flora Fu , Tianping Fang , Pavel Machek , Lee Jones , Liam Girdwood , Dmitry Torokhov Cc: Mattijs Korpershoek , Rob Herring , AngeloGioacchino Del Regno , linux-rtc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, Fabien Parent , linux-input@vger.kernel.org, devicetree@vger.kernel.org, linux-leds@vger.kernel.org References: <20221005-mt6357-support-v6-0-4f589756befa@baylibre.com> <20221005-mt6357-support-v6-5-4f589756befa@baylibre.com> From: Krzysztof Kozlowski In-Reply-To: <20221005-mt6357-support-v6-5-4f589756befa@baylibre.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221127_050446_780547_C6895E81 X-CRM114-Status: GOOD ( 26.67 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 25/11/2022 16:10, Alexandre Mergnat wrote: > - Convert soc/mediatek/pwrap.txt to soc/mediatek/mediatek,pwrap.yaml > - Add syscon compatible const for mt8186 and mt8195 to match the DTS needs. > > Signed-off-by: Alexandre Mergnat > --- > .../devicetree/bindings/leds/leds-mt6323.txt | 2 +- > Documentation/devicetree/bindings/mfd/mt6397.txt | 2 +- > .../bindings/soc/mediatek/mediatek,pwrap.yaml | 147 +++++++++++++++++++++ > .../devicetree/bindings/soc/mediatek/pwrap.txt | 75 ----------- > 4 files changed, 149 insertions(+), 77 deletions(-) > > diff --git a/Documentation/devicetree/bindings/leds/leds-mt6323.txt b/Documentation/devicetree/bindings/leds/leds-mt6323.txt > index 45bf9f7d85f3..73353692efa1 100644 > --- a/Documentation/devicetree/bindings/leds/leds-mt6323.txt > +++ b/Documentation/devicetree/bindings/leds/leds-mt6323.txt > @@ -9,7 +9,7 @@ MT6323 PMIC hardware. > For MT6323 MFD bindings see: > Documentation/devicetree/bindings/mfd/mt6397.txt > For MediaTek PMIC wrapper bindings see: > -Documentation/devicetree/bindings/soc/mediatek/pwrap.txt > +Documentation/devicetree/bindings/soc/mediatek/mediatek,pwrap.yaml > > Required properties: > - compatible : Must be "mediatek,mt6323-led" > diff --git a/Documentation/devicetree/bindings/mfd/mt6397.txt b/Documentation/devicetree/bindings/mfd/mt6397.txt > index 79aaf21af8e9..3bee4a42555d 100644 > --- a/Documentation/devicetree/bindings/mfd/mt6397.txt > +++ b/Documentation/devicetree/bindings/mfd/mt6397.txt > @@ -13,7 +13,7 @@ MT6397/MT6323 is a multifunction device with the following sub modules: > It is interfaced to host controller using SPI interface by a proprietary hardware > called PMIC wrapper or pwrap. MT6397/MT6323 MFD is a child device of pwrap. > See the following for pwarp node definitions: > -../soc/mediatek/pwrap.txt > +../soc/mediatek/mediatek,pwrap.yaml > > This document describes the binding for MFD device and its sub module. > > diff --git a/Documentation/devicetree/bindings/soc/mediatek/mediatek,pwrap.yaml b/Documentation/devicetree/bindings/soc/mediatek/mediatek,pwrap.yaml > new file mode 100644 > index 000000000000..3969871eaced > --- /dev/null > +++ b/Documentation/devicetree/bindings/soc/mediatek/mediatek,pwrap.yaml > @@ -0,0 +1,147 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/soc/mediatek/mediatek,pwrap.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Mediatek PMIC Wrapper > + > +maintainers: > + - Flora Fu > + - Alexandre Mergnat > + > +description: > + On MediaTek SoCs the PMIC is connected via SPI. The SPI master interface > + is not directly visible to the CPU, but only through the PMIC wrapper > + inside the SoC. The communication between the SoC and the PMIC can > + optionally be encrypted. Also a non standard Dual IO SPI mode can be > + used to increase speed. > + > + IP Pairing > + > + On MT8135 the pins of some SoC internal peripherals can be on the PMIC. > + The signals of these pins are routed over the SPI bus using the pwrap > + bridge. In the binding description below the properties needed for bridging > + are marked with "IP Pairing". These are optional on SoCs which do not support > + IP Pairing > + > +properties: > + compatible: > + oneOf: > + - items: > + - enum: > + - mediatek,mt2701-pwrap > + - mediatek,mt6765-pwrap > + - mediatek,mt6779-pwrap > + - mediatek,mt6797-pwrap > + - mediatek,mt6873-pwrap > + - mediatek,mt7622-pwrap > + - mediatek,mt8135-pwrap > + - mediatek,mt8173-pwrap > + - mediatek,mt8183-pwrap > + - mediatek,mt8186-pwrap > + - mediatek,mt8188-pwrap > + - mediatek,mt8195-pwrap > + - mediatek,mt8365-pwrap > + - mediatek,mt8516-pwrap > + - items: > + - enum: > + - mediatek,mt8186-pwrap > + - mediatek,mt8195-pwrap > + - const: syscon > + > + reg: > + minItems: 1 > + items: > + - description: PMIC wrapper registers > + - description: IP pairing registers > + > + reg-names: > + minItems: 1 > + items: > + - const: pwrap > + - const: pwrap-bridge > + > + interrupts: > + maxItems: 1 > + > + clocks: > + minItems: 2 > + items: > + - description: SPI bus clock > + - description: Main module clock > + - description: System module clock > + - description: Timer module clock > + > + clock-names: > + minItems: 2 > + items: > + - const: spi > + - const: wrap > + - const: sys > + - const: tmr > + > + resets: > + minItems: 1 > + items: > + - description: PMIC wrapper reset > + - description: IP pairing reset > + > + reset-names: > + minItems: 1 > + items: > + - const: pwrap > + - const: pwrap-bridge > + > + pmic: > + type: object What's here? Other schema? If not then maybe compatible? What about description? > + > +required: > + - compatible > + - reg > + - reg-names > + - interrupts > + - clocks > + - clock-names > + > +dependentRequired: > + resets: [reset-names] Drop. > + > +allOf: > + - if: > + properties: > + compatible: > + contains: > + const: mediatek,mt8365-pwrap > + then: > + properties: > + clocks: > + minItems: 4 > + > + clock-names: > + minItems: 4 else: ??? > + > +additionalProperties: false > + > +examples: > + - | > + #include > + #include > + #include > + > + soc { > + #address-cells = <2>; > + #size-cells = <2>; > + pwrap@1000d000 { > + compatible = "mediatek,mt8135-pwrap"; > + reg = <0 0x1000f000 0 0x1000>, This does not match your unit address. No warnings when compile testing? > + <0 0x11017000 0 0x1000>; > + reg-names = "pwrap", "pwrap-bridge"; > + interrupts = ; > + clocks = <&clk26m>, <&clk26m>; > + clock-names = "spi", "wrap"; > + resets = <&infracfg MT8135_INFRA_PMIC_WRAP_RST>, > + <&pericfg MT8135_PERI_PWRAP_BRIDGE_SW_RST>; > + reset-names = "pwrap", "pwrap-bridge"; Missing pmic. Make your example complete. Best regards, Krzysztof _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel