Received: by 2002:ac0:e34a:0:0:0:0:0 with SMTP id g10csp401559imn; Thu, 28 Jul 2022 04:24:11 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tFuuZUQbSzMZEAM4L7boQXLnxraWpWQo7KXCShanadtzh3xHrJ9ZlPrv0VRNgtqLwhn8dF X-Received: by 2002:a17:907:1691:b0:72f:1d8e:7306 with SMTP id hc17-20020a170907169100b0072f1d8e7306mr20392751ejc.512.1659007451428; Thu, 28 Jul 2022 04:24:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659007451; cv=none; d=google.com; s=arc-20160816; b=WbBfosequy/Lo0woYooNs2qqB+38/mmSZC6+2+bwawCgMaj2zKttxO0M60XO909Hlo LYdpLSPlpMiY5w3UKCJ+pKT3VMadpL9oI/bxkK9MrgS4UzgLlfdPBKMItdnmyxULWszh N/lX9lXXR8ymoYcaEYgdxrRMbeNJYAvzUmIcPaOma0jnve6GEt3qlGz+nZ9Mk+f9heFU rZFeN/OVaDyJRkPEovS5wpIQbr+IoFGRTabmJPxlBnDvfWZXVbRvXc8zcNSAdWB6wDNZ KxciiKTP8WcypDpPe4bIcG2pULi9NIepO8pqx5N8hVyhT0sF8H/2vDjGRbDMg6t4Vfx5 Daaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:dkim-filter; bh=GH3C2KGFWETo+pp+7CSNeBz/nSGLgXim/wtEZEgyQ/I=; b=euj62b7bD2+6wEscR8+WCFH1Rgj99BQF6Qf5qoinqeVbxE8qlTbhjlVqw/Nnse3tlU RpQnE7evsl+bGCPf0XYr8hGQdzqP220RJ07bFUtedEahGdWUCBIEF7c55aIvyfbYWNWD io9HARlvKHooV6cpX8GgbMfzZ+qGDxwWEjR7g1PDyEjw2StPPAPP1LkEJ/2QgNkPt2Io bG6TS+H+O4X7SrTj5OWpHqbJoEJOkFzMrGmmRrwtkW3VifXrklItO1K40F9q06T6FWa0 G3E8CC9R3Y6LVApDwLueLZDw/xx2yDtCLU+WG7p+xpbMnkUpvGrIIeiw/n8Ck/9FYtxe UOug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baikalelectronics.ru header.s=mail header.b="g5MkF/HS"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=baikalelectronics.ru Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i24-20020a05640200d800b0043cb489640bsi489446edu.362.2022.07.28.04.23.46; Thu, 28 Jul 2022 04:24:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@baikalelectronics.ru header.s=mail header.b="g5MkF/HS"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=baikalelectronics.ru Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237104AbiG1LV4 (ORCPT + 99 others); Thu, 28 Jul 2022 07:21:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49438 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236824AbiG1LUS (ORCPT ); Thu, 28 Jul 2022 07:20:18 -0400 Received: from mail.baikalelectronics.com (unknown [87.245.175.230]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id BF46167CB3; Thu, 28 Jul 2022 04:19:37 -0700 (PDT) Received: from mail (mail.baikal.int [192.168.51.25]) by mail.baikalelectronics.com (Postfix) with ESMTP id 1DE4516D2; Thu, 28 Jul 2022 14:22:00 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 mail.baikalelectronics.com 1DE4516D2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baikalelectronics.ru; s=mail; t=1659007320; bh=GH3C2KGFWETo+pp+7CSNeBz/nSGLgXim/wtEZEgyQ/I=; h=From:To:CC:Subject:Date:In-Reply-To:References:From; b=g5MkF/HSvt0h0+RptfEleJoj2b4sinnqkIyVTFUzSqkfshNWTup8g7gUDkuTD94CX r3hbdw6yu90opjGBj/TTOM1Xp7u1T8uuiVCkzcyLa4P1nocY88ePcAu2+bdDk/wdbP f71e/O1fVEZgz2xxUNU3L4EMo1keSKYLq0DFuTNI= Received: from localhost (192.168.53.207) by mail (192.168.51.25) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Thu, 28 Jul 2022 14:19:35 +0300 From: Serge Semin To: Damien Le Moal , Hans de Goede , Jens Axboe , Hannes Reinecke , Serge Semin , Rob Herring , Krzysztof Kozlowski CC: Serge Semin , Alexey Malahov , Pavel Parkhomenko , , , , Rob Herring Subject: [PATCH RESEND v6 20/23] dt-bindings: ata: ahci: Add Baikal-T1 AHCI SATA controller DT schema Date: Thu, 28 Jul 2022 14:19:01 +0300 Message-ID: <20220728111905.12427-21-Sergey.Semin@baikalelectronics.ru> In-Reply-To: <20220728111905.12427-1-Sergey.Semin@baikalelectronics.ru> References: <20220728111905.12427-1-Sergey.Semin@baikalelectronics.ru> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: MAIL.baikal.int (192.168.51.25) To mail (192.168.51.25) X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,T_SPF_PERMERROR autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Baikal-T1 AHCI controller is based on the DWC AHCI SATA IP-core v4.10a with the next specific settings: two SATA ports, cascaded CSR access based on two clock domains (APB and AXI), selectable source of the reference clock (though stable work is currently available from the external source only), two reset lanes for the application and SATA ports domains. Other than that the device is fully compatible with the generic DWC AHCI SATA bindings. Signed-off-by: Serge Semin Reviewed-by: Hannes Reinecke Reviewed-by: Rob Herring --- Changelog v2: - Rename 'syscon' property to 'baikal,bt1-syscon'. - Drop macro usage from the example node. Changelog v4: - Use the DWC AHCI port properties definition from the DWC AHCI SATA common schema. (@Rob) - Drop Baikal-T1 syscon reference and implement the clock signal source in the framework of the clock controller. (@Rob) Changelog v5: - Drop generic compatible fallback "snps,dwc-ahci". (@Rob) - Define SATA-port pattern property to be applicable for two ports only. - Drop "|" qualifier from the description property. --- .../bindings/ata/baikal,bt1-ahci.yaml | 115 ++++++++++++++++++ 1 file changed, 115 insertions(+) create mode 100644 Documentation/devicetree/bindings/ata/baikal,bt1-ahci.yaml diff --git a/Documentation/devicetree/bindings/ata/baikal,bt1-ahci.yaml b/Documentation/devicetree/bindings/ata/baikal,bt1-ahci.yaml new file mode 100644 index 000000000000..9b7ca4759bd7 --- /dev/null +++ b/Documentation/devicetree/bindings/ata/baikal,bt1-ahci.yaml @@ -0,0 +1,115 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/ata/baikal,bt1-ahci.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Baikal-T1 SoC AHCI SATA controller + +maintainers: + - Serge Semin + +description: + AHCI SATA controller embedded into the Baikal-T1 SoC is based on the + DWC AHCI SATA v4.10a IP-core. + +allOf: + - $ref: snps,dwc-ahci-common.yaml# + +properties: + compatible: + const: baikal,bt1-ahci + + clocks: + items: + - description: Peripheral APB bus clock + - description: Application AXI BIU clock + - description: SATA Ports reference clock + + clock-names: + items: + - const: pclk + - const: aclk + - const: ref + + resets: + items: + - description: Application AXI BIU domain reset + - description: SATA Ports clock domain reset + + reset-names: + items: + - const: arst + - const: ref + + ports-implemented: + maximum: 0x3 + +patternProperties: + "^sata-port@[0-1]$": + $ref: /schemas/ata/snps,dwc-ahci-common.yaml#/$defs/dwc-ahci-port + + properties: + reg: + minimum: 0 + maximum: 1 + + snps,tx-ts-max: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + Due to having AXI3 bus interface utilized the maximum Tx DMA + transaction size can't exceed 16 beats (AxLEN[3:0]). + enum: [ 1, 2, 4, 8, 16 ] + + snps,rx-ts-max: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + Due to having AXI3 bus interface utilized the maximum Rx DMA + transaction size can't exceed 16 beats (AxLEN[3:0]). + enum: [ 1, 2, 4, 8, 16 ] + + unevaluatedProperties: false + +required: + - compatible + - reg + - interrupts + - clocks + - clock-names + - resets + +unevaluatedProperties: false + +examples: + - | + sata@1f050000 { + compatible = "baikal,bt1-ahci"; + reg = <0x1f050000 0x2000>; + #address-cells = <1>; + #size-cells = <0>; + + interrupts = <0 64 4>; + + clocks = <&ccu_sys 1>, <&ccu_axi 2>, <&sata_ref_clk>; + clock-names = "pclk", "aclk", "ref"; + + resets = <&ccu_axi 2>, <&ccu_sys 0>; + reset-names = "arst", "ref"; + + ports-implemented = <0x3>; + + sata-port@0 { + reg = <0>; + + snps,tx-ts-max = <4>; + snps,rx-ts-max = <4>; + }; + + sata-port@1 { + reg = <1>; + + snps,tx-ts-max = <4>; + snps,rx-ts-max = <4>; + }; + }; +... -- 2.35.1