devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v0 0/2] Add support for Firefly ROC-RK3399-PC-PLUS
@ 2021-06-28  3:54 djw
  2021-06-28  3:54 ` [PATCH v0 1/2] dt-bindings: add doc " djw
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: djw @ 2021-06-28  3:54 UTC (permalink / raw)
  To: linux-rockchip
  Cc: Wayne Chou, Kongxin Deng, Levin Du, Heiko Stuebner, Chen-Yu Tsai,
	David Bauer, Jagan Teki, Jensen Huang, Johan Jonker,
	Krzysztof Kozlowski, Liang Chen, Marty Jones, Rob Herring,
	Uwe Kleine-König, devicetree, linux-arm-kernel,
	linux-kernel

From: Levin Du <djw@t-chip.com.cn>


Hi all, this is an attemp to add Firefly ROC-RK3399-PC-PLUS to the mainline
kernel.

ROC-RK3399-PC-PLUS is the board inside the portable Firefly Station P1 Geek
PC. As a redesign after the ROC-RK3399-PC, it uses DC-12V as power input
and spares a USB 3 host port. It is also equipped with a USB WiFi chip and
audio codec without the mezzanine board.

Many thanks to the Linux people!


Levin Du (2):
  dt-bindings: add doc for Firefly ROC-RK3399-PC-PLUS
  arm64: dts: rockchip: add support for Firefly ROC-RK3399-PC-PLUS

 .../devicetree/bindings/arm/rockchip.yaml     |   6 +
 arch/arm64/boot/dts/rockchip/Makefile         |   1 +
 .../boot/dts/rockchip/rk3399-roc-pc-plus.dts  | 223 ++++++++++++++++++
 3 files changed, 230 insertions(+)
 create mode 100644 arch/arm64/boot/dts/rockchip/rk3399-roc-pc-plus.dts

--
2.23.0.37.g745f6812895b




^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH v0 1/2] dt-bindings: add doc for Firefly ROC-RK3399-PC-PLUS
  2021-06-28  3:54 [PATCH v0 0/2] Add support for Firefly ROC-RK3399-PC-PLUS djw
@ 2021-06-28  3:54 ` djw
  2021-07-14 20:52   ` Rob Herring
  2021-06-28  3:54 ` [PATCH v0 2/2] arm64: dts: rockchip: add support " djw
  2021-07-15 22:42 ` [PATCH v0 0/2] Add " Heiko Stuebner
  2 siblings, 1 reply; 9+ messages in thread
From: djw @ 2021-06-28  3:54 UTC (permalink / raw)
  To: linux-rockchip
  Cc: Wayne Chou, Kongxin Deng, Levin Du, Heiko Stuebner, Chen-Yu Tsai,
	David Bauer, Jagan Teki, Johan Jonker, Krzysztof Kozlowski,
	Liang Chen, Rob Herring, Uwe Kleine-König, devicetree,
	linux-arm-kernel, linux-kernel

From: Levin Du <djw@t-chip.com.cn>

Add devicetree binding documentation for the Firefly ROC-RK3399-PC-PLUS.

Signed-off-by: Levin Du <djw@t-chip.com.cn>
---

 Documentation/devicetree/bindings/arm/rockchip.yaml | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/Documentation/devicetree/bindings/arm/rockchip.yaml b/Documentation/devicetree/bindings/arm/rockchip.yaml
index 6546b015fc62..c7b2f5f852d5 100644
--- a/Documentation/devicetree/bindings/arm/rockchip.yaml
+++ b/Documentation/devicetree/bindings/arm/rockchip.yaml
@@ -122,7 +122,12 @@ properties:
               - firefly,roc-rk3399-pc-mezzanine
           - const: rockchip,rk3399
 
+      - description: Firefly ROC-RK3399-PC-PLUS
+        items:
+          - enum:
+              - firefly,roc-rk3399-pc-plus
+          - const: rockchip,rk3399
+
       - description: FriendlyElec NanoPi R2S
         items:
           - const: friendlyarm,nanopi-r2s
--
2.23.0.37.g745f6812895b




^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH v0 2/2] arm64: dts: rockchip: add support for Firefly ROC-RK3399-PC-PLUS
  2021-06-28  3:54 [PATCH v0 0/2] Add support for Firefly ROC-RK3399-PC-PLUS djw
  2021-06-28  3:54 ` [PATCH v0 1/2] dt-bindings: add doc " djw
