From nobody Tue Jun 30 09:25:11 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 59096C4332F for ; Thu, 20 Jan 2022 17:58:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233228AbiATR6D (ORCPT ); Thu, 20 Jan 2022 12:58:03 -0500 Received: from smtp-relay-internal-1.canonical.com ([185.125.188.123]:40638 "EHLO smtp-relay-internal-1.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233214AbiATR55 (ORCPT ); Thu, 20 Jan 2022 12:57:57 -0500 Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) (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 096C540029 for ; Thu, 20 Jan 2022 17:57:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1642701476; bh=OI1v3v2do2JpaG4iEWGXiW3KIkLzyCyv5Mi1khRNczo=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Oyx4UgYRQzTNMP5SHrkg0wukBO0bASWi5OCM++9gY6WSlHThleHd3ngg9EbmQV9VK k1Lr/Ccxnavh1yGQcxwYL+OUaPVwWoU7Ld/mxpmk5G8s7ip962Heil9I2fXyRqE2oZ 38tgcAriDwzf/kZSxAtbgvI8QBbDNrg7JImIefB1XvvbN/tlu4P4eH+hEYLixNILlI 7qpaEHmV6HnDwKrtuk95W+timkyW7YtKLtJzME2EJKEFIFul+cdT0k6QsWHeAofzrm 0goDkVJhkQNTyk2jSKzq6Ol1IPRqA7147byt8Bi/+I8/J1Ogi3oLK2VidQS98LTSnN 4ksTvqJ6ScGXA== Received: by mail-wm1-f71.google.com with SMTP id n25-20020a05600c3b9900b00348b83fbd0dso4602669wms.0 for ; Thu, 20 Jan 2022 09:57:56 -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=OI1v3v2do2JpaG4iEWGXiW3KIkLzyCyv5Mi1khRNczo=; b=6JSUY1urEY5PsrYz+8QztY7hFZqaT1YPe8Oo2ywCV+opLh1nftTiYVIR1yFOCuniLm RvptMyqW9XfBE/osus/nXOqXT9DxMl/qt+vqAXw7NKgpI/i2nANIuPwO3NDpnr+vpXBP CDaLj770qdxSnsjPPPh8RxGsBtY7HWAuULA8xDK3OUNXPuVoSC5i178jM/JJ2kyE1/9q 9dmo4QAVpi4MWVi6/sMkoDDVP69et50RiJmODv2Man+LTfcOJYo4PKEcOridcmrYfSZR TtRWZnLuYo5Z2DLId9d4zKxVB2gN0Do2bdGln77DZShBXkeNx88WHFnA0YgHkgv34fzj cNvA== X-Gm-Message-State: AOAM533bs5rlLT6pIiVtnUv/LgfY4mpeEaqHnUsenRvP0nxCAQI5khrs V3PT1tUVm0seUCNN89Uh0Ch+HdFIsm+2Ko2PeAW1BuNJ99KgygKjvJ5KUGUTLKu/Nr2mnxpG03K 7NfpjFoUf0v6HSlw5RpxV33Eroupy+eSBAMtZa0cIQw== X-Received: by 2002:a1c:4d0e:: with SMTP id o14mr6744wmh.1.1642701473512; Thu, 20 Jan 2022 09:57:53 -0800 (PST) X-Google-Smtp-Source: ABdhPJzmTsqY8bb8HLxL6NNBjcVpHEecqLr4GeD0bg1kTvShl9on4V8QSt4DHHPqVOEBS9tMoc/Fcw== X-Received: by 2002:a1c:4d0e:: with SMTP id o14mr6723wmh.1.1642701473346; Thu, 20 Jan 2022 09:57:53 -0800 (PST) Received: from localhost.localdomain (xdsl-188-155-168-84.adslplus.ch. [188.155.168.84]) by smtp.gmail.com with ESMTPSA id a15sm3345248wrp.41.2022.01.20.09.57.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Jan 2022 09:57:52 -0800 (PST) From: Krzysztof Kozlowski To: Lee Jones , Rob Herring , Benson Leung , Guenter Roeck , Krzysztof Kozlowski , Andi Shyti , Mark Brown , Sam Protsenko , Pratyush Yadav , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-spi@vger.kernel.org Cc: Alim Akhtar Subject: [PATCH v5 1/4] ARM: dts: exynos: split dmas into array of phandles in Exynos5250 Date: Thu, 20 Jan 2022 18:57:44 +0100 Message-Id: <20220120175747.43403-2-krzysztof.kozlowski@canonical.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220120175747.43403-1-krzysztof.kozlowski@canonical.com> References: <20220120175747.43403-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 Reviewed-by: Alim Akhtar --- 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 09:25:11 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 18443C4167B for ; Thu, 20 Jan 2022 17:58:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233279AbiATR6G (ORCPT ); Thu, 20 Jan 2022 12:58:06 -0500 Received: from smtp-relay-internal-0.canonical.com ([185.125.188.122]:33572 "EHLO smtp-relay-internal-0.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233225AbiATR56 (ORCPT ); Thu, 20 Jan 2022 12:57:58 -0500 Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) (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 0EBAE4000F for ; Thu, 20 Jan 2022 17:57:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1642701477; bh=E9qTf+jyrgE7Zki5gZgFWFANdAie2Ya6TkLorpLfyTU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=WU+yYhIeGkBxT7WaTcd+slKfBwv/5Vsw4HUFlz9fnTHxu4Cc2M9xIeCYIDrxED7zE UiKLs+fAHgnHo7ekt/7wEQb+nA0Xhs/AIwyzc1G/juofePd/S+XX/kKN8duVX9202q opVNUQlwJXF3MiY7xYskdI4eJ/w6rvro0JGSlvQc2pV95YR7MbSAzknGyTdeEvhx19 5tpvmnS6NNvqPKdzqHTziiiJcZeJvIxvhDqKTxLGJzDJfZJKBxhV2W9xFiBlFSd4wO bX97erD6yRFSY/Y/Vg9GnIFXj4KGerSrNEq1r4seYhzIVMOUpfXZx2Sgh+WlhiRY++ dpk3DdZJAi59w== Received: by mail-wm1-f71.google.com with SMTP id 20-20020a05600c22d400b00349067fe7b7so3259388wmg.5 for ; Thu, 20 Jan 2022 09:57:57 -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=E9qTf+jyrgE7Zki5gZgFWFANdAie2Ya6TkLorpLfyTU=; b=6AvVo43RZOzcae1gUGJ4WS2xf1Xa3fkzun18P0f3kMNsFOKAdR2Y02XRIpRsmsvc31 ZbWpZ7dVywhOR/SOIlnMUMQYtGcfEBpEW5Yxx58YCeUzwNr0H/UCyVHSIhtkwOYi/wDT I6WFjBo27QZmhSjCGG2+Ud1OwO0YclsPllRo68WAu4I15mqyQy5NCzQ8hckW0XFGJlc0 P7mNl/+Rv846WdmXsrp8Or+vQy9ZxsX5+/kl0GKAqfqAfARdtjnZuu37/6gcyHo0R52g gfvrQmlzzEM79ihGDu69clYDAXTqh7hcYBwjcXC6SnYzPyLy8Ao35P1txP325g3+beJH bybQ== X-Gm-Message-State: AOAM533w5C/C0jmrXQ8+gggm5ZOEWlDDajyEs9Yc0Sx1MJuPxa62Izev pQk9AZZqe9PI/Jp6m3jLDkdVocL0SY4HGbi4kM1bBPQ5JT7W1LHFgeEQNTQcYBZzGsgJRJzDLfb 3JbF2Je0+H1phVZfWzcSPxicnao83ALcl6aL4wmWM8g== X-Received: by 2002:a5d:5246:: with SMTP id k6mr179176wrc.594.1642701475200; Thu, 20 Jan 2022 09:57:55 -0800 (PST) X-Google-Smtp-Source: ABdhPJwRRN1iyHYaFep89Q/UTONb4iXJIjwvvos1tShOt1mBdq1sC8FaGplxY3OvZ2nMLI0gfDjP7Q== X-Received: by 2002:a5d:5246:: with SMTP id k6mr179155wrc.594.1642701474853; Thu, 20 Jan 2022 09:57:54 -0800 (PST) Received: from localhost.localdomain (xdsl-188-155-168-84.adslplus.ch. [188.155.168.84]) by smtp.gmail.com with ESMTPSA id a15sm3345248wrp.41.2022.01.20.09.57.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Jan 2022 09:57:54 -0800 (PST) From: Krzysztof Kozlowski To: Lee Jones , Rob Herring , Benson Leung , Guenter Roeck , Krzysztof Kozlowski , Andi Shyti , Mark Brown , Sam Protsenko , Pratyush Yadav , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-spi@vger.kernel.org Cc: Alim Akhtar Subject: [PATCH v5 2/4] spi: dt-bindings: samsung: convert to dtschema Date: Thu, 20 Jan 2022 18:57:45 +0100 Message-Id: <20220120175747.43403-3-krzysztof.kozlowski@canonical.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220120175747.43403-1-krzysztof.kozlowski@canonical.com> References: <20220120175747.43403-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. The conversion also drops requirement from providing controller-data and its data for each of SPI peripheral device nodes. The dtschema cannot express this and the requirement is being relaxed in the driver now. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Sam Protsenko --- .../bindings/soc/samsung/exynos-usi.yaml | 2 +- .../spi/samsung,spi-peripheral-props.yaml | 33 ++++ .../devicetree/bindings/spi/samsung,spi.yaml | 187 ++++++++++++++++++ .../bindings/spi/spi-peripheral-props.yaml | 1 + .../devicetree/bindings/spi/spi-samsung.txt | 122 ------------ MAINTAINERS | 2 +- 6 files changed, 223 insertions(+), 124 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/soc/samsung/exynos-usi.yaml = b/Documentation/devicetree/bindings/soc/samsung/exynos-usi.yaml index 273f2d95a043..e72b6a3fae99 100644 --- a/Documentation/devicetree/bindings/soc/samsung/exynos-usi.yaml +++ b/Documentation/devicetree/bindings/soc/samsung/exynos-usi.yaml @@ -22,7 +22,7 @@ description: | =20 [1] Documentation/devicetree/bindings/serial/samsung_uart.yaml [2] Documentation/devicetree/bindings/i2c/i2c-exynos5.txt - [3] Documentation/devicetree/bindings/spi/spi-samsung.txt + [3] Documentation/devicetree/bindings/spi/samsung,spi.yaml =20 properties: $nodename: 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..f0db3fb3d688 --- /dev/null +++ b/Documentation/devicetree/bindings/spi/samsung,spi-peripheral-props.ya= ml @@ -0,0 +1,33 @@ +# 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] + default: 0 + +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..61c77088e8ee --- /dev/null +++ b/Documentation/devicetree/bindings/spi/samsung,spi.yaml @@ -0,0 +1,187 @@ +# 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 + +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 09:25:11 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 8C0EBC43217 for ; Thu, 20 Jan 2022 17:58:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233346AbiATR6H (ORCPT ); Thu, 20 Jan 2022 12:58:07 -0500 Received: from smtp-relay-internal-1.canonical.com ([185.125.188.123]:40710 "EHLO smtp-relay-internal-1.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233297AbiATR6C (ORCPT ); Thu, 20 Jan 2022 12:58:02 -0500 Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.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 5842540024 for ; Thu, 20 Jan 2022 17:57:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1642701479; bh=/3v0ODpKqPKT6xfm5F2p0Vtuoh7k/TVt0vSupJe6roo=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=aTZ+v5cHIfgUT/JDlwUxpsN/rc26RhsMvmfi1Uog5BH0KIirRstNngcUMyzy9mwbe NSadKCChmYzmDPPGOvPAu4VJliQk92O7d7YhWLIKul4wn44r+x+M0140/pI7V/I9HK hH6XJg/++z+ha0bexn1hSvelcffjUKdg7PadNkahRnRBp7v9GC1Jb3XE82BSLoBi+h NtJxD8qLYRWLz/f5XtMvbMGEK+muYWpLKzFYdO2X5wKbJ6MvJnMxeq6TnY2C2mCbkR 6en2lAbn0nxiVp9K85Xxa/Amb6Pdr+r2E7xD26zu7aKMXA7ZFvUIq6VcKTZDN9J8qF MwzfwyIL2sAvw== Received: by mail-wm1-f69.google.com with SMTP id f188-20020a1c1fc5000000b0034d79edde84so3255587wmf.0 for ; Thu, 20 Jan 2022 09:57:59 -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=/3v0ODpKqPKT6xfm5F2p0Vtuoh7k/TVt0vSupJe6roo=; b=rzMyjdNBmyfsepdKM7uHSqgSq0wqv5ohhTpKxXAAuH51tJ+mzUQ9K18GYJlxmroZmr sQP3KaIceGFu70hIBnBIBpoFGMdc85yAOojm60oEP2PHQCCWY+tPjPJy2GC3vo86QBgf r87tJEjyVfLdzHGyez6SqERHhcBkx002fcfcC0zLrDrQJwp0u3xYf0/4Vc26z/A/XbJ7 MJ6YIRCbxzBNjXxE+hWzFSJqCaKuNYOyMJWhAQ+57XHGOZfoJE3S9SYu0fyx1Nd/nwA9 QHg2X/1zfMfsxvNxUek8/NrEDBKvK2Yf0d99+d0/RRvTrfo/8LB/E6fYji/GXmzXJgdO Szeg== X-Gm-Message-State: AOAM532Zi9yACP80roOmEExpH067EEEigCRFl3LkFv6wO3RwEmqaxYB6 A2+uEOzfP3rwSeowiTas0PIkzeEzQ9QmgJlSv6VsjiItyOZSYh9oKrPlwZ0Zl16qyV7d8WFY8ZW D3eW1/P7OxEECpwj7AkOniEIOs3dXmv480tA/t2Wxpg== X-Received: by 2002:a05:6000:1c13:: with SMTP id ba19mr176100wrb.596.1642701478044; Thu, 20 Jan 2022 09:57:58 -0800 (PST) X-Google-Smtp-Source: ABdhPJxhwMyD9fO2VO2ZxMCEwkgCAOSt3IG/OVO26kt5oMd7p3iF3fXfWPpKhSkmmXV0Ml2hMlK55Q== X-Received: by 2002:a05:6000:1c13:: with SMTP id ba19mr176085wrb.596.1642701477906; Thu, 20 Jan 2022 09:57:57 -0800 (PST) Received: from localhost.localdomain (xdsl-188-155-168-84.adslplus.ch. [188.155.168.84]) by smtp.gmail.com with ESMTPSA id a15sm3345248wrp.41.2022.01.20.09.57.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Jan 2022 09:57:55 -0800 (PST) From: Krzysztof Kozlowski To: Lee Jones , Rob Herring , Benson Leung , Guenter Roeck , Krzysztof Kozlowski , Andi Shyti , Mark Brown , Sam Protsenko , Pratyush Yadav , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-spi@vger.kernel.org Cc: Alim Akhtar Subject: [PATCH v5 3/4] mfd: dt-bindings: google,cros-ec: reference Samsung SPI bindings Date: Thu, 20 Jan 2022 18:57:46 +0100 Message-Id: <20220120175747.43403-4-krzysztof.kozlowski@canonical.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220120175747.43403-1-krzysztof.kozlowski@canonical.com> References: <20220120175747.43403-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 ChromeOS Embedded Controller appears on boards with Samsung Exynos SoC, where Exynos SPI bindings expect controller-data node. Reference newly added dtschema for this property. Signed-off-by: Krzysztof Kozlowski --- .../bindings/mfd/google,cros-ec.yaml | 29 ++++++++++--------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/Documentation/devicetree/bindings/mfd/google,cros-ec.yaml b/Do= cumentation/devicetree/bindings/mfd/google,cros-ec.yaml index 58a1a9405228..66a995bbbbe9 100644 --- a/Documentation/devicetree/bindings/mfd/google,cros-ec.yaml +++ b/Documentation/devicetree/bindings/mfd/google,cros-ec.yaml @@ -31,7 +31,7 @@ properties: =20 controller-data: description: - SPI controller data, see bindings/spi/spi-samsung.txt + SPI controller data, see bindings/spi/samsung,spi-peripheral-props.y= aml type: object =20 google,cros-ec-spi-pre-delay: @@ -148,18 +148,21 @@ patternProperties: required: - compatible =20 -if: - properties: - compatible: - contains: - enum: - - google,cros-ec-i2c - - google,cros-ec-rpmsg -then: - properties: - google,cros-ec-spi-pre-delay: false - google,cros-ec-spi-msg-delay: false - spi-max-frequency: false +allOf: + - if: + properties: + compatible: + contains: + enum: + - google,cros-ec-i2c + - google,cros-ec-rpmsg + then: + properties: + google,cros-ec-spi-pre-delay: false + google,cros-ec-spi-msg-delay: false + spi-max-frequency: false + + - $ref: /schemas/spi/samsung,spi-peripheral-props.yaml =20 additionalProperties: false =20 --=20 2.32.0 From nobody Tue Jun 30 09:25:11 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 24613C433FE for ; Thu, 20 Jan 2022 17:58:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233332AbiATR6J (ORCPT ); Thu, 20 Jan 2022 12:58:09 -0500 Received: from smtp-relay-internal-1.canonical.com ([185.125.188.123]:40738 "EHLO smtp-relay-internal-1.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233214AbiATR6E (ORCPT ); Thu, 20 Jan 2022 12:58:04 -0500 Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.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 7EC4140051 for ; Thu, 20 Jan 2022 17:58:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1642701482; bh=bto/xpfUsOVGNmCnHot8/BAzxWmx4lezX3yYM6aPOPk=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=O9Liw66QRr3+mkQAVdt2+stflkEYRvsSa4usKn2kA0H+YFnzXd8eOOWmtkQPQSLfW MfAZzRSo+ScEBtw5H/E3HnlgntkISXrqYHMbn5prZLaEqNZbUbdH3dJdCG9OaVqJa1 ugdKlm1oyjtKinPrAFw/dXsa2YtGl5QnNukjaWbcnqlaBhfPho4/RlXqWVBHBas4tV ZL6ilfTP16eMEQWyoF5gja+JoFZRmQTdxHCPqg68FoRcNdikcW683HHK4aVSfrnEvn 3kWLIUakJ5SuPVs7KaMbW+zp5ZiFbpBKBfrtVuT39if26w3Sy27Mg2h89r22YuejOp Zviz3KoraXUjA== Received: by mail-wm1-f69.google.com with SMTP id v190-20020a1cacc7000000b0034657bb6a66so3256904wme.6 for ; Thu, 20 Jan 2022 09:58:02 -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=bto/xpfUsOVGNmCnHot8/BAzxWmx4lezX3yYM6aPOPk=; b=ZVlHuKBL+AniGH8P5LTPDNjm/FooCTkKxQmUG4tJSi2OOPrFaZaos2Kffgu+SmxzPK 6MpvZvDzuIppFITftEvSjXWrRUcUZddN9LTpuMnSIO7TQBY04D+ZZS2K62YR0pTt4+uV BhNMWIASr3F89sbEsCwYBy9YacTL7HW6O6v1i/xg3FoQCEfafKNZPdp6GnYMbs6VsLXr jFzq3UE+nHqO5CS5UqOl4f5nJBsLJTqMTm6uleCu46mxQk6I70A6fOBbhOyW6DWt3P6H VF0aMtyZc0Prdk+poL2li+5CsAtOyC1eXteWN8w5575cGxaOXDeMkA8cuikjE3bg1U/Y FSuw== X-Gm-Message-State: AOAM532ztBHOn+x5bzap6+ybIOtwTEsB4Rbo2RlNE3T0V3DaV9h8sbGo 08LG4GIfCuODjwfzwQFinzUAfWVF1m37IsY1dpiQrPz4E6GE7tVksqSwlMrTLedQPkb45kKZ12d OTExyLkNrD26E5Pf5U5HwnnvY6GzI8i/36D8csngdjQ== X-Received: by 2002:a1c:f012:: with SMTP id a18mr9989437wmb.73.1642701479318; Thu, 20 Jan 2022 09:57:59 -0800 (PST) X-Google-Smtp-Source: ABdhPJyqTIBDSwhzIJAAvThOjafSh4STpzbcmwUKvBnw8h3aAFohpEEpbyymlmGUkzLSw2lwFS1cZQ== X-Received: by 2002:a1c:f012:: with SMTP id a18mr9989419wmb.73.1642701479169; Thu, 20 Jan 2022 09:57:59 -0800 (PST) Received: from localhost.localdomain (xdsl-188-155-168-84.adslplus.ch. [188.155.168.84]) by smtp.gmail.com with ESMTPSA id a15sm3345248wrp.41.2022.01.20.09.57.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Jan 2022 09:57:58 -0800 (PST) From: Krzysztof Kozlowski To: Lee Jones , Rob Herring , Benson Leung , Guenter Roeck , Krzysztof Kozlowski , Andi Shyti , Mark Brown , Sam Protsenko , Pratyush Yadav , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-spi@vger.kernel.org Cc: Alim Akhtar , Rob Herring Subject: [PATCH v5 4/4] spi: s3c64xx: allow controller-data to be optional Date: Thu, 20 Jan 2022 18:57:47 +0100 Message-Id: <20220120175747.43403-5-krzysztof.kozlowski@canonical.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220120175747.43403-1-krzysztof.kozlowski@canonical.com> References: <20220120175747.43403-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 Reviewed-by: Sam Protsenko Reviewed-by: Andi Shyti --- 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..386550fca81c 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, "feedback delay set to default (0)\n"); + return cs; } =20 of_property_read_u32(data_np, "samsung,spi-feedback-delay", &fb_delay); --=20 2.32.0