From patchwork Fri Dec 13 13:29:54 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guillaume LA ROQUE X-Patchwork-Id: 11291625 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B07F614BD for ; Fri, 13 Dec 2019 22:22:27 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 79FF120706 for ; Fri, 13 Dec 2019 22:22:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="r4emlsZn"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=baylibre-com.20150623.gappssmtp.com header.i=@baylibre-com.20150623.gappssmtp.com header.b="vOOpviAx" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 79FF120706 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=qNkjUkvy5MNYSJsBixt6ygwXmqGaCrHdY21AYTEaWKw=; b=r4emlsZnr02z1DQ6YTb/qM8oJC AmmOtFAd8xolX0CIRptKGS1JO+sgOhEnZg7yPF7Onz89FlqdCUqNORYoYmEYrOr0tYCdzu48cgal4 zBt9SHQynU/GALocEN3EQjr8OJ8rM6N6jflcCQiHxbMoPsXJaQODCKd+bG4yXeABCEbT9HGYDQrN/ AIoqJvs8F9LFeXvTJg52QTHwEjFqJmD6Fx8bNJFpEhw7I4ORMAXiJzBU9iuOL2INETZXEuNZAiIiR 1OiIotyUBcC+bsdCeit6YJkiHRSHc8MksuC4qBPWZ/v3CTus4XjYZHKJMnKqBLEeRmO4/KxXe3VxZ UACKCtSg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ifl1Y-0008JA-PN; Fri, 13 Dec 2019 13:30:28 +0000 Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ifl16-0006qb-Se for linux-arm-kernel@lists.infradead.org; Fri, 13 Dec 2019 13:30:02 +0000 Received: by mail-wm1-x344.google.com with SMTP id d5so6559079wmb.4 for ; Fri, 13 Dec 2019 05:30:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=CgnEiw//WJHGzufAg0EVPn2uPGD0ymse5mrY0tAd6l4=; b=vOOpviAxpLRGWbDnsRDeW/Z1cMyneMze+jcUF80fZMjE8m6MgW1/3+1igyAiE8jaQZ sd0ebigH6c+U2qkc0FI8CrJdSX8t/BFyvVanWL+z/ZwFmiq8KMr6hU04tpRbTrysoWaa yoPfSR4+yq0vvpWheb1LEqa6KrqxM4/w1DHAbcWu6R2h7cUrw86N2hRISkX0Sqf11C5/ tomV/QGS/iS3FPhs4Qvi1TeuZWNaa5y1JuD7iZ079m1bD5Zbm6JGMM/bbeJrhG+RBg4J V4ST4UPBQEhdvtiaiIlEFYgjErWwFvWkj9ry2CB3q4X2skuv5zdQMWGc0Xopg/dgE4z+ fPxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=CgnEiw//WJHGzufAg0EVPn2uPGD0ymse5mrY0tAd6l4=; b=rW0WzPZR6hRLCsKxaSjNTQpFjwWPJ5OGO5SQXg63LIwfxh4PXIfyvwNLjMCpnF3AKH 1eHkMoHTvrFxSFMa9ql7WlNWI9FoCK1Z1k2QHSdN5RJYsDL14zOf0gZuw/cX0Y2gb4xp 5qdNBFVx8pUU9rqork1RyK6xGq+QXQYTTADkeNCv76rE2jbu17DjXwvZKABWfdZOvdTN lQOATkz31dw7l/Thpn59Q4UkhdE3e1+28HGYK/KbMr0PPjNRiD4qsAHsHrZb89EH4nNr PUjlK+pa0EM28wQnhc6bLx08te7GIQRAKwDCXhtKZm/XuDtUE4lmIwdSm4mtmKVbtXME VncA== X-Gm-Message-State: APjAAAUcVG4XqJ4dH3QUh6QpyGMnRNveOqpz0DNuD3JxJ8kICO+tuxvg flMNq2f3ObKO07Tv4T1tKrysBQ== X-Google-Smtp-Source: APXvYqys8/RNfak7NGL62z6NcWptRE36wV1YR+wvRxs1Ya8mDCpWIYIyNly0sr/UON3XlfgQlSltTw== X-Received: by 2002:a05:600c:149:: with SMTP id w9mr12997218wmm.132.1576243799677; Fri, 13 Dec 2019 05:29:59 -0800 (PST) Received: from localhost.localdomain ([2a01:cb1d:6e7:d500:82a9:347a:43f3:d2ca]) by smtp.gmail.com with ESMTPSA id n3sm10540543wmc.27.2019.12.13.05.29.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Dec 2019 05:29:59 -0800 (PST) From: Guillaume La Roque To: narmstrong@baylibre.com, mchehab@kernel.org, hverkuil-cisco@xs4all.nl, khilman@baylibre.com, devicetree@vger.kernel.org Subject: [PATCH v2 1/3] media: dt-bindings: media: meson-ao-cec: Add support of ao-sysctrl syscon Date: Fri, 13 Dec 2019 14:29:54 +0100 Message-Id: <20191213132956.11074-2-glaroque@baylibre.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191213132956.11074-1-glaroque@baylibre.com> References: <20191213132956.11074-1-glaroque@baylibre.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191213_053000_919311_371B3036 X-CRM114-Status: UNSURE ( 9.01 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:344 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org ao-sysctrl syscon phandle property is needed for CEC wakeup support. This property is optional. Tested-by: Kevin Hilman Signed-off-by: Guillaume La Roque Reviewed-by: Rob Herring --- .../devicetree/bindings/media/amlogic,meson-gx-ao-cec.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Documentation/devicetree/bindings/media/amlogic,meson-gx-ao-cec.yaml b/Documentation/devicetree/bindings/media/amlogic,meson-gx-ao-cec.yaml index 41197578f19a..1f721498d249 100644 --- a/Documentation/devicetree/bindings/media/amlogic,meson-gx-ao-cec.yaml +++ b/Documentation/devicetree/bindings/media/amlogic,meson-gx-ao-cec.yaml @@ -32,6 +32,10 @@ properties: allOf: - $ref: /schemas/types.yaml#/definitions/phandle + amlogic,ao-sysctrl: + description: phandle to the ao-sysctrl syscon + $ref: '/schemas/types.yaml#/definitions/phandle' + allOf: - if: properties: From patchwork Fri Dec 13 13:29:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guillaume LA ROQUE X-Patchwork-Id: 11291759 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DB8FB930 for ; Fri, 13 Dec 2019 22:27:25 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id C00782077B for ; Fri, 13 Dec 2019 22:27:25 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="ttqPsSgb"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=baylibre-com.20150623.gappssmtp.com header.i=@baylibre-com.20150623.gappssmtp.com header.b="fAowkLwb" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C00782077B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=n2jaMGGDmi198/UMWOrJtBqofkHmPk2mWkHIBMCpwSk=; b=ttqPsSgbD4kKMlFNccAijGCN/V 1mBtp8KXQCQ6+xt9YI2OJxR2RF8TDAhFspLtRYPAiGyAPZ9DJV/4BVGU/fEAeWtYVkMCQwdX5WWhg 5WBZEPNV65QweKAHwFOne7ZZWla+00wwd0arSf0xRDuw+cXawbXvmh1ar3MKa69VxIjIJVdfdTBVO BNJX3O/MHmEFFfFeesxSyaJI/j6RIidzABvT3TaJLyiu+uyKROJFzyBR5Y5ncCLImRzPVOFhouMDk bsqvA5ZDrJ5KY+zJZDmm/ljMih6eXZ6OwfofIQoSvUrNYHMkvn/ywBUMRjX51KuFCqF22kxP3Qv45 B4GamvKg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ifl1p-00007w-OG; Fri, 13 Dec 2019 13:30:45 +0000 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ifl18-0006r9-8c for linux-arm-kernel@lists.infradead.org; Fri, 13 Dec 2019 13:30:04 +0000 Received: by mail-wr1-x444.google.com with SMTP id z7so6606303wrl.13 for ; Fri, 13 Dec 2019 05:30:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=RihAxbyPf1sWOBRmJF5IKCF0zpUINaJgm3m7kfkEZZY=; b=fAowkLwbvcaMDwhICxvEuVnjEW+/HgTUaD7s4A/Xn36fZT0rVKZ4y7m1k0IE2WY4yG HpLmm5baYQ5QfDQDu1l10QecPEfxHOTfdJPIpLnZ51SFJQ4h0v/1XCERjTz+Lewf5W0S RoqxDd5K94lovPJJYQIzqqsWkO4Qd8QDymklzOooZuJrb9LpQFXyXk5+KLfphgJeKNY/ rmGC7TI6Wv2mdHg7NC3Q0x6uxP4dOZEwaNz7COjP6srZrTQrT36UqZt2d1GSZdsWDte9 eJDuz/WkglAvJY9CbMC40XjUUkcqgFwuOeInr59Xp2kvFvbrbOsB5eGqYlqUMV+MDr2Z HD7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=RihAxbyPf1sWOBRmJF5IKCF0zpUINaJgm3m7kfkEZZY=; b=cNyIPAnuwexIuj4DXqa4zvM8sxSYXnYTWeeDF1SnwrJ8LmulT25IpJEtMPlquwpLIh D6AMqtXMnmGiTKHg0sfG0gCjGQfp9f28kSSMxLlPRUSGY9e0Ihk3C6Cd2s+yNrBrC1Zl xSPNx/Rcd/D/iMsfYJ0RNYS82LNqOem61O8olPyofy4XcufFdESjaRSICDJW2FwGg+Mu TOXFtsW7hEZh8QVOUjcrX0MiKpmXmnVJk0lrbd5ilYt+k4eJ1MjJHe4hvZuU6umCWQF9 JD/krjpfaOpFdIO+ZcW7wXmLsEEjoWAfGkgoqHwUf3MProDzVcKFlbS4uZ5r3RTzQfes SW7w== X-Gm-Message-State: APjAAAWSdda4PBHVmkHiuYzkUfbaDr2M9PyB7WuBYmzGjVEGGFLMjRH3 8KPCnc+vy4Wg9ayyFEj7q8L/Cg== X-Google-Smtp-Source: APXvYqwNnx7cmRRsx41+o7uRC5/UJmd0OtDKCdpnC8FmFH+IVjL9ZtYfSJJwPHF91ntNAr9l0PWr/w== X-Received: by 2002:adf:e6c6:: with SMTP id y6mr12978031wrm.284.1576243800998; Fri, 13 Dec 2019 05:30:00 -0800 (PST) Received: from localhost.localdomain ([2a01:cb1d:6e7:d500:82a9:347a:43f3:d2ca]) by smtp.gmail.com with ESMTPSA id n3sm10540543wmc.27.2019.12.13.05.29.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Dec 2019 05:30:00 -0800 (PST) From: Guillaume La Roque To: narmstrong@baylibre.com, mchehab@kernel.org, hverkuil-cisco@xs4all.nl, khilman@baylibre.com, devicetree@vger.kernel.org Subject: [PATCH v2 2/3] arm64: dts: meson-g12g12: add syscon phandle in cec node Date: Fri, 13 Dec 2019 14:29:55 +0100 Message-Id: <20191213132956.11074-3-glaroque@baylibre.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191213132956.11074-1-glaroque@baylibre.com> References: <20191213132956.11074-1-glaroque@baylibre.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191213_053002_376404_F14A9F31 X-CRM114-Status: GOOD ( 11.27 ) X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:444 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org add syscon phandle in cec node to activate wakeup support Tested-by: Kevin Hilman Signed-off-by: Guillaume La Roque --- arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi index 7fabc8d9654a..98c6a1d1d035 100644 --- a/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi +++ b/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi @@ -1899,6 +1899,7 @@ interrupts = ; clocks = <&clkc_AO CLKID_AO_CTS_OSCIN>; clock-names = "oscin"; + amlogic,ao-sysctrl = <&rti>; status = "disabled"; }; From patchwork Fri Dec 13 13:29:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guillaume LA ROQUE X-Patchwork-Id: 11291861 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B323614B7 for ; Fri, 13 Dec 2019 22:30:44 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 968DA20706 for ; Fri, 13 Dec 2019 22:30:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="KGp12l0Y"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=baylibre-com.20150623.gappssmtp.com header.i=@baylibre-com.20150623.gappssmtp.com header.b="nZ9BQpSu" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 968DA20706 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=K1uRqTCZIkXV39Cy6INmm6HYxLsxlE6R/IfiAgqb53M=; b=KGp12l0Y0OVUG8H4RvpB8Uj0A4 a5O8Dx91YdETWCqod08MBLESZryoWl/dq2uEYsj/pDqUdMcB7fkO/0MXQhlZrlVqxR1hb/fFqef/K 9eOq54asOZ85sd3bsEyfgxh0NYDffQDPYsrrNTKh0bEj/cbxW4i2JfEOj1H0ULBRjT7pNhnzTTg64 kfGo7kDCN3xKRajJdsjizi86jV+tdi2+Q6Agxx0V2lApYvD402e6z525Lo55xZdFsOkApMPxSJon2 LKqDACiy7ZG8wpnWvRuthNer6kQYq8PqZ046ljG+daYl5eXavmQWDflZ0P56WbMPXVqrqSuFE4DFi /31bLzzg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ifl2D-0000Vu-Gj; Fri, 13 Dec 2019 13:31:09 +0000 Received: from mail-wm1-x343.google.com ([2a00:1450:4864:20::343]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ifl19-0006sp-JI for linux-arm-kernel@lists.infradead.org; Fri, 13 Dec 2019 13:30:06 +0000 Received: by mail-wm1-x343.google.com with SMTP id p17so6578824wmb.0 for ; Fri, 13 Dec 2019 05:30:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=VXzCIVNIyEIalSwrDVu1JlYLLJVG8LUdZccZXShpYsw=; b=nZ9BQpSuWb9dDeJykWlitqmovokkBjW/QjlPbblKCvaHm0mccziJSL6ajoVWDfotQt XnXJBWVcWNLc5JqFW+o9Tl23W+/w+x5W/n0yEqrgk6z0/klrDcJ9SfNGCgMevbuYx1lG PrEHbPePlNDmwl725H0hAvDzGoMTkkksqbQhhcoCR03XcDFG3miJ7j1meXOF47Dlzqj/ PhoneeU8HryDHVuUxDu+S7zYoeFUXDwS9XIFegBzSCM1Iacw2SqzmaHN/hkDNLrrDDuR oN6lS4cBVlahfCWW3hMbLY9yQzsgKZp/9i5oJV08NN4dEaKFVgf18DKoGYD6cvDudgHb zQMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=VXzCIVNIyEIalSwrDVu1JlYLLJVG8LUdZccZXShpYsw=; b=BUds5flKHptWW5trFJhYLSq1URF7ovO0vJKv+Tp/8JlmrHpvaR5wwK/FTFDeXGxJek RCtNLqc167t9JMifZpbQHI1x9vn6f4c7d0O2Ssz0MxQrVnVFKTMb3pgieskeMpoRelnO M5A8HolcJ43+2aR0VZ76V6/L+SPiE8Pe8IvfYhoUwfO+zRKH/g9sVX8wJoa02YbYlBMi dmLQ9JiMYvFDLWWZgop5ppAoZ1PzV64tVP2JvZuuwFgfMS8ME6vl2Bl1BNJvWlALGYBo Nh+VKW/IRpwQp0UoKHKzflOdfGeedDB+6eCSa8nXci9y4fGeoO68TJOPcOjS59tnifnQ 5lJQ== X-Gm-Message-State: APjAAAXA1moL736ltz0+2UxduHHCNZhij0ikFfEbpJE8rWwqpPuX85S2 cwNBm06hpko64kVQ/PJRj8JzFQ== X-Google-Smtp-Source: APXvYqySye0Al7ofzrrLCFePLmE9J5EDhkpPFb1QMhV+Eca0/HHqNuayvmb667XyzUHwTfXeZTWmWA== X-Received: by 2002:a1c:8086:: with SMTP id b128mr13635797wmd.80.1576243802038; Fri, 13 Dec 2019 05:30:02 -0800 (PST) Received: from localhost.localdomain ([2a01:cb1d:6e7:d500:82a9:347a:43f3:d2ca]) by smtp.gmail.com with ESMTPSA id n3sm10540543wmc.27.2019.12.13.05.30.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Dec 2019 05:30:01 -0800 (PST) From: Guillaume La Roque To: narmstrong@baylibre.com, mchehab@kernel.org, hverkuil-cisco@xs4all.nl, khilman@baylibre.com, devicetree@vger.kernel.org Subject: [PATCH v2 3/3] media: platform: meson-ao-cec-g12a: add wakeup support Date: Fri, 13 Dec 2019 14:29:56 +0100 Message-Id: <20191213132956.11074-4-glaroque@baylibre.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191213132956.11074-1-glaroque@baylibre.com> References: <20191213132956.11074-1-glaroque@baylibre.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191213_053003_679902_BAFFAE28 X-CRM114-Status: GOOD ( 12.12 ) X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:343 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org add register configuration to activate wakeup feature in bl301 Tested-by: Kevin Hilman Signed-off-by: Guillaume La Roque Reviewed-by: Neil Armstrong --- drivers/media/platform/meson/ao-cec-g12a.c | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/drivers/media/platform/meson/ao-cec-g12a.c b/drivers/media/platform/meson/ao-cec-g12a.c index 891533060d49..85850b974126 100644 --- a/drivers/media/platform/meson/ao-cec-g12a.c +++ b/drivers/media/platform/meson/ao-cec-g12a.c @@ -25,6 +25,7 @@ #include #include #include +#include /* CEC Registers */ @@ -168,6 +169,18 @@ #define CECB_WAKEUPCTRL 0x31 +#define CECB_FUNC_CFG_REG 0xA0 +#define CECB_FUNC_CFG_MASK GENMASK(6, 0) +#define CECB_FUNC_CFG_CEC_ON 0x01 +#define CECB_FUNC_CFG_OTP_ON 0x02 +#define CECB_FUNC_CFG_AUTO_STANDBY 0x04 +#define CECB_FUNC_CFG_AUTO_POWER_ON 0x08 +#define CECB_FUNC_CFG_ALL 0x2f +#define CECB_FUNC_CFG_NONE 0x0 + +#define CECB_LOG_ADDR_REG 0xA4 +#define CECB_LOG_ADDR_MASK GENMASK(22, 16) + struct meson_ao_cec_g12a_data { /* Setup the internal CECB_CTRL2 register */ bool ctrl2_setup; @@ -177,6 +190,7 @@ struct meson_ao_cec_g12a_device { struct platform_device *pdev; struct regmap *regmap; struct regmap *regmap_cec; + struct regmap *regmap_ao_sysctrl; spinlock_t cec_reg_lock; struct cec_notifier *notify; struct cec_adapter *adap; @@ -518,6 +532,13 @@ meson_ao_cec_g12a_set_log_addr(struct cec_adapter *adap, u8 logical_addr) BIT(logical_addr - 8)); } + if (ao_cec->regmap_ao_sysctrl) + ret |= regmap_update_bits(ao_cec->regmap_ao_sysctrl, + CECB_LOG_ADDR_REG, + CECB_LOG_ADDR_MASK, + FIELD_PREP(CECB_LOG_ADDR_MASK, + logical_addr)); + /* Always set Broadcast/Unregistered 15 address */ ret |= regmap_update_bits(ao_cec->regmap_cec, CECB_LADD_HIGH, BIT(CEC_LOG_ADDR_UNREGISTERED - 8), @@ -618,6 +639,13 @@ static int meson_ao_cec_g12a_adap_enable(struct cec_adapter *adap, bool enable) regmap_write(ao_cec->regmap_cec, CECB_CTRL2, FIELD_PREP(CECB_CTRL2_RISE_DEL_MAX, 2)); + if (ao_cec->regmap_ao_sysctrl) { + regmap_update_bits(ao_cec->regmap_ao_sysctrl, + CECB_FUNC_CFG_REG, + CECB_FUNC_CFG_MASK, + CECB_FUNC_CFG_ALL); + } + meson_ao_cec_g12a_irq_setup(ao_cec, true); return 0; @@ -685,6 +713,11 @@ static int meson_ao_cec_g12a_probe(struct platform_device *pdev) goto out_probe_adapter; } + ao_cec->regmap_ao_sysctrl = syscon_regmap_lookup_by_phandle + (pdev->dev.of_node, "amlogic,ao-sysctrl"); + if (IS_ERR(ao_cec->regmap_ao_sysctrl)) + dev_warn(&pdev->dev, "ao-sysctrl syscon regmap lookup failed.\n"); + irq = platform_get_irq(pdev, 0); ret = devm_request_threaded_irq(&pdev->dev, irq, meson_ao_cec_g12a_irq,