@ 2021-06-28  3:54 ` djw
  2021-06-29  9:15   ` Levin
  2021-07-15 22:42 ` [PATCH v0 0/2] Add " Heiko Stuebner
  2 siblings, 1 reply; 9+ messages in thread
From: djw @ 2021-06-28  3:54 UTC (permalink / raw)
  To: linux-rockchip
  Cc: Wayne Chou, Kongxin Deng, Levin Du, Heiko Stuebner, Chen-Yu Tsai,
	Jagan Teki, Jensen Huang, Johan Jonker, Liang Chen, Marty Jones,
	Rob Herring, Uwe Kleine-König, devicetree, linux-arm-kernel,
	linux-kernel

From: Levin Du <djw@t-chip.com.cn>

ROC-RK3399-PC-PLUS is the board inside the portable Firefly Station P1 Geek
PC. As a redesign after the ROC-RK3399-PC, it uses DC-12V as power input
and spares a USB 3 host port. It is also equipped with a USB WiFi chip and
audio codec without the mezzanine board.

- Rockchip RK3399 SoC
- 4GB LPDDR4 RAM
- 16MB SPI-Flash
- eMMC slot
- TF card slot
- USB 3.0 Port x 1, USB 2.0 Port x 1, TypeC Port x 1
- HDMI
- Gigabit Ethernet
- WiFi: RTL8723DU
- Audio: ES8388
- Key: Recovery
- LED: WORK, DIY
- IR

Signed-off-by: Kongxin Deng <dkx@t-chip.com.cn>
Signed-off-by: Levin Du <djw@t-chip.com.cn>

---

 arch/arm64/boot/dts/rockchip/Makefile         |   1 +
 .../boot/dts/rockchip/rk3399-roc-pc-plus.dts  | 223 ++++++++++++++++++
 2 files changed, 224 insertions(+)
 create mode 100644 arch/arm64/boot/dts/rockchip/rk3399-roc-pc-plus.dts

diff --git a/arch/arm64/boot/dts/rockchip/Makefile b/arch/arm64/boot/dts/rockchip/Makefile
index 7fdb41de01ec..d6ab171b2522 100644
--- a/arch/arm64/boot/dts/rockchip/Makefile
+++ b/arch/arm64/boot/dts/rockchip/Makefile
@@ -42,6 +42,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-pinebook-pro.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-puma-haikou.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-roc-pc.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-roc-pc-mezzanine.dtb
+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-roc-pc-plus.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-rock-pi-4a.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-rock-pi-4b.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-rock-pi-4c.dtb
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-roc-pc-plus.dts b/arch/arm64/boot/dts/rockchip/rk3399-roc-pc-plus.dts
new file mode 100644
index 000000000000..370e8bf1b40c
--- /dev/null
+++ b/arch/arm64/boot/dts/rockchip/rk3399-roc-pc-plus.dts
@@ -0,1 +1,223 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2017 T-Chip Intelligent Technology Co., Ltd
+ */
+
+/dts-v1/;
+#include "rk3399-roc-pc.dtsi"
+
+/**
+ * Notice:
+ * 1. rk3399-roc-pc-plus is powered by dc_12v directly.
+ * 2. rk3399-roc-pc-plus has only vcc_bus_typec0 in schematic, which is coresponding
+ *    to vcc_vbus_typec1 in rk3399-roc-pc.
+ *    For simplicity, reserve the node name of vcc_vbus_typec1.
+ * 3. vcc5v0_host is actually 2 regulators (host0, 1) controlled by the same gpio.
+ */
+
+/delete-node/ &fusb1;
+/delete-node/ &hub_rst;
+/delete-node/ &mp8859;
+/delete-node/ &vcc_sys_en;
+/delete-node/ &vcc_vbus_typec0;
+/delete-node/ &yellow_led;
+
+/ {
+	model = "Firefly ROC-RK3399-PC-PLUS Board";
+	compatible = "firefly,roc-rk3399-pc-plus", "rockchip,rk3399";
+
+	dc_12v: dc-12v {
+		compatible = "regulator-fixed";
+		regulator-name = "dc_12v";
+		regulator-always-on;
+		regulator-boot-on;
+		regulator-min-microvolt = <12000000>;
+		regulator-max-microvolt = <12000000>;
+	};
+
+	gpio-fan {
+		#cooling-cells = <2>;
+		compatible = "gpio-fan";
+		gpio-fan,speed-map = <0 0 3000 1>;
+		gpios = <&gpio1 RK_PA1 GPIO_ACTIVE_HIGH>;
+		status = "okay";
+	};
+
+	/delete-node/ gpio-keys;
+
+	leds {
+		pinctrl-names = "default";
+		pinctrl-0 = <&work_led_pin>, <&diy_led_pin>;
+	};
+
+	es8388-sound {
+		compatible = "simple-audio-card";
+		pinctrl-names = "default";
+		pinctrl-0 = <&hp_det_pin>;
+		simple-audio-card,name = "rockchip,es8388-codec";
+		simple-audio-card,format = "i2s";
+		simple-audio-card,mclk-fs = <256>;
+
+		simple-audio-card,widgets =
+			"Microphone", "Mic Jack",
+			"Headphone", "Headphones";
+		simple-audio-card,routing =
+			"LINPUT1", "Mic Jack",
+			"Headphone Amp INL", "LOUT2",
+			"Headphone Amp INR", "ROUT2",
+			"Headphones", "Headphone Amp OUTL",
+			"Headphones", "Headphone Amp OUTR";
+
+		simple-audio-card,hp-det-gpio = <&gpio2 RK_PA6 GPIO_ACTIVE_HIGH>;
+		simple-audio-card,aux-devs = <&headphones_amp>;
+		simple-audio-card,pin-switches = "Headphones";
+
+		simple-audio-card,cpu {
+			sound-dai = <&i2s1>;
+		};
+
+		simple-audio-card,codec {
+			sound-dai = <&es8388>;
+		};
+	};
+
+	/* not amplifier, used as switcher only */
+	headphones_amp: headphones-amp {
+		compatible = "simple-audio-amplifier";
+		pinctrl-names = "default";
+		pinctrl-0 = <&ear_ctl_pin>;
+		enable-gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_HIGH>;
+		sound-name-prefix = "Headphone Amp";
+		VCC-supply = <&vcca3v0_codec>;
+	};
+
+	ir-receiver {
+		linux,rc-map-name = "rc-khadas";
+	};
+
+};
+
+&fusb0 {
+	vbus-supply = <&vcc_vbus_typec1>;
+};
+
+&i2c0 {
+	hym8563: hym8563@51 {
+		compatible = "haoyu,hym8563";
+		reg = <0x51>;
+		#clock-cells = <0>;
+		clock-frequency = <32768>;
+		clock-output-names = "xin32k";
+		pinctrl-names = "default";
+		pinctrl-0 = <&hym8563_int>;
+		interrupt-parent = <&gpio0>;
+		interrupts = <RK_PA5 IRQ_TYPE_EDGE_FALLING>;
+	};
+};
+
+&i2c1 {
+	es8388: es8388@11 {
+		compatible = "everest,es8388";
+		reg = <0x11>;
+		clock-names = "mclk";
+		clocks = <&cru SCLK_I2S_8CH_OUT>;
+		#sound-dai-cells = <0>;
+		status = "okay";
+	};
+};
+
+// <4 RK_PA0 1 &pcfg_pull_none> is used as i2s_8ch_mclk_pin
+&i2s0_8ch_bus {
+	rockchip,pins =
+		<3 RK_PD0 1 &pcfg_pull_none>,
+		<3 RK_PD1 1 &pcfg_pull_none>,
+		<3 RK_PD2 1 &pcfg_pull_none>,
+		<3 RK_PD3 1 &pcfg_pull_none>,
+		<3 RK_PD4 1 &pcfg_pull_none>,
+		<3 RK_PD5 1 &pcfg_pull_none>,
+		<3 RK_PD6 1 &pcfg_pull_none>,
+		<3 RK_PD7 1 &pcfg_pull_none>;
+};
+
+&i2s1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2s_8ch_mclk_pin>, <&i2s1_2ch_bus>;
+	rockchip,playback-channels = <2>;
+	rockchip,capture-channels = <2>;
+	status = "okay";
+};
+
+&pinctrl {
+	es8388 {
+		ear_ctl_pin: ear-ctl-pin {
+			rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_output_high>;
+		};
+
+		hp_det_pin: hp-det-pin {
+			rockchip,pins = <2 RK_PA6 RK_FUNC_GPIO &pcfg_pull_down>;
+		};
+	};
+
+	hym8563 {
+		hym8563_int: hym8563-int {
+			rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>;
+		};
+	};
+
+	i2s1 {
+		i2s_8ch_mclk_pin: i2s-8ch-mclk-pin {
+			rockchip,pins = <4 RK_PA0 1 &pcfg_pull_none>;
+		};
+	};
+};
+
+&u2phy0 {
+	status = "okay";
+
+	u2phy0_otg: otg-port {
+		phy-supply = <&vcc_vbus_typec1>;
+		status = "okay";
+	};
+
+	u2phy0_host: host-port {
+		phy-supply = <&vcc5v0_host>;
+		status = "okay";
+	};
+};
+
+&u2phy1 {
+	status = "okay";
+
+	u2phy1_otg: otg-port {
+		phy-supply = <&vcc5v0_host>;
+		status = "okay";
+	};
+
+	u2phy1_host: host-port {
+		phy-supply = <&vcc5v0_host>;
+		status = "okay";
+	};
+};
+
+&uart0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&uart0_xfer &uart0_cts &uart0_rts>;
+	status = "okay";
+};
+
+&usbdrd_dwc3_0 {
+	dr_mode = "host";
+	status = "okay";
+};
+
+&vcc_sys {
+	// vcc_sys is fixed, not controlled by any gpio
+	/delete-property/ gpio;
+	/delete-property/ pinctrl-names;
+	/delete-property/ pinctrl-0;
+};
+
+&vcc5v0_host {
+	pinctrl-names = "default";
+	pinctrl-0 = <&vcc5v0_host_en>;
+};
--
2.23.0.37.g745f6812895b




^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH v0 2/2] arm64: dts: rockchip: add support for Firefly ROC-RK3399-PC-PLUS
  2021-06-28  3:54 ` [PATCH v0 2/2] arm64: dts: rockchip: add support " djw
