Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp2124553rwa; Mon, 22 Aug 2022 02:32:11 -0700 (PDT) X-Google-Smtp-Source: AA6agR5FBgkQXk+0QT2e0r4KwIzQn2DY9DM2+5XApoiACgvqvlct8gjRNmz7Fjm10ttgX5Ek6BDK X-Received: by 2002:a17:902:ef45:b0:170:8b19:4e0f with SMTP id e5-20020a170902ef4500b001708b194e0fmr19781412plx.120.1661160730801; Mon, 22 Aug 2022 02:32:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661160730; cv=none; d=google.com; s=arc-20160816; b=AvJ19CSX7/OB0JqJ9Rnvmg7uro005lbfsahc+85ekTbZXL+QbSVgmPcxA3M0M7iGHX RgHY0UAOv4jsfGDoYDEsnuRYTGxwpEopTdrye9Dm+RaLw30FvNOXjgO1DtM/j3zpDG0T 02AKtknVFH/MpaUGT6R73vGIV1tRAg4Q7eWCQBVoF2deflEcqZPuYblzRtk6jW0gyC3M tadIbT8DDw2SwYgfNoayb6QxCoSw3FciCr88A9sKJDoo9kLvhLBcVyTvJURHe2w7n83h fga90sjxCbDgFEjmHBgW90jt1lt/WI9Vj05wIBDUT0mf8CRWMKf59PB2n1q3SldyWWDf 0fbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:mail-followup-to:message-id:subject:cc:to:from:date :dkim-signature; bh=pI5oK0Y9w5dvWHrxzwHlKujJA9H1hv1OwbqYcZENmKo=; b=uXe39dQNuZu6tqY0Ia4C4VBchHr5ncUSyzsUvjX1+ARcVPhPlcLTP1ZtZdIQJKyesn 2vbaltWHPWsSuqVuQL9wRjh6Qbukznyy6dW2vlrnXuzFiS2/FCOMF66G3SOgwoP57R1L NW7tlpOgUvKVqiutRLgyEXGxTKU60FVPWpr4jxkQ7YSXDNTgzvpU9qI9Y19qfYbk1q+O Y7G0vxmFG9lyKUxYl7iEk6hOTpAMHP398FItIb2qfUjFrLovxMbqf3EJ2rBhqdF8J4uv nQwaH7elAoJE9gRf07fGNzaRyjSFKxsk9GlKenKzz0jVR/0YIiejIcjxk5ZeLDJ7Xts7 CdMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@xff.cz header.s=mail header.b=ihjEe30W; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=xff.cz Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 203-20020a6302d4000000b0041a5a80428esi12584434pgc.750.2022.08.22.02.32.00; Mon, 22 Aug 2022 02:32:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@xff.cz header.s=mail header.b=ihjEe30W; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=xff.cz Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234040AbiHVIdu (ORCPT + 99 others); Mon, 22 Aug 2022 04:33:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43920 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233654AbiHVIds (ORCPT ); Mon, 22 Aug 2022 04:33:48 -0400 Received: from vps.xff.cz (vps.xff.cz [195.181.215.36]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 58E3365FB; Mon, 22 Aug 2022 01:33:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=xff.cz; s=mail; t=1661157220; bh=KF38YCEGrviEtxAAbqrGcqiLu8O/FWZi1h5lYiuNr7s=; h=Date:From:To:Cc:Subject:X-My-GPG-KeyId:References:From; b=ihjEe30WkNiuYGt59T9pVeSq6/MYPz2e8IUvySfnvYXj9UWyADCudVeXTFBCztUSF BUmNBg5ACaKDCIdiRSV61AiCHbrWtlYBrUc5rW7NJA8j/hnDfYB40XuvyTlXyVaMwI BTVC9vNYysNhaoQnaDaZn4KRe3ZqChVlFAMdwEyc= Date: Mon, 22 Aug 2022 10:33:39 +0200 From: =?utf-8?Q?Ond=C5=99ej?= Jirman To: Tom Fitzhenry Cc: Rob Herring , Krzysztof Kozlowski , Heiko Stuebner , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, phone-devel@vger.kernel.org, Martijn Braam , Kamil =?utf-8?Q?Trzci=C5=84ski?= , Caleb Connolly , =?utf-8?B?TsOtY29sYXMgRiAuIFIgLiBBIC4=?= Prado Subject: Re: [PATCH v4 1/1] arm64: dts: rockchip: Add initial support for Pine64 PinePhone Pro Message-ID: <20220822083339.o6bqlyirrm5hvjbc@core> Mail-Followup-To: =?utf-8?Q?Ond=C5=99ej?= Jirman , Tom Fitzhenry , Rob Herring , Krzysztof Kozlowski , Heiko Stuebner , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, phone-devel@vger.kernel.org, Martijn Braam , Kamil =?utf-8?Q?Trzci=C5=84ski?= , Caleb Connolly , =?utf-8?B?TsOtY29sYXMgRiAuIFIgLiBBIC4=?= Prado X-My-GPG-KeyId: EBFBDDE11FB918D44D1F56C1F9F0A873BE9777ED References: <20220822012449.21005-1-tom@tom-fitzhenry.me.uk> <20220822012449.21005-2-tom@tom-fitzhenry.me.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220822012449.21005-2-tom@tom-fitzhenry.me.uk> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,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 Hello Tom, On Mon, Aug 22, 2022 at 11:08:08AM +1000, Tom Fitzhenry wrote: > From: Martijn Braam > > This is a basic DT containing regulators and UART, intended to be a > base that myself and others can add additional nodes in future patches. > [...] > + > + vcc_sys: vcc-sys-regulator { > + compatible = "regulator-fixed"; > + regulator-name = "vcc_sys"; > + regulator-always-on; > + regulator-boot-on; > + }; > + > + vcc3v3_sys: vcc3v3-sys-regulator { > + compatible = "regulator-fixed"; > + regulator-name = "vcc3v3_sys"; > + regulator-always-on; > + regulator-boot-on; > + regulator-min-microvolt = <3300000>; > + regulator-max-microvolt = <3300000>; > + vin-supply = <&vcc_sys>; > + }; > + > + vcca1v8_s3: vcc1v8-s3-regulator { > + compatible = "regulator-fixed"; > + regulator-name = "vcca1v8_s3"; > + regulator-min-microvolt = <1800000>; > + regulator-max-microvolt = <1800000>; > + vin-supply = <&vcc3v3_sys>; > + regulator-always-on; > + regulator-boot-on; > + }; > +}; > + > +&cpu_l0 { > + cpu-supply = <&vdd_cpu_l>; > +}; > + > +&cpu_l1 { > + cpu-supply = <&vdd_cpu_l>; > +}; > + > +&cpu_l2 { > + cpu-supply = <&vdd_cpu_l>; > +}; > + > +&cpu_l3 { > + cpu-supply = <&vdd_cpu_l>; > +}; > + > +&cpu_b0 { > + cpu-supply = <&vdd_cpu_b>; > +}; > + > +&cpu_b1 { > + cpu-supply = <&vdd_cpu_b>; > +}; > + > +&emmc_phy { > + status = "okay"; > +}; > + > +&i2c0 { > + clock-frequency = <400000>; > + i2c-scl-rising-time-ns = <168>; > + i2c-scl-falling-time-ns = <4>; > + status = "okay"; > + > + rk818: pmic@1c { > + compatible = "rockchip,rk818"; > + reg = <0x1c>; > + interrupt-parent = <&gpio1>; > + interrupts = ; > + #clock-cells = <1>; > + clock-output-names = "xin32k", "rk808-clkout2"; > + pinctrl-names = "default"; > + pinctrl-0 = <&pmic_int_l>; > + rockchip,system-power-controller; > + wakeup-source; > + > + vcc1-supply = <&vcc_sys>; > + vcc2-supply = <&vcc_sys>; > + vcc3-supply = <&vcc_sys>; > + vcc4-supply = <&vcc_sys>; > + vcc6-supply = <&vcc_sys>; > + vcc7-supply = <&vcc3v3_sys>; > + vcc8-supply = <&vcc_sys>; > + vcc9-supply = <&vcc3v3_sys>; > + > + regulators { > + vdd_cpu_l: DCDC_REG1 { > + regulator-name = "vdd_cpu_l"; > + regulator-always-on; > + regulator-boot-on; > + regulator-min-microvolt = <875000>; > + regulator-max-microvolt = <975000>; > + regulator-ramp-delay = <6001>; > + regulator-state-mem { > + regulator-off-in-suspend; > + }; > + }; > + > + vdd_center: DCDC_REG2 { > + regulator-name = "vdd_center"; > + regulator-always-on; > + regulator-boot-on; > + regulator-min-microvolt = <800000>; > + regulator-max-microvolt = <1350000>; Looks like a wrong top voltage. https://megous.com/dl/tmp/ad3dcc62bd00f41f.png > + regulator-ramp-delay = <6001>; > + regulator-state-mem { > + regulator-off-in-suspend; > + }; > + }; > + > + vcc_ddr: DCDC_REG3 { > + regulator-name = "vcc_ddr"; > + regulator-always-on; > + regulator-boot-on; > + regulator-state-mem { > + regulator-on-in-suspend; > + }; > + }; > + > + vcc_1v8: DCDC_REG4 { > + regulator-name = "vcc_1v8"; > + regulator-always-on; > + regulator-boot-on; > + regulator-min-microvolt = <1800000>; > + regulator-max-microvolt = <1800000>; > + regulator-state-mem { > + regulator-on-in-suspend; > + }; > + }; > + > + vcca3v0_codec: LDO_REG1 { > + regulator-name = "vcca3v0_codec"; > + regulator-always-on; > + regulator-boot-on; This should not be always on, but only enabled by the codec when needed. You don't have codec described in this DT. > + regulator-min-microvolt = <3000000>; > + regulator-max-microvolt = <3000000>; > + regulator-state-mem { > + regulator-on-in-suspend; > + }; > + }; > + > + vcc3v0_touch: LDO_REG2 { > + regulator-name = "vcc3v0_touch"; > + regulator-always-on; > + regulator-boot-on; This should not be always on. It should be enabled by touch controller, when needed. You don't have touch controller described in this DT. > + regulator-min-microvolt = <3000000>; > + regulator-max-microvolt = <3000000>; > + regulator-state-mem { > + regulator-off-in-suspend; > + }; > + }; > + > + vcca1v8_codec: LDO_REG3 { > + regulator-name = "vcca1v8_codec"; > + regulator-always-on; > + regulator-boot-on; This should not be always on, but only enabled by the codec when needed, I suppose. Also modem codec is supplied by vcc1v8_codec which may need a gpio configured as pull-down or drive low to be properly disabled, and it is not defined in this DT. Please make sure that regulator's input doesn't float and is disabled by default. > + regulator-min-microvolt = <1800000>; > + regulator-max-microvolt = <1800000>; > + regulator-state-mem { > + regulator-on-in-suspend; > + }; > + }; > + > + rk818_pwr_on: LDO_REG4 { > + regulator-name = "rk818_pwr_on"; > + regulator-always-on; > + regulator-boot-on; > + regulator-min-microvolt = <3300000>; > + regulator-max-microvolt = <3300000>; > + regulator-state-mem { > + regulator-on-in-suspend; > + }; > + }; > + > + vcc_3v0: LDO_REG5 { > + regulator-name = "vcc_3v0"; > + regulator-always-on; > + regulator-boot-on; > + regulator-min-microvolt = <3000000>; > + regulator-max-microvolt = <3000000>; > + regulator-state-mem { > + regulator-on-in-suspend; > + }; > + }; > + > + vcc_1v5: LDO_REG6 { > + regulator-name = "vcc_1v5"; > + regulator-always-on; > + regulator-boot-on; > + regulator-min-microvolt = <1500000>; > + regulator-max-microvolt = <1500000>; > + regulator-state-mem { > + regulator-on-in-suspend; > + }; > + }; > + > + vcc1v8_dvp: LDO_REG7 { > + regulator-name = "vcc1v8_dvp"; > + regulator-min-microvolt = <1800000>; > + regulator-max-microvolt = <1800000>; > + }; > + > + vcc3v3_s3: LDO_REG8 { > + regulator-name = "vcc3v3_s3"; > + regulator-always-on; > + regulator-boot-on; > + regulator-min-microvolt = <3300000>; > + regulator-max-microvolt = <3300000>; > + regulator-state-mem { > + regulator-off-in-suspend; > + }; > + }; > + > + vccio_sd: LDO_REG9 { > + regulator-name = "vccio_sd"; > + regulator-min-microvolt = <1800000>; > + regulator-max-microvolt = <3300000>; > + }; > + > + vcc3v3_s0: SWITCH_REG { > + regulator-name = "vcc3v3_s0"; > + regulator-always-on; > + regulator-boot-on; > + regulator-state-mem { > + regulator-on-in-suspend; > + }; > + }; > + }; > + }; > + > + vdd_cpu_b: regulator@40 { > + compatible = "silergy,syr827"; > + reg = <0x40>; > + fcs,suspend-voltage-selector = <1>; > + pinctrl-names = "default"; > + pinctrl-0 = <&vsel1_pin>; > + regulator-name = "vdd_cpu_b"; > + regulator-min-microvolt = <875000>; > + regulator-max-microvolt = <1150000>; > + regulator-ramp-delay = <1000>; > + regulator-always-on; > + regulator-boot-on; > + > + regulator-state-mem { > + regulator-off-in-suspend; > + }; > + }; > + > + vdd_gpu: regulator@41 { > + compatible = "silergy,syr828"; > + reg = <0x41>; > + fcs,suspend-voltage-selector = <1>; > + pinctrl-names = "default"; > + pinctrl-0 = <&vsel2_pin>; > + regulator-name = "vdd_gpu"; > + regulator-min-microvolt = <875000>; > + regulator-max-microvolt = <975000>; > + regulator-ramp-delay = <1000>; > + regulator-always-on; > + regulator-boot-on; > + > + regulator-state-mem { > + regulator-off-in-suspend; > + }; > + }; > +}; > + > +&cluster0_opp { > + opp04 { > + status = "disabled"; > + }; > + > + opp05 { > + status = "disabled"; > + }; > +}; > + > +&cluster1_opp { > + opp06 { > + opp-hz = /bits/ 64 <1500000000>; > + opp-microvolt = <1100000 1100000 1150000>; > + }; > + > + opp07 { > + status = "disabled"; > + }; > +}; > + > +&gpu_opp_table { > + opp00 { > + opp-hz = /bits/ 64 <200000000>; > + opp-microvolt = <825000 825000 975000>; > + }; > + opp01 { > + opp-hz = /bits/ 64 <297000000>; > + opp-microvolt = <825000 825000 975000>; > + }; > + opp02 { > + opp-hz = /bits/ 64 <400000000>; > + opp-microvolt = <825000 825000 975000>; > + }; > + opp03 { > + opp-hz = /bits/ 64 <500000000>; > + opp-microvolt = <875000 875000 975000>; > + }; > + opp04 { > + opp-hz = /bits/ 64 <600000000>; > + opp-microvolt = <925000 925000 975000>; > + }; ^^^ Why replicate all these OPPs, when they have identical preferred voltage in rk3399-opp.dtsi? Also GPU is not being enabled in the DT. You don't need display output support to enable the gpu right away. > + opp05 { > + status = "disabled"; > + }; > +}; > + > + ^ extra space Thank you, Ondrej > +&io_domains { > + bt656-supply = <&vcc1v8_dvp>; > + audio-supply = <&vcca1v8_codec>; > + sdmmc-supply = <&vccio_sd>; > + gpio1830-supply = <&vcc_3v0>; > + status = "okay"; > +}; > + > +&pmu_io_domains { > + pmu1830-supply = <&vcc_1v8>; > + status = "okay"; > +}; > + > +&pinctrl { > + buttons { > + pwrbtn_pin: pwrbtn-pin { > + rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>; > + }; > + }; > + > + pmic { > + pmic_int_l: pmic-int-l { > + rockchip,pins = <1 RK_PC5 RK_FUNC_GPIO &pcfg_pull_up>; > + }; > + > + vsel1_pin: vsel1-pin { > + rockchip,pins = <1 RK_PC1 RK_FUNC_GPIO &pcfg_pull_down>; > + }; > + > + vsel2_pin: vsel2-pin { > + rockchip,pins = <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_down>; > + }; > + }; > +}; > + > +&sdmmc { > + bus-width = <4>; > + cap-sd-highspeed; > + cd-gpios = <&gpio0 RK_PA7 GPIO_ACTIVE_LOW>; > + disable-wp; > + max-frequency = <150000000>; > + pinctrl-names = "default"; > + pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>; > + vmmc-supply = <&vcc3v3_sys>; > + vqmmc-supply = <&vccio_sd>; > + status = "okay"; > +}; > + > +&sdhci { > + bus-width = <8>; > + mmc-hs200-1_8v; > + non-removable; > + status = "okay"; > +}; > + > +&tsadc { > + rockchip,hw-tshut-mode = <1>; > + rockchip,hw-tshut-polarity = <1>; > + status = "okay"; > +}; > + > +&uart2 { > + status = "okay"; > +}; > -- > 2.37.1 >