From patchwork Fri Mar 25 12:02:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tommaso Merciai X-Patchwork-Id: 1609405 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.a=rsa-sha256 header.s=google header.b=g1EDssdv; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4KQ1264jtyz9s0r for ; Fri, 25 Mar 2022 23:03:10 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 991D884195; Fri, 25 Mar 2022 13:02:51 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=amarulasolutions.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.b="g1EDssdv"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 297F684177; Fri, 25 Mar 2022 13:02:40 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wr1-x42e.google.com (mail-wr1-x42e.google.com [IPv6:2a00:1450:4864:20::42e]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 8563B8415D for ; Fri, 25 Mar 2022 13:02:35 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=amarulasolutions.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=tommaso.merciai@amarulasolutions.com Received: by mail-wr1-x42e.google.com with SMTP id t11so10573254wrm.5 for ; Fri, 25 Mar 2022 05:02:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=3orRPcwlGoNXcN5yxSxocYNLrccw6mq90i9ZzQKg7hI=; b=g1EDssdvL8MkaerLymCyBT4y9tLyOw/6ri4y0DYHRzUq0gg9abQaIwvQpWO6IS6o0K ndcvW9ENSamlDk8jS3/Wj6kRf41gODEq0wAGZrl9J4YKrpob8or/XxiLpcipR3N9P3bU bmXc4k/+H+dorW02CDYLTfOS43OeTuBBFw4Ts= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=3orRPcwlGoNXcN5yxSxocYNLrccw6mq90i9ZzQKg7hI=; b=bGs6FlcFWppNLld3aaKV8mFWvkwc3T99iL6RZLavcTo1t33tqgUmmya5fzELXzuuaD Td0dQYkh9RSckUhCfLNhMiTJps20HtUTx7Q20jwFhKgXSpuBnfG3qDKjM/gzqG3FUknE pKk33QC41pgVN1UqsPD/sFe5SyHgdvEnCR2mP3sr1DEoWBvtYkWwTkMvmPWMZTjZn3NL HF0nfBrISWzvVNn/YDquBWd/PVb3I1TKu8ppAxKcZIF5xNEelEPU2wiOKPk9cAIfQukS BxDpjytxtMInxhrZClzcG+pGX5KrCh31vD3ZvIoh7tCA3JHLdcuJSp0t66sD4CuPGF1N cGnw== X-Gm-Message-State: AOAM532E//zWe3NQtu2BNcPrteJGFN+kxTCc+72rQjkbsbGnnPk8H1Tl D8tj+TEN+36qXlKDhXJVwfjmfA== X-Google-Smtp-Source: ABdhPJy/7KS3/Y+5WfQmOL9+/3rk0wI+FXTznH6U8mjZI3Jq8TIonSP3nMCwpYubO6ee1PcWX3JTyg== X-Received: by 2002:a5d:48d1:0:b0:1e3:2401:f229 with SMTP id p17-20020a5d48d1000000b001e32401f229mr8750498wrs.694.1648209755168; Fri, 25 Mar 2022 05:02:35 -0700 (PDT) Received: from tom-ThinkPad-T14s-Gen-2i.station (net-188-217-56-61.cust.vodafonedsl.it. [188.217.56.61]) by smtp.gmail.com with ESMTPSA id g16-20020a05600c4ed000b0038ceb0b21b4sm1190641wmq.24.2022.03.25.05.02.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Mar 2022 05:02:34 -0700 (PDT) From: Tommaso Merciai To: Cc: tommaso.merciai@amarulasolutions.com, alb3rto.merciai@gmail.com, Peng Fan , Andrey Zhizhikin , Ye Li , Alice Guo , u-boot@lists.denx.de Subject: [PATCH v4 1/9] arch: mach-imx: imx8m: add pwm ctrl registers fields defines Date: Fri, 25 Mar 2022 13:02:23 +0100 Message-Id: <20220325120231.63782-2-tommaso.merciai@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220325120231.63782-1-tommaso.merciai@amarulasolutions.com> References: <20220325120231.63782-1-tommaso.merciai@amarulasolutions.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean Add pwm control registers fields defines into imx-regs.h: - prescaler - dozeen - waiten - dbgen - clksrc_ipg_high - clksrc_ipg, en field References: - iMX8MMRM.pdf p 3884 Signed-off-by: Tommaso Merciai --- arch/arm/include/asm/arch-imx8m/imx-regs.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/arm/include/asm/arch-imx8m/imx-regs.h b/arch/arm/include/asm/arch-imx8m/imx-regs.h index 11389a0f4d..57a95de1b8 100644 --- a/arch/arm/include/asm/arch-imx8m/imx-regs.h +++ b/arch/arm/include/asm/arch-imx8m/imx-regs.h @@ -351,6 +351,14 @@ struct src { u32 ddr2_rcr; }; +#define PWMCR_PRESCALER(x) (((x - 1) & 0xFFF) << 4) +#define PWMCR_DOZEEN (1 << 24) +#define PWMCR_WAITEN (1 << 23) +#define PWMCR_DBGEN (1 << 22) +#define PWMCR_CLKSRC_IPG_HIGH (2 << 16) +#define PWMCR_CLKSRC_IPG (1 << 16) +#define PWMCR_EN (1 << 0) + #define WDOG_WDT_MASK BIT(3) #define WDOG_WDZST_MASK BIT(0) struct wdog_regs {