From patchwork Thu Nov 4 14:23:20 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Etienne Carriere X-Patchwork-Id: 516817 Delivered-To: patch@linaro.org Received: by 2002:ad5:5208:0:0:0:0:0 with SMTP id p8csp1995904iml; Thu, 4 Nov 2021 07:26:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxt1/fNvQgYZGFU85psy/eMOQ8AmBzdNgsz3YuFBB5qPUaQU2eCvcQsOYl8GHOxvsgx8LxO X-Received: by 2002:a17:906:2f09:: with SMTP id v9mr43314474eji.163.1636035969851; Thu, 04 Nov 2021 07:26:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1636035969; cv=none; d=google.com; s=arc-20160816; b=R4tkS0JR2XC8StSXIM6kW1TItYhDIgPiVRIvF67By+fqQ3yOhB8Bdx5wSLTmpZ24f5 ZMCGaYfwtsQ1adhC5SsHut2eCZZkgbVZG/i1xxbgcbGjvPLQumXS8VgiPrv17mZNS+ZP m0tCKkIjNKOhYgmS9+E5UwFRJy8BEw8uT4BhS9/VMWKRvt+/DyApkIyg93MIAlGHJaYf MkS6CLkcptFr0y7et2UOLHaAoL74UE+zudsMUdyvhVd/WR0WFUmuo3SPJPOGbTc1oE34 37sS/QQLtw0IpbbdU30BVLUbTJBx5z5XL/MoMjxiE+IO8wPMakWwNWzfHqAL4WxanLfT KX6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=JpLeRp3QDZhXA5BZ66REvRTQ1RkFHFkxnAHcgBuCi1g=; b=Oo6w7Kl7QlhhfsR4buZlWadusVF4fTwh4L+JUN/5zOBJ7/8CZqfG7XmZq6yjXDayF9 /uBaz5d1lXeQQ1wCBGCqocuD2h7HCNG4s7MlNFKjDiVLhqO6iB4OPzaiKEnvMzZXtWRk wD860nwdAi6UpwZh65KnCzggn0VkuIRlN4xJSWilVPVRlAJ1LYId9VaAQYO1DyjT5RWv UGXkndefpiAH/UYT7C4oVOweg76/d2ezKYM2d8+aEHJOGTUEYrK1Ybfe6UNQ/KhxDbOZ cbWa6MUQekc+XgzFQuZPanpOLelekD78m/zIabOJedEPlfocHrlUcYSAcj4te2SHWNdy fbWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uLPxoK6Z; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [85.214.62.61]) by mx.google.com with ESMTPS id a14si8099773edf.39.2021.11.04.07.26.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Nov 2021 07:26:09 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uLPxoK6Z; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 37DEC8371F; Thu, 4 Nov 2021 15:24:35 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="uLPxoK6Z"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 1DA25836BA; Thu, 4 Nov 2021 15:23:52 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: 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 autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id C8BB7836BA for ; Thu, 4 Nov 2021 15:23:39 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=etienne.carriere@linaro.org Received: by mail-wr1-x431.google.com with SMTP id r8so8876293wra.7 for ; Thu, 04 Nov 2021 07:23:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=JpLeRp3QDZhXA5BZ66REvRTQ1RkFHFkxnAHcgBuCi1g=; b=uLPxoK6ZzlHc5vhmJnDY1/rBQ12ytK7x8vrXGQLWWN/evR+98Sb54byIe+JOWZgZOO nbUzJ9hBNO4Oe81AmSLkKPGEMp2WwQNW/BDAbmYrHRqhqUQulW6uoMqUl7UrxJdpNY4H MNVQSCXwjcpgWsv0E8XaqLpOKHhzr83hQJDrPMpC1DVw1z2SwaRbHXPjym1emP3lBnsM TKfKBjmAYJsKFVWPs/uSj6bpBXEPx+TzEBu0MAlamHWpfS1tR1VkjxdvCetNUQI0VkIo WE2MzxvZoV9YNPFb+h4JfbgVNnmUVWHxSKD+yAEpuACc/itf/rOORMvZiAkiymii3zae Oggw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=JpLeRp3QDZhXA5BZ66REvRTQ1RkFHFkxnAHcgBuCi1g=; b=BuYYKbvVVF0qoqsAW9ZMBBrFQcaV41QQrjiSK926B5lX1+hzJKk5iD6TZbz4Y0Jmeo 4/NChHLZGz2euigqOTPqB5Zb8f6SHjEE0OiuCwuLrQvDFJ/0rZPjbUJa/pRBaWPobwU7 1Ro4d6xoqIKM6lseAtcxK+ovEiJ82aOUmttPWqltPHn0lS40jgyAl4DGCUOZwvy/pU3r Q6bFJXnrgiDvA9CxERj74NsMtXhRu8ECmGaEDtHy00nmjj8mf8NTTwrrjvgLf8pL1ShI LVRy8FU9k/u/smwjklkY3v34CgXmhtTS8GoWkThZDWoe+7UmjFdlWXGVQvGt0tMYUJfQ sc9A== X-Gm-Message-State: AOAM532G2rSIXX4kLyvZuoNhiUVZD9DvIKoVHRA8rkidW6/Nc8qbm6VV p4RPChyaWrjUvkbmzMChV3Qpe3dzQ7iVBg== X-Received: by 2002:adf:c78d:: with SMTP id l13mr64373423wrg.134.1636035815968; Thu, 04 Nov 2021 07:23:35 -0700 (PDT) Received: from lmecxl0524.lme.st.com ([2a04:cec0:10b3:52ee:40ee:3a6f:5eb8:bd35]) by smtp.gmail.com with ESMTPSA id m34sm9383297wms.25.2021.11.04.07.23.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Nov 2021 07:23:35 -0700 (PDT) From: Etienne Carriere To: u-boot@lists.denx.de Cc: Etienne Carriere Subject: [PATCH 10/14] [WIP] dts: arm: stm32mp15: enable SCMI regulators (PWR & PMIC) on MP15-DK* Date: Thu, 4 Nov 2021 15:23:20 +0100 Message-Id: <20211104142324.2879-10-etienne.carriere@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20211104142324.2879-1-etienne.carriere@linaro.org> References: <20211104142324.2879-1-etienne.carriere@linaro.org> X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean Signed-off-by: Etienne Carriere --- arch/arm/dts/stm32mp151.dtsi | 40 +++++++++- arch/arm/dts/stm32mp15xx-dkx.dtsi | 122 +++++++++++++++++++++++++----- 2 files changed, 138 insertions(+), 24 deletions(-) -- 2.17.1 diff --git a/arch/arm/dts/stm32mp151.dtsi b/arch/arm/dts/stm32mp151.dtsi index db48077375..cb6a14ec0c 100644 --- a/arch/arm/dts/stm32mp151.dtsi +++ b/arch/arm/dts/stm32mp151.dtsi @@ -5,6 +5,7 @@ */ #include #include +#include #include / { @@ -91,6 +92,37 @@ reg = <0x16>; #reset-cells = <1>; }; + + scmi0_voltd: protocol@17 { + reg = <0x17>; + + scmi0_reguls: regulators { + #address-cells = <1>; + #size-cells = <0>; + + reg11: reg11 { + reg = ; + regulator-name = "reg11"; + regulator-min-microvolt = <1100000>; + regulator-max-microvolt = <1100000>; + }; + + reg18: reg18 { + voltd-name = "reg18"; + reg = ; + regulator-name = "reg18"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + }; + + usb33: usb33 { + reg = ; + regulator-name = "usb33"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + }; + }; + }; }; scmi1: scmi1 { @@ -1190,20 +1222,22 @@ pwr_regulators: pwr@50001000 { compatible = "st,stm32mp1,pwr-reg"; reg = <0x50001000 0x10>; + status = "disabled"; + secure-status = "okay"; - reg11: reg11 { + pwr_reg11: reg11 { regulator-name = "reg11"; regulator-min-microvolt = <1100000>; regulator-max-microvolt = <1100000>; }; - reg18: reg18 { + pwr_reg18: reg18 { regulator-name = "reg18"; regulator-min-microvolt = <1800000>; regulator-max-microvolt = <1800000>; }; - usb33: usb33 { + pwr_usb33: usb33 { regulator-name = "usb33"; regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; diff --git a/arch/arm/dts/stm32mp15xx-dkx.dtsi b/arch/arm/dts/stm32mp15xx-dkx.dtsi index 68987f64c5..ba196c7a45 100644 --- a/arch/arm/dts/stm32mp15xx-dkx.dtsi +++ b/arch/arm/dts/stm32mp15xx-dkx.dtsi @@ -6,6 +6,7 @@ #include #include +#include / { memory@c0000000 { @@ -261,7 +262,7 @@ interrupt-parent = <&gpioi>; pinctrl-names = "default"; pinctrl-0 = <&stusb1600_pins_a>; - status = "okay"; + status = "disabled"; vdd-supply = <&vin>; connector { @@ -284,7 +285,8 @@ interrupts-extended = <&gpioa 0 IRQ_TYPE_EDGE_FALLING>; interrupt-controller; #interrupt-cells = <2>; - status = "okay"; + status = "disabled"; + secure-status = "okay"; regulators { compatible = "st,stpmic1-regulators"; @@ -292,18 +294,18 @@ buck2-supply = <&vin>; buck3-supply = <&vin>; buck4-supply = <&vin>; - ldo1-supply = <&v3v3>; + ldo1-supply = <&secure_v3v3>; ldo2-supply = <&vin>; - ldo3-supply = <&vdd_ddr>; + ldo3-supply = <&secure_vdd_ddr>; ldo4-supply = <&vin>; ldo5-supply = <&vin>; - ldo6-supply = <&v3v3>; + ldo6-supply = <&secure_v3v3>; vref_ddr-supply = <&vin>; boost-supply = <&vin>; - pwr_sw1-supply = <&bst_out>; - pwr_sw2-supply = <&bst_out>; + pwr_sw1-supply = <&secure_bst_out>; + pwr_sw2-supply = <&secure_bst_out>; - vddcore: buck1 { + secure_vddcore: buck1 { regulator-name = "vddcore"; regulator-min-microvolt = <1200000>; regulator-max-microvolt = <1350000>; @@ -312,7 +314,7 @@ regulator-over-current-protection; }; - vdd_ddr: buck2 { + secure_vdd_ddr: buck2 { regulator-name = "vdd_ddr"; regulator-min-microvolt = <1350000>; regulator-max-microvolt = <1350000>; @@ -321,7 +323,7 @@ regulator-over-current-protection; }; - vdd: buck3 { + secure_vdd: buck3 { regulator-name = "vdd"; regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; @@ -331,7 +333,7 @@ regulator-over-current-protection; }; - v3v3: buck4 { + secure_v3v3: buck4 { regulator-name = "v3v3"; regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; @@ -340,7 +342,7 @@ regulator-initial-mode = <0>; }; - v1v8_audio: ldo1 { + secure_v1v8_audio: ldo1 { regulator-name = "v1v8_audio"; regulator-min-microvolt = <1800000>; regulator-max-microvolt = <1800000>; @@ -348,7 +350,7 @@ interrupts = ; }; - v3v3_hdmi: ldo2 { + secure_v3v3_hdmi: ldo2 { regulator-name = "v3v3_hdmi"; regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; @@ -356,7 +358,7 @@ interrupts = ; }; - vtt_ddr: ldo3 { + secure_vtt_ddr: ldo3 { regulator-name = "vtt_ddr"; regulator-min-microvolt = <500000>; regulator-max-microvolt = <750000>; @@ -364,12 +366,12 @@ regulator-over-current-protection; }; - vdd_usb: ldo4 { + secure_vdd_usb: ldo4 { regulator-name = "vdd_usb"; interrupts = ; }; - vdda: ldo5 { + secure_vdda: ldo5 { regulator-name = "vdda"; regulator-min-microvolt = <2900000>; regulator-max-microvolt = <2900000>; @@ -377,7 +379,7 @@ regulator-boot-on; }; - v1v2_hdmi: ldo6 { + secure_v1v2_hdmi: ldo6 { regulator-name = "v1v2_hdmi"; regulator-min-microvolt = <1200000>; regulator-max-microvolt = <1200000>; @@ -385,22 +387,22 @@ interrupts = ; }; - vref_ddr: vref_ddr { + secure_vref_ddr: vref_ddr { regulator-name = "vref_ddr"; regulator-always-on; }; - bst_out: boost { + secure_bst_out: boost { regulator-name = "bst_out"; interrupts = ; }; - vbus_otg: pwr_sw1 { + secure_vbus_otg: pwr_sw1 { regulator-name = "vbus_otg"; interrupts = ; }; - vbus_sw: pwr_sw2 { + secure_vbus_sw: pwr_sw2 { regulator-name = "vbus_sw"; interrupts = ; regulator-active-discharge = <1>; @@ -543,6 +545,84 @@ }; }; +&scmi0_reguls { + vddcore: scmi-vddcore { + reg = ; + regulator-name = "vddcore"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1350000>; + regulator-always-on; + }; + + vdd: scmi-vdd { + reg = ; + regulator-name = "vdd"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + }; + + v3v3: scmi-v3v3 { + reg = ; + regulator-name = "v3v3"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + }; + + v1v8_audio: scmi-v1v8-audio { + reg = ; + regulator-name = "v1v8_audio"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-always-on; + }; + + v3v3_hdmi: scmi-v3v3-hdmi { + reg = ; + regulator-name = "v3v3_hdmi"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + }; + + vdd_usb: scmi-vdd-usb { + reg = ; + regulator-name = "vdd_usb"; + }; + + vdda: scmi-vdda { + reg = ; + regulator-name = "vdda"; + regulator-min-microvolt = <2900000>; + regulator-max-microvolt = <2900000>; + regulator-boot-on; + }; + + v1v2_hdmi: scmi-v1v2-hdmi { + reg = ; + regulator-name = "v1v2_hdmi"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + regulator-always-on; + }; + + bst_out: scmi-bst-out { + reg = ; + regulator-name = "bst_out"; + }; + + vbus_otg: scmi-vbus-otg { + reg = ; + regulator-name = "vbus_otg"; + }; + + vbus_sw: scmi-vbus-sw { + reg = ; + regulator-name = "vbus_sw"; + }; +}; + &sdmmc1 { pinctrl-names = "default", "opendrain", "sleep"; pinctrl-0 = <&sdmmc1_b4_pins_a>;