From nobody Tue Jun 30 19:08:29 2026 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 E89FAC433FE for ; Tue, 11 Jan 2022 10:13:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348687AbiAKKNs (ORCPT ); Tue, 11 Jan 2022 05:13:48 -0500 Received: from smtp-relay-internal-1.canonical.com ([185.125.188.123]:41820 "EHLO smtp-relay-internal-1.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237533AbiAKKNo (ORCPT ); Tue, 11 Jan 2022 05:13:44 -0500 Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) (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-1.canonical.com (Postfix) with ESMTPS id B859F3F1A2 for ; Tue, 11 Jan 2022 10:13:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1641896023; bh=QVrXucYojgYJ3MvsfMwPKw5wo2fuH+ML9mi4xwVkLOQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Gq3lptDrM/UFNL9K/3/ZPoRFEhBHvgw1ITCAoyZg4SnJETIO2T1/FyDwqprOXD/Fx 6zzIyZsk/Cgn2u4PV/YlwPm29ifz3M2F9PJEO4148SQU9Taz5x1Rfi312DkzHOVrrm 5wExd6u9BCtdwMVRJ3X/iPAdbfQ9JvCaH2xVR4+L2Xbt/Y87OG1oKc7Q77l221q2yZ Ums6GX+gyFc05V2sYbqIYNcbvzqJUMfR+D3Y69Tvf2LiOWstlsifpfS5LSJM3IOJkS 78PSXHOr5UllMBjS9w/xpcl84wPnZp1z/yq77L4vovd04hbfEG39y9x3fyi+xX+Cey UUJc/IVigvU/Q== Received: by mail-ed1-f69.google.com with SMTP id i9-20020a05640242c900b003fe97faab62so3029022edc.9 for ; Tue, 11 Jan 2022 02:13:43 -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:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=QVrXucYojgYJ3MvsfMwPKw5wo2fuH+ML9mi4xwVkLOQ=; b=6Kz6VH6+JWH04SInhgb12ArFWJKZnG0pav9+beVzGDPGe1zGxdQYMlNBMgpwXNSB54 ebSyZh7niwhh1s4nHvlcO5+wkcMC0mQWZnGoN5jkkvoS6xu/JIBH+6e9qZ/mi5AHBIzu lh9wq0mkrM4/DkyZjmHAJ/5DA6OmKDcA9IGD4VN5nGyMDiOt3LgcvbhrKLi4OzqU9GAG ARw6mlt0VhKZVeNE23bclAUZ7fs0JL3iglzHk08H0B6u2M6LWYxvsfkeCygj7ywIc/Mb rdl37l3DTFKcBBIz5sZqOr+6Q/f8Ab9GlhSZNPxAw+Y4Y/Q9fzlTayz+JNv5KfZFvCGQ Etdw== X-Gm-Message-State: AOAM533t+Vqd+1uR2aLKX2E7cpO1LKuxjw+f6bTBAoDmW+fc0rJgxGPp 41q5cAquxepVkXT8k4QOAUyAcN6tVOhddxaVBSyTHuNfQ6Yi1ewJTDhbOz02iQicgQ8DtvIQxe7 N1r3KdmOYwzUf/Qq5BaNTCfAZ40EeYwyaXMQEuPjYZA== X-Received: by 2002:aa7:df8f:: with SMTP id b15mr3664567edy.315.1641896022753; Tue, 11 Jan 2022 02:13:42 -0800 (PST) X-Google-Smtp-Source: ABdhPJzpyMwCXUtd7Y6AQyuZuNoCVyccezBv3KC5C5r5rIpS2xwUTuoqjT0UFg4qT8tvTh/Gn938UA== X-Received: by 2002:aa7:df8f:: with SMTP id b15mr3664549edy.315.1641896022625; Tue, 11 Jan 2022 02:13:42 -0800 (PST) Received: from localhost.localdomain (xdsl-188-155-168-84.adslplus.ch. [188.155.168.84]) by smtp.gmail.com with ESMTPSA id 26sm3431268ejk.138.2022.01.11.02.13.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Jan 2022 02:13:42 -0800 (PST) From: Krzysztof Kozlowski To: Krzysztof Kozlowski , Andi Shyti , Mark Brown , Rob Herring , Pratyush Yadav , linux-spi@vger.kernel.org, linux-samsung-soc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: Sam Protsenko Subject: [PATCH v2 1/4] ARM: dts: exynos: split dmas into array of phandles in Exynos5250 Date: Tue, 11 Jan 2022 11:13:35 +0100 Message-Id: <20220111101338.58630-2-krzysztof.kozlowski@canonical.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220111101338.58630-1-krzysztof.kozlowski@canonical.com> References: <20220111101338.58630-1-krzysztof.kozlowski@canonical.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" "dmas" property should be rather an array of phandles, as dtschema points. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Andi Shyti --- arch/arm/boot/dts/exynos5250.dtsi | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/arch/arm/boot/dts/exynos5250.dtsi b/arch/arm/boot/dts/exynos52= 50.dtsi index 139778928b93..102bb57bf704 100644 --- a/arch/arm/boot/dts/exynos5250.dtsi +++ b/arch/arm/boot/dts/exynos5250.dtsi @@ -496,8 +496,7 @@ spi_0: spi@12d20000 { status =3D "disabled"; reg =3D <0x12d20000 0x100>; interrupts =3D ; - dmas =3D <&pdma0 5 - &pdma0 4>; + dmas =3D <&pdma0 5>, <&pdma0 4>; dma-names =3D "tx", "rx"; #address-cells =3D <1>; #size-cells =3D <0>; @@ -512,8 +511,7 @@ spi_1: spi@12d30000 { status =3D "disabled"; reg =3D <0x12d30000 0x100>; interrupts =3D ; - dmas =3D <&pdma1 5 - &pdma1 4>; + dmas =3D <&pdma1 5>, <&pdma1 4>; dma-names =3D "tx", "rx"; #address-cells =3D <1>; #size-cells =3D <0>; @@ -528,8 +526,7 @@ spi_2: spi@12d40000 { status =3D "disabled"; reg =3D <0x12d40000 0x100>; interrupts =3D ; - dmas =3D <&pdma0 7 - &pdma0 6>; + dmas =3D <&pdma0 7>, <&pdma0 6>; dma-names =3D "tx", "rx"; #address-cells =3D <1>; #size-cells =3D <0>; --=20 2.32.0 From nobody Tue Jun 30 19:08:29 2026 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 B3F33C433FE for ; Tue, 11 Jan 2022 10:13:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348869AbiAKKNt (ORCPT ); Tue, 11 Jan 2022 05:13:49 -0500 Received: from smtp-relay-internal-1.canonical.com ([185.125.188.123]:41842 "EHLO smtp-relay-internal-1.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348610AbiAKKNp (ORCPT ); Tue, 11 Jan 2022 05:13:45 -0500 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-1.canonical.com (Postfix) with ESMTPS id 7E60140048 for ; Tue, 11 Jan 2022 10:13:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1641896024; bh=ThvMajJuayiGnhwMDmba8JeXZG0rsrmwNZIGtzPQ/RY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=nFZliJWV3adC2RRlQpUInbI4gfND/IOQ/Ym5r64vUCZKDOrJBBGmuG8Wj2tmbj20R IqgfT+M3NgArUtfbfxoPrxO+FsCNR3XSfZ1TEG0teTYq9PjfsAMf37JGEP6g6CfXLW bTAhWnuacG3c592hODVP69TrgAQ3/wR24XG4YCPeMv7npSJD1Szow4y4nDRteCWAey Sfn26+cA7yBX+wbdMftLPQ999WBTJdQGmVXZzo1ukW1f/AfPLdM7RyBcAFYT9MP8cL 6Zf/tJxARADYRhtQjz6IWwEvN0pDx329apoQoTN7DvhpqqYX4SE2iUMZgMrVepi0qU TeXMyO8yo6yJQ== Received: by mail-ed1-f72.google.com with SMTP id p8-20020aa7d308000000b003fe9b0c4760so2704090edq.17 for ; Tue, 11 Jan 2022 02:13:44 -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:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ThvMajJuayiGnhwMDmba8JeXZG0rsrmwNZIGtzPQ/RY=; b=0lPJC7he8KRqu8NPo8m5jxtryb6Pt594rXbFOdCal8yf9ezikiU5D5Jx8gMjsAYgIR ZzYw5OV2lboTxZdhvkswtUwFVUlQxW6oFADusYO+o1mWF1U4leIltSv21za1YTj77UCL CNoVFHYE9EHiX8oIBhsByhD5RF/q3a+LacCuoX+FBcHz3CT/LgY4iEHjBeYPV1SCoy3d v6ptLAH5q3/q8PrrCsPbnyOiHPqFSLMPEguYYw6tJpmDEFQqQeP0V/TMSs2TQ6jTl91K g65blVXtnBnTt4zmRX6hSbrFexzijmIlXO+Jh0Zsfp2ewexqLD6LcdJrmq9bzQLzsxIr z6Wg== X-Gm-Message-State: AOAM532mDUS7wx90hbAMRvzjxZGLsyxpdmcyysAP9mf99rc6WSd/QqN+ 6JPM6pMNnAF0LmPCPgvi1jDDnj+pCZDjtu73RDmbx/7mbEceiVwZrF4lyWjziW6vzvPSlCY7Ds5 THbPkafz91gzd3fVvKt+Y7X6yJigBB5piDSjZauizhQ== X-Received: by 2002:aa7:d59a:: with SMTP id r26mr3550690edq.199.1641896024005; Tue, 11 Jan 2022 02:13:44 -0800 (PST) X-Google-Smtp-Source: ABdhPJwA97RIXrJ/+ksAAAvr4fwIMKw+83j3EKBrhTEksTeGn0/IAf4kA2jFrVToGwub5YSosbiaFA== X-Received: by 2002:aa7:d59a:: with SMTP id r26mr3550668edq.199.1641896023644; Tue, 11 Jan 2022 02:13:43 -0800 (PST) Received: from localhost.localdomain (xdsl-188-155-168-84.adslplus.ch. [188.155.168.84]) by smtp.gmail.com with ESMTPSA id 26sm3431268ejk.138.2022.01.11.02.13.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Jan 2022 02:13:43 -0800 (PST) From: Krzysztof Kozlowski To: Krzysztof Kozlowski , Andi Shyti , Mark Brown , Rob Herring , Pratyush Yadav , linux-spi@vger.kernel.org, linux-samsung-soc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: Sam Protsenko Subject: [PATCH v2 2/4] spi: dt-bindings: samsung: convert to dtschema Date: Tue, 11 Jan 2022 11:13:36 +0100 Message-Id: <20220111101338.58630-3-krzysztof.kozlowski@canonical.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220111101338.58630-1-krzysztof.kozlowski@canonical.com> References: <20220111101338.58630-1-krzysztof.kozlowski@canonical.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Convert the Samsung SoC (S3C24xx, S3C64xx, S5Pv210, Exynos) SPI controller bindings to DT schema format Signed-off-by: Krzysztof Kozlowski Reviewed-by: Sam Protsenko --- .../spi/samsung,spi-peripheral-props.yaml | 35 ++++ .../devicetree/bindings/spi/samsung,spi.yaml | 198 ++++++++++++++++++ .../bindings/spi/spi-peripheral-props.yaml | 1 + .../devicetree/bindings/spi/spi-samsung.txt | 122 ----------- MAINTAINERS | 2 +- 5 files changed, 235 insertions(+), 123 deletions(-) create mode 100644 Documentation/devicetree/bindings/spi/samsung,spi-perip= heral-props.yaml create mode 100644 Documentation/devicetree/bindings/spi/samsung,spi.yaml delete mode 100644 Documentation/devicetree/bindings/spi/spi-samsung.txt diff --git a/Documentation/devicetree/bindings/spi/samsung,spi-peripheral-p= rops.yaml b/Documentation/devicetree/bindings/spi/samsung,spi-peripheral-pr= ops.yaml new file mode 100644 index 000000000000..aa5a1f48494b --- /dev/null +++ b/Documentation/devicetree/bindings/spi/samsung,spi-peripheral-props.ya= ml @@ -0,0 +1,35 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/spi/samsung,spi-peripheral-props.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Peripheral-specific properties for Samsung S3C/S5P/Exynos SoC SPI c= ontroller + +maintainers: + - Krzysztof Kozlowski + +description: + See spi-peripheral-props.yaml for more info. + +properties: + controller-data: + type: object + additionalProperties: false + + properties: + samsung,spi-feedback-delay: + description: | + The sampling phase shift to be applied on the miso line (to acco= unt + for any lag in the miso line). Valid values: + - 0: No phase shift. + - 1: 90 degree phase shift sampling. + - 2: 180 degree phase shift sampling. + - 3: 270 degree phase shift sampling. + $ref: /schemas/types.yaml#/definitions/uint32 + enum: [0, 1, 2, 3] + + required: + - samsung,spi-feedback-delay + +additionalProperties: true diff --git a/Documentation/devicetree/bindings/spi/samsung,spi.yaml b/Docum= entation/devicetree/bindings/spi/samsung,spi.yaml new file mode 100644 index 000000000000..da4533feb946 --- /dev/null +++ b/Documentation/devicetree/bindings/spi/samsung,spi.yaml @@ -0,0 +1,198 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/spi/samsung,spi.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Samsung S3C/S5P/Exynos SoC SPI controller + +maintainers: + - Krzysztof Kozlowski + +description: + All the SPI controller nodes should be represented in the aliases node u= sing + the following format 'spi{n}' where n is a unique number for the alias. + +properties: + compatible: + oneOf: + - enum: + - samsung,s3c2443-spi # for S3C2443, S3C2416 and S3C2450 + - samsung,s3c6410-spi + - samsung,s5pv210-spi # for S5PV210 and S5PC110 + - samsung,exynos5433-spi + - const: samsung,exynos7-spi + deprecated: true + + clocks: + minItems: 2 + maxItems: 3 + + clock-names: + minItems: 2 + maxItems: 3 + + cs-gpios: true + + dmas: + minItems: 2 + maxItems: 2 + + dma-names: + items: + - const: tx + - const: rx + + interrupts: + maxItems: 1 + + no-cs-readback: + description: + The CS line is disconnected, therefore the device should not operate + based on CS signalling. + type: boolean + + num-cs: + minimum: 1 + maximum: 4 + default: 1 + + samsung,spi-src-clk: + description: + If the spi controller includes a internal clock mux to select the cl= ock + source for the spi bus clock, this property can be used to indicate = the + clock to be used for driving the spi bus clock. If not specified, the + clock number 0 is used as default. + $ref: /schemas/types.yaml#/definitions/uint32 + default: 0 + + reg: + maxItems: 1 + +patternProperties: + "^.*@[0-9a-f]+$": + type: object + allOf: + - $ref: spi-peripheral-props.yaml + + required: + - controller-data + + unevaluatedProperties: false + +required: + - compatible + - clocks + - clock-names + - dmas + - dma-names + - interrupts + - reg + +allOf: + - $ref: spi-controller.yaml# + - if: + properties: + compatible: + contains: + const: samsung,exynos5433-spi + then: + properties: + clocks: + minItems: 3 + maxItems: 3 + clock-names: + items: + - const: spi + - enum: + - spi_busclk0 + - spi_busclk1 + - spi_busclk2 + - spi_busclk3 + - const: spi_ioclk + else: + properties: + clocks: + minItems: 2 + maxItems: 2 + clock-names: + items: + - const: spi + - enum: + - spi_busclk0 + - spi_busclk1 + - spi_busclk2 + - spi_busclk3 + +unevaluatedProperties: false + +examples: + - | + #include + #include + #include + #include + + spi@14d30000 { + compatible =3D "samsung,exynos5433-spi"; + reg =3D <0x14d30000 0x100>; + interrupts =3D ; + dmas =3D <&pdma0 11>, <&pdma0 10>; + dma-names =3D "tx", "rx"; + #address-cells =3D <1>; + #size-cells =3D <0>; + clocks =3D <&cmu_peric CLK_PCLK_SPI1>, + <&cmu_peric CLK_SCLK_SPI1>, + <&cmu_peric CLK_SCLK_IOCLK_SPI1>; + clock-names =3D "spi", + "spi_busclk0", + "spi_ioclk"; + samsung,spi-src-clk =3D <0>; + pinctrl-names =3D "default"; + pinctrl-0 =3D <&spi1_bus>; + num-cs =3D <1>; + + cs-gpios =3D <&gpd6 3 GPIO_ACTIVE_HIGH>; + + audio-codec@0 { + compatible =3D "wlf,wm5110"; + reg =3D <0x0>; + spi-max-frequency =3D <20000000>; + interrupt-parent =3D <&gpa0>; + interrupts =3D <4 IRQ_TYPE_NONE>; + clocks =3D <&pmu_system_controller 0>, + <&s2mps13_osc S2MPS11_CLK_BT>; + clock-names =3D "mclk1", "mclk2"; + + gpio-controller; + #gpio-cells =3D <2>; + interrupt-controller; + #interrupt-cells =3D <2>; + + wlf,micd-detect-debounce =3D <300>; + wlf,micd-bias-start-time =3D <0x1>; + wlf,micd-rate =3D <0x7>; + wlf,micd-dbtime =3D <0x2>; + wlf,micd-force-micbias; + wlf,micd-configs =3D <0x0 1 0>; + wlf,hpdet-channel =3D <1>; + wlf,gpsw =3D <0x1>; + wlf,inmode =3D <2 0 2 0>; + + wlf,reset =3D <&gpc0 7 GPIO_ACTIVE_HIGH>; + wlf,ldoena =3D <&gpf0 0 GPIO_ACTIVE_HIGH>; + + /* core supplies */ + AVDD-supply =3D <&ldo18_reg>; + DBVDD1-supply =3D <&ldo18_reg>; + CPVDD-supply =3D <&ldo18_reg>; + DBVDD2-supply =3D <&ldo18_reg>; + DBVDD3-supply =3D <&ldo18_reg>; + SPKVDDL-supply =3D <&ldo18_reg>; + SPKVDDR-supply =3D <&ldo18_reg>; + + controller-data { + samsung,spi-feedback-delay =3D <0>; + }; + }; + }; diff --git a/Documentation/devicetree/bindings/spi/spi-peripheral-props.yam= l b/Documentation/devicetree/bindings/spi/spi-peripheral-props.yaml index 5dd209206e88..df885eeb144f 100644 --- a/Documentation/devicetree/bindings/spi/spi-peripheral-props.yaml +++ b/Documentation/devicetree/bindings/spi/spi-peripheral-props.yaml @@ -85,5 +85,6 @@ properties: # The controller specific properties go here. allOf: - $ref: cdns,qspi-nor-peripheral-props.yaml# + - $ref: samsung,spi-peripheral-props.yaml# =20 additionalProperties: true diff --git a/Documentation/devicetree/bindings/spi/spi-samsung.txt b/Docume= ntation/devicetree/bindings/spi/spi-samsung.txt deleted file mode 100644 index 49028a4f5df1..000000000000 --- a/Documentation/devicetree/bindings/spi/spi-samsung.txt +++ /dev/null @@ -1,122 +0,0 @@ -* Samsung SPI Controller - -The Samsung SPI controller is used to interface with various devices such = as flash -and display controllers using the SPI communication interface. - -Required SoC Specific Properties: - -- compatible: should be one of the following. - - samsung,s3c2443-spi: for s3c2443, s3c2416 and s3c2450 platforms - - samsung,s3c6410-spi: for s3c6410 platforms - - samsung,s5pv210-spi: for s5pv210 and s5pc110 platforms - - samsung,exynos5433-spi: for exynos5433 compatible controllers - - samsung,exynos7-spi: for exynos7 platforms - -- reg: physical base address of the controller and length of memory mapped - region. - -- interrupts: The interrupt number to the cpu. The interrupt specifier for= mat - depends on the interrupt controller. - -- dmas : Two or more DMA channel specifiers following the convention outli= ned - in bindings/dma/dma.txt - -- dma-names: Names for the dma channels. There must be at least one channel - named "tx" for transmit and named "rx" for receive. - -- clocks: specifies the clock IDs provided to the SPI controller; they are - required for interacting with the controller itself, for synchronizing t= he bus - and as I/O clock (the latter is required by exynos5433 and exynos7). - -- clock-names: string names of the clocks in the 'clocks' property; for al= l the - the devices the names must be "spi", "spi_busclkN" (where N is determine= d by - "samsung,spi-src-clk"), while Exynos5433 should specify a third clock - "spi_ioclk" for the I/O clock. - -Required Board Specific Properties: - -- #address-cells: should be 1. -- #size-cells: should be 0. - -Optional Board Specific Properties: - -- samsung,spi-src-clk: If the spi controller includes a internal clock mux= to - select the clock source for the spi bus clock, this property can be used= to - indicate the clock to be used for driving the spi bus clock. If not spec= ified, - the clock number 0 is used as default. - -- num-cs: Specifies the number of chip select lines supported. If - not specified, the default number of chip select lines is set to 1. - -- cs-gpios: should specify GPIOs used for chipselects (see spi-bus.txt) - -- no-cs-readback: the CS line is disconnected, therefore the device should= not - operate based on CS signalling. - -SPI Controller specific data in SPI slave nodes: - -- The spi slave nodes should provide the following information which is re= quired - by the spi controller. - - - samsung,spi-feedback-delay: The sampling phase shift to be applied on = the - miso line (to account for any lag in the miso line). The following are= the - valid values. - - - 0: No phase shift. - - 1: 90 degree phase shift sampling. - - 2: 180 degree phase shift sampling. - - 3: 270 degree phase shift sampling. - -Aliases: - -- All the SPI controller nodes should be represented in the aliases node u= sing - the following format 'spi{n}' where n is a unique number for the alias. - - -Example: - -- SoC Specific Portion: - - spi_0: spi@12d20000 { - compatible =3D "samsung,exynos4210-spi"; - reg =3D <0x12d20000 0x100>; - interrupts =3D <0 66 0>; - dmas =3D <&pdma0 5 - &pdma0 4>; - dma-names =3D "tx", "rx"; - #address-cells =3D <1>; - #size-cells =3D <0>; - }; - -- Board Specific Portion: - - spi_0: spi@12d20000 { - #address-cells =3D <1>; - #size-cells =3D <0>; - pinctrl-names =3D "default"; - pinctrl-0 =3D <&spi0_bus>; - cs-gpios =3D <&gpa2 5 0>; - - w25q80bw@0 { - #address-cells =3D <1>; - #size-cells =3D <1>; - compatible =3D "w25x80"; - reg =3D <0>; - spi-max-frequency =3D <10000>; - - controller-data { - samsung,spi-feedback-delay =3D <0>; - }; - - partition@0 { - label =3D "U-Boot"; - reg =3D <0x0 0x40000>; - read-only; - }; - - partition@40000 { - label =3D "Kernel"; - reg =3D <0x40000 0xc0000>; - }; - }; - }; diff --git a/MAINTAINERS b/MAINTAINERS index 5ea5655a29c3..1f951bc877f0 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -17054,7 +17054,7 @@ M: Andi Shyti L: linux-spi@vger.kernel.org L: linux-samsung-soc@vger.kernel.org S: Maintained -F: Documentation/devicetree/bindings/spi/spi-samsung.txt +F: Documentation/devicetree/bindings/spi/samsung,spi*.yaml F: drivers/spi/spi-s3c* F: include/linux/platform_data/spi-s3c64xx.h F: include/linux/spi/s3c24xx-fiq.h --=20 2.32.0 From nobody Tue Jun 30 19:08:29 2026 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 F13A6C433EF for ; Tue, 11 Jan 2022 10:13:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237556AbiAKKNz (ORCPT ); Tue, 11 Jan 2022 05:13:55 -0500 Received: from smtp-relay-internal-1.canonical.com ([185.125.188.123]:41872 "EHLO smtp-relay-internal-1.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348736AbiAKKNr (ORCPT ); Tue, 11 Jan 2022 05:13:47 -0500 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-1.canonical.com (Postfix) with ESMTPS id 8D6C440047 for ; Tue, 11 Jan 2022 10:13:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1641896026; bh=BJcC+0E6Y2y3qsaMlSAjaaYN+3MxC8IRY4wxOhHEIbc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Jk6obyhns8VIX74aukat8xkwB0vl3cFxu5HHhQkHEv4HrgG9sEdpt07MW4rV0fCfT B8upXaCXqGsBnDfk3iNOgdW1LnxbEQhQWAC5HQH342ANG3rwNP/pM9TJnnANsN3aFu JiPsUb3J/unQ+7vn5ehpYMgc0nlh3nRbDdzQYDYxzw+r/akuX/LLsa5N2DwAd61GaX rpYW4Ofx8+QfZopE+LWyEl5k458J2QycmlMUKGKnUWsd95p/Mvcm/D7Sop1oACNW1a LbCoLf5SzlOyh1GuImYvxp97M6DS0x0VInrjEzAFcA3TtOfT3Sv1baAUcE6CLa+i4c 5pQ03gKaLXsuA== Received: by mail-ed1-f72.google.com with SMTP id y18-20020a056402271200b003fa16a5debcso12849211edd.14 for ; Tue, 11 Jan 2022 02:13:46 -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:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=BJcC+0E6Y2y3qsaMlSAjaaYN+3MxC8IRY4wxOhHEIbc=; b=ls2NPlXuKBRJ8N9FAndiqyxqj/0krVzs6ntxb19+QAQsf/C09Sy2dEpcOAv+Lpe0In YjUCOH9AwMcF1sCMlsHgMSpvSnwuevEsOoqAFjkae8A55KgF6KkAw6kNNWLfPYBV8PW7 pEo0U7zPDr94bQh3vXDeNiSdVJqM836fWh/OwCofFoina3eyF9GkqDD27GRZmJAoOEZ4 rkCa1iGwjmolIjXFj3TjwcADNtpXKddtXfWtay2nPqlDDXGkt0VEoYUfwHLDhohKbvf3 heM6pHr3Ztj5FUGbh7E9zKtzleHAa6WiHaYaA6FiHuqERtKEB+4KizQKOUbLbE6vZ+LD pNUQ== X-Gm-Message-State: AOAM531RmZERJH1/SJrhv1Cj85+JICKp5nOnWz2oxwYR1M+15YPbDhcI vE/5UDdk43Stmksg0VPFjlsw0pGkU0JvUxCNJ6ftzY7zltU+BdWIZhjTx/yNIDKLK4KbwLstJVK 1AaI+imT4q+irub/OJI8ULsSmGrJZn1tMo7IMAknZMw== X-Received: by 2002:a17:907:728c:: with SMTP id dt12mr3244364ejc.188.1641896025435; Tue, 11 Jan 2022 02:13:45 -0800 (PST) X-Google-Smtp-Source: ABdhPJzRZEoQ5u1bGZQZJNook5L4lY9BkzKhKOYtLcERafkQAKIt2Tq7bk74PNAyjv+BJ4TXFGswLg== X-Received: by 2002:a17:907:728c:: with SMTP id dt12mr3244340ejc.188.1641896025195; Tue, 11 Jan 2022 02:13:45 -0800 (PST) Received: from localhost.localdomain (xdsl-188-155-168-84.adslplus.ch. [188.155.168.84]) by smtp.gmail.com with ESMTPSA id 26sm3431268ejk.138.2022.01.11.02.13.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Jan 2022 02:13:44 -0800 (PST) From: Krzysztof Kozlowski To: Krzysztof Kozlowski , Andi Shyti , Mark Brown , Rob Herring , Pratyush Yadav , linux-spi@vger.kernel.org, linux-samsung-soc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: Sam Protsenko , Rob Herring Subject: [PATCH v2 3/4] spi: dt-bindings: samsung: allow controller-data to be optional Date: Tue, 11 Jan 2022 11:13:37 +0100 Message-Id: <20220111101338.58630-4-krzysztof.kozlowski@canonical.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220111101338.58630-1-krzysztof.kozlowski@canonical.com> References: <20220111101338.58630-1-krzysztof.kozlowski@canonical.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" The Samsung SoC SPI bindings requires to provide controller-data node for each of SPI peripheral device nodes. Make this controller-data node optional, so DTS could be simpler. Suggested-by: Rob Herring Signed-off-by: Krzysztof Kozlowski --- .../devicetree/bindings/spi/samsung,spi-peripheral-props.yaml | 1 + Documentation/devicetree/bindings/spi/samsung,spi.yaml | 3 --- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/Documentation/devicetree/bindings/spi/samsung,spi-peripheral-p= rops.yaml b/Documentation/devicetree/bindings/spi/samsung,spi-peripheral-pr= ops.yaml index aa5a1f48494b..cadc8a5f061f 100644 --- a/Documentation/devicetree/bindings/spi/samsung,spi-peripheral-props.ya= ml +++ b/Documentation/devicetree/bindings/spi/samsung,spi-peripheral-props.ya= ml @@ -28,6 +28,7 @@ properties: - 3: 270 degree phase shift sampling. $ref: /schemas/types.yaml#/definitions/uint32 enum: [0, 1, 2, 3] + default: 0 =20 required: - samsung,spi-feedback-delay diff --git a/Documentation/devicetree/bindings/spi/samsung,spi.yaml b/Docum= entation/devicetree/bindings/spi/samsung,spi.yaml index da4533feb946..322558818a43 100644 --- a/Documentation/devicetree/bindings/spi/samsung,spi.yaml +++ b/Documentation/devicetree/bindings/spi/samsung,spi.yaml @@ -75,9 +75,6 @@ patternProperties: allOf: - $ref: spi-peripheral-props.yaml =20 - required: - - controller-data - unevaluatedProperties: false =20 required: --=20 2.32.0 From nobody Tue Jun 30 19:08:29 2026 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 5BE40C433F5 for ; Tue, 11 Jan 2022 10:13:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349142AbiAKKNx (ORCPT ); Tue, 11 Jan 2022 05:13:53 -0500 Received: from smtp-relay-internal-0.canonical.com ([185.125.188.122]:32776 "EHLO smtp-relay-internal-0.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348800AbiAKKNs (ORCPT ); Tue, 11 Jan 2022 05:13:48 -0500 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 2320740A89 for ; Tue, 11 Jan 2022 10:13:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1641896027; bh=vkZ3shAsrts82aZQTD9Odzm7oGr7rqF0WKQDjTKTwd8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=AsSy6TnxbEX9P9XkYo75tUEdzUi/QNUnxZtzQQaEXG6LEu4gKkiGy4eVjmoLUcapY 6WhAAT6NaSssf2deKGqTP5U5jZYXk7hhw+U/cJS+iv0P+ORut60tC8iyd9b5uapSPx kVWatiiAuxpf2eDOocJu1vVSgr6/QMbI4b9BkHbdOTPdWLB9QdvQR4T2ljnq+hHq9T y5UOgs9lYQmmXx/3HWNlKNS6WOSjr84AFsVabhwUoHQS1AkBkX1MDXWF83j6I+e+fW ocYfMXcQcrWTUjQb/Dn1WtERIg3u2lBlYQTU/ZmKWTLIy90/yagUddaoF1XJH3iLbE Lt5i00s/sOUXQ== Received: by mail-ed1-f72.google.com with SMTP id x19-20020a05640226d300b003f8b80f5729so12762103edd.13 for ; Tue, 11 Jan 2022 02:13:47 -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:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=vkZ3shAsrts82aZQTD9Odzm7oGr7rqF0WKQDjTKTwd8=; b=GTi6I9Jv4aHzQ7YKFCayswv8IUvdz/hJOAfPk8EDAucxRCMWxxVUCdHFNT0jBODrth 3lF67TIbhkaaX0A/brpK/Nh362TjrevtqY9RXF4/R5Bv1mis8QQXyTzzIEfGR7VpVznM cVEGToTVD7cRYRom7hoFq4eXtwU+D5Rv3gEwkkJ/VpOT32wzMFTH9dVjnUBRZCjpTXDE G1FNoo1AGMK63VoLwfK0hd7fANC7aTiVl1n0AHs1+eldllnXqvEjroTNtr3PMvhuSAn4 SribSvj2Mz7Gi1Ml1MfUcmkk+riFuThtb+VVuk/7kuOqfiIMv6v9NZZoTzS5h6qDjTU0 hVNw== X-Gm-Message-State: AOAM5337Uya1DA8Qsa036NSsj7whAd9FJD5WIxyqZ6TN+praYiweQ+oA nprLMb69k1bOpn64cgflK+nv/B3osRuXd1stWs4v9LIvMURmvZ35RaifsMS1QXMXdcyc4ldfyxc H25DwUInJD9wfAMmlkNVUKwYSl3S5pdDEn5TRdFi1pQ== X-Received: by 2002:a50:da48:: with SMTP id a8mr3517604edk.155.1641896026737; Tue, 11 Jan 2022 02:13:46 -0800 (PST) X-Google-Smtp-Source: ABdhPJyrMWwC4F5CYCPwNtrsTc93H/KSEUuKQ3dZ2KWyqGsikQRFJIiGNhQmyHnezI5HUpc6kJMojw== X-Received: by 2002:a50:da48:: with SMTP id a8mr3517597edk.155.1641896026571; Tue, 11 Jan 2022 02:13:46 -0800 (PST) Received: from localhost.localdomain (xdsl-188-155-168-84.adslplus.ch. [188.155.168.84]) by smtp.gmail.com with ESMTPSA id 26sm3431268ejk.138.2022.01.11.02.13.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Jan 2022 02:13:46 -0800 (PST) From: Krzysztof Kozlowski To: Krzysztof Kozlowski , Andi Shyti , Mark Brown , Rob Herring , Pratyush Yadav , linux-spi@vger.kernel.org, linux-samsung-soc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: Sam Protsenko , Rob Herring Subject: [PATCH v2 4/4] spi: s3c64xx: allow controller-data to be optional Date: Tue, 11 Jan 2022 11:13:38 +0100 Message-Id: <20220111101338.58630-5-krzysztof.kozlowski@canonical.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220111101338.58630-1-krzysztof.kozlowski@canonical.com> References: <20220111101338.58630-1-krzysztof.kozlowski@canonical.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" The Samsung SoC SPI driver requires to provide controller-data node for each of SPI peripheral device nodes. Make this controller-data node optional, so DTS could be simpler. Suggested-by: Rob Herring Signed-off-by: Krzysztof Kozlowski --- drivers/spi/spi-s3c64xx.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c index 8755cd85e83c..769d958a2f86 100644 --- a/drivers/spi/spi-s3c64xx.c +++ b/drivers/spi/spi-s3c64xx.c @@ -796,16 +796,14 @@ static struct s3c64xx_spi_csinfo *s3c64xx_get_slave_c= trldata( return ERR_PTR(-EINVAL); } =20 - data_np =3D of_get_child_by_name(slave_np, "controller-data"); - if (!data_np) { - dev_err(&spi->dev, "child node 'controller-data' not found\n"); - return ERR_PTR(-EINVAL); - } - cs =3D kzalloc(sizeof(*cs), GFP_KERNEL); - if (!cs) { - of_node_put(data_np); + if (!cs) return ERR_PTR(-ENOMEM); + + data_np =3D of_get_child_by_name(slave_np, "controller-data"); + if (!data_np) { + dev_info(&spi->dev, "child node 'controller-data' not found, using defau= lts\n"); + return cs; } =20 of_property_read_u32(data_np, "samsung,spi-feedback-delay", &fb_delay); --=20 2.32.0