From patchwork Fri Jul 10 15:50:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 1479 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pg1-f199.google.com (mail-pg1-f199.google.com [209.85.215.199]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 8E3AD3F06D for ; Fri, 10 Jul 2020 17:51:35 +0200 (CEST) Received: by mail-pg1-f199.google.com with SMTP id j9sf4398127pgm.8 for ; Fri, 10 Jul 2020 08:51:35 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1594396293; cv=pass; d=google.com; s=arc-20160816; b=klGDjat4EIBTAAgAju0yS5yp9ESbL6A96kqHsexEvA9hFSqqmqVUhqeeOYlZlkVBPn NXYnViNhOglHxgx79Jjf1AN4vZUxKVvVjFSBhKnEogSfJOqbgYOWPLxzmgvMg2dfhOnU ngJjijeYQKCtSFcIEJ6SA543lH8t6CwKG6KrG5gyIf1A7xZ+DWeYHEtKDFNoZ/FdpVnk g6hi5MuY/PVWXk/PtZc6pELVeHU9C/zhguiKhxmyXbcAvKJ2wKtMFEoosoZFeU5AjM00 fP8VNwuGyyaXPDk8K4LoppYSxt83EVmu3TvV+FugJsTysqA7ITsbEAjH76O04mTXMP7V kScg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=ZJGk9CiilmdmH/NSkjTUYtgyzKwLnzqfExpUpi3hy3M=; b=rdf/gCOuZtA5wwe3sWW56R9bzk57OhDDK4eDBHvk+F1ZiQOQGCfJROCuRZY7X13iDY 96T46I3Xy6f5iehkyrH8v7ruloFj3+Xg/EhzeuGS6URFbTzQFAW92O7iWAsSCPGzJ5lv q/+vO6VZnXHDlP/bbB+a+mNqApij0kBsMZOGoFY6Cy+cvzY7b/Xn/7GKl8TGcqGWHBZ4 J8ayqUalxOeUq0+dwKYGPLJSnGrQlbWRibCUuRcFAd91yH7loDumEeAmBX4DSX6qwL3K dwjeKftXQXC/uvtvQTaXBkeok4e6/rbeDru8p8x7PuCgDWOj5tTlZkHHgTKVAXYQ9EuF 8J8A== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="LN6jSd/R"; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com 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:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=ZJGk9CiilmdmH/NSkjTUYtgyzKwLnzqfExpUpi3hy3M=; b=dAB2qfj0xWVBC5Ffx4c2v6WUdwiDMJHgp7T9I5KGKnDbOX5hq9qBWVjblwPWOHf6Z+ zFdklJ2YPdJhNoE2y2hmW26RkECGL/6jARDBHcrIZVlRRg+Mr4OSl0aKRZwpcetmYtN+ azuJ2H8vhfe42uXm8+hT9RNbmItDFH01Mz91E= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=ZJGk9CiilmdmH/NSkjTUYtgyzKwLnzqfExpUpi3hy3M=; b=hsaV6SiHfk7HKrD3uf/lQD453+26APVYi6yD3FH8gxcROUYVtk0BcDbcCA7jy4yCXe LS8q3wUhWD6bjQgHioMS8awsXRk/OdOZ/cQWW31Tw1wbMTKww9JQjdzujsc5/9XR9rJE r5gXfrIyiIj1Em/Gy7UwHTdQaQAvrcrF+DtNbbO7VYGtiSA3yb1Hd+pHVsB6812pEdhE B+tyk+FyHq0Zl180cRssB4h1EFnAsw6sj+t89F7nOBzlYrVKaVcpySVbwUEIcK6jUw1s 3mOWxx+TuC9joopv4qL/vr8emQYalt6efsjc/EgwrIc8vfLXLoqJZNH5d/ySlH699FKg YYGw== X-Gm-Message-State: AOAM531mSbHc5C8k7ae+c8jdXGFjVeVzOYQxmw4uo/ytSSC+Usjg0AqX Bu1DSYFct00a+NFnmSQLqqpIyxTI X-Google-Smtp-Source: ABdhPJwpIYQD3brTQAAO5K2HDTRgc3E/Swrj7ea63hYx6dluisWX/WvpV8TribgMp1Sk4RPxAjOjOw== X-Received: by 2002:a17:902:507:: with SMTP id 7mr58717421plf.115.1594396293696; Fri, 10 Jul 2020 08:51:33 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:90a:658c:: with SMTP id k12ls4362624pjj.3.gmail; Fri, 10 Jul 2020 08:51:33 -0700 (PDT) X-Received: by 2002:a17:90a:c087:: with SMTP id o7mr6310992pjs.37.1594396293237; Fri, 10 Jul 2020 08:51:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594396293; cv=none; d=google.com; s=arc-20160816; b=xb3XvOIvNtIZcOX8Vy6BFzr3OaMtoS/YkhC1zL4eYLKbQ/p930sWvb+qXwGUjIQL1e V9ZDF5uuzzVj1xpflkq2YY73GBrvPPPt/nXvCgb+D8UX6iYxK8TLwxSwWXMcyinoZLKp 5s08ymujaWrvka6+e9+TjTN0XP2SaFGqSo036RYvcAi3QMm+QhAiKHoCB8rh6S1mSkog ky8UUIYYLUHRzCrzS9Xg/P3/xviAA4YZ/dymp0vUWopPvWT1E9mi3kNhC2s/1vyw/Xki tnp8ONokpVfKKFMS4uQVYi/FeruoBVJxQb6o0no25v7YcK8W5T9jtfnOleN3O9IWEmoX 2wuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=EBRiJRqKbG+gsmgASdfE8v+2gzdWEF93STTaMV9dSrE=; b=nvoaK6+o7dGMbmXLDfqsqpJf+XNPEn5f63NB1LjDJn0YgW5QWR+DsKDe1e8udmZJlv R6v0z5m3ImSA6IrZair7ZivmRnTAvTnZr9lFJ2MjDxCg63QUIiZ3qYsmExWp09QxmlA0 n9eC9vLdoH2W6Qd2p4mPqBcTalv3GIstJ8ErLipzWxolWcqS1sdE9XpXmB5A6WZh2aVM aSs+sUSNxwA9nce0hODUnERxgB83iVT09I+ywnzk6E8NStWFSsc11pzs9Zq4sbh7u8Fd x/toZveDlgcOZW7qxcZg2adsvjnduwRw9leqr5faqtV7PIcExt3ggMDhgmi6+jPnFlXT y6Sg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="LN6jSd/R"; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id b1sor8171973pfi.99.2020.07.10.08.51.33 for (Google Transport Security); Fri, 10 Jul 2020 08:51:33 -0700 (PDT) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; X-Received: by 2002:a17:90a:f6d8:: with SMTP id er24mr6028568pjb.203.1594396292343; Fri, 10 Jul 2020 08:51:32 -0700 (PDT) Received: from localhost.localdomain ([2405:201:c809:c7d5:a1d6:54e3:577a:ace0]) by smtp.gmail.com with ESMTPSA id lx2sm6398917pjb.16.2020.07.10.08.51.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Jul 2020 08:51:31 -0700 (PDT) From: Jagan Teki To: Kever Yang , Philipp Tomsich , Simon Glass Cc: Suniel Mahesh , U-Boot-Denx , linux-rockchip@lists.infradead.org, linux-amarula Subject: [PATCH v4 1/4] arm: dts: rockchip: rk3399-roc-pc: Add RTC child node for RK808 PMIC Date: Fri, 10 Jul 2020 21:20:54 +0530 Message-Id: <20200710155057.310168-2-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200710155057.310168-1-jagan@amarulasolutions.com> References: <20200710155057.310168-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="LN6jSd/R"; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Suniel Mahesh Rockchip RK808 PMIC is a multi function device which hosts a Real Time Clock along with other devices. Add a child RTC node so that it can be bound and probed once the master pmic node completes probe. Signed-off-by: Suniel Mahesh Reviewed-by: Kever Yang --- Change for v4: - none arch/arm/dts/rk3399-roc-pc-u-boot.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/arm/dts/rk3399-roc-pc-u-boot.dtsi b/arch/arm/dts/rk3399-roc-pc-u-boot.dtsi index fc155e6903..16d6417160 100644 --- a/arch/arm/dts/rk3399-roc-pc-u-boot.dtsi +++ b/arch/arm/dts/rk3399-roc-pc-u-boot.dtsi @@ -44,6 +44,14 @@ vin-supply = <&vcc_vbus_typec0>; }; +&rk808 { + rtc { + rkrtc: rk808-rtc { + status="okay"; + }; + }; +}; + &spi1 { spi_flash: flash@0 { u-boot,dm-pre-reloc; From patchwork Fri Jul 10 15:50:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 1480 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pj1-f70.google.com (mail-pj1-f70.google.com [209.85.216.70]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 4573E3F06D for ; Fri, 10 Jul 2020 17:51:44 +0200 (CEST) Received: by mail-pj1-f70.google.com with SMTP id a6sf4238706pjd.4 for ; Fri, 10 Jul 2020 08:51:44 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1594396302; cv=pass; d=google.com; s=arc-20160816; b=TWWzyAvbucr9dBmxRmT/0NmzAXUhNtoU6t4HKv7MBBs1wuhs3KJLVycfSOJ3wnKyMY jb/RstlNvSfptmjrDPuVUUVesiwS0wkrITS4ng+ZWjrxIMM/2Lp+Z9fGwWmCSCIleio+ FvDXbmNxZFTK4lgOCims4TWAJdZg3OoglIOh6BNgEVS+errRp9U5oTDvb4uzxZJD8AaQ aQaC5igYZJgk8zq3wm09Fh0ZHKSMTqWmK617D6QBSnwIWg6qs2vjsSwr5hppOai7WCUt zNmsvOFblhBT4SNMTha9dAyREs7I8xwJefWto9798pK6p8wHBe2j5deXD3UQq0B7zBX/ qQYA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=Eyj/Gt2VbQwROXHM9wBbe3OkTwpE6B9ciMdgU02YgUE=; b=mcYayv8K8mDLMpnMBNrR3rVIyKrsFdemQQC7yGc3oR8u9GjgseWlZ0RbUogqWb3osr KaKmrGOZpD1zpb0gcHmoSoOKol0k/goGQnZeAaFb+f+xQeUCdVP7h6/BFAvhgfhXcQXE fXvW3agGv/N7i6OyjdWKnqmyLDlwBVoJKO/IpyUHlLjCQLavbeavZEbWQCCLiws05Naw VzriJIfvvOPD6ZyxxnGpsj2t8GB38vjIud525r0iRjWnlIBO2mxQ480iwIC5X2y+kVnC E34VSs5UXPl5w6yCcaK02CpT/tJ59kXlJAzrfEcX+i1CukuvXT2DkcZc3qA6kOfNrJJN /CLw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="YH+/OWFe"; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com 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:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=Eyj/Gt2VbQwROXHM9wBbe3OkTwpE6B9ciMdgU02YgUE=; b=OfKIdNec5eCEp9i6Kxw76wDsK1h7zYPPKmilp25Cc54Z7Icp8xWO9ZCAOl+4YxLTPV D185ZM5twnmlHKjctg3yAX5+cY2l2Z4WzKBUZDxlhwt8hcGjMB04dOAm+eAvbyNbmQ8D 0q7DuQXGJPO9r2wy4P6vLbSMjPedjgRcXXpvo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=Eyj/Gt2VbQwROXHM9wBbe3OkTwpE6B9ciMdgU02YgUE=; b=A422rQMNIffyqdparHBTooJDPJws4SDkhM5VnFIz7g50fgnWgkteuD8K1m7TAe3zw+ prfgYA89F4jKk6P9wba8ds4T34UQogi4yUgASRo+FWl+z9QYDi2cyXvWacjAfeh/qwMh Dh7qnfV6zMKZ1Y/UT/gd2/6gPe1QCOsRnHjPgBy/6Ut2guhPFaakXdLUkstJdcQofqpj iZOuBUvBQ1ozsZHntyHiQtQ6EP5rcTF2+w11jONOVcM1oC/ju/5wiFZ+vSzL+FCoU+El VSVyreBNkFGLlKmoyGAm9DhUPL2rJNWKnAc/CW/egGhgAZtb5NsL0uU3s+VSCMAdeKPX nS5g== X-Gm-Message-State: AOAM531v6kf6Rtlxo54/iS3to2AhcA1bLM8Z47dO7PJnx7GNxSneVMCu PmJBw50lkJ+GysIGHVIF87Qo7UHe X-Google-Smtp-Source: ABdhPJzx12JhP4MiMEdVWgEruzTUNR0svduGqTDwwi3xUYVLo5e7KE333SLrOLpMY0tEtrgirQxpNw== X-Received: by 2002:a17:902:b694:: with SMTP id c20mr59799304pls.123.1594396302439; Fri, 10 Jul 2020 08:51:42 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:90a:86c3:: with SMTP id y3ls4364276pjv.0.gmail; Fri, 10 Jul 2020 08:51:42 -0700 (PDT) X-Received: by 2002:a17:90a:780f:: with SMTP id w15mr6307730pjk.235.1594396301950; Fri, 10 Jul 2020 08:51:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594396301; cv=none; d=google.com; s=arc-20160816; b=Fh3z0D7jE8CajhoIlOmlHSMY8/+C6z4fmZDDgtxg++zNO11VUHXdCk5oz3CKd5BDlj /com5Vhdbg2AZxxTQRhZ1AZvdLQmgsPQs3B7xOB9YX+g1KPMV1KLFxFIdv3GqoWgztdT 2v7VJntq+R/Jse6QaZ2GFEQfjTVOhq8y9s+uRvjuIpbYsZrwTnRnBJqMF6RCMh8VRZXp plBLIhIUx2K2gLSM+zbR7WdcInNGIHO/9vahzI8Wz+aIYyhB+NUoliv5dbplehb9UL7W NjXMhpakfE9kAjl95f7MWBviHKMti+TwTmnebhGC6n2JNy2LkFFVyTEUlOwrqqyj7gMc oyZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=omCpbeqcJPh1o1xXQNItUN/WxYdikkBt0s5WkGVn3zA=; b=oSn7WQLtsd08cw8Dv3F5faP8Fd3YbugBNXzMPrhzGD9usTGDG+y8Jh1Wk0xWi4wS9i 58VMtkm0KB2pF2r9YFfOiXwOExTJI3m7hnc5t0ea4wsNOGumpiieuAWViPN1CFXYl+E/ U/QH0dKYsahYKfqqqoSLjLuBkOv5pHbIgv/LqoKlv5cSSUq7ltHmwxgrMepqUl8pNu+V 0V+IxP1E5FLTWqM4wK+FJu1ZwAcTQZUaUIoDFkncRaePu0ClFcWSahH3OiUaFh7QZYWL JpsNo1mFvqatwUBlilVD5ObKILPd/bBglk+bsjwbgkSOOumccTK622MDQAa+T0YuVcbK 3FQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="YH+/OWFe"; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id c7sor7951067pfc.12.2020.07.10.08.51.41 for (Google Transport Security); Fri, 10 Jul 2020 08:51:41 -0700 (PDT) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; X-Received: by 2002:aa7:9909:: with SMTP id z9mr57248971pff.139.1594396301649; Fri, 10 Jul 2020 08:51:41 -0700 (PDT) Received: from localhost.localdomain ([2405:201:c809:c7d5:a1d6:54e3:577a:ace0]) by smtp.gmail.com with ESMTPSA id lx2sm6398917pjb.16.2020.07.10.08.51.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Jul 2020 08:51:40 -0700 (PDT) From: Jagan Teki To: Kever Yang , Philipp Tomsich , Simon Glass Cc: Suniel Mahesh , U-Boot-Denx , linux-rockchip@lists.infradead.org, linux-amarula Subject: [PATCH v4 2/4] power: pmic: rk8xx: bind rk808 RTC Date: Fri, 10 Jul 2020 21:20:55 +0530 Message-Id: <20200710155057.310168-3-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200710155057.310168-1-jagan@amarulasolutions.com> References: <20200710155057.310168-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="YH+/OWFe"; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Suniel Mahesh RK808 PMIC is a multi functional device with an RTC. In order to access RTC, bind to its parent device i.e. RK808 PMIC. Signed-off-by: Suniel Mahesh Reviewed-by: Kever Yang --- Change for v4: - none drivers/power/pmic/rk8xx.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/drivers/power/pmic/rk8xx.c b/drivers/power/pmic/rk8xx.c index 195884bde9..aea9272f8a 100644 --- a/drivers/power/pmic/rk8xx.c +++ b/drivers/power/pmic/rk8xx.c @@ -25,6 +25,11 @@ static const struct pmic_child_info pmic_children_info[] = { { }, }; +static const struct pmic_child_info rtc_info[] = { + { .prefix = "rk808-rtc", .driver = "rk808_rtc"}, + { }, +}; + static int rk8xx_reg_count(struct udevice *dev) { return RK808_NUM_OF_REGS; @@ -60,7 +65,7 @@ static int rk8xx_read(struct udevice *dev, uint reg, uint8_t *buff, int len) #if CONFIG_IS_ENABLED(PMIC_CHILDREN) static int rk8xx_bind(struct udevice *dev) { - ofnode regulators_node; + ofnode regulators_node, rtc_node; int children; regulators_node = dev_read_subnode(dev, "regulators"); @@ -76,6 +81,18 @@ static int rk8xx_bind(struct udevice *dev) if (!children) debug("%s: %s - no child found\n", __func__, dev->name); + rtc_node = dev_read_subnode(dev, "rtc"); + if (!ofnode_valid(rtc_node)) { + debug("%s: %s rtc subnode not found!\n", __func__, dev->name); + return -ENXIO; + } + + debug("%s: '%s' - found rtc subnode\n", __func__, dev->name); + + children = pmic_bind_children(dev, rtc_node, rtc_info); + if (!children) + debug("%s: %s - no child found\n", __func__, dev->name); + /* Always return success for this device */ return 0; } From patchwork Fri Jul 10 15:50:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 1481 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pj1-f70.google.com (mail-pj1-f70.google.com [209.85.216.70]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 1737D3F06D for ; Fri, 10 Jul 2020 17:51:50 +0200 (CEST) Received: by mail-pj1-f70.google.com with SMTP id q89sf4232057pjk.5 for ; Fri, 10 Jul 2020 08:51:50 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1594396309; cv=pass; d=google.com; s=arc-20160816; b=RePLowhaI7OE6NDF+ECR1E+t8Q/iQQUlEL66Hs37C5dCDYOiTAog7Z+8t/KmmmPrc+ z5vbUtMlXgXOwC5vHUycJksUtZ8ICwJVXFlKxNLzmNipuHkEpU/4UVbCn9RLla9SrupY XMU6TzGnriVdDd7XjXAjKbZEU3senJqu+Nq9PYjxKMsXobCKZqJBqaOOMMWV3ee5tvip LEuWjJoQOEpFxeFGQT1+5jA4WfpuEhcv91wQ4zdwFKLjcqgsW8QLYkWbSA7xsXzMwjAL hvA7bx/S6utLOvkRRof4xQ5DYJtzbRBIUTUcGRLrR3g3lFL8c4E03b84Ttrpvu15qHt1 uzvQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=eU+i3FTb5zD8d6ylzF+hP4Bqcbwqqq1kA6yTFXJE4bs=; b=w8aJvDIQCMIefUI2beIf00OxHVcm5puCFrrhihpSrDXDeTqBNCSb69chxIfaMEKbXc q6hOngC3eLuPyuNMbav4DOeaLeyaWX/jebzLSbDTgpQcswWMvLe7IES+Y/4mv20Jf0ev RzX4EISXvpG/ILjRoCJGrrrhh+f8pnLsbisL52ovFjYn/UK5pyfcISvYrdwsQJWSIKPk /rhUEI2ONu2ECJnyagwybSoN3uKSn2k/9pV/nPL4W7BILO13FGSE4Drc1dAkGdKq/pkE eOzzSU56EhI3gdmbPX7uXPOr/c6Y4HNwC+i1S88n1QlFavSOJgB6D2OAXVBUsvwjZqzE Wn1A== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Fa2M0CVe; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com 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:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=eU+i3FTb5zD8d6ylzF+hP4Bqcbwqqq1kA6yTFXJE4bs=; b=LEw8Go0BOaO965drC9iFjWTCOdM5nHVkfstoOwu9L62vdfoxVcEEO8oApfVYBNYtf4 Odp+btJRi5Q8bxLc0DlOe59bkNoeYc1P0C7HmLRx8t1eH0J1Zz64w0BDj7TpdoeK8THZ pTJpFcwv5IZ+Q06LcGc17Un09jC/l3bbM1ttw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=eU+i3FTb5zD8d6ylzF+hP4Bqcbwqqq1kA6yTFXJE4bs=; b=K3fB/YcV89i9WERG8KbOvNw2jAyceH0pbtc4MTqAhvZ9SUy0ycWr2wZhYrYExz8XGm pcNnaOgdjG/2WkGdNM+AIhXhctUCBu0NbBNEaDs6Uw5U9XGylhJmpW48rShx6/aoeEP2 t+4u1bkcH9ZVvcHQd5Yw9T/hfeXBGndMqxC6i+f2gN9IB/S4XxzEGvut+MnBm4gHHXnP +Aw1ghLYLVFdC1ET/Qu9aWZaC0csEgXKnZ6DQxaVPELy09VLVNZFiUK4xV80jdB/ggFU DBt9TDY9euMPMZTGCR2QnUNBtKfaNSO0cAK1njfyWwfKGtj//T+qPbbi0Zxn+vdYR2hh p7Aw== X-Gm-Message-State: AOAM530hxj+qp3TdRJU3EY1gV1x4XEkbXkDO2B+AdG31lZDtFYPxuJC7 Y4gsaHDSr/KnqUVttgj60K7PV1hB X-Google-Smtp-Source: ABdhPJzXURnCEZTc9A8zbcMFbq1F9nrwdn9NVTNxj1r6b+vj7kUKPvnSiRtrXju/EO22pnKV1MHsbQ== X-Received: by 2002:a17:90a:17ad:: with SMTP id q42mr6715552pja.31.1594396308882; Fri, 10 Jul 2020 08:51:48 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:90b:380c:: with SMTP id mq12ls4363387pjb.1.gmail; Fri, 10 Jul 2020 08:51:48 -0700 (PDT) X-Received: by 2002:a17:902:e901:: with SMTP id k1mr53936090pld.130.1594396308305; Fri, 10 Jul 2020 08:51:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594396308; cv=none; d=google.com; s=arc-20160816; b=Sksd/XOfsk02nxha/3boYRrXLELUvMC+CeoRwLYgciDRW2C89J4ppU8LMqHtaYoaDn 2SsXZMjPzL+URAwkUrILkw6r5KQ3VZ6Ox3Y14bsIWjXdOFXeFzEIKPnV3CP7gSREI7OP GLmB5aLuKRt0fGhhXtveZDxH8XYQAzXICroD3mC3fiWTS5VTuok+sXtO3t9asmtDZi6a YYC98Ws+a4nK6TpToPlHD/Hop8WGbY+eqiv1KmdCACKFfS48U7I9MHmOlZF6ARZV2ljX DjFH9skoktGkhj5xB6F3hOee9o2Se1pyZg69kmRZ1dOW6k3Y/dL8CeWPTtyHeCmfMu3n sm9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=FSewoexwVyBwrPVuoElI4BFd+yaXthXy6Cp0PRRDxzg=; b=P2JBl3Z4bEXLSZo0ZBghFK5Q6CssUYfVYhHP5IQq2BThepBkwPk8uxakshGz5h2+mV olMlhozjfa5vx+x2HcYRar2e0FozjklWQRToC1PhiEKbh0kJZn7VHMjHy3oHdp8Pg8AW Rgcu3hDkNjvxbOBzFbZBOpS1ce4O1OGul3oX+MFrB4UP/HQEbWWxVtVqLYsTVrdZ7bKe csJ4O7vuQVdCv4M9ksEhG9ibkuZJqCi3VmUVsx2KcVUiN58I1ZjtRYkedMnpj44TpP9l acM/PC80A81J3MzrWY/2CF5ip8tf8yjVltalfpSwCdw0tlALtwMyfKKiEgUNxOlkL2IE kj0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Fa2M0CVe; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id kb18sor8563689pjb.22.2020.07.10.08.51.48 for (Google Transport Security); Fri, 10 Jul 2020 08:51:48 -0700 (PDT) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; X-Received: by 2002:a17:90a:a608:: with SMTP id c8mr6092496pjq.114.1594396307866; Fri, 10 Jul 2020 08:51:47 -0700 (PDT) Received: from localhost.localdomain ([2405:201:c809:c7d5:a1d6:54e3:577a:ace0]) by smtp.gmail.com with ESMTPSA id lx2sm6398917pjb.16.2020.07.10.08.51.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Jul 2020 08:51:47 -0700 (PDT) From: Jagan Teki To: Kever Yang , Philipp Tomsich , Simon Glass Cc: Suniel Mahesh , U-Boot-Denx , linux-rockchip@lists.infradead.org, linux-amarula , Jagan Teki Subject: [PATCH v4 3/4] rtc: rk8xx: Add base support for the RK808 PMIC RTC Date: Fri, 10 Jul 2020 21:20:56 +0530 Message-Id: <20200710155057.310168-4-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200710155057.310168-1-jagan@amarulasolutions.com> References: <20200710155057.310168-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Fa2M0CVe; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Suniel Mahesh Rockchip RK808 PMIC provides an integrated RTC module. It is commonly used with Rockchip SoCs. Add basic support to access date and time. Signed-off-by: Jagan Teki Signed-off-by: Suniel Mahesh --- Change for v4: - rebase - style fixes - warning fixes drivers/rtc/Kconfig | 8 ++ drivers/rtc/Makefile | 1 + drivers/rtc/rk808-rtc.c | 173 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 182 insertions(+) create mode 100644 drivers/rtc/rk808-rtc.c diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig index 59e2fc44ba..a754d1b4f1 100644 --- a/drivers/rtc/Kconfig +++ b/drivers/rtc/Kconfig @@ -75,6 +75,14 @@ config RTC_ISL1208 This driver supports reading and writing the RTC/calendar and detects total power failures. +config RTC_RK808 + bool "Enable Rockchip RK8XX RTC driver" + depends on DM_RTC && PMIC_RK8XX + default y + help + Basic support for Rockchip RK808 PMIC Real Time Clock devices for + time and date. + config RTC_RV3029 bool "Enable RV3029 driver" depends on DM_RTC diff --git a/drivers/rtc/Makefile b/drivers/rtc/Makefile index 12eb449583..63e2c3413d 100644 --- a/drivers/rtc/Makefile +++ b/drivers/rtc/Makefile @@ -44,6 +44,7 @@ obj-$(CONFIG_RTC_PCF8563) += pcf8563.o obj-$(CONFIG_RTC_PCF2127) += pcf2127.o obj-$(CONFIG_RTC_PL031) += pl031.o obj-$(CONFIG_RTC_PT7C4338) += pt7c4338.o +obj-$(CONFIG_RTC_RK808) += rk808-rtc.o obj-$(CONFIG_RTC_RS5C372A) += rs5c372.o obj-$(CONFIG_RTC_RV3029) += rv3029.o obj-$(CONFIG_RTC_RV8803) += rv8803.o diff --git a/drivers/rtc/rk808-rtc.c b/drivers/rtc/rk808-rtc.c new file mode 100644 index 0000000000..50cca4dd4b --- /dev/null +++ b/drivers/rtc/rk808-rtc.c @@ -0,0 +1,173 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * RTC driver for Rockchip RK808 PMIC. + * + * Copyright (C) 2020 Amarula Solutions(India). + * Suniel Mahesh + * + * Based on code from Linux kernel: + * Copyright (c) 2014, Fuzhou Rockchip Electronics Co., Ltd + * Author: Chris Zhong + * Author: Zhang Qing + * + * Date & Time support (no alarms and interrupts) + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* RTC_CTRL_REG bitfields */ +#define BIT_RTC_CTRL_REG_STOP_RTC_M BIT(0) + +/* RK808 has a shadowed register for saving a "frozen" RTC time. + * When user setting "GET_TIME" to 1, the time will save in this shadowed + * register. If set "READSEL" to 1, user read rtc time register, actually + * get the time of that moment. If we need the real time, clr this bit. + */ + +#define BIT_RTC_CTRL_REG_RTC_GET_TIME BIT(6) +#define BIT_RTC_CTRL_REG_RTC_READSEL_M BIT(7) +#define RTC_STATUS_MASK 0xFE + +#define SECONDS_REG_MSK 0x7F +#define MINUTES_REG_MAK 0x7F +#define HOURS_REG_MSK 0x3F +#define DAYS_REG_MSK 0x3F +#define MONTHS_REG_MSK 0x1F +#define YEARS_REG_MSK 0xFF +#define WEEKS_REG_MSK 0x7 + +/* REG_SECONDS_REG through REG_YEARS_REG is how many registers? */ + +#define NUM_TIME_REGS (REG_WEEKS - REG_SECONDS + 1) + +static int rk808_rtc_set(struct udevice *dev, const struct rtc_time *tm) +{ + u8 rtc_data[NUM_TIME_REGS]; + + debug("RTC date/time %4d-%02d-%02d(%d) %02d:%02d:%02d\n", + tm->tm_year, tm->tm_mon, tm->tm_mday, + tm->tm_wday, tm->tm_hour, tm->tm_min, tm->tm_sec); + + rtc_data[0] = bin2bcd(tm->tm_sec); + rtc_data[1] = bin2bcd(tm->tm_min); + rtc_data[2] = bin2bcd(tm->tm_hour); + rtc_data[3] = bin2bcd(tm->tm_mday); + rtc_data[4] = bin2bcd(tm->tm_mon); + rtc_data[5] = bin2bcd(tm->tm_year - 2000); + rtc_data[6] = bin2bcd(tm->tm_wday); + + /* Stop RTC while updating the RTC registers */ + pmic_clrsetbits(dev->parent, REG_RTC_CTRL, 0, + BIT_RTC_CTRL_REG_STOP_RTC_M); + pmic_write(dev->parent, REG_SECONDS, rtc_data, NUM_TIME_REGS); + + /* Start RTC again */ + pmic_clrsetbits(dev->parent, REG_RTC_CTRL, + BIT_RTC_CTRL_REG_STOP_RTC_M, 0); + + return 0; +} + +static int rk808_rtc_get(struct udevice *dev, struct rtc_time *tm) +{ + u8 rtc_data[NUM_TIME_REGS]; + + /* Force an update of the shadowed registers right now */ + pmic_clrsetbits(dev->parent, REG_RTC_CTRL, 0, + BIT_RTC_CTRL_REG_RTC_GET_TIME); + + /* + * After we set the GET_TIME bit, the rtc time can't be read + * immediately. So we should wait up to 31.25 us, about one cycle of + * 32khz. If we clear the GET_TIME bit here, the time of i2c transfer + * certainly more than 31.25us: 16 * 2.5us at 400kHz bus frequency. + */ + pmic_clrsetbits(dev->parent, REG_RTC_CTRL, + BIT_RTC_CTRL_REG_RTC_GET_TIME, 0); + pmic_read(dev->parent, REG_SECONDS, rtc_data, NUM_TIME_REGS); + + tm->tm_sec = bcd2bin(rtc_data[0] & SECONDS_REG_MSK); + tm->tm_min = bcd2bin(rtc_data[1] & MINUTES_REG_MAK); + tm->tm_hour = bcd2bin(rtc_data[2] & HOURS_REG_MSK); + tm->tm_mday = bcd2bin(rtc_data[3] & DAYS_REG_MSK); + tm->tm_mon = (bcd2bin(rtc_data[4] & MONTHS_REG_MSK)); + tm->tm_year = (bcd2bin(rtc_data[5] & YEARS_REG_MSK)) + 2000; + tm->tm_wday = bcd2bin(rtc_data[6] & WEEKS_REG_MSK); + + /* + * RK808 PMIC RTC h/w counts/has 31 days in november. This is corrected + * when date cmd is invoked on prompt. checks for the current day and + * if it is 31 November, then adjusts it to 1 December. + * + * h/w also has weeks register which counts from 0 to 7(0(sun)-6(sat)). + * 7 is an unknown state, reset it back to 0(sun). + */ + if (tm->tm_mon == 11 && tm->tm_mday == 31) { + debug("correcting Nov 31st to Dec 1st (HW bug)\n"); + tm->tm_mon += 1; + tm->tm_mday = 1; + if (tm->tm_wday == 7) + tm->tm_wday = 0; + rk808_rtc_set(dev, tm); + } + + if (tm->tm_wday == 7) { + tm->tm_wday = 0; + rk808_rtc_set(dev, tm); + } + + debug("RTC date/time %4d-%02d-%02d(%d) %02d:%02d:%02d\n", + tm->tm_year, tm->tm_mon, tm->tm_mday, + tm->tm_wday, tm->tm_hour, tm->tm_min, tm->tm_sec); + + return 0; +} + +static int rk808_rtc_reset(struct udevice *dev) +{ +/* Not needed */ + return 0; +} + +static int rk808_rtc_init(struct udevice *dev) +{ + struct rtc_time tm; + + /* start rtc running by default, and use shadowed timer. */ + pmic_clrsetbits(dev->parent, REG_RTC_CTRL, 0, + BIT_RTC_CTRL_REG_RTC_READSEL_M); + pmic_reg_write(dev->parent, REG_RTC_STATUS, RTC_STATUS_MASK); + + /* set init time */ + rk808_rtc_get(dev, &tm); + + return 0; +} + +static int rk808_rtc_probe(struct udevice *dev) +{ + rk808_rtc_init(dev); + + return 0; +} + +static const struct rtc_ops rk808_rtc_ops = { + .get = rk808_rtc_get, + .set = rk808_rtc_set, + .reset = rk808_rtc_reset, +}; + +U_BOOT_DRIVER(rk808_rtc) = { + .name = "rk808_rtc", + .id = UCLASS_RTC, + .ops = &rk808_rtc_ops, + .probe = rk808_rtc_probe, +}; From patchwork Fri Jul 10 15:50:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 1482 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pl1-f197.google.com (mail-pl1-f197.google.com [209.85.214.197]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 62C963F06D for ; Fri, 10 Jul 2020 17:51:57 +0200 (CEST) Received: by mail-pl1-f197.google.com with SMTP id x23sf3669995plr.17 for ; Fri, 10 Jul 2020 08:51:57 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1594396316; cv=pass; d=google.com; s=arc-20160816; b=AtyEKC6Dn11TmZOJkY0Uchh/8axwHTZzZmrG+RQATcsf6QA+rafYDRqZHlZnRGkB2X vv4r4PU26Xc02cuwnGQTJQy2C1cLyYekdB8mu2o0FHlP0qPHMpETGB9wD/Q+dW5S4AX5 qxi2MU9Z+2EzuknWgkvxlnuv43avZYcn0etKP3mgqLPOYzZs1dRFeuI2FydEWzXMsPCx eCGvY7TGHyU/sXX5NY0Ja/Sr7JdO1FRmZ8N2u/+7BfTkqNk0n8BAI22POhDw3Q9+7JCZ 1YGttCyIPw08rejXIE/d7jUg6E+YAVhVlZssqemOhzMF0OevADTopB/P51nbWIh0Z1ot nklQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=NH+1k/on5HF1SvOaW2JEwJk2OZmOhv9YEq2OyAkEA9w=; b=anH4I/9uTPsWMFYGK8wl88F//FfhNsdOq7Hexb5sp5Oq2PEE+rO4kn9SyJHAA9xpXm gRThJv2O6GIFskCLT95DcMTbXqGRSE2ZUu7WJvrNI5rt7OhxulW8ydmYQJteGIJ08Rnc ksNI9MErWrxY7KVTLpybTG9JP/v/fQcjTrn0NL0QrzOaQwnP9Azor08snt/pc4Hzr1hG fCjMvs2sRkFHsvhq8cCzb3hjN9TblVBp7jTAYJy5thoxUI+3/GlbwLpl88LWACPKwiT+ 3dWfbsqX2zc3s0+YOCe/hiwsmCRr6tqxD9XKKGgP6vtZ8SQIGTqNjf8HuQo5O61tnF8G F/ZA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=MzjyTql1; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com 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:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=NH+1k/on5HF1SvOaW2JEwJk2OZmOhv9YEq2OyAkEA9w=; b=QEwXe2wxnab5mvwuSbvrg53owLRwElLvfdWU2ZZml/9G+nXDzARQbm8Lu+kB0Yh/sH 0q4ue1S94XcUrwy6M0aWLeolu+hBZ1pztv29uqKNen9tYlFvtiO0GtUbOkfI53Fy6Yjp HWdeAp0IPVjPde1TBS7mIP/+zW/JYcmS5esfM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=NH+1k/on5HF1SvOaW2JEwJk2OZmOhv9YEq2OyAkEA9w=; b=eJOzhU5O2pqbSfOJEv9Ng0DDmiEpivz1QbJOYXHN1nGJlP60eMYIXWyXZhLEg4CgZM OalQlxIUVnOuQW7DxvE4kpVeghWafYttaEieZNCIz5cTkDIFdcxRSfmzfCd6om8H57kq fw00wGhLyFMNnf0+rB/iGbwI2NFSPa/ZXUIJxbiAjr27is7IFI4yD9GLm4x9YVB+qWlu yXsvaaH55sczxj2xzqGneOjVy4qfmL7K8aCqrhE6XX/qUeU7FnK4tdbrQGtV1Yv9m4iH jGYwuvoQ1DDy1rHu8SS6vX/oE8yLUvIn5LtoCBZONSpK69kdhHJGzavIVfw+JZulxYWH dtZg== X-Gm-Message-State: AOAM5331GjNarNMRME8SBUSxXXCBcMQerADVtxAo2Fha6ZrQNxI0D88M W4jgGrsVF+oXiyQBafnRDs+kEh+x X-Google-Smtp-Source: ABdhPJz1YN6lxZioLL3ELU/d1xKM040vlLcxRwEZe4RBN/Nz1kDNkvD+4mqm/NvG/HtBvZLnJ2mGNQ== X-Received: by 2002:a63:6c1:: with SMTP id 184mr60854334pgg.262.1594396315513; Fri, 10 Jul 2020 08:51:55 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:90a:658c:: with SMTP id k12ls4362985pjj.3.gmail; Fri, 10 Jul 2020 08:51:55 -0700 (PDT) X-Received: by 2002:a17:90b:1246:: with SMTP id gx6mr6579013pjb.85.1594396315047; Fri, 10 Jul 2020 08:51:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594396315; cv=none; d=google.com; s=arc-20160816; b=rcb4c8R5B5Qw2A/Gf0cwGPg/ELaI/LAV0unpNmNciH4umaC8qKn+wDE9fTu6zDyWE0 oouClCWFCluolo7cFAGiQqOF6fNe+PWVzRcP0vO836lWXJ+6lHCFH4ALzqde/GtuK/qS J0CpbYn9nQG8ZYmmqRxumaAOG/9VpEr5l20PTqsFVwGNpFAwXScdW4pl/lt8IfFAvmqH 7tt53dkl2x+PG+NSxeW6aiOG1OhLIXSghZYI3tjOjU/NKZrZ3qOsF06vSCJ5MEznIy6G 3e60gk3hqkbepWEOhY2s1VzmaSZ3EUgySqLCRTsllnB8eREi3pSuq3CjOTnb85kS6b3J 86Wg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=xFpkBbL42GLt0HZdMSx0oJkSrSDntRjmPYqLW/dwacc=; b=zs3t3NkvHcNXElUhSTA5BQl+3nEjyzrPM5xsFVSNtWlBHOdhxo+ZtOftKMVV+ZL9Xg Ue2Dmd/KWN5HL/Kw6wHl4POfeOkJQ1idUoGS7jSlQFaI+Wp4rUoq9oSMpbbBQ1oMgCkJ Xp0qVJ3+xMWhdPDobUDovyrsg03UvMhryOEyBwW/b3rmxXfDGmKvCcbVOTJmJ27YY/eL 2HPTfbIyaH12b247x1LXGxhEOTNXMgdnRNpT2dTH+85AzC8I41qHJAcR2nq0t8Ah1HzD 8d49kHMHGfjtm0fZjlVSBx5eWekl93QjP4n3Vy5AL0ZNJoDGV8Rbb6VRAzq54X85cGPK oOew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=MzjyTql1; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id l9sor8614541pjf.41.2020.07.10.08.51.55 for (Google Transport Security); Fri, 10 Jul 2020 08:51:55 -0700 (PDT) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Received: by 2002:a17:90a:2749:: with SMTP id o67mr6518795pje.183.1594396314701; Fri, 10 Jul 2020 08:51:54 -0700 (PDT) Received: from localhost.localdomain ([2405:201:c809:c7d5:a1d6:54e3:577a:ace0]) by smtp.gmail.com with ESMTPSA id lx2sm6398917pjb.16.2020.07.10.08.51.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Jul 2020 08:51:54 -0700 (PDT) From: Jagan Teki To: Kever Yang , Philipp Tomsich , Simon Glass Cc: Suniel Mahesh , U-Boot-Denx , linux-rockchip@lists.infradead.org, linux-amarula , Jagan Teki Subject: [PATCH v4 4/4] roc-rk3399-pc: Enable DM RTC Date: Fri, 10 Jul 2020 21:20:57 +0530 Message-Id: <20200710155057.310168-5-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200710155057.310168-1-jagan@amarulasolutions.com> References: <20200710155057.310168-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=MzjyTql1; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Suniel Mahesh Enable rtc driver DM for rk808 PMIC's. Signed-off-by: Suniel Mahesh Signed-off-by: Jagan Teki --- Change for v4: - drop CMD_DATE configs/roc-pc-mezzanine-rk3399_defconfig | 1 + configs/roc-pc-rk3399_defconfig | 1 + 2 files changed, 2 insertions(+) diff --git a/configs/roc-pc-mezzanine-rk3399_defconfig b/configs/roc-pc-mezzanine-rk3399_defconfig index 3ceecf753f..20a0e03b12 100644 --- a/configs/roc-pc-mezzanine-rk3399_defconfig +++ b/configs/roc-pc-mezzanine-rk3399_defconfig @@ -57,6 +57,7 @@ CONFIG_REGULATOR_RK8XX=y CONFIG_PWM_ROCKCHIP=y CONFIG_RAM_RK3399_LPDDR4=y CONFIG_DM_RESET=y +CONFIG_DM_RTC=y CONFIG_BAUDRATE=1500000 CONFIG_DEBUG_UART_SHIFT=2 CONFIG_ROCKCHIP_SPI=y diff --git a/configs/roc-pc-rk3399_defconfig b/configs/roc-pc-rk3399_defconfig index 6943d4fd54..e6627ac56a 100644 --- a/configs/roc-pc-rk3399_defconfig +++ b/configs/roc-pc-rk3399_defconfig @@ -54,6 +54,7 @@ CONFIG_REGULATOR_RK8XX=y CONFIG_PWM_ROCKCHIP=y CONFIG_RAM_RK3399_LPDDR4=y CONFIG_DM_RESET=y +CONFIG_DM_RTC=y CONFIG_BAUDRATE=1500000 CONFIG_DEBUG_UART_SHIFT=2 CONFIG_ROCKCHIP_SPI=y