@ 2021-06-29  9:15   ` Levin
  2021-06-29  9:30     ` Heiko Stübner
  0 siblings, 1 reply; 9+ messages in thread
From: Levin @ 2021-06-29  9:15 UTC (permalink / raw)
  To: linux-rockchip
  Cc: Wayne Chou, Kongxin Deng, Heiko Stuebner, Chen-Yu Tsai,
	Jagan Teki, Jensen Huang, Johan Jonker, Liang Chen, Marty Jones,
	Rob Herring, Uwe Kleine-König, devicetree, linux-arm-kernel,
	linux-kernel

Hi all, is it possible to turn on some codec mixer switch in the device 
tree?


Currently, to hear to sound, we need to run the following commands from 
the user space:

   # turn on mixer switch

   amixer -c 1 sset 'Left Mixer' on
   amixer -c 1 sset 'Right Mixer' on

   # raise volume

   amixer -c 1 sset 'Output 2' 36


If these settings can be embedded into device tree, and set by kernel as 
initial ALSA path settings,

user can hear the sound with zero ALSA config. That'll be great.


On 2021-06-28 11:54 AM, djw@t-chip.com.cn wrote:
> +
> +	es8388-sound {
> +		compatible = "simple-audio-card";
> +		pinctrl-names = "default";
> +		pinctrl-0 = <&hp_det_pin>;
> +		simple-audio-card,name = "rockchip,es8388-codec";
> +		simple-audio-card,format = "i2s";
> +		simple-audio-card,mclk-fs = <256>;
> +
> +		simple-audio-card,widgets =
> +			"Microphone", "Mic Jack",
> +			"Headphone", "Headphones";
> +		simple-audio-card,routing =
> +			"LINPUT1", "Mic Jack",
> +			"Headphone Amp INL", "LOUT2",
> +			"Headphone Amp INR", "ROUT2",
> +			"Headphones", "Headphone Amp OUTL",
> +			"Headphones", "Headphone Amp OUTR";
> +
> +		simple-audio-card,hp-det-gpio = <&gpio2 RK_PA6 GPIO_ACTIVE_HIGH>;
> +		simple-audio-card,aux-devs = <&headphones_amp>;
> +		simple-audio-card,pin-switches = "Headphones";
> +
> +		simple-audio-card,cpu {
> +			sound-dai = <&i2s1>;
> +		};
> +
> +		simple-audio-card,codec {
> +			sound-dai = <&es8388>;
> +		};
> +	};
> +
>
-- 
Best Regards!

