From patchwork Sun Apr 13 13:42:57 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Jernej_=C5=A0krabec?= X-Patchwork-Id: 14049328 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 04690C3601E for ; Sun, 13 Apr 2025 13:49:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc: To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=qOmgqsJSkssZHmhwqtwssWV2ayrx+169yAq3iEk3wLs=; b=cj0yEQn0ySD1nQUZh9fcY+5/kv bn5zUyVXQP4mOp144OIR4CLzD9AXUJiBJMN7FZxoe3OdgDBQk3/OdeWMnkdj40N6R7vai4YmcU8ra UpqLlmsmEjbjKSKtzh7SYQ7tJYXWK00vlFYLZO//72bs/eltKxMt4jBF8O7e8hcTFRCWK8HdOKvJd py3RwEGAM8JxX3vEo9CUUf0nsiIDze3O4bBHt6B/h3Naq4a1dsziZBEJqfevGOfWmXsr2HOSnmtbF ij9pNmEaxHGJZSlpSeKbyRaeFGd0RERm3dosH3kvmwevxKsndsqWdakcl3COFuAOYROJXOvSuv/xk rEFeTGjQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1u3xi1-0000000HE2U-2p0c; Sun, 13 Apr 2025 13:49:17 +0000 Received: from mail-ed1-x534.google.com ([2a00:1450:4864:20::534]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1u3xcf-0000000HDb6-3off for linux-arm-kernel@lists.infradead.org; Sun, 13 Apr 2025 13:43:47 +0000 Received: by mail-ed1-x534.google.com with SMTP id 4fb4d7f45d1cf-5eb5ecf3217so6038443a12.3 for ; Sun, 13 Apr 2025 06:43:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1744551824; x=1745156624; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=qOmgqsJSkssZHmhwqtwssWV2ayrx+169yAq3iEk3wLs=; b=PY/oYSF86VYXBGnytanmgiNoVU0PiQ8982TLtN14ujVMNycXl75awvoj9yfvZcCDeW ul4+xWI0Caqtgutx3ZJEE6c0sMXrE2RKPLCBIA9paQuCuAcet1HnFO7+moPopEjT/nzu V0Gq8YphY+R1Tp4UsLMJb8c+zy4FnOKCZpSjSf6JjY7fuTj5ov0VMyKC0Kin76DlM9YI MO1Dylp7Wx5AKTn/EIrAqpcmamwi5jfeTWHvilxzGxFRPPA8WZPeogOqdGc8e+n7R91o Fuutzu8GvsN0gIYePXHQyp12M7RDmvT0NtTwGLnjcBON6Db6reBBpaNiqIG8/a0hnuQI 1IAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1744551824; x=1745156624; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=qOmgqsJSkssZHmhwqtwssWV2ayrx+169yAq3iEk3wLs=; b=k45Or/VuzkhlSTWyecdTUGaJXWmdDdJXMY7qmn7iDxwRWq30zcd2uh2LkET33GL9NY sNjr5bXd76S6X7Gh3bm8wr3lcAZhrsG3FzQtTK1dJ6WWZG1s3zVC6TOzazbVCErTuanB r0GDA+trYjNkoEsAq/v59/BL41z5gCYZpUMbqHpeOAWn9wo+zi4Mqgxlw9LtsZ+x5xdy K1DMgcjcPxA/0F5xBXyIqO4iu9ByVIsguknJd8C/Y1kULxrn0//Ei9qG2h7lS0MFh1cB d7WltEnmOt4fCIoFW4eZtSy/+xQGnUaFy3/zW7kd42QJnlP1Tw1Tc1IulKs6dzO7BCpv dPbg== X-Forwarded-Encrypted: i=1; AJvYcCVFRh8Loa4a6sQVfYgh350BXeBAet6eDR+SzjV3qIEVRjgy/BveVLO0Ah7qe99OBwWKTs+y2kzuobiaVeA8Wrp1@lists.infradead.org X-Gm-Message-State: AOJu0YwiRaXEqVczTYDKYGdRIZL3WCebRakb7Vii6lWg4JBn/O982466 pkug6ZavAAC/bAQ7PySqCfql7l7bu738J8ilT7ORn03Yiv4+27Jp X-Gm-Gg: ASbGncsS0vbjqkRyr4eL5dQvrhxfCRT2I76xv0NrZuSnKGUR+ecKdHkyRdjtBUHAMXj nUogprHtwhcDQeqCTfijW1BVCW4DZWnZEG3Uwzp25Hf8yRVX9Z26XfBlo/vXjW9ZuYLJtx0aaZi eh/O4r20d2CTc3tcvsVcfYgEmHi5+IwxvDsehsUJ8LgExPFava9L7iDE8rYBqJmFGlqYzGUwMjF I/cg7hlsd7+TG6ck767UOfWR45AZV8NCExIm3PUD8IPfCTIreCKkmjZNcGRirMz5IZnEyCrnHHa KhZRqQBb7lzPqXz2x+VJr5+If21/XSGIpGFuuXOwJFiVyob/9AI2WJ/gjTE= X-Google-Smtp-Source: AGHT+IECxibRivd1Qa+TCHtBQFZFGdZnRUR09a7FvkF3ONZsY1WfKF4J3gWn1VCseafmw3KMpMcyLA== X-Received: by 2002:a17:907:3cc3:b0:ac2:d1bd:3293 with SMTP id a640c23a62f3a-acad34a1858mr835080966b.19.1744551823890; Sun, 13 Apr 2025 06:43:43 -0700 (PDT) Received: from localhost.localdomain ([37.248.246.92]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-acaa1be95d0sm749422666b.55.2025.04.13.06.43.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 13 Apr 2025 06:43:43 -0700 (PDT) From: Jernej Skrabec To: robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org Cc: wens@csie.org, samuel@sholland.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, Jernej Skrabec Subject: [PATCH 2/2] arm64: dts: allwinner: h6: Add OrangePi 3 LTS DTS Date: Sun, 13 Apr 2025 15:42:57 +0200 Message-ID: <20250413134318.66681-3-jernej.skrabec@gmail.com> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250413134318.66681-1-jernej.skrabec@gmail.com> References: <20250413134318.66681-1-jernej.skrabec@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250413_064345_953977_C53683FE X-CRM114-Status: GOOD ( 17.23 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org OrangePi 3 LTS is quite similar to original OrangePi 3, but it has a lot small changes that makes DT sharing unpractical with it. OrangePi 3 LTS has following features: - Allwinner H6 quad-core 64-bit ARM Cortex-A53 - GPU Mali-T720 - 2 GB LPDDR3 RAM - AXP805 PMIC - AW859A Wifi/BT 5.0 - 2x USB 2.0 host port (A) - USB 3.0 Host - Gigabit Ethernet (Motorcomm YT8531C phy) - HDMI 2.0 port - soldered 8 GB eMMC - 2x LED - microphone - audio jack Signed-off-by: Jernej Skrabec --- arch/arm64/boot/dts/allwinner/Makefile | 1 + .../allwinner/sun50i-h6-orangepi-3-lts.dts | 351 ++++++++++++++++++ 2 files changed, 352 insertions(+) create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3-lts.dts diff --git a/arch/arm64/boot/dts/allwinner/Makefile b/arch/arm64/boot/dts/allwinner/Makefile index 00bed412ee31..72c43bd0e2ab 100644 --- a/arch/arm64/boot/dts/allwinner/Makefile +++ b/arch/arm64/boot/dts/allwinner/Makefile @@ -33,6 +33,7 @@ dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-orangepi-zero-plus.dtb dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-orangepi-zero-plus2.dtb dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h6-beelink-gs1.dtb dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h6-orangepi-3.dtb +dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h6-orangepi-3-lts.dtb dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h6-orangepi-lite2.dtb dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h6-orangepi-one-plus.dtb dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h6-pine-h64.dtb diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3-lts.dts b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3-lts.dts new file mode 100644 index 000000000000..c8830d5c2f09 --- /dev/null +++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3-lts.dts @@ -0,0 +1,351 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +// Copyright (C) 2025 Jernej Skrabec +// Based on sun50i-h6-orangepi-3.dts, which is: +// Copyright (C) 2019 OndÅ™ej Jirman + +/dts-v1/; + +#include "sun50i-h6.dtsi" +#include "sun50i-h6-cpu-opp.dtsi" +#include "sun50i-h6-gpu-opp.dtsi" +#include +#include + +/ { + model = "OrangePi 3 LTS"; + compatible = "xunlong,orangepi-3-lts", "allwinner,sun50i-h6"; + + aliases { + ethernet0 = &emac; + ethernet1 = &aw859a; + serial0 = &uart0; + }; + + chosen { + stdout-path = "serial0:115200n8"; + }; + + connector { + compatible = "hdmi-connector"; + ddc-en-gpios = <&pio 7 2 GPIO_ACTIVE_HIGH>; /* PH2 */ + type = "a"; + + port { + hdmi_con_in: endpoint { + remote-endpoint = <&hdmi_out_con>; + }; + }; + }; + + ext_osc32k: ext_osc32k_clk { + #clock-cells = <0>; + compatible = "fixed-clock"; + clock-frequency = <32768>; + clock-output-names = "ext_osc32k"; + }; + + leds { + compatible = "gpio-leds"; + + led-0 { + function = LED_FUNCTION_POWER; + color = ; + gpios = <&r_pio 0 4 GPIO_ACTIVE_HIGH>; /* PL4 */ + default-state = "on"; + }; + + led-1 { + function = LED_FUNCTION_STATUS; + color = ; + gpios = <&r_pio 0 7 GPIO_ACTIVE_HIGH>; /* PL7 */ + }; + }; + + reg_gmac_3v3: gmac-3v3 { + compatible = "regulator-fixed"; + regulator-name = "gmac-3v3"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + startup-delay-us = <150000>; + enable-active-high; + gpio = <&pio 3 6 GPIO_ACTIVE_HIGH>; /* PD6 */ + }; + + reg_vcc5v: vcc5v { + /* board wide 5V supply directly from the DC jack */ + compatible = "regulator-fixed"; + regulator-name = "vcc-5v"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + regulator-always-on; + }; + + reg_wifi_3v3: wifi-3v3 { + /* 3.3V regulator for WiFi and BT */ + compatible = "regulator-fixed"; + regulator-name = "wifi-3v3"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + enable-active-high; + gpio = <&pio 7 7 GPIO_ACTIVE_HIGH>; /* PH7 */ + }; + + wifi_pwrseq: wifi-pwrseq { + compatible = "mmc-pwrseq-simple"; + clocks = <&rtc 1>; + clock-names = "ext_clock"; + reset-gpios = <&r_pio 1 3 GPIO_ACTIVE_LOW>; /* PM3 */ + post-power-on-delay-ms = <200>; + }; +}; + +&cpu0 { + cpu-supply = <®_dcdca>; +}; + +&de { + status = "okay"; +}; + +&dwc3 { + status = "okay"; +}; + +&ehci0 { + status = "okay"; +}; + +&ehci3 { + status = "okay"; +}; + +&emac { + pinctrl-names = "default"; + pinctrl-0 = <&ext_rgmii_pins>; + phy-mode = "rgmii-rxid"; + phy-handle = <&ext_rgmii_phy>; + phy-supply = <®_gmac_3v3>; + allwinner,rx-delay-ps = <0>; + allwinner,tx-delay-ps = <700>; + status = "okay"; +}; + +&gpu { + mali-supply = <®_dcdcc>; + status = "okay"; +}; + +&hdmi { + hvcc-supply = <®_bldo2>; + status = "okay"; +}; + +&hdmi_out { + hdmi_out_con: endpoint { + remote-endpoint = <&hdmi_con_in>; + }; +}; + +&mdio { + ext_rgmii_phy: ethernet-phy@1 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <1>; + + motorcomm,clk-out-frequency-hz = <125000000>; + + reset-gpios = <&pio 3 14 GPIO_ACTIVE_LOW>; /* PD14 */ + reset-assert-us = <15000>; + reset-deassert-us = <100000>; + }; +}; + +&mmc0 { + vmmc-supply = <®_cldo1>; + cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */ + disable-wp; + bus-width = <4>; + status = "okay"; +}; + +&mmc1 { + vmmc-supply = <®_wifi_3v3>; + vqmmc-supply = <®_bldo3>; + mmc-pwrseq = <&wifi_pwrseq>; + bus-width = <4>; + non-removable; + status = "okay"; + + aw859a: wifi@1 { + reg = <1>; + }; +}; + +&mmc2 { + vmmc-supply = <®_cldo1>; + vqmmc-supply = <®_bldo2>; + cap-mmc-hw-reset; + non-removable; + bus-width = <8>; + status = "okay"; +}; + +&ohci0 { + status = "okay"; +}; + +&ohci3 { + status = "okay"; +}; + +&pio { + vcc-pc-supply = <®_bldo2>; + vcc-pd-supply = <®_cldo1>; + vcc-pg-supply = <®_bldo3>; +}; + +&r_ir { + status = "okay"; +}; + +&r_i2c { + status = "okay"; + + axp805: pmic@36 { + compatible = "x-powers,axp805", "x-powers,axp806"; + reg = <0x36>; + interrupt-parent = <&r_intc>; + interrupts = ; + interrupt-controller; + #interrupt-cells = <1>; + x-powers,self-working-mode; + vina-supply = <®_vcc5v>; + vinb-supply = <®_vcc5v>; + vinc-supply = <®_vcc5v>; + vind-supply = <®_vcc5v>; + vine-supply = <®_vcc5v>; + aldoin-supply = <®_vcc5v>; + bldoin-supply = <®_vcc5v>; + cldoin-supply = <®_vcc5v>; + + regulators { + reg_aldo1: aldo1 { + regulator-always-on; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-name = "vcc-pl-led-ir"; + }; + + reg_aldo2: aldo2 { + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-name = "vcc33-audio-tv-ephy-mac"; + }; + + /* ALDO3 is shorted to CLDO1 */ + reg_aldo3: aldo3 { + regulator-always-on; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-name = "vcc33-io-pd-emmc-sd-usb-uart-1"; + }; + + reg_bldo1: bldo1 { + regulator-always-on; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-name = "vcc18-dram-bias-pll"; + }; + + reg_bldo2: bldo2 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-name = "vcc-efuse-pcie-hdmi-pc"; + }; + + reg_bldo3: bldo3 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-name = "vcc-pm-pg-dcxoio-wifi"; + }; + + bldo4 { + /* unused */ + }; + + reg_cldo1: cldo1 { + regulator-always-on; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-name = "vcc33-io-pd-emmc-sd-usb-uart-2"; + }; + + cldo2 { + /* unused */ + }; + + cldo3 { + /* unused */ + }; + + reg_dcdca: dcdca { + regulator-always-on; + regulator-min-microvolt = <800000>; + regulator-max-microvolt = <1160000>; + regulator-ramp-delay = <2500>; + regulator-name = "vdd-cpu"; + }; + + reg_dcdcc: dcdcc { + regulator-enable-ramp-delay = <32000>; + regulator-min-microvolt = <810000>; + regulator-max-microvolt = <1080000>; + regulator-ramp-delay = <2500>; + regulator-name = "vdd-gpu"; + }; + + reg_dcdcd: dcdcd { + regulator-always-on; + regulator-min-microvolt = <960000>; + regulator-max-microvolt = <960000>; + regulator-name = "vdd-sys"; + }; + + reg_dcdce: dcdce { + regulator-always-on; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + regulator-name = "vcc-dram"; + }; + + sw { + /* unused */ + }; + }; + }; +}; + +&rtc { + clocks = <&ext_osc32k>; +}; + +&uart0 { + pinctrl-names = "default"; + pinctrl-0 = <&uart0_ph_pins>; + status = "okay"; +}; + +&usb2otg { + dr_mode = "host"; + status = "okay"; +}; + +&usb2phy { + usb0_id_det-gpios = <&pio 2 15 GPIO_ACTIVE_HIGH>; /* PC15 */ + usb0_vbus-supply = <®_vcc5v>; + usb3_vbus-supply = <®_vcc5v>; + status = "okay"; +}; + +&usb3phy { + status = "okay"; +};