From patchwork Thu Aug 29 20:13:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 13783795 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 862FEC87FD2 for ; Thu, 29 Aug 2024 20:14:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=S6mAKO1L7Uf6xB6FLQZsVDkDOLx5WJyRN8bRA71hTC8=; b=qPh2HTDOa0goXgVmNsNEyb5Teo BvZ2IYlJHmXzzRHvpWqcZc8N+Uh+2Yp4QUj9fM7UV5deulZ0CgzXo0lwgLzg4lvnIGfxdQpt99Lli 6gM4QbeO092KL7bmSuQo+esr1JBOpoGy3MYiujnVeMfwqxWyfouNy3OnsdcXl9S64FL8Wvbd3LwoK EkerJIv8qBA8HpjkdSL8mVtPGL+1UuBVfm3BdT9MjKv20a55Wg/F5g4rlzXvg/WAUf1j1xIzPWpnj jBgQ2ogvM5vkErHREvUt06xjcVzeCIbGYmRRst8AKUYLMixUaNlRjgpBXmOKm4WArlW9spALbNMJh 7yAkcZ/w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sjlX7-00000003V8N-3eWm; Thu, 29 Aug 2024 20:14:17 +0000 Received: from mail-pl1-x62e.google.com ([2607:f8b0:4864:20::62e]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sjlWF-00000003Uzj-3TUF for linux-arm-kernel@lists.infradead.org; Thu, 29 Aug 2024 20:13:25 +0000 Received: by mail-pl1-x62e.google.com with SMTP id d9443c01a7336-2020e83eca1so11468225ad.2 for ; Thu, 29 Aug 2024 13:13:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1724962403; x=1725567203; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=S6mAKO1L7Uf6xB6FLQZsVDkDOLx5WJyRN8bRA71hTC8=; b=Dkr3wNxd2+apByKk2CZFzFUlpO9A0wGgO4/cB6dhQydN+JW3EdnEcoN1kJLFCDzxlc jFqxfxVf0xPRcUduaoYiVyMYRvUFWxrX55EzOaSd1sHS2Z+xHcijbDMzXqrwfsNcSUXw G+9vaQ1xlXfFOA8aqjjny3XHFCibZ2tEs4jTKYtLZ2dnTUJ1bIYh72VP7ege7VwmJ+4b Fon6QE2WW5iCTyGF/czKVFNt/2SLqGEG2aXFATcqDMwyJFwjDUyGDuEQXGuWeJLXN2Bb 9mPc0MgGQlAb2D6frW6ySNtpab3OPOZkmXkkr9gKMiyS9Ycz2zmIRwSSgwmMwa684eLn UEqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724962403; x=1725567203; 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=S6mAKO1L7Uf6xB6FLQZsVDkDOLx5WJyRN8bRA71hTC8=; b=Gs7Hvu4YOdWjHKdyts9YQk/Z3gsL20sDApylVOVZ1pgIpIAW8xCeFP2flJNJhiyyTW LRVEIGJ3h1xOI5xA4xGIUXj+9Ud2zXtgw3gzvEE6EKPU6O5M5n388Ud7iyd0huc6fkeL V+MsAayOzNE9XINTsUbFtWzkRlDPnTUBMiMi5eJA5OjhOpHDfDKYd5zxYiYUyXygcjUE E/ux5hOToUPY+25mhPdDk3TjRdPFNQbn92KArzu1a4UQlv9IaO2V+h/zj5L9aH9dnPde 8T+gHTPpkCTTOZZ1yu3p6IbGTXvNuItU0Cx02EFrD66t9U1shsMPjFPV7uo0X9cl6030 NRHA== X-Forwarded-Encrypted: i=1; AJvYcCVsoq5GdeJXaY2oB18q37eVLv75uy1a4TpI2szjoQElf4z3epl3v8k8r9QciAX4QeazUdMAj3hvnIiNeEiLKh5i@lists.infradead.org X-Gm-Message-State: AOJu0Yz1nmQIIUydmLrT6zr+CaPkbtCOwsznTv/83En3DvdVNrqU9XaN 8XYVwS90+eu2dkufQmqGBAoCDF3J7vtnAfctouyTiprUBy9xtaoz X-Google-Smtp-Source: AGHT+IH3vovA0aK2ROQvRVWqCjQk4AzK9ChEhdjzl/8ASQriXDaGXSy+YkvE6tK0BY2r9Hbjf0e2pA== X-Received: by 2002:a17:902:d505:b0:1fc:6a13:a394 with SMTP id d9443c01a7336-2050c23829amr45616425ad.23.1724962402708; Thu, 29 Aug 2024 13:13:22 -0700 (PDT) Received: from fabio-Precision-3551.. ([2804:14c:485:4b61:adb0:3b7e:78c6:e307]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-205227baebfsm1996165ad.247.2024.08.29.13.13.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Aug 2024 13:13:22 -0700 (PDT) From: Fabio Estevam To: broonie@kernel.org Cc: linux-spi@vger.kernel.org, otavio.salvador@ossystems.com.br, heiko@sntech.de, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Fabio Estevam Subject: [PATCH 1/2] spi: dt-bindings: spi-peripheral-props: Document spi-cpha and spi-cpol Date: Thu, 29 Aug 2024 17:13:14 -0300 Message-Id: <20240829201315.3412759-1-festevam@gmail.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240829_131323_887587_32C5E338 X-CRM114-Status: UNSURE ( 9.51 ) X-CRM114-Notice: Please train this message. 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The 'spi-cpha' and 'spi-cpol' are commonly used SPI peripheral properties that indicate the device clock phase and polarity. Document these properties. Signed-off-by: Fabio Estevam --- .../devicetree/bindings/spi/spi-peripheral-props.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Documentation/devicetree/bindings/spi/spi-peripheral-props.yaml b/Documentation/devicetree/bindings/spi/spi-peripheral-props.yaml index 0bb443b8decd..b2e2717f3619 100644 --- a/Documentation/devicetree/bindings/spi/spi-peripheral-props.yaml +++ b/Documentation/devicetree/bindings/spi/spi-peripheral-props.yaml @@ -29,6 +29,16 @@ properties: description: Chip select used by the device. + spi-cpha: + $ref: /schemas/types.yaml#/definitions/flag + description: + The device data is sampled on trailing (last) edge of the SPI clock. + + spi-cpol: + $ref: /schemas/types.yaml#/definitions/flag + description: + The device clock has a falling lead (first) edge. + spi-cs-high: $ref: /schemas/types.yaml#/definitions/flag description: From patchwork Thu Aug 29 20:13:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 13783796 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 8940BC87FD2 for ; Thu, 29 Aug 2024 20:15:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=gwbWHd0cDt9rHGYesRh2eerLPT3bUxEuEt4XCIRM5Rk=; b=4N+98TCYkB0dWofnXBdOxyjlJz tSLFrm3/ph7P2/JiUq5EQoS1aQaZ2Ympmgr5pTuKsEKGIyfoNiK4YaDQQ67rc0RO/2Ahr4MiJS7pS EtdwUzb0vlEWd/31dMqEbLyx1IWQI2bDTNgHvKhsHoThSeYkuUcRBJk1Zhy3jve23tdV1nsKPjt2+ lz7JPqYqKU+edJquVL5Kq+ovRLpZwmKOeW95ZjoS0V8UowZniQnMfc+g+8HEzE6yHDhhXTmk0Md1V xmnEfgg/iMynLvrp54zhn8wIU/48y39fHNhV6QHt06yCBydyN1Sm24PCBgCY050FRhAt3Qc2EEOt5 lmg/AurA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sjlXv-00000003VE7-3DWt; Thu, 29 Aug 2024 20:15:07 +0000 Received: from mail-pl1-x630.google.com ([2607:f8b0:4864:20::630]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sjlWJ-00000003V09-0VGw for linux-arm-kernel@lists.infradead.org; Thu, 29 Aug 2024 20:13:28 +0000 Received: by mail-pl1-x630.google.com with SMTP id d9443c01a7336-20231aa8908so8449645ad.0 for ; Thu, 29 Aug 2024 13:13:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1724962406; x=1725567206; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=gwbWHd0cDt9rHGYesRh2eerLPT3bUxEuEt4XCIRM5Rk=; b=VhOfO9nXWbriYo8ZZQMXxUty7eA41Uhfi8x9p7Z7ATOWtV/8ZOJXTDcpTwhjk+qUcy +SXDaTKR1qydydAzEaCtyPuwr+zty2AK5LkHxbNrFHrwSgrCDrr/b3Qiy2j3sulHFHyR LZxvolsppkbEVW68TnlD4c+pg2PnmmWn2+jcgcpDIJda5XLhC5+a26xDtltpgBZv4bG2 7cO6kNsoOlbW+IB4uRs/iKvS0BZou+3xVTsZxLy8P3VFkjyBOvcwh93XCf9fDfGmOBGT +kt36KS2iASeb4t51jfOeHmIZkz8cdlv4ZLGZNrRJ4SVCPfxQxsoH4nWTHdKrt0H/QuD I4jA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724962406; x=1725567206; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=gwbWHd0cDt9rHGYesRh2eerLPT3bUxEuEt4XCIRM5Rk=; b=oHVuOIbyWjskwWiRiH0d4t2iXkl3WtvBpezNjFkjlaeTH7bghYwhr4sBSIPkz6nu1a 8FkLfo2YawG9sUW+EIS191jNlPWkLj+Tx8iG+fJgm8X+mnHfMKKT4yezAFJXPKOM1mt9 dlYmerjHScLJJ9j3UikfeyfTaUCdvzPZZz/vOwShYN+aYagJWngM8x2S/0KhdaP4Dpuq MjuNxJJpy1UWkon0oEffkcj4o93fugQ0iMxafm6YswSaOgtz4j7J2zb3m1wlkSCw7nGB qaYrvPCqOVOmH5xCQ1e2pPjSsC9evOtsJMERJViibVCLC/FBvBpdl5i+R78BIGp9CS45 2HUA== X-Forwarded-Encrypted: i=1; AJvYcCW6VUWhHP1y7nijqz2HcaPjnRekkvFIRFZPgHWg7EBKAKr1ejI7zSojkZNIoQbPTe31XoAkniXRZ1vJfOZteYzN@lists.infradead.org X-Gm-Message-State: AOJu0YzvKc+EhnibKUeaFYWWsJsKf7nnx3ZL6cMuX/oY7am/dwr4SbRg 5DUTFIFWyCGWrCrVMGAqR2C0rTUq81rzxDTDCZSfp6Z85AIDlMIk X-Google-Smtp-Source: AGHT+IEDHHfIcbkJ+uwAz+VEEEsikiPRJIBefPjv3c1giYb/w15xknSqQESj74XPGmD4x1zbc8aVVQ== X-Received: by 2002:a17:903:2449:b0:202:3174:9d53 with SMTP id d9443c01a7336-2050c3e3063mr44940855ad.30.1724962406110; Thu, 29 Aug 2024 13:13:26 -0700 (PDT) Received: from fabio-Precision-3551.. ([2804:14c:485:4b61:adb0:3b7e:78c6:e307]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-205227baebfsm1996165ad.247.2024.08.29.13.13.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Aug 2024 13:13:25 -0700 (PDT) From: Fabio Estevam To: broonie@kernel.org Cc: linux-spi@vger.kernel.org, otavio.salvador@ossystems.com.br, heiko@sntech.de, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Fabio Estevam Subject: [PATCH 2/2] dt-bindings: trivial-devices: Add a reference to spi-peripheral-props.yaml Date: Thu, 29 Aug 2024 17:13:15 -0300 Message-Id: <20240829201315.3412759-2-festevam@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240829201315.3412759-1-festevam@gmail.com> References: <20240829201315.3412759-1-festevam@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240829_131327_178591_73FE24D5 X-CRM114-Status: GOOD ( 11.93 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org There may be cases where a trivial-device needs to describe the SPI clock polarity and phase via spi-cpol and spi-cpha properties. Add a reference to spi-peripheral-props.yaml to allow that. Suggested-by: Rob Herring Signed-off-by: Fabio Estevam --- Documentation/devicetree/bindings/trivial-devices.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/trivial-devices.yaml b/Documentation/devicetree/bindings/trivial-devices.yaml index 75a5fad08c44..356b89ade6a8 100644 --- a/Documentation/devicetree/bindings/trivial-devices.yaml +++ b/Documentation/devicetree/bindings/trivial-devices.yaml @@ -424,6 +424,9 @@ required: - compatible - reg -additionalProperties: false +allOf: + - $ref: /schemas/spi/spi-peripheral-props.yaml# + +unevaluatedProperties: false ...