Levin Du




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v0 2/2] arm64: dts: rockchip: add support for Firefly ROC-RK3399-PC-PLUS
  2021-06-29  9:15   ` Levin
@ 2021-06-29  9:30     ` Heiko Stübner
  2021-06-29  9:32       ` Heiko Stübner
  0 siblings, 1 reply; 9+ messages in thread
From: Heiko Stübner @ 2021-06-29  9:30 UTC (permalink / raw)
  To: linux-rockchip, Levin
  Cc: Wayne Chou, Kongxin Deng, Chen-Yu Tsai, Jagan Teki, Jensen Huang,
	Johan Jonker, Liang Chen, Marty Jones, Rob Herring,
	Uwe Kleine-König, devicetree, linux-arm-kernel,
	linux-kernel

Hi Levin,

Am Dienstag, 29. Juni 2021, 11:15:59 CEST schrieb Levin:
> Hi all, is it possible to turn on some codec mixer switch in the device 
> tree?

I don't think that is appropriate and/or/ possible in the devicetree.

Instead I think you want an Alsa UCM profile for it, see:
https://github.com/alsa-project/alsa-ucm-conf/tree/master/ucm2/Rockchip


Heiko

> 
> 
> Currently, to hear to sound, we need to run the following commands from 
> the user space:
> 
>    # turn on mixer switch
> 
>    amixer -c 1 sset 'Left Mixer' on
>    amixer -c 1 sset 'Right Mixer' on
> 
>    # raise volume
> 
>    amixer -c 1 sset 'Output 2' 36
> 
> 
> If these settings can be embedded into device tree, and set by kernel as 
> initial ALSA path settings,
> 
> user can hear the sound with zero ALSA config. That'll be great.
> 
> 
> On 2021-06-28 11:54 AM, djw@t-chip.com.cn wrote:
> > +
> > +	es8388-sound {
> > +		compatible = "simple-audio-card";
> > +		pinctrl-names = "default";
> > +		pinctrl-0 = <&hp_det_pin>;
> > +		simple-audio-card,name = "rockchip,es8388-codec";
> > +		simple-audio-card,format = "i2s";
> > +		simple-audio-card,mclk-fs = <256>;
> > +
> > +		simple-audio-card,widgets =
> > +			"Microphone", "Mic Jack",
> > +			"Headphone", "Headphones";
> > +		simple-audio-card,routing =
> > +			"LINPUT1", "Mic Jack",
> > +			"Headphone Amp INL", "LOUT2",
> > +			"Headphone Amp INR", "ROUT2",
> > +			"Headphones", "Headphone Amp OUTL",
> > +			"Headphones", "Headphone Amp OUTR";
> > +
> > +		simple-audio-card,hp-det-gpio = <&gpio2 RK_PA6 GPIO_ACTIVE_HIGH>;
> > +		simple-audio-card,aux-devs = <&headphones_amp>;
> > +		simple-audio-card,pin-switches = "Headphones";
> > +
> > +		simple-audio-card,cpu {
> > +			sound-dai = <&i2s1>;
> > +		};
> > +
> > +		simple-audio-card,codec {
> > +			sound-dai = <&es8388>;
> > +		};
> > +	};
> > +
> >
> 





^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v0 2/2] arm64: dts: rockchip: add support for Firefly ROC-RK3399-PC-PLUS
  2021-06-29  9:30     ` Heiko Stübner
