From mboxrd@z Thu Jan 1 00:00:00 1970 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 E1599C433EF for ; Tue, 23 Nov 2021 20:10:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239420AbhKWUNa convert rfc822-to-8bit (ORCPT ); Tue, 23 Nov 2021 15:13:30 -0500 Received: from aposti.net ([89.234.176.197]:37796 "EHLO aposti.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236228AbhKWUN3 (ORCPT ); Tue, 23 Nov 2021 15:13:29 -0500 Date: Tue, 23 Nov 2021 20:10:00 +0000 From: Paul Cercueil Subject: Re: [PATCH v8 6/8] MIPS: DTS: CI20: Add DT nodes for HDMI setup To: "H. Nikolaus Schaller" Cc: Rob Herring , Mark Rutland , Thomas Bogendoerfer , Geert Uytterhoeven , Kees Cook , "Eric W. Biederman" , Miquel Raynal , David Airlie , Daniel Vetter , Neil Armstrong , Robert Foss , Laurent Pinchart , Jernej Skrabec , Ezequiel Garcia , Harry Wentland , Sam Ravnborg , Maxime Ripard , Hans Verkuil , Liam Girdwood , Mark Brown , Paul Boddie , devicetree@vger.kernel.org, linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, letux-kernel@openphoenux.org, Jonas Karlman , dri-devel@lists.freedesktop.org Message-Id: In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Transfer-Encoding: 8BIT Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org Hi Nikolaus, Le mar., nov. 23 2021 at 19:13:59 +0100, H. Nikolaus Schaller a écrit : > From: Paul Boddie > > We need to hook up > * HDMI connector > * HDMI power regulator > * JZ4780_CLK_HDMI @ 27 MHz > * DDC pinmux > * HDMI and LCDC endpoint connections > > Signed-off-by: Paul Boddie > Signed-off-by: H. Nikolaus Schaller > --- > arch/mips/boot/dts/ingenic/ci20.dts | 83 > +++++++++++++++++++++++++++-- > 1 file changed, 80 insertions(+), 3 deletions(-) > > diff --git a/arch/mips/boot/dts/ingenic/ci20.dts > b/arch/mips/boot/dts/ingenic/ci20.dts > index b249a4f0f6b62..15cf03670693f 100644 > --- a/arch/mips/boot/dts/ingenic/ci20.dts > +++ b/arch/mips/boot/dts/ingenic/ci20.dts > @@ -78,6 +78,18 @@ eth0_power: fixedregulator@0 { > enable-active-high; > }; > > + hdmi_out: connector { > + compatible = "hdmi-connector"; > + label = "HDMI OUT"; > + type = "a"; > + > + port { > + hdmi_con: endpoint { > + remote-endpoint = <&dw_hdmi_out>; > + }; > + }; > + }; > + > ir: ir { > compatible = "gpio-ir-receiver"; > gpios = <&gpe 3 GPIO_ACTIVE_LOW>; > @@ -102,6 +114,17 @@ otg_power: fixedregulator@2 { > gpio = <&gpf 14 GPIO_ACTIVE_LOW>; > enable-active-high; > }; > + > + hdmi_power: fixedregulator@3 { > + compatible = "regulator-fixed"; > + > + regulator-name = "hdmi_power"; > + regulator-min-microvolt = <5000000>; > + regulator-max-microvolt = <5000000>; > + > + gpio = <&gpa 25 0>; > + enable-active-high; > + }; > }; > > &ext { > @@ -114,11 +137,13 @@ &cgu { > * precision. > */ > assigned-clocks = <&cgu JZ4780_CLK_OTGPHY>, <&cgu JZ4780_CLK_RTC>, > - <&cgu JZ4780_CLK_SSIPLL>, <&cgu JZ4780_CLK_SSI>; > + <&cgu JZ4780_CLK_SSIPLL>, <&cgu JZ4780_CLK_SSI>, > + <&cgu JZ4780_CLK_HDMI>; > assigned-clock-parents = <0>, <&cgu JZ4780_CLK_RTCLK>, > <&cgu JZ4780_CLK_MPLL>, > - <&cgu JZ4780_CLK_SSIPLL>; > - assigned-clock-rates = <48000000>, <0>, <54000000>; > + <&cgu JZ4780_CLK_SSIPLL>, > + <0>; Nit - you can remove the last <0>, it will be the default. > + assigned-clock-rates = <48000000>, <0>, <54000000>, <0>, <27000000>; > }; > > &tcu { > @@ -509,6 +534,19 @@ pins_i2c4: i2c4 { > bias-disable; > }; > > + pins_hdmi_ddc: hdmi_ddc { > + function = "hdmi-ddc"; > + groups = "hdmi-ddc"; > + bias-disable; > + }; > + > + /* switch to PF25 as gpio driving DDC_SDA low */ > + pins_hdmi_ddc_unwedge: hdmi_ddc { > + function = "hdmi-ddc"; > + groups = "hdmi-ddc"; > + bias-disable; > + }; Your pins_hdmi_ddc and pins_hdmi_ddc_unwedge are the exact same? You could just use the former and pass it to both pinctrl-0 and pinctrl-1. Cheers, -Paul > + > pins_nemc: nemc { > function = "nemc"; > groups = "nemc-data", "nemc-cle-ale", "nemc-rd-we", "nemc-frd-fwe"; > @@ -539,3 +577,42 @@ pins_mmc1: mmc1 { > bias-disable; > }; > }; > + > +&hdmi { > + status = "okay"; > + > + pinctrl-names = "default", "unwedge"; > + pinctrl-0 = <&pins_hdmi_ddc>; > + pinctrl-1 = <&pins_hdmi_ddc_unwedge>; > + > + hdmi-5v-supply = <&hdmi_power>; > + > + ports { > + #address-cells = <1>; > + #size-cells = <0>; > + > + port@0 { > + reg = <0>; > + dw_hdmi_in: endpoint { > + remote-endpoint = <&lcd_out>; > + }; > + }; > + > + port@1 { > + reg = <1>; > + dw_hdmi_out: endpoint { > + remote-endpoint = <&hdmi_con>; > + }; > + }; > + }; > +}; > + > +&lcdc0 { > + status = "okay"; > + > + port { > + lcd_out: endpoint { > + remote-endpoint = <&dw_hdmi_in>; > + }; > + }; > +}; > -- > 2.33.0 > From mboxrd@z Thu Jan 1 00:00:00 1970 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E455FC433FE for ; Tue, 23 Nov 2021 20:10:23 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2DC2289DC1; Tue, 23 Nov 2021 20:10:23 +0000 (UTC) Received: from aposti.net (aposti.net [89.234.176.197]) by gabe.freedesktop.org (Postfix) with ESMTPS id 96D6A89DC1 for ; Tue, 23 Nov 2021 20:10:21 +0000 (UTC) Date: Tue, 23 Nov 2021 20:10:00 +0000 From: Paul Cercueil Subject: Re: [PATCH v8 6/8] MIPS: DTS: CI20: Add DT nodes for HDMI setup To: "H. Nikolaus Schaller" Message-Id: In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Paul Boddie , Geert Uytterhoeven , Neil Armstrong , David Airlie , dri-devel@lists.freedesktop.org, linux-mips@vger.kernel.org, Laurent Pinchart , Miquel Raynal , Sam Ravnborg , Jernej Skrabec , devicetree@vger.kernel.org, Kees Cook , Jonas Karlman , Mark Brown , Maxime Ripard , letux-kernel@openphoenux.org, Ezequiel Garcia , Thomas Bogendoerfer , Liam Girdwood , Robert Foss , linux-kernel@vger.kernel.org, Rob Herring , "Eric W. Biederman" , Hans Verkuil Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Hi Nikolaus, Le mar., nov. 23 2021 at 19:13:59 +0100, H. Nikolaus Schaller=20 a =E9crit : > From: Paul Boddie >=20 > We need to hook up > * HDMI connector > * HDMI power regulator > * JZ4780_CLK_HDMI @ 27 MHz > * DDC pinmux > * HDMI and LCDC endpoint connections >=20 > Signed-off-by: Paul Boddie > Signed-off-by: H. Nikolaus Schaller > --- > arch/mips/boot/dts/ingenic/ci20.dts | 83=20 > +++++++++++++++++++++++++++-- > 1 file changed, 80 insertions(+), 3 deletions(-) >=20 > diff --git a/arch/mips/boot/dts/ingenic/ci20.dts=20 > b/arch/mips/boot/dts/ingenic/ci20.dts > index b249a4f0f6b62..15cf03670693f 100644 > --- a/arch/mips/boot/dts/ingenic/ci20.dts > +++ b/arch/mips/boot/dts/ingenic/ci20.dts > @@ -78,6 +78,18 @@ eth0_power: fixedregulator@0 { > enable-active-high; > }; >=20 > + hdmi_out: connector { > + compatible =3D "hdmi-connector"; > + label =3D "HDMI OUT"; > + type =3D "a"; > + > + port { > + hdmi_con: endpoint { > + remote-endpoint =3D <&dw_hdmi_out>; > + }; > + }; > + }; > + > ir: ir { > compatible =3D "gpio-ir-receiver"; > gpios =3D <&gpe 3 GPIO_ACTIVE_LOW>; > @@ -102,6 +114,17 @@ otg_power: fixedregulator@2 { > gpio =3D <&gpf 14 GPIO_ACTIVE_LOW>; > enable-active-high; > }; > + > + hdmi_power: fixedregulator@3 { > + compatible =3D "regulator-fixed"; > + > + regulator-name =3D "hdmi_power"; > + regulator-min-microvolt =3D <5000000>; > + regulator-max-microvolt =3D <5000000>; > + > + gpio =3D <&gpa 25 0>; > + enable-active-high; > + }; > }; >=20 > &ext { > @@ -114,11 +137,13 @@ &cgu { > * precision. > */ > assigned-clocks =3D <&cgu JZ4780_CLK_OTGPHY>, <&cgu JZ4780_CLK_RTC>, > - <&cgu JZ4780_CLK_SSIPLL>, <&cgu JZ4780_CLK_SSI>; > + <&cgu JZ4780_CLK_SSIPLL>, <&cgu JZ4780_CLK_SSI>, > + <&cgu JZ4780_CLK_HDMI>; > assigned-clock-parents =3D <0>, <&cgu JZ4780_CLK_RTCLK>, > <&cgu JZ4780_CLK_MPLL>, > - <&cgu JZ4780_CLK_SSIPLL>; > - assigned-clock-rates =3D <48000000>, <0>, <54000000>; > + <&cgu JZ4780_CLK_SSIPLL>, > + <0>; Nit - you can remove the last <0>, it will be the default. > + assigned-clock-rates =3D <48000000>, <0>, <54000000>, <0>, <27000000>; > }; >=20 > &tcu { > @@ -509,6 +534,19 @@ pins_i2c4: i2c4 { > bias-disable; > }; >=20 > + pins_hdmi_ddc: hdmi_ddc { > + function =3D "hdmi-ddc"; > + groups =3D "hdmi-ddc"; > + bias-disable; > + }; > + > + /* switch to PF25 as gpio driving DDC_SDA low */ > + pins_hdmi_ddc_unwedge: hdmi_ddc { > + function =3D "hdmi-ddc"; > + groups =3D "hdmi-ddc"; > + bias-disable; > + }; Your pins_hdmi_ddc and pins_hdmi_ddc_unwedge are the exact same? You=20 could just use the former and pass it to both pinctrl-0 and pinctrl-1. Cheers, -Paul > + > pins_nemc: nemc { > function =3D "nemc"; > groups =3D "nemc-data", "nemc-cle-ale", "nemc-rd-we", "nemc-frd-fwe"; > @@ -539,3 +577,42 @@ pins_mmc1: mmc1 { > bias-disable; > }; > }; > + > +&hdmi { > + status =3D "okay"; > + > + pinctrl-names =3D "default", "unwedge"; > + pinctrl-0 =3D <&pins_hdmi_ddc>; > + pinctrl-1 =3D <&pins_hdmi_ddc_unwedge>; > + > + hdmi-5v-supply =3D <&hdmi_power>; > + > + ports { > + #address-cells =3D <1>; > + #size-cells =3D <0>; > + > + port@0 { > + reg =3D <0>; > + dw_hdmi_in: endpoint { > + remote-endpoint =3D <&lcd_out>; > + }; > + }; > + > + port@1 { > + reg =3D <1>; > + dw_hdmi_out: endpoint { > + remote-endpoint =3D <&hdmi_con>; > + }; > + }; > + }; > +}; > + > +&lcdc0 { > + status =3D "okay"; > + > + port { > + lcd_out: endpoint { > + remote-endpoint =3D <&dw_hdmi_in>; > + }; > + }; > +}; > -- > 2.33.0 >=20