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: 13137181 X-Patchwork-Delegate: geert@linux-m68k.org 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 E387FC636CC for ; Sat, 11 Feb 2023 16:58:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229473AbjBKQ6z (ORCPT ); Sat, 11 Feb 2023 11:58:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53252 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229574AbjBKQ6y (ORCPT ); Sat, 11 Feb 2023 11:58:54 -0500 Received: from mail-wr1-x435.google.com (mail-wr1-x435.google.com [IPv6:2a00:1450:4864:20::435]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9542E26BD for ; Sat, 11 Feb 2023 08:58:52 -0800 (PST) Received: by mail-wr1-x435.google.com with SMTP id a2so8157039wrd.6 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=QMILtjMv5G0RFJAqA98zD4ovpTdvH8HT7t7G779hNpsAxEq5yZNZiI80NCA3uq7iO3 gjThapp4b54l+fxz2J6nNG8YxwqzSHGdXF6o8ufKJ5boyp9c3hvkmRa/50NwtMvWgw7L nVmmwEYN0itNjb9Qsl40t5sOL095u4pGnWDf9+Hi0s8yAvN7AnAIoYETHz6KbddLDbkl MUHFnjeSC3pHTIrZo41GaU/+LajTQc8uRULFiAix3fourRuRZmG0pF7nRwR+yEWskH6G q9IeZmogYFQ1r26N7PQd4e6u2l8hzOBOdOOx7ntPmJ2oljpJTXAtrJEBqiY13h10MKuJ ky2A== X-Gm-Message-State: AO0yUKVhtc9L0I5uJ90Z7BHomTTN9TOg707cwMDjvzaolh/tzo8Q3cvp exdlW6AEZjYf4BEopQMm5tmtYw== 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: linux-renesas-soc@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: 13137180 X-Patchwork-Delegate: geert@linux-m68k.org 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 BD473C64EC7 for ; Sat, 11 Feb 2023 16:58:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229574AbjBKQ6z (ORCPT ); Sat, 11 Feb 2023 11:58:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53258 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229585AbjBKQ6y (ORCPT ); Sat, 11 Feb 2023 11:58:54 -0500 Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [IPv6:2a00:1450:4864:20::430]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 694B53599 for ; Sat, 11 Feb 2023 08:58:53 -0800 (PST) Received: by mail-wr1-x430.google.com with SMTP id j23so8201866wra.0 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=EWCNZmGEG/jkGXLaEohgCW4XH/CMwvVKCuktzIcf6kwctZkCwxpZNBCN+FCZe+Ha9d /Tajba5NpJtPpvIin+1ixd5dmWbdq5MzlhZ1sYhTokFk5t4eY4a0i81l/u8Ak+r573IX bxvYX9mffA97fkNi/StAwoPmy2BoyT74LaZFKxo+4ENMoTQfsUfmNlWHkN8+x/o+q0/5 erwNdqtKRL1iav28eSF0udaRJSwcMNxhoXDM2Exv9X/PEjmu/sZdqtQU1jZ4zvGCJgy+ WJ3cWL4gRlc3XhWcNQKG0s8+06+PFYaRSACzc9kqNGeLbCSyj6o2se2r07LaNuty7W86 kSpQ== X-Gm-Message-State: AO0yUKVwtvduhso9E96IeoeNsozd6X6t4/ggV+ZnCY7q3JS9lUB4c5rv l+q0TZV1A1sLieT6CKeU1CWAyw== 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: linux-renesas-soc@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 Reviewed-by: Geert Uytterhoeven --- 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"; +};