From patchwork Mon Jul 11 09:57:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Suniel Mahesh X-Patchwork-Id: 2105 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pj1-f69.google.com (mail-pj1-f69.google.com [209.85.216.69]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id E19913F081 for ; Mon, 11 Jul 2022 11:57:48 +0200 (CEST) Received: by mail-pj1-f69.google.com with SMTP id o21-20020a17090aac1500b001ef977190efsf5714624pjq.7 for ; Mon, 11 Jul 2022 02:57:48 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1657533467; cv=pass; d=google.com; s=arc-20160816; b=AE5YlE1NVbrf32LyjAHMrx+5GvxheLxp76HbLTJouNchEiUuH7v8z6wtLZieB9z0bQ s2MZxxBgP6lyzqPbTn098/4lq4bPfu0ANQqtGgUmT+hUGOL+kswb20Pnbzryl9kuOReo nApUGblWG9C8ttfPibz5DFSSUgt0xCKGrpHEFewXhjwEzV8xSwhaHkfcet19aw0z2aBH 5CLbDPelXpogZN4JX5PYCRV5FdB7ufOdmpb+O/ayaZhYz4juE1gSwAHZHqL49jIYlSRy X4sWFZHodyuaD70jQfXvEcW3ACYJk0e55S2eLySg2FSiTKRbd6VkrQmiRSNTSwtKPOT3 hGlw== 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=mBW/2ut9pta9Qa/bFhAza/+7l4Ec2WD4uWF1ah6M/wI=; b=h4sIgbZCpOhRnzg45xpjyaUSrA/rl2T3okSYUcIjyFkAy+Wsjd6XQ1wcYRcM/SwEMI rcKqcMs66da6+hcZHcGgvpER5d5XiHk+Hgy7N3mguiEd30Xifyx6cXOx6qoM92FJnjtt rmZIKRPQp917ppU9WVQN3EoZy5w3NjJkrPar21axqaNgWY94KsDIP3j5ykRX+deUmhgr YRnbUR3Ywip46QhwamSlXlv4US6awLf/B+cJ9imm2+OanipiO+qTsCz0ZmWlTbpf8Wcu l9d8xmgn1bJPlio4HSHFkHJXOmr1f1Wj3+s5q/1rZfirfcJ/aciFdWVgcYC08KhDUfJv OxHw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=psYo5QDq; spf=pass (google.com: domain of sunil@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=sunil@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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=mBW/2ut9pta9Qa/bFhAza/+7l4Ec2WD4uWF1ah6M/wI=; b=Tuo5qqpn7rrZnKqtPvkAh0EuU0hGsGv7Z57dmqs7kPWE0vtBfgV4D1TY+Ca18he2+n RlvCIXdXtkprdsT9wkVBuyhf+DX5nrN9VlXZflC9Yq5+TpWW+C4ZpKtuWTC0j4ivSHNg AfAWXJ74XxiuViDz6jPxmvFKJ/YvYzmeNVCw0= 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: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=mBW/2ut9pta9Qa/bFhAza/+7l4Ec2WD4uWF1ah6M/wI=; b=SOPjkkXqtwwhQalBHXYErhbtDzHIoVr2HcC6xGls9GREn1ZaF18NGzBdISzeYa+YaH 1UCWcYSYOYndY3dxxHRz4CXZ1k6HWIddCaK3LTWhmmqaGWbSZ58IwKVzz1pLJbeyHvkw cnrHZCrMFxM3BzfVHUFM63xCXY72VovagHEg3nZW8DkF5MVdDj99NDVMkkRQS0SBkT+x 3BzbAYEy8qTeHjvd0RRtcuAZ3czC3lf+xpFVTe2Od+ob54dAbLi26RdPtK++ftdoXf5s i+3yVPuhGHC5dQwz0QO5ZCipMOOPNNi7q+NYXkIdaEMtlNus82eGGRXeRl10vJtAcWrg GmrQ== X-Gm-Message-State: AJIora8J2XWKElYV3IMoa/C09LywAam0hr+pOMVCdgpN0QWvjfeBwH0R DzPzmsqL4V7y6XoPSVU9P2MHVTLy X-Google-Smtp-Source: AGRyM1vWBoFsxy52W8LFtCZhVratrljBlJjus/JTD59m/Ydjgufq5+xNiv5HW6LZ1ljDsG9nFsuaxQ== X-Received: by 2002:a17:902:7807:b0:16b:e3d5:b2ce with SMTP id p7-20020a170902780700b0016be3d5b2cemr17518487pll.18.1657533467684; Mon, 11 Jul 2022 02:57:47 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a65:6b89:0:b0:3fd:d5d8:9b93 with SMTP id d9-20020a656b89000000b003fdd5d89b93ls25055456pgw.3.gmail; Mon, 11 Jul 2022 02:57:47 -0700 (PDT) X-Received: by 2002:a63:2b84:0:b0:412:5277:99dc with SMTP id r126-20020a632b84000000b00412527799dcmr15055264pgr.208.1657533466946; Mon, 11 Jul 2022 02:57:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657533466; cv=none; d=google.com; s=arc-20160816; b=O0uTNW/t9S1MQB8pbNA4Eqn54psNqCwO+AP4uJmyQXCgIF3whooGA0piz9JnbZjKQQ MCgjTc9xoFkzsa8TAr/pCDwMacfrNsDpARhHATVmeB3/PdEW2GfGhzwbiKr/DkSEbUMg AFM2W/0xdMIB3zbHqYkc6t1d+VahXAurYbgf1I6LwE5vfdlMe/9z1JcGpulEM1Ejx/oQ 7k/U9xK9Jd7dRMJxQUBUenRqyed/c75KUteNYsD92YjDN5ilNOJa+O/4wwbKlT6txyyi SQn0t9QbmPRkrjSLVsk6c2vtEdZi7rayRd5brc3LGne3IJNRY5lcH85wyicZRMCXiA+h dJJQ== 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=/dH5AuNv3/3xu+UZsaeD0vwZDTjCSjjCkh8LEd+YI1o=; b=JoqmbtfJ3y4ddRGUSk63eKigodxjsUwOTelNn3kwYiyEzRYJQ8lP881dLm7JSxIOnp Iw5otYXsAUAtmI46PdYbUl6ngZZ3ZDzkPPf4AqYPaI+6NnKjE/QnhTsctgwjDPpU2gx2 t0xURuBsSdjvqGlSw0c8o8s2OKPJSFuY6dwZ5XyGEEmHoED2SXbFlla9NZKqc2cfOFkw Lz7NtwJEhYtBxziw2IXV82Opy4L8ZL7x0M4S0KxTUcRB23yL4jI2dCZzTyGQ+VmSd4zf RUWMlAzbosSiFbV7Zd3wvUCzYUFBMeALkIsT7kS2GgW6hJywXT5CV338dQe5XRHyZRtU V37w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=psYo5QDq; spf=pass (google.com: domain of sunil@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=sunil@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 jf2-20020a170903268200b0016a40f4017bsor2059001plb.66.2022.07.11.02.57.46 for (Google Transport Security); Mon, 11 Jul 2022 02:57:46 -0700 (PDT) Received-SPF: pass (google.com: domain of sunil@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Received: by 2002:a17:902:cf03:b0:16b:a91d:aff4 with SMTP id i3-20020a170902cf0300b0016ba91daff4mr17868029plg.66.1657533466584; Mon, 11 Jul 2022 02:57:46 -0700 (PDT) Received: from localhost.localdomain ([183.83.136.224]) by smtp.gmail.com with ESMTPSA id y3-20020a17090a390300b001ef81bac701sm6560814pjb.42.2022.07.11.02.57.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Jul 2022 02:57:45 -0700 (PDT) From: Suniel Mahesh To: Mark Brown , Chen-Yu Tsai , Maxime Ripard , Christopher Vollo , Michael Trimarchi , Jagan Teki Cc: dri-devel@lists.freedesktop.org, Mark Rutland , Rob Herring , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, Thomas Petazzoni , linux-amarula@amarulasolutions.com Subject: [PATCH v3 2/2] ARM: dts: sun8i: Add R16 Vista E board from RenewWorldOutreach Date: Mon, 11 Jul 2022 15:27:21 +0530 Message-Id: <20220711095721.1935377-3-sunil@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220711095721.1935377-1-sunil@amarulasolutions.com> References: <20220711095721.1935377-1-sunil@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: sunil@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=psYo5QDq; spf=pass (google.com: domain of sunil@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=sunil@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 R16-Vista-E board from RenewWorldOutreach based on allwinner R16(A33). General features: - 1GB RAM - microSD slot - Realtek Wifi - 1 x USB 2.0 - HDMI IN - HDMI OUT - Audio out - MIPI DSI - TI DLPC3433 It has also connectors to connect an external mini keypad. Signed-off-by: Suniel Mahesh Signed-off-by: Jagan Teki Signed-off-by: Christopher Vollo --- Changes for v3: - As suggested by Samuel Holland: - changed binding to gpio-fan - changed widgets to DACL and DACR to describe audio routing - fixed indentation - primary author of the commit should be the first signer Changes for v2: - Add missing compatible string - insert missing signatures of contributors --- arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/sun8i-r16-renew-vista-e.dts | 362 ++++++++++++++++++ 2 files changed, 363 insertions(+) create mode 100644 arch/arm/boot/dts/sun8i-r16-renew-vista-e.dts diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index 184899808ee7..b5966c0742e1 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile @@ -1353,6 +1353,7 @@ dtb-$(CONFIG_MACH_SUN8I) += \ sun8i-r16-nintendo-nes-classic.dtb \ sun8i-r16-nintendo-super-nes-classic.dtb \ sun8i-r16-parrot.dtb \ + sun8i-r16-renew-vista-e.dtb \ sun8i-r40-bananapi-m2-ultra.dtb \ sun8i-r40-oka40i-c.dtb \ sun8i-s3-elimo-initium.dtb \ diff --git a/arch/arm/boot/dts/sun8i-r16-renew-vista-e.dts b/arch/arm/boot/dts/sun8i-r16-renew-vista-e.dts new file mode 100644 index 000000000000..ff72914eb110 --- /dev/null +++ b/arch/arm/boot/dts/sun8i-r16-renew-vista-e.dts @@ -0,0 +1,362 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright (C) 2022 RenewWorldOutreach + * Copyright (C) 2022 Amarula Solutions(India) + */ + +/dts-v1/; +#include "sun8i-a33.dtsi" + +#include +#include +#include + +/ { + model = "RenewWorldOutreach R16-Vista-E"; + compatible = "renewworldoutreach,r16-vista-e", "allwinner,sun8i-r16", "allwinner,sun8i-a33"; + + aliases { + serial0 = &uart0; + }; + + chosen { + stdout-path = "serial0:115200n8"; + }; + + gpio-keys-polled { + compatible = "gpio-keys-polled"; + poll-interval = <100>; + + ok { + label = "ok"; + linux,code = ; + gpios = <&pio 4 0 GPIO_ACTIVE_LOW>; + }; + + left { + label = "left"; + linux,code = ; + gpios = <&pio 4 1 GPIO_ACTIVE_LOW>; + }; + + right { + label = "right"; + linux,code = ; + gpios = <&pio 4 2 GPIO_ACTIVE_LOW>; + }; + + up { + label = "up"; + linux,code = ; + gpios = <&pio 4 3 GPIO_ACTIVE_LOW>; + }; + + down { + label = "down"; + linux,code = ; + gpios = <&pio 4 4 GPIO_ACTIVE_LOW>; + }; + + back { + label = "back"; + linux,code = ; + gpios = <&pio 4 5 GPIO_ACTIVE_LOW>; + }; + + power { + label = "power"; + linux,code = ; + gpios = <&pio 4 6 GPIO_ACTIVE_LOW>; + }; + + vol-down { + label = "vol-down"; + linux,code = ; + gpios = <&pio 7 3 GPIO_ACTIVE_LOW>; + }; + + vol-up { + label = "vol-up"; + linux,code = ; + gpios = <&pio 7 9 GPIO_ACTIVE_LOW>; + }; + }; + + leds { + compatible = "gpio-leds"; + + battery-led0 { + label = "renew-e:battery-led0"; + gpios = <&r_pio 0 2 GPIO_ACTIVE_HIGH>; + }; + + battery-led1 { + label = "renew-e:battery-led1"; + gpios = <&r_pio 0 3 GPIO_ACTIVE_HIGH>; + }; + + battery-led2 { + label = "renew-e:battery-led2"; + gpios = <&r_pio 0 4 GPIO_ACTIVE_HIGH>; + }; + + battery-led3 { + label = "renew-e:battery-led3"; + gpios = <&r_pio 0 5 GPIO_ACTIVE_HIGH>; + }; + + battery-led4 { + label = "renew-e:battery-led4"; + gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; + }; + + volume-led0 { + label = "renew-e:volume-led0"; + gpios = <&pio 7 2 GPIO_ACTIVE_HIGH>; + }; + + volume-led1 { + label = "renew-e:volume-led1"; + gpios = <&pio 6 13 GPIO_ACTIVE_HIGH>; + }; + + volume-led2 { + label = "renew-e:volume-led2"; + gpios = <&pio 6 12 GPIO_ACTIVE_HIGH>; + }; + + volume-led3 { + label = "renew-e:volume-led3"; + gpios = <&pio 6 11 GPIO_ACTIVE_HIGH>; + }; + + volume-led4 { + label = "renew-e:volume-led4"; + gpios = <&pio 6 10 GPIO_ACTIVE_HIGH>; + }; + + led-pad-intz { + label = "renew-e:led-pad-intz"; + gpios = <&pio 4 16 GPIO_ACTIVE_HIGH>; + default-state = "on"; + }; + }; + + gpio-fan { + compatible = "gpio-fan"; + gpios = <&pio 4 14 GPIO_ACTIVE_HIGH>; /* FAN_ON/OFF: PE14 */ + gpio-fan,speed-map = <0 0 6000 1>; + }; + + reg_vcc5v0: vcc5v0 { + compatible = "regulator-fixed"; + regulator-name = "vcc5v0"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + }; +}; + +&codec { + status = "okay"; +}; + +&cpu0 { + cpu-supply = <®_dcdc3>; +}; + +&cpu0_opp_table { + opp-1104000000 { + opp-hz = /bits/ 64 <1104000000>; + opp-microvolt = <1320000>; + clock-latency-ns = <244144>; /* 8 32k periods */ + }; + + opp-1200000000 { + opp-hz = /bits/ 64 <1200000000>; + opp-microvolt = <1320000>; + clock-latency-ns = <244144>; /* 8 32k periods */ + }; +}; + +&dai { + status = "okay"; +}; + +&de { + status = "okay"; +}; + +&dphy { + status = "okay"; +}; + +&ehci0 { + status = "okay"; +}; + +&mmc0 { + vmmc-supply = <®_dcdc1>; + bus-width = <4>; + non-removable; + status = "okay"; +}; + +&mmc1 { + pinctrl-names = "default"; + pinctrl-0 = <&mmc1_pg_pins>; + vmmc-supply = <®_dcdc1>; + bus-width = <4>; + broken-cd; + status = "okay"; +}; + +&ohci0 { + status = "okay"; +}; + +&r_rsb { + status = "okay"; + + axp22x: pmic@3a3 { + compatible = "x-powers,axp223"; + reg = <0x3a3>; + interrupt-parent = <&r_intc>; + interrupts = ; + eldoin-supply = <®_dcdc1>; + x-powers,drive-vbus-en; + }; +}; + +#include "axp223.dtsi" + +&ac_power_supply { + status = "okay"; +}; + +®_aldo1 { + regulator-always-on; + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3000000>; + regulator-name = "vcc-io"; +}; + +®_aldo2 { + regulator-always-on; + regulator-min-microvolt = <2500000>; + regulator-max-microvolt = <2500000>; + regulator-name = "vdd-dll"; +}; + +®_aldo3 { + regulator-always-on; + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3000000>; + regulator-name = "avcc"; +}; + +®_dc1sw { + regulator-name = "vcc-lcd"; +}; + +®_dc5ldo { + regulator-always-on; + regulator-min-microvolt = <900000>; + regulator-max-microvolt = <1400000>; + regulator-name = "vdd-cpus"; +}; + +®_dcdc1 { + regulator-always-on; + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3000000>; + regulator-name = "vcc-3v0"; +}; + +®_dcdc2 { + regulator-always-on; + regulator-min-microvolt = <900000>; + regulator-max-microvolt = <1400000>; + regulator-name = "vdd-sys"; +}; + +®_dcdc3 { + regulator-always-on; + regulator-min-microvolt = <900000>; + regulator-max-microvolt = <1400000>; + regulator-name = "vdd-cpu"; +}; + +®_dcdc5 { + regulator-always-on; + regulator-min-microvolt = <1500000>; + regulator-max-microvolt = <1500000>; + regulator-name = "vcc-dram"; +}; + +®_dldo1 { + regulator-always-on; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-name = "vcc-3v3-main1"; +}; + +®_dldo2 { + regulator-always-on; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-name = "vcc-3v3-main2"; +}; + +®_dldo3 { + regulator-always-on; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-name = "vcc-3v3-main3"; +}; + +®_dldo4 { + regulator-always-on; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-name = "vcc-3v3-main4"; +}; + +®_eldo1 { + regulator-always-on; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + regulator-name = "vcc-1v2-hdmi"; +}; + +®_drivevbus { + regulator-name = "usb0-vbus"; + status = "okay"; +}; + +®_rtc_ldo { + regulator-name = "vcc-rtc"; +}; + +&sound { + status = "okay"; + simple-audio-card,routing = + "Left DAC", "DACL", + "Right DAC", "DACR"; +}; + +&uart0 { + pinctrl-names = "default"; + pinctrl-0 = <&uart0_pb_pins>; + status = "okay"; +}; + +&usb_otg { + dr_mode = "host"; + status = "okay"; +}; + +&usbphy { + /* VBUS is always on because it is wired to the power supply */ + usb0_vbus-supply = <®_vcc5v0>; + status = "okay"; +};