From nobody Sun Sep 14 03:54:33 2025 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6E72DC54EAA for ; Fri, 27 Jan 2023 10:02:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233234AbjA0KC4 (ORCPT ); Fri, 27 Jan 2023 05:02:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42378 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233203AbjA0KCv (ORCPT ); Fri, 27 Jan 2023 05:02:51 -0500 Received: from mail-wr1-x435.google.com (mail-wr1-x435.google.com [IPv6:2a00:1450:4864:20::435]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E5E0D212D; Fri, 27 Jan 2023 02:02:47 -0800 (PST) Received: by mail-wr1-x435.google.com with SMTP id bk16so4450687wrb.11; Fri, 27 Jan 2023 02:02:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; 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=nYUplT5giMj5cUbmKJoBymxbZxBzLkRzgaZravqtBYs=; b=FfDtocdosZwKSxJr9gjY2OTqGp2sfDiAuEnEIzSsRGks0UJ0bxXaiAu3LsIaQoM0w2 052KtbaSBdAmqJOcJ3vVJJ70/c9o5qWG5FnAJoRI+cGq8wF4xHQpBUoWvby2y7EyHMbX PbpJiY+ONLPWj10SfwI3CGWDVahTa4rmNKY1LL9SIfBUlmZk4VVWWi/sd+Zcy/nRpmhT dddq9WoJ5VX/Fuxm4gYg4kDgZ3VoxxScZKQbsveenoBR5AazIQBdnrIyuAzoCLOsDIan zHL7pf1gKQK/G0eGLqGFoYpgmyWAWTuHOHlEGzlqzKHZFcUrRzgGufnZYDRCPLJif7Um d4pQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=nYUplT5giMj5cUbmKJoBymxbZxBzLkRzgaZravqtBYs=; b=IS5QLnNUt7z/ezrLbuy/1xCoA8ls1gIft4pgOqin0mPSIapG5WYTsOvv5rnybjTpQg yFafdCKINuLWaGm8XpuNhbfHE4nTOFyhKxHoQL/4r/TMh1p+KX1YIOnTJ9S3foGNOruF 30RP6C5VwSGWTijrZ1Xt7RE1Y310f5xJXpowQlGX2N8HC2Woag7iIxjCrt6mvZ8f6uyL OlGhaxUEvarDhC+N+QkWL64LuxbpkxiqMLOfUpF6h/sC5PUBX5WizqNxKS50J1D3RUyu 7B8hkDpG08G9X171g7GOBvzQoD+F4wUPPeCy3Em6qb1KotCZJ1urnE3kbqRqwsQKFIcB tL1Q== X-Gm-Message-State: AFqh2krUEt7sGt0ZlRGDEO7RFQHDMkt9OBzUKZzl6e+26Tftq1VVKFZw 1iYvljC4FkCBd2PlkEAelf0= X-Google-Smtp-Source: AMrXdXtC4zR3eeAZWccASdVsdXlOllNVZP7XB33YrIeazH9dPArMifI0Gho2hcgTBHUFWkEJrSYBYQ== X-Received: by 2002:a05:6000:388:b0:2bd:d34e:534d with SMTP id u8-20020a056000038800b002bdd34e534dmr40123932wrf.27.1674813766297; Fri, 27 Jan 2023 02:02:46 -0800 (PST) Received: from toolbox.. ([87.200.95.144]) by smtp.gmail.com with ESMTPSA id l7-20020adffe87000000b002bfbe30e8f8sm3493858wrr.98.2023.01.27.02.02.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Jan 2023 02:02:45 -0800 (PST) From: Christian Hewitt To: Rob Herring , Krzysztof Kozlowski , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Christian Hewitt Subject: [PATCH 2/4] arm64: dts: meson: meson-sm1-bananapi-m5: convert to dtsi Date: Fri, 27 Jan 2023 10:02:34 +0000 Message-Id: <20230127100236.3385154-3-christianshewitt@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230127100236.3385154-1-christianshewitt@gmail.com> References: <20230127100236.3385154-1-christianshewitt@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Convert the BPI-M5 dts into meson-sm1-bananapi.dtsi to support the addition of new boards based on the same design. Signed-off-by: Christian Hewitt --- .../dts/amlogic/meson-sm1-bananapi-m5.dts | 427 +---------------- .../boot/dts/amlogic/meson-sm1-bananapi.dtsi | 435 ++++++++++++++++++ 2 files changed, 436 insertions(+), 426 deletions(-) create mode 100644 arch/arm64/boot/dts/amlogic/meson-sm1-bananapi.dtsi diff --git a/arch/arm64/boot/dts/amlogic/meson-sm1-bananapi-m5.dts b/arch/a= rm64/boot/dts/amlogic/meson-sm1-bananapi-m5.dts index 3c1267a7ffef..34b3238ee0a0 100644 --- a/arch/arm64/boot/dts/amlogic/meson-sm1-bananapi-m5.dts +++ b/arch/arm64/boot/dts/amlogic/meson-sm1-bananapi-m5.dts @@ -6,10 +6,7 @@ =20 /dts-v1/; =20 -#include "meson-sm1.dtsi" -#include -#include -#include +#include "meson-sm1-bananapi.dtsi" #include #include =20 @@ -17,28 +14,6 @@ / { compatible =3D "bananapi,bpi-m5", "amlogic,sm1"; model =3D "Banana Pi BPI-M5"; =20 - adc_keys { - compatible =3D "adc-keys"; - io-channels =3D <&saradc 2>; - io-channel-names =3D "buttons"; - keyup-threshold-microvolt =3D <1800000>; - - key { - label =3D "SW3"; - linux,code =3D ; - press-threshold-microvolt =3D <1700000>; - }; - }; - - aliases { - serial0 =3D &uart_AO; - ethernet0 =3D ðmac; - }; - - chosen { - stdout-path =3D "serial0:115200n8"; - }; - /* TOFIX: handle CVBS_DET on SARADC channel 0 */ cvbs-connector { compatible =3D "composite-video-connector"; @@ -50,150 +25,6 @@ cvbs_connector_in: endpoint { }; }; =20 - emmc_pwrseq: emmc-pwrseq { - compatible =3D "mmc-pwrseq-emmc"; - reset-gpios =3D <&gpio BOOT_12 GPIO_ACTIVE_LOW>; - }; - - gpio-keys { - compatible =3D "gpio-keys"; - - key { - label =3D "SW1"; - linux,code =3D ; - gpios =3D <&gpio_ao GPIOAO_3 GPIO_ACTIVE_LOW>; - interrupt-parent =3D <&gpio_intc>; - interrupts =3D <3 IRQ_TYPE_EDGE_BOTH>; - }; - }; - - hdmi-connector { - compatible =3D "hdmi-connector"; - type =3D "a"; - - port { - hdmi_connector_in: endpoint { - remote-endpoint =3D <&hdmi_tx_tmds_out>; - }; - }; - }; - - leds { - compatible =3D "gpio-leds"; - - led-green { - color =3D ; - function =3D LED_FUNCTION_STATUS; - gpios =3D <&gpio_ao GPIOAO_2 GPIO_ACTIVE_LOW>; - }; - - led-blue { - color =3D ; - function =3D LED_FUNCTION_STATUS; - gpios =3D <&gpio_ao GPIOAO_11 GPIO_ACTIVE_LOW>; - linux,default-trigger =3D "heartbeat"; - }; - }; - - memory@0 { - device_type =3D "memory"; - reg =3D <0x0 0x0 0x0 0x40000000>; - }; - - emmc_1v8: regulator-emmc_1v8 { - compatible =3D "regulator-fixed"; - regulator-name =3D "EMMC_1V8"; - regulator-min-microvolt =3D <1800000>; - regulator-max-microvolt =3D <1800000>; - vin-supply =3D <&vddao_3v3>; - regulator-always-on; - }; - - dc_in: regulator-dc_in { - compatible =3D "regulator-fixed"; - regulator-name =3D "DC_IN"; - regulator-min-microvolt =3D <5000000>; - regulator-max-microvolt =3D <5000000>; - regulator-always-on; - }; - - vddio_c: regulator-vddio_c { - compatible =3D "regulator-gpio"; - regulator-name =3D "VDDIO_C"; - regulator-min-microvolt =3D <1800000>; - regulator-max-microvolt =3D <3300000>; - - enable-gpio =3D <&gpio_ao GPIOE_2 GPIO_OPEN_DRAIN>; - enable-active-high; - regulator-always-on; - - gpios =3D <&gpio_ao GPIOAO_6 GPIO_OPEN_DRAIN>; - gpios-states =3D <1>; - - states =3D <1800000 0>, - <3300000 1>; - }; - - tflash_vdd: regulator-tflash_vdd { - compatible =3D "regulator-fixed"; - regulator-name =3D "TFLASH_VDD"; - regulator-min-microvolt =3D <3300000>; - regulator-max-microvolt =3D <3300000>; - vin-supply =3D <&dc_in>; - gpio =3D <&gpio GPIOH_8 GPIO_OPEN_DRAIN>; - enable-active-high; - regulator-always-on; - }; - - vddao_1v8: regulator-vddao_1v8 { - compatible =3D "regulator-fixed"; - regulator-name =3D "VDDAO_1V8"; - regulator-min-microvolt =3D <1800000>; - regulator-max-microvolt =3D <1800000>; - vin-supply =3D <&vddao_3v3>; - regulator-always-on; - }; - - vddao_3v3: regulator-vddao_3v3 { - compatible =3D "regulator-fixed"; - regulator-name =3D "VDDAO_3V3"; - regulator-min-microvolt =3D <3300000>; - regulator-max-microvolt =3D <3300000>; - vin-supply =3D <&dc_in>; - regulator-always-on; - }; - - vddcpu: regulator-vddcpu { - /* - * SY8120B1ABC DC/DC Regulator. - */ - compatible =3D "pwm-regulator"; - - regulator-name =3D "VDDCPU"; - regulator-min-microvolt =3D <690000>; - regulator-max-microvolt =3D <1050000>; - - pwm-supply =3D <&dc_in>; - - pwms =3D <&pwm_AO_cd 1 1250 0>; - pwm-dutycycle-range =3D <100 0>; - - regulator-boot-on; - regulator-always-on; - }; - - /* USB Hub Power Enable */ - vl_pwr_en: regulator-vl_pwr_en { - compatible =3D "regulator-fixed"; - regulator-name =3D "VL_PWR_EN"; - regulator-min-microvolt =3D <5000000>; - regulator-max-microvolt =3D <5000000>; - vin-supply =3D <&dc_in>; - - gpio =3D <&gpio GPIOH_6 GPIO_ACTIVE_HIGH>; - enable-active-high; - }; - sound { compatible =3D "amlogic,axg-sound-card"; model =3D "BPI-M5"; @@ -319,68 +150,17 @@ &acodec { status =3D "okay"; }; =20 -&arb { - status =3D "okay"; -}; =20 &clkc_audio { status =3D "okay"; }; =20 -&cpu0 { - cpu-supply =3D <&vddcpu>; - operating-points-v2 =3D <&cpu_opp_table>; - clocks =3D <&clkc CLKID_CPU_CLK>; - clock-latency =3D <50000>; -}; - -&cpu1 { - cpu-supply =3D <&vddcpu>; - operating-points-v2 =3D <&cpu_opp_table>; - clocks =3D <&clkc CLKID_CPU1_CLK>; - clock-latency =3D <50000>; -}; - -&cpu2 { - cpu-supply =3D <&vddcpu>; - operating-points-v2 =3D <&cpu_opp_table>; - clocks =3D <&clkc CLKID_CPU2_CLK>; - clock-latency =3D <50000>; -}; - -&cpu3 { - cpu-supply =3D <&vddcpu>; - operating-points-v2 =3D <&cpu_opp_table>; - clocks =3D <&clkc CLKID_CPU3_CLK>; - clock-latency =3D <50000>; -}; - &cvbs_vdac_port { cvbs_vdac_out: endpoint { remote-endpoint =3D <&cvbs_connector_in>; }; }; =20 -&ext_mdio { - external_phy: ethernet-phy@0 { - /* Realtek RTL8211F (0x001cc916) */ - reg =3D <0>; - max-speed =3D <1000>; - - interrupt-parent =3D <&gpio_intc>; - /* MAC_INTR on GPIOZ_14 */ - interrupts =3D <26 IRQ_TYPE_LEVEL_LOW>; - }; -}; - -ðmac { - pinctrl-0 =3D <ð_pins>, <ð_rgmii_pins>; - pinctrl-names =3D "default"; - status =3D "okay"; - phy-mode =3D "rgmii-txid"; - phy-handle =3D <&external_phy>; -}; - &frddr_a { status =3D "okay"; }; @@ -393,192 +173,6 @@ &frddr_c { status =3D "okay"; }; =20 -&gpio { - gpio-line-names =3D - /* GPIOZ */ - "ETH_MDIO", /* GPIOZ_0 */ - "ETH_MDC", /* GPIOZ_1 */ - "ETH_RXCLK", /* GPIOZ_2 */ - "ETH_RX_DV", /* GPIOZ_3 */ - "ETH_RXD0", /* GPIOZ_4 */ - "ETH_RXD1", /* GPIOZ_5 */ - "ETH_RXD2", /* GPIOZ_6 */ - "ETH_RXD3", /* GPIOZ_7 */ - "ETH_TXCLK", /* GPIOZ_8 */ - "ETH_TXEN", /* GPIOZ_9 */ - "ETH_TXD0", /* GPIOZ_10 */ - "ETH_TXD1", /* GPIOZ_11 */ - "ETH_TXD2", /* GPIOZ_12 */ - "ETH_TXD3", /* GPIOZ_13 */ - "ETH_INTR", /* GPIOZ_14 */ - "ETH_NRST", /* GPIOZ_15 */ - /* GPIOH */ - "HDMI_SDA", /* GPIOH_0 */ - "HDMI_SCL", /* GPIOH_1 */ - "HDMI_HPD", /* GPIOH_2 */ - "HDMI_CEC", /* GPIOH_3 */ - "VL-RST_N", /* GPIOH_4 */ - "CON1-P36", /* GPIOH_5 */ - "VL-PWREN", /* GPIOH_6 */ - "WiFi_3V3_1V8", /* GPIOH_7 */ - "TFLASH_VDD_EN", /* GPIOH_8 */ - /* BOOT */ - "eMMC_D0", /* BOOT_0 */ - "eMMC_D1", /* BOOT_1 */ - "eMMC_D2", /* BOOT_2 */ - "eMMC_D3", /* BOOT_3 */ - "eMMC_D4", /* BOOT_4 */ - "eMMC_D5", /* BOOT_5 */ - "eMMC_D6", /* BOOT_6 */ - "eMMC_D7", /* BOOT_7 */ - "eMMC_CLK", /* BOOT_8 */ - "", - "eMMC_CMD", /* BOOT_10 */ - "", - "eMMC_RST#", /* BOOT_12 */ - "eMMC_DS", /* BOOT_13 */ - "", "", - /* GPIOC */ - "SD_D0_B", /* GPIOC_0 */ - "SD_D1_B", /* GPIOC_1 */ - "SD_D2_B", /* GPIOC_2 */ - "SD_D3_B", /* GPIOC_3 */ - "SD_CLK_B", /* GPIOC_4 */ - "SD_CMD_B", /* GPIOC_5 */ - "CARD_EN_DET", /* GPIOC_6 */ - "", - /* GPIOA */ - "", "", "", "", "", "", "", "", - "", "", "", "", "", "", - "CON1-P27", /* GPIOA_14 */ - "CON1-P28", /* GPIOA_15 */ - /* GPIOX */ - "CON1-P16", /* GPIOX_0 */ - "CON1-P18", /* GPIOX_1 */ - "CON1-P22", /* GPIOX_2 */ - "CON1-P11", /* GPIOX_3 */ - "CON1-P13", /* GPIOX_4 */ - "CON1-P07", /* GPIOX_5 */ - "CON1-P33", /* GPIOX_6 */ - "CON1-P15", /* GPIOX_7 */ - "CON1-P19", /* GPIOX_8 */ - "CON1-P21", /* GPIOX_9 */ - "CON1-P24", /* GPIOX_10 */ - "CON1-P23", /* GPIOX_11 */ - "CON1-P08", /* GPIOX_12 */ - "CON1-P10", /* GPIOX_13 */ - "CON1-P29", /* GPIOX_14 */ - "CON1-P31", /* GPIOX_15 */ - "CON1-P26", /* GPIOX_16 */ - "CON1-P03", /* GPIOX_17 */ - "CON1-P05", /* GPIOX_18 */ - "CON1-P32"; /* GPIOX_19 */ - - /* - * WARNING: The USB Hub on the BPI-M5 needs a reset signal - * to be turned high in order to be detected by the USB Controller - * This signal should be handled by a USB specific power sequence - * in order to reset the Hub when USB bus is powered down. - */ - usb-hub { - gpio-hog; - gpios =3D ; - output-high; - line-name =3D "usb-hub-reset"; - }; -}; - -&gpio_ao { - gpio-line-names =3D - /* GPIOAO */ - "DEBUG TX", /* GPIOAO_0 */ - "DEBUG RX", /* GPIOAO_1 */ - "SYS_LED2", /* GPIOAO_2 */ - "UPDATE_KEY", /* GPIOAO_3 */ - "CON1-P40", /* GPIOAO_4 */ - "IR_IN", /* GPIOAO_5 */ - "TF_3V3N_1V8_EN", /* GPIOAO_6 */ - "CON1-P35", /* GPIOAO_7 */ - "CON1-P12", /* GPIOAO_8 */ - "CON1-P37", /* GPIOAO_9 */ - "CON1-P38", /* GPIOAO_10 */ - "SYS_LED", /* GPIOAO_11 */ - /* GPIOE */ - "VDDEE_PWM", /* GPIOE_0 */ - "VDDCPU_PWM", /* GPIOE_1 */ - "TF_PWR_EN"; /* GPIOE_2 */ -}; - -&hdmi_tx { - status =3D "okay"; - pinctrl-0 =3D <&hdmitx_hpd_pins>, <&hdmitx_ddc_pins>; - pinctrl-names =3D "default"; - hdmi-supply =3D <&dc_in>; -}; - -&hdmi_tx_tmds_port { - hdmi_tx_tmds_out: endpoint { - remote-endpoint =3D <&hdmi_connector_in>; - }; -}; - -&ir { - status =3D "okay"; - pinctrl-0 =3D <&remote_input_ao_pins>; - pinctrl-names =3D "default"; -}; - -&pwm_AO_cd { - pinctrl-0 =3D <&pwm_ao_d_e_pins>; - pinctrl-names =3D "default"; - clocks =3D <&xtal>; - clock-names =3D "clkin1"; - status =3D "okay"; -}; - -&saradc { - status =3D "okay"; - vref-supply =3D <&vddao_1v8>; -}; - -/* SD card */ -&sd_emmc_b { - status =3D "okay"; - pinctrl-0 =3D <&sdcard_c_pins>; - pinctrl-1 =3D <&sdcard_clk_gate_c_pins>; - pinctrl-names =3D "default", "clk-gate"; - - bus-width =3D <4>; - cap-sd-highspeed; - max-frequency =3D <50000000>; - disable-wp; - - /* TOFIX: SD card is barely usable in SDR modes */ - - cd-gpios =3D <&gpio GPIOC_6 GPIO_ACTIVE_LOW>; - vmmc-supply =3D <&tflash_vdd>; - vqmmc-supply =3D <&vddio_c>; -}; - -/* eMMC */ -&sd_emmc_c { - status =3D "okay"; - pinctrl-0 =3D <&emmc_ctrl_pins>, <&emmc_data_8b_pins>, <&emmc_ds_pins>; - pinctrl-1 =3D <&emmc_clk_gate_pins>; - pinctrl-names =3D "default", "clk-gate"; - - bus-width =3D <8>; - cap-mmc-highspeed; - mmc-ddr-1_8v; - mmc-hs200-1_8v; - max-frequency =3D <200000000>; - disable-wp; - - mmc-pwrseq =3D <&emmc_pwrseq>; - vmmc-supply =3D <&vddao_3v3>; - vqmmc-supply =3D <&emmc_1v8>; -}; - &tdmif_b { status =3D "okay"; }; @@ -626,22 +220,3 @@ &toddr_b { &toddr_c { status =3D "okay"; }; - -&uart_AO { - status =3D "okay"; - pinctrl-0 =3D <&uart_ao_a_pins>; - pinctrl-names =3D "default"; -}; - -&usb { - status =3D "okay"; -}; - -&usb2_phy0 { - phy-supply =3D <&dc_in>; -}; - -&usb2_phy1 { - /* Enable the hub which is connected to this port */ - phy-supply =3D <&vl_pwr_en>; -}; diff --git a/arch/arm64/boot/dts/amlogic/meson-sm1-bananapi.dtsi b/arch/arm= 64/boot/dts/amlogic/meson-sm1-bananapi.dtsi new file mode 100644 index 000000000000..c914f1148185 --- /dev/null +++ b/arch/arm64/boot/dts/amlogic/meson-sm1-bananapi.dtsi @@ -0,0 +1,435 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright (c) 2021 BayLibre SAS + * Author: Neil Armstrong + */ + +#include "meson-sm1.dtsi" +#include +#include +#include + +/ { + adc_keys { + compatible =3D "adc-keys"; + io-channels =3D <&saradc 2>; + io-channel-names =3D "buttons"; + keyup-threshold-microvolt =3D <1800000>; + + key { + label =3D "SW3"; + linux,code =3D ; + press-threshold-microvolt =3D <1700000>; + }; + }; + + aliases { + serial0 =3D &uart_AO; + ethernet0 =3D ðmac; + }; + + chosen { + stdout-path =3D "serial0:115200n8"; + }; + + emmc_pwrseq: emmc-pwrseq { + compatible =3D "mmc-pwrseq-emmc"; + reset-gpios =3D <&gpio BOOT_12 GPIO_ACTIVE_LOW>; + }; + + gpio-keys { + compatible =3D "gpio-keys"; + + key { + label =3D "SW1"; + linux,code =3D ; + gpios =3D <&gpio_ao GPIOAO_3 GPIO_ACTIVE_LOW>; + interrupt-parent =3D <&gpio_intc>; + interrupts =3D <3 IRQ_TYPE_EDGE_BOTH>; + }; + }; + + hdmi-connector { + compatible =3D "hdmi-connector"; + type =3D "a"; + + port { + hdmi_connector_in: endpoint { + remote-endpoint =3D <&hdmi_tx_tmds_out>; + }; + }; + }; + + leds { + compatible =3D "gpio-leds"; + + led-green { + color =3D ; + function =3D LED_FUNCTION_STATUS; + gpios =3D <&gpio_ao GPIOAO_2 GPIO_ACTIVE_LOW>; + }; + + led-blue { + color =3D ; + function =3D LED_FUNCTION_STATUS; + gpios =3D <&gpio_ao GPIOAO_11 GPIO_ACTIVE_LOW>; + linux,default-trigger =3D "heartbeat"; + }; + }; + + memory@0 { + device_type =3D "memory"; + reg =3D <0x0 0x0 0x0 0x40000000>; + }; + + emmc_1v8: regulator-emmc_1v8 { + compatible =3D "regulator-fixed"; + regulator-name =3D "EMMC_1V8"; + regulator-min-microvolt =3D <1800000>; + regulator-max-microvolt =3D <1800000>; + vin-supply =3D <&vddao_3v3>; + regulator-always-on; + }; + + dc_in: regulator-dc_in { + compatible =3D "regulator-fixed"; + regulator-name =3D "DC_IN"; + regulator-min-microvolt =3D <5000000>; + regulator-max-microvolt =3D <5000000>; + regulator-always-on; + }; + + vddio_c: regulator-vddio_c { + compatible =3D "regulator-gpio"; + regulator-name =3D "VDDIO_C"; + regulator-min-microvolt =3D <1800000>; + regulator-max-microvolt =3D <3300000>; + + enable-gpio =3D <&gpio_ao GPIOE_2 GPIO_OPEN_DRAIN>; + enable-active-high; + regulator-always-on; + + gpios =3D <&gpio_ao GPIOAO_6 GPIO_OPEN_DRAIN>; + gpios-states =3D <1>; + + states =3D <1800000 0>, + <3300000 1>; + }; + + tflash_vdd: regulator-tflash_vdd { + compatible =3D "regulator-fixed"; + regulator-name =3D "TFLASH_VDD"; + regulator-min-microvolt =3D <3300000>; + regulator-max-microvolt =3D <3300000>; + vin-supply =3D <&dc_in>; + gpio =3D <&gpio GPIOH_8 GPIO_OPEN_DRAIN>; + enable-active-high; + regulator-always-on; + }; + + vddao_1v8: regulator-vddao_1v8 { + compatible =3D "regulator-fixed"; + regulator-name =3D "VDDAO_1V8"; + regulator-min-microvolt =3D <1800000>; + regulator-max-microvolt =3D <1800000>; + vin-supply =3D <&vddao_3v3>; + regulator-always-on; + }; + + vddao_3v3: regulator-vddao_3v3 { + compatible =3D "regulator-fixed"; + regulator-name =3D "VDDAO_3V3"; + regulator-min-microvolt =3D <3300000>; + regulator-max-microvolt =3D <3300000>; + vin-supply =3D <&dc_in>; + regulator-always-on; + }; + + vddcpu: regulator-vddcpu { + /* + * SY8120B1ABC DC/DC Regulator. + */ + compatible =3D "pwm-regulator"; + + regulator-name =3D "VDDCPU"; + regulator-min-microvolt =3D <690000>; + regulator-max-microvolt =3D <1050000>; + + pwm-supply =3D <&dc_in>; + + pwms =3D <&pwm_AO_cd 1 1250 0>; + pwm-dutycycle-range =3D <100 0>; + + regulator-boot-on; + regulator-always-on; + }; + + /* USB Hub Power Enable */ + vl_pwr_en: regulator-vl_pwr_en { + compatible =3D "regulator-fixed"; + regulator-name =3D "VL_PWR_EN"; + regulator-min-microvolt =3D <5000000>; + regulator-max-microvolt =3D <5000000>; + vin-supply =3D <&dc_in>; + + gpio =3D <&gpio GPIOH_6 GPIO_ACTIVE_HIGH>; + enable-active-high; + }; +}; + +&arb { + status =3D "okay"; +}; + +&cpu0 { + cpu-supply =3D <&vddcpu>; + operating-points-v2 =3D <&cpu_opp_table>; + clocks =3D <&clkc CLKID_CPU_CLK>; + clock-latency =3D <50000>; +}; + +&cpu1 { + cpu-supply =3D <&vddcpu>; + operating-points-v2 =3D <&cpu_opp_table>; + clocks =3D <&clkc CLKID_CPU1_CLK>; + clock-latency =3D <50000>; +}; + +&cpu2 { + cpu-supply =3D <&vddcpu>; + operating-points-v2 =3D <&cpu_opp_table>; + clocks =3D <&clkc CLKID_CPU2_CLK>; + clock-latency =3D <50000>; +}; + +&cpu3 { + cpu-supply =3D <&vddcpu>; + operating-points-v2 =3D <&cpu_opp_table>; + clocks =3D <&clkc CLKID_CPU3_CLK>; + clock-latency =3D <50000>; +}; + +&ext_mdio { + external_phy: ethernet-phy@0 { + /* Realtek RTL8211F (0x001cc916) */ + reg =3D <0>; + max-speed =3D <1000>; + + interrupt-parent =3D <&gpio_intc>; + /* MAC_INTR on GPIOZ_14 */ + interrupts =3D <26 IRQ_TYPE_LEVEL_LOW>; + }; +}; + +ðmac { + pinctrl-0 =3D <ð_pins>, <ð_rgmii_pins>; + pinctrl-names =3D "default"; + status =3D "okay"; + phy-mode =3D "rgmii-txid"; + phy-handle =3D <&external_phy>; +}; + +&gpio { + gpio-line-names =3D + /* GPIOZ */ + "ETH_MDIO", /* GPIOZ_0 */ + "ETH_MDC", /* GPIOZ_1 */ + "ETH_RXCLK", /* GPIOZ_2 */ + "ETH_RX_DV", /* GPIOZ_3 */ + "ETH_RXD0", /* GPIOZ_4 */ + "ETH_RXD1", /* GPIOZ_5 */ + "ETH_RXD2", /* GPIOZ_6 */ + "ETH_RXD3", /* GPIOZ_7 */ + "ETH_TXCLK", /* GPIOZ_8 */ + "ETH_TXEN", /* GPIOZ_9 */ + "ETH_TXD0", /* GPIOZ_10 */ + "ETH_TXD1", /* GPIOZ_11 */ + "ETH_TXD2", /* GPIOZ_12 */ + "ETH_TXD3", /* GPIOZ_13 */ + "ETH_INTR", /* GPIOZ_14 */ + "ETH_NRST", /* GPIOZ_15 */ + /* GPIOH */ + "HDMI_SDA", /* GPIOH_0 */ + "HDMI_SCL", /* GPIOH_1 */ + "HDMI_HPD", /* GPIOH_2 */ + "HDMI_CEC", /* GPIOH_3 */ + "VL-RST_N", /* GPIOH_4 */ + "CON1-P36", /* GPIOH_5 */ + "VL-PWREN", /* GPIOH_6 */ + "WiFi_3V3_1V8", /* GPIOH_7 */ + "TFLASH_VDD_EN", /* GPIOH_8 */ + /* BOOT */ + "eMMC_D0", /* BOOT_0 */ + "eMMC_D1", /* BOOT_1 */ + "eMMC_D2", /* BOOT_2 */ + "eMMC_D3", /* BOOT_3 */ + "eMMC_D4", /* BOOT_4 */ + "eMMC_D5", /* BOOT_5 */ + "eMMC_D6", /* BOOT_6 */ + "eMMC_D7", /* BOOT_7 */ + "eMMC_CLK", /* BOOT_8 */ + "", + "eMMC_CMD", /* BOOT_10 */ + "", + "eMMC_RST#", /* BOOT_12 */ + "eMMC_DS", /* BOOT_13 */ + "", "", + /* GPIOC */ + "SD_D0_B", /* GPIOC_0 */ + "SD_D1_B", /* GPIOC_1 */ + "SD_D2_B", /* GPIOC_2 */ + "SD_D3_B", /* GPIOC_3 */ + "SD_CLK_B", /* GPIOC_4 */ + "SD_CMD_B", /* GPIOC_5 */ + "CARD_EN_DET", /* GPIOC_6 */ + "", + /* GPIOA */ + "", "", "", "", "", "", "", "", + "", "", "", "", "", "", + "CON1-P27", /* GPIOA_14 */ + "CON1-P28", /* GPIOA_15 */ + /* GPIOX */ + "CON1-P16", /* GPIOX_0 */ + "CON1-P18", /* GPIOX_1 */ + "CON1-P22", /* GPIOX_2 */ + "CON1-P11", /* GPIOX_3 */ + "CON1-P13", /* GPIOX_4 */ + "CON1-P07", /* GPIOX_5 */ + "CON1-P33", /* GPIOX_6 */ + "CON1-P15", /* GPIOX_7 */ + "CON1-P19", /* GPIOX_8 */ + "CON1-P21", /* GPIOX_9 */ + "CON1-P24", /* GPIOX_10 */ + "CON1-P23", /* GPIOX_11 */ + "CON1-P08", /* GPIOX_12 */ + "CON1-P10", /* GPIOX_13 */ + "CON1-P29", /* GPIOX_14 */ + "CON1-P31", /* GPIOX_15 */ + "CON1-P26", /* GPIOX_16 */ + "CON1-P03", /* GPIOX_17 */ + "CON1-P05", /* GPIOX_18 */ + "CON1-P32"; /* GPIOX_19 */ + + /* + * WARNING: The USB Hub needs a reset signal to be turned high in + * order to be detected by the USB Controller. This signal should + * be handled by a USB specific power sequence to reset the Hub + * when the USB bus is powered down. + */ + usb-hub { + gpio-hog; + gpios =3D ; + output-high; + line-name =3D "usb-hub-reset"; + }; +}; + +&gpio_ao { + gpio-line-names =3D + /* GPIOAO */ + "DEBUG TX", /* GPIOAO_0 */ + "DEBUG RX", /* GPIOAO_1 */ + "SYS_LED2", /* GPIOAO_2 */ + "UPDATE_KEY", /* GPIOAO_3 */ + "CON1-P40", /* GPIOAO_4 */ + "IR_IN", /* GPIOAO_5 */ + "TF_3V3N_1V8_EN", /* GPIOAO_6 */ + "CON1-P35", /* GPIOAO_7 */ + "CON1-P12", /* GPIOAO_8 */ + "CON1-P37", /* GPIOAO_9 */ + "CON1-P38", /* GPIOAO_10 */ + "SYS_LED", /* GPIOAO_11 */ + /* GPIOE */ + "VDDEE_PWM", /* GPIOE_0 */ + "VDDCPU_PWM", /* GPIOE_1 */ + "TF_PWR_EN"; /* GPIOE_2 */ +}; + +&hdmi_tx { + status =3D "okay"; + pinctrl-0 =3D <&hdmitx_hpd_pins>, <&hdmitx_ddc_pins>; + pinctrl-names =3D "default"; + hdmi-supply =3D <&dc_in>; +}; + +&hdmi_tx_tmds_port { + hdmi_tx_tmds_out: endpoint { + remote-endpoint =3D <&hdmi_connector_in>; + }; +}; + +&ir { + status =3D "okay"; + pinctrl-0 =3D <&remote_input_ao_pins>; + pinctrl-names =3D "default"; +}; + +&pwm_AO_cd { + pinctrl-0 =3D <&pwm_ao_d_e_pins>; + pinctrl-names =3D "default"; + clocks =3D <&xtal>; + clock-names =3D "clkin1"; + status =3D "okay"; +}; + +&saradc { + status =3D "okay"; + vref-supply =3D <&vddao_1v8>; +}; + +/* SD card */ +&sd_emmc_b { + status =3D "okay"; + pinctrl-0 =3D <&sdcard_c_pins>; + pinctrl-1 =3D <&sdcard_clk_gate_c_pins>; + pinctrl-names =3D "default", "clk-gate"; + + bus-width =3D <4>; + cap-sd-highspeed; + max-frequency =3D <50000000>; + disable-wp; + + /* TOFIX: SD card is barely usable in SDR modes */ + + cd-gpios =3D <&gpio GPIOC_6 GPIO_ACTIVE_LOW>; + vmmc-supply =3D <&tflash_vdd>; + vqmmc-supply =3D <&vddio_c>; +}; + +/* eMMC */ +&sd_emmc_c { + status =3D "okay"; + pinctrl-0 =3D <&emmc_ctrl_pins>, <&emmc_data_8b_pins>, <&emmc_ds_pins>; + pinctrl-1 =3D <&emmc_clk_gate_pins>; + pinctrl-names =3D "default", "clk-gate"; + + bus-width =3D <8>; + cap-mmc-highspeed; + mmc-ddr-1_8v; + mmc-hs200-1_8v; + max-frequency =3D <200000000>; + disable-wp; + + mmc-pwrseq =3D <&emmc_pwrseq>; + vmmc-supply =3D <&vddao_3v3>; + vqmmc-supply =3D <&emmc_1v8>; +}; + +&uart_AO { + status =3D "okay"; + pinctrl-0 =3D <&uart_ao_a_pins>; + pinctrl-names =3D "default"; +}; + +&usb { + status =3D "okay"; +}; + +&usb2_phy0 { + phy-supply =3D <&dc_in>; +}; + +&usb2_phy1 { + /* Enable the hub which is connected to this port */ + phy-supply =3D <&vl_pwr_en>; +}; --=20 2.34.1