@ 2021-06-29  9:32       ` Heiko Stübner
  2021-06-30  6:49         ` Levin
  0 siblings, 1 reply; 9+ messages in thread
From: Heiko Stübner @ 2021-06-29  9:32 UTC (permalink / raw)
  To: linux-rockchip, Levin
  Cc: Wayne Chou, Kongxin Deng, Chen-Yu Tsai, Jagan Teki, Jensen Huang,
	Johan Jonker, Liang Chen, Marty Jones, Rob Herring,
	Uwe Kleine-König, devicetree, linux-arm-kernel,
	linux-kernel

Am Dienstag, 29. Juni 2021, 11:30:10 CEST schrieb Heiko Stübner:
> Hi Levin,
> 
> Am Dienstag, 29. Juni 2021, 11:15:59 CEST schrieb Levin:
> > Hi all, is it possible to turn on some codec mixer switch in the device 
> > tree?
> 
> I don't think that is appropriate and/or/ possible in the devicetree.
> 
> Instead I think you want an Alsa UCM profile for it, see:
> https://github.com/alsa-project/alsa-ucm-conf/tree/master/ucm2/Rockchip
> 
> 
> Heiko
> 
> > 
> > 
> > Currently, to hear to sound, we need to run the following commands from 
> > the user space:
> > 
> >    # turn on mixer switch
> > 
> >    amixer -c 1 sset 'Left Mixer' on
> >    amixer -c 1 sset 'Right Mixer' on
> > 
> >    # raise volume
> > 
> >    amixer -c 1 sset 'Output 2' 36
> > 
> > 
> > If these settings can be embedded into device tree, and set by kernel as 
> > initial ALSA path settings,
> > 
> > user can hear the sound with zero ALSA config. That'll be great.
> > 
> > 
> > On 2021-06-28 11:54 AM, djw@t-chip.com.cn wrote:
> > > +
> > > +	es8388-sound {
> > > +		compatible = "simple-audio-card";
> > > +		pinctrl-names = "default";
> > > +		pinctrl-0 = <&hp_det_pin>;
> > > +		simple-audio-card,name = "rockchip,es8388-codec";

and I guess you'd want a more specific name as that config likely is board-specific
not for all boards using the es8388-codec?


Heiko


> > > +		simple-audio-card,format = "i2s";
> > > +		simple-audio-card,mclk-fs = <256>;
> > > +
> > > +		simple-audio-card,widgets =
> > > +			"Microphone", "Mic Jack",
> > > +			"Headphone", "Headphones";
> > > +		simple-audio-card,routing =
> > > +			"LINPUT1", "Mic Jack",
> > > +			"Headphone Amp INL", "LOUT2",
> > > +			"Headphone Amp INR", "ROUT2",
> > > +			"Headphones", "Headphone Amp OUTL",
> > > +			"Headphones", "Headphone Amp OUTR";
> > > +
> > > +		simple-audio-card,hp-det-gpio = <&gpio2 RK_PA6 GPIO_ACTIVE_HIGH>;
> > > +		simple-audio-card,aux-devs = <&headphones_amp>;
> > > +		simple-audio-card,pin-switches = "Headphones";
> > > +
> > > +		simple-audio-card,cpu {
> > > +			sound-dai = <&i2s1>;
> > > +		};
> > > +
> > > +		simple-audio-card,codec {
> > > +			sound-dai = <&es8388>;
> > > +		};
> > > +	};
> > > +
> > >
> > 
> 
> 





