From patchwork Sat Feb 11 16:57:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Niklas_S=C3=B6derlund?= X-Patchwork-Id: 653027 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 09D2AC64ED6 for ; Sat, 11 Feb 2023 16:58:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229505AbjBKQ6z (ORCPT ); Sat, 11 Feb 2023 11:58:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53254 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229576AbjBKQ6y (ORCPT ); Sat, 11 Feb 2023 11:58:54 -0500 Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com [IPv6:2a00:1450:4864:20::433]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C5DC526BF for ; Sat, 11 Feb 2023 08:58:52 -0800 (PST) Received: by mail-wr1-x433.google.com with SMTP id co8so4406680wrb.1 for ; Sat, 11 Feb 2023 08:58:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ragnatech-se.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=gKHa2WXs3N1837KLyPrWv8Z3wmI3snRyJspZOs7w6zo=; b=X11T3XAsvpVim8jfkl7QVbyPlbYU1robyzaiuk2tR1QNQr0e9VB0gN/YLzemY9CHpn jdC1VMEC6xBezfXczDMYJARlZFsHWfXYIgQBD7zeQfx0+Ih/JuKenLAv13zJ0nT+FqtO 6WVyAnuplj9NsLdx8u91HOhASJrF4x9S2/I0aRfTe4J0Ps7pLBQ6CB+j0PE8Lj2H9TAW FZEfjhuhhJKf1wUKss9dPnZyAK+7Gq6wT3kq/EYxgm/+7JdWdFLcdQcFFvt7ggjpbGQA j8Gw76deBmSs1sZgiEqhZm9ljE3Ps8tb6/VKKZ6xc0B21V99lLXtOMyi5GXlI+UvAFqM 62ow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=gKHa2WXs3N1837KLyPrWv8Z3wmI3snRyJspZOs7w6zo=; b=qXWv0+67XxoE3dodHync6KbIPge4AGlSk0HZFMVGYWbGJB0Ze0PaNP+e67SS5BiVmn oV+tJhMY8jiF5SKX/LTlNgX0oe9g8xoMUE1tt4VpvZdBKwKdLgxg+HezkHtsha9Azai0 dQO7XH8KPq4XrRopBGy6Vmle5QtVnaOixAl/AnCFS8/kS2UC7XkcYnvlU9ZSCy/DtJ5B GkLQqRbEuyuOtn3JQ2QTj8P8J168AzCZcPHLXmZ2AEEQ43fwtgXegmhzDzYLXNLdF1ZM u1fSEi/Y1bW9dTymj2612A+Zam3o0xUzuD+Xzi3aejBQSdIEOjHT7zRMVRd9G4qOe8r7 OnCw== X-Gm-Message-State: AO0yUKXE7Uop1wlBf0u21DTQmvkqFDhxPQuHnnHV85q3H4NIeez+KRQZ eyZrw3aCt+wQr9rRH8rRIR4zNw== X-Google-Smtp-Source: AK7set/X/r/WgS5SA9zfJCgLU0EBExTO0k6yjqVuwnp0Ihc3WbhsouErp+2PAboLKux3bSKIi3ik0g== X-Received: by 2002:a05:6000:1144:b0:242:1809:7e17 with SMTP id d4-20020a056000114400b0024218097e17mr16188284wrx.6.1676134731196; Sat, 11 Feb 2023 08:58:51 -0800 (PST) Received: from sleipner.berto.se (p54ac5802.dip0.t-ipconnect.de. [84.172.88.2]) by smtp.googlemail.com with ESMTPSA id y13-20020a5d614d000000b002c5526234d2sm887064wrt.8.2023.02.11.08.58.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 11 Feb 2023 08:58:50 -0800 (PST) From: =?utf-8?q?Niklas_S=C3=B6derlund?= To: Geert Uytterhoeven , Laurent Pinchart , devicetree@vger.kernel.org Cc: linux-renesas-soc@vger.kernel.org, =?utf-8?q?Niklas_S=C3=B6derlund?= Subject: [PATCH 1/2] arm64: dts: renesas: draak: Make HDMI the default video input Date: Sat, 11 Feb 2023 17:57:14 +0100 Message-Id: <20230211165715.4024992-2-niklas.soderlund+renesas@ragnatech.se> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230211165715.4024992-1-niklas.soderlund+renesas@ragnatech.se> References: <20230211165715.4024992-1-niklas.soderlund+renesas@ragnatech.se> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Most Gen3 R-Car devices have HDMI as the default video input source, align Draak with them and make HDMI the default. While at it move the bus properties to the VIN node where they can be consumed correctly by the driver. Signed-off-by: Niklas Söderlund --- arch/arm64/boot/dts/renesas/draak.dtsi | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/arch/arm64/boot/dts/renesas/draak.dtsi b/arch/arm64/boot/dts/renesas/draak.dtsi index ef3bb835d5c0..e248866c7871 100644 --- a/arch/arm64/boot/dts/renesas/draak.dtsi +++ b/arch/arm64/boot/dts/renesas/draak.dtsi @@ -356,11 +356,10 @@ port@3 { * CVBS and HDMI inputs through SW[49-53] * switches. * - * CVBS is the default selection, link it to - * VIN4 here. + * HDMI is the default selection, leave CVBS + * not connected here. */ adv7180_out: endpoint { - remote-endpoint = <&vin4_in>; }; }; }; @@ -423,13 +422,11 @@ port@2 { * CVBS and HDMI inputs through SW[49-53] * switches. * - * CVBS is the default selection, leave HDMI - * not connected here. + * HDMI is the default selection, link it to + * VIN4 here. */ adv7612_out: endpoint { - pclk-sample = <0>; - hsync-active = <0>; - vsync-active = <0>; + remote-endpoint = <&vin4_in>; }; }; }; @@ -580,8 +577,8 @@ usb0_pins: usb0 { function = "usb0"; }; - vin4_pins_cvbs: vin4 { - groups = "vin4_data8", "vin4_sync", "vin4_clk"; + vin4_pins: vin4 { + groups = "vin4_data24", "vin4_sync", "vin4_clk"; function = "vin4"; }; }; @@ -729,7 +726,7 @@ &usb2_phy0 { }; &vin4 { - pinctrl-0 = <&vin4_pins_cvbs>; + pinctrl-0 = <&vin4_pins>; pinctrl-names = "default"; status = "okay"; @@ -737,7 +734,10 @@ &vin4 { ports { port { vin4_in: endpoint { - remote-endpoint = <&adv7180_out>; + pclk-sample = <0>; + hsync-active = <0>; + vsync-active = <0>; + remote-endpoint = <&adv7612_out>; }; }; }; From patchwork Sat Feb 11 16:57:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Niklas_S=C3=B6derlund?= X-Patchwork-Id: 652774 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 40310C6379F for ; Sat, 11 Feb 2023 16:58:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229532AbjBKQ6z (ORCPT ); Sat, 11 Feb 2023 11:58:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53256 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229577AbjBKQ6y (ORCPT ); Sat, 11 Feb 2023 11:58:54 -0500 Received: from mail-wr1-x42b.google.com (mail-wr1-x42b.google.com [IPv6:2a00:1450:4864:20::42b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6820A2714 for ; Sat, 11 Feb 2023 08:58:53 -0800 (PST) Received: by mail-wr1-x42b.google.com with SMTP id o18so8176072wrj.3 for ; Sat, 11 Feb 2023 08:58:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ragnatech-se.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=rf5ZAcy/GXCo36DmzV5DkIEBLmV1DDUmlNZupwkUTG0=; b=MHBaV4QlVZlrYl3mRa4wx1I/csuyRLbF2R9X34S6GPAOCrc7n7kLYzAKzP24WA0/iQ CebfeY/3+W8+prTXMUjC5ifDAEME8Xf1XXRoSVpCF0un8abt5Qxlh3NPIxZLC3/O/OhY E8H3WDwMTIQsYaeT6vbTKwEFS55NjicI4P7AF/zZgbh4Z4Xb4eqktjVnV1gHaJpxh8qI BRE15sE7Syj3kKgW7q6C5Rw+zycKRJR7SQrrvZieywFt0GPQQs5GogUBAoHdOtbeCEoW u4ajr9gOoHWtzNBXRY2SnUbggKsu6KWbWXTfXZDSlzVwkptWbc0qz8DAfdfaT93hdwDA XVtA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=rf5ZAcy/GXCo36DmzV5DkIEBLmV1DDUmlNZupwkUTG0=; b=kpnMmX5L6fV9xnD9hhmO1LldyOTm8GkYBVLI2AqIVJwgfLuMVaPKTehhyPM4DwybvW KFv2EFP+pGusABeXehlX0yok5o6SodrEL910I4y/L68a5q5Hrb0R2ox2UjRx7kIduu3D mhZXfOoUA8qTx9+ea5m5EgCamVEF+jj1pH6u3krmRAxr+PmoedUde/vS2YJ1O6FVFSSC sIvzSsEjZjhs0A0hP/JD1+H6oAtG5de71OILU5rllVUt1vYn2m19bEsTOkwQcFaE2p1M K2xW2xsq4VH9ILJJ6Z7VWJwy0WdyLJN56AquXCIz/6L/E76w1r1FkOuNLgitdCR3Kbid mdHQ== X-Gm-Message-State: AO0yUKXD4YZV0gB4T+fw+ku0VLSu8li7H5dL/xU2r5Do6foLNw+567Ii Qb4kndKV/tOzGKnrW3FwzstRXQ== X-Google-Smtp-Source: AK7set+aBrBd5afw2oNBvePJeEYaB3Z2pQ13ePz8aBB0jd1BQ39pl2Qk8xtqPrdjgeFwDNJFRmV/Ag== X-Received: by 2002:a05:6000:551:b0:2c4:5d8:8250 with SMTP id b17-20020a056000055100b002c405d88250mr10752589wrf.23.1676134732004; Sat, 11 Feb 2023 08:58:52 -0800 (PST) Received: from sleipner.berto.se (p54ac5802.dip0.t-ipconnect.de. [84.172.88.2]) by smtp.googlemail.com with ESMTPSA id y13-20020a5d614d000000b002c5526234d2sm887064wrt.8.2023.02.11.08.58.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 11 Feb 2023 08:58:51 -0800 (PST) From: =?utf-8?q?Niklas_S=C3=B6derlund?= To: Geert Uytterhoeven , Laurent Pinchart , devicetree@vger.kernel.org Cc: linux-renesas-soc@vger.kernel.org, =?utf-8?q?Niklas_S=C3=B6derlund?= Subject: [PATCH 2/2] arm64: dts: renesas: draak: Add overlay for CVBS input Date: Sat, 11 Feb 2023 17:57:15 +0100 Message-Id: <20230211165715.4024992-3-niklas.soderlund+renesas@ragnatech.se> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230211165715.4024992-1-niklas.soderlund+renesas@ragnatech.se> References: <20230211165715.4024992-1-niklas.soderlund+renesas@ragnatech.se> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Laurent Pinchart The Draak board has an ADV7180 CVBS decoder and an ADV7612 HDMI decoder, both connected to the same VIN input. DIP switches are used to select one of the two devices, with the HDMI decoder being the default. Add an overlay that selects the CVBS decoder. Signed-off-by: Laurent Pinchart [Niklas: Inverted it from HDMI to CVBS] Signed-off-by: Niklas Söderlund Reviewed-by: Laurent Pinchart --- arch/arm64/boot/dts/renesas/Makefile | 1 + .../boot/dts/renesas/draak-cvbs-input.dtso | 33 +++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 arch/arm64/boot/dts/renesas/draak-cvbs-input.dtso diff --git a/arch/arm64/boot/dts/renesas/Makefile b/arch/arm64/boot/dts/renesas/Makefile index 0699b51c1247..f5df37253184 100644 --- a/arch/arm64/boot/dts/renesas/Makefile +++ b/arch/arm64/boot/dts/renesas/Makefile @@ -87,5 +87,6 @@ dtb-$(CONFIG_ARCH_R9A07G054) += r9a07g054l2-smarc.dtb dtb-$(CONFIG_ARCH_R9A09G011) += r9a09g011-v2mevk2.dtb +dtb-$(CONFIG_ARCH_RCAR_GEN3) += draak-cvbs-input.dtbo dtb-$(CONFIG_ARCH_RCAR_GEN3) += draak-ebisu-panel-aa104xd12.dtbo dtb-$(CONFIG_ARCH_RCAR_GEN3) += salvator-panel-aa104xd12.dtbo diff --git a/arch/arm64/boot/dts/renesas/draak-cvbs-input.dtso b/arch/arm64/boot/dts/renesas/draak-cvbs-input.dtso new file mode 100644 index 000000000000..b833c58c2029 --- /dev/null +++ b/arch/arm64/boot/dts/renesas/draak-cvbs-input.dtso @@ -0,0 +1,33 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright 2023 Ideas on Board Oy + * + * Device tree overlay for the Draak board, to enable CVBS input. This requires + * setting DIP switches SW49, SW50, SW51 and SW52 to OFF, and SW53 and SW54 to + * ON. + */ + +/dts-v1/; +/plugin/; + +&adv7180_out { + remote-endpoint = <&vin4_in>; +}; + +&i2c0 { + hdmi-decoder@4c { + ports { + port@2 { + /delete-node/ endpoint; + }; + }; + }; +}; + +&vin4_in { + remote-endpoint = <&adv7180_out>; +}; + +&vin4_pins { + groups = "vin4_data8", "vin4_sync", "vin4_clk"; +};