Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp1449111lqa; Mon, 29 Apr 2024 08:45:13 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXgiAoKsMwr/hx2MOTYOf61FHq80lFnRjnABfQapvoyJUPBCQjR1nDJ/b93ibrQumCAEgki8TXuf6QSDA+mtnBXliEIx6xjb1IC9U2eZg== X-Google-Smtp-Source: AGHT+IHtM66tBtTkrqY7m0AM9ZP6uVLU5f6qYAG1QhdIy0mdzuECVhgD+DSYzd825YEhjvmdQkrr X-Received: by 2002:a05:622a:22a5:b0:43a:a8ad:1135 with SMTP id ay37-20020a05622a22a500b0043aa8ad1135mr6667619qtb.0.1714405513697; Mon, 29 Apr 2024 08:45:13 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714405513; cv=pass; d=google.com; s=arc-20160816; b=zeqqetOvUDFHzVwWmSbRVtoBpnzBl4XFMFZjGi90OZl6LanVoolwGZADqqv/MZlUhZ G6gcQEIwo1GmSmWUDkVDkW2WIlA/lgdUGrq+yl0IL5I3Rb/6OpK0xr7uA29RZmREm5qq yzqk0r5B3xlMiEMmrHChukiDPX+c1U1g+KQDCAkzNtCjjp2i60RXM1auNvNcaJWKNl/f pZ1AH9IQDJj4kzVQggty5+nfXY9nqpjggaLwnyTCT2gGpMnvWFd+axhC9sQjwmiNvlDX JIXI72HcbeCLEU3pLVoLsWqlx86fnXvTmhtF9FH7yecMd4J6rAEX77k9/14Ceva9dZ6x GbvA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=jsixJocqKRrJSdTlkXXMM1uFnu6GRPalHDiE6LQw+iA=; fh=xBB8M/wDTtE0TgRV/UKfyJHiQWCIf8+ORPFEcz9zD5o=; b=FxeeDTP+AH/e+azwpmb1P09NE6a7K6x6N8Cz+Y1WFO9bVfoIZ2KDb6UKlKCcTwt0XI f767MB6ZpwQycx9pHj2IHZ09n6us0tv2r+6ffp2l3eA/Lmwe9YzbMlcHw7UWIJxIcPYj t28os3CGboWpw5b75eA0QXAtPUc8FYX3qguMgau22mb5qdra5jJHQ00f+qvhmJ2TegpD 8y3MG02uGPNKl3zglSaRVGjSF5ZNC9/N+c493E1bi7HIOU7HzgvNDIAkxTZZvZw8Bzlk WAMmDGoF03CyzBpm9G9Y39jANwK0WRxMw4qorIeobYtefcRRM6tX7pnQ+fBKAVLDV+15 OhPg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="BHC/oj5X"; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-162606-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-162606-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id ff25-20020a05622a4d9900b0043a14802390si15674601qtb.658.2024.04.29.08.45.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Apr 2024 08:45:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-162606-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="BHC/oj5X"; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-162606-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-162606-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 383231C21B36 for ; Mon, 29 Apr 2024 15:45:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8E5BD8289E; Mon, 29 Apr 2024 15:45:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="BHC/oj5X" Received: from mail-oo1-f52.google.com (mail-oo1-f52.google.com [209.85.161.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 26D0B82498; Mon, 29 Apr 2024 15:45:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.161.52 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714405504; cv=none; b=cai1IluAkRRAo/aDcPbPxlMsfozrB2dibPBbqs7kyEXB3TNxYzYeR7pmJIVlIIHkmPeyO6W3cU37GpYCHqSZtyG8EreokjUMYiqCp29OgM1MgMbYMPSlKMei1FJFPpE3z/YxuZIkOLoyUnrVzyEWK0rV2plHh5Om0e+eE4/cKR0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714405504; c=relaxed/simple; bh=XwzkrXLO6vx+SR42imzQ68UrIetXiXjTzt8yHJHoysk=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=LFK9Q7gqfGZZFQ7JCVae5+F9UxIxUk25G/zlBetaVXc/TetTAggo5Lrn7XzrxAwe4gFELaarsFGQAy5uNAgWztwQqdOrvxQGT5xTGcE6FulBJMpSU2/Rrpc7LraMmGXrMv9LYylO7Ty7Px+sCIhxbCp3qEgbj5T6InEgHN73q/E= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=BHC/oj5X; arc=none smtp.client-ip=209.85.161.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-oo1-f52.google.com with SMTP id 006d021491bc7-5ad2da2196aso3136103eaf.2; Mon, 29 Apr 2024 08:45:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1714405502; x=1715010302; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=jsixJocqKRrJSdTlkXXMM1uFnu6GRPalHDiE6LQw+iA=; b=BHC/oj5XKFWx5sR52jh7JP7rnTERuscqx0p3GVe66ow0ChiIu7bcNu4h+3B4Dict1z vuw6H3LQs5MOykkPsxKbCyCKlmfqUaM9ZwmBCuqB65V+gz5boPWr3eNyPNtIEIRdV/hh k51x0CLVJeof09F0AmD/QTiA9q6ms2jtcw+f3inkPYNNpfFd1uYiQojUsiqxizU2Eh1b QJtDfl3g7C2CkfVPgjnpRxXbj1mLanv5odJEl9s7eUbVpKKMmsDfeSx3/ZWhXD0rj8fs lSdO0h/JIFEX3TE4OkER/eQSL8yFVnzuF0bZA4OUsWw6PhC6HXnig8nftV1xtRH4I49H z/LA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714405502; x=1715010302; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=jsixJocqKRrJSdTlkXXMM1uFnu6GRPalHDiE6LQw+iA=; b=LYasco//IQ7W1FFxWtsAFcl3ui7BAlDr9EbhB5S2d2qXoX9Bk9cLaGLk6fhMMEOv4s YfNOQ2BMCRZRUSVHrt7YUtJhbeBcQV7k8g27xsUwrlJbn2IoNhETe1kk3RuoFG5tSjkL HdW5JyaWVb1LSNO6bQD0rIvEvZ5Kiiyu/6ugEt7g8fdLkmifyD+NQwvjRCs5wpi/JUTn QkrnBjZHR/8P7m/eIG394u2QfgC/RGsPsbpR553KEOaVxRarM2lCeT6e4bmfkWoIzDzI WEAlm6RbFn212dX+RBWxTel/ruVVdAibkigSH0rP38N6gE/QZ7r5tk375fmKM0z/MbCi w4nw== X-Forwarded-Encrypted: i=1; AJvYcCWdVaB1+uHAyoqB0A332K/8dPn6OTzXdAEhzp21TILD+vieo2FmPmypZrU09qq3ubUy+mUsKtqmVxWOejYswWlLh+3bCRFV4OZRvjbD3FZyPbsBEKj2tyFnxdZMLI3eluhBG9D0B2w6Zw== X-Gm-Message-State: AOJu0YxDKLsIF2WMwwJ/6JQxoLM9bgusc+OUNXpDxnw5AgDwl1EcNuad 8+q9Vc8DZfHfJ9ghNlAyuPZylLmYSqeQ5aN+0n6JtVCFz58yeRiQ X-Received: by 2002:a05:6358:990:b0:186:3c3:b40f with SMTP id t16-20020a056358099000b0018603c3b40fmr9375082rwi.20.1714405501887; Mon, 29 Apr 2024 08:45:01 -0700 (PDT) Received: from kousik.local ([2405:201:c006:31f8:99f3:b2ed:50d6:5ff8]) by smtp.gmail.com with ESMTPSA id s27-20020a63525b000000b006008ee7e805sm13125169pgl.30.2024.04.29.08.44.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Apr 2024 08:45:01 -0700 (PDT) From: Kousik Sanagavarapu To: Mark Brown , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: linux-spi@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Shuah Khan , Javier Carrasco , Kousik Sanagavarapu Subject: [PATCH v2] spi: dt-bindings: ti,qspi: convert to dtschema Date: Mon, 29 Apr 2024 21:14:21 +0530 Message-ID: <20240429154443.5907-1-five231003@gmail.com> X-Mailer: git-send-email 2.45.0.rc1.8.ge326e52010 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Convert txt binding of TI's qspi controller (found on their omap SoCs) to dtschema to allow for validation. The changes, w.r.t. the original txt binding, are: - Introduce "clocks" and "clock-names" which was never mentioned. - Reflect that "ti,hwmods" is deprecated and is not a "required" property anymore. - Introduce "num-cs" which allows for setting the number of chip selects. - Drop "qspi_ctrlmod". Signed-off-by: Kousik Sanagavarapu --- .../devicetree/bindings/spi/ti,qspi.yaml | 94 +++++++++++++++++++ .../devicetree/bindings/spi/ti_qspi.txt | 53 ----------- 2 files changed, 94 insertions(+), 53 deletions(-) create mode 100644 Documentation/devicetree/bindings/spi/ti,qspi.yaml delete mode 100644 Documentation/devicetree/bindings/spi/ti_qspi.txt diff --git a/Documentation/devicetree/bindings/spi/ti,qspi.yaml b/Documentation/devicetree/bindings/spi/ti,qspi.yaml new file mode 100644 index 000000000000..77cabd7158f5 --- /dev/null +++ b/Documentation/devicetree/bindings/spi/ti,qspi.yaml @@ -0,0 +1,94 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/spi/ti,qspi.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: TI QSPI controller + +maintainers: + - Kousik Sanagavarapu + +allOf: + - $ref: spi-controller.yaml# + +properties: + compatible: + enum: + - ti,am4372-qspi + - ti,dra7xxx-qspi + + reg: + items: + - description: base registers + - description: mapped memory + + reg-names: + items: + - const: qspi_base + - const: qspi_mmap + + clocks: + maxItems: 1 + + clock-names: + items: + - const: fck + + interrupts: + maxItems: 1 + + num-cs: + maxItems: 1 + + ti,hwmods: + description: + Name of the hwmod associated to the QSPI. This is for legacy + platforms only. + $ref: /schemas/types.yaml#/definitions/string + deprecated: true + + syscon-chipselects: + description: + Handle to system control region contains QSPI chipselect register + and offset of that register. + $ref: /schemas/types.yaml#/definitions/phandle-array + items: + items: + - description: phandle to system control register + - description: register offset + + spi-max-frequency: + description: Maximum SPI clocking speed of the controller in Hz. + $ref: /schemas/types.yaml#/definitions/uint32 + +required: + - compatible + - reg + - reg-names + - clocks + - clock-names + - interrupts + +unevaluatedProperties: false + +examples: + - | + #include + #include + + qspi: spi@0 { + compatible = "ti,dra7xxx-qspi"; + reg = <0x4b300000 0x100>, + <0x5c000000 0x4000000>; + reg-names = "qspi_base", "qspi_mmap"; + syscon-chipselects = <&scm_conf 0x558>; + #address-cells = <1>; + #size-cells = <0>; + clocks = <&l4per2_clkctrl DRA7_L4PER2_QSPI_CLKCTRL 25>; + clock-names = "fck"; + num-cs = <4>; + spi-max-frequency = <48000000>; + interrupts = ; + }; +... diff --git a/Documentation/devicetree/bindings/spi/ti_qspi.txt b/Documentation/devicetree/bindings/spi/ti_qspi.txt deleted file mode 100644 index 47b184bce414..000000000000 --- a/Documentation/devicetree/bindings/spi/ti_qspi.txt +++ /dev/null @@ -1,53 +0,0 @@ -TI QSPI controller. - -Required properties: -- compatible : should be "ti,dra7xxx-qspi" or "ti,am4372-qspi". -- reg: Should contain QSPI registers location and length. -- reg-names: Should contain the resource reg names. - - qspi_base: Qspi configuration register Address space - - qspi_mmap: Memory mapped Address space - - (optional) qspi_ctrlmod: Control module Address space -- interrupts: should contain the qspi interrupt number. -- #address-cells, #size-cells : Must be present if the device has sub-nodes -- ti,hwmods: Name of the hwmod associated to the QSPI - -Recommended properties: -- spi-max-frequency: Definition as per - Documentation/devicetree/bindings/spi/spi-bus.txt - -Optional properties: -- syscon-chipselects: Handle to system control region contains QSPI - chipselect register and offset of that register. - -NOTE: TI QSPI controller requires different pinmux and IODelay -parameters for Mode-0 and Mode-3 operations, which needs to be set up by -the bootloader (U-Boot). Default configuration only supports Mode-0 -operation. Hence, "spi-cpol" and "spi-cpha" DT properties cannot be -specified in the slave nodes of TI QSPI controller without appropriate -modification to bootloader. - -Example: - -For am4372: -qspi: qspi@47900000 { - compatible = "ti,am4372-qspi"; - reg = <0x47900000 0x100>, <0x30000000 0x4000000>; - reg-names = "qspi_base", "qspi_mmap"; - #address-cells = <1>; - #size-cells = <0>; - spi-max-frequency = <25000000>; - ti,hwmods = "qspi"; -}; - -For dra7xx: -qspi: qspi@4b300000 { - compatible = "ti,dra7xxx-qspi"; - reg = <0x4b300000 0x100>, - <0x5c000000 0x4000000>, - reg-names = "qspi_base", "qspi_mmap"; - syscon-chipselects = <&scm_conf 0x558>; - #address-cells = <1>; - #size-cells = <0>; - spi-max-frequency = <48000000>; - ti,hwmods = "qspi"; -}; -- 2.45.0.rc1.8.ge326e52010