From patchwork Wed Jul 8 15:57:17 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Griffin X-Patchwork-Id: 50891 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f197.google.com (mail-wi0-f197.google.com [209.85.212.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 0C38522A03 for ; Wed, 8 Jul 2015 15:58:01 +0000 (UTC) Received: by wizo10 with SMTP id o10sf20375039wiz.0 for ; Wed, 08 Jul 2015 08:58:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=QwBrlzI9k9hmZEIPBMEheafa5kD5zhoLoN4CB4/4I64=; b=geq47/UMKk2Nlei1QSYwQv63STIdUg+XmPJl0PNmKjdmJTc3b5gDukIR7/mXGRjzdh QpbUgJ983lXwH2WMTCcsVbkAnYshx5tFpKOp54TSLU+bPqx/Q5xt/ZOmHe6WF37ldanp ytM/gEWS+p4ZItA6+Hb27J31pwPzNSJU2Xfcd6g8JhjBd2zEfcR3xpyI/xwen4298gVI w2bK6ibXJc4U/9Kt1Rbmdry+vkSlPfwfG592VDJITP1Py+BHLIQnuEVX24mOTpe/n8FH lXYadbMjt/UVJSc6xSHnUNbTh+OuCKwP06RZ++SBE8RIcepuAOXahYMhRCGYoTXtOu6b yoKQ== X-Gm-Message-State: ALoCoQnN82mXDyzKtXT3uPHuIPjO468B1AB5S610tLRatbIQWjrlzU3S4qCFpAPwkJkIgwqyp22s X-Received: by 10.112.148.101 with SMTP id tr5mr5174744lbb.13.1436371080266; Wed, 08 Jul 2015 08:58:00 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.178.164 with SMTP id cz4ls990146lac.3.gmail; Wed, 08 Jul 2015 08:58:00 -0700 (PDT) X-Received: by 10.112.167.202 with SMTP id zq10mr10008410lbb.118.1436371080128; Wed, 08 Jul 2015 08:58:00 -0700 (PDT) Received: from mail-la0-f47.google.com (mail-la0-f47.google.com. [209.85.215.47]) by mx.google.com with ESMTPS id v16si1994776lal.95.2015.07.08.08.58.00 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 08 Jul 2015 08:58:00 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.47 as permitted sender) client-ip=209.85.215.47; Received: by lagx9 with SMTP id x9so228373134lag.1 for ; Wed, 08 Jul 2015 08:58:00 -0700 (PDT) X-Received: by 10.152.88.77 with SMTP id be13mr10090335lab.112.1436371079849; Wed, 08 Jul 2015 08:57:59 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.112.108.230 with SMTP id hn6csp50931lbb; Wed, 8 Jul 2015 08:57:59 -0700 (PDT) X-Received: by 10.194.71.226 with SMTP id y2mr20668355wju.34.1436371056780; Wed, 08 Jul 2015 08:57:36 -0700 (PDT) Received: from mail-wg0-f45.google.com (mail-wg0-f45.google.com. [74.125.82.45]) by mx.google.com with ESMTPS id hf10si4494538wib.2.2015.07.08.08.57.36 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 08 Jul 2015 08:57:36 -0700 (PDT) Received-SPF: pass (google.com: domain of peter.griffin@linaro.org designates 74.125.82.45 as permitted sender) client-ip=74.125.82.45; Received: by wgck11 with SMTP id k11so200089195wgc.0 for ; Wed, 08 Jul 2015 08:57:36 -0700 (PDT) X-Received: by 10.194.205.225 with SMTP id lj1mr20482636wjc.138.1436371056490; Wed, 08 Jul 2015 08:57:36 -0700 (PDT) Received: from localhost.localdomain (cpc14-aztw22-2-0-cust189.18-1.cable.virginm.net. [82.45.1.190]) by smtp.gmail.com with ESMTPSA id o6sm3595044wiz.16.2015.07.08.08.57.34 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 08 Jul 2015 08:57:35 -0700 (PDT) From: Peter Griffin To: u-boot@lists.denx.de, trini@konsulko.com, panto@antoniou-consulting.com, albert.u.boot@aribaud.net, sjg@chromium.org, marex@denx.de, robherring2@gmail.com Cc: Peter Griffin Subject: [PATCH v2 3/6] hi6553: Add register definition and bitfield header for 6553 pmic Date: Wed, 8 Jul 2015 16:57:17 +0100 Message-Id: <1436371040-26620-4-git-send-email-peter.griffin@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1436371040-26620-1-git-send-email-peter.griffin@linaro.org> References: <1436371040-26620-1-git-send-email-peter.griffin@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: peter.griffin@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.47 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , This pmic is used on the 96boards consumer edition HiKey board. Signed-off-by: Peter Griffin --- arch/arm/include/asm/arch-hi6220/hi6553.h | 75 +++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 arch/arm/include/asm/arch-hi6220/hi6553.h diff --git a/arch/arm/include/asm/arch-hi6220/hi6553.h b/arch/arm/include/asm/arch-hi6220/hi6553.h new file mode 100644 index 0000000..d0770e1 --- /dev/null +++ b/arch/arm/include/asm/arch-hi6220/hi6553.h @@ -0,0 +1,75 @@ +/* + * (C) Copyright 2015 Linaro + * Peter Griffin + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#ifndef __HI6553_PMIC_H__ +#define __HI6553_PMIC_H__ + +#define HI6553_DISABLE6_XO_CLK 0x036 + +#define HI6553_DISABLE6_XO_CLK_BB (1 << 0) +#define HI6553_DISABLE6_XO_CLK_CONN (1 << 1) +#define HI6553_DISABLE6_XO_CLK_NFC (1 << 2) +#define HI6553_DISABLE6_XO_CLK_RF1 (1 << 3) +#define HI6553_DISABLE6_XO_CLK_RF2 (1 << 4) + +#define HI6553_VERSION_REG 0x000 +#define HI6553_ENABLE2_LDO1_8 0x029 +#define HI6553_DISABLE2_LDO1_8 0x02a +#define HI6553_ONOFF_STATUS2_LDO1_8 0x02b +#define HI6553_ENABLE3_LDO9_16 0x02c +#define HI6553_DISABLE3_LDO9_16 0x02d +#define HI6553_ONOFF_STATUS3_LDO9_16 0x02e +#define HI6553_PERI_EN_MARK 0x040 +#define HI6553_BUCK2_REG1 0x04a +#define HI6553_BUCK2_REG5 0x04e +#define HI6553_BUCK2_REG6 0x04f +#define HI6553_BUCK3_REG3 0x054 +#define HI6553_BUCK3_REG5 0x056 +#define HI6553_BUCK3_REG6 0x057 +#define HI6553_BUCK4_REG2 0x05b +#define HI6553_BUCK4_REG5 0x05e +#define HI6553_BUCK4_REG6 0x05f +#define HI6553_CLK_TOP0 0x063 +#define HI6553_CLK_TOP3 0x066 +#define HI6553_CLK_TOP4 0x067 +#define HI6553_VSET_BUCK2_ADJ 0x06d +#define HI6553_VSET_BUCK3_ADJ 0x06e +#define HI6553_LDO7_REG_ADJ 0x078 +#define HI6553_LDO10_REG_ADJ 0x07b +#define HI6553_LDO19_REG_ADJ 0x084 +#define HI6553_LDO20_REG_ADJ 0x085 +#define HI6553_DR_LED_CTRL 0x098 +#define HI6553_DR_OUT_CTRL 0x099 +#define HI6553_DR3_ISET 0x09a +#define HI6553_DR3_START_DEL 0x09b +#define HI6553_DR4_ISET 0x09c +#define HI6553_DR4_START_DEL 0x09d +#define HI6553_DR345_TIM_CONF0 0x0a0 +#define HI6553_NP_REG_ADJ1 0x0be +#define HI6553_NP_REG_CHG 0x0c0 +#define HI6553_BUCK01_CTRL2 0x0d9 +#define HI6553_BUCK0_CTRL1 0x0dd +#define HI6553_BUCK0_CTRL5 0x0e1 +#define HI6553_BUCK0_CTRL7 0x0e3 +#define HI6553_BUCK1_CTRL1 0x0e8 +#define HI6553_BUCK1_CTRL5 0x0ec +#define HI6553_BUCK1_CTRL7 0x0ef +#define HI6553_CLK19M2_600_586_EN 0x0fe + +#define HI6553_LED_START_DELAY_TIME 0x00 +#define HI6553_LED_ELEC_VALUE 0x07 +#define HI6553_LED_LIGHT_TIME 0xf0 +#define HI6553_LED_GREEN_ENABLE (1 << 1) +#define HI6553_LED_OUT_CTRL 0x00 + +#define HI6553_PMU_V300 0x30 +#define HI6553_PMU_V310 0x31 + +unsigned char hi6553_read_8(unsigned int offset); +void hi6553_write_8(unsigned int offset, unsigned char value); + +#endif /* __HI6553_PMIC_H__ */