From patchwork Thu Jul 2 08:48:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 1432 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pj1-f72.google.com (mail-pj1-f72.google.com [209.85.216.72]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 02FA33F082 for ; Thu, 2 Jul 2020 10:48:52 +0200 (CEST) Received: by mail-pj1-f72.google.com with SMTP id bf1sf11284120pjb.6 for ; Thu, 02 Jul 2020 01:48:52 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1593679731; cv=pass; d=google.com; s=arc-20160816; b=nZVlCCDPhFVCR/fmQS0V3r6EMQIU9PlCytkE+SHEVvricTmpyE2sO2KF1HcjVrBm/s wx0nOLeHNOVeQZRmEuhU+TENg6I86efgWmpK+xjhptKlTSIMHjxuxBAODgkMikI20tv2 zvWIADRayzhT0FKFZqdW6EIwt0XSFd/SZaHC45jEZE6pkpLMDahxIOHDEHIfcREFzloS 3Wum0rv64flocFGo1puYEJerblJ8dh/9zYvQ5qbPLdVHZbCQV2oQZtfHUvPK9/SX5WJl kfDMpQ7qTwa+9qXnOIbTNdv+u0AtTLLXDq8TfAjD7Rwcwrr9DRpVKK84d/bwDj6a0Ohs lSMQ== 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:message-id:date:subject:cc:to :from:dkim-signature; bh=OBdihWLyoqePD5iTzWyIom4Jsgl6YKLyibM9pCsplJA=; b=NU43eChY3Zq8Esb551rVoRKUIB0DgiwwLMk5ioGybesATCbGy8abOSQG3YfdoWbBzY qdMXT7ZEwOjmHiAROsazLJPZqz/rqWfEwStBrU1V/6lNgkgt+TTXKYeIattYUhY068JB La/pjFAjnVKwu7Bmx+3MBM4RL9Ev3zeXmrt6DzLfH0HSROtMPt7+F2ZRdue+imtvDg5K FneiWTn4ZaXdBHQYoOocE/CoVYL9/h11d3t30mXgxEYFe/+Ypsm3jI0T6nKE5Ca2Hloc v3qDl9BAtVtPgxKT+duC2hDCGT65XSVyW87H0JcmyE4Mz2Qb71PafNimd1KWwcT9NVt/ HsNw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=FJxO5+ir; 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:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=OBdihWLyoqePD5iTzWyIom4Jsgl6YKLyibM9pCsplJA=; b=PeBT972TwHBIjcYs/+drPIi0/eDESP4Dxg19c81EGoLRHsdxSv97TLfj4R6vCp5bKC PIpk0C6yNaw9v6Ph/u3S4cwmDmRHK7ZNvJJgGkLor6s6uW7r0NyIWv/UTAUAKzmirpaF WnByH4PkLWjEfs50QkGHEPQKZ68/7rzUtmRJQ= 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: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=OBdihWLyoqePD5iTzWyIom4Jsgl6YKLyibM9pCsplJA=; b=ewdNtZT2sQCSeiv1cY2ui1x9tg3ypkoqmHcPhO1ZVI7ba+gGWULWOUjRiYf1QMzRwL mEu5jiy1JHP9YnjtJWkFiuJfZzhCjGH8Rh2ESaNaGPUPiZDzx3EwwMfHQvkr9Ly5kcik b4Cxysoj9//1hxM0wcNMhxtRDuvHPd9HUmRL0JrAnKZnECHXY6VOX67dqH6ZE1hUph25 mbtM//la2fiRCIaxdjYgNs1ZtjceJX6fVbcpoNCCnOAVveKTQhM8lxeHAwS0Kk+6SMrm WvG+bRL/1vICNefSTePO0Xx4XyLVB5s7nzEjLWKNCHzeSSIuu889+Zce4KSCKvXfBP3K iRzg== X-Gm-Message-State: AOAM532fUlQf52GY8Z3spO3nIaTg+i14y3uTCz/V0X6+vOa4o8AmyrUV ar3atvbNedRfs5AX6EPwexpCaF1z X-Google-Smtp-Source: ABdhPJzwfqsLp4US75mIgacFSEVZwl/zZXMgIEZwchqiSo5d6RbT3BCgRyoNqKzh+ooGW0LpO9uU+Q== X-Received: by 2002:a17:90a:2367:: with SMTP id f94mr32837274pje.20.1593679730918; Thu, 02 Jul 2020 01:48:50 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a62:8446:: with SMTP id k67ls1633417pfd.5.gmail; Thu, 02 Jul 2020 01:48:50 -0700 (PDT) X-Received: by 2002:a63:1f09:: with SMTP id f9mr23137785pgf.324.1593679730422; Thu, 02 Jul 2020 01:48:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593679730; cv=none; d=google.com; s=arc-20160816; b=ShRN5Jjwi6d3ewVyxecmheH3Gg72iAEdYeyR3lAUitGMiy6XFQrzE/OAy1dVMPW2xU z5n2yTuD2oKW7TjQvQ/HSqm+auc1SboUS5EdPxASxES9KA9wvKpF6CCOflNpgil//8/B qXhUY/AeR/mUuCOiimaAhBmtG0fKR758BIov/kdN5uJUO+/wQgXr+XogOJ+TPpDSCqiP ljxAWkqTQxQKcE4NKSyd5w/4p3bt1fOU6Zr+LjKqEB9ODsNCShGUnTKUBgpyfEML3cTy ZuqosBd/n1ZYpQVgF/RqXE15PbxET+W8fHyrSmzGvnk1qzIgo3dgSGTUSnD4TyXyzgCd /GOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=wY3+1bQy75Ooj4SRznvIgDDKWK1pDcQ+Z/6oKkhYiic=; b=g0/9+fNeJ4u3eGgr5HybSP9GF5iJzXehqsNnnqz07bqj2anKRCIyR5x82uIPEGL08z Qscy7l7kSCskH6qmDud5Ggti4oA9XP9iHnvGLkxkk7QMso3T4MaQFloYDby1ugoeoYr2 XrMfrFCz5XNLPoCzgQ3SM308duMKBwsCRYva/xmxaM2eIB6MAOmUSU/po8isSAWfVHQ4 B9+IL1SyKYZibTk63nGArUDXG+8rbXB8oyQsuBUk4NqSflGSLvdBmse5NNFlU08Mu+OO FvQhCtFiEE10EoMhRevZpzXeY1mwTx+7+4OhArtxlSVPvcgbDJMDGchc95qCvf6JFGUS hiBQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=FJxO5+ir; 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 v11sor10692517pfu.96.2020.07.02.01.48.50 for (Google Transport Security); Thu, 02 Jul 2020 01:48:50 -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:9736:: with SMTP id k22mr26808526pfg.62.1593679729845; Thu, 02 Jul 2020 01:48:49 -0700 (PDT) Received: from localhost.localdomain ([2405:201:c809:c7d5:a961:9b2e:1b93:8ca7]) by smtp.gmail.com with ESMTPSA id q92sm7413406pjh.12.2020.07.02.01.48.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Jul 2020 01:48:49 -0700 (PDT) From: Jagan Teki To: Kever Yang , Philipp Tomsich , Simon Glass , heiko@sntech.de, mylene.josserand@collabora.com Cc: Suniel Mahesh , Michael Trimarchi , U-Boot-Denx , linux-rockchip@lists.infradead.org, linux-amarula , Jagan Teki Subject: [PATCH] rockchip: rk3288: Add OF board setup Date: Thu, 2 Jul 2020 14:18:20 +0530 Message-Id: <20200702084820.35942-1-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 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=FJxO5+ir; 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: , The new rk3288 revision rk3288w has some changes with respect to legacy rk3288 like hclk_vio and usb host0 ohci. In order to work these on the same in Linux kernel update the compatible the root compatible with rockchip,rk3288w before booting. So, this support during of board setup code of rk3288. Signed-off-by: Jagan Teki Reviewed-by: Kever Yang --- arch/arm/mach-rockchip/Kconfig | 1 + arch/arm/mach-rockchip/rk3288/rk3288.c | 26 ++++++++++++++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/arch/arm/mach-rockchip/Kconfig b/arch/arm/mach-rockchip/Kconfig index b1008a5058..822d8d4e9c 100644 --- a/arch/arm/mach-rockchip/Kconfig +++ b/arch/arm/mach-rockchip/Kconfig @@ -98,6 +98,7 @@ config ROCKCHIP_RK322X config ROCKCHIP_RK3288 bool "Support Rockchip RK3288" select CPU_V7A + select OF_BOARD_SETUP select SUPPORT_SPL select SPL select SUPPORT_TPL diff --git a/arch/arm/mach-rockchip/rk3288/rk3288.c b/arch/arm/mach-rockchip/rk3288/rk3288.c index 804abe8a1b..8a682675e6 100644 --- a/arch/arm/mach-rockchip/rk3288/rk3288.c +++ b/arch/arm/mach-rockchip/rk3288/rk3288.c @@ -115,6 +115,32 @@ int rk_board_late_init(void) return rk3288_board_late_init(); } +#ifdef CONFIG_OF_BOARD_SETUP + +#define RK3288_HDMI_PHYS 0xff980000 +#define RK3288W_HDMI_REV 0x1A +#define HDMI_CONFIG0_ID 0x04 + +int ft_board_setup(void *blob, bd_t *bd) +{ + u8 config0; + int ret; + + config0 = readb(RK3288_HDMI_PHYS + HDMI_CONFIG0_ID); + if (config0 == RK3288W_HDMI_REV) { + ret = fdt_setprop_string(blob, 0, + "compatible", "rockchip,rk3288w"); + if (ret < 0) { + printf("failed to set rk3288w compatible (ret=%d)\n", + ret); + return ret; + } + } + + return 0; +} +#endif + static int do_clock(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) {