From patchwork Wed Nov 22 14:14:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Kocialkowski X-Patchwork-Id: 168390 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2b07:b0:403:3b70:6f57 with SMTP id io7csp1354859vqb; Wed, 22 Nov 2023 06:17:01 -0800 (PST) X-Google-Smtp-Source: AGHT+IF+Lpq8g29sWHDFf/6x+PfS/usYqAoOaKP0qFO2YPnfz9tMvoUBMLmad9r21XvKwKNgN+hw X-Received: by 2002:a05:6808:1a10:b0:3b8:4482:16f4 with SMTP id bk16-20020a0568081a1000b003b8448216f4mr812901oib.52.1700662621599; Wed, 22 Nov 2023 06:17:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700662621; cv=none; d=google.com; s=arc-20160816; b=SJN1wQwztXxVuvag3MEnc7JL2WB4iJ/5JO7FU3K4LJt4dRVUQs8b4xOuoq0fCh8/9F 9FigDOPKa7U1sZly3OURB1gQQ3Y8N4XhvMJI0dDvGBuVs/sqmWgHHqtz0QQQQSyRKoOU ktUWzX9BgL1ib7/p2FeFLpCRzfJDbetv8Rfqdt/d/iJjjaRnWlft3x5F9Vz1EWluVZd0 NN2V6UkhrdmKny0ixfY4IlJxhqPih0ebRAHvIfGvnYt0nHVLroXqvQOqxWuPV3EEQ9/v Jv7lmnLorrkSJQOWTBR8BHzwN/muwg7W5Ogeegc+2kP1NNNFWN1bLeWJeUWj2mKixtVu 2K7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=3KqnBhwi67VqJqEoEy9XgHZcNT6TUUQXGFk1xEUCrIQ=; fh=H83vQu1rqY179ebexpPQiqXWeEy6nd4AlWviwU4eQj4=; b=hubNrsI7mM4zTPpNkPA3pG2ul5uVpV7XOGvZZCvD4U1ttHxVCrc/rd/G4VCEUrApES xx9b+jpaXNYNqRVSYxUBa1DNVB7V8Jd2nv0cZZF+T2BK02sgrYOj1ofo2k0HqK6XC4FN Legkxleym3B/A5ijkYi3P7eHdWCtTFqGbLWR2sLLEYgBwtm1m+qTvAnnJI3YWhK2EsNw ROVwZk/OzY4Fi6tJzZgubOfnrGx6SAe/kbSYdvzlbAxJr2MAKIvKSUddeOeAl600sJqz ouDrGlsT68yzmHAUpTobXQjE83Oo9F9OjxUgcggf91qaDHJ7JtyGEMV7cjEPIC7QWiwx t4Dw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=mFKodwPq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id y10-20020a634b0a000000b005be3c09abf1si12188808pga.397.2023.11.22.06.17.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 06:17:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=mFKodwPq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id DEC7D80832C3; Wed, 22 Nov 2023 06:15:07 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235182AbjKVOO7 (ORCPT + 99 others); Wed, 22 Nov 2023 09:14:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47186 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231638AbjKVOOx (ORCPT ); Wed, 22 Nov 2023 09:14:53 -0500 Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::224]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 88D56112; Wed, 22 Nov 2023 06:14:48 -0800 (PST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 263EEE0011; Wed, 22 Nov 2023 14:14:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1700662487; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=3KqnBhwi67VqJqEoEy9XgHZcNT6TUUQXGFk1xEUCrIQ=; b=mFKodwPq4XOUO1X1XcibL+8nMe9XB2JJRjnKkfHqLckGDyaeWKiuYJTspH43lAh2MMUqgb Qgl0bLjHxCAsJKkAftPb0N/8HLSsGtaumW1znjqEM5Xv/5TGfmJYYvuodfgVXK1erKLEWX v9Tug1WHllDB4hKux38EXU4BbxCZ//nxfU998j1nMRi/dYJyoDVsszmP/2m7SpFLGw6IRC 3sdWylHC7tFAZYMXHptccD0bs98KrK9GxpDhyMkRDiuKAcEVRQK5JVprR+cq1aNHnZmJdE BTNtXSRttySKoQ++jV8cTMna7Hfbdd//PVhenW/5zvsHHWniq25kkbJ6F/8qmw== From: Paul Kocialkowski To: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org Cc: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Maxime Ripard , Laurent Pinchart , Michael Turquette , Stephen Boyd , Paul Kocialkowski , Rob Herring Subject: [PATCH v7 1/7] clk: sunxi-ng: v3s: Export MBUS and DRAM clocks to the public header Date: Wed, 22 Nov 2023 15:14:19 +0100 Message-ID: <20231122141426.329694-2-paul.kocialkowski@bootlin.com> X-Mailer: git-send-email 2.42.1 In-Reply-To: <20231122141426.329694-1-paul.kocialkowski@bootlin.com> References: <20231122141426.329694-1-paul.kocialkowski@bootlin.com> MIME-Version: 1.0 X-GND-Sasl: paul.kocialkowski@bootlin.com X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Wed, 22 Nov 2023 06:15:08 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783274008886000794 X-GMAIL-MSGID: 1783274008886000794 In order to declare a mbus node for the v3s, expose its associated clocks to the public header. Signed-off-by: Paul Kocialkowski Reviewed-by: Samuel Holland Acked-by: Rob Herring --- drivers/clk/sunxi-ng/ccu-sun8i-v3s.h | 4 ---- include/dt-bindings/clock/sun8i-v3s-ccu.h | 4 ++-- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/clk/sunxi-ng/ccu-sun8i-v3s.h b/drivers/clk/sunxi-ng/ccu-sun8i-v3s.h index 345cdbbab362..c933ef016570 100644 --- a/drivers/clk/sunxi-ng/ccu-sun8i-v3s.h +++ b/drivers/clk/sunxi-ng/ccu-sun8i-v3s.h @@ -39,14 +39,10 @@ /* The first bunch of module clocks are exported */ -#define CLK_DRAM 58 - /* All the DRAM gates are exported */ /* Some more module clocks are exported */ -#define CLK_MBUS 72 - /* And the GPU module clock is exported */ #define CLK_PLL_DDR1 74 diff --git a/include/dt-bindings/clock/sun8i-v3s-ccu.h b/include/dt-bindings/clock/sun8i-v3s-ccu.h index 014ac6123d17..4231f23bc53b 100644 --- a/include/dt-bindings/clock/sun8i-v3s-ccu.h +++ b/include/dt-bindings/clock/sun8i-v3s-ccu.h @@ -87,7 +87,7 @@ #define CLK_SPI0 55 #define CLK_USB_PHY0 56 #define CLK_USB_OHCI0 57 - +#define CLK_DRAM 58 #define CLK_DRAM_VE 59 #define CLK_DRAM_CSI 60 #define CLK_DRAM_EHCI 61 @@ -101,7 +101,7 @@ #define CLK_VE 69 #define CLK_AC_DIG 70 #define CLK_AVS 71 - +#define CLK_MBUS 72 #define CLK_MIPI_CSI 73 /* Clocks not available on V3s */ From patchwork Wed Nov 22 14:14:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Kocialkowski X-Patchwork-Id: 168392 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2b07:b0:403:3b70:6f57 with SMTP id io7csp1355542vqb; Wed, 22 Nov 2023 06:17:57 -0800 (PST) X-Google-Smtp-Source: AGHT+IHpt02kavOA1O1HnyBdz3Gs8XCmVI9eubAKqTXgWLeMv5qcOjUexK7MnQBiOGNWE8xQDCFg X-Received: by 2002:a17:90b:4d0f:b0:27c:f9e7:30fd with SMTP id mw15-20020a17090b4d0f00b0027cf9e730fdmr2814188pjb.7.1700662677370; Wed, 22 Nov 2023 06:17:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700662677; cv=none; d=google.com; s=arc-20160816; b=rnaE3kLizS8f5njgbedDwDLOdnhy59fzEOgTCAtgSudXLeqrhw2Twk4aTo0g2XdGly 6jhBLSOA+n0XcUlN8yn1tCAUY6LM+8EhGG6/0d4IgWZWbz+DeeOtbFfZHo1hR34DNhTn prRchhn/BjUTW69NwAvpLqiTGcrbA7CERoOENWFE8SqGLJzJPyo1WsEpEtLbkvP/uswN 3TDN8CqAa6kgQlbrv3nTW8WCTt3HbSqMAaH/wuC2CRTGFyi3m1czAcT/ySHXJg8x6Fw5 WF8pfodyoWZLnLwIc9GRl2X18c7+on6nW4bglhCt77sydGb19b4gRSFxYF2cdpwFUs8p 2k3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ABQkvnbU9jREL+xGEduT9Jz440AQVxL+9NX8sRWpyl0=; fh=PHVbIgf+UxIdrbueJ5cOSpcsisIa90hQUxmE2wscmBk=; b=OMdCoopUUt3Vet+7lsRIugkQvz3vzwuuqom1CEdJnRGGnnHeOpB1JBqe1ahePKFmr0 LikQZ/UmMLKAfOCiziftxqO8UKsk+AlG7lMysGwg5WhAqRXuk6gpDQmTCwIoJNQfkwjv 0HZ72/9AzXm6jSiNU598tPF4KZ9yQD5g4czZTZ3emE6mLIgSgJQq/yjjQaKHymrQGMl+ EMPFLb5GhFfGFbPbhFCW+udk4cepBky/AxUgYBuFjCF13FlYYbVFDd0XVOaGfiLAI2Hj a4EqaUna4Mfjrn6H/XghGP8k/8+4qQFl569BabwkXT9tojgDBbtwhp1C0wh/DK26VzuG dyXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=UOYPKGnr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id p15-20020a17090b010f00b002802f5bf238si1554631pjz.31.2023.11.22.06.17.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 06:17:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=UOYPKGnr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 3564B825ED89; Wed, 22 Nov 2023 06:15:03 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344139AbjKVOO4 (ORCPT + 99 others); Wed, 22 Nov 2023 09:14:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47192 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232190AbjKVOOx (ORCPT ); Wed, 22 Nov 2023 09:14:53 -0500 Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 122C018E; Wed, 22 Nov 2023 06:14:48 -0800 (PST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 166E2E000A; Wed, 22 Nov 2023 14:14:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1700662487; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ABQkvnbU9jREL+xGEduT9Jz440AQVxL+9NX8sRWpyl0=; b=UOYPKGnr7sOyxEsQY3xpDVSRRGBZINCji7asEbWpRM803LzqHZWc45iqwkf6AbjKlWKvjI FxfR1WGV6IKEaFYUpUBU6T8z0wnOLgvJVXLXF7fJiAmxbrbMf3HAHiHnz9woxoT6o6IjoV fANbhFgt7lRAJUBPV/vlsDbH/bYeialQuZPUp/ACdQ/6k+Ka59dMxDiiycLCWiEpKVuu4t JyvCqDr5ZePlFwWBKyBOK5PPmN3IoneyuHOTyPx2iRQely6KIozj+MQTnc/IKbRimK1W18 cml8a1t27JJp4x3hW5XyimZLnmBevRq6GZIFwCJnCI/u+d9qhKPJj2dJATzdZA== From: Paul Kocialkowski To: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org Cc: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Maxime Ripard , Laurent Pinchart , Michael Turquette , Stephen Boyd , Paul Kocialkowski Subject: [PATCH v7 2/7] ARM: dts: sun8i: v3s: Add mbus node to represent the interconnect Date: Wed, 22 Nov 2023 15:14:20 +0100 Message-ID: <20231122141426.329694-3-paul.kocialkowski@bootlin.com> X-Mailer: git-send-email 2.42.1 In-Reply-To: <20231122141426.329694-1-paul.kocialkowski@bootlin.com> References: <20231122141426.329694-1-paul.kocialkowski@bootlin.com> MIME-Version: 1.0 X-GND-Sasl: paul.kocialkowski@bootlin.com X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Wed, 22 Nov 2023 06:15:03 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783274067231174520 X-GMAIL-MSGID: 1783274067231174520 The V3s uses the mbus interconnect to provide DRAM access for a number of blocks. The SoC can only map 2 GiB of DRAM, which is reflected in the dma-ranges property. Signed-off-by: Paul Kocialkowski Reviewed-by: Samuel Holland --- arch/arm/boot/dts/allwinner/sun8i-v3s.dtsi | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/arch/arm/boot/dts/allwinner/sun8i-v3s.dtsi b/arch/arm/boot/dts/allwinner/sun8i-v3s.dtsi index 3b9a282c2746..506e98f4f69d 100644 --- a/arch/arm/boot/dts/allwinner/sun8i-v3s.dtsi +++ b/arch/arm/boot/dts/allwinner/sun8i-v3s.dtsi @@ -579,6 +579,21 @@ int_mii_phy: ethernet-phy@1 { }; }; + mbus: dram-controller@1c62000 { + compatible = "allwinner,sun8i-v3s-mbus"; + reg = <0x01c62000 0x1000>, + <0x01c63000 0x1000>; + reg-names = "mbus", "dram"; + clocks = <&ccu CLK_MBUS>, + <&ccu CLK_DRAM>, + <&ccu CLK_BUS_DRAM>; + clock-names = "mbus", "dram", "bus"; + #address-cells = <1>; + #size-cells = <1>; + dma-ranges = <0x00000000 0x40000000 0x80000000>; + #interconnect-cells = <1>; + }; + spi0: spi@1c68000 { compatible = "allwinner,sun8i-h3-spi"; reg = <0x01c68000 0x1000>; From patchwork Wed Nov 22 14:14:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Kocialkowski X-Patchwork-Id: 168393 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2b07:b0:403:3b70:6f57 with SMTP id io7csp1355552vqb; Wed, 22 Nov 2023 06:17:58 -0800 (PST) X-Google-Smtp-Source: AGHT+IFiArzCXZ9dDKqPg3oNlLCjvL8kWYy0idzE5qWly1/CYuXsEl/uo+lhQBGYeiqtrX6WnTIQ X-Received: by 2002:a05:6a20:da97:b0:18b:4fa:a861 with SMTP id iy23-20020a056a20da9700b0018b04faa861mr3266044pzb.7.1700662678354; Wed, 22 Nov 2023 06:17:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700662678; cv=none; d=google.com; s=arc-20160816; b=lYXfgn8f9ZK+oavmG8eB0ino70n8vxmvj17obELr5xqDBAdOO2TLo9rjVnw27ZwF2e owHb5JzfV0zQA5uJZmqiUBvjiK83xViFsqG6Yy1vDa/5zJluzzYU1Tdf4N42is6ltV49 ORlU1kgnFC/5yJTUfjZLVVOSMZ3uSe50JE+DYtO1t2abfhF9/9gQqZJlReizjwoIxx1V Lc89wAEq7v+AQ7VsXhpEcIyW0mXNCaVmx9nk99uxwcMT1ubl3YSDVfZvXAl+xsggOLFw 5HZNJOYUAnm9rM9mZ8BpM6mLNzZQUb0rgdEEfxQXn7DEVmwqxK9DP4gs/d5g3aakOASW sGvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=4r8AmM7mXWeipOMUfi50m9Hi0q6kLe/5x9Q/douM3aY=; fh=PHVbIgf+UxIdrbueJ5cOSpcsisIa90hQUxmE2wscmBk=; b=Aor5LHs35Md4xKzEWpSLnTtAMBRQTwKTAHj2LnMQ60XAHalkB8j9v+l4N3Mg/iak04 8x0xoj8WwE6c5hYMfrVkAxvXagPuvj/54rTn4Vah4+NlXBy5e9fEineYt9SI7pION6LV jby4BIxM6s1d+OQ9HJ4/Uh0Q6COGaUmHjCnf3NDFKWuoFF5Q1jFJ86DHc209X+T1rpvt heHIuY5ruWDeaXr4Wv99G+/fyEakUUNKECFcp/W/2sJOjVv2g1f2DGS29Y2co/nJFfrF PedUdRF2uJKg0Grewde8P8WKTCqNxt4NZ3c2XcR0TgqqvobeiYwie4E0BHwEK9rAQYd9 9oQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=RTfTRVsi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id q2-20020a635c02000000b005c1b2c911f0si12987856pgb.328.2023.11.22.06.17.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 06:17:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=RTfTRVsi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id B27AF806E570; Wed, 22 Nov 2023 06:15:27 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235206AbjKVOPD (ORCPT + 99 others); Wed, 22 Nov 2023 09:15:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47202 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231620AbjKVOOx (ORCPT ); Wed, 22 Nov 2023 09:14:53 -0500 Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E52E819D; Wed, 22 Nov 2023 06:14:49 -0800 (PST) Received: by mail.gandi.net (Postfix) with ESMTPSA id E09E7E0012; Wed, 22 Nov 2023 14:14:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1700662488; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=4r8AmM7mXWeipOMUfi50m9Hi0q6kLe/5x9Q/douM3aY=; b=RTfTRVsisHRP5wcG9YOUbabpkm1gdgR9IUrxZ2EuBPNx1Y6drFoUm0Axd70PVxqBBTvE/c bcYl0hPsvjHoMMhJbRuIZMb7jn3OolmyCk+6ZFH3N3K547Ib+BFLG7vwc8wmHXRPToW6fi R1oR+So8dr6Ie2ALrCBshOGRR6wOm9JsQoVV5DNXL9TPBuCgVQ301ivNTsh/goID1r3QQA /pWJXv/XTs3U3BCEB/QRlDFu1dIMZq+PdAsXjlmNN5d1SYbzXp5wvyX1SIus2FIlMbsGY0 GALU9Cljj/HOQuklGq5goKsA2R1qvRXJoBOH4lkHWdQgcBFhox+I5VQ5G2Pzzw== From: Paul Kocialkowski To: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org Cc: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Maxime Ripard , Laurent Pinchart , Michael Turquette , Stephen Boyd , Paul Kocialkowski Subject: [PATCH v7 3/7] ARM: dts: sun8i: v3s: Add nodes for MIPI CSI-2 support Date: Wed, 22 Nov 2023 15:14:21 +0100 Message-ID: <20231122141426.329694-4-paul.kocialkowski@bootlin.com> X-Mailer: git-send-email 2.42.1 In-Reply-To: <20231122141426.329694-1-paul.kocialkowski@bootlin.com> References: <20231122141426.329694-1-paul.kocialkowski@bootlin.com> MIME-Version: 1.0 X-GND-Sasl: paul.kocialkowski@bootlin.com X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Wed, 22 Nov 2023 06:15:28 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783274068377942039 X-GMAIL-MSGID: 1783274068377942039 MIPI CSI-2 is supported on the V3s with an A31-based MIPI CSI-2 bridge controller. The controller uses a separate D-PHY, which is the same that is otherwise used for MIPI DSI, but used in Rx mode. On the V3s, the CSI0 controller is dedicated to MIPI CSI-2 as it does not have access to any parallel interface pins. Add all the necessary nodes (CSI0, MIPI CSI-2 bridge and D-PHY) to support the MIPI CSI-2 interface. Note that a fwnode graph link is created between CSI0 and MIPI CSI-2 even when no sensor is connected. This will result in a probe failure for the controller as long as no sensor is connected but this is fine since no other interface is available. The interconnects property is used to inherit the proper DMA offset. Signed-off-by: Paul Kocialkowski --- arch/arm/boot/dts/allwinner/sun8i-v3s.dtsi | 71 ++++++++++++++++++++++ 1 file changed, 71 insertions(+) diff --git a/arch/arm/boot/dts/allwinner/sun8i-v3s.dtsi b/arch/arm/boot/dts/allwinner/sun8i-v3s.dtsi index 506e98f4f69d..d57612023aa4 100644 --- a/arch/arm/boot/dts/allwinner/sun8i-v3s.dtsi +++ b/arch/arm/boot/dts/allwinner/sun8i-v3s.dtsi @@ -621,6 +621,77 @@ gic: interrupt-controller@1c81000 { interrupts = ; }; + csi0: camera@1cb0000 { + compatible = "allwinner,sun8i-v3s-csi"; + reg = <0x01cb0000 0x1000>; + interrupts = ; + clocks = <&ccu CLK_BUS_CSI>, + <&ccu CLK_CSI1_SCLK>, + <&ccu CLK_DRAM_CSI>; + clock-names = "bus", "mod", "ram"; + resets = <&ccu RST_BUS_CSI>; + interconnects = <&mbus 5>; + interconnect-names = "dma-mem"; + status = "disabled"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@1 { + reg = <1>; + + csi0_in_mipi_csi2: endpoint { + remote-endpoint = <&mipi_csi2_out_csi0>; + }; + }; + }; + }; + + mipi_csi2: csi@1cb1000 { + compatible = "allwinner,sun8i-v3s-mipi-csi2", + "allwinner,sun6i-a31-mipi-csi2"; + reg = <0x01cb1000 0x1000>; + interrupts = ; + clocks = <&ccu CLK_BUS_CSI>, + <&ccu CLK_CSI1_SCLK>; + clock-names = "bus", "mod"; + resets = <&ccu RST_BUS_CSI>; + status = "disabled"; + + phys = <&dphy>; + phy-names = "dphy"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + mipi_csi2_in: port@0 { + reg = <0>; + }; + + mipi_csi2_out: port@1 { + reg = <1>; + + mipi_csi2_out_csi0: endpoint { + remote-endpoint = <&csi0_in_mipi_csi2>; + }; + }; + }; + }; + + dphy: d-phy@1cb2000 { + compatible = "allwinner,sun6i-a31-mipi-dphy"; + reg = <0x01cb2000 0x1000>; + clocks = <&ccu CLK_BUS_CSI>, + <&ccu CLK_MIPI_CSI>; + clock-names = "bus", "mod"; + resets = <&ccu RST_BUS_CSI>; + allwinner,direction = "rx"; + status = "disabled"; + #phy-cells = <0>; + }; + csi1: camera@1cb4000 { compatible = "allwinner,sun8i-v3s-csi"; reg = <0x01cb4000 0x3000>; From patchwork Wed Nov 22 14:14:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Kocialkowski X-Patchwork-Id: 168388 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2b07:b0:403:3b70:6f57 with SMTP id io7csp1354199vqb; Wed, 22 Nov 2023 06:16:09 -0800 (PST) X-Google-Smtp-Source: AGHT+IGXZ/6TAh1gR7aB+IV4uQ7iT2J4SyBAvV1BLqBxdGujKlaV4mqOcjrWNRP7cJbctuCRKaYK X-Received: by 2002:a05:6a21:199:b0:187:fefc:541d with SMTP id le25-20020a056a21019900b00187fefc541dmr4576586pzb.17.1700662569622; Wed, 22 Nov 2023 06:16:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700662569; cv=none; d=google.com; s=arc-20160816; b=VORgAb7mHNowiaUI8pHyxxbpj9i2Gf/SN/my4V3X/32VagxHOZuuAhMy4DMxcFEE+4 lmxb3LZqhHjGXk5tKoyXSwhaeKwyk0koaQkNoNSb1delXCq11T2cUZYw35B+V6uMC38H 1LopXc7zZvT5/tbt5s62NbmLdGW8lfCv2ZmE8dFHbalLFMisZil5cTD/YI3EQrdspD9Y 0yD0v/bKwKQMtXDH3Ye7dZO6NyIZi3ycv+QuNot4EhNYTMOXRWS6VrhkIz8tJy2Uo6H2 7XI5Mo+C2FHss7ZghUcTLWerJOK3PEtQFV7TUF7b7zmXDcQK8D5uQMNTMqRfvol4qT9w 7m7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=zkdHkQjq3zn+cr3h8O6hniqwb4wqvOUf1cWWpN7DY+s=; fh=PHVbIgf+UxIdrbueJ5cOSpcsisIa90hQUxmE2wscmBk=; b=acE67q5z7oWr5aWdQdUc1a2h3sC6yXLHnA/OzhX0Ce8/1t1a33QPya3/DOSmUsNt8u RoTVtVTlJUlGk7ZN4R0iN7i4fh5o5Funb5Y/nI/Z83LDaDIv7iWR9fd3mbgsta0uBLkn T6PewzxPZWMnZ+f2cSR0NTwsq+4QykMPtPmXmsDFaugw+EvGn4B1YcQHdjTMz+bzcI8l KwmvMrTjvnUNucPWdfXWT/G0hi7/0g2ePC+BLozeEXyJlLKcDnrdYkk8Wp6S25lEacH5 CWnRPwtbNe9WBza3fTfGFSjUBqk1knV4eYU3LhBIWpUqhJdxNd5se8KUW3tfOgFCSeeJ QHKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=eMuKTIP+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id t25-20020a056a00139900b006cbab77d0easi6158373pfg.162.2023.11.22.06.16.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 06:16:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=eMuKTIP+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id E37CE820DA05; Wed, 22 Nov 2023 06:15:15 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235216AbjKVOPG (ORCPT + 99 others); Wed, 22 Nov 2023 09:15:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47224 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235170AbjKVOOy (ORCPT ); Wed, 22 Nov 2023 09:14:54 -0500 Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::224]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C92E497; Wed, 22 Nov 2023 06:14:50 -0800 (PST) Received: by mail.gandi.net (Postfix) with ESMTPSA id BC234E0007; Wed, 22 Nov 2023 14:14:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1700662489; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zkdHkQjq3zn+cr3h8O6hniqwb4wqvOUf1cWWpN7DY+s=; b=eMuKTIP+3smNdNoRBrZEeMbsJjG0CWGQ6wjhR+xyz4LO5SxAm7+b5yxQUdS4igDJG7Obr+ 2NAwGIeKs3kv/ZY0/2Pdt1q4pt1CLSd9LC7vT79bPx+cKN3wYO/r2k9UT+TyHxbl/FR+a+ 3mRk4Jq20XyzteKkuKtwW01wqj2PBbx/7R7z1Kl6dpEqto5LNLlePHRT4X72pQgSYPmfF+ hmGgnMMXWWDURMHrx+N6d4At2kFO4iZ8xZil4o0hVCvPYKMvrUQIl9Um8ks+yMMfoNhc7+ 2F+GtkLXKV2t7s+nQLScgQq5VFksionhGslwoB6qzTE+mTxipnS3pXxw8cAePA== From: Paul Kocialkowski To: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org Cc: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Maxime Ripard , Laurent Pinchart , Michael Turquette , Stephen Boyd , Paul Kocialkowski Subject: [PATCH v7 4/7] ARM: dts: sun8i: v3s: Add support for the ISP Date: Wed, 22 Nov 2023 15:14:22 +0100 Message-ID: <20231122141426.329694-5-paul.kocialkowski@bootlin.com> X-Mailer: git-send-email 2.42.1 In-Reply-To: <20231122141426.329694-1-paul.kocialkowski@bootlin.com> References: <20231122141426.329694-1-paul.kocialkowski@bootlin.com> MIME-Version: 1.0 X-GND-Sasl: paul.kocialkowski@bootlin.com X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Wed, 22 Nov 2023 06:15:16 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783273954468624745 X-GMAIL-MSGID: 1783273954468624745 The V3s (and related platforms) come with an instance of the A31 ISP. Even though it is very close to the A31 ISP, it is not exactly register-compatible and a dedicated compatible only is used as a result. Just like most other blocks of the camera pipeline, the ISP uses the common CSI bus, module and ram clock as well as reset. A port connection to the ISP is added to CSI0 for convenience since CSI0 serves for MIPI CSI-2 interface support, which is likely to receive raw data that will need to be processed by the ISP to produce a final image. The interconnects property is used to inherit the proper DMA offset. Signed-off-by: Paul Kocialkowski --- arch/arm/boot/dts/allwinner/sun8i-v3s.dtsi | 35 ++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/arch/arm/boot/dts/allwinner/sun8i-v3s.dtsi b/arch/arm/boot/dts/allwinner/sun8i-v3s.dtsi index d57612023aa4..1a1dcd36cba4 100644 --- a/arch/arm/boot/dts/allwinner/sun8i-v3s.dtsi +++ b/arch/arm/boot/dts/allwinner/sun8i-v3s.dtsi @@ -645,6 +645,14 @@ csi0_in_mipi_csi2: endpoint { remote-endpoint = <&mipi_csi2_out_csi0>; }; }; + + port@2 { + reg = <2>; + + csi0_out_isp: endpoint { + remote-endpoint = <&isp_in_csi0>; + }; + }; }; }; @@ -703,5 +711,32 @@ csi1: camera@1cb4000 { resets = <&ccu RST_BUS_CSI>; status = "disabled"; }; + + isp: isp@1cb8000 { + compatible = "allwinner,sun8i-v3s-isp"; + reg = <0x01cb8000 0x1000>; + interrupts = ; + clocks = <&ccu CLK_BUS_CSI>, + <&ccu CLK_CSI1_SCLK>, + <&ccu CLK_DRAM_CSI>; + clock-names = "bus", "mod", "ram"; + resets = <&ccu RST_BUS_CSI>; + interconnects = <&mbus 5>; + interconnect-names = "dma-mem"; + status = "disabled"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + + isp_in_csi0: endpoint { + remote-endpoint = <&csi0_out_isp>; + }; + }; + }; + }; }; }; From patchwork Wed Nov 22 14:14:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Kocialkowski X-Patchwork-Id: 168391 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2b07:b0:403:3b70:6f57 with SMTP id io7csp1354923vqb; Wed, 22 Nov 2023 06:17:06 -0800 (PST) X-Google-Smtp-Source: AGHT+IEBsXsypei4gGQwOPYSXAMEoq/VYDi11GIzGIzxrQQOnaDZ6P2bIMbT9mjeHHalGQgqBM4M X-Received: by 2002:a05:6a20:548c:b0:13f:13cb:bc50 with SMTP id i12-20020a056a20548c00b0013f13cbbc50mr4309093pzk.25.1700662625794; Wed, 22 Nov 2023 06:17:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700662625; cv=none; d=google.com; s=arc-20160816; b=k9/UNSmspUNVxrjDUydOvJeQQVKiqVJxDqeGtReiB0x5H42U9SScrdGFrHnAsx6afK 6bog8UdS9zeXRsvJHpF7Cm9NWI71kwdHVO/pWHsy1DMswUcVPS76esHkVkAvJAmcSug1 1a1Bj1M91DRxQwPtNbxSN3JzRyn07F5PC8wq7Zn/YKEcxjxJ+WcXeDUZQwgCzg3NfDbi jF2tY700apY+KQ1Jpk5enjT3xqx1HJ9XK5QBui/o4CwC+720dpApWypGXZZnz1nITaCZ CCSDNwog/4cnfcJ+HM108bTVjEZ02QSHnIgN85kTkZ7qMKwRDj2Aj4clt8LQdolhWnt+ BBdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=OJh0UJcLRZDsO0H3GP2TmEuizz0gtILPNblbJuaZueI=; fh=PHVbIgf+UxIdrbueJ5cOSpcsisIa90hQUxmE2wscmBk=; b=KiC3GXjBz9dF1/6G9oyoMMxzu6zE+ZHOgV/WK2w7v+dHChbKbjZpBfBiEXAO91j6EB gYu4Sa4FcGWXDjElrUC26sHnYUzHjErojRhrKkknZMs95wU6h2eFhnidsvw1y4LjWrZR vuy5tyoJB/UBMDIttEa7ANVIwFvJw8ow2V2Wp5q1AJCZwfRvD9KyZvTDU8bDFb/5w2gD eTdodrFsS3CPhg8qoi/N9rX7BTInUB/t75eRYcnqqCf6EagDLsOWKB5baaRBc12upjg+ vALTP8VLkl6rHE3gr8nl3BlGjl1GTQLe/gdPUPoUasS86eiskpurafUGuDtSCo8/QbEB kPcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=aGAVlR1d; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id e12-20020a631e0c000000b005b958401e4fsi12947833pge.418.2023.11.22.06.17.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 06:17:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=aGAVlR1d; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id D45B8807259D; Wed, 22 Nov 2023 06:15:46 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235204AbjKVOPI (ORCPT + 99 others); Wed, 22 Nov 2023 09:15:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47228 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344159AbjKVOO5 (ORCPT ); Wed, 22 Nov 2023 09:14:57 -0500 Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4379D101; Wed, 22 Nov 2023 06:14:53 -0800 (PST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 97F2DE000F; Wed, 22 Nov 2023 14:14:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1700662492; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=OJh0UJcLRZDsO0H3GP2TmEuizz0gtILPNblbJuaZueI=; b=aGAVlR1dvSb8R60JtZC4/1ZmFZCQmBdZtEBRDcN9p7PwJw47vH70p/M1SXIfQelMrh9qLs UJoLFtz0IUziaBa40lXw4X9wGepSb9oLxRmORW7AE1aNWNbLkEovE4TqeBMLtxzoXjwM+R wVL1y4oE8N+nqw32IqZVqOnJPDKhomCC8KJ1qTV+kFxPrw7Bo9wtbbpHgHH1SU+3ExfQsP u9Q9Db3A5SiJRAS3kL9A+8C4SzEhURpq4udRGSXfI0OvEzf/i0Dfdh8IBgjaomT4ClPzw6 /uTv+d0f7NT9Eda1skSB+7d3jfKMKPeAETuHoBBIeGn0JEnm2ZjVXD2yfVpctA== From: Paul Kocialkowski To: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org Cc: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Maxime Ripard , Laurent Pinchart , Michael Turquette , Stephen Boyd , Paul Kocialkowski Subject: [PATCH v7 5/7] ARM: dts: sun8i: a83t: Add MIPI CSI-2 controller node Date: Wed, 22 Nov 2023 15:14:23 +0100 Message-ID: <20231122141426.329694-6-paul.kocialkowski@bootlin.com> X-Mailer: git-send-email 2.42.1 In-Reply-To: <20231122141426.329694-1-paul.kocialkowski@bootlin.com> References: <20231122141426.329694-1-paul.kocialkowski@bootlin.com> MIME-Version: 1.0 X-GND-Sasl: paul.kocialkowski@bootlin.com X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Wed, 22 Nov 2023 06:15:47 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783274012999680829 X-GMAIL-MSGID: 1783274012999680829 MIPI CSI-2 is supported on the A83T with a dedicated controller that covers both the protocol and D-PHY. It is connected to the only CSI receiver with a fwnode graph link. Note that the CSI receiver supports both this MIPI CSI-2 source and a parallel source. An empty port with a label for the MIPI CSI-2 sensor input is also defined for convenience. Signed-off-by: Paul Kocialkowski Reviewed-by: Jernej Skrabec --- arch/arm/boot/dts/allwinner/sun8i-a83t.dtsi | 43 +++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/arch/arm/boot/dts/allwinner/sun8i-a83t.dtsi b/arch/arm/boot/dts/allwinner/sun8i-a83t.dtsi index 94eb3bfc989e..b74c3f9e6598 100644 --- a/arch/arm/boot/dts/allwinner/sun8i-a83t.dtsi +++ b/arch/arm/boot/dts/allwinner/sun8i-a83t.dtsi @@ -1062,6 +1062,49 @@ csi: camera@1cb0000 { clock-names = "bus", "mod", "ram"; resets = <&ccu RST_BUS_CSI>; status = "disabled"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@1 { + reg = <1>; + + csi_in_mipi_csi2: endpoint { + remote-endpoint = <&mipi_csi2_out_csi>; + }; + }; + }; + }; + + mipi_csi2: csi@1cb1000 { + compatible = "allwinner,sun8i-a83t-mipi-csi2"; + reg = <0x01cb1000 0x1000>; + interrupts = ; + clocks = <&ccu CLK_BUS_CSI>, + <&ccu CLK_CSI_SCLK>, + <&ccu CLK_MIPI_CSI>, + <&ccu CLK_CSI_MISC>; + clock-names = "bus", "mod", "mipi", "misc"; + resets = <&ccu RST_BUS_CSI>; + status = "disabled"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + mipi_csi2_in: port@0 { + reg = <0>; + }; + + mipi_csi2_out: port@1 { + reg = <1>; + + mipi_csi2_out_csi: endpoint { + remote-endpoint = <&csi_in_mipi_csi2>; + }; + }; + }; }; hdmi: hdmi@1ee0000 { From patchwork Wed Nov 22 14:14:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Kocialkowski X-Patchwork-Id: 168389 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2b07:b0:403:3b70:6f57 with SMTP id io7csp1354520vqb; Wed, 22 Nov 2023 06:16:34 -0800 (PST) X-Google-Smtp-Source: AGHT+IFRbGQ2ehuKK2hvbNkr/FUA6Ab35M2vva89haY808jSO2GZgqmcmg+fCSCCsK2zEO9xfzBO X-Received: by 2002:a05:6a00:369a:b0:68c:4e22:8f78 with SMTP id dw26-20020a056a00369a00b0068c4e228f78mr3009338pfb.25.1700662594251; Wed, 22 Nov 2023 06:16:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700662594; cv=none; d=google.com; s=arc-20160816; b=Gm3u4HvgFRv/pRcpwVlNM/PA37XDgW6kWD22zpmtoDqm5t7mPsk65HdhwWHwI95ubh fk/ztZMSW/1HUHuKwHn+vsyxnlppPn1QFHjCy6nLu+Bu6ZSNGVKev4AhDopjH8anpyZc pLwEYSKA38Q8Mwgq56R433868x2f0vnHjtqD6BZ3LAr0Fn3d0q72wvUG7YJcspOFJkrl LtvNXoWhSNg0FhRcfjGyKeWvEWUA68OUdDrhvrQB9gBeBFUeDDmgbzHm6h7QGG9Jwkg2 bwsbWodnaH4Z2PrziF1ZWrPQA7WOLHkn/M3E48SYJs9YQ6eKh8JT2itQvdu7z4NELsRg UwBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=MbVQzX9cYR/++E90CQRNI6quSUpAd4A/5VEQuPiEtWI=; fh=PHVbIgf+UxIdrbueJ5cOSpcsisIa90hQUxmE2wscmBk=; b=uv0fk2Y8SeZwbxodXJMcRHtoB62jiMHH2AWHNb8DUiz9gKwrivmh8Czv1YHpt5uPx3 XQYbWKL62G/vPkBzDXjtTiuUfn7MzQj7mb0HbbH1dV5vbGnqwHRF84s5aWSdbI6oMdFj e89HJr5BPRoitwyAA4uE96KKdOSSlXQI9G2WY5HF3lP+YY/OARGK5aQFdnevHDsuVMgA jHtbgJuKQg+duJwmxoeFHj2Zs8b0ipYQqAqY4xELh+2dpa2vbvuDRbeAFZJvPLJs7ANt 9mz0Dvazs1XeahY+FjYpQ8mm6M4N4haqzK7uwUllYezxigyI6NwDyzDRegwZX0EYLgiL QAoA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=lZr+F0YT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id t14-20020a65608e000000b005b8ea4a4ab6si12965382pgu.623.2023.11.22.06.16.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 06:16:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=lZr+F0YT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 26356807FC22; Wed, 22 Nov 2023 06:15:30 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344292AbjKVOPL (ORCPT + 99 others); Wed, 22 Nov 2023 09:15:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47264 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232190AbjKVOO7 (ORCPT ); Wed, 22 Nov 2023 09:14:59 -0500 Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::224]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 42692112; Wed, 22 Nov 2023 06:14:54 -0800 (PST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 1B494E0009; Wed, 22 Nov 2023 14:14:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1700662492; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=MbVQzX9cYR/++E90CQRNI6quSUpAd4A/5VEQuPiEtWI=; b=lZr+F0YTNHF6CaCw6lHJBLFdVfhZhxauFXKIIof73388r5Z25FoeU03jC2xC38zSwS9znR v+jAMrKJDWwKy5a9e52nblfc0bo/AOyhmg/vmMexkxcw/j79DqP70k8riNP4ABYhuwk3No dzFRWGz1DFAxH1QMVwJ/OTKRQkzEF+NMZo/AsQOQ/Eb3N3yBdhVxBs/gsBvsaO3HdLKY+Y 2Ne/JpL/nZ5nVrseDzrXJhxFFVVrNRSnQ+eqooWs0XltLhJC/6vGJSPBjiwmZBtw4s8La3 bx/LwkxJQSZfQwwr9Jao53POWapJbl6++j5/CC4MXtnpwOvP4XADMtGe4n0C+A== From: Paul Kocialkowski To: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org Cc: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Maxime Ripard , Laurent Pinchart , Michael Turquette , Stephen Boyd , Paul Kocialkowski Subject: [PATCH v7 6/7] ARM: dts: sun8i-a83t: Add BananaPi M3 OV5640 camera overlay Date: Wed, 22 Nov 2023 15:14:24 +0100 Message-ID: <20231122141426.329694-7-paul.kocialkowski@bootlin.com> X-Mailer: git-send-email 2.42.1 In-Reply-To: <20231122141426.329694-1-paul.kocialkowski@bootlin.com> References: <20231122141426.329694-1-paul.kocialkowski@bootlin.com> MIME-Version: 1.0 X-GND-Sasl: paul.kocialkowski@bootlin.com X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Wed, 22 Nov 2023 06:15:30 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783273980722361875 X-GMAIL-MSGID: 1783273980722361875 Add an overlay supporting the OV5640 from the BananaPi Camera v3 peripheral board. The board has two sensors (OV5640 and OV8865) which cannot be supported in parallel as they share the same reset pin and the kernel currently has no support for this case. Signed-off-by: Paul Kocialkowski --- arch/arm/boot/dts/allwinner/Makefile | 1 + .../sun8i-a83t-bananapi-m3-camera-ov5640.dtso | 117 ++++++++++++++++++ 2 files changed, 118 insertions(+) create mode 100644 arch/arm/boot/dts/allwinner/sun8i-a83t-bananapi-m3-camera-ov5640.dtso diff --git a/arch/arm/boot/dts/allwinner/Makefile b/arch/arm/boot/dts/allwinner/Makefile index eebb5a0c873a..a0a9aa6595e4 100644 --- a/arch/arm/boot/dts/allwinner/Makefile +++ b/arch/arm/boot/dts/allwinner/Makefile @@ -277,6 +277,7 @@ dtb-$(CONFIG_MACH_SUN8I) += \ sun8i-a33-sinlinx-sina33.dtb \ sun8i-a83t-allwinner-h8homlet-v2.dtb \ sun8i-a83t-bananapi-m3.dtb \ + sun8i-a83t-bananapi-m3-camera-ov5640.dtbo \ sun8i-a83t-cubietruck-plus.dtb \ sun8i-a83t-tbs-a711.dtb \ sun8i-h2-plus-bananapi-m2-zero.dtb \ diff --git a/arch/arm/boot/dts/allwinner/sun8i-a83t-bananapi-m3-camera-ov5640.dtso b/arch/arm/boot/dts/allwinner/sun8i-a83t-bananapi-m3-camera-ov5640.dtso new file mode 100644 index 000000000000..5868ef11bdee --- /dev/null +++ b/arch/arm/boot/dts/allwinner/sun8i-a83t-bananapi-m3-camera-ov5640.dtso @@ -0,0 +1,117 @@ +// SPDX-License-Identifier: GPL-2.0 OR X11 +/* + * Copyright 2022 Bootlin + * Author: Paul Kocialkowski + */ + +/dts-v1/; +/plugin/; + +#include +#include + +&{/} { + /* + * These regulators actually have DLDO4 tied to their EN pin, which is + * described as input supply here for lack of a better representation. + * Their actual supply is PS, which is always-on. + */ + + ov5640_avdd: ov5640-avdd { + compatible = "regulator-fixed"; + regulator-name = "ov5640-avdd"; + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <2800000>; + vin-supply = <®_dldo4>; + }; + + ov5640_dovdd: ov5640-dovdd { + compatible = "regulator-fixed"; + regulator-name = "ov5640-dovdd"; + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <2800000>; + vin-supply = <®_dldo4>; + }; + + ov5640_dvdd: ov5640-dvdd { + compatible = "regulator-fixed"; + regulator-name = "ov5640-dvdd"; + regulator-min-microvolt = <1500000>; + regulator-max-microvolt = <1500000>; + vin-supply = <®_dldo4>; + }; +}; + +&csi { + pinctrl-names = "default"; + pinctrl-0 = <&csi_8bit_parallel_pins>; + status = "okay"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + + csi_in_ov5640: endpoint { + remote-endpoint = <&ov5640_out_csi>; + bus-width = <8>; + data-shift = <2>; + hsync-active = <1>; + vsync-active = <1>; + pclk-sample = <1>; + }; + }; + }; +}; + +&i2c2 { + pinctrl-names = "default"; + pinctrl-0 = <&i2c2_pe_pins>; + status = "okay"; + + #address-cells = <1>; + #size-cells = <0>; + + ov5640: camera@3c { + compatible = "ovti,ov5640"; + reg = <0x3c>; + + clocks = <&ccu CLK_CSI_MCLK>; + clock-names = "xclk"; + assigned-clocks = <&ccu CLK_CSI_MCLK>; + assigned-clock-parents = <&osc24M>; + assigned-clock-rates = <24000000>; + + AVDD-supply = <&ov5640_avdd>; + DOVDD-supply = <&ov5640_dovdd>; + DVDD-supply = <&ov5640_dvdd>; + + powerdown-gpios = <&pio 3 15 GPIO_ACTIVE_HIGH>; /* PD15 */ + reset-gpios = <&pio 4 16 GPIO_ACTIVE_LOW>; /* PE16 */ + + rotation = <180>; + + port { + ov5640_out_csi: endpoint { + remote-endpoint = <&csi_in_ov5640>; + bus-width = <8>; + data-shift = <2>; + hsync-active = <1>; + vsync-active = <1>; + pclk-sample = <1>; + }; + }; + }; +}; + +&pio { + pinctrl-names = "default"; + pinctrl-0 = <&csi_mclk_pin>; +}; + +®_dldo4 { + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <2800000>; +}; From patchwork Wed Nov 22 14:14:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paul Kocialkowski X-Patchwork-Id: 168394 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2b07:b0:403:3b70:6f57 with SMTP id io7csp1355574vqb; Wed, 22 Nov 2023 06:18:00 -0800 (PST) X-Google-Smtp-Source: AGHT+IEiWdrQaDcA4ZjWWkEqVm4RAl/k4P91MVST9/dGxBpBR7eGq3/veci3eCXjE8+2nEaRtuKx X-Received: by 2002:a05:6a21:3614:b0:187:c8ca:75ad with SMTP id yg20-20020a056a21361400b00187c8ca75admr2082906pzb.31.1700662680492; Wed, 22 Nov 2023 06:18:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700662680; cv=none; d=google.com; s=arc-20160816; b=F6eKlNBbONFGlbuI6wR8oknPw8styXxXKtX2iTQXCAntZw8DAg5WjgUAjv6R1o2B2g HVZ//TBi2HXeJ9UinOPR+2Jg8KTyT0nBhR3a8B4ZsVD/tmk8HBzVBg0iX4hdVTmVlQXs LGWoFOiqsW47Nbsj5UUDF7sp7GqU0eFtAYDbmw3+OaFNLS5+TxWjtoyunmXR/WT6pN3m V1M/WdnOlSq5Tm4ArxPp8EEnsaNZJiUKDgFVSn+fyrc8/4NpSJzV24G0t4Mhod5yQI+K M93IhlKEk1sC7RnXjCJaO4MKhBNmk1IB+9kfmQTnmvkR3dQEbcUOxoxFuG2pjZB2uuvj l9dA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=RMUiNYYrSJTJpIrbqVmKd1nt/unZDdKv9MD9/KuRjYU=; fh=PHVbIgf+UxIdrbueJ5cOSpcsisIa90hQUxmE2wscmBk=; b=n4hWgG5oRitPToumg9MSTxXnIDftQ1/ij4f0TNrSro4N+f16f5K2bQu8XCPklga6mR m9DtP622Q5x2B7ojROKib/OIQTuXHEtzgiuVoTV3SGV24cOFlnVwsb41CnG7GAIpEpsz hYnUZL9LX2MVniBrMihgJ4tyqtqk6jX1BmTuSf9nI6wwhbPzAwTYVUxHRS/B1fswk2Xo ZSZpBdLW6AUOawiYSAsbAfcEi3qXkgbKrEKm81Tw06Kq6RVEp/la2FNbzBw4Bo9pdxPb rz+MrqeYHqhHfsgZA60iVWk+jXVdI+EYMMAKAUEwfKgabwZlXaq20HJq1S904JdCPXT3 1VgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=ZwSqH+8l; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id 1-20020a631541000000b005be1e55546esi12845143pgv.51.2023.11.22.06.18.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 06:18:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=ZwSqH+8l; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 029E780740F4; Wed, 22 Nov 2023 06:15:42 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344332AbjKVOPO (ORCPT + 99 others); Wed, 22 Nov 2023 09:15:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47274 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235176AbjKVOO7 (ORCPT ); Wed, 22 Nov 2023 09:14:59 -0500 Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1D28F18E; Wed, 22 Nov 2023 06:14:54 -0800 (PST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 0924DE0005; Wed, 22 Nov 2023 14:14:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1700662493; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=RMUiNYYrSJTJpIrbqVmKd1nt/unZDdKv9MD9/KuRjYU=; b=ZwSqH+8lCJrY2dcdvuLfcyUKWscKeAFuIdhGlMmMEJhRsMlUdaxjRRhbQ34NPkIQ/qOE19 iXLRl9FZIKxlPwHGd/Ru7l9BfhiKQT0hwj5QrjHPBjOoUeENgW9/PpftveMyDsl7zVDOV6 B/raDGP1i8+aaBcNSYagiXiDRpvHkNvuaoWf+x5DZ4uIS+bNYORAh4nyO3sHuxLCDI6B11 QebxJvcY69UBGKLF1zARAUH9PT7S+hzFI7WVTWD8s3sLq84eZ228OyFTe9I+LBt7OYNknO s65gs4Lrh1xWQpS7OJgWXbEdKUJZ+RbM7aSbj/begvkf6/XOPg+sGv5TMmK2Ng== From: Paul Kocialkowski To: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org Cc: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Maxime Ripard , Laurent Pinchart , Michael Turquette , Stephen Boyd , Paul Kocialkowski Subject: [PATCH v7 7/7] ARM: dts: sun8i-a83t: Add BananaPi M3 OV8865 camera overlay Date: Wed, 22 Nov 2023 15:14:25 +0100 Message-ID: <20231122141426.329694-8-paul.kocialkowski@bootlin.com> X-Mailer: git-send-email 2.42.1 In-Reply-To: <20231122141426.329694-1-paul.kocialkowski@bootlin.com> References: <20231122141426.329694-1-paul.kocialkowski@bootlin.com> MIME-Version: 1.0 X-GND-Sasl: paul.kocialkowski@bootlin.com X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Wed, 22 Nov 2023 06:15:42 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783274070467875955 X-GMAIL-MSGID: 1783274070467875955 Add an overlay supporting the OV8865 from the BananaPi Camera v3 peripheral board. The board has two sensors (OV5640 and OV8865) which cannot be supported in parallel as they share the same reset pin and the kernel currently has no support for this case. Signed-off-by: Paul Kocialkowski --- arch/arm/boot/dts/allwinner/Makefile | 1 + .../sun8i-a83t-bananapi-m3-camera-ov8865.dtso | 109 ++++++++++++++++++ 2 files changed, 110 insertions(+) create mode 100644 arch/arm/boot/dts/allwinner/sun8i-a83t-bananapi-m3-camera-ov8865.dtso diff --git a/arch/arm/boot/dts/allwinner/Makefile b/arch/arm/boot/dts/allwinner/Makefile index a0a9aa6595e4..980ac88634e3 100644 --- a/arch/arm/boot/dts/allwinner/Makefile +++ b/arch/arm/boot/dts/allwinner/Makefile @@ -278,6 +278,7 @@ dtb-$(CONFIG_MACH_SUN8I) += \ sun8i-a83t-allwinner-h8homlet-v2.dtb \ sun8i-a83t-bananapi-m3.dtb \ sun8i-a83t-bananapi-m3-camera-ov5640.dtbo \ + sun8i-a83t-bananapi-m3-camera-ov8865.dtbo \ sun8i-a83t-cubietruck-plus.dtb \ sun8i-a83t-tbs-a711.dtb \ sun8i-h2-plus-bananapi-m2-zero.dtb \ diff --git a/arch/arm/boot/dts/allwinner/sun8i-a83t-bananapi-m3-camera-ov8865.dtso b/arch/arm/boot/dts/allwinner/sun8i-a83t-bananapi-m3-camera-ov8865.dtso new file mode 100644 index 000000000000..0656ee8d4bfe --- /dev/null +++ b/arch/arm/boot/dts/allwinner/sun8i-a83t-bananapi-m3-camera-ov8865.dtso @@ -0,0 +1,109 @@ +// SPDX-License-Identifier: GPL-2.0 OR X11 +/* + * Copyright 2022 Bootlin + * Author: Kévin L'hôpital + * Author: Paul Kocialkowski + */ + +/dts-v1/; +/plugin/; + +#include +#include + +&{/} { + /* + * These regulators actually have DLDO4 tied to their EN pin, which is + * described as input supply here for lack of a better representation. + * Their actual supply is PS, which is always-on. + */ + + ov8865_avdd: ov8865-avdd { + compatible = "regulator-fixed"; + regulator-name = "ov8865-avdd"; + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <2800000>; + vin-supply = <®_dldo4>; + }; + + ov8865_dovdd: ov8865-dovdd { + compatible = "regulator-fixed"; + regulator-name = "ov8865-dovdd"; + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <2800000>; + vin-supply = <®_dldo4>; + }; + + ov8865_dvdd: ov8865-dvdd { + compatible = "regulator-fixed"; + regulator-name = "ov8865-dvdd"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + vin-supply = <®_dldo4>; + }; +}; + +&ccu { + assigned-clocks = <&ccu CLK_CSI_MCLK>; + assigned-clock-parents = <&osc24M>; + assigned-clock-rates = <24000000>; +}; + +&csi { + status = "okay"; +}; + +&i2c2 { + pinctrl-names = "default"; + pinctrl-0 = <&i2c2_pe_pins>; + status = "okay"; + + #address-cells = <1>; + #size-cells = <0>; + + ov8865: camera@36 { + compatible = "ovti,ov8865"; + reg = <0x36>; + + clocks = <&ccu CLK_CSI_MCLK>; + assigned-clocks = <&ccu CLK_CSI_MCLK>; + assigned-clock-parents = <&osc24M>; + assigned-clock-rates = <24000000>; + + avdd-supply = <&ov8865_avdd>; + dovdd-supply = <&ov8865_dovdd>; + dvdd-supply = <&ov8865_dvdd>; + + powerdown-gpios = <&pio 4 17 GPIO_ACTIVE_LOW>; /* PE17 */ + reset-gpios = <&pio 4 16 GPIO_ACTIVE_LOW>; /* PE16 */ + + port { + ov8865_out_mipi_csi2: endpoint { + remote-endpoint = <&mipi_csi2_in_ov8865>; + link-frequencies = /bits/ 64 <360000000>; + data-lanes = <1 2 3 4>; + }; + }; + }; +}; + +&mipi_csi2 { + status = "okay"; +}; + +&mipi_csi2_in { + mipi_csi2_in_ov8865: endpoint { + remote-endpoint = <&ov8865_out_mipi_csi2>; + data-lanes = <1 2 3 4>; + }; +}; + +&pio { + pinctrl-names = "default"; + pinctrl-0 = <&csi_mclk_pin>; +}; + +®_dldo4 { + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <2800000>; +};