^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v0 2/2] arm64: dts: rockchip: add support for Firefly ROC-RK3399-PC-PLUS
  2021-06-29  9:32       ` Heiko Stübner
@ 2021-06-30  6:49         ` Levin
  0 siblings, 0 replies; 9+ messages in thread
From: Levin @ 2021-06-30  6:49 UTC (permalink / raw)
  To: Heiko Stübner, linux-rockchip
  Cc: Wayne Chou, Kongxin Deng, Chen-Yu Tsai, Jagan Teki, Jensen Huang,
	Johan Jonker, Liang Chen, Marty Jones, Rob Herring,
	Uwe Kleine-König, devicetree, linux-arm-kernel,
	linux-kernel

Hi Heiko,


Thanks for your reply.


On 2021-06-29 5:32 PM, Heiko Stübner wrote:
> Am Dienstag, 29. Juni 2021, 11:30:10 CEST schrieb Heiko Stübner:
>> Hi Levin,
>>
>> Am Dienstag, 29. Juni 2021, 11:15:59 CEST schrieb Levin:
>>> Hi all, is it possible to turn on some codec mixer switch in the device
>>> tree?
>> I don't think that is appropriate and/or/ possible in the devicetree.
>>
>> Instead I think you want an Alsa UCM profile for it, see:
>> https://github.com/alsa-project/alsa-ucm-conf/tree/master/ucm2/Rockchip
>>

