From patchwork Wed Jan 12 10:00:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 12711184 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 28689C433F5 for ; Wed, 12 Jan 2022 10:16:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=X37fslc8WByB2DMQurC4gW/mWYbLyPKwO60DXg6A3WA=; b=svhhdwz5GiKFZU CeCReIJk2GTI30iFECxNi7x/o9IQOhHdhJwxPIMWBGBwn8rABfTRo9yw6BEWlZkfZwA2ZnlNY8e+a 5CUPqfPvTKL0+NVBptHC03kItYiUhMYQJc48k9x/z4+JJ0DvbCmzdjoOuxwOuCNm330UuwO2z4nn2 F67naERo6OvkiOQe9pz0Fqcm9PL736b4lAqApN1H3uATyDgcW5lV8ketpDOFnmvICBng6U44cDLak YgH2UUsAKalHIr7Uluwssk6Osl2ROAs1CYmgiZ2VD4yLUfLnzcUelf2+2HByltDBLOfIj/C7Q6jN3 q4/cY1P6OQtVcyQ7hkYg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1n7aeL-00215p-Ux; Wed, 12 Jan 2022 10:14:38 +0000 Received: from smtp-relay-internal-1.canonical.com ([185.125.188.123]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1n7aR6-001vRv-LV for linux-arm-kernel@lists.infradead.org; Wed, 12 Jan 2022 10:01:00 +0000 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 30EA440019 for ; Wed, 12 Jan 2022 10:00:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1641981655; bh=QVrXucYojgYJ3MvsfMwPKw5wo2fuH+ML9mi4xwVkLOQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=kjsHl/gaf1PG3XsuQBlc1y/giifAKd4nVO/sr5vU3HB66JOprokzzZlenJ5RXPDnM 9K6FCxS40XhMAYVH1JbBhcQtNWBn0YamybDEIoL36sBzpj+TkBszremaHslzdtuZAf RjMvkLPgPUfPkJlchrsFUxM1ZYjw53/o7F1UvBsqhSnW9QhUTsbeHUiOsztF43WN3U NyK95S7keU3aSXeLNCcYzmixwddY9sD7nRc1+YRUl7k7QGJQUFu8SsT6zj5kGkir58 E6gS2JRORiCZ7wcS0UumfZOyo81IJ5Smuutqx293dZkN+K29ieFjxCvGqh0T92PkE+ ZMC4n+fu7a6rg== Received: by mail-ed1-f72.google.com with SMTP id y18-20020a056402271200b003fa16a5debcso1793521edd.14 for ; Wed, 12 Jan 2022 02:00:55 -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=IyFJ0837WpXoSB6/JjA9nZp0juVeoGy6OlCoaaiizxUd13s6rFZ+NDH7coa9b8/b9c Mo3H+IfL4z4wiWTD+KEZeoy9xIkdmrRALUVnPar/ww6HoWxBl8JCq6jQbHnBMblLSC8X rY7RHyF49TXzt7w6/KhgUFKZhlQCnOpNu5jlEHNoCvTg5Mr/ixDCxaMbTi4xM5+3KBgu yjfPYgVno/MtlZDmEtmfktvcIYUGCTtHqbnYAyoOmwCLMRmQkEVqCftssBjv+ScUMomB iyF5ebapmsLwmhUMW3alycK3oPwZvHyBQnPTsz42M/mZ7RxV8R8rUpyFHmXNe2vuUmHO nj1g== X-Gm-Message-State: AOAM533Yn/qcBReAfHPvXup5s73YfHLJitrLWnFXZUkuupoHd0G2kNLA 7MHDlV/r6TqRJmNpLD5mKbyWm3+UYXrO0Xo84jxZs2ZbONvnOD2rt9XbtRinV1kF5OOOwzGbEzi LRMLdraGn0iRarDRBJcSl/PwqPlNi5CIQg5J84iOvSSQYSXN1K7X9 X-Received: by 2002:aa7:c1d7:: with SMTP id d23mr8007135edp.25.1641981653223; Wed, 12 Jan 2022 02:00:53 -0800 (PST) X-Google-Smtp-Source: ABdhPJzKiVju5BY5SKliX0Vazs/LyzcIPx+Xnn1NeOt/kXgzB98trXRihJhGZ2eu1WJFRzbKvyKDGw== X-Received: by 2002:aa7:c1d7:: with SMTP id d23mr8007050edp.25.1641981651551; Wed, 12 Jan 2022 02:00:51 -0800 (PST) Received: from localhost.localdomain (xdsl-188-155-168-84.adslplus.ch. [188.155.168.84]) by smtp.gmail.com with ESMTPSA id hb11sm4311083ejc.33.2022.01.12.02.00.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jan 2022 02:00:50 -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 v3 1/4] ARM: dts: exynos: split dmas into array of phandles in Exynos5250 Date: Wed, 12 Jan 2022 11:00:43 +0100 Message-Id: <20220112100046.68068-2-krzysztof.kozlowski@canonical.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220112100046.68068-1-krzysztof.kozlowski@canonical.com> References: <20220112100046.68068-1-krzysztof.kozlowski@canonical.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220112_020056_901451_7D6E96F8 X-CRM114-Status: GOOD ( 13.30 ) 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 "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/exynos5250.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 = "disabled"; reg = <0x12d20000 0x100>; interrupts = ; - dmas = <&pdma0 5 - &pdma0 4>; + dmas = <&pdma0 5>, <&pdma0 4>; dma-names = "tx", "rx"; #address-cells = <1>; #size-cells = <0>; @@ -512,8 +511,7 @@ spi_1: spi@12d30000 { status = "disabled"; reg = <0x12d30000 0x100>; interrupts = ; - dmas = <&pdma1 5 - &pdma1 4>; + dmas = <&pdma1 5>, <&pdma1 4>; dma-names = "tx", "rx"; #address-cells = <1>; #size-cells = <0>; @@ -528,8 +526,7 @@ spi_2: spi@12d40000 { status = "disabled"; reg = <0x12d40000 0x100>; interrupts = ; - dmas = <&pdma0 7 - &pdma0 6>; + dmas = <&pdma0 7>, <&pdma0 6>; dma-names = "tx", "rx"; #address-cells = <1>; #size-cells = <0>; From patchwork Wed Jan 12 10:00:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 12711185 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 B9A7FC433FE for ; Wed, 12 Jan 2022 10:16:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Wf/8fUccPB+RqSU4dl0Iz5UfKa4J9/Z4Dt/+2KKw69c=; b=UtV+czM6ZgWtPk qH7h2rfCkqCZ8VnQxDfr+OSWt58tG3h06HFaLhjbKb83nwV7//itTir3GDNKvDn6R1WZoovs08KO1 8ZBGmntorLQhCp/lyYt9zO2QxEp+nYZ06Wt6fpi2KR50cFiTEOGv6W/RlRDMWXFm65Zuf1jcT+rrW 8R+YQGIc6jNCnbuWxMJVYTwnio83MDLTonozV9VjCTe5GT1I+16CjUXc5aoynd0KguW105fRIUFUK P/ia4bbm1DP5Qy3vIE03wv4M1tSAxb7cZyHOnj/FDsqeDCW8tfDaA+eIs0oD/O0V5jcDH9VlySvun +j5h0QhCx1e1qe3J7tAQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1n7aet-0021LS-Ax; Wed, 12 Jan 2022 10:15:11 +0000 Received: from smtp-relay-internal-1.canonical.com ([185.125.188.123]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1n7aR6-001vRk-Dp for linux-arm-kernel@lists.infradead.org; Wed, 12 Jan 2022 10:01:01 +0000 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 F1C3E40315 for ; Wed, 12 Jan 2022 10:00:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1641981654; bh=ShG10dDQ0m2Ksx4bQGuuHioEPbEONzuC0YfanP+jiak=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=uWbrNKAdTMuhSso9OsirejaTbow5YcA0PVHTN3tMHONelJqMy4aV0XE/C7BH/0lJx 6tsY6kzsaKgcRJrNwxgKv64k2nOH742D6otguOtI0EEizdC3ejVXGMKo2AsUGu/gZP Tu7gpZ2PhIeWRJNzifwX/A0LGT3+BxHVhoFV8vattih6nVDX2qggQkW7EZj5TFS8rO S6QH0ZwPa++l4xOazIKmQInUt/6gW+Dd4gKZq3ZJ5dckLLfH6MZriGG0Wv2CNVIk0g z31uxlx5VO6MmptO+xMj1MRp0h0UHtx4WrhaeMJ9WBRRBsm+8uFaEtpaqPkaxQbyeO 1ay1owYUjvM/Q== Received: by mail-ed1-f72.google.com with SMTP id q15-20020a056402518f00b003f87abf9c37so1786857edd.15 for ; Wed, 12 Jan 2022 02:00:54 -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=ShG10dDQ0m2Ksx4bQGuuHioEPbEONzuC0YfanP+jiak=; b=YrZlNEwZOgESNcjwobFrv7BCGJwalwVBBghilNa/InWImds+sYxuLQWNvIfHUantBt uGTsLZlaiE4F2esV493cSYiC1pzZB4IGcz7LgKyD78WeNXeALBwKKkxDLixHB2opRyag 1Ha6iBqJ8knqF0lPGnYJYLQnLjYmunefdjUNNb2W4ad9cn+1U+S7Glkq13phvN3T6lsD aG9ZG1hK4pVOR0Wka4adepVF1UZSNjy8/WQbIJ+2QOCaEIQVjAYZnz60BlfD9evEvixd wG0mfTYb80/ftWWp2xv7XvkldzwKG/QDRwgzLipC7E5YQG66lkCQaHn5POHmWTZFqCi6 hfCg== X-Gm-Message-State: AOAM530Sj2njuSduy6hTgG6apH9QwHZQIw6y5JIF7fh/Jv1/1rrCeXDt aHgSWNcoLyK58Mjku84YBZfug6XRdSk598bDdGyTV0ig26SQDZnYB/SmcXqgcz51zQAzC6/c2Hd kXwK6AI1onvzcopxBewlxowfu7NzdjjlFXLo0gic3/MTJQNxALJ7X X-Received: by 2002:a17:906:7315:: with SMTP id di21mr6904748ejc.700.1641981654252; Wed, 12 Jan 2022 02:00:54 -0800 (PST) X-Google-Smtp-Source: ABdhPJw+diLWP0KLMMq0aIMEUg7U5zfiI+rhf3/4AeUGcZCvnhh/sIXKdXM7SdsuYm5oRrd8dBQ1PA== X-Received: by 2002:a17:906:7315:: with SMTP id di21mr6904656ejc.700.1641981652462; Wed, 12 Jan 2022 02:00:52 -0800 (PST) Received: from localhost.localdomain (xdsl-188-155-168-84.adslplus.ch. [188.155.168.84]) by smtp.gmail.com with ESMTPSA id hb11sm4311083ejc.33.2022.01.12.02.00.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jan 2022 02:00:52 -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 v3 2/4] spi: dt-bindings: samsung: convert to dtschema Date: Wed, 12 Jan 2022 11:00:44 +0100 Message-Id: <20220112100046.68068-3-krzysztof.kozlowski@canonical.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220112100046.68068-1-krzysztof.kozlowski@canonical.com> References: <20220112100046.68068-1-krzysztof.kozlowski@canonical.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220112_020056_816451_F2766BB7 X-CRM114-Status: GOOD ( 32.46 ) 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 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 | 187 ++++++++++++++++++ .../bindings/spi/spi-peripheral-props.yaml | 1 + .../devicetree/bindings/spi/spi-samsung.txt | 122 ------------ MAINTAINERS | 2 +- 5 files changed, 224 insertions(+), 123 deletions(-) create mode 100644 Documentation/devicetree/bindings/spi/samsung,spi-peripheral-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-props.yaml b/Documentation/devicetree/bindings/spi/samsung,spi-peripheral-props.yaml new file mode 100644 index 000000000000..aa5a1f48494b --- /dev/null +++ b/Documentation/devicetree/bindings/spi/samsung,spi-peripheral-props.yaml @@ -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 controller + +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 account + 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/Documentation/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 using + 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 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 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 = "samsung,exynos5433-spi"; + reg = <0x14d30000 0x100>; + interrupts = ; + dmas = <&pdma0 11>, <&pdma0 10>; + dma-names = "tx", "rx"; + #address-cells = <1>; + #size-cells = <0>; + clocks = <&cmu_peric CLK_PCLK_SPI1>, + <&cmu_peric CLK_SCLK_SPI1>, + <&cmu_peric CLK_SCLK_IOCLK_SPI1>; + clock-names = "spi", + "spi_busclk0", + "spi_ioclk"; + samsung,spi-src-clk = <0>; + pinctrl-names = "default"; + pinctrl-0 = <&spi1_bus>; + num-cs = <1>; + + cs-gpios = <&gpd6 3 GPIO_ACTIVE_HIGH>; + + audio-codec@0 { + compatible = "wlf,wm5110"; + reg = <0x0>; + spi-max-frequency = <20000000>; + interrupt-parent = <&gpa0>; + interrupts = <4 IRQ_TYPE_NONE>; + clocks = <&pmu_system_controller 0>, + <&s2mps13_osc S2MPS11_CLK_BT>; + clock-names = "mclk1", "mclk2"; + + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + + wlf,micd-detect-debounce = <300>; + wlf,micd-bias-start-time = <0x1>; + wlf,micd-rate = <0x7>; + wlf,micd-dbtime = <0x2>; + wlf,micd-force-micbias; + wlf,micd-configs = <0x0 1 0>; + wlf,hpdet-channel = <1>; + wlf,gpsw = <0x1>; + wlf,inmode = <2 0 2 0>; + + wlf,reset = <&gpc0 7 GPIO_ACTIVE_HIGH>; + wlf,ldoena = <&gpf0 0 GPIO_ACTIVE_HIGH>; + + /* core supplies */ + AVDD-supply = <&ldo18_reg>; + DBVDD1-supply = <&ldo18_reg>; + CPVDD-supply = <&ldo18_reg>; + DBVDD2-supply = <&ldo18_reg>; + DBVDD3-supply = <&ldo18_reg>; + SPKVDDL-supply = <&ldo18_reg>; + SPKVDDR-supply = <&ldo18_reg>; + + controller-data { + samsung,spi-feedback-delay = <0>; + }; + }; + }; diff --git a/Documentation/devicetree/bindings/spi/spi-peripheral-props.yaml 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# additionalProperties: true diff --git a/Documentation/devicetree/bindings/spi/spi-samsung.txt b/Documentation/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 format - depends on the interrupt controller. - -- dmas : Two or more DMA channel specifiers following the convention outlined - 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 the 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 all the - the devices the names must be "spi", "spi_busclkN" (where N is determined 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 specified, - 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 required - 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 using - the following format 'spi{n}' where n is a unique number for the alias. - - -Example: - -- SoC Specific Portion: - - spi_0: spi@12d20000 { - compatible = "samsung,exynos4210-spi"; - reg = <0x12d20000 0x100>; - interrupts = <0 66 0>; - dmas = <&pdma0 5 - &pdma0 4>; - dma-names = "tx", "rx"; - #address-cells = <1>; - #size-cells = <0>; - }; - -- Board Specific Portion: - - spi_0: spi@12d20000 { - #address-cells = <1>; - #size-cells = <0>; - pinctrl-names = "default"; - pinctrl-0 = <&spi0_bus>; - cs-gpios = <&gpa2 5 0>; - - w25q80bw@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "w25x80"; - reg = <0>; - spi-max-frequency = <10000>; - - controller-data { - samsung,spi-feedback-delay = <0>; - }; - - partition@0 { - label = "U-Boot"; - reg = <0x0 0x40000>; - read-only; - }; - - partition@40000 { - label = "Kernel"; - reg = <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 From patchwork Wed Jan 12 10:00:45 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 12711182 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 B5876C433EF for ; Wed, 12 Jan 2022 10:14:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=K5phM4vzg7yBj/pDe8MFzKGEIjuq/1knmh59P/5SFg8=; b=J+aMA9z6KlPq+R WgwdIr+MAkOi8BMoytKcI/Vene/tXnYPsuMC7mRSKnA+s9OaRVztDQiBa+ll3MR42AbU6thBH3BLX ydvTMGTasyXhu46jM9cuAFOr25rS2WL5EP9vhfO8OpmpHJ0dDkbd6luJa8aMem9prg/fUJjJ6Ouly rSKFy1aVjojscDuwOW1/WuivSKLmpGKIi0oXC8jG3c3ZkECY7w9Ajcf+J0uKXaiowwRz1Tn0x4q/5 ZAHr1ewKk9wLUYWcxHy0NPUnQDRyY2eFt7/9CPtDvsE/HRXITPs42F+l6RbYF3MYsPaFeuTUN6pdg yrkpOZS3CHwpfjFQVhmQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1n7acm-0020Po-U9; Wed, 12 Jan 2022 10:13:01 +0000 Received: from smtp-relay-internal-1.canonical.com ([185.125.188.123]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1n7aR6-001vRV-2x for linux-arm-kernel@lists.infradead.org; Wed, 12 Jan 2022 10:00:57 +0000 Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) (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 70FB64001C for ; Wed, 12 Jan 2022 10:00:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1641981654; bh=sxpoeazVKfRv/TTxlIPcEu0VInhZebJSCyyifiEPVW0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=QZUYb41T2r0gJfdj/JmDwla5q8wYEtI9NUG9iQdPMhA0U0eXvqP8G0mA3astSE+vI FUIBSv15HA131v5blSaslsxmFsSnm7J1jz1A82Y0ircmq4DaeBUt0XCtYSaVwJlllQ F+fuL08NAZz093cOHoav4Y2w+Dqt5TQ12lAg8ZrQcs10zAQf3FB5Xv8Lx08qPWaBqA f3t4fwZYvrqr0dRI87CpyfyRVcFmVVwbdS7DhOVXqobVtDHOoFt1irdOOzeoUereyr FPCYroFeRq/qJVjnavE4rIIkn1u4PG/PJP2BPebaBNpp4I66qQoyyxR8ROHChuvvCl ChjA46oUZG4HQ== Received: by mail-ed1-f70.google.com with SMTP id o20-20020a056402439400b003f83cf1e472so1783046edc.18 for ; Wed, 12 Jan 2022 02:00:54 -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=sxpoeazVKfRv/TTxlIPcEu0VInhZebJSCyyifiEPVW0=; b=sBdh85Dhk8OKdn+SGKBMBlGeWB0rpwiq5ZT0lUDR6l1LmWd0RbVsA0ENwqeascCfYc dyZTiDUTH6amsXxd5xLhBmpu/0BYdk1IhENbmyKk1TVPYGaiTs5weMTA6+s9yTHb0keF PIjAJs7kc4VYfx2IwOZUUvISGlX6rVRswaFJN5yrnJRWrD/qbsQF86AgMZqKQn6b4dt5 htK9DEhuuXIQ6u7jI8yzMXtiz2gbrcR5yBxLUi973aTNTQQgoOnvjABmzJDccvxThtHz e42mPikoZnfYpOw3NnRsm8rfswcCgFVKfjHdMDoWqCxm86lPB7tcbtTsk7ZYGAZDGHO3 fk6w== X-Gm-Message-State: AOAM532OPZBkYTveHJRH8PpI3ApVt3Vb2DRiGtRItowH+tTNnq/xEK6D 5mUsQuhwUuvpwrM2OVbwAQJyScSaf5QEHTpb9Z/8O8UyrDCMjdGSISvzSAA+Bhhram8tI6jZeZi 5TKnxiAUhc9x2oCO7NWEfNS0QAIy4sp293JBJSXDKP9R/9CeaFy+0 X-Received: by 2002:a17:907:7d8a:: with SMTP id oz10mr2375264ejc.320.1641981653528; Wed, 12 Jan 2022 02:00:53 -0800 (PST) X-Google-Smtp-Source: ABdhPJzzzXqkrKxbgq5mvkmGUzVcTyBUQLnw1MTu9OyibOn3Q74mOavVnNmdXwrnaGEsFJ/VZr09+g== X-Received: by 2002:a17:907:7d8a:: with SMTP id oz10mr2375244ejc.320.1641981653311; Wed, 12 Jan 2022 02:00: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 hb11sm4311083ejc.33.2022.01.12.02.00.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jan 2022 02:00:52 -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 v3 3/4] spi: dt-bindings: samsung: allow controller-data to be optional Date: Wed, 12 Jan 2022 11:00:45 +0100 Message-Id: <20220112100046.68068-4-krzysztof.kozlowski@canonical.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220112100046.68068-1-krzysztof.kozlowski@canonical.com> References: <20220112100046.68068-1-krzysztof.kozlowski@canonical.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220112_020056_313891_F8F17A6B X-CRM114-Status: GOOD ( 11.95 ) 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 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 Reviewed-by: Rob Herring --- .../devicetree/bindings/spi/samsung,spi-peripheral-props.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/spi/samsung,spi-peripheral-props.yaml b/Documentation/devicetree/bindings/spi/samsung,spi-peripheral-props.yaml index aa5a1f48494b..cadc8a5f061f 100644 --- a/Documentation/devicetree/bindings/spi/samsung,spi-peripheral-props.yaml +++ b/Documentation/devicetree/bindings/spi/samsung,spi-peripheral-props.yaml @@ -28,6 +28,7 @@ properties: - 3: 270 degree phase shift sampling. $ref: /schemas/types.yaml#/definitions/uint32 enum: [0, 1, 2, 3] + default: 0 required: - samsung,spi-feedback-delay From patchwork Wed Jan 12 10:00:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 12711183 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 39549C433F5 for ; Wed, 12 Jan 2022 10:15:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=XRJsyp8OhYco2BLG/fpa28HHa5uCB/VDgSkYUGOUf8Q=; b=gmjAAFqinyAa50 Fz794zJxcAEstnZ3SQeT8nQ4GciMufLjIdagA8+9rjUBUV1sHMDdLYotwYySVAU4T2CI4e1uNPkB/ R1tzeS1SPsD5UpvPWYMj2E2rAUs8R1p5Vfw3E4/JNYCRJ3hjZnLHrT4F3bTxqVPrH0j7n0b91ufav w7EEWz3YlL8E09llepq+MFnbw2sIfDOAb3QOzoWq/SqEIu1pmrLZYHDpEmzXFQVTR7FQysrQULYAC GBkcOIe+sfeyLRi6kXzzQZ496sEQ7SsuuF/92DxiKrFhrRewwoAGeV5WReV8/1q4+rAfc7mLSUKvv v5tWTnbkE45WS4JswLpg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1n7ade-0020o6-IY; Wed, 12 Jan 2022 10:13:56 +0000 Received: from smtp-relay-internal-1.canonical.com ([185.125.188.123]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1n7aR6-001vS6-LU for linux-arm-kernel@lists.infradead.org; Wed, 12 Jan 2022 10:00:59 +0000 Received: from mail-ed1-f71.google.com (mail-ed1-f71.google.com [209.85.208.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 5076B4031D for ; Wed, 12 Jan 2022 10:00:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1641981655; bh=vkZ3shAsrts82aZQTD9Odzm7oGr7rqF0WKQDjTKTwd8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=S7HG6Oi3Xdgd9IQ6IB9xO4/FlOuXdwlL8p1wzr9IojJNAoPTeYo67CeiQ4Mm/5j0d msHHEZ4yo7CPwhZd5krDR22Iw0HHyfhXOiqZvcEQoEJWkxQzKTcFci4W94vJy+H51p eoxvOHwkhT74ZwkxvVVoS+W6bPbrzwkiU4Dnwak0G7EJhoUZw36e7W6i91NpR4vcCD 8E5bfO1LETYSLd2qNVh7GM9ye3rrzf+JfQYguNy5W8gr2o3SK2o4nlhxYQuPjd/YVI y2vjmevgk2iPzNt3rm2YzD/Y/sWoMdNvgHKDni/q0BqdlQOehu/wKWqsCIhyQBfspA 4dCcUxe13IWkg== Received: by mail-ed1-f71.google.com with SMTP id r8-20020a05640251c800b003f9a52daa3fso1765376edd.22 for ; Wed, 12 Jan 2022 02:00:55 -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=os21A4lMkyDg4RK2d6ln+3Qw8KwVuWSIC528njy8R919fKjdknAXtD7RpAAzfx08zH Uklcdib4NBTonCB8NK54ZuueZOm6XAD4CFEPkk87JNmD+6+iE1p6DoE3Ryh64NBgvr2k 0ojjX2FvG6jQHtIJ9LJ/sBfNQVlopHFIFNWozlgYbskPkBR8bTKPO9UmqFYX69O0TTs2 cULjRAFwM18CljSH525YrTuBrOEbO7BqOmzzhn8t0qh3DNssb4WTuRL1PH1B3RHI70+i vUsDPr4zh3+RoKJUKMOURYvzGGJ/b1P0mXPG703G3z1J9rKSuqEooWR0t+J3EasA10c2 vLUg== X-Gm-Message-State: AOAM533CeaKGJ/6KK86SwIzZxMGsTsbruUIctkGZ7l52RYc1Mo3l1VbG 20Mzmat9GysDl3tX9gOeEFtGwP50ZduwK14bTlKuzZdFQ3xQT+nHVxlttNTAt5TTfIBhDnfobfM M6VnkrF/tx/tSSOs5bmzuJVtMOO7X0O1a4RoNUojZUOxFpcsBwPps X-Received: by 2002:a17:907:7295:: with SMTP id dt21mr6749930ejc.453.1641981654825; Wed, 12 Jan 2022 02:00:54 -0800 (PST) X-Google-Smtp-Source: ABdhPJxr7AHmnhL8e6o/jXCWgESvLqrOYDTSQTTXkoaFmOMriyvAZ3QFfDrNia5S1pL4Lx8Q/Cv4WQ== X-Received: by 2002:a17:907:7295:: with SMTP id dt21mr6749917ejc.453.1641981654645; Wed, 12 Jan 2022 02:00: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 hb11sm4311083ejc.33.2022.01.12.02.00.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jan 2022 02:00:53 -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 v3 4/4] spi: s3c64xx: allow controller-data to be optional Date: Wed, 12 Jan 2022 11:00:46 +0100 Message-Id: <20220112100046.68068-5-krzysztof.kozlowski@canonical.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220112100046.68068-1-krzysztof.kozlowski@canonical.com> References: <20220112100046.68068-1-krzysztof.kozlowski@canonical.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220112_020056_934776_B47C1A09 X-CRM114-Status: GOOD ( 14.36 ) 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 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: Chanho Park Reviewed-by: Sam Protsenko --- 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_ctrldata( return ERR_PTR(-EINVAL); } - data_np = 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 = kzalloc(sizeof(*cs), GFP_KERNEL); - if (!cs) { - of_node_put(data_np); + if (!cs) return ERR_PTR(-ENOMEM); + + data_np = of_get_child_by_name(slave_np, "controller-data"); + if (!data_np) { + dev_info(&spi->dev, "child node 'controller-data' not found, using defaults\n"); + return cs; } of_property_read_u32(data_np, "samsung,spi-feedback-delay", &fb_delay);