Add Support For Fireflyrk3399 Board

LKML Archive on lore.kernel.orghelp / color / mirror / Atom feed

* [PATCH] arm64: dts: rk3399: add support for firefly-rk3399 board@ :59 Kever Yang :56 ` Heiko Stuebner
0 siblings, 1 reply; 5+ messages in thread
From: Kever Yang @ :59 UTC (permalink / raw)
To: heiko
Cc: linux-rockchip, Kever Yang, devicetree, Jianqun Xu,
Andreas Färber, linux-kernel, Andy Yan, Rob Herring,
linux-arm-kernel, Will Deacon, Mark Rutland, Catalin Marinas,
Matthias Brugger
Firefly-rk3399 is a bord from T-Firefly, you can find detail about
it here:
-firefly.com/en/firenow/Firefly_RK3399/
This patch add basic node for the board and make it able to bring
up.
Peripheral works:
– usb hub which connect to ehci controller;
– UART2 debug
– eMMC
– PCIe
Not work:
– USB 3.0 HOST, type-C port
– sdio, sd-card
Not test for other peripheral:
– HDMI
– Ethernet
– OPTICAL
– WiFi/BT
– MIPI CSI/DSI
– IR
– EDP/DP
Signed-off-by: Kever Yang arch/arm64/boot/dts/rockchip/Makefile | 1 +
arch/arm64/boot/dts/rockchip/rk3399-firefly.dts | 772 ++++++++++++++++++++++++
2 files changed, 773 insertions(+)
create mode arch/arm64/boot/dts/rockchip/rk3399-firefly.dts
diff –git a/arch/arm64/boot/dts/rockchip/Makefile b/arch/arm64/boot/dts/rockchip/Makefile
index 3a86289..dd3d a/arch/arm64/boot/dts/rockchip/Makefile
+++ b/arch/arm64/boot/dts/rockchip/Makefile
@@ -4,6 +4,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3368-orion-r68-meta.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3368-px5-evb.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3368-r88.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-evb.dtb
+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-firefly.dtb
always := $(dtb-y)
subdir-y := $(dts-dirs)
diff –git a/arch/arm64/boot/dts/rockchip/rk3399-firefly.dts b/arch/arm64/boot/dts/rockchip/rk3399-firefly.dts
new file mode index ..686977b
— /dev/null
+++ b/arch/arm64/boot/dts/rockchip/rk3399-firefly.dts
@@ -0,0 +1,772 @@
+/*
+ * Copyright (c) 2017 Fuzhou Rockchip Electronics Co., Ltd
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ * a) This file is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This file is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * Or, alternatively,
+ *
+ * b) Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the “Software”), to deal in the Software without
+ * restriction, including without limitation the rights to use,
+ * copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following
+ * conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/dts-v1/;
+#include
+#include “rk3399.dtsi”
+
+/ {
+ model = “Rockchip RK3399 Firefly Board (Linux Opensource)”;
+ compatible = “rockchip,rk3399-firefly-linux”, “rockchip,rk3399”;
+
+ backlight: backlight {
+ status = “okay”;
+ compatible = “pwm-backlight”;
+ enable-gpios = ;
+ pwms = ;
+ brightness-levels = ;
+ default-brightness-level = ;
+ };
+
+ clkin_gmac: external-gmac-clock {
+ compatible = “fixed-clock”;
+ clock-frequency = ;
+ clock-output-names = “clkin_gmac”;
+ #clock-cells = ;
+ };
+
+ rt5640-sound {
+ compatible = “simple-audio-card”;
+ simple-audio-card,format = “i2s”;
+ simple-audio-card,name = “rockchip,rt5640-codec”;
+ simple-audio-card,mclk-fs = ;
+ simple-audio-card,widgets =
+ “Microphone”, “Mic Jack”,
+ “Headphone”, “Headphone Jack”;
+ simple-audio-card,routing =
+ “Mic Jack”, “MICBIAS1”,
+ “IN1P”, “Mic Jack”,
+ “Headphone Jack”, “HPOL”,
+ “Headphone Jack”, “HPOR”;
+ simple-audio-card,cpu {
+ sound-dai = ;
+ };
+ simple-audio-card,codec {
+ sound-dai = ;
+ };
+ };
+
+ sdio_pwrseq: sdio-pwrseq {
+ compatible = “mmc-pwrseq-simple”;
+ clocks = ;
+ clock-names = “ext_clock”;
+ pinctrl-names = “default”;
+ pinctrl-0 = ;
+
+ /*
+ * On the module itself this is one of these (depending
+ * on the actual card populated):
+ * – SDIO_RESET_L_WL_REG_ON
+ * – PDN (power down when low)
+ */
+ reset-gpios = ; /* GPIO0_B2 */
+ };
+
+ vcc3v3_pcie: vcc3v3-pcie-regulator {
+ compatible = “regulator-fixed”;
+ enable-active-high;
+ regulator-always-on;
+ regulator-boot-on;
+ gpio = ;
+ pinctrl-names = “default”;
+ pinctrl-0 = ;
+ regulator-name = “vcc3v3_pcie”;
+ };
+
+ vcc3v3_sys: vcc3v3-sys {
+ compatible = “regulator-fixed”;
+ regulator-name = “vcc3v3_sys”;
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = ;
+ regulator-max-microvolt = ;
+ };
+
+ vcc5v0_host: vcc5v0-host-regulator {
+ compatible = “regulator-fixed”;
+ enable-active-high;
+ gpio = ;
+ pinctrl-names = “default”;
+ pinctrl-0 = ;
+ regulator-name = “vcc5v0_host”;
+ regulator-always-on;
+ };
+
+ vcc5v0_sys: vcc5v0-sys {
+ compatible = “regulator-fixed”;
+ regulator-name = “vcc5v0_sys”;
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = ;
+ regulator-max-microvolt = ;
+ };
+
+ vcc_phy: vcc-phy-regulator {
+ compatible = “regulator-fixed”;
+ regulator-name = “vcc_phy”;
+ regulator-always-on;
+ regulator-boot-on;
+ };
+
+ vdd_log: vdd-log {
+ compatible = “pwm-regulator”;
+ pwms = ;
+ regulator-name = “vdd_log”;
+ regulator-min-microvolt = ;
+ regulator-max-microvolt = ;
+ regulator-always-on;
+ regulator-boot-on;
+
+ /* for rockchip boot on */
+ rockchip,pwm_id= ;
+ rockchip,pwm_voltage = ;
+ };
+
+ vccadc_ref: vccadc-ref {
+ compatible = “regulator-fixed”;
+ regulator-name = “vcc1v8_sys”;
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = ;
+ regulator-max-microvolt = ;
+ };
+
+ wireless-wlan {
+ compatible = “wlan-platdata”;
+ rockchip,grf = ;
+ wifi_chip_type = “ap6354”;
+ sdio_vref = ;
+ WIFI,host_wake_irq = ; /* GPIO0_a3 */
+ status = “okay”;
+ };
+
+ wireless-bluetooth {
+ compatible = “bluetooth-platdata”;
+ //wifi-bt-power-toggle;
+ uart_rts_gpios = ; /* GPIO2_C3 */
+ pinctrl-names = “default”, “rts_gpio”;
+ pinctrl-0 = ;
+ pinctrl-1 = ;
+ //BT,power_gpio = ; /* GPIOx_xx */
+ BT,reset_gpio = ; /* GPIO0_B1 */
+ BT,wake_gpio = ; /* GPIO2_D2 */
+ BT,wake_host_irq = ; /* GPIO0_A4 */
+ status = “okay”;
+ };
+};
+
+&cpu_l0 {
+ cpu-supply = ;
+};
+
+&cpu_l1 {
+ cpu-supply = ;
+};
+
+&cpu_l2 {
+ cpu-supply = ;
+};
+
+&cpu_l3 {
+ cpu-supply = ;
+};
+
+&cpu_b0 {
+ cpu-supply = ;
+};
+
+&cpu_b1 {
+ cpu-supply = ;
+};
+
+&emmc_phy {
+ status = “okay”;
+};
+
+&gmac {
+ assigned-clocks = ;
+ assigned-clock-parents = ;
+ clock_in_out = “input”;
+ phy-supply = ;
+ phy-mode = “rgmii”;
+ pinctrl-names = “default”;
+ pinctrl-0 = ;
+ snps,reset-gpio = ;
+ snps,reset-active-low;
+ snps,reset-delays-us = ;
+ tx_delay = ;
+ rx_delay = ;
+ status = “okay”;
+};
+
+&i2c0 {
+ status = “okay”;
+ i2c-scl-rising-time-ns = ;
+ i2c-scl-falling-time-ns = ;
+ clock-frequency = ;
+
+ vdd_cpu_b: syr827@40 {
+ compatible = “silergy,syr827”;
+ reg = ;
+ vin-supply = ;
+ regulator-compatible = “fan53555-reg”;
+ regulator-name = “vdd_cpu_b”;
+ regulator-min-microvolt = ;
+ regulator-max-microvolt = ;
+ regulator-ramp-delay = ;
+ vsel-gpios = ;
+ fcs,suspend-voltage-selector = ;
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-initial-state = ;
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vdd_gpu: syr828@41 {
+ compatible = “silergy,syr828”;
+ reg = ;
+ vin-supply = ;
+ regulator-compatible = “fan53555-reg”;
+ regulator-name = “vdd_gpu”;
+ regulator-min-microvolt = ;
+ regulator-max-microvolt = ;
+ regulator-ramp-delay = ;
+ fcs,suspend-voltage-selector = ;
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-initial-state = ;
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ rk808: pmic@1b {
+ compatible = “rockchip,rk808”;
+ reg = ;
+ interrupt-parent = ;
+ interrupts = ;
+ pinctrl-names = “default”;
+ pinctrl-0 = ;
+ rockchip,system-power-controller;
+ wakeup-source;
+ #clock-cells = ;
+ clock-output-names = “xin32k”, “rk808-clkout2”;
+
+ vcc1-supply = ;
+ vcc2-supply = ;
+ vcc3-supply = ;
+ vcc4-supply = ;
+ vcc6-supply = ;
+ vcc7-supply = ;
+ vcc8-supply = ;
+ vcc9-supply = ;
+ vcc10-supply = ;
+ vcc11-supply = ;
+ vcc12-supply = ;
+ vddio-supply = ;
+
+ regulators {
+ vdd_center: DCDC_REG1 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = ;
+ regulator-max-microvolt = ;
+ regulator-ramp-delay = ;
+ regulator-name = “vdd_center”;
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vdd_cpu_l: DCDC_REG2 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = ;
+ regulator-max-microvolt = ;
+ regulator-ramp-delay = ;
+ regulator-name = “vdd_cpu_l”;
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vcc_ddr: DCDC_REG3 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-name = “vcc_ddr”;
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ };
+ };
+
+ vcc_1v8: DCDC_REG4 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = ;
+ regulator-max-microvolt = ;
+ regulator-name = “vcc_1v8”;
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = ;
+ };
+ };
+
+ vcc1v8_dvp: LDO_REG1 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = ;
+ regulator-max-microvolt = ;
+ regulator-name = “vcc1v8_dvp”;
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vcc3v0_tp: LDO_REG2 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = ;
+ regulator-max-microvolt = ;
+ regulator-name = “vcc3v0_tp”;
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vcc1v8_pmu: LDO_REG3 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = ;
+ regulator-max-microvolt = ;
+ regulator-name = “vcc1v8_pmu”;
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = ;
+ };
+ };
+
+ vcc_sd: LDO_REG4 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = ;
+ regulator-max-microvolt = ;
+ regulator-name = “vcc_sd”;
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = ;
+ };
+ };
+
+ vcca3v0_codec: LDO_REG5 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = ;
+ regulator-max-microvolt = ;
+ regulator-name = “vcca3v0_codec”;
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vcc_1v5: LDO_REG6 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = ;
+ regulator-max-microvolt = ;
+ regulator-name = “vcc_1v5”;
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = ;
+ };
+ };
+
+ vcca1v8_codec: LDO_REG7 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = ;
+ regulator-max-microvolt = ;
+ regulator-name = “vcca1v8_codec”;
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vcc_3v0: LDO_REG8 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = ;
+ regulator-max-microvolt = ;
+ regulator-name = “vcc_3v0”;
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = ;
+ };
+ };
+
+ vcc3v3_s3: SWITCH_REG1 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-name = “vcc3v3_s3”;
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vcc3v3_s0: SWITCH_REG2 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-name = “vcc3v3_s0”;
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+ };
+ };
+};
+
+&i2c1 {
+ status = “okay”;
+ i2c-scl-rising-time-ns = ;
+ i2c-scl-falling-time-ns = ;
+
+ gsl3673: gsl3673@40 {
+ compatible = “GSL,GSL3673”;
+ reg = ;
+ screen_max_x = ;
+ screen_max_y = ;
+ irq_gpio_number = ;
+ rst_gpio_number = ;
+ };
+
+ rt5640: rt5640@1c {
+ #sound-dai-cells = ;
+ compatible = “realtek,rt5640”;
+ reg = ;
+ clocks = ;
+ clock-names = “mclk”;
+ realtek,in1-differential;
+ pinctrl-names = “default”;
+ pinctrl-0 = ;
+ hp-con-gpio = ;
+ //hp-det-gpio = ;
+ io-channels = ;
+ hp-det-adc-value = ;
+ };
+};
+
+&i2c3 {
+ status = “okay”;
+ i2c-scl-rising-time-ns = ;
+ i2c-scl-falling-time-ns = ;
+};
+
+&i2c4 {
+ status = “okay”;
+ i2c-scl-rising-time-ns = ;
+ i2c-scl-falling-time-ns = ;
+
+ fusb0: fusb30x@22 {
+ compatible = “fairchild,fusb302”;
+ reg = ;
+ pinctrl-names = “default”;
+ pinctrl-0 = ;
+ int-n-gpios = ;
+ vbus-5v-gpios = ;
+ status = “okay”;
+ };
+
+ mpu6500@68 {
+ status = “okay”;
+ compatible = “invensense,mpu6500”;
+ reg = ;
+ irq-gpio = ;
+ mpu-int_config = ;
+ mpu-level_shifter = ;
+ mpu-orientation = ;
+ orientation-x= ;
+ orientation-y= ;
+ orientation-z= ;
+ mpu-debug = ;
+ };
+};
+
+&i2s0 {
+ status = “okay”;
+ rockchip,i2s-broken-burst-len;
+ rockchip,playback-channels = ;
+ rockchip,capture-channels = ;
+ #sound-dai-cells = ;
+};
+
+&i2s1 {
+ status = “okay”;
+ rockchip,i2s-broken-burst-len;
+ rockchip,playback-channels = ;
+ rockchip,capture-channels = ;
+ #sound-dai-cells = ;
+};
+
+&i2s2 {
+ #sound-dai-cells = ;
+ status = “okay”;
+};
+
+&io_domains {
+ status = “okay”;
+
+ bt656-supply = ; /* bt656_gpio2ab_ms */
+ audio-supply = ; /* audio_gpio3d4a_ms */
+ sdmmc-supply = ; /* sdmmc_gpio4b_ms */
+ gpio1830-supply = ; /* gpio1833_gpio4cd_ms */
+};
+
+&pcie_phy {
+ status = “okay”;
+};
+
+&pcie0 {
+ ep-gpios = ;
+ num-lanes = ;
+ pinctrl-names = “default”;
+ pinctrl-0 = ;
+ status = “okay”;
+};
+
+&pmu_io_domains {
+ status = “okay”;
+ pmu1830-supply = ;
+};
+
+&pinctrl {
+ buttons {
+ pwrbtn: pwrbtn {
+ rockchip,pins = ;
+ };
+ };
+
+ lcd-panel {
+ lcd_panel_reset: lcd-panel-reset {
+ rockchip,pins = ;
+ };
+ };
+
+ pcie {
+ pcie_drv: pcie-drv {
+ rockchip,pins =
+ ;
+ };
+ pcie_3g_drv: pcie-3g-drv {
+ rockchip,pins =
+ ;
+ };
+ };
+
+ pmic {
+ vsel1_gpio: vsel1-gpio {
+ rockchip,pins =
+ ;
+ };
+
+ vsel2_gpio: vsel2-gpio {
+ rockchip,pins =
+ ;
+ };
+ };
+
+ sdio-pwrseq {
+ wifi_enable_h: wifi-enable-h {
+ rockchip,pins =
+ ;
+ };
+ };
+
+ wireless-bluetooth {
+ uart0_gpios: uart0-gpios {
+ rockchip,pins =
+ ;
+ };
+ };
+
+ rt5640 {
+ rt5640_hpcon: rt5640-hpcon {
+ rockchip,pins = ;
+ };
+ };
+
+ pmic {
+ pmic_int_l: pmic-int-l {
+ rockchip,pins =
+ ;
+ };
+ };
+
+ usb2 {
+ host_vbus_drv: host-vbus-drv {
+ rockchip,pins =
+ ;
+ };
+ };
+
+ fusb30x {
+ fusb0_int: fusb0-int {
+ rockchip,pins = ;
+ };
+ };
+};
+
+&pwm0 {
+ status = “okay”;
+};
+
+&pwm2 {
+ status = “okay”;
+};
+
+&saradc {
+ status = “okay”;
+ vref-supply = ;
+};
+
+&sdhci {
+ bus-width = ;
+ keep-power-in-suspend;
+ mmc-hs400-1_8v;
+ mmc-hs400-enhanced-strobe;
+ non-removable;
+ status = “okay”;
+ supports-emmc;
+};
+
+&tsadc {
+ /* tshut mode 0:CRU 1:GPIO */
+ rockchip,hw-tshut-mode = ;
+ /* tshut polarity 0:LOW 1:HIGH */
+ rockchip,hw-tshut-polarity = ;
+ status = “okay”;
+};
+
+&u2phy0 {
+ status = “okay”;
+ extcon = ;
+
+ u2phy0_otg: otg-port {
+ status = “okay”;
+ };
+
+ u2phy0_host: host-port {
+ phy-supply = ;
+ status = “okay”;
+ };
+};
+
+&u2phy1 {
+ status = “okay”;
+
+ u2phy1_otg: otg-port {
+ status = “okay”;
+ };
+
+ u2phy1_host: host-port {
+ phy-supply = ;
+ status = “okay”;
+ };
+};
+
+&uart0 {
+ pinctrl-names = “default”;
+ pinctrl-0 = ;
+ status = “okay”;
+};
+
+&uart2 {
+ status = “okay”;
+};
+
+&usb_host0_ehci {
+ status = “okay”;
+};
+
+&usb_host0_ohci {
+ status = “okay”;
+};
+
+&usb_host1_ehci {
+ status = “okay”;
+};
+
+&usb_host1_ohci {
+ status = “okay”;
+}; .9.1
^ permalink raw reply [flat|nested] 5+ messages in thread

* Re: [PATCH] arm64: dts: rk3399: add support for firefly-rk3399 board :59 [PATCH] arm64: dts: rk3399: add support for firefly-rk3399 board Kever Yang
@ :56 ` Heiko Stuebner :59 ` Andreas Färber
0 siblings, 1 reply; 5+ messages in thread
From: Heiko Stuebner @ :56 UTC (permalink / raw)
To: Kever Yang
Cc: linux-rockchip, devicetree, Jianqun Xu, Andreas Färber,
linux-kernel, Andy Yan, Rob Herring, linux-arm-kernel,
Will Deacon, Mark Rutland, Catalin Marinas, Matthias Brugger
Hi Kever,
Am Freitag, 31. März 2017, 17:59:07 CEST schrieb Kever Yang:
> Firefly-rk3399 is a bord from T-Firefly, you can find detail about
> it here:
> -firefly.com/en/firenow/Firefly_RK3399/
>
> This patch add basic node for the board and make it able to bring
> up.
This more a first glance, I didn’t check every binding, but already found
some dubious ones, so in general, please make sure to only include nodes
with approved bindings.
[…]
> arch/arm64/boot/dts/rockchip/Makefile | 1 +
> arch/arm64/boot/dts/rockchip/rk3399-firefly.dts | 772 ++++++++++++++++++++++++
please provide a binding addition for the board in a separate patch as well.
> 2 files changed, 773 insertions(+)
> create mode arch/arm64/boot/dts/rockchip/rk3399-firefly.dts
>
> diff –git a/arch/arm64/boot/dts/rockchip/Makefile b/arch/arm64/boot/dts/rockchip/Makefile
> index 3a86289..dd3d > — a/arch/arm64/boot/dts/rockchip/Makefile
> +++ b/arch/arm64/boot/dts/rockchip/Makefile
> @@ -4,6 +4,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3368-orion-r68-meta.dtb
> dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3368-px5-evb.dtb
> dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3368-r88.dtb
> dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-evb.dtb
> +dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-firefly.dtb
if possible, please rebase on top of my for-next branch, as we also
have the first gru board in there now.
>
> always := $(dtb-y)
> subdir-y := $(dts-dirs)
> diff –git a/arch/arm64/boot/dts/rockchip/rk3399-firefly.dts b/arch/arm64/boot/dts/rockchip/rk3399-firefly.dts
> new file mode > index ..686977b
> — /dev/null
> +++ b/arch/arm64/boot/dts/rockchip/rk3399-firefly.dts
> @@ -0,0 +1,772 @@
> +/*
> + * Copyright (c) 2017 Fuzhou Rockchip Electronics Co., Ltd
> + *
> + * This file is dual-licensed: you can use it either under the terms
> + * of the GPL or the X11 license, at your option. Note that this dual
> + * licensing only applies to this file, and not this project as a
> + * whole.
> + *
> + * a) This file is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU General Public License as
> + * published by the Free Software Foundation; either version 2 of the
> + * License, or (at your option) any later version.
> + *
> + * This file is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> + * GNU General Public License for more details.
> + *
> + * Or, alternatively,
> + *
> + * b) Permission is hereby granted, free of charge, to any person
> + * obtaining a copy of this software and associated documentation
> + * files (the “Software”), to deal in the Software without
> + * restriction, including without limitation the rights to use,
> + * copy, modify, merge, publish, distribute, sublicense, and/or
> + * sell copies of the Software, and to permit persons to whom the
> + * Software is furnished to do so, subject to the following
> + * conditions:
> + *
> + * The above copyright notice and this permission notice shall be
> + * included in all copies or substantial portions of the Software.
> + *
> + * THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND,
> + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
> + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
> + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
> + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
> + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
> + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
> + * OTHER DEALINGS IN THE SOFTWARE.
> + */
> +
> +/dts-v1/;
> +#include
> +#include “rk3399.dtsi”
> +
> +/ {
> + model = “Rockchip RK3399 Firefly Board (Linux Opensource)”;
> + compatible = “rockchip,rk3399-firefly-linux”, “rockchip,rk3399”;
Just to make sure, is this really a Rockchip board? I would’ve expected
to see something like “firefly,firefly-rk3399” here, like on the rk variant. Not a requirement, just a question to clarify who designed the
board please 🙂 .
> +
> + backlight: backlight {
> + status = “okay”;
> + compatible = “pwm-backlight”;
> + enable-gpios = ;
> + pwms = ;
> + brightness-levels = < > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + >;
> + default-brightness-level = ;
> + };
> +
> + clkin_gmac: external-gmac-clock {
> + compatible = “fixed-clock”;
> + clock-frequency = ;
> + clock-output-names = “clkin_gmac”;
> + #clock-cells = ;
> + };
> +
> + rt5640-sound {
> + compatible = “simple-audio-card”;
> + simple-audio-card,format = “i2s”;
> + simple-audio-card,name = “rockchip,rt5640-codec”;
> + simple-audio-card,mclk-fs = ;
> + simple-audio-card,widgets =
> + “Microphone”, “Mic Jack”,
> + “Headphone”, “Headphone Jack”;
> + simple-audio-card,routing =
> + “Mic Jack”, “MICBIAS1”,
> + “IN1P”, “Mic Jack”,
> + “Headphone Jack”, “HPOL”,
> + “Headphone Jack”, “HPOR”;
> + simple-audio-card,cpu {
> + sound-dai = ;
> + };
> + simple-audio-card,codec {
> + sound-dai = ;
> + };
> + };
> +
> + sdio_pwrseq: sdio-pwrseq {
> + compatible = “mmc-pwrseq-simple”;
> + clocks = ;
> + clock-names = “ext_clock”;
> + pinctrl-names = “default”;
> + pinctrl-0 = ;
> +
> + /*
> + * On the module itself this is one of these (depending
> + * on the actual card populated):
> + * – SDIO_RESET_L_WL_REG_ON
> + * – PDN (power down when low)
> + */
> + reset-gpios = ; /* GPIO0_B2 */
Thanks to Andy’s persistence, we have nice constants in the pinctrl-
binding-header now, like RK_PB2 for the above. So you can drop the
comment and use the constant instead for easier reading.
Same for other pins.
> + };
> +
> + vcc3v3_pcie: vcc3v3-pcie-regulator {
> + compatible = “regulator-fixed”;
> + enable-active-high;
> + regulator-always-on;
> + regulator-boot-on;
> + gpio = ;
> + pinctrl-names = “default”;
> + pinctrl-0 = ;
> + regulator-name = “vcc3v3_pcie”;
> + };
> +
> + vcc3v3_sys: vcc3v3-sys {
> + compatible = “regulator-fixed”;
> + regulator-name = “vcc3v3_sys”;
> + regulator-always-on;
> + regulator-boot-on;
> + regulator-min-microvolt = ;
> + regulator-max-microvolt = ;
> + };
> +
> + vcc5v0_host: vcc5v0-host-regulator {
> + compatible = “regulator-fixed”;
> + enable-active-high;
> + gpio = ;
> + pinctrl-names = “default”;
> + pinctrl-0 = ;
> + regulator-name = “vcc5v0_host”;
> + regulator-always-on;
> + };
> +
> + vcc5v0_sys: vcc5v0-sys {
> + compatible = “regulator-fixed”;
> + regulator-name = “vcc5v0_sys”;
> + regulator-always-on;
> + regulator-boot-on;
> + regulator-min-microvolt = ;
> + regulator-max-microvolt = ;
> + };
> +
> + vcc_phy: vcc-phy-regulator {
> + compatible = “regulator-fixed”;
> + regulator-name = “vcc_phy”;
> + regulator-always-on;
> + regulator-boot-on;
> + };
> +
> + vdd_log: vdd-log {
> + compatible = “pwm-regulator”;
> + pwms = ;
> + regulator-name = “vdd_log”;
> + regulator-min-microvolt = ;
> + regulator-max-microvolt = ;
> + regulator-always-on;
> + regulator-boot-on;
> +
> + /* for rockchip boot on */
> + rockchip,pwm_id= ;
> + rockchip,pwm_voltage = ;
> + };
> +
> + vccadc_ref: vccadc-ref {
> + compatible = “regulator-fixed”;
> + regulator-name = “vcc1v8_sys”;
> + regulator-always-on;
> + regulator-boot-on;
> + regulator-min-microvolt = ;
> + regulator-max-microvolt = ;
> + };
> +
> + wireless-wlan {
> + compatible = “wlan-platdata”;
> + rockchip,grf = ;
> + wifi_chip_type = “ap6354”;
> + sdio_vref = ;
> + WIFI,host_wake_irq = ; /* GPIO0_a3 */
> + status = “okay”;
that is not a valid binding, am I right? 😉
So should be dropped.
> + };
> +
> + wireless-bluetooth {
> + compatible = “bluetooth-platdata”;
> + //wifi-bt-power-toggle;
> + uart_rts_gpios = ; /* GPIO2_C3 */
> + pinctrl-names = “default”, “rts_gpio”;
> + pinctrl-0 = ;
> + pinctrl-1 = ;
> + //BT,power_gpio = ; /* GPIOx_xx */
> + BT,reset_gpio = ; /* GPIO0_B1 */
> + BT,wake_gpio = ; /* GPIO2_D2 */
> + BT,wake_host_irq = ; /* GPIO0_A4 */
> + status = “okay”;
> + };
same here
> +};
> +
> +&cpu_l0 {
> + cpu-supply = ;
> +};
> +
> +&cpu_l1 {
> + cpu-supply = ;
> +};
> +
> +&cpu_l2 {
> + cpu-supply = ;
> +};
> +
> +&cpu_l3 {
> + cpu-supply = ;
> +};
> +
> +&cpu_b0 {
> + cpu-supply = ;
> +};
> +
> +&cpu_b1 {
> + cpu-supply = ;
> +};
> +
> +&emmc_phy {
> + status = “okay”;
> +};
> +
> +&gmac {
> + assigned-clocks = ;
> + assigned-clock-parents = ;
> + clock_in_out = “input”;
> + phy-supply = ;
> + phy-mode = “rgmii”;
> + pinctrl-names = “default”;
> + pinctrl-0 = ;
> + snps,reset-gpio = ;
> + snps,reset-active-low;
> + snps,reset-delays-us = ;
> + tx_delay = ;
> + rx_delay = ;
> + status = “okay”;
> +};
> +
> +&i2c0 {
> + status = “okay”;
> + i2c-scl-rising-time-ns = ;
> + i2c-scl-falling-time-ns = ;
> + clock-frequency = ;
> +
> + vdd_cpu_b: syr827@40 {
> + compatible = “silergy,syr827”;
> + reg = ;
> + vin-supply = ;
> + regulator-compatible = “fan53555-reg”;
> + regulator-name = “vdd_cpu_b”;
> + regulator-min-microvolt = ;
> + regulator-max-microvolt = ;
> + regulator-ramp-delay = ;
> + vsel-gpios = ;
> + fcs,suspend-voltage-selector = ;
> + regulator-always-on;
> + regulator-boot-on;
> + regulator-initial-state = ;
> + regulator-state-mem {
> + regulator-off-in-suspend;
> + };
> + };
> +
> + vdd_gpu: syr828@41 {
> + compatible = “silergy,syr828”;
> + reg = ;
> + vin-supply = ;
> + regulator-compatible = “fan53555-reg”;
> + regulator-name = “vdd_gpu”;
> + regulator-min-microvolt = ;
> + regulator-max-microvolt = ;
> + regulator-ramp-delay = ;
> + fcs,suspend-voltage-selector = ;
> + regulator-always-on;
> + regulator-boot-on;
> + regulator-initial-state = ;
> + regulator-state-mem {
> + regulator-off-in-suspend;
> + };
> + };
> +
> + rk808: pmic@1b {
> + compatible = “rockchip,rk808”;
> + reg = ;
> + interrupt-parent = ;
> + interrupts = ;
> + pinctrl-names = “default”;
> + pinctrl-0 = ;
> + rockchip,system-power-controller;
> + wakeup-source;
> + #clock-cells = ;
> + clock-output-names = “xin32k”, “rk808-clkout2”;
> +
> + vcc1-supply = ;
> + vcc2-supply = ;
> + vcc3-supply = ;
> + vcc4-supply = ;
> + vcc6-supply = ;
> + vcc7-supply = ;
> + vcc8-supply = ;
> + vcc9-supply = ;
> + vcc10-supply = ;
> + vcc11-supply = ;
> + vcc12-supply = ;
> + vddio-supply = ;
> +
> + regulators {
> + vdd_center: DCDC_REG1 {
> + regulator-always-on;
> + regulator-boot-on;
> + regulator-min-microvolt = ;
> + regulator-max-microvolt = ;
> + regulator-ramp-delay = ;
> + regulator-name = “vdd_center”;
> + regulator-state-mem {
> + regulator-off-in-suspend;
> + };
> + };
> +
> + vdd_cpu_l: DCDC_REG2 {
> + regulator-always-on;
> + regulator-boot-on;
> + regulator-min-microvolt = ;
> + regulator-max-microvolt = ;
> + regulator-ramp-delay = ;
> + regulator-name = “vdd_cpu_l”;
> + regulator-state-mem {
> + regulator-off-in-suspend;
> + };
> + };
> +
> + vcc_ddr: DCDC_REG3 {
> + regulator-always-on;
> + regulator-boot-on;
> + regulator-name = “vcc_ddr”;
> + regulator-state-mem {
> + regulator-on-in-suspend;
> + };
> + };
> +
> + vcc_1v8: DCDC_REG4 {
> + regulator-always-on;
> + regulator-boot-on;
> + regulator-min-microvolt = ;
> + regulator-max-microvolt = ;
> + regulator-name = “vcc_1v8”;
> + regulator-state-mem {
> + regulator-on-in-suspend;
> + regulator-suspend-microvolt = ;
> + };
> + };
> +
> + vcc1v8_dvp: LDO_REG1 {
> + regulator-always-on;
> + regulator-boot-on;
> + regulator-min-microvolt = ;
> + regulator-max-microvolt = ;
> + regulator-name = “vcc1v8_dvp”;
> + regulator-state-mem {
> + regulator-off-in-suspend;
> + };
> + };
> +
> + vcc3v0_tp: LDO_REG2 {
> + regulator-always-on;
> + regulator-boot-on;
> + regulator-min-microvolt = ;
> + regulator-max-microvolt = ;
> + regulator-name = “vcc3v0_tp”;
> + regulator-state-mem {
> + regulator-off-in-suspend;
> + };
> + };
> +
> + vcc1v8_pmu: LDO_REG3 {
> + regulator-always-on;
> + regulator-boot-on;
> + regulator-min-microvolt = ;
> + regulator-max-microvolt = ;
> + regulator-name = “vcc1v8_pmu”;
> + regulator-state-mem {
> + regulator-on-in-suspend;
> + regulator-suspend-microvolt = ;
> + };
> + };
> +
> + vcc_sd: LDO_REG4 {
> + regulator-always-on;
> + regulator-boot-on;
> + regulator-min-microvolt = ;
> + regulator-max-microvolt = ;
> + regulator-name = “vcc_sd”;
> + regulator-state-mem {
> + regulator-on-in-suspend;
> + regulator-suspend-microvolt = ;
> + };
> + };
> +
> + vcca3v0_codec: LDO_REG5 {
> + regulator-always-on;
> + regulator-boot-on;
> + regulator-min-microvolt = ;
> + regulator-max-microvolt = ;
> + regulator-name = “vcca3v0_codec”;
> + regulator-state-mem {
> + regulator-off-in-suspend;
> + };
> + };
> +
> + vcc_1v5: LDO_REG6 {
> + regulator-always-on;
> + regulator-boot-on;
> + regulator-min-microvolt = ;
> + regulator-max-microvolt = ;
> + regulator-name = “vcc_1v5”;
> + regulator-state-mem {
> + regulator-on-in-suspend;
> + regulator-suspend-microvolt = ;
> + };
> + };
> +
> + vcca1v8_codec: LDO_REG7 {
> + regulator-always-on;
> + regulator-boot-on;
> + regulator-min-microvolt = ;
> + regulator-max-microvolt = ;
> + regulator-name = “vcca1v8_codec”;
> + regulator-state-mem {
> + regulator-off-in-suspend;
> + };
> + };
> +
> + vcc_3v0: LDO_REG8 {
> + regulator-always-on;
> + regulator-boot-on;
> + regulator-min-microvolt = ;
> + regulator-max-microvolt = ;
> + regulator-name = “vcc_3v0”;
> + regulator-state-mem {
> + regulator-on-in-suspend;
> + regulator-suspend-microvolt = ;
> + };
> + };
> +
> + vcc3v3_s3: SWITCH_REG1 {
> + regulator-always-on;
> + regulator-boot-on;
> + regulator-name = “vcc3v3_s3”;
> + regulator-state-mem {
> + regulator-off-in-suspend;
> + };
> + };
> +
> + vcc3v3_s0: SWITCH_REG2 {
> + regulator-always-on;
> + regulator-boot-on;
> + regulator-name = “vcc3v3_s0”;
> + regulator-state-mem {
> + regulator-off-in-suspend;
> + };
> + };
> + };
> + };
> +};
> +
> +&i2c1 {
> + status = “okay”;
> + i2c-scl-rising-time-ns = ;
> + i2c-scl-falling-time-ns = ;
> +
> + gsl3673: gsl3673@40 {
> + compatible = “GSL,GSL3673”;
> + reg = ;
> + screen_max_x = ;
> + screen_max_y = ;
> + irq_gpio_number = ;
> + rst_gpio_number = ;
Again doesn’t look like a valid binding.
> + };
> +
> + rt5640: rt5640@1c {
> + #sound-dai-cells = ;
> + compatible = “realtek,rt5640”;
> + reg = ;
> + clocks = ;
> + clock-names = “mclk”;
> + realtek,in1-differential;
> + pinctrl-names = “default”;
> + pinctrl-0 = ;
> + hp-con-gpio = ;
> + //hp-det-gpio = ;
don’t add commented lines please
> + io-channels = ;
> + hp-det-adc-value = ;
> + };
> +};
> +
> +&i2c3 {
> + status = “okay”;
> + i2c-scl-rising-time-ns = ;
> + i2c-scl-falling-time-ns = ;
> +};
> +
> +&i2c4
> + status = “okay”;
> + i2c-scl-rising-time-ns = ;
> + i2c-scl-falling-time-ns = ;
> +
> + fusb0: fusb30x@22 772 ++++++++++++++++++++++++
>
> please provide a binding addition for the board in a separate patch as well.
>
>
>> 2 files changed, 773 insertions(+)
>> create mode arch/arm64/boot/dts/rockchip/rk3399-firefly.dts
>>
>> diff –git a/arch/arm64/boot/dts/rockchip/Makefile b/arch/arm64/boot/dts/rockchip/Makefile
>> index 3a86289..dd3d >> — a/arch/arm64/boot/dts/rockchip/Makefile
>> +++ b/arch/arm64/boot/dts/rockchip/Makefile
>> @@ -4,6 +4,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3368-orion-r68-meta.dtb
>> dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3368-px5-evb.dtb
>> dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3368-r88.dtb
>> dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-evb.dtb
>> +dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-firefly.dtb
>
> if possible, please rebase on top of my for-next branch, as we also
> have the first gru board in there now.
>
>>
>> always := $(dtb-y)
>> subdir-y := $(dts-dirs)
>> diff –git a/arch/arm64/boot/dts/rockchip/rk3399-firefly.dts b/arch/arm64/boot/dts/rockchip/rk3399-firefly.dts
>> new file mode >> index ..686977b
>> — /dev/null
>> +++ b/arch/arm64/boot/dts/rockchip/rk3399-firefly.dts
>> @@ -0,0 +1,772 @@
>> +/*
>> + * Copyright (c) 2017 Fuzhou Rockchip Electronics Co., Ltd
“Ltd.”?
>> + *
>> + * This file is dual-licensed: you can use it either under the terms
>> + * of the GPL or the X11 license, at your option. Note that this dual
>> + * licensing only applies to this file, and not this project as a
>> + * whole.
>> + *
>> + * a) This file is free software; you can redistribute it and/or
>> + * modify it under the terms of the GNU General Public License as
>> + * published by the Free Software Foundation; either version 2 of the
>> + * License, or (at your option) any later version.
>> + *
>> + * This file is distributed in the hope that it will be useful,
>> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
>> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
>> + * GNU General Public License for more details.
>> + *
>> + * Or, alternatively,
>> + *
>> + * b) Permission is hereby granted, free of charge, to any person
>> + * obtaining a copy of this software and associated documentation
>> + * files (the “Software”), to deal in the Software without
>> + * restriction, including without limitation the rights to use,
>> + * copy, modify, merge, publish, distribute, sublicense, and/or
>> + * sell copies of the Software, and to permit persons to whom the
>> + * Software is furnished to do so, subject to the following
>> + * conditions:
>> + *
>> + * The above copyright notice and this permission notice shall be
>> + * included in all copies or substantial portions of the Software.
>> + *
>> + * THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND,
>> + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
>> + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
>> + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
>> + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
>> + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
>> + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
>> + * OTHER DEALINGS IN THE SOFTWARE.
This should be shorter: “SPDX-License-Identifier: GPL-2.0+ OR MIT”
>> + */
>> +
>> +/dts-v1/;
>> +#include
>> +#include “rk3399.dtsi”
>> +
>> +/ {
>> + model = “Rockchip RK3399 Firefly Board (Linux Opensource)”;
“(Linux Opensource)” is not a hardware description, please drop.
>> + compatible = “rockchip,rk3399-firefly-linux”, “rockchip,rk3399”;
>
> Just to make sure, is this really a Rockchip board? I would’ve expected
> to see something like “firefly,firefly-rk3399” here, like on the rk > variant. Not a requirement, just a question to clarify who designed the
> board please 🙂 .
+1, especially no -linux suffix please. The same device tree should in
theory be usable with Linux, Android, FreeBSD or any other OS with
drivers based on the official bindings.
>> +
>> + backlight: backlight {
>> + status = “okay”;
>> + compatible = “pwm-backlight”;
>> + enable-gpios = ;
>> + pwms = ;
>> + brightness-levels = < >> + >> + >> + >> + >> + >> + >> + >> + >> + >> + >> + >> + >> + >> + >> + >> + >> + >> + >> + >> + >> + >> + >> + >> + >> + >> + >> + >> + >> + >> + >> + >> + >;
>> + default-brightness-level = ;
>> + };
>> +
>> + clkin_gmac: external-gmac-clock {
>> + compatible = “fixed-clock”;
>> + clock-frequency = ;
>> + clock-output-names = “clkin_gmac”;
>> + #clock-cells = ;
>> + };
>> +
>> + rt5640-sound {
Drop rt5640- node prefix, or is there more than one?
>> + compatible = “simple-audio-card”;
>> + simple-audio-card,format = “i2s”;
>> + simple-audio-card,name = “rockchip,rt5640-codec”;
>> + simple-audio-card,mclk-fs = ;
>> + simple-audio-card,widgets =
>> + “Microphone”, “Mic Jack”,
>> + “Headphone”, “Headphone Jack”;
>> + simple-audio-card,routing =
>> + “Mic Jack”, “MICBIAS1”,
>> + “IN1P”, “Mic Jack”,
>> + “Headphone Jack”, “HPOL”,
>> + “Headphone Jack”, “HPOR”;
>> + simple-audio-card,cpu {
>> + sound-dai = ;
>> + };
>> + simple-audio-card,codec {
>> + sound-dai = ;
>> + };
Insert while lines before these two nodes for readability?
>> + };
>> +
>> + sdio_pwrseq: sdio-pwrseq {
>> + compatible = “mmc-pwrseq-simple”;
>> + clocks = ;
>> + clock-names = “ext_clock”;
>> + pinctrl-names = “default”;
>> + pinctrl-0 = ;
>> +
>> + /*
>> + * On the module itself this is one of these (depending
>> + * on the actual card populated):
>> + * – SDIO_RESET_L_WL_REG_ON
>> + * – PDN (power down when low)
>> + */
>> + reset-gpios = ; /* GPIO0_B2 */
>
> Thanks to Andy’s persistence, we have nice constants in the pinctrl-
> binding-header now, like RK_PB2 for the above. So you can drop the
> comment and use the constant instead for easier reading.
> Same for other pins.
>
>
>> + };
>> +
>> + vcc3v3_pcie: vcc3v3-pcie-regulator {
>> + compatible = “regulator-fixed”;
>> + enable-active-high;
>> + regulator-always-on;
>> + regulator-boot-on;
>> + gpio = ;
>> + pinctrl-names = “default”;
>> + pinctrl-0 = ;
>> + regulator-name = “vcc3v3_pcie”;
>> + };
>> +
>> + vcc3v3_sys: vcc3v3-sys {
>> + compatible = “regulator-fixed”;
>> + regulator-name = “vcc3v3_sys”;
>> + regulator-always-on;
>> + regulator-boot-on;
>> + regulator-min-microvolt = ;
>> + regulator-max-microvolt = ;
>> + };
>> +
>> + vcc5v0_host: vcc5v0-host-regulator {
>> + compatible = “regulator-fixed”;
>> + enable-active-high;
>> + gpio = ;
>> + pinctrl-names = “default”;
>> + pinctrl-0 = ;
>> + regulator-name = “vcc5v0_host”;
>> + regulator-always-on;
>> + };
>> +
>> + vcc5v0_sys: vcc5v0-sys {
>> + compatible = “regulator-fixed”;
>> + regulator-name = “vcc5v0_sys”;
>> + regulator-always-on;
>> + regulator-boot-on;
>> + regulator-min-microvolt = ;
>> + regulator-max-microvolt = ;
>> + };
>> +
>> + vcc_phy: vcc-phy-regulator {
>> + compatible = “regulator-fixed”;
>> + regulator-name = “vcc_phy”;
>> + regulator-always-on;
>> + regulator-boot-on;
>> + };
>> +
>> + vdd_log: vdd-log {
>> + compatible = “pwm-regulator”;
>> + pwms = ;
>> + regulator-name = “vdd_log”;
>> + regulator-min-microvolt = ;
>> + regulator-max-microvolt = ;
>> + regulator-always-on;
>> + regulator-boot-on;
>> +
>> + /* for rockchip boot on */
>> + rockchip,pwm_id= ;
>> + rockchip,pwm_voltage = ;
>> + };
>> +
>> + vccadc_ref: vccadc-ref {
>> + compatible = “regulator-fixed”;
>> + regulator-name = “vcc1v8_sys”;
>> + regulator-always-on;
>> + regulator-boot-on;
>> + regulator-min-microvolt = ;
>> + regulator-max-microvolt = ;
>> + };
>> +
>> + wireless-wlan {
>> + compatible = “wlan-platdata”;
>> + rockchip,grf = ;
>> + wifi_chip_type = “ap6354”;
>> + sdio_vref = ;
>> + WIFI,host_wake_irq = ; /* GPIO0_a3 */
>> + status = “okay”;
>
> that is not a valid binding, am I right? 😉
> So should be dropped.
… or should be replaced by the proper binding (brcmfmac probably?).
>
>> + };
>> +
>> + wireless-bluetooth {
>> + compatible = “bluetooth-platdata”;
>> + //wifi-bt-power-toggle;
>> + uart_rts_gpios = ; /* GPIO2_C3 */
>> + pinctrl-names = “default”, “rts_gpio”;
>> + pinctrl-0 = ;
>> + pinctrl-1 = ;
>> + //BT,power_gpio = ; /* GPIOx_xx */
>> + BT,reset_gpio = ; /* GPIO0_B1 */
>> + BT,wake_gpio = ; /* GPIO2_D2 */
>> + BT,wake_host_irq = ; /* GPIO0_A4 */
>> + status = “okay”;
>> + };
>
> same here
Move to corresponding uart node? (serdev bindings)
>> +};
>> +
>> +&cpu_l0 {
>> + cpu-supply = ;
>> +};
>> +
>> +&cpu_l1 {
>> + cpu-supply = ;
>> +};
>> +
>> +&cpu_l2 {
>> + cpu-supply = ;
>> +};
>> +
>> +&cpu_l3 {
>> + cpu-supply = ;
>> +};
>> +
>> +&cpu_b0 {
>> + cpu-supply = ;
>> +};
>> +
>> +&cpu_b1 {
>> + cpu-supply = ;
>> +};
>> +
>> +&emmc_phy {
>> + status = “okay”;
>> +};
>> +
>> +&gmac {
>> + assigned-clocks = ;
>> + assigned-clock-parents = ;
>> + clock_in_out = “input”;
>> + phy-supply = ;
>> + phy-mode = “rgmii”;
>> + pinctrl-names = “default”;
>> + pinctrl-0 = ;
>> + snps,reset-gpio = ;
>> + snps,reset-active-low;
>> + snps,reset-delays-us = ;
>> + tx_delay = ;
>> + rx_delay = ;
>> + status = “okay”;
>> +};
>> +
>> +&i2c0 {
>> + status = “okay”;
>> + i2c-scl-rising-time-ns = ;
>> + i2c-scl-falling-time-ns = ;
>> + clock-frequency = ;
>> +
>> + vdd_cpu_b: syr827@40 {
Node name should not duplicate the model. pmic@40?
>> + compatible = “silergy,syr827”;
>> + reg = ;
>> + vin-supply = ;
>> + regulator-compatible = “fan53555-reg”;
>> + regulator-name = “vdd_cpu_b”;
>> + regulator-min-microvolt = ;
>> + regulator-max-microvolt = ;
>> + regulator-ramp-delay = ;
>> + vsel-gpios = ;
>> + fcs,suspend-voltage-selector = ;
>> + regulator-always-on;
>> + regulator-boot-on;
>> + regulator-initial-state = ;
>> + regulator-state-mem {
>> + regulator-off-in-suspend;
>> + };
>> + };
>> +
>> + vdd_gpu: syr828@41 {
Ditto.
>> + compatible = “silergy,syr828”;
>> + reg = ;
>> + vin-supply = ;
>> + regulator-compatible = “fan53555-reg”;
>> + regulator-name = “vdd_gpu”;
>> + regulator-min-microvolt = ;
>> + regulator-max-microvolt = ;
>> + regulator-ramp-delay = ;
>> + fcs,suspend-voltage-selector = ;
>> + regulator-always-on;
>> + regulator-boot-on;
>> + regulator-initial-state = ;
>> + regulator-state-mem {
>> + regulator-off-in-suspend;
>> + };
>> + };
>> +
>> + rk808: pmic@1b {
Sort order: Any reason that 1b is after 40, 41?
>> + compatible = “rockchip,rk808”;
>> + reg = ;
>> + interrupt-parent = ;
>> + interrupts = ;
>> + pinctrl-names = “default”;
>> + pinctrl-0 = ;
>> + rockchip,system-power-controller;
>> + wakeup-source;
>> + #clock-cells = ;
>> + clock-output-names = “xin32k”, “rk808-clkout2”;
>> +
>> + vcc1-supply = ;
>> + vcc2-supply = ;
>> + vcc3-supply = ;
>> + vcc4-supply = ;
>> + vcc6-supply = ;
>> + vcc7-supply = ;
>> + vcc8-supply = ;
>> + vcc9-supply = ;
>> + vcc10-supply = ;
>> + vcc11-supply = ;
>> + vcc12-supply = ;
>> + vddio-supply = ;
>> +
>> + regulators {
>> + vdd_center: DCDC_REG1 {
>> + regulator-always-on;
>> + regulator-boot-on;
>> + regulator-min-microvolt = ;
>> + regulator-max-microvolt = ;
>> + regulator-ramp-delay = ;
>> + regulator-name = “vdd_center”;
>> + regulator-state-mem {
>> + regulator-off-in-suspend;
>> + };
>> + };
>> +
>> + vdd_cpu_l: DCDC_REG2 {
>> + regulator-always-on;
>> + regulator-boot-on;
>> + regulator-min-microvolt = ;
>> + regulator-max-microvolt = ;
>> + regulator-ramp-delay = ;
>> + regulator-name = “vdd_cpu_l”;
>> + regulator-state-mem {
>> + regulator-off-in-suspend;
>> + };
>> + };
>> +
>> + vcc_ddr: DCDC_REG3 {
>> + regulator-always-on;
>> + regulator-boot-on;
>> + regulator-name = “vcc_ddr”;
>> + regulator-state-mem {
>> + regulator-on-in-suspend;
>> + };
>> + };
>> +
>> + vcc_1v8: DCDC_REG4 {
>> + regulator-always-on;
>> + regulator-boot-on;
>> + regulator-min-microvolt = ;
>> + regulator-max-microvolt = ;
>> + regulator-name = “vcc_1v8”;
>> + regulator-state-mem {
>> + regulator-on-in-suspend;
>> + regulator-suspend-microvolt = ;
>> + };
>> + };
>> +
>> + vcc1v8_dvp: LDO_REG1 {
>> + regulator-always-on;
>> + regulator-boot-on;
>> + regulator-min-microvolt = ;
>> + regulator-max-microvolt = ;
>> + regulator-name = “vcc1v8_dvp”;
>> + regulator-state-mem {
>> + regulator-off-in-suspend;
>> + };
>> + };
>> +
>> + vcc3v0_tp: LDO_REG2 {
>> + regulator-always-on;
>> + regulator-boot-on;
>> + regulator-min-microvolt = ;
>> + regulator-max-microvolt = ;
>> + regulator-name = “vcc3v0_tp”;
>> + regulator-state-mem {
>> + regulator-off-in-suspend;
>> + };
>> + };
>> +
>> + vcc1v8_pmu: LDO_REG3 {
>> + regulator-always-on;
>> + regulator-boot-on;
>> + regulator-min-microvolt = ;
>> + regulator-max-microvolt = ;
>> + regulator-name = “vcc1v8_pmu”;
>> + regulator-state-mem {
>> + regulator-on-in-suspend;
>> + regulator-suspend-microvolt = ;
>> + };
>> + };
>> +
>> + vcc_sd: LDO_REG4 {
>> + regulator-always-on;
>> + regulator-boot-on;
>> + regulator-min-microvolt = ;
>> + regulator-max-microvolt = ;
>> + regulator-name = “vcc_sd”;
>> + regulator-state-mem {
>> + regulator-on-in-suspend;
>> + regulator-suspend-microvolt = ;
>> + };
>> + };
>> +
>> + vcca3v0_codec: LDO_REG5 {
>> + regulator-always-on;
>> + regulator-boot-on;
>> + regulator-min-microvolt = ;
>> + regulator-max-microvolt = ;
>> + regulator-name = “vcca3v0_codec”;
>> + regulator-state-mem {
>> + regulator-off-in-suspend;
>> + };
>> + };
>> +
>> + vcc_1v5: LDO_REG6 {
>> + regulator-always-on;
>> + regulator-boot-on;
>> + regulator-min-microvolt = ;
>> + regulator-max-microvolt = ;
>> + regulator-name = “vcc_1v5”;
>> + regulator-state-mem {
>> + regulator-on-in-suspend;
>> + regulator-suspend-microvolt = ;
>> + };
>> + };
>> +
>> + vcca1v8_codec: LDO_REG7 {
>> + regulator-always-on;
>> + regulator-boot-on;
>> + regulator-min-microvolt = ;
>> + regulator-max-microvolt = ;
>> + regulator-name = “vcca1v8_codec”;
>> + regulator-state-mem {
>> + regulator-off-in-suspend;
>> + };
>> + };
>> +
>> + vcc_3v0: LDO_REG8 {
>> + regulator-always-on;
>> + regulator-boot-on;
>> + regulator-min-microvolt = ;
>> + regulator-max-microvolt = ;
>> + regulator-name = “vcc_3v0”;
>> + regulator-state-mem {
>> + regulator-on-in-suspend;
>> + regulator-suspend-microvolt = ;
>> + };
>> + };
>> +
>> + vcc3v3_s3: SWITCH_REG1 {
>> + regulator-always-on;
>> + regulator-boot-on;
>> + regulator-name = “vcc3v3_s3”;
>> + regulator-state-mem {
>> + regulator-off-in-suspend;
>> + };
>> + };
>> +
>> + vcc3v3_s0: SWITCH_REG2 {
>> + regulator-always-on;
>> + regulator-boot-on;
>> + regulator-name = “vcc3v3_s0”;
>> + regulator-state-mem {
>> + regulator-off-in-suspend;
>> + };
>> + };
>> + };
>> + };
>> +};
>> +
>> +&i2c1 {
>> + status = “okay”;
>> + i2c-scl-rising-time-ns = ;
>> + i2c-scl-falling-time-ns = ;
>> +
>> + gsl3673: gsl3673@40 {
Node name?
>> + compatible = “GSL,GSL3673”;
>> + reg = ;
>> + screen_max_x = ;
>> + screen_max_y = ;
>> + irq_gpio_number = ;
>> + rst_gpio_number = ;
>
> Again doesn’t look like a valid binding.
>
>
>> + };
>> +
>> + rt5640: rt5640@1c {
Node name: codec@1c?
>> + #sound-dai-cells = ;
>> + compatible = “realtek,rt5640”;
>> + reg = ;
>> + clocks = ;
>> + clock-names = “mclk”;
>> + realtek,in1-differential;
>> + pinctrl-names = “default”;
>> + pinctrl-0 = ;
>> + hp-con-gpio = ;
>> + //hp-det-gpio = ;
>
> don’t add commented lines please
>
>
>> + io-channels = ;
>> + hp-det-adc-value = ;
>> + };
>> +};
>> +
>> +&i2c3 {
>> + status = “okay”;
>> + i2c-scl-rising-time-ns = ;
>> + i2c-scl-falling-time-ns = ;
>> +};
>> +
>> +&i2c4
>> + status = “okay”;
>> + i2c-scl-rising-time-ns = ;
>> + i2c-scl-falling-time-ns = ;
>> +
>> + fusb0: fusb30x@22 nested] 5+ messages in thread

* Re: [PATCH] arm64: dts: rk3399: add support for firefly-rk3399 board :59 ` Andreas Färber@ : ` Heiko Stuebner : ` Kever Yang
0 siblings, 1 reply; 5+ messages in thread
From: Heiko Stuebner @ :41 UTC (permalink / raw)
To: Andreas Färber
Cc: Kever Yang, linux-rockchip, devicetree, Jianqun Xu, linux-kernel,
Andy Yan, Rob Herring, linux-arm-kernel, Will Deacon,
Mark Rutland, Catalin Marinas, Matthias Brugger
Hi,
Am Freitag, 31. März 2017, 18:59:49 CEST schrieb Andreas Färber:
> Am 31.03.2017 um 14:56 schrieb Heiko Stuebner:
> > Hi Kever,
> >
> > Am Freitag, 31. März 2017, 17:59:07 CEST schrieb Kever Yang:
> >> Firefly-rk3399 is a bord from T-Firefly, you can find detail about
> >> it here:
> >> -firefly.com/en/firenow/Firefly_RK3399/
> >>
> >> This patch add basic node for the board and make it able to bring
> >> up.
> >
> > This more a first glance, I didn’t check every binding, but already found
> > some dubious ones, so in general, please make sure to only include nodes
> > with approved bindings.
> >
> >
> > […]
> >
> >> arch/arm64/boot/dts/rockchip/Makefile