Alsa UCM profile is a complete solution, yet it requires more labor work 
of adding a complex profile with all the controls.


The problem is, music/video player knows nothing of the mixers. And with 
currently codec driver setting, user cannot

hear any sound until he turns on two mixer switch.


I hope to have a "simple-audio-card,switch" property here.


>>>
>>> Currently, to hear to sound, we need to run the following commands from
>>> the user space:
>>>
>>>     # turn on mixer switch
>>>
>>>     amixer -c 1 sset 'Left Mixer' on
>>>     amixer -c 1 sset 'Right Mixer' on
>>>
>>>     # raise volume
>>>
>>>     amixer -c 1 sset 'Output 2' 36
>>>
>>>
>>> If these settings can be embedded into device tree, and set by kernel as
>>> initial ALSA path settings,
>>>
>>> user can hear the sound with zero ALSA config. That'll be great.
>>>
>>>
>>> On 2021-06-28 11:54 AM, djw@t-chip.com.cn wrote:
>>>> +
>>>> +	es8388-sound {
>>>> +		compatible = "simple-audio-card";
>>>> +		pinctrl-names = "default";
>>>> +		pinctrl-0 = <&hp_det_pin>;
>>>> +		simple-audio-card,name = "rockchip,es8388-codec";
> and I guess you'd want a more specific name as that config likely is board-specific
> not for all boards using the es8388-codec?
>
>
> Heiko
>

I got what you mean now. It should be renamed to a board-specific card 
name if using Alsa UCM profile, right ?

-- 

Best Regards!

Levin Du




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v0 1/2] dt-bindings: add doc for Firefly ROC-RK3399-PC-PLUS
  2021-06-28  3:54 ` [PATCH v0 1/2] dt-bindings: add doc " djw
@ 2021-07-14 20:52   ` Rob Herring
  0 siblings, 0 replies; 9+ messages in thread
