From patchwork Fri Jan 24 09:33:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Suniel Mahesh X-Patchwork-Id: 1049 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pg1-f198.google.com (mail-pg1-f198.google.com [209.85.215.198]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 2CE353F093 for ; Fri, 24 Jan 2020 10:34:15 +0100 (CET) Received: by mail-pg1-f198.google.com with SMTP id l13sf1076943pgt.5 for ; Fri, 24 Jan 2020 01:34:15 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1579858453; cv=pass; d=google.com; s=arc-20160816; b=RWaC4vbh1aY2agLcrW6aS3oeehFaW0L5Mxs7v7o9euaDcSo3tOy8CcRF8p4KflExWn cjZptNwnP1ddoZ0TyeTnMuXScSTG4WDoDgfswBN5aVPMYhZzWpP11E0OSPP9PTiVrsq3 WZscbHLZCI3zu0MEoZzRtYdbKAjTLojBWuLhTUZi9ERhraVBtvNmo0/2rBMDcGnz2vo9 fS61T7r8F2xfbZb26wluv30/S7o+on8zX0SE7Jxa8YqKsGGZvBE9+pq8DwmHifWEwjLZ XOBZcMKgWEqQ0zTENPNs8/xgpupF5leoEODCSFdAe9LoGw4PyiHGgIQZAwG6E0lmqiYp A32A== 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:message-id:date:subject:cc:to:from :mime-version:dkim-signature; bh=Nero8e09vQ3dEqlHeyfr7S99X1qLNUcewu+WBldxsCE=; b=0QrVmTyiIh+pCXC7k3w6wSZNFUnsUacW2dleejjwpzen0sdvdZCm1BylrJByVx7QKH v5lcEA57NhVIlUJ/lsHxtdAIdypJzaX/dTQ2+nmdBwV4gPouuwjZyXSe5N5UjTYME5AQ +SiJjzCu4nd1EqtxIshY3ZgKozxIC30y+YNkzW1UQUOzri1VxmDnLnADoooAfgVi/VI0 Dnju1milSnAvTTECFsvjmhDihZD8p/+mqABAu8iXcnv6shwbgCCQLc4ju6ezylyYrqSu o2LAnP7V2c/ol+e1riJntPTGEQtfSOVFUKz1OOpi8kMzDNFRCvJPewAYaaAaDnyD9Nrk YTjQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="mQjE/qWn"; spf=pass (google.com: domain of sunil@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=sunil@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=mime-version:from:to:cc:subject:date:message-id:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=Nero8e09vQ3dEqlHeyfr7S99X1qLNUcewu+WBldxsCE=; b=R4DRUx83nKz4kMI0Ui9NrUkoa+HCnUtxEesW/2ys97Db8Qh94+aq88PEw4oQkVQo/7 7Q3oJIlm8i9YkAbpJ4yNOol7iahTpIhAjACkKR3Eha3DtCQSd7UPhYaSn3a5hsHFdxFv Ek0YcLqhhw8rHA8Q7KW4SpFWxnKnfvY6g4oQA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:to:cc:subject:date:message-id :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=Nero8e09vQ3dEqlHeyfr7S99X1qLNUcewu+WBldxsCE=; b=U88NB44WKbhQdcYijONt9OprgUiMLzkFgGhFjIwmqG/swaXXC5g/ThWT3lm5njMhb6 E79X1i6m1E0SQnZj5HJxqFBAig2vnQGHUzZKR9QsBAU8kMtJScQkFXp3iVUU+hIe/6fG FMozUr4sIJ+CXToady3bN+RLeTGRl1yDtsOe1IhHxxKTQymUdnxWSYrcsIwXx5vyOjZk crLU7t48NxH3U1M1jBWwqOtxkf0kJXXIc2iTXH0KoqhavQzLuOddbwlQEPpVtYROq6At CHXq2WyzfgVy80C4eMmPn0tt3aDdcGXsgbn0EiIdK2f9/cGgAd1kXYrsEHZ45zkkI1RG ZCew== X-Gm-Message-State: APjAAAV7WP+Hb+weoEKtdEmyhWYgUi5TnLtV/LsBAV7duNkPEeNW3omV fuh3GKRBr2a+Pf8ZwMsruh9EDVhh X-Google-Smtp-Source: APXvYqyAJ2Q+wpHqzbbhJ5pB9gSir7TfNGuRjFzlVvwwZE58PLyUl/DzjzOAqFbXcgVOkCfnq4XpbA== X-Received: by 2002:a17:90a:cf11:: with SMTP id h17mr2299394pju.103.1579858452972; Fri, 24 Jan 2020 01:34:12 -0800 (PST) MIME-Version: 1.0 X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:90a:3ae2:: with SMTP id b89ls936802pjc.2.canary-gmail; Fri, 24 Jan 2020 01:34:12 -0800 (PST) X-Received: by 2002:a17:902:5ac9:: with SMTP id g9mr2582077plm.69.1579858452303; Fri, 24 Jan 2020 01:34:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579858452; cv=none; d=google.com; s=arc-20160816; b=tM1ct0e1UZ/QzS0trLcZR47xTqfDK0ptcnT3LgzTOM6XebZg1azEnnF/ha6fmZx+0A 2ZLOPi1ty74Vjlo61zifIkD4B6ugOABTzs2KAq92/G+epgOVrozN6BqpLi2IkauNLphc /9jlArX5fWvFrp+EdgsIxQ0EfSoeWEtbilHGNwdweTFBm4r28M+OR1s6gHPlaFyc6udE bCnI7a57U+zIInClaeh6O8AQlkC6R0PIp8Y0gmsw7IQk26T+J1yOv1A4v6CZ0jZ5CE90 2WNtHuStlZQhdcxmCbEX0IYb+grk5eIytwnxWWA1abR622A61gN73fOiUqWKaWXijpni vuzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:date:subject:cc:to:from:dkim-signature; bh=nw0Rc5u+O+8Hoayvw45jco2Gw5BK28OPDMjsV7ARJbY=; b=xjqUD5Yck03h96B2Mi/INzSjx/LhG+MIjK+KoPZNiA4w9sWzK8fzvY2I6t4fxyzLaw X05Xso2Ef6lazS+4/+L7Ci0Dl4tmwd1n2lI+wRFm2msOGshGLXaitCKlTFkEMRgxyaPj sy8qCEzqNlQqOscOG4gV1XLSB3QKwGzk/p354G3Ihm4TLjo3LG6CWlWxca+ns5Tbrme/ o3ezPw/dKnUA2wYrlJDKSiwHjyscW6ZVQowzE1Kcj3lLUSYwIEW/EAF/NCgjuv2Ii3QX fHCJVm1t/ycAOdPrTfvl1KFLbNIJm5FwTLIWSOsY3ZTmgWbTGXuPYf1k7fj5qMxJCiCr 7ngQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="mQjE/qWn"; spf=pass (google.com: domain of sunil@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=sunil@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 bd11sor6015276plb.38.2020.01.24.01.34.11 for (Google Transport Security); Fri, 24 Jan 2020 01:34:11 -0800 (PST) Received-SPF: pass (google.com: domain of sunil@amarulasolutions.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; X-Received: by 2002:a17:902:b206:: with SMTP id t6mr2722235plr.211.1579858451089; Fri, 24 Jan 2020 01:34:11 -0800 (PST) Received: from localhost.localdomain ([49.206.200.248]) by smtp.gmail.com with ESMTPSA id r2sm5716470pgv.16.2020.01.24.01.34.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 24 Jan 2020 01:34:10 -0800 (PST) From: sunil@amarulasolutions.com To: jagan@amarulasolutions.com Cc: linux-amarula@amarulasolutions.com, Suniel Mahesh Subject: [PATCH 1/2] rockchip: rk3399: split roc-rk3399-pc out of evb_rk3399 Date: Fri, 24 Jan 2020 15:03:57 +0530 Message-Id: <1579858438-13035-1-git-send-email-sunil@amarulasolutions.com> X-Mailer: git-send-email 2.7.4 X-Original-Sender: sunil@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="mQjE/qWn"; spf=pass (google.com: domain of sunil@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=sunil@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 roc-rk3399-pc board has one user button & three user LED's (red, green, yellow). At present there is no code to use them in full effect(for instance yellow led can be used to indicate low power mode and red led can be used to indicate full power mode with the help of push button). Split into its own board file to acheive any custom functionality. Signed-off-by: Suniel Mahesh --- arch/arm/mach-rockchip/rk3399/Kconfig | 20 ++++++++++++++++++++ board/firefly/roc-rk3399-pc/Kconfig | 16 ++++++++++++++++ board/firefly/roc-rk3399-pc/MAINTAINERS | 6 ++++++ board/firefly/roc-rk3399-pc/Makefile | 7 +++++++ board/firefly/roc-rk3399-pc/roc-rk3399-pc.c | 29 +++++++++++++++++++++++++++++ configs/roc-pc-rk3399_defconfig | 1 + include/configs/roc-rk3399-pc.h | 15 +++++++++++++++ 7 files changed, 94 insertions(+) create mode 100644 board/firefly/roc-rk3399-pc/Kconfig create mode 100644 board/firefly/roc-rk3399-pc/MAINTAINERS create mode 100644 board/firefly/roc-rk3399-pc/Makefile create mode 100644 board/firefly/roc-rk3399-pc/roc-rk3399-pc.c create mode 100644 include/configs/roc-rk3399-pc.h diff --git a/arch/arm/mach-rockchip/rk3399/Kconfig b/arch/arm/mach-rockchip/rk3399/Kconfig index f994152..7482587 100644 --- a/arch/arm/mach-rockchip/rk3399/Kconfig +++ b/arch/arm/mach-rockchip/rk3399/Kconfig @@ -81,6 +81,25 @@ config TARGET_ROCKPRO64_RK3399 * GPIO expansion ports * DC 12V/2A +config TARGET_ROC_RK3399_PC + bool "Firefly ROC-RK3399-PC board" + help + ROC-RK3399-PC is SBC produced by Firefly. Key features: + + * Rockchip RK3399 + * 4GB Dual-Channel LPDDR4 64-bit + * SD card slot + * eMMC socket + * 16MB SPI Flash + * Gigabit ethernet + * PCIe + * HDMI In/Out, DP, MIPI DSI/CSI, eDP + * USB 3.0, 2.0 + * USB Type C power and data + * GPIO expansion ports + * wide voltage input(5V-15V), dual cell battery + * Wifi/BT accessible via expansion board M.2 + endchoice config ROCKCHIP_BOOT_MODE_REG @@ -128,5 +147,6 @@ source "board/theobroma-systems/puma_rk3399/Kconfig" source "board/vamrs/rock960_rk3399/Kconfig" source "board/google/gru/Kconfig" source "board/pine64/rockpro64_rk3399/Kconfig" +source "board/firefly/roc-rk3399-pc/Kconfig" endif diff --git a/board/firefly/roc-rk3399-pc/Kconfig b/board/firefly/roc-rk3399-pc/Kconfig new file mode 100644 index 0000000..26dce89 --- /dev/null +++ b/board/firefly/roc-rk3399-pc/Kconfig @@ -0,0 +1,16 @@ +if TARGET_ROC_RK3399_PC + +config SYS_BOARD + default "roc-rk3399-pc" + +config SYS_VENDOR + default "firefly" + +config SYS_CONFIG_NAME + default "roc-rk3399-pc" + +config BOARD_SPECIFIC_OPTIONS # dummy + def_bool y + +endif + diff --git a/board/firefly/roc-rk3399-pc/MAINTAINERS b/board/firefly/roc-rk3399-pc/MAINTAINERS new file mode 100644 index 0000000..ba6bec9 --- /dev/null +++ b/board/firefly/roc-rk3399-pc/MAINTAINERS @@ -0,0 +1,6 @@ +ROC-RK3399-PC +M: Kever Yang +S: Maintained +F: board/firefly/roc-rk3399-pc/roc-rk3399-pc +F: include/configs/roc-rk3399-pc.h +F: configs/roc-pc-rk3399_defconfig diff --git a/board/firefly/roc-rk3399-pc/Makefile b/board/firefly/roc-rk3399-pc/Makefile new file mode 100644 index 0000000..200dab0 --- /dev/null +++ b/board/firefly/roc-rk3399-pc/Makefile @@ -0,0 +1,7 @@ +# +# (C) Copyright 2016 Rockchip Electronics Co., Ltd +# +# SPDX-License-Identifier: GPL-2.0+ +# + +obj-y += roc-rk3399-pc.o diff --git a/board/firefly/roc-rk3399-pc/roc-rk3399-pc.c b/board/firefly/roc-rk3399-pc/roc-rk3399-pc.c new file mode 100644 index 0000000..d47dba8 --- /dev/null +++ b/board/firefly/roc-rk3399-pc/roc-rk3399-pc.c @@ -0,0 +1,29 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * (C) Copyright 2016 Rockchip Electronics Co., Ltd + */ + +#include +#include +#include +#include + +#ifndef CONFIG_SPL_BUILD +int board_early_init_f(void) +{ + struct udevice *regulator; + int ret; + + ret = regulator_get_by_platname("vcc5v0_host", ®ulator); + if (ret) { + debug("%s vcc5v0_host init fail! ret %d\n", __func__, ret); + goto out; + } + + ret = regulator_set_enable(regulator, true); + if (ret) + debug("%s vcc5v0-host-en set fail! ret %d\n", __func__, ret); +out: + return 0; +} +#endif diff --git a/configs/roc-pc-rk3399_defconfig b/configs/roc-pc-rk3399_defconfig index a9f99f9..6ce1bc2 100644 --- a/configs/roc-pc-rk3399_defconfig +++ b/configs/roc-pc-rk3399_defconfig @@ -2,6 +2,7 @@ CONFIG_ARM=y CONFIG_ARCH_ROCKCHIP=y CONFIG_SYS_TEXT_BASE=0x00200000 CONFIG_ROCKCHIP_RK3399=y +CONFIG_TARGET_ROC_RK3399_PC=y CONFIG_ENV_OFFSET=0x3F8000 CONFIG_NR_DRAM_BANKS=1 CONFIG_DEBUG_UART_BASE=0xFF1A0000 diff --git a/include/configs/roc-rk3399-pc.h b/include/configs/roc-rk3399-pc.h new file mode 100644 index 0000000..b9c4d68 --- /dev/null +++ b/include/configs/roc-rk3399-pc.h @@ -0,0 +1,15 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * (C) Copyright 2016 Rockchip Electronics Co., Ltd + */ + +#ifndef __EVB_RK3399_H +#define __EVB_RK3399_H + +#include + +#define CONFIG_SYS_MMC_ENV_DEV 0 + +#define SDRAM_BANK_SIZE (2UL << 30) + +#endif