From patchwork Sat Feb 19 18:42:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 544174 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A4C62C43217 for ; Sat, 19 Feb 2022 18:42:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242887AbiBSSm7 (ORCPT ); Sat, 19 Feb 2022 13:42:59 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:43440 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242853AbiBSSm6 (ORCPT ); Sat, 19 Feb 2022 13:42:58 -0500 Received: from smtp-relay-internal-0.canonical.com (smtp-relay-internal-0.canonical.com [185.125.188.122]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8C30527158 for ; Sat, 19 Feb 2022 10:42:36 -0800 (PST) Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id 8FBCE4032B for ; Sat, 19 Feb 2022 18:42:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1645296150; bh=IpayMm2NDayFRCQpyYNgxkcMgu4j6Y5WdNwFaqdKRKg=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=S5mtzeGoQ9Lebwxs2eG4A5gEaZMvZ6CuII869NFUyhtgRJtwZWBeqVDy80c6mtGec xSeYWPoRDu4vKRrKN+1G+1A0F1gPc1kg6zSeNMcJTPhWyGwnfVq6N3Otk/+OjIsf07 21kywD5DsrPjZV8yEI4jOPchXYvbD34Qtlq+SRFRanjE9hmAupPQEuv7Orizz8KEa2 +DuiZ8rrwTSN88aZ03esstgLFJuvbcOyH0FJQF3UjQ90AC6V5mcr3OuFciHLRB/iAa H3cuFyT4+7+1FW5GlukM5oP38Jo2zsf4OVRB5XppN1sCJ32gysYXP1rJla3Dj/Pm+2 EePCQHXSenoVw== Received: by mail-ed1-f72.google.com with SMTP id eq13-20020a056402298d00b00412cfa4bb0eso2771673edb.7 for ; Sat, 19 Feb 2022 10:42:30 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=IpayMm2NDayFRCQpyYNgxkcMgu4j6Y5WdNwFaqdKRKg=; b=oUmW31H7O0BvWPmFmJqh+V6ax6LoJAwY5DWrAi1hoZPF2b9KKXNlDiYalJYcU+ZXOe 7E6UZA/UIHq6NW0GnnP2KZR1wdjQqimAO64h6rZQFspZSfr/QY/9rU1bKMyS0+vs7j0E 5f4IlaquFBdKZEGGaRZPzZzc3AkwykZ1999zMVVmkdcqwZRxi9Ruxzod4QtSAB5IREuj RmxzwjoywgaiyOWnEld25u/Ag7qRBERAJRBqfuD8YocwK4SwFchry8uCuVf6Pv0iICRX KxvfF+6nmV7sViv1sRBMc+Myb+JrExp3zEcFKr73Vv1xx1IMz4106xPB3BrZn4YVj7kJ 0ieg== X-Gm-Message-State: AOAM5313mIAxA0F11pAk/sVO7qZaGP9ZOGuiyPiMlbq2JXAzYMXTOHWU uq5yLIHQ2+16m3tHpVosqQX/aXDYr1ZlthtQFPCZHVevu3ZX0vb7W1Ic5+f1mdbt6UKlsT0fSQR k5FnpVv+ubQ6w3C8JF4/hdF1jB10sM420/EGiZyiE5D2/lWQB X-Received: by 2002:a17:906:63d2:b0:6cf:e170:16a with SMTP id u18-20020a17090663d200b006cfe170016amr10538676ejk.119.1645296149578; Sat, 19 Feb 2022 10:42:29 -0800 (PST) X-Google-Smtp-Source: ABdhPJyiqM564la9f2+z2rcYkrfPS7xmkgG7xKR2Hwt606HpXjoo9oUDMPgqlHColfMRdxWcckR6vg== X-Received: by 2002:a17:906:63d2:b0:6cf:e170:16a with SMTP id u18-20020a17090663d200b006cfe170016amr10538653ejk.119.1645296149312; Sat, 19 Feb 2022 10:42:29 -0800 (PST) Received: from localhost.localdomain (xdsl-188-155-181-108.adslplus.ch. [188.155.181.108]) by smtp.gmail.com with ESMTPSA id j8sm6680745edw.40.2022.02.19.10.42.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 19 Feb 2022 10:42:28 -0800 (PST) From: Krzysztof Kozlowski To: Alim Akhtar , Avri Altman , Rob Herring , Krzysztof Kozlowski , Wei Xu , Andy Gross , Bjorn Andersson , Nishanth Menon , Vignesh Raghavendra , Tero Kristo , "James E.J. Bottomley" , "Martin K. Petersen" , Chanho Park , Srinivas Kandagatla , Jan Kotas , linux-scsi@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-arm-msm@vger.kernel.org Subject: [RFC PATCH 1/8] dt-bindings: ufs: add common platform bindings Date: Sat, 19 Feb 2022 19:42:17 +0100 Message-Id: <20220219184224.44339-2-krzysztof.kozlowski@canonical.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220219184224.44339-1-krzysztof.kozlowski@canonical.com> References: <20220219184224.44339-1-krzysztof.kozlowski@canonical.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org Add bindings for common parts (platform) of Universal Flash Storage (UFS) Host Controllers in dtschema format. The 'freq-table-hz' is not correct in dtschema, because '-hz' suffix defines uint32 type, not an array. Therefore deprecate 'freq-table-hz' and use 'freq-table' instead. Include also the bindings directory in UFS maintainers entry. Signed-off-by: Krzysztof Kozlowski --- .../devicetree/bindings/ufs/ti,j721e-ufs.yaml | 2 +- .../devicetree/bindings/ufs/ufs-common.yaml | 86 +++++++++++++++++++ .../devicetree/bindings/ufs/ufs-hisi.txt | 4 +- MAINTAINERS | 1 + 4 files changed, 90 insertions(+), 3 deletions(-) create mode 100644 Documentation/devicetree/bindings/ufs/ufs-common.yaml diff --git a/Documentation/devicetree/bindings/ufs/ti,j721e-ufs.yaml b/Documentation/devicetree/bindings/ufs/ti,j721e-ufs.yaml index 4d13e6bc1c50..dc93fe2d3458 100644 --- a/Documentation/devicetree/bindings/ufs/ti,j721e-ufs.yaml +++ b/Documentation/devicetree/bindings/ufs/ti,j721e-ufs.yaml @@ -80,7 +80,7 @@ examples: compatible = "cdns,ufshc-m31-16nm", "jedec,ufs-2.0"; reg = <0x0 0x4000 0x0 0x10000>; interrupts = ; - freq-table-hz = <19200000 19200000>; + freq-table = <19200000 19200000>; power-domains = <&k3_pds 277>; clocks = <&k3_clks 277 1>; assigned-clocks = <&k3_clks 277 1>; diff --git a/Documentation/devicetree/bindings/ufs/ufs-common.yaml b/Documentation/devicetree/bindings/ufs/ufs-common.yaml new file mode 100644 index 000000000000..66d0612b9991 --- /dev/null +++ b/Documentation/devicetree/bindings/ufs/ufs-common.yaml @@ -0,0 +1,86 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/ufs/ufs-common.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Common properties for Universal Flash Storage (UFS) Host Controllers + +maintainers: + - Alim Akhtar + - Avri Altman + +properties: + clocks: true + + clock-names: true + + freq-table-hz: + deprecated: true + description: + Use freq-table. + + freq-table: + $ref: /schemas/types.yaml#/definitions/uint32-array + minItems: 2 + maxItems: 64 + description: | + Array of operating frequencies in Hz stored in the same order + as the clocks property. If this property is not defined or a value in the + array is "0" then it is assumed that the frequency is set by the parent + clock or a fixed rate clock source. + + interrupts: + maxItems: 1 + + lanes-per-direction: + $ref: /schemas/types.yaml#/definitions/uint32 + enum: [1, 2] + default: 2 + description: + Number of lanes available per direction. Note that it is assume same + number of lanes is used both directions at once. + + vdd-hba-supply: + description: + Phandle to UFS host controller supply regulator node. + + vcc-supply: + description: + Phandle to VCC supply regulator node. + + vccq-supply: + description: + Phandle to VCCQ supply regulator node. + + vccq2-supply: + description: + Phandle to VCCQ2 supply regulator node. + + vcc-supply-1p8: + type: boolean + description: + For embedded UFS devices, valid VCC range is 1.7-1.95V or 2.7-3.6V. This + boolean property when set, specifies to use low voltage range of + 1.7-1.95V. Note for external UFS cards this property is invalid and valid + VCC range is always 2.7-3.6V. + + vcc-max-microamp: + description: + Specifies max. load that can be drawn from VCC supply. + + vccq-max-microamp: + description: + Specifies max. load that can be drawn from VCCQ supply. + + vccq2-max-microamp: + description: + Specifies max. load that can be drawn from VCCQ2 supply. + +dependencies: + freq-table: [ 'clocks' ] + +required: + - interrupts + +additionalProperties: true diff --git a/Documentation/devicetree/bindings/ufs/ufs-hisi.txt b/Documentation/devicetree/bindings/ufs/ufs-hisi.txt index 0b83df1a5418..7e9cf4cff3d3 100644 --- a/Documentation/devicetree/bindings/ufs/ufs-hisi.txt +++ b/Documentation/devicetree/bindings/ufs/ufs-hisi.txt @@ -14,7 +14,7 @@ Required properties: - clocks : List of phandle and clock specifier pairs - clock-names : List of clock input name strings sorted in the same order as the clocks property. "ref_clk", "phy_clk" is optional -- freq-table-hz : Array of operating frequencies stored in the same +- freq-table : Array of operating frequencies stored in the same order as the clocks property. If this property is not defined or a value in the array is "0" then it is assumed that the frequency is set by the parent clock or a @@ -35,7 +35,7 @@ Example: clocks = <&crg_ctrl HI3660_CLK_GATE_UFSIO_REF>, <&crg_ctrl HI3660_CLK_GATE_UFSPHY_CFG>; clock-names = "ref_clk", "phy_clk"; - freq-table-hz = <0 0>, <0 0>; + freq-table = <0 0 0 0>; /* offset: 0x84; bit: 12 */ resets = <&crg_rst 0x84 12>; reset-names = "rst"; diff --git a/MAINTAINERS b/MAINTAINERS index cae5b0c8400d..542174f434ce 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -20015,6 +20015,7 @@ R: Alim Akhtar R: Avri Altman L: linux-scsi@vger.kernel.org S: Supported +F: Documentation/devicetree/bindings/ufs/ F: Documentation/scsi/ufs.rst F: drivers/scsi/ufs/