From: Rob Herring @ 2021-07-14 20:52 UTC (permalink / raw)
  To: djw
  Cc: Jagan Teki, Uwe Kleine-König, Liang Chen, Rob Herring,
	linux-arm-kernel, Wayne Chou, linux-kernel, Heiko Stuebner,
	Johan Jonker, linux-rockchip, Kongxin Deng, devicetree,
	Chen-Yu Tsai, David Bauer, Krzysztof Kozlowski

On Mon, 28 Jun 2021 11:54:01 +0800, djw@t-chip.com.cn wrote:
> From: Levin Du <djw@t-chip.com.cn>
> 
> Add devicetree binding documentation for the Firefly ROC-RK3399-PC-PLUS.
> 
> Signed-off-by: Levin Du <djw@t-chip.com.cn>
> ---
> 
>  Documentation/devicetree/bindings/arm/rockchip.yaml | 6 ++++++
>  1 file changed, 6 insertions(+)
> 

Acked-by: Rob Herring <robh@kernel.org>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v0 0/2] Add support for Firefly ROC-RK3399-PC-PLUS
  2021-06-28  3:54 [PATCH v0 0/2] Add support for Firefly ROC-RK3399-PC-PLUS djw
  2021-06-28  3:54 ` [PATCH v0 1/2] dt-bindings: add doc " djw
  2021-06-28  3:54 ` [PATCH v0 2/2] arm64: dts: rockchip: add support " djw
@ 2021-07-15 22:42 ` Heiko Stuebner
  2 siblings, 0 replies; 9+ messages in thread
From: Heiko Stuebner @ 2021-07-15 22:42 UTC (permalink / raw)
  To: linux-rockchip, djw
  Cc: Heiko Stuebner, Rob Herring, linux-arm-kernel, Liang Chen,
	Jagan Teki, devicetree, Wayne Chou, Marty Jones, Chen-Yu Tsai,
	linux-kernel, David Bauer, Johan Jonker, Krzysztof Kozlowski,
	Jensen Huang, Uwe Kleine-König, Kongxin Deng

On Mon, 28 Jun 2021 11:54:00 +0800, djw@t-chip.com.cn wrote:
> 
> Hi all, this is an attemp to add Firefly ROC-RK3399-PC-PLUS to the mainline
> kernel.
> 
> ROC-RK3399-PC-PLUS is the board inside the portable Firefly Station P1 Geek
> PC. As a redesign after the ROC-RK3399-PC, it uses DC-12V as power input
> and spares a USB 3 host port. It is also equipped with a USB WiFi chip and
> audio codec without the mezzanine board.
> 
> [...]

Applied, thanks!

[1/2] dt-bindings: add doc for Firefly ROC-RK3399-PC-PLUS
      commit: 4011a797dac7703ecda083b3be25d891f34e9040
[2/2] arm64: dts: rockchip: add support for Firefly ROC-RK3399-PC-PLUS
      commit: 95e18f24ab427401b7286d6d24b5a8b0621fab2e

Best regards,
-- 
Heiko Stuebner <heiko@sntech.de>

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2021-07-15 22:43 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-28  3:54 [PATCH v0 0/2] Add support for Firefly ROC-RK3399-PC-PLUS djw
2021-06-28  3:54 ` [PATCH v0 1/2] dt-bindings: add doc " djw
2021-07-14 20:52   ` Rob Herring
2021-06-28  3:54 ` [PATCH v0 2/2] arm64: dts: rockchip: add support " djw
2021-06-29  9:15   ` Levin
2021-06-29  9:30     ` Heiko Stübner
2021-06-29  9:32       ` Heiko Stübner
2021-06-30  6:49         ` Levin
2021-07-15 22:42 ` [PATCH v0 0/2] Add " Heiko Stuebner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).