From patchwork Tue Feb 6 18:43:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 13547696 Received: from mail-ed1-f51.google.com (mail-ed1-f51.google.com [209.85.208.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 809EC13FF0 for ; Tue, 6 Feb 2024 18:43:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707245026; cv=none; b=MCw90EEra4M/6SuXf6uTqKY6mgDpfgOqXQUCUoca+XjPz4BWHFWYKNfErNBwoOAic6m8c1JEXZD53A+i1R//NaGD4tF938h2a+lk0rqCQbQ6/mXYI8yWxatLt0ohDXXYT2XOrmhM+C7ND3Q5PIUKIlFvQT7G8oJ0D0j2RQjf+pY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707245026; c=relaxed/simple; bh=JX51EYp5JFQZ08l/6cPLk6AJNuyWClVT+Ndq0orY4H0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=N6eZgf6Jmeo+X5oGBmbtiZidMZvMf74BLwKeG22UQoic3zlqfLS9Q8qwXTDB8QvkavyanyMxP7yU4petpQkwOI96VOcBLStHCHig/dovcf/Kr5upZJFDKcMgfHgWZRHkhB3ueMNSvlGv9dFRGjBYelFzSMysY0n6XO4QsCmIAtY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=JDcZZaPl; arc=none smtp.client-ip=209.85.208.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="JDcZZaPl" Received: by mail-ed1-f51.google.com with SMTP id 4fb4d7f45d1cf-55f50cf2021so7590570a12.1 for ; Tue, 06 Feb 2024 10:43:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1707245021; x=1707849821; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=blk0TwokTQ2HtT8cgpJRO0PrfE8+QaeuA8KuyhDefVY=; b=JDcZZaPlQUjLlzr8/Nw4yL3SRuUFA+6ry6FGxPR4rQxnnAPNM1LfAiFtAsyjajO1Wt AxY+gQzwm5DGF/Bs+3R471zOxrRvV2SMYKumGynttydSboIBTGRJV6SJqTPzQAcFnTvR YXpdmoOyh7RLvfomxkRsF6gH1iOeL10WOjTlkTnJxW11k7LbB8iPTNFbdbu6zsDIJcVt gOxqLbWFk28GoDHyIgpTEZ2Ln0KfnkKvl9vQIuzu+qcdWplmHJj8Hy6P7VDp9pxc4JOO ZFLknmhI73GNUttMf/JbWbNqKW4ci4tuQMNUSIfVGRWPgsH2C8o+wrLrDAjwZQEZAGPk 4oKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707245021; x=1707849821; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=blk0TwokTQ2HtT8cgpJRO0PrfE8+QaeuA8KuyhDefVY=; b=BTc0AoZKst5xCfSqkWSeIh6dEnR5PPkVQTPVa2kNAw6hCipLyLEAhF/iqwAqeS/9S+ mu4OhovtS8EA3JPuj0kHYXwsP+PHu9leT2DYYYxxP/ujvl7PDUT7lo1znoTgd3aHBm1b HW0ivCNJDOxOzQ9fNzcBxLS/cDYSiJ9T2swSrKH3GfQdr1RM1UHGHpaEW5spfHAT9J82 eC6Wjc88gy8KEZ2mG7RHzNU55Exe9QPIIWIDweyNGqZKdf2qv+8mdoyf3ynThwkqilq5 n3srCw5OODohL/daj4eH34/zp+q9s6YgP43EszdQve5tzvog6ZvSRL2bRvnVEHxg3ByK sABw== X-Gm-Message-State: AOJu0YyjBF+o1Yi8UcVGbs64MNLXerqIj/z3gZ0j8PKGwI15LHY6seXS f40lQjtvt7IAIOK77ZeLNb8DsaHcC6sEAXqKwNaBgsJA/zb4Ozma6ETYYDjNUWY= X-Google-Smtp-Source: AGHT+IEr82lAacnBfHt8DRfg9966ZPB9/VZ880Oe3p92rouzBTCWOB2Wi761RUCK6+EumG0D0uKuBA== X-Received: by 2002:a17:906:a38b:b0:a35:80f1:2ad2 with SMTP id k11-20020a170906a38b00b00a3580f12ad2mr2572332ejz.57.1707245020870; Tue, 06 Feb 2024 10:43:40 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCUJg3LkowpnDdk5wwkdLC12A3iAU0UQTFwHAS1GfzgF3sgrKSsi4VAJKEH16+kmjcBb4EVmr0prx6/arJRLLczSq0sRwgTLtcPw7sCb11JXnZDci6mh30BEa+g+ACCwvDHeNBCpe5luurHDPGp0GJ9IKjbc4sIiWaO+cpn+qDkslbniyuIsTXXq4+KF5xH7AwD5OU+djP5iR3W9eS8HpOmOBOhUa3/13og7LR1JKXVnKhv7VA5G9GC2EvOPBVFMsImjjKIypsWKNef8TD5LiKyZQwqyvU2/pTJkjL1sBvXjigotJHFK3bkPo75FdW022zrHsT4t9p5UkIsyVmN7sMN+sioVANhNBsLnyG9rP0e2XGhP1YwK+GqLdiHzA8/Wcv99TQW64YEZNvF6lD3NrnnAECuJT94H9vv6087yzgftDMUo3Iq6Y4nBvS4kVBViEGZcbFL4WfOl Received: from [10.167.154.1] (037008245233.garwolin.vectranet.pl. [37.8.245.233]) by smtp.gmail.com with ESMTPSA id un9-20020a170907cb8900b00a384365e3b9sm562305ejc.195.2024.02.06.10.43.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Feb 2024 10:43:40 -0800 (PST) From: Konrad Dybcio Date: Tue, 06 Feb 2024 19:43:34 +0100 Subject: [PATCH v2 01/18] clk: qcom: reset: Increase max reset delay Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240105-topic-venus_reset-v2-1-c37eba13b5ce@linaro.org> References: <20240105-topic-venus_reset-v2-0-c37eba13b5ce@linaro.org> In-Reply-To: <20240105-topic-venus_reset-v2-0-c37eba13b5ce@linaro.org> To: Bjorn Andersson , Michael Turquette , Stephen Boyd , Philipp Zabel Cc: Marijn Suijten , linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, Bryan O'Donoghue , Dikshita Agarwal , Vikash Garodia , Manivannan Sadhasivam , Konrad Dybcio X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1707245017; l=566; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=JX51EYp5JFQZ08l/6cPLk6AJNuyWClVT+Ndq0orY4H0=; b=6+OEJKDDzZm/iZUobMp4jbZAc54oYJ1CoK3iwFokuzcx4v8X5vWLaxpMdP3du43t3h0ci3XgM MH4LiFNU4e9CxIKpsFuxWufYshNfVrKcILJgI5cRcn9Z3cGRtK9tX0N X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= u8 limits us to 255 microseconds of delay. Promote the delay variable to u16 to hold bigger values. Signed-off-by: Konrad Dybcio --- drivers/clk/qcom/reset.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/qcom/reset.h b/drivers/clk/qcom/reset.h index 9a47c838d9b1..fe0561bf53d4 100644 --- a/drivers/clk/qcom/reset.h +++ b/drivers/clk/qcom/reset.h @@ -11,7 +11,7 @@ struct qcom_reset_map { unsigned int reg; u8 bit; - u8 udelay; + u16 udelay; u32 bitmask; }; From patchwork Tue Feb 6 18:43:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 13547695 Received: from mail-ej1-f44.google.com (mail-ej1-f44.google.com [209.85.218.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9CCFE134D2 for ; Tue, 6 Feb 2024 18:43:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.44 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707245025; cv=none; b=kLm05Ko5v+G6j2PL6Dq+E2rDD2IexPE+nFXAAVp3LDJ3DRuDS+T6e4ciwsbDpmc8V/oTsieVhPi5JUT6cU9dR2iRdqBhjxJobF2nRocuIWK5gOHHRVwQfWuN8lgfDUbIQ4PxDR5pVxdQUkx1zbc/3WeeJFUev6c5wXb0qhVpJyg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707245025; c=relaxed/simple; bh=eVTHPrT2Om77CguELWV9DheT0YsZYlvmQpUZDIbQJew=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=VktMhGO8WFbZad85x4qIHFlibxvA2VmFn/CPONCOCiRkLohou8hjbLahLYLyV4UGvV47E5a0N46cpwj4cBvfjKyxgF5OOlFRadl/s5uX+tmeqG22r1SltsOyccyBC+5ZbfSluR0ZExG8O8ae6aseJvsbtZfz/QciG/ajqnXvuOo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=d1nr+2Yw; arc=none smtp.client-ip=209.85.218.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="d1nr+2Yw" Received: by mail-ej1-f44.google.com with SMTP id a640c23a62f3a-a380a1fa56fso171130366b.0 for ; Tue, 06 Feb 2024 10:43:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1707245022; x=1707849822; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=xM2C1iHMDXw9CwZlcSXjRB1uc7rC+T3sEjwlxMY+VkA=; b=d1nr+2YwHnbjAZxbYIACIvrQa3Hushxw16qK24cdSyo37se8svev5SnHHjW1tNz5Ml o9bdSNiF4+9uGPSsc0BOyzsiiHrQ5sitdPAkKmQPCKKFem6B7zYP8vLKM4T87TnrwXCK 0o0tkMn5hMKpb0l7OOZfa1K8tDk1iaNvpLsJrFQMIn/6VGhrEKfJnuqK1ke9pDSb+jB5 qrHeStwNV+LHm8uhm84WluNMJNRWEMb6Cb9RWIB7wshBtHgkHnHaVqOajNuV0TeKaU/7 kY+739UO1UDPVIOTooqO8kEHeMzuvoLRXsWduMFeVvIexuZbdcAEon7zbnhrDRmB8Vlu mbKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707245022; x=1707849822; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xM2C1iHMDXw9CwZlcSXjRB1uc7rC+T3sEjwlxMY+VkA=; b=fHPuFppgsCkGJbDCigqKokRbo9J4V9oFCzqZ8/BONGVpukxZfptQDNl9avcolatQZL GAfhMNAJPRnVRbJPpKTVCNufQR4cFKcItyzfbuXW3Sm7XO+tH+Qk7XXn9cOWD2VNcXeP A5uiL0faKTo5IxGMiDHqZHIHPx28h6ai6Hk4jJp/QaIWu5d1OYeGIixJ0F7LM0fMzWGQ zHCr3zJoI+qBxjt3Q3y/WHnQSFJsFFUEjzQlx6Kk4ntfHmsTUszgfNa04nRMILgAeRh8 JuVLuu4RxqbZTaZ4GjDpNzUANB4bbp63Z1Arg0W02e8R4y5d48yZfmDcrE3xpEQgvrmi 3aNA== X-Gm-Message-State: AOJu0Yw20C7It2glZqmyrO9GMHmZ8GIKprW4DJP3mcRV8N1ta35E8y40 3FBGBkiQPMoBoVLJv6Cigbf5p9UG3rWt5DlfcY+SGfosvKVfNP0RTfeWlP0/a88= X-Google-Smtp-Source: AGHT+IH2iK/Y23icXwXCpnp6cD01kvobMXN3oGi4oEp+g7RX4ln5paAS4U3jlHLpu42XaCc5V9Wzkw== X-Received: by 2002:a17:906:4e8b:b0:a37:687:275c with SMTP id v11-20020a1709064e8b00b00a370687275cmr3895405eju.20.1707245022012; Tue, 06 Feb 2024 10:43:42 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCWM+GgllHBWJ2Etigt3pjbEE3yQWss9rZmqNix9IDfjo96W69+gFfgzX+EoOyxHGK9XyfhotbgkKC/2xK0Rs3ENtxKyU9Rv6N29Q6+UzFrih3srAH//Lf/RoSThaXYcb9SX+7Oj++/Yae6fy5u6ZrpertCdAMcBDia7qcSLrEubBjVSXU3FhCsssN0p6lKBF1fMp1xCZmZhyfG8FoK3FXgHrdBf7vJ7X5G2DxfxbkERILWbIrM84Qkumq1tEx4QcMjIkOVNpKjWBjPoZEUEgQpVmO/ineA+S0p7F7MH/55feTOJpKahEPD3b2OIlT1dlbuyPnC3Tj1hquwYfEYHjPawp6nkr9i6h04jiuswwfBBSu+I1GpZtmb/DoXy5npAupQjn27HGRIKhcnx+liyK6Lk4T/8HshXfewb/2sTER1D/ARMUMDbhLeKQqe/aIREZ8sQ4OadVyDJ Received: from [10.167.154.1] (037008245233.garwolin.vectranet.pl. [37.8.245.233]) by smtp.gmail.com with ESMTPSA id un9-20020a170907cb8900b00a384365e3b9sm562305ejc.195.2024.02.06.10.43.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Feb 2024 10:43:41 -0800 (PST) From: Konrad Dybcio Date: Tue, 06 Feb 2024 19:43:35 +0100 Subject: [PATCH v2 02/18] clk: qcom: reset: Commonize the de/assert functions Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240105-topic-venus_reset-v2-2-c37eba13b5ce@linaro.org> References: <20240105-topic-venus_reset-v2-0-c37eba13b5ce@linaro.org> In-Reply-To: <20240105-topic-venus_reset-v2-0-c37eba13b5ce@linaro.org> To: Bjorn Andersson , Michael Turquette , Stephen Boyd , Philipp Zabel Cc: Marijn Suijten , linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, Bryan O'Donoghue , Dikshita Agarwal , Vikash Garodia , Manivannan Sadhasivam , Konrad Dybcio X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1707245017; l=1957; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=eVTHPrT2Om77CguELWV9DheT0YsZYlvmQpUZDIbQJew=; b=BZQy6EUUZshJ+QDMMiLJvwCLm5SPTPfLO63fDw/6rPwVOSyeW8TZ1Eh0LDNn95U8eLZ0YsW3m AZQz+o8uwqQAtJZdCTKk4N2E5PrOw3bN7o3Qtzw6VTv2nXKOAtbYi7K X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= They do the same thing, except the last argument of the last function call differs. Commonize them. Reviewed-by: Bryan O'Donoghue Signed-off-by: Konrad Dybcio --- drivers/clk/qcom/reset.c | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/drivers/clk/qcom/reset.c b/drivers/clk/qcom/reset.c index e45e32804d2c..20d1d35aaf22 100644 --- a/drivers/clk/qcom/reset.c +++ b/drivers/clk/qcom/reset.c @@ -22,8 +22,8 @@ static int qcom_reset(struct reset_controller_dev *rcdev, unsigned long id) return 0; } -static int -qcom_reset_assert(struct reset_controller_dev *rcdev, unsigned long id) +static int qcom_reset_set_assert(struct reset_controller_dev *rcdev, + unsigned long id, bool assert) { struct qcom_reset_controller *rst; const struct qcom_reset_map *map; @@ -33,21 +33,17 @@ qcom_reset_assert(struct reset_controller_dev *rcdev, unsigned long id) map = &rst->reset_map[id]; mask = map->bitmask ? map->bitmask : BIT(map->bit); - return regmap_update_bits(rst->regmap, map->reg, mask, mask); + return regmap_update_bits(rst->regmap, map->reg, mask, assert ? mask : 0); } -static int -qcom_reset_deassert(struct reset_controller_dev *rcdev, unsigned long id) +static int qcom_reset_assert(struct reset_controller_dev *rcdev, unsigned long id) { - struct qcom_reset_controller *rst; - const struct qcom_reset_map *map; - u32 mask; - - rst = to_qcom_reset_controller(rcdev); - map = &rst->reset_map[id]; - mask = map->bitmask ? map->bitmask : BIT(map->bit); + return qcom_reset_set_assert(rcdev, id, true); +} - return regmap_update_bits(rst->regmap, map->reg, mask, 0); +static int qcom_reset_deassert(struct reset_controller_dev *rcdev, unsigned long id) +{ + return qcom_reset_set_assert(rcdev, id, false); } const struct reset_control_ops qcom_reset_ops = { From patchwork Tue Feb 6 18:43:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 13547697 Received: from mail-ej1-f44.google.com (mail-ej1-f44.google.com [209.85.218.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 19ED713FE2 for ; Tue, 6 Feb 2024 18:43:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.44 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707245026; cv=none; b=uF2fXNSICNAoR5+/ekam9NbbIoZ4qbx2psZS1vGLKhpnu0hUbi0UqHrWGXjNrR8FgzzhXEZzcrFdHS9hUPn+RdHSRZmGPwrlhZENY0C3p1bUfROL3PEJ1IiT75jrv6yl/zWKqHPElpXdjVw/DJheIr7PEX5toOJ9eX2PCskC9ms= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707245026; c=relaxed/simple; bh=XwCgSZpLR0e1PPyOXyw9iz+BwYBf4ZHexOSsfIVdxQU=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=CFCC/FIu9xfdVcGJhu2d33ky73F19nCQIhPI+c+vKop09Z03sDrrO+02rD88+luI76c4WWXXYR9N5hhC+tHzWf/Ed3oHTJGRq8/VpcIPo/bGl4/juQlcixUSRPkBuTVdpUDk/VMiqoxkxdO2SYoA2ZzcQLBvM7OpgYNdnrONgv4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=n88zmfA1; arc=none smtp.client-ip=209.85.218.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="n88zmfA1" Received: by mail-ej1-f44.google.com with SMTP id a640c23a62f3a-a2f79e79f0cso172256866b.2 for ; Tue, 06 Feb 2024 10:43:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1707245023; x=1707849823; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=hvL5qVc53pRM2ItjtrWEvKCgIea1KTM6jFEXiD2pTIk=; b=n88zmfA16tac3dTriWwFjbFeppDs3QCehS3dS9zYc6ISdsqi/+N7kYa8RVdk7PrG3V JHVd+fGdNvr8dYF/b3lZ2LuAvAn6vQ+ISxAHLRd3Td3dIzJCa4/JkqRtftbwRLg93Ja7 ZdS0iL/SaqjeHZcUVj73ubTEbWbev/8mPkFjJjJYDZZgwTOUS8/CzRIjCWEuE1bnBsvG HhJ1G8HZwFmObUd7znj6gCCXlBLzp1qdJijj8flCbLkXXIkTTart4jOJX2RJo9Il2atq ETVk+QWMQ6MzEJp6ZKJg6bhzjoejLap/VGQuG8QSPHKKh6R7C6P/q2fupy8BTqbVHnPN tFgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707245023; x=1707849823; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=hvL5qVc53pRM2ItjtrWEvKCgIea1KTM6jFEXiD2pTIk=; b=bkSCAI4TVriDzmJGXcZdTUBvx6VNp+9WDJkmkGDBfWzegR/DkJzuuTPMu7CJ4Wj16k 8c7KPA4DmDYiItHeyPrbxhaZ9AODptbpTr3G1eir1zuQQGcaVtimYQhoy/yHL6zUf/fD EpfDP7u0OHZ53faZKXTql5trJviL8Nz7Xh3eV4E2/d+ij5Kz8YGYnyPKpGAF1vt7iafY CfdEb7MHPS5bxAFvbiq5PaSgU5Xl3/sb5lW7SvWhxZKnCBNm1WTWQfJB+8w3IM5ckoex a6ZRWvRuZLOy4tnyQdU0QJYZRaJK6UAsNJIY55SqbX4Gh24OdM0JRCc/W4C9Cdh42EGN nPjg== X-Gm-Message-State: AOJu0Yxd0UIM/cX/rb5xDK54aJcvc2Nz5QAcTmFAHIRBmSdqbW/kxlH9 xpgv6/Gx43kA+3MYe06erOjtBFFMCsXnZRvX8fi8rp+QY8OwprNJ0JKwouImBio= X-Google-Smtp-Source: AGHT+IEwcGzkit3UG7RgaJhKZBhIWNsb1zukExW6YjVWP6FLguEvzUDQXDK8pJXm4ibakI9xGX20fA== X-Received: by 2002:a17:906:5290:b0:a31:83a2:463c with SMTP id c16-20020a170906529000b00a3183a2463cmr2821529ejm.34.1707245023306; Tue, 06 Feb 2024 10:43:43 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCWzBwgE40NoQJNzoN6JSw4Wjez8/Ag0DcojFpjommyB40AgMlUE/2XqAEx8GzyqQRu0n+Gf6BPPBtw0GJk5JHQhpqnm9wTanHLkqAFGNEu9StIqpimJ3LQ/bh/choLxc9xYvIslXMUyNrY61oIAjPhXTck3pQDC3OFqGLXAFx/TIN6rxWNRnLl80REIXNm+H3LWvFfoHxYHliZ1b9Cd6Z8qWIxWNz28bbjp874R4NzcK4HaJPXy8u14SqljSDsQrMCSy9WfeYwae54IR4lpNeZcjYCgKl0toBqdAzeEWdi5p6i08NE4A/IeL2gwgUisfg5IsdlgXA4KSzvf1vmfsL4BBtBTJbSf5KNssuSrsYrfPg3umt1i6MAG8r11TtQZdMAC35PIbJJgHuTLP0vc/N+7NYdxkR5syNN31BkE+v98az+z1IISEBMTlSD9hRllymVU34Asv/su Received: from [10.167.154.1] (037008245233.garwolin.vectranet.pl. [37.8.245.233]) by smtp.gmail.com with ESMTPSA id un9-20020a170907cb8900b00a384365e3b9sm562305ejc.195.2024.02.06.10.43.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Feb 2024 10:43:43 -0800 (PST) From: Konrad Dybcio Date: Tue, 06 Feb 2024 19:43:36 +0100 Subject: [PATCH v2 03/18] clk: qcom: reset: Ensure write completion on reset de/assertion Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240105-topic-venus_reset-v2-3-c37eba13b5ce@linaro.org> References: <20240105-topic-venus_reset-v2-0-c37eba13b5ce@linaro.org> In-Reply-To: <20240105-topic-venus_reset-v2-0-c37eba13b5ce@linaro.org> To: Bjorn Andersson , Michael Turquette , Stephen Boyd , Philipp Zabel Cc: Marijn Suijten , linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, Bryan O'Donoghue , Dikshita Agarwal , Vikash Garodia , Manivannan Sadhasivam , Konrad Dybcio X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1707245017; l=1253; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=XwCgSZpLR0e1PPyOXyw9iz+BwYBf4ZHexOSsfIVdxQU=; b=Tq60ALVlciDLkdivYsIcmrQF748EJR+pUE1IufXNafFGsZuOAbb9f/rPSAB0nnwQSqzg3qqQb 6l7lLfFExgEDOXPfLnpXb/GSuu3ptYAHeuizJ30cBnCMswdh1J1/Bz5 X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= Trying to toggle the resets in a rapid fashion can lead to the changes not actually arriving at the clock controller block when we expect them to. This was observed at least on SM8250. Read back the value after regmap_update_bits to ensure write completion. Fixes: db1029814f1f ("clk: qcom: reset: Ensure write completion on reset de/assertion") Signed-off-by: Konrad Dybcio --- drivers/clk/qcom/reset.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/clk/qcom/reset.c b/drivers/clk/qcom/reset.c index 20d1d35aaf22..d96c96a9089f 100644 --- a/drivers/clk/qcom/reset.c +++ b/drivers/clk/qcom/reset.c @@ -33,7 +33,12 @@ static int qcom_reset_set_assert(struct reset_controller_dev *rcdev, map = &rst->reset_map[id]; mask = map->bitmask ? map->bitmask : BIT(map->bit); - return regmap_update_bits(rst->regmap, map->reg, mask, assert ? mask : 0); + regmap_update_bits(rst->regmap, map->reg, mask, assert ? mask : 0); + + /* Read back the register to ensure write completion, ignore the value */ + regmap_read(rst->regmap, map->reg, &mask); + + return 0; } static int qcom_reset_assert(struct reset_controller_dev *rcdev, unsigned long id) From patchwork Tue Feb 6 18:43:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 13547698 Received: from mail-ej1-f48.google.com (mail-ej1-f48.google.com [209.85.218.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 962D414294 for ; Tue, 6 Feb 2024 18:43:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.48 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707245028; cv=none; b=HAZYgskvP0zW+XEQ8QzTOJacCAv5j0q+n00f6wZFGVjJLuOcgvX6+EeGCUWtMA9msZuWzSbiVcbml+LYI9a5k+QyRinM3yHCBG/MtG5/FDz6D9lxUV/upsHUF1KColjTFLXwNZfEy7ZogT6223olsbT1wTOuMrPv+0Ns8kTwy+U= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707245028; c=relaxed/simple; bh=2ewvjxYTFuXfl1Lk2jvUqETAlBjYpSBzSi9qQsmkHxk=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=F9M0GONAi39GWkbyXNR6GNY21c/e5Om0LqZ1nYynJu9TOrZeHNTVoh/tGars96w+xmXl0eTyj8OplJj34ZZrlt2r5FB4camSulYbxZY6m0geRzWZzp5jjnpFHmp2BluXhRDsQvJh9jg5ynUEuzVS3KZF0/8nVIaHctrswq1Ubjo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=End6W+xh; arc=none smtp.client-ip=209.85.218.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="End6W+xh" Received: by mail-ej1-f48.google.com with SMTP id a640c23a62f3a-a38291dbe65so104885566b.3 for ; Tue, 06 Feb 2024 10:43:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1707245025; x=1707849825; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=dRc/E0OawVy3KfCwkARwDXGHPJlfd3wz1+hpXwWRbNA=; b=End6W+xhX+zx39ngK8pw2qUApKR87qcgEyIZPB75a5yPbh0JB5QXSrzzdC2jUCr50T 3cCnhTX3bWRHR/DVFGDw5vgjUcPgutk8hyvz6NYz7f4mET/o4MXM0XJFNjoixZnrLG+9 4A+utrNWyctwkOjzBbdKp+PV25sF/2HV+d+HBhxDWfIOchnUbyy/5dHGv7wgt9x0SAe2 Ev6l2GSMD4YaXpSZJKWIuUeo7DEPCEcv478+lc+lXBkZZ7VdyUYSd41uvwe0+nNc5YXp HkGtpWDmbz47Zg98dLXAcfD/sOt2eR7nTDaa/y0n2gKgPoXHCXgyXYx3J+5bXuh1/k/1 V7Qg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707245025; x=1707849825; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=dRc/E0OawVy3KfCwkARwDXGHPJlfd3wz1+hpXwWRbNA=; b=lcDogMyMGcXTyyaPALT+iNI5elKJxpcKddSMGRJsduSLqgzoHT9vTefUHa10Wxg1JT hVJGOifHIthNCk79bH4A1hP/uJv5Kl3Re7FwBW05DGzhuhVY0mAWfFTeIB297QCjY5cA J9LtIe+pi9moFHbHeyiTfwxMQhVFN591vXsY3zsaCPgotzRxdAzFphahpotqHQN8Gu2F TsPOEIMvwEpGsY8qZtbQo0Kh5AOhk4vwfH3i+rgQm59TkYSvjZ6xuYc1TRuxJCHast8q Bijs+nznHJ76KPvW+12v1xWnkf6YStryIDdSGAT9Twi9pz1PqP/0qrahjeWvDHJKQa3e bNsg== X-Gm-Message-State: AOJu0YxkPUs6C8CpVcEECgrlmKB/gjXyzkRBB8iNpkXb1YL4mz+DUcdH pMvPX5gkXZ4cEtKICpyyNL+0/Q/dYJyjHeoUDHnFxSX8cGvqGCPbscUrTNIIPpA= X-Google-Smtp-Source: AGHT+IEuh/uUEPdWaT2fIuS+vpCG1uskuLnlNHg7EXttq5ew2eUrcb2WVhzyOPtQaX4We1zaIyIh8A== X-Received: by 2002:a17:906:2406:b0:a35:db4d:2ca9 with SMTP id z6-20020a170906240600b00a35db4d2ca9mr2471868eja.31.1707245024772; Tue, 06 Feb 2024 10:43:44 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCWHt/dJgv5sbPXb9J6mG/1MeMQMplcgRfmAdpw8nwakHXqNLySlCcH81Dqz/4/dogrLyEvgORqLM2wi2HO7YiH2dzk3SuFZJeHZuqgrNdn4ADuSjd7qZgB5Seou3er0TylcmUrwA2PlN1IDwxRcbt+ppMw/w3thsfXwWx2SZa/kfShVIEJLqj439bVMKkQNUDAibiIKE/DjJn1fWOqjyW+UaILLUQJu7QHBHpxercLtrIt6NfFI1+ieXmlTzDkA8z/JcwX1mD0noiLpHvA9R3EftAfypdm2FvFukD+8vEbrbZdRrchnYVQQHGeFPvN4qGWBL+tgYyaoOpRGTOPQSoqr61H4Ry3xJ4etDGvnThhRmEX4C/ReY2kYH0kl44HEMdCVvkgYeRInMrRa37i4QpFmMoLrKhsN4cN/q7joN3mgYjY0VIyqvYV+B8T4Lw31mjlHcKaRvFuy Received: from [10.167.154.1] (037008245233.garwolin.vectranet.pl. [37.8.245.233]) by smtp.gmail.com with ESMTPSA id un9-20020a170907cb8900b00a384365e3b9sm562305ejc.195.2024.02.06.10.43.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Feb 2024 10:43:44 -0800 (PST) From: Konrad Dybcio Date: Tue, 06 Feb 2024 19:43:37 +0100 Subject: [PATCH v2 04/18] clk: qcom: gcc-sa8775p: Set delay for Venus CLK resets Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240105-topic-venus_reset-v2-4-c37eba13b5ce@linaro.org> References: <20240105-topic-venus_reset-v2-0-c37eba13b5ce@linaro.org> In-Reply-To: <20240105-topic-venus_reset-v2-0-c37eba13b5ce@linaro.org> To: Bjorn Andersson , Michael Turquette , Stephen Boyd , Philipp Zabel Cc: Marijn Suijten , linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, Bryan O'Donoghue , Dikshita Agarwal , Vikash Garodia , Manivannan Sadhasivam , Konrad Dybcio X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1707245017; l=1260; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=2ewvjxYTFuXfl1Lk2jvUqETAlBjYpSBzSi9qQsmkHxk=; b=VbGIar/lFUsTjvxoVehzAI4eFVsChuq7EXlEbINw1h434cIzmQKmAg/btzj43o7pVDOBsC9gF zxk5PY27uN3B4kD++FhXbv/oR36QzECTS99e2XgpyqvXhuKiMI8f6EM X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= Some Venus resets may require more time when toggling. Describe that. The value was obtained on a best-guess basis: msm-5.4 being the base kernel for this SoC and 8775 being generally close to 8350 which is known to require a higher delay [1]. [1] https://git.codelinaro.org/clo/la/platform/vendor/opensource/video-driver/-/commit/dfe241edf23daf3c1ccbb79b02798965123fad98 Signed-off-by: Konrad Dybcio --- drivers/clk/qcom/gcc-sa8775p.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/clk/qcom/gcc-sa8775p.c b/drivers/clk/qcom/gcc-sa8775p.c index 8171d23c96e6..c2b403cb6301 100644 --- a/drivers/clk/qcom/gcc-sa8775p.c +++ b/drivers/clk/qcom/gcc-sa8775p.c @@ -4662,8 +4662,8 @@ static const struct qcom_reset_map gcc_sa8775p_resets[] = { [GCC_USB3UNIPHY_PHY_MP0_BCR] = { 0x5c020 }, [GCC_USB3UNIPHY_PHY_MP1_BCR] = { 0x5c024 }, [GCC_USB_PHY_CFG_AHB2PHY_BCR] = { 0x76000 }, - [GCC_VIDEO_AXI0_CLK_ARES] = { 0x34014, 2 }, - [GCC_VIDEO_AXI1_CLK_ARES] = { 0x3401c, 2 }, + [GCC_VIDEO_AXI0_CLK_ARES] = { .reg = 0x34014, .bit = 2, .udelay = 400 }, + [GCC_VIDEO_AXI1_CLK_ARES] = { .reg = 0x3401c, .bit = 2, .udelay = 400 }, [GCC_VIDEO_BCR] = { 0x34000 }, }; From patchwork Tue Feb 6 18:43:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 13547699 Received: from mail-ed1-f50.google.com (mail-ed1-f50.google.com [209.85.208.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D0A28168BA for ; Tue, 6 Feb 2024 18:43:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.50 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707245029; cv=none; b=AVWjca2VxmcmbMfo7bBoQL/SWc+fFwmBm27jXfoNeWiWWgGL/7cdv87p6ZwhDu65HjCcJv09HFljLkYrv0dB9ASXf1fnrFhfZxKja8fjTYliWla/4Kr8BHn/20+5eq1o+mB63XrbNLZEyZoa/MPVPBTph9Q/LvMf5dUfTU9S8WY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707245029; c=relaxed/simple; bh=xI8Pz/GiLYIx99t2tjsSwt/3C03sZIdZzmRztviEUeI=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Wd+YXCCi/XDjN41DP7C4uLAXvcxPiz3N1PYpPUqsClhSXduVE2b+cWLNJl1kdRtl/EXsZLa2ACO6TzRDdd+Fb41Hjv2oj0FLE2KwlPrEcRtjnut2SWzw5Q1vn2IbRRKr6DctQt9WRApxwnLQ8hrfUcajYaYyZOac0ah2Z8peKq4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=Kr6FWYwV; arc=none smtp.client-ip=209.85.208.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="Kr6FWYwV" Received: by mail-ed1-f50.google.com with SMTP id 4fb4d7f45d1cf-55c2cf644f3so7127685a12.1 for ; Tue, 06 Feb 2024 10:43:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1707245026; x=1707849826; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=dAa8E9ANX6Nu3efVaQVeq8bdKbITl5R3NB9pzT3L0B4=; b=Kr6FWYwVs5sqK4a8s7pXdKeguyAmPS1LoroSGHC2SQFsBhV0Tg+npVlcyb8uzS6b/I pvBWfjzZ4lHKTn4ATbTg8PVOq2UM2ghEqSnnNNmjoOC6BJbPN5iFfFR6ud7RQzmgHZ3E IU32uSYfT8Nds81/7JPeGdvpbgwPUHoAU66Wgb4YWr7BCUyJkKNsXOKvB9tqSW16+JgW i+41m775RFu8JDs8Hex6i17872QSGaExNbcGvNIhMxKQgSQ74CG4KKHy5OHLCd7ACJdS v9C9rslISjyEwHV5F031J5OU3aJwZ9d5RNz6wAjgRGISYZ0zTSzBlRebdzpjkOl1+mUy DhUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707245026; x=1707849826; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=dAa8E9ANX6Nu3efVaQVeq8bdKbITl5R3NB9pzT3L0B4=; b=ULyElgG5wfDwB2v66U3yb57nh2iBJjwZr0DZ32U+bcu+Q3aZIblChA+pzViFCsehaq XJLH//V1cJK0hp1cm89kAFaY7KGKPx3ek0s479lPHWZ2O5s5/y7bKWsw3qQfIUuM6euN 5q0rXkj9u+VExLbrbW1tg0BohFov8bCJFyOlyfwYjpKBm+Tiz8WfcyCfC0kQuOVGpzXu Oos914d84I9/3hOEwGBsqfbUvlD/47IzxcJPGe00Egx9Nle7tOugbZfuFAdXWG/pkXRZ Oiua+rKX+uj3IWVvFyEsoYN0eBqBvMjpafTRU5wiQFBm+KmCuj+T6nWCW0DZmRlcHzlL epyg== X-Gm-Message-State: AOJu0YyRg5gzopZ5lPVBG0wRdVn26qE6g/D4zZePVuMaHEOjcbOyV7Z0 LOnjupAhiwX1RwI9g24vspmhZmC2P5wNT9THFVFVyX/HIQVjGTvT+bDs6zXl5wU= X-Google-Smtp-Source: AGHT+IHFPjKbAz5P4i4tT0GMpAj5TQXxO8zp22PMieudmKvyJB0rPn0WlcyQcFE0y30rsoOB57vrCg== X-Received: by 2002:a17:906:5a49:b0:a37:78f1:1302 with SMTP id my9-20020a1709065a4900b00a3778f11302mr2015332ejc.70.1707245026190; Tue, 06 Feb 2024 10:43:46 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCVtQhPkko9kgb74rZc6QzMcRvtf8zXA8mdt+YXjWJCnvKVadM8Oj1izAu++D0nXjyNZxY6zCPuM30srknTZFOiIcU5YdtHxGRwKmgP8OtRjwRHlVmqOvZHN69LHnPcHR+yTZMTx5KPqrpRauO2g05QH/SSGmBtIXlmYFmJC6iWBbLQjOqDQ9WUbC5w/QA3VmXoFImO1p0f5LycoJLczspAhhpQ9xZFoE73qOm67OiI4f3TdXXNDZQqoJ+7lX5uvLbO/t29GytAfgZ6RWb5VFlzW4uVLvLL5zhBbnVla2qkaaC/rD9YBxcqHAFIubs0SLsExq1eD1CQ0Dju0HUhOX3rOcnEeT7HYLm9WA1/6TfMHwCvpF1XqtUIvfsoiUpZtlyAoStvpTiDCU/N3PoqvZMzxxzESIY9VZozNzRQBTCs2m4w4ikV+Jraw0LoRsM23nufgv1UIYfMc Received: from [10.167.154.1] (037008245233.garwolin.vectranet.pl. [37.8.245.233]) by smtp.gmail.com with ESMTPSA id un9-20020a170907cb8900b00a384365e3b9sm562305ejc.195.2024.02.06.10.43.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Feb 2024 10:43:45 -0800 (PST) From: Konrad Dybcio Date: Tue, 06 Feb 2024 19:43:38 +0100 Subject: [PATCH v2 05/18] clk: qcom: gcc-sc8180x: Set delay for Venus CLK resets Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240105-topic-venus_reset-v2-5-c37eba13b5ce@linaro.org> References: <20240105-topic-venus_reset-v2-0-c37eba13b5ce@linaro.org> In-Reply-To: <20240105-topic-venus_reset-v2-0-c37eba13b5ce@linaro.org> To: Bjorn Andersson , Michael Turquette , Stephen Boyd , Philipp Zabel Cc: Marijn Suijten , linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, Bryan O'Donoghue , Dikshita Agarwal , Vikash Garodia , Manivannan Sadhasivam , Konrad Dybcio X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1707245017; l=1320; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=xI8Pz/GiLYIx99t2tjsSwt/3C03sZIdZzmRztviEUeI=; b=BvYvh8VMtDO2ojSwG6EKKNmDTPNM3CZ//jLbMYVFrd3SBxGrYeb/ueF4t1pd5ecykCt8iau/5 9hisTvNIiAxDNbTWDlWASMXLvySnJwy3jHdwAkpruTaQCgqRVqYWI17 X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= Some Venus resets may require more time when toggling. Describe that. The value was obtained by referencing the msm-4.19 driver, which uses a single value for all platforms [1]. [1] https://git.codelinaro.org/clo/la/platform/vendor/opensource/video-driver/-/blob/LA.UM.9.15.c26/msm/vidc/hfi_common.c?ref_type=heads#L3662-3663 Signed-off-by: Konrad Dybcio --- drivers/clk/qcom/gcc-sc8180x.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/clk/qcom/gcc-sc8180x.c b/drivers/clk/qcom/gcc-sc8180x.c index ae2147381559..1351c52bcacb 100644 --- a/drivers/clk/qcom/gcc-sc8180x.c +++ b/drivers/clk/qcom/gcc-sc8180x.c @@ -4528,9 +4528,9 @@ static const struct qcom_reset_map gcc_sc8180x_resets[] = { [GCC_USB30_PRIM_BCR] = { 0xf000 }, [GCC_USB30_SEC_BCR] = { 0x10000 }, [GCC_USB_PHY_CFG_AHB2PHY_BCR] = { 0x6a000 }, - [GCC_VIDEO_AXIC_CLK_BCR] = { 0xb02c, 2 }, - [GCC_VIDEO_AXI0_CLK_BCR] = { 0xb024, 2 }, - [GCC_VIDEO_AXI1_CLK_BCR] = { 0xb028, 2 }, + [GCC_VIDEO_AXIC_CLK_BCR] = { .reg = 0xb02c, .bit = 2, .udelay = 150 }, + [GCC_VIDEO_AXI0_CLK_BCR] = { .reg = 0xb024, .bit = 2, .udelay = 150 }, + [GCC_VIDEO_AXI1_CLK_BCR] = { .reg = 0xb028, .bit = 2, .udelay = 150 }, }; static struct gdsc *gcc_sc8180x_gdscs[] = { From patchwork Tue Feb 6 18:43:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 13547700 Received: from mail-lf1-f42.google.com (mail-lf1-f42.google.com [209.85.167.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 64D6917592 for ; Tue, 6 Feb 2024 18:43:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.42 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707245031; cv=none; b=aluXhtEdpN4ZifBAyYtWjYIHJp0+R88HZ+EVx+2/6T2Jvk7lVK7CpFNBEyF4APZfDVw3khUP+RpBG7+HMJG+1jiut97RStRaIQ2rq31hbxvLJFTYkwt7O51+ZxfFW0Xn0Bopb3biUxqpVklFKnNIM9x497EYixY8nUbvRcwA1pg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707245031; c=relaxed/simple; bh=cYbItYW2hueTIMDZ5ErUB7KsJqgkLUBYpnYuLwK48bo=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=TO2Q/HCpzcObn/NFaEggUdqK6eE5R1sCLdeAvZYzQDeq70hinXXhQC1EQu6L9P4C55uPPBG7ZYw4RoGiA4H49gHdnvCHzgxYS8N/JZ3QNfb1smb0suD2Cscu84nsSB62uiLEsuIDxHxZ1ZCTY4Dh1UPBWhsoP/rmEPWRXQhSN0k= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=xX9qjImQ; arc=none smtp.client-ip=209.85.167.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="xX9qjImQ" Received: by mail-lf1-f42.google.com with SMTP id 2adb3069b0e04-5115fcef9e9so1261506e87.3 for ; Tue, 06 Feb 2024 10:43:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1707245027; x=1707849827; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=lJKRPokuZG9Shr1HCLUQ2NfmjznI2k78hzHx2xJmuZY=; b=xX9qjImQhpe8/9E60DMD14VQwWWr16qkOy38owYEaJQ8MyVsHSkCiiucC1+6/Q3DgP lb5iKrV7j9F2bfsOH5zF2GWaDbCgEXOa/KG78U2/1JhLrR7FBe+rxIrnJncTNlxf9yu0 uW/d5eUcQPElTGPeHtzfplbArTC145olVm8Xl0KRJiXK6rU3rWianplmM0TnzI31ghr5 vzcHvg9xCeysM421hgZhVf6Y9COmzIhDO2jBMgF725Uu4BPdFAylAQywp15iPtDX0e/x msHawMBA6iqx4r6JWU1bnCXmDzQmyLSCh0RKCaOvhKBKj2GyhMHRhVoIafp6O42NxSxU BOGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707245027; x=1707849827; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=lJKRPokuZG9Shr1HCLUQ2NfmjznI2k78hzHx2xJmuZY=; b=i5p4kgFEYubG8V312zwMHJxw2zKqkpmzq9yy4Sz7Xh7I6JV8Ag9plB/RHAvkJ6jCJ6 vXwaHJG677ncJy8cqBdoLQdcGBLJmuVJtH16tpljBEFgeNWrqLG/n7Q6BZdk1w7eOgSQ wpZK/o+PEL7yqA1vTJwrr4T1+EqOIKonYJZxfX4w6tDvVkgDwsb9mjh/1z08fRiZIQWc P8AUkkXHqGeFXvoDamLcbt8Pm+3mZ6V9j+mWq2K2i2TqJAWqHQ3gq3Hj+0oOJnC0lbm5 sG8Z9PvH1ikXKYQu1DcSi2BJul3BWc1+LEAmtSDQ5SiZCZh/csgh5nroLt3XnNZNoKVW MKCw== X-Gm-Message-State: AOJu0YxURTARUVvcj9N6XW3qAzsDniRycWqub6eSOcdEzOCmMKvxkTpK /2/fUHQw0xHWBYd5VMuxh4U0Qt062XEvAM5oLVRLHSviC4J4ROlcTnVB/rFF8PQ= X-Google-Smtp-Source: AGHT+IGIFUIRo+PA7YF57GnuCMh0z4jEYdINS8CLn+9cxEIJBnfRs4FcndJeS1BGByLuS1+qncg+Hw== X-Received: by 2002:a05:6512:e89:b0:511:3ef3:cbc8 with SMTP id bi9-20020a0565120e8900b005113ef3cbc8mr2719942lfb.42.1707245027586; Tue, 06 Feb 2024 10:43:47 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCVpdOisAfJ33Wxu+kdkaTbQq7mSdvuw1kPTzMAJqP0SZzPBGoAivXtdVkEGmok5eGaKGlkymgMH+8RmB5xaeAWTYt+afaw2CpcO5Ql18X4HGZDdB3N7fv1RzPa1hpWErlyKAK7ftoBQVGGphkPoAGYQBSxVrd0nYQrbIGC+Oel20s8dZr7B4jT2McFrt8cKI+b8e1Y5LN9Ap/IWBRg9WlvpKV+tPWY1SI3K43xCFytfMU7lm28iOgj/v57y7aAUzTZoK3tIBe6DoWk4C1l7Y1Bc9BKo8aQVro1+Cknd4DtpMwlJOkAhj1veizrdBq60wqtCbxIAOprZP/MWeMKRNm8qbA0xlbHaXdIb/1eF+ulgBefiV4KaK4L4eubR5mbyVU/rhys0zga5Zu6jLz9hUI0HWlObRjXHfmElLJGkE5Cz8HkjN0RoElc6OHPm4FVDjzH/VT6lLjEd Received: from [10.167.154.1] (037008245233.garwolin.vectranet.pl. [37.8.245.233]) by smtp.gmail.com with ESMTPSA id un9-20020a170907cb8900b00a384365e3b9sm562305ejc.195.2024.02.06.10.43.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Feb 2024 10:43:47 -0800 (PST) From: Konrad Dybcio Date: Tue, 06 Feb 2024 19:43:39 +0100 Subject: [PATCH v2 06/18] clk: qcom: gcc-sc8280xp: Set delay for Venus CLK resets Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240105-topic-venus_reset-v2-6-c37eba13b5ce@linaro.org> References: <20240105-topic-venus_reset-v2-0-c37eba13b5ce@linaro.org> In-Reply-To: <20240105-topic-venus_reset-v2-0-c37eba13b5ce@linaro.org> To: Bjorn Andersson , Michael Turquette , Stephen Boyd , Philipp Zabel Cc: Marijn Suijten , linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, Bryan O'Donoghue , Dikshita Agarwal , Vikash Garodia , Manivannan Sadhasivam , Konrad Dybcio X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1707245017; l=1264; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=cYbItYW2hueTIMDZ5ErUB7KsJqgkLUBYpnYuLwK48bo=; b=9wxflDm24MJVJvHCAenQNJMU7vt8sE50cxRtDntg30mLNIvc3fQjxlQ8h52Ml/4aRIMhCSRjR mVvL7NXaRc/Bfyb2cmfGNs7XhTkSilxhKjxir1CyKLalI31hwTBt24k X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= Some Venus resets may require more time when toggling. Describe that. The value was obtained on a best-guess basis: msm-5.4 being the base kernel for this SoC and 8280 being generally close to 8350 which is known to require a higher delay [1]. [1] https://git.codelinaro.org/clo/la/platform/vendor/opensource/video-driver/-/commit/dfe241edf23daf3c1ccbb79b02798965123fad98 Signed-off-by: Konrad Dybcio --- drivers/clk/qcom/gcc-sc8280xp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/clk/qcom/gcc-sc8280xp.c b/drivers/clk/qcom/gcc-sc8280xp.c index bfb77931e868..9f4db815688c 100644 --- a/drivers/clk/qcom/gcc-sc8280xp.c +++ b/drivers/clk/qcom/gcc-sc8280xp.c @@ -7448,8 +7448,8 @@ static const struct qcom_reset_map gcc_sc8280xp_resets[] = { [GCC_USB4PHY_PHY_PRIM_BCR] = { 0x4a004 }, [GCC_USB_PHY_CFG_AHB2PHY_BCR] = { 0x6a000 }, [GCC_VIDEO_BCR] = { 0x28000 }, - [GCC_VIDEO_AXI0_CLK_ARES] = { 0x28010, 2 }, - [GCC_VIDEO_AXI1_CLK_ARES] = { 0x28018, 2 }, + [GCC_VIDEO_AXI0_CLK_ARES] = { .reg = 0x28010, .bit = 2, .udelay = 400 }, + [GCC_VIDEO_AXI1_CLK_ARES] = { .reg = 0x28018, .bit = 2, .udelay = 400 }, }; static struct gdsc *gcc_sc8280xp_gdscs[] = { From patchwork Tue Feb 6 18:43:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 13547701 Received: from mail-ej1-f54.google.com (mail-ej1-f54.google.com [209.85.218.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 25C4C17BA0 for ; Tue, 6 Feb 2024 18:43:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.54 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707245032; cv=none; b=U0NW5AEF/p3WiBRLW6aNmMssPqyoVdCLyfWo0vbFXmi1xFa9hLj8OMNxAPEg08uCoAOmyYm5l2Aj0nOitYp1shHc+bf5cnQaCubRGX34Ky4iK6AnAW3+fXRJTqAdj+zqqzoF1Ti+4QGtzijYo0CWvxPYbySb8wVYxem0xp3I6E0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707245032; c=relaxed/simple; bh=hNpPMHDWoOMTbeDBm7it/X/QFrunF620Ewnj+Kcxsr8=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=hICdGUPb6it/mjLJJXwyzU7nJgfHInuo3LZ35xagFvQ4OU1Ok3w0ThJOmhODRkDlJTar8Ji69Etv3+2cUo2009ssXIUM37v9DpwuYOmd5wvKh/nYAXd1SXzvnHJU4rmjQWzIchShlITRJJi97j/MeXpfKISnyyKfoE4l/1JfFEY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=VBF1Oxfs; arc=none smtp.client-ip=209.85.218.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="VBF1Oxfs" Received: by mail-ej1-f54.google.com with SMTP id a640c23a62f3a-a370e63835cso546192866b.1 for ; Tue, 06 Feb 2024 10:43:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1707245029; x=1707849829; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=hFLeZhpqcgOrxTzkmGltLeTXQrsN6KbONLIWDW0T9iY=; b=VBF1OxfsTAZ7I6JwNsA5G0KGrEGF/ZjPGh+u9ofkYg48jaHkeOjm4ZT6mY/dAJu3Ne igJXx6zY9FLhcB9IAKEHDow8HdeHPniVU4F2Bm5y5cNYCoK5eo7qaknl7KWnIXuZzs+3 R2whsdfivPGPEeGW78OWQ6BEtLu7c+Gpicda2ZP8Di78c0zxxgSk82ua4suahVJBcAyW uTJHbEb1z/7HiF1XSu3cUHWMzuXATaCX2Mv8+iS6EyWR4wiEB0eX6tyZJf7S5Odr6HUO wLbVYZBeXWC1zPJZN3nGIh66/n8ZA74ZtJSjvZQdBsuUqDre+Y7fxfy860XJhXJgHM0z UhPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707245029; x=1707849829; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=hFLeZhpqcgOrxTzkmGltLeTXQrsN6KbONLIWDW0T9iY=; b=TybVg9B3oawhtCAFpJQZSOKWn0IlebXvuMlfDeR1UjZjiAmP6Mi1ncqz3JMyirQuQY v2Wz6WVXeNRImxIHecFt5Nk0+4HJsiCaxvqfPp0CSIg2gYsxj9nC8Qsjwec2D1yTPp2c V4nUNxQlbv0fAqChnT43OuBUQzOPC0eFtuyYVEFr0K37nZADEb6EaE7J4KhK8MnbK01G 8N0dXDCOvVxkLurwZdVFHeFSd8UjjW/yIrYBaTAYXLhwzpxnhn8uDsTUYpeNJyt4voXV BnvoiZdkqHuVV1VvNfmSDVodPhte9Yh73yOEZTdcilRKMfcJq6woU5CaQMLf6BtBTHEo Mcog== X-Gm-Message-State: AOJu0YzwNi7mP92CMPXl0kf3ZwCiZmD+SejFDeqxSEytj0OBATA+03gi WiO+5+Xe8jucgbi/NFfWpy6keOHcDLHwYo741whx93Zl/5k94ifYxtJ9vbP4r68= X-Google-Smtp-Source: AGHT+IF8EUkiN6qPS1bLyCZevmsZyN3xOU7aEzLiG6w+ePDJ86YOkZa5vMlvYh2u9l1VfKYCWCoSMw== X-Received: by 2002:a17:907:7f17:b0:a37:7fb9:ea27 with SMTP id qf23-20020a1709077f1700b00a377fb9ea27mr3179350ejc.48.1707245029517; Tue, 06 Feb 2024 10:43:49 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCW0n4Idf82KqAzmo0iSS++sV2ROsgmaZfsqrWdGdQk9b2xQ+KNJt4Me0nbSIf+EaEBIlFiSxezbLEojrXI58VIG/Y74yez+aVr84ErxAVJaHJExcwbnZPXpHu1HVC8V1Wi6yG1h5BwCUg7ktuVo4SjQ3kB+xX71jAzHfjjCbydWjLgTIaXUbP2cAxziPqmOqjahxqNBzJD4KzvvgzzTEOYcOpjBmmmlS7tUYhNFHBdI66dTdVBteTE1mgwKxWeAziTz/XP/UrUXSY2mNBEZJxr5/L/LsWS6FNmMEDy2ZO4+ClPY6OqPqc2Eje7DBYlxe9pEARk2srG69aO3T56kP3eGgml3VE4A4k809TZyYentAxjLLZnABwxXsJ0sKyeBHvzmwhDaQsvECxIv8YkNgSKTd5mH9YyAgxF5j4t5A0OJYuvrNddcQBtvlp0Km+XCoMQf03QX5tT0 Received: from [10.167.154.1] (037008245233.garwolin.vectranet.pl. [37.8.245.233]) by smtp.gmail.com with ESMTPSA id un9-20020a170907cb8900b00a384365e3b9sm562305ejc.195.2024.02.06.10.43.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Feb 2024 10:43:49 -0800 (PST) From: Konrad Dybcio Date: Tue, 06 Feb 2024 19:43:40 +0100 Subject: [PATCH v2 07/18] clk: qcom: gcc-sm4450: Set delay for Venus CLK resets Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240105-topic-venus_reset-v2-7-c37eba13b5ce@linaro.org> References: <20240105-topic-venus_reset-v2-0-c37eba13b5ce@linaro.org> In-Reply-To: <20240105-topic-venus_reset-v2-0-c37eba13b5ce@linaro.org> To: Bjorn Andersson , Michael Turquette , Stephen Boyd , Philipp Zabel Cc: Marijn Suijten , linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, Bryan O'Donoghue , Dikshita Agarwal , Vikash Garodia , Manivannan Sadhasivam , Konrad Dybcio X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1707245017; l=1261; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=hNpPMHDWoOMTbeDBm7it/X/QFrunF620Ewnj+Kcxsr8=; b=f80sDBRtJTlp1b8hWBFK0RU641PLMr6/l0nYv4kIqYmXYXY/Ih5z96kTOSuNVwy0TeNwqWR4Y wKfAWeK3ETFCYzaP10y2a7Xyuby63Ix93i6/cFDuCx1GtLfJ4K3pHN2 X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= Some Venus resets may require more time when toggling. Describe that. The value was obtained on a best-guess basis: msm-5.4 being the base kernel for this SoC and 4450 being somewhat close to 8350 which is known to require a higher delay [1]. [1] https://git.codelinaro.org/clo/la/platform/vendor/opensource/video-driver/-/commit/dfe241edf23daf3c1ccbb79b02798965123fad98 Signed-off-by: Konrad Dybcio --- drivers/clk/qcom/gcc-sm4450.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/clk/qcom/gcc-sm4450.c b/drivers/clk/qcom/gcc-sm4450.c index 31abe2775fc8..ab8fb77d15a2 100644 --- a/drivers/clk/qcom/gcc-sm4450.c +++ b/drivers/clk/qcom/gcc-sm4450.c @@ -2791,8 +2791,8 @@ static const struct qcom_reset_map gcc_sm4450_resets[] = { [GCC_VENUS_BCR] = { 0xb601c }, [GCC_VIDEO_BCR] = { 0x42000 }, [GCC_VIDEO_VENUS_BCR] = { 0xb6000 }, - [GCC_VENUS_CTL_AXI_CLK_ARES] = { 0x4201c, 2 }, - [GCC_VIDEO_VENUS_CTL_CLK_ARES] = { 0xb6038, 2 }, + [GCC_VENUS_CTL_AXI_CLK_ARES] = { .reg = 0x4201c, .bit = 2, .udelay = 400 }, + [GCC_VIDEO_VENUS_CTL_CLK_ARES] = { .reg = 0xb6038, .bit = 2, .udelay = 400 }, }; static const struct clk_rcg_dfs_data gcc_dfs_clocks[] = { From patchwork Tue Feb 6 18:43:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 13547702 Received: from mail-ej1-f48.google.com (mail-ej1-f48.google.com [209.85.218.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D1773182AE for ; Tue, 6 Feb 2024 18:43:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.48 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707245035; cv=none; b=MzhsFQOtBXgYBGtws4ZX2e3JGqhlvuIg8PM0dL++aB/KcX8vU/WyDZF6X4Q9h6mt0t66o9JPRjAPg50wywd4OqKgiGeOtKnDF7rW39fY+gBkBXx/ATnmxvbIciHY209mkjiiqeGOhWMtB7IwJBqXUwefQeGFMRUAHcxJiWA7hUQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707245035; c=relaxed/simple; bh=EXwKkMgBsd8MhiHSlPwnGXPooFCi9B6+ZF9m99buTKM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=gfc0w1t0BMuDheX+ySBvhca0uO0nRX9JNE+h4CL4bUoykiirMRgPpuifoRl1brillwJnqp/KdPDwWvcm+DFI6pkD2bmKXElIxiwhopFjs4SoalTzcAGCsxLEGGW3iT2fEmZHmfwIQbvwd5r3UK48cxQEzpkhSrYQ6ORCxWZQ8fY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=zcED3LfK; arc=none smtp.client-ip=209.85.218.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="zcED3LfK" Received: by mail-ej1-f48.google.com with SMTP id a640c23a62f3a-a2f22bfb4e6so783320966b.0 for ; Tue, 06 Feb 2024 10:43:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1707245031; x=1707849831; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=Rt7VV0Ge1sC3yLt62kaXgrxl4JcnOpSTrN15pKlZhq4=; b=zcED3LfKRNHgGI+xAuGGM/Rj52WvA4O9WC7K4+HYfPUbjg51eM3smZBuVD4JRY3vDM AWCGNwgtigG9YTcElv9ShdtwiF8DK7mPLi12TjRlyeIDxIRpIFVYgkzW6rfRriqiXs1x CQV5NNDIrg9Jmq3pob9YNOSK5jRJnYujKDQmaNHMcILCrYhQQnX5kvMXX6+v3Iqr9L9c Ce87c0/gyov013hOaHI3iaJafLuuRY/CjJhbWQFTtuyz3hQ30jU0gHg7qg0KzLPnmIy6 9ScJfzBhUvuyAFHxcSxjBNc/rcf0WgA7f70RyLv7nVO37L5bqOHCjhwW2p1zezIkmrST y1XQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707245031; x=1707849831; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Rt7VV0Ge1sC3yLt62kaXgrxl4JcnOpSTrN15pKlZhq4=; b=l188brTq2Mem0+oIeF+TfEFtqEsl0e06K0tX5A7oBmUcuft8tLNsnq5JQCvNnUXKlk pQ0PLm4KX0g9z53HC7obkQT7tg5ujcTJDQyWm43JzSdIqQfPzdRbs3ZQd4tc7dsASDX4 wxYbGx1/reW6nFq/XD5/TtKLBbD33FsQY9Skfo/VBwq01IX6jUrvWSZ7EeCEhOkMYpBY bgJSgpyUobszmiu+/ZblF1bL2DhjCJiCOfBwrtDOv8G+rdzxW8ug14ZTI48+mM8U9gLW dMp70nbm+Fgqv7lbXKCFMnAoqz1gnws/u4zD5rbHMgGZTCriKnHSESS5qxKwSX+/ChEK OTYg== X-Gm-Message-State: AOJu0YwHFtwNijEFR2H0k2KKah0MpJwiprpQi6VmtAsZT7f/KKczRi2j Fn/Lx3eqUuG0sJJLdKm8dBLrvfLq52yEkgaRU0N13EfQ/OfbexJySsx2smTWd+g= X-Google-Smtp-Source: AGHT+IGLfPHIcth7V1P8PHbajyViGTDYG4qmty2wAY9eOATHRzTNHZtvs1iVdBf+F24UxgSsQgLcxg== X-Received: by 2002:a17:906:191:b0:a38:53df:4c5d with SMTP id 17-20020a170906019100b00a3853df4c5dmr556223ejb.34.1707245031242; Tue, 06 Feb 2024 10:43:51 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCVHrf5Y2GiDBabUY+/8vt4kdCuTVp1aDu+19FnW5BYlpFBCOQEcJdG9Ji5bo2AXr7jcBJYiBt3NNLv4roYU2UTqkXfgnZyiDIdlM62GxPp+gesRznRiJg5x5loFV3tkulS4hMb/UP6zMhwmDeXakAibCSsI1FMt2VPJJqo+h7foAZdUB0Qa/mAopZEFSh1SrXz2EtkMy325uRh79nvNMCIyRhnacAa8W2wZ1+n+QcHdVkeLm40ITmRtUQU9dxLWZot4d52YcH8GWJdSAzmrm9pONdyBIxlNKLdjV4UDZm+HKvt121wXxe4pCad1pUZCDSzXzm3m+EUnmtoX8jT/ZykkXMiiGZm0p6SoyvK/EDWBYBxjV2ziF4WrEILR21IWFf+oh9WXRNqPKmLzjHYgKBVOLYfgB/LX2BmAGnIeY4NnzUbdpZ+wxZIgrcZqRPtWaThYixyRX6U8 Received: from [10.167.154.1] (037008245233.garwolin.vectranet.pl. [37.8.245.233]) by smtp.gmail.com with ESMTPSA id un9-20020a170907cb8900b00a384365e3b9sm562305ejc.195.2024.02.06.10.43.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Feb 2024 10:43:50 -0800 (PST) From: Konrad Dybcio Date: Tue, 06 Feb 2024 19:43:41 +0100 Subject: [PATCH v2 08/18] clk: qcom: gcc-sm7150: Set delay for Venus CLK resets Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240105-topic-venus_reset-v2-8-c37eba13b5ce@linaro.org> References: <20240105-topic-venus_reset-v2-0-c37eba13b5ce@linaro.org> In-Reply-To: <20240105-topic-venus_reset-v2-0-c37eba13b5ce@linaro.org> To: Bjorn Andersson , Michael Turquette , Stephen Boyd , Philipp Zabel Cc: Marijn Suijten , linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, Bryan O'Donoghue , Dikshita Agarwal , Vikash Garodia , Manivannan Sadhasivam , Konrad Dybcio X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1707245017; l=1091; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=EXwKkMgBsd8MhiHSlPwnGXPooFCi9B6+ZF9m99buTKM=; b=5v2USoyqmz+31QwL5rklkv0hk80+UpMpJDRSY6WqLzqv1L+b6x6kof5JtwD1gvITaGLk1Q1Bn UF2KxonNmu3DCGXVaEhn5mnHhFxkmTUBqcgxevSC2cboEDLKEmDAwDO X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= Some Venus resets may require more time when toggling. Describe that. The value was obtained by referencing the msm-4.14/19 driver, which uses a single value for all platforms [1]. [1] https://git.codelinaro.org/clo/la/platform/vendor/opensource/video-driver/-/blob/LA.UM.9.15.c26/msm/vidc/hfi_common.c?ref_type=heads#L3662-3663 Signed-off-by: Konrad Dybcio --- drivers/clk/qcom/gcc-sm7150.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/qcom/gcc-sm7150.c b/drivers/clk/qcom/gcc-sm7150.c index d9983bb27475..7c5596331c30 100644 --- a/drivers/clk/qcom/gcc-sm7150.c +++ b/drivers/clk/qcom/gcc-sm7150.c @@ -2918,7 +2918,7 @@ static const struct qcom_reset_map gcc_sm7150_resets[] = { [GCC_USB3_PHY_PRIM_BCR] = { 0x50000 }, [GCC_USB3_PHY_SEC_BCR] = { 0x5000c }, [GCC_QUSB2PHY_PRIM_BCR] = { 0x26000 }, - [GCC_VIDEO_AXI_CLK_BCR] = { 0xb01c, 2 }, + [GCC_VIDEO_AXI_CLK_BCR] = { .reg = 0xb01c, .bit = 2, .udelay = 150 }, }; static const struct clk_rcg_dfs_data gcc_sm7150_dfs_desc[] = { From patchwork Tue Feb 6 18:43:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 13547703 Received: from mail-ed1-f42.google.com (mail-ed1-f42.google.com [209.85.208.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A44341B297 for ; Tue, 6 Feb 2024 18:43:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.42 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707245036; cv=none; b=F9UV3ZX4QjxmauI0XXfd0jcXTaX4bmVdnF16cIlAWTURoAK8WPpAUfJjCjYpaC1Wbt76O4I9VT82Zuj1s9HeKQbw2+IbYvsfs7V/DpzRZq5b5QzXDrY7dp++gSQlYyXCObjnuxR25Zib/odQQnMuRyLdqHiYxSeWnBcmM7AvM0k= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707245036; c=relaxed/simple; bh=Um3XHTCPqPzKjXY4QlaL0lzOw9Adn3IKIs6tquKWAGg=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=LdMk+VLCTpIJVyg+YDGp7+/yRUPMfCp3GHXC3h7IURB881ZgU83UwhmlA3qOC20cFDtfnVQxPqfu3H9W1NwG/3vkuT8E5WFGFdm514JTSqRGwVmx/kd+b5aVxqtHTOgTlQC5fUh84Z1MPhe2HXfXkfhcAq0qq791FM9niu0YYdc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=HMZonAVv; arc=none smtp.client-ip=209.85.208.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="HMZonAVv" Received: by mail-ed1-f42.google.com with SMTP id 4fb4d7f45d1cf-55fbbfbc0f5so1669209a12.0 for ; Tue, 06 Feb 2024 10:43:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1707245033; x=1707849833; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=sx2jWOy3+mcft3g2k461xAsra2Zzmr6pjNDzJKoJgMQ=; b=HMZonAVvSxziRwXXY2E77c9gtJKwpXLP48NaGhCN7hA0onOURTAN/QeNJm7l1ddRgD 6Clj3GNKFBkxJVmCZ7HX0biBdWQmstEgCSrF6WM84OT+1Tt5WyyGqmcEeVApUUbDJ+je rBMAj0qjSkS1xD3WJZKhudwGKtI35Y6in1TlRonDyMj7VZt5HXhMSGbSsOotsrzKDpdX OOucltMXx5/qy6cmSw6UX98kzU4XXWfTnuzD0fX/bTMtKIZf0sJmAHstNjfSyCNMLsjM zRGXruXzhMuW7pb55yCuGzOzDXnlunghr/q1eURriMdkGKDuNnutJx0PJx5sAgtO6H/4 Xx2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707245033; x=1707849833; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=sx2jWOy3+mcft3g2k461xAsra2Zzmr6pjNDzJKoJgMQ=; b=HZ1xNScWFUs2+igPlDEedXoU62La9bqKznyXffEMZ/X+nBMQfn+BU2Vicox7WooQ73 0Dgb8LVlbqKf1n0Lx9ZDWvI+p1YpcYE7Lp3B0gsVTez+80BnuBRg5S4oxgBaxYCTPr/k 8IJBlaK51+NCye5w1n4xUsp3xBqG83Y5ur7KZtwzKjlxpcIXkS1c52kngGPTVA6bxdLd tdc6xYmFpEjCY+bORsRNnHZ9SGdYxBFQ54LI7OkHbwbURqFqWzq16xOqdQefSYD6mNh3 95jkmfl9ijMPnBv+cgYLjngkgfEBH/UYsHUoq+bVkVGJVZrbl6D/exPy7YPN450QOATa 4jfw== X-Gm-Message-State: AOJu0Yy/D8MKK3Zu4OGYYgWyF77GYXLfUUD0NRd/1TUtIzctxG4JEqLP ql8CrXz/uOrnN7sLdOUCL8RnnqpKbmbdCL6N/cFKAX4sttWJq+po6KHdI5oTSjA= X-Google-Smtp-Source: AGHT+IHdgIMDLE+qw3jwrHAaomcUMXOC4b2jvJ1Pc5h7C6eE7EE+S7xI2quLCslWdMEmJbGAs3+Usg== X-Received: by 2002:a17:906:4e8b:b0:a37:687:275c with SMTP id v11-20020a1709064e8b00b00a370687275cmr3895790eju.20.1707245033098; Tue, 06 Feb 2024 10:43:53 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCWf0xsvKto8gDTOhhkvQRLi+YvCUaDUUyZbwlbZTXzQ8pksP0S6iOjf7HSmedSdJerkcvnapbXfIgNEQD2dzCLKV3Q1IjjCemsiuN5p56++qSGgNmQEjffa4dNgdP4ACUDSTG+jm8g87jmkHTNy9qYiJHn9/FNgXvXQVr8/rx3L3Jfd/o0sgzur5xLR0mfmNeV9NdLSWaGXSU1FKbLBJoyn2Ekk9jpYgRfgWZDOj2O4tfrDOt9nTwCG6VjcHZl9OXe7DFeQirdiji2YSGJc1gIsgGBYfwWmc8jSnoUWU80RD6EfQppGNXUEaPK1A1tMJksq9tNYK8R4yrel8uEY+POcoZcUmVCv/BNUEIEhPCHFVemqS+M1LRdeoem8CuK2xIfPF94WTc3sByFGNDcfM8/SUmt2xOxxImStOsFbG7uLEFo0fF7gXKzPrXj8gB3XbXbP1yLHeL8M Received: from [10.167.154.1] (037008245233.garwolin.vectranet.pl. [37.8.245.233]) by smtp.gmail.com with ESMTPSA id un9-20020a170907cb8900b00a384365e3b9sm562305ejc.195.2024.02.06.10.43.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Feb 2024 10:43:52 -0800 (PST) From: Konrad Dybcio Date: Tue, 06 Feb 2024 19:43:42 +0100 Subject: [PATCH v2 09/18] clk: qcom: gcc-sm8250: Set delay for Venus CLK resets Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240105-topic-venus_reset-v2-9-c37eba13b5ce@linaro.org> References: <20240105-topic-venus_reset-v2-0-c37eba13b5ce@linaro.org> In-Reply-To: <20240105-topic-venus_reset-v2-0-c37eba13b5ce@linaro.org> To: Bjorn Andersson , Michael Turquette , Stephen Boyd , Philipp Zabel Cc: Marijn Suijten , linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, Bryan O'Donoghue , Dikshita Agarwal , Vikash Garodia , Manivannan Sadhasivam , Konrad Dybcio X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1707245017; l=1210; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=Um3XHTCPqPzKjXY4QlaL0lzOw9Adn3IKIs6tquKWAGg=; b=V/zN5DGxKHRNUqW9xIcpmoQbVyk8TUrsM4Bgad0H4xzD6h7GzxAQn+4hIs0phzgj6rlmWZ0lo PAG4qSv/eiqBe/BhYdE93BqftCEUl87uipHK2YVu2f+fyyqH44SPhlT X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= Some Venus resets may require more time when toggling. Describe that. The value was obtained by referencing the msm-4.19 driver, which uses a single value for all platforms [1]. [1] https://git.codelinaro.org/clo/la/platform/vendor/opensource/video-driver/-/blob/LA.UM.9.15.c26/msm/vidc/hfi_common.c?ref_type=heads#L3662-3663 Signed-off-by: Konrad Dybcio --- drivers/clk/qcom/gcc-sm8250.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/clk/qcom/gcc-sm8250.c b/drivers/clk/qcom/gcc-sm8250.c index c6c5261264f1..61d01d4c379b 100644 --- a/drivers/clk/qcom/gcc-sm8250.c +++ b/drivers/clk/qcom/gcc-sm8250.c @@ -3576,8 +3576,8 @@ static const struct qcom_reset_map gcc_sm8250_resets[] = { [GCC_USB3PHY_PHY_PRIM_BCR] = { 0x50004 }, [GCC_USB3PHY_PHY_SEC_BCR] = { 0x50010 }, [GCC_USB_PHY_CFG_AHB2PHY_BCR] = { 0x6a000 }, - [GCC_VIDEO_AXI0_CLK_ARES] = { 0xb024, 2 }, - [GCC_VIDEO_AXI1_CLK_ARES] = { 0xb028, 2 }, + [GCC_VIDEO_AXI0_CLK_ARES] = { 0xb024, .bit = 2, .udelay = 150 }, + [GCC_VIDEO_AXI1_CLK_ARES] = { 0xb028, .bit = 2, .udelay = 150 }, }; static const struct clk_rcg_dfs_data gcc_dfs_clocks[] = { From patchwork Tue Feb 6 18:43:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 13547704 Received: from mail-ej1-f43.google.com (mail-ej1-f43.google.com [209.85.218.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 08E861B805 for ; Tue, 6 Feb 2024 18:43:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.43 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707245038; cv=none; b=rEAi1CQcDGmotfHNd4zJh0jhCoMN8t6U6kCoO+cAFRgUDH4RP6vTIYTtsgwY9li+axJ9rECxGZ/EGLo81cefnglq2Mnq2oitnde0CqTzD3qIPbCNXSxOv2EIlCG0c5LatdEqc6j75VYKEqo5Hp/1jnpCxI6F8mKayRWjJMBDsvw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707245038; c=relaxed/simple; bh=7ZxBeTpI7rU3/jGQrGYsBGxNSFTwMdNCV6VkV77JbJc=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=BJdwufDgA1wavinBm5eqqWOX0pCeDXtFvSPJVwNSQB5H1Z014d/mCo+A/yNmlBSc3d90jmDejE01ttjCZVVI8XvxepIokzElz6aTDF4JR/rX7o56JDC4ss4oU3hk7vL6fpDhslwjZjEre93cIdpJYglcomp44j8mM77iY6B8MLo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=U8YB1/Sb; arc=none smtp.client-ip=209.85.218.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="U8YB1/Sb" Received: by mail-ej1-f43.google.com with SMTP id a640c23a62f3a-a380a1fa56fso171162166b.0 for ; Tue, 06 Feb 2024 10:43:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1707245034; x=1707849834; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=6JFIAAu62FuQn/HSZ5tKqmYhrMc0VqNnJVz9VNDCrjM=; b=U8YB1/SbcajaNo6MtJJPaP7bx7DCjn0g02KnCGkLTRlmLFQHGLcWP2BRhMXZfH2Tnw TG66AM7XS9/oxglXwdq2uyM714U5w3OmMoGsO2938GynQeUBPFFdTjkybPy3yfO+s8Bs UbSXSAW/OFkO5cuUl6chYgoteaBmCFKFK7Oog5ik5w/OwZ5F5hl5pSMswmShMyuCFCqo mu9T/JJqvf2V/xd0FUCX4HmNTwE+nICu1YugobOn6RUiBremDZDh6oflwcprncmeHBBG QfVbtUGKY+csQe7jhEBiuwONOHoW7RHJKEs1Tz9gFHmo65Mf2s9YNNkSlu4MQvVhpMHH ZxpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707245034; x=1707849834; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=6JFIAAu62FuQn/HSZ5tKqmYhrMc0VqNnJVz9VNDCrjM=; b=niyC1DXvljJeU5ok4knKufnAI5rC5U60CHlo74kWmj3wRgfRaAEhlh0UrapP/SLYdg prlb8O11wt2+ayLKBO+7SiYHF1FPohV01BPuTBtcf6m5e/kD+/dvJ9yG9YEfS8telCFF IBRHV3fCg1bqA0TIS2dPhRJMGlZJDILbUz1k+5LTOcKb8cGzKTpwTgy96rrqTwgaTkKx kzlcd0UzG5W9tq27RXQZQWpeOzHdocl67wxqQxAMfILFOw9dDNdYjkyF+eE+BHZ4P4Zn Tsbd+gGzlXZP1JruzGH7Xj5PPa6ttO35DOpNODX3FW3cRl534NLpQWGXdAtvNBizwfNY sXzw== X-Gm-Message-State: AOJu0Yw79Ti+ygAY5A+xs55msphRA6djU8pGjdp8Pu2cgE0L+Y38gL11 LF4mzdzYNujhn1glT1zyTHFjGg/g++Al+p2YXw4OGLsIaYZal/d9UUVcfPvN3Fk= X-Google-Smtp-Source: AGHT+IFRnU7S9WuINV3NhaAKT2gjDWTwPGpFeNX4WG2QF1077VknapVFzp8zFOquS5VGWgaguqZCwg== X-Received: by 2002:a17:906:3297:b0:a35:b59c:fc04 with SMTP id 23-20020a170906329700b00a35b59cfc04mr3562614ejw.25.1707245034391; Tue, 06 Feb 2024 10:43:54 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCU3GW7DesvZfeZqzLXJ9bmcXbGuiNMy3LJq+VOD/cMGEPUlLtDY/ddOTJAliMHrcBDDAz2a6vd0Iij1ilRqUNdnK4nToxkPvOM2ID/b67mvZbZvKnSObM7cwpHAvnAUX2QwJ6AVvoV4q4PNRXNqD3ZAbpBWrCzoc9uhCY9uuzufzopIF7Pwri/sIspnjvVXd0Fmc2I0pfIgeYj0Jv22+T+oFO9p03oqvCLgpJ5LRLOIU+pvv15CuSAqna0R87VuBdR7R21jlXfGHAdbXEbeEfVh/9b61KoQjNHA33HhjYBkSXBPlZEMATZ7Nt+jSnD/V7vsH0sNLCBRLVVtlS3w9pdh6tJKLrEuEExVL4rftP3DQqIgdlP88q9AdPoxmSX6pB5FcF3jdCRRHSh8kAx4+MHEWn93+DiQKqI5NbFn9FUHGTMWPlIDHtQQ6Cq4BQwik+5GlUJRVcew Received: from [10.167.154.1] (037008245233.garwolin.vectranet.pl. [37.8.245.233]) by smtp.gmail.com with ESMTPSA id un9-20020a170907cb8900b00a384365e3b9sm562305ejc.195.2024.02.06.10.43.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Feb 2024 10:43:54 -0800 (PST) From: Konrad Dybcio Date: Tue, 06 Feb 2024 19:43:43 +0100 Subject: [PATCH v2 10/18] clk: qcom: gcc-sm8350: Set delay for Venus CLK resets Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240105-topic-venus_reset-v2-10-c37eba13b5ce@linaro.org> References: <20240105-topic-venus_reset-v2-0-c37eba13b5ce@linaro.org> In-Reply-To: <20240105-topic-venus_reset-v2-0-c37eba13b5ce@linaro.org> To: Bjorn Andersson , Michael Turquette , Stephen Boyd , Philipp Zabel Cc: Marijn Suijten , linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, Bryan O'Donoghue , Dikshita Agarwal , Vikash Garodia , Manivannan Sadhasivam , Konrad Dybcio X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1707245017; l=1113; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=7ZxBeTpI7rU3/jGQrGYsBGxNSFTwMdNCV6VkV77JbJc=; b=IjZM3jN5XHZrj5wc5iXTiZuKe8lstZqNruPJ13n3kYfjb61cQtY0BWSyA+c4+SNxU5Z59zsEl FFlmLMVgijVBk9qV7fgkaVVVDBpl/9tfRtod4o1RKlRwx1jwkHM0HHx X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= Some Venus resets may require more time when toggling. Describe that. The value is known for SM8350, see [1]. [1] https://git.codelinaro.org/clo/la/platform/vendor/opensource/video-driver/-/commit/dfe241edf23daf3c1ccbb79b02798965123fad98 Signed-off-by: Konrad Dybcio --- drivers/clk/qcom/gcc-sm8350.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/clk/qcom/gcc-sm8350.c b/drivers/clk/qcom/gcc-sm8350.c index 1385a98eb3bb..df4842588a24 100644 --- a/drivers/clk/qcom/gcc-sm8350.c +++ b/drivers/clk/qcom/gcc-sm8350.c @@ -3743,8 +3743,8 @@ static const struct qcom_reset_map gcc_sm8350_resets[] = { [GCC_USB3PHY_PHY_PRIM_BCR] = { 0x50004 }, [GCC_USB3PHY_PHY_SEC_BCR] = { 0x50010 }, [GCC_USB_PHY_CFG_AHB2PHY_BCR] = { 0x6a000 }, - [GCC_VIDEO_AXI0_CLK_ARES] = { 0x28010, 2 }, - [GCC_VIDEO_AXI1_CLK_ARES] = { 0x28018, 2 }, + [GCC_VIDEO_AXI0_CLK_ARES] = { .reg = 0x28010, .bit = 2, .udelay = 400 }, + [GCC_VIDEO_AXI1_CLK_ARES] = { .reg = 0x28018, .bit = 2, .udelay = 400 }, [GCC_VIDEO_BCR] = { 0x28000 }, }; From patchwork Tue Feb 6 18:43:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 13547705 Received: from mail-ej1-f52.google.com (mail-ej1-f52.google.com [209.85.218.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 47D3D1B947 for ; Tue, 6 Feb 2024 18:43:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707245040; cv=none; b=A40SEOKnAafkiJciAsFJPOVCEhVx6t+NHHaEGQpf0Ngw5rVuA54C+AgyMirCTBE45GmaDSe1+JguMaQELcTcvRXonjV+JeTBg1/T7MNVxUyE2j9jh70YRxFlIDShf+DH89mAj9qg/VQ+QeM1BxT6SEdM/sv4DRotDeXgzNgyGBw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707245040; c=relaxed/simple; bh=MVwKMyl639pfSSp12W8ZsSkDXB3e+0oIGZYQAcJEWn4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=C4w9WvceALjQA3wbKmLiG5kMnwos6p2SSmOyP6gJ5ebhp8BkVtNgP+dJTMytNZRbQfVz9q0VsiOIwmFvEuBd9nG9pOeMCYlupIbQC+5hmLg0W8mcBRRfU0MKqRtRI7f3S/+xfioLqxThZBOMDln5OY0DvUYSMeirZjcPLe/Ctd4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=euIvd72z; arc=none smtp.client-ip=209.85.218.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="euIvd72z" Received: by mail-ej1-f52.google.com with SMTP id a640c23a62f3a-a37878ac4f4so349908466b.2 for ; Tue, 06 Feb 2024 10:43:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1707245035; x=1707849835; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=B1iY3/5e1vVwTp9GAkTk6iF085CLAD1vcMZhFA07ufA=; b=euIvd72z37mvmr7a2/GiUUpDaQ9nvm6BKImV/VSX/V4h5tHIxf6vFgBqhIeKOi3JLW WDHZH4MjORqjEUEz8XjGkLcQ0m6ZL+q/73kx8JbxkoeZDwHUzVK5oMEHcF8Pg95tad+J /f0y/Fm5vRQtuROxH0QqvGJxxdGbf3SGuchvvpFKYIafQKPY/z2o2dZWQPkdz8t1jx4V B89Ri6oZMnIXA4yUvLIuMXBUyNQYZ9E085dLKAEN4uoWbkyAEwvRbJId9I8179r37L1F 3Ea+kF7/q4ivfX7c2W9/XJCt4utVBq5P/TVFcWXh8jZ84RZtvkQi9ZqAjy5VkI+2+gaM GK5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707245035; x=1707849835; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=B1iY3/5e1vVwTp9GAkTk6iF085CLAD1vcMZhFA07ufA=; b=c3swwOntFadkuq/xXT3N/XA9UM2peeqAt58xl/Kbz5nlWvfkvmMinBrxTcIQPuUceG 1INsJaKu/DJ8soWbGJATPqZFRl2THUX5e9npQEN2w0ERE7ircGI7Sy9AtF60MYlNsxun 1kfXi+eYgKCqJok9qq3s4E01NM/61Wi4yrl51dTicAHHuzODw0W8/r2/DNdCf+TnxeBF YvB3yhv6RC99QUfbphRujCZHd1xlbfD0D/aDjzTlKC6W0SSNTL4tTfvhtPEpb/pUyfRd EgXOVBFVjns/+5DOgBp9NOJSz3XIQznHv+IXcq9NS+e1pcQkJQ+n2oehZZbTnAuD/JSK yzRg== X-Gm-Message-State: AOJu0Yz7MzZQ+7HTeSqAoxPFktBnK0+FbFtdIypYN7xdlBva31KwzHA3 ymGaaLOpnhcLS4XSc7XlY8kIgwKvCSUyJLwOp7m4Wh/OQajE+DL8dPlFDI2ZmZM= X-Google-Smtp-Source: AGHT+IFXZnNdvjQhBhhzhvuBB7qAUVEaTm2wSqzeYCTFnPSXWnZYiFNDajN85a53sow3DUCPDc6nGw== X-Received: by 2002:a17:906:5ad4:b0:a37:b795:264d with SMTP id x20-20020a1709065ad400b00a37b795264dmr2605624ejs.57.1707245035596; Tue, 06 Feb 2024 10:43:55 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCWMjlpNtix6mgvC3tfpf/8y/JqEIom7qxcpy55JwHa4+w4vvKy2LExr5+HSHQlm/nxjrAdoWIX135smiu6gYZVJigacTT/0S8yp7xSMspA2Bi7RjjSnIvcR6uw5Z4ynP27YM7RNhgjBDN98vXjygJW61PcX7MqbHfct2W4Mb4BUJzJFMOfWvZ5gf7OTrDmJesx69f78MDgou9fS39CeowLJvQJIO9SRokW083rA6J4DGtwI7Hm5jYlthgPJ1jwptHUyX7eIeGlo/+3NOMdW2Z6AV47R5V7xorYnuwzUEZ8pqNpMk+qH65ZMk0iMqs6yFm4zDXCdO/PsE4qusQri7Y4Lo/q9IlRjZsj4KETuMWBkcZuXp+lwSS7ihea7Xp7kxpXfFeySjWSyUD2+3Xk92zYD6Fc/nT2IekKyJWYoby5/21XWSlhySdxc40Retexm/uJHyTWiPwLg Received: from [10.167.154.1] (037008245233.garwolin.vectranet.pl. [37.8.245.233]) by smtp.gmail.com with ESMTPSA id un9-20020a170907cb8900b00a384365e3b9sm562305ejc.195.2024.02.06.10.43.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Feb 2024 10:43:55 -0800 (PST) From: Konrad Dybcio Date: Tue, 06 Feb 2024 19:43:44 +0100 Subject: [PATCH v2 11/18] clk: qcom: gcc-sm8450: Set delay for Venus CLK resets Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240105-topic-venus_reset-v2-11-c37eba13b5ce@linaro.org> References: <20240105-topic-venus_reset-v2-0-c37eba13b5ce@linaro.org> In-Reply-To: <20240105-topic-venus_reset-v2-0-c37eba13b5ce@linaro.org> To: Bjorn Andersson , Michael Turquette , Stephen Boyd , Philipp Zabel Cc: Marijn Suijten , linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, Bryan O'Donoghue , Dikshita Agarwal , Vikash Garodia , Manivannan Sadhasivam , Konrad Dybcio X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1707245017; l=1115; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=MVwKMyl639pfSSp12W8ZsSkDXB3e+0oIGZYQAcJEWn4=; b=WzApI+i5HPCSE0QP9FS1c4W2SGt6W8PgU1ss9ttY5Ud4sBM4SP+FzyQ+ZJnXqTpM3AZyRIN7e aQQNJissTeNASVyp8/0xSbNXuTmCUQi8VVR6PhVlJREXkKx962v1QBC X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= Some Venus resets may require more time when toggling. Describe that. The value is known for SM8450, see [1]. [1] https://git.codelinaro.org/clo/la/platform/vendor/opensource/video-driver/-/commit/d0730ea5867264ee50b793f6700eb6a376ddcbbb Signed-off-by: Konrad Dybcio --- drivers/clk/qcom/gcc-sm8450.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/clk/qcom/gcc-sm8450.c b/drivers/clk/qcom/gcc-sm8450.c index 563542982551..1825b3456dd0 100644 --- a/drivers/clk/qcom/gcc-sm8450.c +++ b/drivers/clk/qcom/gcc-sm8450.c @@ -3202,8 +3202,8 @@ static const struct qcom_reset_map gcc_sm8450_resets[] = { [GCC_USB3PHY_PHY_PRIM_BCR] = { 0x60004 }, [GCC_USB3PHY_PHY_SEC_BCR] = { 0x60010 }, [GCC_USB_PHY_CFG_AHB2PHY_BCR] = { 0x7a000 }, - [GCC_VIDEO_AXI0_CLK_ARES] = { 0x42018, 2 }, - [GCC_VIDEO_AXI1_CLK_ARES] = { 0x42020, 2 }, + [GCC_VIDEO_AXI0_CLK_ARES] = { .reg = 0x42018, .bit = 2, .udelay = 1000 }, + [GCC_VIDEO_AXI1_CLK_ARES] = { .reg = 0x42020, .bit = 2, .udelay = 1000 }, [GCC_VIDEO_BCR] = { 0x42000 }, }; From patchwork Tue Feb 6 18:43:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 13547706 Received: from mail-ej1-f54.google.com (mail-ej1-f54.google.com [209.85.218.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7FC841B969 for ; Tue, 6 Feb 2024 18:43:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.54 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707245040; cv=none; b=qXYTSTqhCsDSMX4f0Q6jUw5DeuwgFzB6YgziHamRpoO4MZ1VBbTUM4hXTXQ2Ku7etB83fVPiEzUjYOTWK1Utzh+xEo4K8PmGP5GBcsJqiBV8tuJvhxU0DBb1jFP6Cs36TNipoZyzKh7uEZhtG0tXqA7KXWW6nC8/H3ChwPeAPPs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707245040; c=relaxed/simple; bh=Wzt1u2nUXpu17TbhBAtUYSKbvWX7vxBCCMtjsfpido0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=ccYfBbqf0YY0v/zscy+/P3lEEvLgwBzipXCTJ+JMAKImAdMNFuzFw5Hc084vP+kAWvhQYmPSKXlJ+bv6wUl6W4fCcqksafWwmS4R7P9PvBkgEgJcZUho8n73GL5qU+mBs/aalqp9EZT+Kb8CmnmRMlz5+9B17+qy4b4OUVumYCM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=pGFSScWQ; arc=none smtp.client-ip=209.85.218.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="pGFSScWQ" Received: by mail-ej1-f54.google.com with SMTP id a640c23a62f3a-a354fc17f24so690892466b.0 for ; Tue, 06 Feb 2024 10:43:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1707245037; x=1707849837; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=JeqI4K6XpkMUVEuF0Qf5K9m4XIcii/fSlxfZsb36s+Q=; b=pGFSScWQsTUKJdYa+KHIZKth++r9izSrK876oy6C1iZkDjXkIW/DUL8ISm2F01Uz+7 hCQ7EX9+JSHMf0GRBEbX7Z7pfxoEqu9r3lxvwoWnG3jRmqMzu20pReQ9eWlnCDbZnqmg wY9zjWQ7D5bcnWZPKdPW1WN/a9GzQeOLGR6LBgS3WwqqtBILH6Ot5SbG8EM5dBMHSPzp xmPYZYc8h+baJgW0Peh8Pp62ccLEb0btRLjG0hcobNyq2wQhHochNzK46Q4Pl24WwQ/6 vzxyKtnRbfSY0/aZyl8dFp54BQH4DYIKBMHQpyjqx5PYZMI1nAzE+abewHcViV2tbqB8 t16A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707245037; x=1707849837; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=JeqI4K6XpkMUVEuF0Qf5K9m4XIcii/fSlxfZsb36s+Q=; b=j0TvnH2SUbmEa4SBFH3hnd7mYbHwBZSXwj/vQRNxzblctPsXwh4khKnyhhg/ucSmeB o6HGBPr4ruF47rsAsjRQO5ZZ33t0avaGEXWuerARmx2m24lHKn7/fWciSAgaE4c0bEKJ sWwJ8ZNifATmHvjTRWVux/KGyC4dLOsEQTwM0soembX9GlPSPqMQJCBW6NgI4xwDgSsl 6+liyHbSesyKAzygXKsgr/W09P1ArTvXUka21PWRYyvoF7lCg/f2hj5v2+1UQ9K2zl5u 957fgYFFA0qEiqlkYT0/X9gpnk4IJYE+sTANnYn0iVKFQncuULUJT7mnl8fnfvmIWGyR s3/Q== X-Gm-Message-State: AOJu0YzH/ebEe4A9EkfyNAX0riFQ3GAmRJuXkhiWMwm3Dp6VdWozxgFJ 4m5mpHjEd8mglhB8UaCMvJhblu150fyNG4LAfEacDKUO+rgdYLlHArWEJ+Vr7V0= X-Google-Smtp-Source: AGHT+IE0Bcbl4ouGIaXw6lKWZbbmLrV6tznq5JI5cVJtPSd87CRzvk4Xxe/3TXXMAHSmP4E5058j9g== X-Received: by 2002:a17:906:e2da:b0:a37:3922:8838 with SMTP id gr26-20020a170906e2da00b00a3739228838mr2607142ejb.70.1707245036907; Tue, 06 Feb 2024 10:43:56 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCWC3CrpRdnOTKl6LZR3TO+z2rNAi33UNYzq1ERwr1E+mbAMT6IehWKF4IEyvQIMeAiAh4WYKdgnIvJbdotgTZYi8iWdksvaoCHkvvh1c+WWfcgc6/0K7r0Ie9G69G4GRvPcu8IjW60+gPwQNIHvbcoJB5edBjNN7hOlNHmbniw8X/KUgQyM+aKyXxGhJK9EmetSufi5DVWjeCDuoT0UUo13DRq9Bi72ZxVctwMzi0Yivje2k+Iault+gFAVM//eJQLhT//udlWXP7fswIVqPVzb2+zB55nsJ6LxPzaiJE+rfBBYu8RG59PBpU/J0HykFjneT0s9tOYOWJn6BPTSTj7J82mwzwU9/WtUmIWpztlcjAOg6V+dc0royuHqZ1laROdzR9+nszzUBA1zeyYVh0wLeqFwQOUut20SGKUTJihe6wkDQvkkln7kpk/QlX2xKHx/fD44Gf89 Received: from [10.167.154.1] (037008245233.garwolin.vectranet.pl. [37.8.245.233]) by smtp.gmail.com with ESMTPSA id un9-20020a170907cb8900b00a384365e3b9sm562305ejc.195.2024.02.06.10.43.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Feb 2024 10:43:56 -0800 (PST) From: Konrad Dybcio Date: Tue, 06 Feb 2024 19:43:45 +0100 Subject: [PATCH v2 12/18] clk: qcom: gcc-sm8550: Set delay for Venus CLK resets Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240105-topic-venus_reset-v2-12-c37eba13b5ce@linaro.org> References: <20240105-topic-venus_reset-v2-0-c37eba13b5ce@linaro.org> In-Reply-To: <20240105-topic-venus_reset-v2-0-c37eba13b5ce@linaro.org> To: Bjorn Andersson , Michael Turquette , Stephen Boyd , Philipp Zabel Cc: Marijn Suijten , linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, Bryan O'Donoghue , Dikshita Agarwal , Vikash Garodia , Manivannan Sadhasivam , Konrad Dybcio X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1707245017; l=1016; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=Wzt1u2nUXpu17TbhBAtUYSKbvWX7vxBCCMtjsfpido0=; b=DcjLxfc2Cefhlse0tnRH627Hek7w2VYLS5W5OTY42IWK6t0FXg4QEljQv5cx8usNri2oN4Lv0 3lWhm18CbCxBHx8445DKFDmvq4sppy1LA9N/b6BLwI4eabVQtfAv8VS X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= Some Venus resets may require more time when toggling. Describe that. The value for SM8550 is known and extracted from the msm-5.15 driver. Signed-off-by: Konrad Dybcio --- drivers/clk/qcom/gcc-sm8550.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/clk/qcom/gcc-sm8550.c b/drivers/clk/qcom/gcc-sm8550.c index b883dffe5f7a..4cbc728f5c72 100644 --- a/drivers/clk/qcom/gcc-sm8550.c +++ b/drivers/clk/qcom/gcc-sm8550.c @@ -3276,8 +3276,8 @@ static const struct qcom_reset_map gcc_sm8550_resets[] = { [GCC_USB3PHY_PHY_PRIM_BCR] = { 0x50004 }, [GCC_USB3PHY_PHY_SEC_BCR] = { 0x50010 }, [GCC_USB_PHY_CFG_AHB2PHY_BCR] = { 0x6a000 }, - [GCC_VIDEO_AXI0_CLK_ARES] = { 0x32018, 2 }, - [GCC_VIDEO_AXI1_CLK_ARES] = { 0x32024, 2 }, + [GCC_VIDEO_AXI0_CLK_ARES] = { .reg = 0x32018, .bit = 2, .udelay = 1000 }, + [GCC_VIDEO_AXI1_CLK_ARES] = { .reg = 0x32024, .bit = 2, .udelay = 1000 }, [GCC_VIDEO_BCR] = { 0x32000 }, }; From patchwork Tue Feb 6 18:43:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 13547707 Received: from mail-ej1-f44.google.com (mail-ej1-f44.google.com [209.85.218.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0BE021BF2A for ; Tue, 6 Feb 2024 18:43:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.44 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707245041; cv=none; b=qWAdWb/VgUAaKvCKDNIFPaiYpQguI8WOTq5l29/2XCV4eQZJ+ZPFM+Qpda/lRW5WVQ8qyYZoYhOpmoSugPOccpoPZYN9cHAjhq0+vLxm6wkJeFhY0+5zddzqYK3RLh1kFgnX70KvZ8qmAzuTam5k+yM4EkY7rOXx7vEBBh8sbVc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707245041; c=relaxed/simple; bh=8KOUxxHlTkggQTw7pN3WXloq1WdTnUWQp8JLscQ7fqE=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=jR0yUMV7F+ZR+MIba5H/ioIyhod9xxpU2JOPfWU7iF9ljh3SUT4ToPp3jOWUqUEfB0hk3ti1yl2OyisrfQgCdUPpF5QbNhLnyzwzNKZznhYjPY8lIJWA4JIvoAbA1osKygcL3IDsxt2gqKsApogFqz93PnQLAEI/SZWHNRFOqkA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=BDvSG3ht; arc=none smtp.client-ip=209.85.218.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="BDvSG3ht" Received: by mail-ej1-f44.google.com with SMTP id a640c23a62f3a-a380c98e824so164343266b.2 for ; Tue, 06 Feb 2024 10:43:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1707245038; x=1707849838; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=NKzZAHgHTdg4BbNqiHqVVtnjbyCumYhOTEucfxgTrIw=; b=BDvSG3htV++/trWPPvgIPCvOpvquduoUWmpWZZjvevEw4/Q9dlGofCPWF0zU105y2N S1QNbmqbSboYeU3x0SKUZZg5nHhCY4qiii/MsWsvnDqntQ0jwR++jw4g6uFyS2R159fk 73H2uiqQ7AnvmKcprGgq7Z9vTGdPR0n+JJ4HaW07J/nBGqDq16qqIleltqQt4wbqNsXZ EjLWSc5HP6ichJqvZDYnyb61I3aF4bEMkh0WpgH/nVec97R1M+zj4wvDl5r+KPze3rMC YFj44hvtThJZHG7nM7D+uwI7/qE2arZd5SmWUQBD3TLDs1+qtyJBpm/aKi5h4kCYHZMd 6MIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707245038; x=1707849838; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=NKzZAHgHTdg4BbNqiHqVVtnjbyCumYhOTEucfxgTrIw=; b=OtZoAWgjSlOtzHsMbdH2byaHgbtdL3NUJjaQzn00y9Sgiyfo9TW14AaESzjlnz1fag zTOQlQ1ygVPCtiC1GZzaRo6mUkkE/o9pXSuk/akFhpcsuu4bcE3rTK1fTxp970YK21FN g5pC0c7gVXCmvzAJeeFjZKNDVYkIXrza4wCw9W+TZfjyOTGW9sQS/0Dp35EMh2/TZxNP NaUqCLU/ym7uw0NiTaGutJI0ehCT5kRPusG0DTFkjMFq048byxUJutGkfHJEjzzAniEA VSnpiWbW+7TlwfeeI3gUYYjrJzj6d1nl+D9bkcWAcDhS14jZ0ClBAaFZEstUB+tIWrCa hilw== X-Gm-Message-State: AOJu0YzRIlwr2PdK2vt+4IBoeyWqlM7SiYeByGlUNGK+PeQ2u6AmXEqA ZEE+AjuwfOtvLlKPYeJ4jFGFnLavFkjxYGnmoMonIR+FLHIBZd7MvDk9YbQjsahCaIXSpCeBiXG J X-Google-Smtp-Source: AGHT+IEpxaqbXk/sCzajWJj1TSeZlTVEf+GgKyUNCFgxhTbHZQMVybKGhSkVSF50B6HQQh9UUw/G5w== X-Received: by 2002:a17:906:6acf:b0:a36:c353:952e with SMTP id q15-20020a1709066acf00b00a36c353952emr2677030ejs.41.1707245038414; Tue, 06 Feb 2024 10:43:58 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCXNXsO2PoV0ZOcB7JTVIQvy680ITZXlBp7AmI9t5ymHnrrKMbUlXoqwCaNG0kQgk3RjxPJTgqoV5tRcCDwRRxQJBiLgBwvKo8VmdfoIBRP0Fp/5sVtAy06KldUaGyeEGELtSB95e1cVTMmYa521RO6u7uTXxPZapPCSKPaokxVJF84odL3XLAMCYLnM7siXsAs0M68Qf3evIG9D3F3Fr9VOo9Mr1STvixzR7YJLyQX9RXEZkF//Mao99kDUsYlq9C9xLV2DWWubZzYzpkQqDA4Vf7EbysNDWPmS95CMCDEBIxlVBhmN9y1baDRSnA1bJlfSi5Lykbh46WbJQPy5IcStjhGEMfSlT2aj96phzfDfBQNcKhb8WgrMEpL/H/6M7BqfBBG16jelpW4x0rJOebUWHriVVhH97+wVm7JBGOvBxUXg6z2JGoTRZQkMCP8GS5pIqFpZmVfA Received: from [10.167.154.1] (037008245233.garwolin.vectranet.pl. [37.8.245.233]) by smtp.gmail.com with ESMTPSA id un9-20020a170907cb8900b00a384365e3b9sm562305ejc.195.2024.02.06.10.43.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Feb 2024 10:43:58 -0800 (PST) From: Konrad Dybcio Date: Tue, 06 Feb 2024 19:43:46 +0100 Subject: [PATCH v2 13/18] clk: qcom: gcc-sm8650: Set delay for Venus CLK resets Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240105-topic-venus_reset-v2-13-c37eba13b5ce@linaro.org> References: <20240105-topic-venus_reset-v2-0-c37eba13b5ce@linaro.org> In-Reply-To: <20240105-topic-venus_reset-v2-0-c37eba13b5ce@linaro.org> To: Bjorn Andersson , Michael Turquette , Stephen Boyd , Philipp Zabel Cc: Marijn Suijten , linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, Bryan O'Donoghue , Dikshita Agarwal , Vikash Garodia , Manivannan Sadhasivam , Konrad Dybcio X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1707245017; l=1017; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=8KOUxxHlTkggQTw7pN3WXloq1WdTnUWQp8JLscQ7fqE=; b=y9cwir5KB6HgBFeoRBqgqFEwRDH0tpnirUD7O5WzDrrGFcovKkl6Ndal6mmD10FwERgIQAyvR 12wa8gOU6loCmR5UvcOT5Bz8D3paNH3ZrNaQMM7EnCvt+AP7Ts9U+n3 X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= Some Venus resets may require more time when toggling. Describe that. The Venus hw on 8650 is similar to the one on 8550, follow its requirements. Signed-off-by: Konrad Dybcio --- drivers/clk/qcom/gcc-sm8650.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/clk/qcom/gcc-sm8650.c b/drivers/clk/qcom/gcc-sm8650.c index 9174dd82308c..63becb03cd90 100644 --- a/drivers/clk/qcom/gcc-sm8650.c +++ b/drivers/clk/qcom/gcc-sm8650.c @@ -3734,8 +3734,8 @@ static const struct qcom_reset_map gcc_sm8650_resets[] = { [GCC_USB3_PHY_SEC_BCR] = { 0x5000c }, [GCC_USB3PHY_PHY_PRIM_BCR] = { 0x50004 }, [GCC_USB3PHY_PHY_SEC_BCR] = { 0x50010 }, - [GCC_VIDEO_AXI0_CLK_ARES] = { 0x32018, 2 }, - [GCC_VIDEO_AXI1_CLK_ARES] = { 0x32024, 2 }, + [GCC_VIDEO_AXI0_CLK_ARES] = { .reg = 0x32018, .bit = 2, .udelay = 1000 }, + [GCC_VIDEO_AXI1_CLK_ARES] = { .reg = 0x32024, .bit = 2, .udelay = 1000 }, [GCC_VIDEO_BCR] = { 0x32000 }, }; From patchwork Tue Feb 6 18:43:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 13547708 Received: from mail-ed1-f53.google.com (mail-ed1-f53.google.com [209.85.208.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 887161C291 for ; Tue, 6 Feb 2024 18:44:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.53 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707245043; cv=none; b=I+3ig2T+iD1U1urfEkN2AQYlHfQVtbjA2qpVcxprSLYBebxqOj/L8APQQ61mNRJC0RzDg841xTcfuQlxIFWWrJy+KHk+VxY4Q4PsM8LLKYkYvCdKXCLS/28lawat5ZYQN7pJ6j0qZzIBbMt7zhI4eaVt524s+8rSzh8hUSZY6KQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707245043; c=relaxed/simple; bh=z0UvCR3eA/Pj02vuX/VE6kFABcANNusSJTpXlxREtE4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=WqCkZ7EbdQvjxFRITS78/0fRTAAyj6ccfaKZL2q/CthHPVex4+nGd7QlS4ZJ3bZ9FlE3DIFPnaH6sn15Nv7sSxR0QCWISTpoMIWFezfB6+obrbTT3VIbCMp96FpkMKoXq38eAJZTepDiXWjRkapSX3ha3dkaB8qf18WgtcdGQiU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=kSNUn91d; arc=none smtp.client-ip=209.85.208.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="kSNUn91d" Received: by mail-ed1-f53.google.com with SMTP id 4fb4d7f45d1cf-55fbbfbc0f5so1669424a12.0 for ; Tue, 06 Feb 2024 10:44:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1707245040; x=1707849840; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=LTXMySSjM+TB9gHsIW2sZkrPWRgmdi9eib/Lrz67hao=; b=kSNUn91dCfpEHeuLWtzAYRP5N8N8b+NAYs3JHKfhb39UtLfNuoMDWm1untJxj4NW1x XLxZP9wv7I7FVfmgyvGOrOZcT5LqMenORW/YH9Lwfe2PGSUXkMZBqeU3WpESAaexhBSv dbbt0m7wXqrM3vZOp9JSgF4NHNmzG77RDXMbJuonlUH7UejWO2B/Pabate51LyNKCX0u SltzUj8tEZCt/00fc8mbnhxH9BMaXDVs+3QzSBt2Nc4C/iFF0jKlarksVsLneL/PY352 rUbd2l2iJZgt6ICegjRdO9naF/rMvbG1VGc3VzdXzLRVJcpZYZWBoSk+wvqxWM8ctcWn UKMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707245040; x=1707849840; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=LTXMySSjM+TB9gHsIW2sZkrPWRgmdi9eib/Lrz67hao=; b=Tcl3l6RnEZdwMWPsz/EpfjC/Uu4R26x9lBInxpavKqHvdeTqst7/8Gmhl7ymrT6sl7 lastx5S1I5m8xkKAR6Wt52d/mW7t5lMllyTGfqgOth/HLyzhxKeE0nwGmkTZJVGlpzwD TSvI4WGRzutvEzcwmBjzbitbd+/DGqs9Du35wL3AEelFVsQf311hc4OOkZPXrVLCxvtW /lRzGhD774cDlLzy35tB0xpAFf3luipnnZMpB2oVRl4alAQ9VBcPCCyeBcZ5gbdccn3t 6KjgYIKqFubdAtf9GvDKpsqRn+74pwuaSSl4kSVxmYatbo+TyufFj5UQDk20tHMv123d YyNg== X-Gm-Message-State: AOJu0YzFQVeGihyUpQ4zwnmkiiKFiyK8nz4LWdaQLkZT8+UyaPFS1WX3 X/H7LbvSuVn2zm8KyrWOmKShOQt/mqVAaHwpllVMQdzHrAHSaEF/wIKqqZianYc= X-Google-Smtp-Source: AGHT+IG5uMZMjX6h98nWMSRbSnIRSsKQ1Wi2SXVTsg+zAzkQdsMS+ErVE14TEWkjRXRbhkktBGBIrA== X-Received: by 2002:a17:906:c102:b0:a38:32bc:bd24 with SMTP id do2-20020a170906c10200b00a3832bcbd24mr2260583ejc.36.1707245039950; Tue, 06 Feb 2024 10:43:59 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCXhJSLgRrI+1tJO3R6fUdpSrGmCCIZjRlWz0bKqd1nMxD0oU17TOtxCG2zSkg1xGhZXlOZZTY/pHtkj89aemRURa4JINJndaRyzFAk3Iz8CKv/HwC6pMM8jqgDFpqn7+SS08a6mDmjymWE2uAlySAs8FwFMZzNNDsZkJemMydczdJNORe+U/aOKuuyak+rPW/FZVCCE+D8Kd7T5v6lTijQI9JbYZ4ziSJrhoH5t35VLbJuIkChisoOUt1O4dMMyw+ByzLXHgp1L4GiMelP7BgoYSKJ735TA+tUXPxEW+cNoqTbhaLxkGI9cweCAVy+zhgpnJl6MOKkD20CDaR8z3eqyrt0fx2Xv8IhlEslL8nfoOWjoW4uT9eEuFOIylUeK3zHrSAz7KXK0xW57Z/WqHzLyUv2Pmf4raAyI9KNQJE0HTgZrvnK70rnRAlSp3TwZSvHqIq+bOYTd Received: from [10.167.154.1] (037008245233.garwolin.vectranet.pl. [37.8.245.233]) by smtp.gmail.com with ESMTPSA id un9-20020a170907cb8900b00a384365e3b9sm562305ejc.195.2024.02.06.10.43.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Feb 2024 10:43:59 -0800 (PST) From: Konrad Dybcio Date: Tue, 06 Feb 2024 19:43:47 +0100 Subject: [PATCH v2 14/18] clk: qcom: videocc-sm8150: Set delay for Venus CLK resets Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240105-topic-venus_reset-v2-14-c37eba13b5ce@linaro.org> References: <20240105-topic-venus_reset-v2-0-c37eba13b5ce@linaro.org> In-Reply-To: <20240105-topic-venus_reset-v2-0-c37eba13b5ce@linaro.org> To: Bjorn Andersson , Michael Turquette , Stephen Boyd , Philipp Zabel Cc: Marijn Suijten , linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, Bryan O'Donoghue , Dikshita Agarwal , Vikash Garodia , Manivannan Sadhasivam , Konrad Dybcio X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1707245017; l=1115; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=z0UvCR3eA/Pj02vuX/VE6kFABcANNusSJTpXlxREtE4=; b=uwAcFMJiU9sa8CMjznz4S5ue15VbSRNhDDSuo3SKtpqPYbgs3tcYdBzNoRVm31F1Yprjuf7Kj pVU8qTsf3boC4aeZeNpffu5UHI33LrIK+c+GTrxq3Lb3JieCOC5auPj X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= Some Venus resets may require more time when toggling. Describe that. The value was obtained by referencing the msm-4.14/19 driver, which uses a single value for all platforms [1]. [1] https://git.codelinaro.org/clo/la/platform/vendor/opensource/video-driver/-/blob/LA.UM.9.15.c26/msm/vidc/hfi_common.c?ref_type=heads#L3662-3663 Signed-off-by: Konrad Dybcio --- drivers/clk/qcom/videocc-sm8150.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/qcom/videocc-sm8150.c b/drivers/clk/qcom/videocc-sm8150.c index f1456eaa87c4..bead5186a5d6 100644 --- a/drivers/clk/qcom/videocc-sm8150.c +++ b/drivers/clk/qcom/videocc-sm8150.c @@ -215,7 +215,7 @@ static const struct regmap_config video_cc_sm8150_regmap_config = { }; static const struct qcom_reset_map video_cc_sm8150_resets[] = { - [VIDEO_CC_MVSC_CORE_CLK_BCR] = { 0x850, 2 }, + [VIDEO_CC_MVSC_CORE_CLK_BCR] = { .reg = 0x850, .bit = 2, .udelay = 150 }, [VIDEO_CC_INTERFACE_BCR] = { 0x8f0 }, [VIDEO_CC_MVS0_BCR] = { 0x870 }, [VIDEO_CC_MVS1_BCR] = { 0x8b0 }, From patchwork Tue Feb 6 18:43:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 13547709 Received: from mail-ej1-f50.google.com (mail-ej1-f50.google.com [209.85.218.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 216E51C6A5 for ; Tue, 6 Feb 2024 18:44:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.50 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707245044; cv=none; b=MnpB55aFpvfq53jEg/Oh0lyduP1kaBuS4uyYtN37FnHr0bL1xq9epOwGrUxxZyaua7KkM+1OIkOiQOYJWaosa+2d+1W2DUpCxx6/S0Zq6Ck7wc/dzZt2pdoL2LMPFQRVFI9CyQTlJe+B4O3rapbn62daMx/jjSVdB8a0/jIty74= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707245044; c=relaxed/simple; bh=5OdGYFu9CqmWBKnDDTkTc56GjeP6hdEjM7fvhmV7Ho4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=dCJ3Wv8oS0/gDXBs8d/3cWe6YXau11ld9sUQpun6deRj9D1E9kQLR23L87L7U48DZ4soDRYuETxt53gyNf0IS+3vhLvWW+FphPsVaWRmaXBCP9t6+6w09kKntY6/PzxANw/RwvjESddVYicyl9MeRh7/6y+tGdXVWQqeEJL7nmI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=uEzQL6Jt; arc=none smtp.client-ip=209.85.218.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="uEzQL6Jt" Received: by mail-ej1-f50.google.com with SMTP id a640c23a62f3a-a370328e8b8so590596266b.3 for ; Tue, 06 Feb 2024 10:44:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1707245041; x=1707849841; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=nkL4G+TELyncGb5qKRgsxW2VVdhetXIx83/bDt+aWkA=; b=uEzQL6Jt1cTfrVVEqnXQrgrqs2HQYkPZdfIxbytoGDAJ7P6tfmPn47JU+HRmIbGkWU Lgz8H2YFWBmSSwdmzqvX3EitJyBy/QA8m+SMo8Mp85De7EUBt4USC9NsXgAgNzltrYOe 6dqMv1TDDR8RhVp2Q3fo0fVRMQWTuA4hxlMDb5ajPGiLy8jAaxMwhk0phAA+02ZBHiVa GW682EOm8BL7Al0mhpMFqmgaFQv+YF+wC32mxwfwX+MV1VaDPJc/ZCrAETK+XyZmD2ld N4rFYrIZp1yLOFIuyprmn4uRGogHtO/9/nY6a4ZCYBdGka4kNjeGJwYfysbhwnuQaWU6 GAsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707245041; x=1707849841; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=nkL4G+TELyncGb5qKRgsxW2VVdhetXIx83/bDt+aWkA=; b=MqaMsgLH+3MMNMt+/qVo4zumJ0YoXm8L0ymDmfJvoKdVbPcav7VjBjbiXFwjUrE7u5 DpbmiotgphmoUEdBF4FqatGlAnLfeiwJyfpqZU3mpZThgGQZ4UCt1/f0KmgEiEylN9MD mVwC15DFq1+bQW8GbeWvkL2MeSirrDD7rYOu9nITXWI6TGNro3UhiNSCvlkBQq8BcI2X bOM/RNk6ChaMzPnD9w5OmZ+MeudpsHss7CJLNvPpfQ1J4GHVKcJGVD1U/sDGUS67lCSg A2cdp7L5/QASs3izxPH6I/q7VwHSJDLEEo6rpMM0vdsxVfBv+EBT1SsauhtIAqapYuwG rjig== X-Gm-Message-State: AOJu0Ywv9cTvj7rMakkPAkWjm2PcvxukiRw7/jJybZ7Euv2LwVWztC9s i9QuNIT7jEctQp3vLD3QV0Ha0KMcpmmIi6RiB71EuxN5H+wssXhtOc4mRfM8kso= X-Google-Smtp-Source: AGHT+IF3+6x9EWDEi80vngu+NibETsGvkeFscD0yLYQOCHiOeAUseU4Oo/47I7n4+OlsWWQjyXGLbA== X-Received: by 2002:a17:906:260c:b0:a36:7dd8:637f with SMTP id h12-20020a170906260c00b00a367dd8637fmr2390327ejc.23.1707245041489; Tue, 06 Feb 2024 10:44:01 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCVHE4S4/aDVtRTbyfhFkZrFGTxPiH0/3Cjowf/HMxaokpAR8BkydBzS2e7PmWOW0eE8NIo9k6ePMIELH5UTRvvCn1RIOrU/lHSCm7xNYt5eDZC9HZ6Wb03xGxwewDlyhOZZA9jXXBB8z3R1FM5ojOMpmkJ4ZX+fy45tmvLaHs4yUIBqt8XagTu9hTeEdv2LI1Uhfy6XtHQ7wMkBnAln/mr6nlsatp3hiXsUzyFsYYc/PF201XGGn61wMuIAu8rtH30T/pH5k9/Tbww57cLX5Iq66eqb2Eac3yd9BD0Biph8FLZrhowyUeIPT+dRHBW4Gw30lXj4GNagq5k24OqqpCJx268M+cXItePwhgsDWvYWyqRqSx4lW/hQ9C16zoFzMykzFUQlF25iFyLpGWE8J5Bn6Rr88Sn5IzqmoNB6lS3TBzIROHoEg5AJvfKXjWNZ1BIW6RlEF105 Received: from [10.167.154.1] (037008245233.garwolin.vectranet.pl. [37.8.245.233]) by smtp.gmail.com with ESMTPSA id un9-20020a170907cb8900b00a384365e3b9sm562305ejc.195.2024.02.06.10.44.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Feb 2024 10:44:01 -0800 (PST) From: Konrad Dybcio Date: Tue, 06 Feb 2024 19:43:48 +0100 Subject: [PATCH v2 15/18] clk: qcom: videocc-sm8250: Set delay for Venus CLK resets Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240105-topic-venus_reset-v2-15-c37eba13b5ce@linaro.org> References: <20240105-topic-venus_reset-v2-0-c37eba13b5ce@linaro.org> In-Reply-To: <20240105-topic-venus_reset-v2-0-c37eba13b5ce@linaro.org> To: Bjorn Andersson , Michael Turquette , Stephen Boyd , Philipp Zabel Cc: Marijn Suijten , linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, Bryan O'Donoghue , Dikshita Agarwal , Vikash Garodia , Manivannan Sadhasivam , Konrad Dybcio X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1707245017; l=1301; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=5OdGYFu9CqmWBKnDDTkTc56GjeP6hdEjM7fvhmV7Ho4=; b=jmYLm7iAFHYpGT/g1wACgWml5VM9+ceT2qb4R/8XEbKDni90cfTj+edzFhXM0MppSiBX/UxOn GALbHV3xLYDCAOFytpUnj8oPG5IG+FFf3p7rtoJ0UzEsY/M+Ypzvf1w X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= Some Venus resets may require more time when toggling. Describe that. The value was obtained by referencing the msm-4.14/19 driver, which uses a single value for all platforms [1]. [1] https://git.codelinaro.org/clo/la/platform/vendor/opensource/video-driver/-/blob/LA.UM.9.15.c26/msm/vidc/hfi_common.c?ref_type=heads#L3662-3663 Signed-off-by: Konrad Dybcio --- drivers/clk/qcom/videocc-sm8250.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/clk/qcom/videocc-sm8250.c b/drivers/clk/qcom/videocc-sm8250.c index ad46c4014a40..51b9816ec458 100644 --- a/drivers/clk/qcom/videocc-sm8250.c +++ b/drivers/clk/qcom/videocc-sm8250.c @@ -323,10 +323,10 @@ static struct clk_regmap *video_cc_sm8250_clocks[] = { static const struct qcom_reset_map video_cc_sm8250_resets[] = { [VIDEO_CC_CVP_INTERFACE_BCR] = { 0xe54 }, [VIDEO_CC_CVP_MVS0_BCR] = { 0xd14 }, - [VIDEO_CC_MVS0C_CLK_ARES] = { 0xc34, 2 }, + [VIDEO_CC_MVS0C_CLK_ARES] = { 0xc34, .bit = 2, .udelay = 150 }, [VIDEO_CC_CVP_MVS0C_BCR] = { 0xbf4 }, [VIDEO_CC_CVP_MVS1_BCR] = { 0xd94 }, - [VIDEO_CC_MVS1C_CLK_ARES] = { 0xcd4, 2 }, + [VIDEO_CC_MVS1C_CLK_ARES] = { 0xcd4, .bit = 2, .udelay = 150 }, [VIDEO_CC_CVP_MVS1C_BCR] = { 0xc94 }, }; From patchwork Tue Feb 6 18:43:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 13547710 Received: from mail-ej1-f54.google.com (mail-ej1-f54.google.com [209.85.218.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E0CC21CD33 for ; Tue, 6 Feb 2024 18:44:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.54 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707245046; cv=none; b=Pltgk5/hXIXMA05d9SvsKuxcoiRWbGtOH4UGFQs6IUDAx4nBSEAQi5vhaUs1pNMv68eUenaowpUVH6PZfSqammb2lC5AxLVAMxz1EFFlED5pXXm2aywsgi2CkYXeJdSvMQoCp8S3+fmunsLr254Q6KbZN9JSm57+uSQLY6S7QeM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707245046; c=relaxed/simple; bh=Y7Ggulm32WM6/RAQVocHOsRN4fBmgKhsAW4zx43ZHnw=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=FsPLeaO9t1FTO8yeEY0bXYKQAank6m1v6UHUZ+T/VKH4iL5iT97+H2lidkaLKQkFMVS8kmJP49YSZIMvhfQPmOHnSl9vh2qXJD8McNBEXxQGv3RUPEipQgdu9+YnrSen0eGECg7rQcBln/ZVpJLO15HEe1x2gsDzSBesfrSzuoE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=V/99DOJL; arc=none smtp.client-ip=209.85.218.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="V/99DOJL" Received: by mail-ej1-f54.google.com with SMTP id a640c23a62f3a-a385fa34c66so3279666b.1 for ; Tue, 06 Feb 2024 10:44:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1707245043; x=1707849843; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=isVYwPY6ofdkrPg4X2oYZpRBZGZUPttUGJohkW2kvxI=; b=V/99DOJLQJ6tJE7E7UyXPiq61AcIkRz2/n9tFHcGRgD+Ui8d3y8FiHClrH3NbTF5ii ZkMbg4wQKFZP+61Ie1VYPgiqvDdDiJd3KAEJfX7snYar72NPbYeZE5gjiJmiVRkiyde3 d4ArfsrQRIJb4SLjcL6QcjZSHe1TxQafTIGXCfR/jqr9mXDpdzKlH/Ekq5qLUgPcSv9J oCNRAEXVG8fbD0C8ECuKyxnlJSSGDJShbzghh13poe7qD6NNxvU9rnamMaVETlTMRNI0 tpfiFeNxSlJiHUhcR2Et8nlBtsg4g3/blrew+wkakGBHQUwv+Ww0pwydzVv52SM24gZs xklA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707245043; x=1707849843; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=isVYwPY6ofdkrPg4X2oYZpRBZGZUPttUGJohkW2kvxI=; b=WZUGVY26lBPFNs6cy+N8Fcb9lTwzgD/qko4Qko0IufKK3XGA8X1iJHaqwrBrEpfWQk K3Y3m2XBCOt2ECDYp/pk2S/yRm+D1KopdfGNxgJmOrvHvRob/0hroeBpydIHm8BKbzsH fKnewgUKIQuydEo8b7DdBsJA8mNMaEO3aMI8hvhvuKxaKcM94vJOBm+gOySbN1gvjoKh kPlsvZRfsaSXb/lzCgdt2WyIlKTLfCbg37h0aIsHVCWQMIloIcq2rktFtsR9FXz7Mcsh Efx7d55ZmCBwkj0CMecdUAtgjO2P+EpOIrXpitppXSmyPZ7Mrv16GKfXN1O7quU9fNBy a8Aw== X-Gm-Message-State: AOJu0YwCspPsHMgtL3OTeIQsCiSn9sfiNMvuKAxajpkPGmyiJ9W+5TzW 22syr9WhBZzQGDAWw+DH6BtqWJPAJd7X5uzU0RTd+V4yXSIq/UWPmnuKP93rAIA= X-Google-Smtp-Source: AGHT+IEGDzYnSZ0kqdSVkgFHv5O2mtFy9VYJ1S7QGal0lAihMkpjZ4JaqcIQJnJKuV7bAlu0DJTNgQ== X-Received: by 2002:a17:907:7710:b0:a38:9ff:5711 with SMTP id kw16-20020a170907771000b00a3809ff5711mr2492169ejc.51.1707245043218; Tue, 06 Feb 2024 10:44:03 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCVCEuPRSNphr/lrCNEQgaplXOouJICClOqTHCkZ0QwrWXba7Wvy3sHFnfKnmAD8wLlVYv2Q4/bmT2M/S27soAQ7ruY8n8uwcQPftk7qc2zvPFCkQ9ceNqI8ONnqPd45DpmfdJE5V8DEFOZaJpZBo0PdsRcS3gvnDiI4LTqfis5KkSc2Wx1PvrSGgJo91iRhgRiwUXn6eoho+Ss/IgT0lEe8nS3P2lgBhY10Rk36qOn6L9ZOYD3v+EoxMeEjbCSx7UfpLsTBtMRtwRWLRlEk5JzE31DAhpGosUNKCZ0q0qwvRsjnqaHClaNzS9TQ/yM2iQPxeKXVoBOZOkunF9sZo60uRY/NmTYxug9nzEymkxn7KwHsxWyvVNQ25JxJVonk+Rwb62v76BdZ0G3ZMQWhyoid3sD+E1+I6f4uQWLYXFzDG5Xbc1a78P4FPRAIXPVWP0xP6KLIJTlR Received: from [10.167.154.1] (037008245233.garwolin.vectranet.pl. [37.8.245.233]) by smtp.gmail.com with ESMTPSA id un9-20020a170907cb8900b00a384365e3b9sm562305ejc.195.2024.02.06.10.44.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Feb 2024 10:44:02 -0800 (PST) From: Konrad Dybcio Date: Tue, 06 Feb 2024 19:43:49 +0100 Subject: [PATCH v2 16/18] clk: qcom: videocc-sm8350: Set delay for Venus CLK resets Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240105-topic-venus_reset-v2-16-c37eba13b5ce@linaro.org> References: <20240105-topic-venus_reset-v2-0-c37eba13b5ce@linaro.org> In-Reply-To: <20240105-topic-venus_reset-v2-0-c37eba13b5ce@linaro.org> To: Bjorn Andersson , Michael Turquette , Stephen Boyd , Philipp Zabel Cc: Marijn Suijten , linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, Bryan O'Donoghue , Dikshita Agarwal , Vikash Garodia , Manivannan Sadhasivam , Konrad Dybcio X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1707245017; l=1223; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=Y7Ggulm32WM6/RAQVocHOsRN4fBmgKhsAW4zx43ZHnw=; b=+zg3ql5xeaQtsYwzLD5OeLyA/UT3wxi+MNWyvdMP2mGfUDA5EH5HlLCL3b0D79zdaSA6kZGd8 1hQdTOOGi3AAhPoThaHiyCxx6+NWX3VA+XBmBBHY5s5L2A8MM/sxAPA X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= Some Venus resets may require more time when toggling. Describe that. The value is known for SM8350, see [1]. [1] https://git.codelinaro.org/clo/la/platform/vendor/opensource/video-driver/-/commit/dfe241edf23daf3c1ccbb79b02798965123fad98 Signed-off-by: Konrad Dybcio --- drivers/clk/qcom/videocc-sm8350.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/clk/qcom/videocc-sm8350.c b/drivers/clk/qcom/videocc-sm8350.c index 7246f3c99492..8db2bb995558 100644 --- a/drivers/clk/qcom/videocc-sm8350.c +++ b/drivers/clk/qcom/videocc-sm8350.c @@ -488,10 +488,10 @@ static struct clk_regmap *video_cc_sm8350_clocks[] = { static const struct qcom_reset_map video_cc_sm8350_resets[] = { [VIDEO_CC_CVP_INTERFACE_BCR] = { 0xe54 }, [VIDEO_CC_CVP_MVS0_BCR] = { 0xd14 }, - [VIDEO_CC_MVS0C_CLK_ARES] = { 0xc34, 2 }, + [VIDEO_CC_MVS0C_CLK_ARES] = { .reg = 0xc34, .bit = 2, .udelay = 400 }, [VIDEO_CC_CVP_MVS0C_BCR] = { 0xbf4 }, [VIDEO_CC_CVP_MVS1_BCR] = { 0xd94 }, - [VIDEO_CC_MVS1C_CLK_ARES] = { 0xcd4, 2 }, + [VIDEO_CC_MVS1C_CLK_ARES] = { .reg = 0xcd4, .bit = 2, .udelay = 400 }, [VIDEO_CC_CVP_MVS1C_BCR] = { 0xc94 }, }; From patchwork Tue Feb 6 18:43:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 13547711 Received: from mail-ej1-f51.google.com (mail-ej1-f51.google.com [209.85.218.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 861E31CFA8 for ; Tue, 6 Feb 2024 18:44:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707245048; cv=none; b=lm1uNrGnKAsVFHu4lkODjkB1S/vOmqW4ORE7AI6on7TeSGP/fHvVQ+T6pfPuQIhlFwp4RWGhCZeKPUynuF8A3l5Q3jTY0hYeHRy5sobOesiIlJ9L3S2gRpbfmK4XTsqX0mXxAbZFS/J6iZpUQJ/z6jTsvdeOXZa+i8v57oEUQzo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707245048; c=relaxed/simple; bh=zaeCrdSIZdnQrOpfJSqYQ9Ck7vw9+mDCXs61VSh8KsU=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=PzWaRtmvBOpcgjWoDhwp6VfxKJAPFcUGkgixlugmkVFM7+p4XYIIRZsp3JMZ3wOnhluhB1fFalQ5yLKOcNI41BYfWgriq9d5MKWSMem/IjPUZ97g6KjCM0i6v08vr+0Pz+rQ/aPzhaOAQhtuSBt5VVQw+rS0y0jyNro+KpdsKhE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=Appa5qAa; arc=none smtp.client-ip=209.85.218.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="Appa5qAa" Received: by mail-ej1-f51.google.com with SMTP id a640c23a62f3a-a293f2280c7so784502266b.1 for ; Tue, 06 Feb 2024 10:44:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1707245045; x=1707849845; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=4KEnAB/est+J1SeDFEencX7BVcJohlePYLBUnIFqHdQ=; b=Appa5qAaG6JjR/Dm1x+cH64nGklznSiLH9J6+EexMEB4/6vpPn/SYcoq+8XGLQmJO2 KnNFzA9K/iUaLMyy11c6Lr0d7b3RJGu1KiODzLyebdIwtXlC/pmmEmJ9MGl2ouwA23pN cawSrOIJn9p+k8mwt/YohjTjyynh/JJLTM5SXRdqvTuMskq/KTTMgxEjK6DXv3Uz3R2R l5ahFG4TV8jih+72r6J0F5sO96w1+9top+iiUSDonElGOmVkdFggFAKFooqV/NU2FpoH jh5iqTQpTT8ZXP0Ec7GjjFBIBq9e7Kl5CvY8kw9ppPZ9yFd1RR/8Pzn21aO/uUF9oqTU pisA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707245045; x=1707849845; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=4KEnAB/est+J1SeDFEencX7BVcJohlePYLBUnIFqHdQ=; b=jdI5K1JZAlgQL2b5OkY5pRDv3exvXHCGumky6oPn45CEdOLW4/CPRN5q8feeKFisFU Oq819iFyHGhLJysd7SAi8DW0fM4ShbjMsNE5kvUZNqf9oD1yB8LCXJGqTjobrbLj88yD vpQMNBLche523CrAAPI92Jhz2p2uysScIOVfhNbzA7+gYOLNPW8NhLIOhGtDnhbom93d 2R4m5HnKdFYFqZoj1WDn26HsTcCd2MnhWqxIGvFpklVuzYlgpo3wHuENzYowOxa4iYlT +YNrtSpZwc/naqU4UIc38IR0XafjYNfIqh0egXuE9y4NEa9QudXIwGONRSx0C0zlgyMY H7lw== X-Gm-Message-State: AOJu0YyI8vsmzLK86KmvbTcrejf7qAuBOwRS1/R9Y2a3Xv5/tLv+aLuN X1CwS60KnxO73YG4MDdnQ0wMmQMlInhVaNXpyNTloNt6KwlY8NTYYaTo/6MADF8= X-Google-Smtp-Source: AGHT+IEwSDm6nuBUElg3xGBgKVwVcWEiOWHkBVITRzKTgjxLIhYvCsU0/ng/Iax0Q8vQt60UZcLlDQ== X-Received: by 2002:a17:906:704a:b0:a37:22a5:50d5 with SMTP id r10-20020a170906704a00b00a3722a550d5mr2476690ejj.54.1707245044858; Tue, 06 Feb 2024 10:44:04 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCXb+lVRLzyZP76/IktTGnMRqeUucGJP8JxDl9gdo+QqnwoJ/JXSL9aOXKGw3BZPqSMGqX2fSPt8VK0wCj5wHQwrIIunNAX43yQuc/cDyRh+NPJNe+QslArFff81Hadoomba/4af3M1IY6iGDqNxByKzg69MqbEminGfLNhoxBkdDjjoeEEYaLm+wtjBY82gXqOI6US4t8NlsYXky8UckFYq+L0fXqSC/t+nQYcBR7vD7H6UcgyhET5gu/aHFzvJaAmrOwgQUoGzninGh/tUq3C+S2I+bMbu8zevdClTD3ARGKmpgjSY8ok6aovYWvgksMbWMCPCY4DRkGOS7mtHkwdE9kRHT4mftiJ+ZUyceccZWWzGKW7obEh0HlK/WeqD/WFMkNROVk+7VCKNqGZSTSNH4g50TbxMuZKquYfTE3SE4rOXunt+uEK0VJS1La9YMl9zOao8RAHP Received: from [10.167.154.1] (037008245233.garwolin.vectranet.pl. [37.8.245.233]) by smtp.gmail.com with ESMTPSA id un9-20020a170907cb8900b00a384365e3b9sm562305ejc.195.2024.02.06.10.44.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Feb 2024 10:44:04 -0800 (PST) From: Konrad Dybcio Date: Tue, 06 Feb 2024 19:43:50 +0100 Subject: [PATCH v2 17/18] clk: qcom: videocc-sm8450: Set delay for Venus CLK resets Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240105-topic-venus_reset-v2-17-c37eba13b5ce@linaro.org> References: <20240105-topic-venus_reset-v2-0-c37eba13b5ce@linaro.org> In-Reply-To: <20240105-topic-venus_reset-v2-0-c37eba13b5ce@linaro.org> To: Bjorn Andersson , Michael Turquette , Stephen Boyd , Philipp Zabel Cc: Marijn Suijten , linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, Bryan O'Donoghue , Dikshita Agarwal , Vikash Garodia , Manivannan Sadhasivam , Konrad Dybcio X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1707245017; l=1158; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=zaeCrdSIZdnQrOpfJSqYQ9Ck7vw9+mDCXs61VSh8KsU=; b=gAjYN4kZvcLr/Jv2d1Ru1N8PYvkeDBd1lv8wL36Fm8wIxdb5F/6CFQKx+SJAI+jQjzqqSJPKn K9LFK1EAOleDa6zshRxR50X2VJYvve/1+D2EdEHxnFwyUdQbu8kFanZ X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= Some Venus resets may require more time when toggling. Describe that. The value is known for SM8450, see [1]. [1] https://git.codelinaro.org/clo/la/platform/vendor/opensource/video-driver/-/commit/d0730ea5867264ee50b793f6700eb6a376ddcbbb Signed-off-by: Konrad Dybcio --- drivers/clk/qcom/videocc-sm8450.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/clk/qcom/videocc-sm8450.c b/drivers/clk/qcom/videocc-sm8450.c index 16a61146e619..67ca302a0737 100644 --- a/drivers/clk/qcom/videocc-sm8450.c +++ b/drivers/clk/qcom/videocc-sm8450.c @@ -373,8 +373,8 @@ static const struct qcom_reset_map video_cc_sm8450_resets[] = { [CVP_VIDEO_CC_MVS0C_BCR] = { 0x8048 }, [CVP_VIDEO_CC_MVS1_BCR] = { 0x80bc }, [CVP_VIDEO_CC_MVS1C_BCR] = { 0x8070 }, - [VIDEO_CC_MVS0C_CLK_ARES] = { 0x8064, 2 }, - [VIDEO_CC_MVS1C_CLK_ARES] = { 0x808c, 2 }, + [VIDEO_CC_MVS0C_CLK_ARES] = { .reg = 0x8064, .bit = 2, .udelay = 1000 }, + [VIDEO_CC_MVS1C_CLK_ARES] = { .reg = 0x808c, .bit = 2, .udelay = 1000 }, }; static const struct regmap_config video_cc_sm8450_regmap_config = { From patchwork Tue Feb 6 18:43:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 13547712 Received: from mail-lj1-f169.google.com (mail-lj1-f169.google.com [209.85.208.169]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0CB691D534 for ; Tue, 6 Feb 2024 18:44:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.169 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707245049; cv=none; b=XC0MjV6LZpfwl+/KgmGNZ6l64YiExK03TcqcH0NTqTyXOafqxdId06kyTyPNG+DHD6HHdGMGUG11Haxzo+b0BYUPenDrFhioCs5Bs2D6wS2VblFQiq3GhJ5Atg5/9rFsfJS86VXvGNEmeWKRz7d1jR16DoEN9aPhObVzjmfWhgQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707245049; c=relaxed/simple; bh=2S463+CzMDGi1rLOIQTPuNUpuMASFzJ+jxXDDyz8//Y=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Q2Og4+Yvm5qG7tWob/MaWziJc5AY3x8LaJoKUDn+N0JpUzVKnxBoJDGpIi8wLtDjK36/zL4A/48TWMtTlCXuWeS/Ux+bu0Suokt5Ibi2orNN2UWGiZ5ZYOcxZe9epMDKbQOTyQ5HUCBMApD06Os2OqFpii+9scRyHjTd7C9XHEc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=mUT5mvbg; arc=none smtp.client-ip=209.85.208.169 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="mUT5mvbg" Received: by mail-lj1-f169.google.com with SMTP id 38308e7fff4ca-2d0a236dae7so38792671fa.2 for ; Tue, 06 Feb 2024 10:44:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1707245046; x=1707849846; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=1FWDxrvCgCbA9bRUaJGRlYCcz0F0+PB8LWtXBkaTaps=; b=mUT5mvbgHGDXea3HhlkrDiC6fZZfkH2d5F7PwBr6P3CCMETgzFpDKg7P8cdzJsclXh RahIK9xdywobyr3f8yI5U3B62VKcChjogIljWLbjwvwREC8wgbUDRETHeUmypGmxhhGM eFEBaiHDch8hLIIsF9r3DtHuIRE9KdbaeBBl8d6KE3RCF8xGuBgb8V32OGidArvKggmJ 4Kjjz8N9Q9H5MGPl+SbvM+O1+CuHlTf+Pm59F2hflpEEdslAwHmQ73WsmnZsdrCCRqc9 FoB+iryXYxtSdRkUS0yyRyna4w9RmJs6cXpTfR8xEa0vdv1BhtdY4kbsf+L4DiD0d58a ORdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707245046; x=1707849846; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=1FWDxrvCgCbA9bRUaJGRlYCcz0F0+PB8LWtXBkaTaps=; b=TGwxyNCQkY+oZkrfP/7CQ5/ywRUQDbv8N5gTK6kmlqGZusXbeYmODracHXZUXTUqOO bPu+aQsUrAcwRbEvznHWJpmTwlL74/L0GZHa+bA2zMWiQ3DYqWLRcnerwNPiVurCsCDg MFcZqQew9g0A9/utHMVuq84J3/WIt0KMTKYnj0+cbiHYBsSxi9YpNOtYpp1f9LtvdrIz eXOUxV+4vu+Fkq9HlkpNB9H3cbmaeZh4vEgwOo3LJTmi8Yvj1yhrIPdBsd3cGofbvwXb AEr0LFWxtCb56Oq5c0Rt130PZTsGLuwq3w78Ur24mUF+ln2Ipgpsjmv5PCVNrD/Upw9J eqvg== X-Gm-Message-State: AOJu0Yy395dJu1WRnWiQjI2YFcK+DptVcuJpJrDu97hgUa5UWrvu1zqr GTsGbNQIloVzfXOxMlBWF1TNzTmoXShhmmDhMD2wYG8T/dPJPq+LnV3P9CYh2eodcIPbkdxwqNx O X-Google-Smtp-Source: AGHT+IGGBKFsyt5zrjZScDXyPO3BCFXTskqE4t6XXzVKivuiP8AJ1yhmWjWzJDtFBd12pKeTmwTOlA== X-Received: by 2002:ac2:562d:0:b0:511:4dac:f1ad with SMTP id b13-20020ac2562d000000b005114dacf1admr2218225lff.27.1707245046079; Tue, 06 Feb 2024 10:44:06 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCW1J9vOUZA9QcZquhv1h6rFUybIMyzOPWWAadU1ThYGN9vrqTSlsGZV0U/gIsFFomwydN2RDJ86QdKFCvWBExpMJuJKBcdQ1EycfvM3UJL14WPJhLBxq4mkf+OWshKm5OSN8smNZW8XVWtaQLhTuLvW+uS20lUQiQX0MXDgIpq/VLPX1uUPU3wj84Kh37dg6M1R6FwhagxhPZ7VjQdLeBo7LJciju4Plg/spetatd2nsl8fYE8va8hxSSn7z9JGIen/pn+/X4ZoHBisWdgmf1GVWZw9f22B0AjvWj2pMlxDVv+mXI/aozOlZ1btpgPrfd+rsnSg7YfZHT5ZH2rKvy/L7KTH9gokncih+lKrwj8jIC9ALFq5SRaC8fvV96G0dPlvEi3jXwqF2EKmfCI7RZltivOvBP6yyFUcH+pl/7cwFmomJQuO60nZyvAN7uS/oV7sD5cpjMEK Received: from [10.167.154.1] (037008245233.garwolin.vectranet.pl. [37.8.245.233]) by smtp.gmail.com with ESMTPSA id un9-20020a170907cb8900b00a384365e3b9sm562305ejc.195.2024.02.06.10.44.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Feb 2024 10:44:05 -0800 (PST) From: Konrad Dybcio Date: Tue, 06 Feb 2024 19:43:51 +0100 Subject: [PATCH v2 18/18] clk: qcom: videocc-sm8550: Set delay for Venus CLK resets Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240105-topic-venus_reset-v2-18-c37eba13b5ce@linaro.org> References: <20240105-topic-venus_reset-v2-0-c37eba13b5ce@linaro.org> In-Reply-To: <20240105-topic-venus_reset-v2-0-c37eba13b5ce@linaro.org> To: Bjorn Andersson , Michael Turquette , Stephen Boyd , Philipp Zabel Cc: Marijn Suijten , linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, Bryan O'Donoghue , Dikshita Agarwal , Vikash Garodia , Manivannan Sadhasivam , Konrad Dybcio X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1707245017; l=1059; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=2S463+CzMDGi1rLOIQTPuNUpuMASFzJ+jxXDDyz8//Y=; b=JtB6YmGeACZ5ppxwuHnTrt7f/4pkjhJ0YGo1eDbaSeJw1S4VNh2TJJtc1y6unKQzQ5E9eFWNo SqlzIc204aAAvMWFLB5Z4LyITGz1kNJuuhU8XvdM+Qen7hM/JFxjL+i X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= Some Venus resets may require more time when toggling. Describe that. The value for SM8550 is known and extracted from the msm-5.15 driver. Signed-off-by: Konrad Dybcio --- drivers/clk/qcom/videocc-sm8550.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/clk/qcom/videocc-sm8550.c b/drivers/clk/qcom/videocc-sm8550.c index f3c9dfaee968..e3f146347da7 100644 --- a/drivers/clk/qcom/videocc-sm8550.c +++ b/drivers/clk/qcom/videocc-sm8550.c @@ -378,8 +378,8 @@ static const struct qcom_reset_map video_cc_sm8550_resets[] = { [CVP_VIDEO_CC_MVS0C_BCR] = { 0x8048 }, [CVP_VIDEO_CC_MVS1_BCR] = { 0x80c8 }, [CVP_VIDEO_CC_MVS1C_BCR] = { 0x8074 }, - [VIDEO_CC_MVS0C_CLK_ARES] = { 0x8064, 2 }, - [VIDEO_CC_MVS1C_CLK_ARES] = { 0x8090, 2 }, + [VIDEO_CC_MVS0C_CLK_ARES] = { .reg = 0x8064, .bit = 2, .udelay = 1000 }, + [VIDEO_CC_MVS1C_CLK_ARES] = { .reg = 0x8090, .bit = 2, .udelay = 1000 }, }; static const struct regmap_config video_cc_sm8550_regmap_config = {