All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/3] Add support for es8323 and hdmi audio to the firefly-rk3288
@ 2017-05-12 13:22 ` Romain Perier
  0 siblings, 0 replies; 42+ messages in thread
From: Romain Perier @ 2017-05-12 13:22 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
	alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw, Heiko Stuebner
  Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Rob Herring, Ian Campbell,
	Pawel Moll, Mark Rutland, Kumar Gala,
	linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Romain Perier

This set of patches enables support for the es8323 codecs on the
firefly-rk3288. It adds the required DT definitions to link rockchip-i2s
to the es8388 analog output. As the support for HDMI audio is also
built-in in the corresponding ASoC machine driver, HDMI audio output is
also enabled.

Changes in v3:
 - Synced DT with the one of the Rock2, the properties have been
   lexically re-ordered in the right order, I have splitted the
   headphone pinctrl in two: phone_ctl and hp_det
Changes in v2:
 - Adapted DT for the firefly-rk3288 to the ASoC machine driver
   rk3288-hdmi-analog
 - Added patch 02/03 to this series
 - Re-wrote this cover letter

Romain Perier (3):
  SoC: es8328-i2c: Add compatible for ES8323
  arm: dts: rockchip: Don't set otp-gpio pinctrl by default in
    rk3288.dtsi
  arm: dts: Add support for ES8323 to the Firefly-RK3288

 Documentation/devicetree/bindings/sound/es8328.txt |  5 ++-
 arch/arm/boot/dts/rk3288-evb.dtsi                  |  4 +++
 arch/arm/boot/dts/rk3288-firefly.dtsi              | 38 ++++++++++++++++++++++
 arch/arm/boot/dts/rk3288-veyron.dtsi               |  4 +++
 arch/arm/boot/dts/rk3288.dtsi                      |  4 ---
 sound/soc/codecs/es8328-i2c.c                      |  2 ++
 6 files changed, 52 insertions(+), 5 deletions(-)

-- 
2.11.0

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH v3 0/3] Add support for es8323 and hdmi audio to the firefly-rk3288
@ 2017-05-12 13:22 ` Romain Perier
  0 siblings, 0 replies; 42+ messages in thread
From: Romain Perier @ 2017-05-12 13:22 UTC (permalink / raw)
  To: linux-arm-kernel

This set of patches enables support for the es8323 codecs on the
firefly-rk3288. It adds the required DT definitions to link rockchip-i2s
to the es8388 analog output. As the support for HDMI audio is also
built-in in the corresponding ASoC machine driver, HDMI audio output is
also enabled.

Changes in v3:
 - Synced DT with the one of the Rock2, the properties have been
   lexically re-ordered in the right order, I have splitted the
   headphone pinctrl in two: phone_ctl and hp_det
Changes in v2:
 - Adapted DT for the firefly-rk3288 to the ASoC machine driver
   rk3288-hdmi-analog
 - Added patch 02/03 to this series
 - Re-wrote this cover letter

Romain Perier (3):
  SoC: es8328-i2c: Add compatible for ES8323
  arm: dts: rockchip: Don't set otp-gpio pinctrl by default in
    rk3288.dtsi
  arm: dts: Add support for ES8323 to the Firefly-RK3288

 Documentation/devicetree/bindings/sound/es8328.txt |  5 ++-
 arch/arm/boot/dts/rk3288-evb.dtsi                  |  4 +++
 arch/arm/boot/dts/rk3288-firefly.dtsi              | 38 ++++++++++++++++++++++
 arch/arm/boot/dts/rk3288-veyron.dtsi               |  4 +++
 arch/arm/boot/dts/rk3288.dtsi                      |  4 ---
 sound/soc/codecs/es8328-i2c.c                      |  2 ++
 6 files changed, 52 insertions(+), 5 deletions(-)

-- 
2.11.0

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

* [PATCH v3 1/3] SoC: es8328-i2c: Add compatible for ES8323
  2017-05-12 13:22 ` Romain Perier
@ 2017-05-12 13:22     ` Romain Perier
  -1 siblings, 0 replies; 42+ messages in thread
From: Romain Perier @ 2017-05-12 13:22 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
	alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw, Heiko Stuebner
  Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Rob Herring, Ian Campbell,
	Pawel Moll, Mark Rutland, Kumar Gala,
	linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Romain Perier

This commit adds a compatible string for everest,es8323. This is an
audio codec that is compatible with es8328 and can be found for example
on the Firefly-RK3288 board.

Signed-off-by: Romain Perier <romain.perier-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>
---

Changes in v3: None
Changes in v2: None

 Documentation/devicetree/bindings/sound/es8328.txt | 5 ++++-
 sound/soc/codecs/es8328-i2c.c                      | 2 ++
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/sound/es8328.txt b/Documentation/devicetree/bindings/sound/es8328.txt
index 33fbf058c997..86b6d6e99732 100644
--- a/Documentation/devicetree/bindings/sound/es8328.txt
+++ b/Documentation/devicetree/bindings/sound/es8328.txt
@@ -4,7 +4,10 @@ This device supports both I2C and SPI.
 
 Required properties:
 
-  - compatible  : Should be "everest,es8328" or "everest,es8388"
+  - compatible  : Should be one of the following:
+	- "everest,es8323"
+	- "everest,es8328"
+	- "everest,es8388"
   - DVDD-supply : Regulator providing digital core supply voltage 1.8 - 3.6V
   - AVDD-supply : Regulator providing analog supply voltage 3.3V
   - PVDD-supply : Regulator providing digital IO supply voltage 1.8 - 3.6V
diff --git a/sound/soc/codecs/es8328-i2c.c b/sound/soc/codecs/es8328-i2c.c
index 318ab28c5351..be3f03c35137 100644
--- a/sound/soc/codecs/es8328-i2c.c
+++ b/sound/soc/codecs/es8328-i2c.c
@@ -19,6 +19,7 @@
 #include "es8328.h"
 
 static const struct i2c_device_id es8328_id[] = {
+	{ "es8323", 0 },
 	{ "es8328", 0 },
 	{ "es8388", 0 },
 	{ }
@@ -26,6 +27,7 @@ static const struct i2c_device_id es8328_id[] = {
 MODULE_DEVICE_TABLE(i2c, es8328_id);
 
 static const struct of_device_id es8328_of_match[] = {
+	{ .compatible = "everest,es8323", },
 	{ .compatible = "everest,es8328", },
 	{ .compatible = "everest,es8388", },
 	{ }
-- 
2.11.0

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH v3 1/3] SoC: es8328-i2c: Add compatible for ES8323
@ 2017-05-12 13:22     ` Romain Perier
  0 siblings, 0 replies; 42+ messages in thread
From: Romain Perier @ 2017-05-12 13:22 UTC (permalink / raw)
  To: linux-arm-kernel

This commit adds a compatible string for everest,es8323. This is an
audio codec that is compatible with es8328 and can be found for example
on the Firefly-RK3288 board.

Signed-off-by: Romain Perier <romain.perier@collabora.com>
---

Changes in v3: None
Changes in v2: None

 Documentation/devicetree/bindings/sound/es8328.txt | 5 ++++-
 sound/soc/codecs/es8328-i2c.c                      | 2 ++
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/sound/es8328.txt b/Documentation/devicetree/bindings/sound/es8328.txt
index 33fbf058c997..86b6d6e99732 100644
--- a/Documentation/devicetree/bindings/sound/es8328.txt
+++ b/Documentation/devicetree/bindings/sound/es8328.txt
@@ -4,7 +4,10 @@ This device supports both I2C and SPI.
 
 Required properties:
 
-  - compatible  : Should be "everest,es8328" or "everest,es8388"
+  - compatible  : Should be one of the following:
+	- "everest,es8323"
+	- "everest,es8328"
+	- "everest,es8388"
   - DVDD-supply : Regulator providing digital core supply voltage 1.8 - 3.6V
   - AVDD-supply : Regulator providing analog supply voltage 3.3V
   - PVDD-supply : Regulator providing digital IO supply voltage 1.8 - 3.6V
diff --git a/sound/soc/codecs/es8328-i2c.c b/sound/soc/codecs/es8328-i2c.c
index 318ab28c5351..be3f03c35137 100644
--- a/sound/soc/codecs/es8328-i2c.c
+++ b/sound/soc/codecs/es8328-i2c.c
@@ -19,6 +19,7 @@
 #include "es8328.h"
 
 static const struct i2c_device_id es8328_id[] = {
+	{ "es8323", 0 },
 	{ "es8328", 0 },
 	{ "es8388", 0 },
 	{ }
@@ -26,6 +27,7 @@ static const struct i2c_device_id es8328_id[] = {
 MODULE_DEVICE_TABLE(i2c, es8328_id);
 
 static const struct of_device_id es8328_of_match[] = {
+	{ .compatible = "everest,es8323", },
 	{ .compatible = "everest,es8328", },
 	{ .compatible = "everest,es8388", },
 	{ }
-- 
2.11.0

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

* [PATCH v3 2/3] arm: dts: rockchip: Don't set otp-gpio pinctrl by default in rk3288.dtsi
  2017-05-12 13:22 ` Romain Perier
@ 2017-05-12 13:22     ` Romain Perier
  -1 siblings, 0 replies; 42+ messages in thread
From: Romain Perier @ 2017-05-12 13:22 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
	alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw, Heiko Stuebner
  Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Rob Herring, Ian Campbell,
	Pawel Moll, Mark Rutland, Kumar Gala,
	linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Romain Perier

The tsadc supports two reset methods: the cru and the otp_gpio. All
boards except veyron and the evb simply use the cru-method and reuse the
pin for something else. On the Firefly-RK3288 this is for example the
case with the headphone. To prevent pinctrl-conflicts with these don't
set the otp-gpio pinctrl by default but only in the boards using it.

Signed-off-by: Romain Perier <romain.perier-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>
---

Changes in v3: None
Changes in v2:
- Added this patch

 arch/arm/boot/dts/rk3288-evb.dtsi    | 4 ++++
 arch/arm/boot/dts/rk3288-veyron.dtsi | 4 ++++
 arch/arm/boot/dts/rk3288.dtsi        | 4 ----
 3 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/arch/arm/boot/dts/rk3288-evb.dtsi b/arch/arm/boot/dts/rk3288-evb.dtsi
index 0dec94c3583b..28a69334b2d1 100644
--- a/arch/arm/boot/dts/rk3288-evb.dtsi
+++ b/arch/arm/boot/dts/rk3288-evb.dtsi
@@ -290,6 +290,10 @@
 };
 
 &tsadc {
+	pinctrl-names = "init", "default", "sleep";
+	pinctrl-0 = <&otp_gpio>;
+	pinctrl-1 = <&otp_out>;
+	pinctrl-2 = <&otp_gpio>;
 	rockchip,hw-tshut-mode = <0>; /* tshut mode 0:CRU 1:GPIO */
 	rockchip,hw-tshut-polarity = <0>; /* tshut polarity 0:LOW 1:HIGH */
 	status = "okay";
diff --git a/arch/arm/boot/dts/rk3288-veyron.dtsi b/arch/arm/boot/dts/rk3288-veyron.dtsi
index 5d1eb0a25827..5603812494dd 100644
--- a/arch/arm/boot/dts/rk3288-veyron.dtsi
+++ b/arch/arm/boot/dts/rk3288-veyron.dtsi
@@ -393,6 +393,10 @@
 &tsadc {
 	status = "okay";
 
+	pinctrl-names = "init", "default", "sleep";
+	pinctrl-0 = <&otp_gpio>;
+	pinctrl-1 = <&otp_out>;
+	pinctrl-2 = <&otp_gpio>;
 	rockchip,hw-tshut-mode = <1>; /* tshut mode 0:CRU 1:GPIO */
 	rockchip,hw-tshut-polarity = <1>; /* tshut polarity 0:LOW 1:HIGH */
 };
diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi
index df8a0dbe9d91..c41aa4f9d9c4 100644
--- a/arch/arm/boot/dts/rk3288.dtsi
+++ b/arch/arm/boot/dts/rk3288.dtsi
@@ -532,10 +532,6 @@
 		clock-names = "tsadc", "apb_pclk";
 		resets = <&cru SRST_TSADC>;
 		reset-names = "tsadc-apb";
-		pinctrl-names = "init", "default", "sleep";
-		pinctrl-0 = <&otp_gpio>;
-		pinctrl-1 = <&otp_out>;
-		pinctrl-2 = <&otp_gpio>;
 		#thermal-sensor-cells = <1>;
 		rockchip,hw-tshut-temp = <95000>;
 		status = "disabled";
-- 
2.11.0

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH v3 2/3] arm: dts: rockchip: Don't set otp-gpio pinctrl by default in rk3288.dtsi
@ 2017-05-12 13:22     ` Romain Perier
  0 siblings, 0 replies; 42+ messages in thread
From: Romain Perier @ 2017-05-12 13:22 UTC (permalink / raw)
  To: linux-arm-kernel

The tsadc supports two reset methods: the cru and the otp_gpio. All
boards except veyron and the evb simply use the cru-method and reuse the
pin for something else. On the Firefly-RK3288 this is for example the
case with the headphone. To prevent pinctrl-conflicts with these don't
set the otp-gpio pinctrl by default but only in the boards using it.

Signed-off-by: Romain Perier <romain.perier@collabora.com>
---

Changes in v3: None
Changes in v2:
- Added this patch

 arch/arm/boot/dts/rk3288-evb.dtsi    | 4 ++++
 arch/arm/boot/dts/rk3288-veyron.dtsi | 4 ++++
 arch/arm/boot/dts/rk3288.dtsi        | 4 ----
 3 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/arch/arm/boot/dts/rk3288-evb.dtsi b/arch/arm/boot/dts/rk3288-evb.dtsi
index 0dec94c3583b..28a69334b2d1 100644
--- a/arch/arm/boot/dts/rk3288-evb.dtsi
+++ b/arch/arm/boot/dts/rk3288-evb.dtsi
@@ -290,6 +290,10 @@
 };
 
 &tsadc {
+	pinctrl-names = "init", "default", "sleep";
+	pinctrl-0 = <&otp_gpio>;
+	pinctrl-1 = <&otp_out>;
+	pinctrl-2 = <&otp_gpio>;
 	rockchip,hw-tshut-mode = <0>; /* tshut mode 0:CRU 1:GPIO */
 	rockchip,hw-tshut-polarity = <0>; /* tshut polarity 0:LOW 1:HIGH */
 	status = "okay";
diff --git a/arch/arm/boot/dts/rk3288-veyron.dtsi b/arch/arm/boot/dts/rk3288-veyron.dtsi
index 5d1eb0a25827..5603812494dd 100644
--- a/arch/arm/boot/dts/rk3288-veyron.dtsi
+++ b/arch/arm/boot/dts/rk3288-veyron.dtsi
@@ -393,6 +393,10 @@
 &tsadc {
 	status = "okay";
 
+	pinctrl-names = "init", "default", "sleep";
+	pinctrl-0 = <&otp_gpio>;
+	pinctrl-1 = <&otp_out>;
+	pinctrl-2 = <&otp_gpio>;
 	rockchip,hw-tshut-mode = <1>; /* tshut mode 0:CRU 1:GPIO */
 	rockchip,hw-tshut-polarity = <1>; /* tshut polarity 0:LOW 1:HIGH */
 };
diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi
index df8a0dbe9d91..c41aa4f9d9c4 100644
--- a/arch/arm/boot/dts/rk3288.dtsi
+++ b/arch/arm/boot/dts/rk3288.dtsi
@@ -532,10 +532,6 @@
 		clock-names = "tsadc", "apb_pclk";
 		resets = <&cru SRST_TSADC>;
 		reset-names = "tsadc-apb";
-		pinctrl-names = "init", "default", "sleep";
-		pinctrl-0 = <&otp_gpio>;
-		pinctrl-1 = <&otp_out>;
-		pinctrl-2 = <&otp_gpio>;
 		#thermal-sensor-cells = <1>;
 		rockchip,hw-tshut-temp = <95000>;
 		status = "disabled";
-- 
2.11.0

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

* [PATCH v3 3/3] arm: dts: Add support for ES8323 to the Firefly-RK3288
  2017-05-12 13:22 ` Romain Perier
@ 2017-05-12 13:22     ` Romain Perier
  -1 siblings, 0 replies; 42+ messages in thread
From: Romain Perier @ 2017-05-12 13:22 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
	alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw, Heiko Stuebner
  Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Rob Herring, Ian Campbell,
	Pawel Moll, Mark Rutland, Kumar Gala,
	linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Romain Perier

This commit adds the DT definition of the es8388 i2c device found at
address 0x10. It also adds the definition for connecting the Rockchip
I2S to the es8323 analog output.

Signed-off-by: Romain Perier <romain.perier-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>
---

Changes in v3:
- Renamed sound_i2s to sound-i2s
- Re-ordered properties in the right order
- Splitted headphone into phone_ctl and hp_det

Changes in v2:
- Add the pinctrl headphone, that was previously in conflict with otp pins
- Renamed sound_es8323 to sound_i2s
- Added the property rockchip,routing

 arch/arm/boot/dts/rk3288-firefly.dtsi | 38 +++++++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)

diff --git a/arch/arm/boot/dts/rk3288-firefly.dtsi b/arch/arm/boot/dts/rk3288-firefly.dtsi
index 10793ac18599..f80b17f0d1bf 100644
--- a/arch/arm/boot/dts/rk3288-firefly.dtsi
+++ b/arch/arm/boot/dts/rk3288-firefly.dtsi
@@ -103,6 +103,19 @@
 		};
 	};
 
+	sound-i2s {
+		compatible = "rockchip,rk3288-hdmi-analog";
+		pinctrl-names = "default";
+		pinctrl-0 = <&phone_ctl>, <&hp_det>;
+		rockchip,audio-codec = <&es8323>;
+		rockchip,hp-det-gpios = <&gpio7 15 GPIO_ACTIVE_HIGH>;
+		rockchip,hp-en-gpios = <&gpio0 10 GPIO_ACTIVE_HIGH>;
+		rockchip,i2s-controller = <&i2s>;
+		rockchip,model = "I2S";
+		rockchip,routing = "Analog", "LOUT2",
+				   "Analog", "ROUT2";
+	};
+
 	vbat_wl: vcc_sys: vsys-regulator {
 		compatible = "regulator-fixed";
 		regulator-name = "vcc_sys";
@@ -371,6 +384,17 @@
 
 &i2c2 {
 	status = "okay";
+
+	es8323: es8323@10 {
+		compatible = "everest,es8323", "everest,es8328";
+		reg = <0x10>;
+		AVDD-supply = <&vcca_33>;
+		DVDD-supply = <&vcca_33>;
+		HPVDD-supply = <&vcca_33>;
+		PVDD-supply = <&vcca_33>;
+		clocks = <&cru SCLK_I2S0_OUT>;
+		clock-names = "i2s_clk_out";
+	};
 };
 
 &i2c4 {
@@ -381,6 +405,10 @@
 	status = "okay";
 };
 
+&i2s {
+	status = "okay";
+};
+
 &io_domains {
 	status = "okay";
 
@@ -483,6 +511,16 @@
 		};
 	};
 
+	headphone {
+		hp_det: hp-det {
+			rockchip,pins = <7 15 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+
+		phone_ctl: phone-ctl {
+			rockchip,pins = <0 10 RK_FUNC_GPIO &pcfg_pull_up>;
+		};
+	};
+
 	usb_host {
 		host_vbus_drv: host-vbus-drv {
 			rockchip,pins = <0 14 RK_FUNC_GPIO &pcfg_pull_none>;
-- 
2.11.0

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH v3 3/3] arm: dts: Add support for ES8323 to the Firefly-RK3288
@ 2017-05-12 13:22     ` Romain Perier
  0 siblings, 0 replies; 42+ messages in thread
From: Romain Perier @ 2017-05-12 13:22 UTC (permalink / raw)
  To: linux-arm-kernel

This commit adds the DT definition of the es8388 i2c device found at
address 0x10. It also adds the definition for connecting the Rockchip
I2S to the es8323 analog output.

Signed-off-by: Romain Perier <romain.perier@collabora.com>
---

Changes in v3:
- Renamed sound_i2s to sound-i2s
- Re-ordered properties in the right order
- Splitted headphone into phone_ctl and hp_det

Changes in v2:
- Add the pinctrl headphone, that was previously in conflict with otp pins
- Renamed sound_es8323 to sound_i2s
- Added the property rockchip,routing

 arch/arm/boot/dts/rk3288-firefly.dtsi | 38 +++++++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)

diff --git a/arch/arm/boot/dts/rk3288-firefly.dtsi b/arch/arm/boot/dts/rk3288-firefly.dtsi
index 10793ac18599..f80b17f0d1bf 100644
--- a/arch/arm/boot/dts/rk3288-firefly.dtsi
+++ b/arch/arm/boot/dts/rk3288-firefly.dtsi
@@ -103,6 +103,19 @@
 		};
 	};
 
+	sound-i2s {
+		compatible = "rockchip,rk3288-hdmi-analog";
+		pinctrl-names = "default";
+		pinctrl-0 = <&phone_ctl>, <&hp_det>;
+		rockchip,audio-codec = <&es8323>;
+		rockchip,hp-det-gpios = <&gpio7 15 GPIO_ACTIVE_HIGH>;
+		rockchip,hp-en-gpios = <&gpio0 10 GPIO_ACTIVE_HIGH>;
+		rockchip,i2s-controller = <&i2s>;
+		rockchip,model = "I2S";
+		rockchip,routing = "Analog", "LOUT2",
+				   "Analog", "ROUT2";
+	};
+
 	vbat_wl: vcc_sys: vsys-regulator {
 		compatible = "regulator-fixed";
 		regulator-name = "vcc_sys";
@@ -371,6 +384,17 @@
 
 &i2c2 {
 	status = "okay";
+
+	es8323: es8323 at 10 {
+		compatible = "everest,es8323", "everest,es8328";
+		reg = <0x10>;
+		AVDD-supply = <&vcca_33>;
+		DVDD-supply = <&vcca_33>;
+		HPVDD-supply = <&vcca_33>;
+		PVDD-supply = <&vcca_33>;
+		clocks = <&cru SCLK_I2S0_OUT>;
+		clock-names = "i2s_clk_out";
+	};
 };
 
 &i2c4 {
@@ -381,6 +405,10 @@
 	status = "okay";
 };
 
+&i2s {
+	status = "okay";
+};
+
 &io_domains {
 	status = "okay";
 
@@ -483,6 +511,16 @@
 		};
 	};
 
+	headphone {
+		hp_det: hp-det {
+			rockchip,pins = <7 15 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+
+		phone_ctl: phone-ctl {
+			rockchip,pins = <0 10 RK_FUNC_GPIO &pcfg_pull_up>;
+		};
+	};
+
 	usb_host {
 		host_vbus_drv: host-vbus-drv {
 			rockchip,pins = <0 14 RK_FUNC_GPIO &pcfg_pull_none>;
-- 
2.11.0

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

* [PATCH v3 0/3] Add support for es8323 and hdmi audio to the firefly-rk3288
  2017-05-12 13:22 ` Romain Perier
@ 2017-05-12 13:22     ` Romain Perier
  -1 siblings, 0 replies; 42+ messages in thread
From: Romain Perier @ 2017-05-12 13:22 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
	alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw, Heiko Stuebner
  Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Rob Herring, Ian Campbell,
	Pawel Moll, Mark Rutland, Kumar Gala,
	linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Romain Perier

This set of patches enables support for the es8323 codecs on the
firefly-rk3288. It adds the required DT definitions to link rockchip-i2s
to the es8388 analog output. As the support for HDMI audio is also
built-in in the corresponding ASoC machine driver, HDMI audio output is
also enabled.

Changes in v3:
 - Synced DT with the one of the Rock2, the properties have been
   lexically re-ordered in the right order, I have splitted the
   headphone pinctrl in two: phone_ctl and hp_det
Changes in v2:
 - Adapted DT for the firefly-rk3288 to the ASoC machine driver
   rk3288-hdmi-analog
 - Added patch 02/03 to this series
 - Re-wrote this cover letter

Romain Perier (3):
  SoC: es8328-i2c: Add compatible for ES8323
  arm: dts: rockchip: Don't set otp-gpio pinctrl by default in
    rk3288.dtsi
  arm: dts: Add support for ES8323 to the Firefly-RK3288

 Documentation/devicetree/bindings/sound/es8328.txt |  5 ++-
 arch/arm/boot/dts/rk3288-evb.dtsi                  |  4 +++
 arch/arm/boot/dts/rk3288-firefly.dtsi              | 38 ++++++++++++++++++++++
 arch/arm/boot/dts/rk3288-veyron.dtsi               |  4 +++
 arch/arm/boot/dts/rk3288.dtsi                      |  4 ---
 sound/soc/codecs/es8328-i2c.c                      |  2 ++
 6 files changed, 52 insertions(+), 5 deletions(-)

-- 
2.11.0

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH v3 0/3] Add support for es8323 and hdmi audio to the firefly-rk3288
@ 2017-05-12 13:22     ` Romain Perier
  0 siblings, 0 replies; 42+ messages in thread
From: Romain Perier @ 2017-05-12 13:22 UTC (permalink / raw)
  To: linux-arm-kernel

This set of patches enables support for the es8323 codecs on the
firefly-rk3288. It adds the required DT definitions to link rockchip-i2s
to the es8388 analog output. As the support for HDMI audio is also
built-in in the corresponding ASoC machine driver, HDMI audio output is
also enabled.

Changes in v3:
 - Synced DT with the one of the Rock2, the properties have been
   lexically re-ordered in the right order, I have splitted the
   headphone pinctrl in two: phone_ctl and hp_det
Changes in v2:
 - Adapted DT for the firefly-rk3288 to the ASoC machine driver
   rk3288-hdmi-analog
 - Added patch 02/03 to this series
 - Re-wrote this cover letter

Romain Perier (3):
  SoC: es8328-i2c: Add compatible for ES8323
  arm: dts: rockchip: Don't set otp-gpio pinctrl by default in
    rk3288.dtsi
  arm: dts: Add support for ES8323 to the Firefly-RK3288

 Documentation/devicetree/bindings/sound/es8328.txt |  5 ++-
 arch/arm/boot/dts/rk3288-evb.dtsi                  |  4 +++
 arch/arm/boot/dts/rk3288-firefly.dtsi              | 38 ++++++++++++++++++++++
 arch/arm/boot/dts/rk3288-veyron.dtsi               |  4 +++
 arch/arm/boot/dts/rk3288.dtsi                      |  4 ---
 sound/soc/codecs/es8328-i2c.c                      |  2 ++
 6 files changed, 52 insertions(+), 5 deletions(-)

-- 
2.11.0

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

* [PATCH v3 1/3] SoC: es8328-i2c: Add compatible for ES8323
  2017-05-12 13:22 ` Romain Perier
@ 2017-05-12 13:22     ` Romain Perier
  -1 siblings, 0 replies; 42+ messages in thread
From: Romain Perier @ 2017-05-12 13:22 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
	alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw, Heiko Stuebner
  Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Rob Herring, Ian Campbell,
	Pawel Moll, Mark Rutland, Kumar Gala,
	linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Romain Perier

This commit adds a compatible string for everest,es8323. This is an
audio codec that is compatible with es8328 and can be found for example
on the Firefly-RK3288 board.

Signed-off-by: Romain Perier <romain.perier-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>
---

Changes in v3: None
Changes in v2: None

 Documentation/devicetree/bindings/sound/es8328.txt | 5 ++++-
 sound/soc/codecs/es8328-i2c.c                      | 2 ++
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/sound/es8328.txt b/Documentation/devicetree/bindings/sound/es8328.txt
index 33fbf058c997..86b6d6e99732 100644
--- a/Documentation/devicetree/bindings/sound/es8328.txt
+++ b/Documentation/devicetree/bindings/sound/es8328.txt
@@ -4,7 +4,10 @@ This device supports both I2C and SPI.
 
 Required properties:
 
-  - compatible  : Should be "everest,es8328" or "everest,es8388"
+  - compatible  : Should be one of the following:
+	- "everest,es8323"
+	- "everest,es8328"
+	- "everest,es8388"
   - DVDD-supply : Regulator providing digital core supply voltage 1.8 - 3.6V
   - AVDD-supply : Regulator providing analog supply voltage 3.3V
   - PVDD-supply : Regulator providing digital IO supply voltage 1.8 - 3.6V
diff --git a/sound/soc/codecs/es8328-i2c.c b/sound/soc/codecs/es8328-i2c.c
index 318ab28c5351..be3f03c35137 100644
--- a/sound/soc/codecs/es8328-i2c.c
+++ b/sound/soc/codecs/es8328-i2c.c
@@ -19,6 +19,7 @@
 #include "es8328.h"
 
 static const struct i2c_device_id es8328_id[] = {
+	{ "es8323", 0 },
 	{ "es8328", 0 },
 	{ "es8388", 0 },
 	{ }
@@ -26,6 +27,7 @@ static const struct i2c_device_id es8328_id[] = {
 MODULE_DEVICE_TABLE(i2c, es8328_id);
 
 static const struct of_device_id es8328_of_match[] = {
+	{ .compatible = "everest,es8323", },
 	{ .compatible = "everest,es8328", },
 	{ .compatible = "everest,es8388", },
 	{ }
-- 
2.11.0

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH v3 1/3] SoC: es8328-i2c: Add compatible for ES8323
@ 2017-05-12 13:22     ` Romain Perier
  0 siblings, 0 replies; 42+ messages in thread
From: Romain Perier @ 2017-05-12 13:22 UTC (permalink / raw)
  To: linux-arm-kernel

This commit adds a compatible string for everest,es8323. This is an
audio codec that is compatible with es8328 and can be found for example
on the Firefly-RK3288 board.

Signed-off-by: Romain Perier <romain.perier@collabora.com>
---

Changes in v3: None
Changes in v2: None

 Documentation/devicetree/bindings/sound/es8328.txt | 5 ++++-
 sound/soc/codecs/es8328-i2c.c                      | 2 ++
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/sound/es8328.txt b/Documentation/devicetree/bindings/sound/es8328.txt
index 33fbf058c997..86b6d6e99732 100644
--- a/Documentation/devicetree/bindings/sound/es8328.txt
+++ b/Documentation/devicetree/bindings/sound/es8328.txt
@@ -4,7 +4,10 @@ This device supports both I2C and SPI.
 
 Required properties:
 
-  - compatible  : Should be "everest,es8328" or "everest,es8388"
+  - compatible  : Should be one of the following:
+	- "everest,es8323"
+	- "everest,es8328"
+	- "everest,es8388"
   - DVDD-supply : Regulator providing digital core supply voltage 1.8 - 3.6V
   - AVDD-supply : Regulator providing analog supply voltage 3.3V
   - PVDD-supply : Regulator providing digital IO supply voltage 1.8 - 3.6V
diff --git a/sound/soc/codecs/es8328-i2c.c b/sound/soc/codecs/es8328-i2c.c
index 318ab28c5351..be3f03c35137 100644
--- a/sound/soc/codecs/es8328-i2c.c
+++ b/sound/soc/codecs/es8328-i2c.c
@@ -19,6 +19,7 @@
 #include "es8328.h"
 
 static const struct i2c_device_id es8328_id[] = {
+	{ "es8323", 0 },
 	{ "es8328", 0 },
 	{ "es8388", 0 },
 	{ }
@@ -26,6 +27,7 @@ static const struct i2c_device_id es8328_id[] = {
 MODULE_DEVICE_TABLE(i2c, es8328_id);
 
 static const struct of_device_id es8328_of_match[] = {
+	{ .compatible = "everest,es8323", },
 	{ .compatible = "everest,es8328", },
 	{ .compatible = "everest,es8388", },
 	{ }
-- 
2.11.0

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

* [PATCH v3 2/3] arm: dts: rockchip: Don't set otp-gpio pinctrl by default in rk3288.dtsi
  2017-05-12 13:22 ` Romain Perier
@ 2017-05-12 13:22     ` Romain Perier
  -1 siblings, 0 replies; 42+ messages in thread
From: Romain Perier @ 2017-05-12 13:22 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
	alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw, Heiko Stuebner
  Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Rob Herring, Ian Campbell,
	Pawel Moll, Mark Rutland, Kumar Gala,
	linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Romain Perier

The tsadc supports two reset methods: the cru and the otp_gpio. All
boards except veyron and the evb simply use the cru-method and reuse the
pin for something else. On the Firefly-RK3288 this is for example the
case with the headphone. To prevent pinctrl-conflicts with these don't
set the otp-gpio pinctrl by default but only in the boards using it.

Signed-off-by: Romain Perier <romain.perier-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>
---

Changes in v3: None
Changes in v2:
- Added this patch

 arch/arm/boot/dts/rk3288-evb.dtsi    | 4 ++++
 arch/arm/boot/dts/rk3288-veyron.dtsi | 4 ++++
 arch/arm/boot/dts/rk3288.dtsi        | 4 ----
 3 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/arch/arm/boot/dts/rk3288-evb.dtsi b/arch/arm/boot/dts/rk3288-evb.dtsi
index 0dec94c3583b..28a69334b2d1 100644
--- a/arch/arm/boot/dts/rk3288-evb.dtsi
+++ b/arch/arm/boot/dts/rk3288-evb.dtsi
@@ -290,6 +290,10 @@
 };
 
 &tsadc {
+	pinctrl-names = "init", "default", "sleep";
+	pinctrl-0 = <&otp_gpio>;
+	pinctrl-1 = <&otp_out>;
+	pinctrl-2 = <&otp_gpio>;
 	rockchip,hw-tshut-mode = <0>; /* tshut mode 0:CRU 1:GPIO */
 	rockchip,hw-tshut-polarity = <0>; /* tshut polarity 0:LOW 1:HIGH */
 	status = "okay";
diff --git a/arch/arm/boot/dts/rk3288-veyron.dtsi b/arch/arm/boot/dts/rk3288-veyron.dtsi
index 5d1eb0a25827..5603812494dd 100644
--- a/arch/arm/boot/dts/rk3288-veyron.dtsi
+++ b/arch/arm/boot/dts/rk3288-veyron.dtsi
@@ -393,6 +393,10 @@
 &tsadc {
 	status = "okay";
 
+	pinctrl-names = "init", "default", "sleep";
+	pinctrl-0 = <&otp_gpio>;
+	pinctrl-1 = <&otp_out>;
+	pinctrl-2 = <&otp_gpio>;
 	rockchip,hw-tshut-mode = <1>; /* tshut mode 0:CRU 1:GPIO */
 	rockchip,hw-tshut-polarity = <1>; /* tshut polarity 0:LOW 1:HIGH */
 };
diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi
index df8a0dbe9d91..c41aa4f9d9c4 100644
--- a/arch/arm/boot/dts/rk3288.dtsi
+++ b/arch/arm/boot/dts/rk3288.dtsi
@@ -532,10 +532,6 @@
 		clock-names = "tsadc", "apb_pclk";
 		resets = <&cru SRST_TSADC>;
 		reset-names = "tsadc-apb";
-		pinctrl-names = "init", "default", "sleep";
-		pinctrl-0 = <&otp_gpio>;
-		pinctrl-1 = <&otp_out>;
-		pinctrl-2 = <&otp_gpio>;
 		#thermal-sensor-cells = <1>;
 		rockchip,hw-tshut-temp = <95000>;
 		status = "disabled";
-- 
2.11.0

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH v3 2/3] arm: dts: rockchip: Don't set otp-gpio pinctrl by default in rk3288.dtsi
@ 2017-05-12 13:22     ` Romain Perier
  0 siblings, 0 replies; 42+ messages in thread
From: Romain Perier @ 2017-05-12 13:22 UTC (permalink / raw)
  To: linux-arm-kernel

The tsadc supports two reset methods: the cru and the otp_gpio. All
boards except veyron and the evb simply use the cru-method and reuse the
pin for something else. On the Firefly-RK3288 this is for example the
case with the headphone. To prevent pinctrl-conflicts with these don't
set the otp-gpio pinctrl by default but only in the boards using it.

Signed-off-by: Romain Perier <romain.perier@collabora.com>
---

Changes in v3: None
Changes in v2:
- Added this patch

 arch/arm/boot/dts/rk3288-evb.dtsi    | 4 ++++
 arch/arm/boot/dts/rk3288-veyron.dtsi | 4 ++++
 arch/arm/boot/dts/rk3288.dtsi        | 4 ----
 3 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/arch/arm/boot/dts/rk3288-evb.dtsi b/arch/arm/boot/dts/rk3288-evb.dtsi
index 0dec94c3583b..28a69334b2d1 100644
--- a/arch/arm/boot/dts/rk3288-evb.dtsi
+++ b/arch/arm/boot/dts/rk3288-evb.dtsi
@@ -290,6 +290,10 @@
 };
 
 &tsadc {
+	pinctrl-names = "init", "default", "sleep";
+	pinctrl-0 = <&otp_gpio>;
+	pinctrl-1 = <&otp_out>;
+	pinctrl-2 = <&otp_gpio>;
 	rockchip,hw-tshut-mode = <0>; /* tshut mode 0:CRU 1:GPIO */
 	rockchip,hw-tshut-polarity = <0>; /* tshut polarity 0:LOW 1:HIGH */
 	status = "okay";
diff --git a/arch/arm/boot/dts/rk3288-veyron.dtsi b/arch/arm/boot/dts/rk3288-veyron.dtsi
index 5d1eb0a25827..5603812494dd 100644
--- a/arch/arm/boot/dts/rk3288-veyron.dtsi
+++ b/arch/arm/boot/dts/rk3288-veyron.dtsi
@@ -393,6 +393,10 @@
 &tsadc {
 	status = "okay";
 
+	pinctrl-names = "init", "default", "sleep";
+	pinctrl-0 = <&otp_gpio>;
+	pinctrl-1 = <&otp_out>;
+	pinctrl-2 = <&otp_gpio>;
 	rockchip,hw-tshut-mode = <1>; /* tshut mode 0:CRU 1:GPIO */
 	rockchip,hw-tshut-polarity = <1>; /* tshut polarity 0:LOW 1:HIGH */
 };
diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi
index df8a0dbe9d91..c41aa4f9d9c4 100644
--- a/arch/arm/boot/dts/rk3288.dtsi
+++ b/arch/arm/boot/dts/rk3288.dtsi
@@ -532,10 +532,6 @@
 		clock-names = "tsadc", "apb_pclk";
 		resets = <&cru SRST_TSADC>;
 		reset-names = "tsadc-apb";
-		pinctrl-names = "init", "default", "sleep";
-		pinctrl-0 = <&otp_gpio>;
-		pinctrl-1 = <&otp_out>;
-		pinctrl-2 = <&otp_gpio>;
 		#thermal-sensor-cells = <1>;
 		rockchip,hw-tshut-temp = <95000>;
 		status = "disabled";
-- 
2.11.0

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

* [PATCH v3 3/3] arm: dts: Add support for ES8323 to the Firefly-RK3288
  2017-05-12 13:22 ` Romain Perier
@ 2017-05-12 13:22     ` Romain Perier
  -1 siblings, 0 replies; 42+ messages in thread
From: Romain Perier @ 2017-05-12 13:22 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
	alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw, Heiko Stuebner
  Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Rob Herring, Ian Campbell,
	Pawel Moll, Mark Rutland, Kumar Gala,
	linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Romain Perier

This commit adds the DT definition of the es8388 i2c device found at
address 0x10. It also adds the definition for connecting the Rockchip
I2S to the es8323 analog output.

Signed-off-by: Romain Perier <romain.perier-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>
---

Changes in v3:
- Renamed sound_i2s to sound-i2s
- Re-ordered properties in the right order
- Splitted headphone into phone_ctl and hp_det

Changes in v2:
- Add the pinctrl headphone, that was previously in conflict with otp pins
- Renamed sound_es8323 to sound_i2s
- Added the property rockchip,routing

 arch/arm/boot/dts/rk3288-firefly.dtsi | 38 +++++++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)

diff --git a/arch/arm/boot/dts/rk3288-firefly.dtsi b/arch/arm/boot/dts/rk3288-firefly.dtsi
index 10793ac18599..f80b17f0d1bf 100644
--- a/arch/arm/boot/dts/rk3288-firefly.dtsi
+++ b/arch/arm/boot/dts/rk3288-firefly.dtsi
@@ -103,6 +103,19 @@
 		};
 	};
 
+	sound-i2s {
+		compatible = "rockchip,rk3288-hdmi-analog";
+		pinctrl-names = "default";
+		pinctrl-0 = <&phone_ctl>, <&hp_det>;
+		rockchip,audio-codec = <&es8323>;
+		rockchip,hp-det-gpios = <&gpio7 15 GPIO_ACTIVE_HIGH>;
+		rockchip,hp-en-gpios = <&gpio0 10 GPIO_ACTIVE_HIGH>;
+		rockchip,i2s-controller = <&i2s>;
+		rockchip,model = "I2S";
+		rockchip,routing = "Analog", "LOUT2",
+				   "Analog", "ROUT2";
+	};
+
 	vbat_wl: vcc_sys: vsys-regulator {
 		compatible = "regulator-fixed";
 		regulator-name = "vcc_sys";
@@ -371,6 +384,17 @@
 
 &i2c2 {
 	status = "okay";
+
+	es8323: es8323@10 {
+		compatible = "everest,es8323", "everest,es8328";
+		reg = <0x10>;
+		AVDD-supply = <&vcca_33>;
+		DVDD-supply = <&vcca_33>;
+		HPVDD-supply = <&vcca_33>;
+		PVDD-supply = <&vcca_33>;
+		clocks = <&cru SCLK_I2S0_OUT>;
+		clock-names = "i2s_clk_out";
+	};
 };
 
 &i2c4 {
@@ -381,6 +405,10 @@
 	status = "okay";
 };
 
+&i2s {
+	status = "okay";
+};
+
 &io_domains {
 	status = "okay";
 
@@ -483,6 +511,16 @@
 		};
 	};
 
+	headphone {
+		hp_det: hp-det {
+			rockchip,pins = <7 15 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+
+		phone_ctl: phone-ctl {
+			rockchip,pins = <0 10 RK_FUNC_GPIO &pcfg_pull_up>;
+		};
+	};
+
 	usb_host {
 		host_vbus_drv: host-vbus-drv {
 			rockchip,pins = <0 14 RK_FUNC_GPIO &pcfg_pull_none>;
-- 
2.11.0

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH v3 3/3] arm: dts: Add support for ES8323 to the Firefly-RK3288
@ 2017-05-12 13:22     ` Romain Perier
  0 siblings, 0 replies; 42+ messages in thread
From: Romain Perier @ 2017-05-12 13:22 UTC (permalink / raw)
  To: linux-arm-kernel

This commit adds the DT definition of the es8388 i2c device found at
address 0x10. It also adds the definition for connecting the Rockchip
I2S to the es8323 analog output.

Signed-off-by: Romain Perier <romain.perier@collabora.com>
---

Changes in v3:
- Renamed sound_i2s to sound-i2s
- Re-ordered properties in the right order
- Splitted headphone into phone_ctl and hp_det

Changes in v2:
- Add the pinctrl headphone, that was previously in conflict with otp pins
- Renamed sound_es8323 to sound_i2s
- Added the property rockchip,routing

 arch/arm/boot/dts/rk3288-firefly.dtsi | 38 +++++++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)

diff --git a/arch/arm/boot/dts/rk3288-firefly.dtsi b/arch/arm/boot/dts/rk3288-firefly.dtsi
index 10793ac18599..f80b17f0d1bf 100644
--- a/arch/arm/boot/dts/rk3288-firefly.dtsi
+++ b/arch/arm/boot/dts/rk3288-firefly.dtsi
@@ -103,6 +103,19 @@
 		};
 	};
 
+	sound-i2s {
+		compatible = "rockchip,rk3288-hdmi-analog";
+		pinctrl-names = "default";
+		pinctrl-0 = <&phone_ctl>, <&hp_det>;
+		rockchip,audio-codec = <&es8323>;
+		rockchip,hp-det-gpios = <&gpio7 15 GPIO_ACTIVE_HIGH>;
+		rockchip,hp-en-gpios = <&gpio0 10 GPIO_ACTIVE_HIGH>;
+		rockchip,i2s-controller = <&i2s>;
+		rockchip,model = "I2S";
+		rockchip,routing = "Analog", "LOUT2",
+				   "Analog", "ROUT2";
+	};
+
 	vbat_wl: vcc_sys: vsys-regulator {
 		compatible = "regulator-fixed";
 		regulator-name = "vcc_sys";
@@ -371,6 +384,17 @@
 
 &i2c2 {
 	status = "okay";
+
+	es8323: es8323 at 10 {
+		compatible = "everest,es8323", "everest,es8328";
+		reg = <0x10>;
+		AVDD-supply = <&vcca_33>;
+		DVDD-supply = <&vcca_33>;
+		HPVDD-supply = <&vcca_33>;
+		PVDD-supply = <&vcca_33>;
+		clocks = <&cru SCLK_I2S0_OUT>;
+		clock-names = "i2s_clk_out";
+	};
 };
 
 &i2c4 {
@@ -381,6 +405,10 @@
 	status = "okay";
 };
 
+&i2s {
+	status = "okay";
+};
+
 &io_domains {
 	status = "okay";
 
@@ -483,6 +511,16 @@
 		};
 	};
 
+	headphone {
+		hp_det: hp-det {
+			rockchip,pins = <7 15 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+
+		phone_ctl: phone-ctl {
+			rockchip,pins = <0 10 RK_FUNC_GPIO &pcfg_pull_up>;
+		};
+	};
+
 	usb_host {
 		host_vbus_drv: host-vbus-drv {
 			rockchip,pins = <0 14 RK_FUNC_GPIO &pcfg_pull_none>;
-- 
2.11.0

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

* [PATCH v3 0/3] Add support for es8323 and hdmi audio to the firefly-rk3288
  2017-05-12 13:22 ` Romain Perier
@ 2017-05-12 13:22     ` Romain Perier
  -1 siblings, 0 replies; 42+ messages in thread
From: Romain Perier @ 2017-05-12 13:22 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
	alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw, Heiko Stuebner
  Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Rob Herring, Ian Campbell,
	Pawel Moll, Mark Rutland, Kumar Gala,
	linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Romain Perier

This set of patches enables support for the es8323 codecs on the
firefly-rk3288. It adds the required DT definitions to link rockchip-i2s
to the es8388 analog output. As the support for HDMI audio is also
built-in in the corresponding ASoC machine driver, HDMI audio output is
also enabled.

Changes in v3:
 - Synced DT with the one of the Rock2, the properties have been
   lexically re-ordered in the right order, I have splitted the
   headphone pinctrl in two: phone_ctl and hp_det
Changes in v2:
 - Adapted DT for the firefly-rk3288 to the ASoC machine driver
   rk3288-hdmi-analog
 - Added patch 02/03 to this series
 - Re-wrote this cover letter

Romain Perier (3):
  SoC: es8328-i2c: Add compatible for ES8323
  arm: dts: rockchip: Don't set otp-gpio pinctrl by default in
    rk3288.dtsi
  arm: dts: Add support for ES8323 to the Firefly-RK3288

 Documentation/devicetree/bindings/sound/es8328.txt |  5 ++-
 arch/arm/boot/dts/rk3288-evb.dtsi                  |  4 +++
 arch/arm/boot/dts/rk3288-firefly.dtsi              | 38 ++++++++++++++++++++++
 arch/arm/boot/dts/rk3288-veyron.dtsi               |  4 +++
 arch/arm/boot/dts/rk3288.dtsi                      |  4 ---
 sound/soc/codecs/es8328-i2c.c                      |  2 ++
 6 files changed, 52 insertions(+), 5 deletions(-)

-- 
2.11.0

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH v3 0/3] Add support for es8323 and hdmi audio to the firefly-rk3288
@ 2017-05-12 13:22     ` Romain Perier
  0 siblings, 0 replies; 42+ messages in thread
From: Romain Perier @ 2017-05-12 13:22 UTC (permalink / raw)
  To: linux-arm-kernel

This set of patches enables support for the es8323 codecs on the
firefly-rk3288. It adds the required DT definitions to link rockchip-i2s
to the es8388 analog output. As the support for HDMI audio is also
built-in in the corresponding ASoC machine driver, HDMI audio output is
also enabled.

Changes in v3:
 - Synced DT with the one of the Rock2, the properties have been
   lexically re-ordered in the right order, I have splitted the
   headphone pinctrl in two: phone_ctl and hp_det
Changes in v2:
 - Adapted DT for the firefly-rk3288 to the ASoC machine driver
   rk3288-hdmi-analog
 - Added patch 02/03 to this series
 - Re-wrote this cover letter

Romain Perier (3):
  SoC: es8328-i2c: Add compatible for ES8323
  arm: dts: rockchip: Don't set otp-gpio pinctrl by default in
    rk3288.dtsi
  arm: dts: Add support for ES8323 to the Firefly-RK3288

 Documentation/devicetree/bindings/sound/es8328.txt |  5 ++-
 arch/arm/boot/dts/rk3288-evb.dtsi                  |  4 +++
 arch/arm/boot/dts/rk3288-firefly.dtsi              | 38 ++++++++++++++++++++++
 arch/arm/boot/dts/rk3288-veyron.dtsi               |  4 +++
 arch/arm/boot/dts/rk3288.dtsi                      |  4 ---
 sound/soc/codecs/es8328-i2c.c                      |  2 ++
 6 files changed, 52 insertions(+), 5 deletions(-)

-- 
2.11.0

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

* [PATCH v3 1/3] SoC: es8328-i2c: Add compatible for ES8323
  2017-05-12 13:22 ` Romain Perier
@ 2017-05-12 13:22     ` Romain Perier
  -1 siblings, 0 replies; 42+ messages in thread
From: Romain Perier @ 2017-05-12 13:22 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
	alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw, Heiko Stuebner
  Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Rob Herring, Ian Campbell,
	Pawel Moll, Mark Rutland, Kumar Gala,
	linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Romain Perier

This commit adds a compatible string for everest,es8323. This is an
audio codec that is compatible with es8328 and can be found for example
on the Firefly-RK3288 board.

Signed-off-by: Romain Perier <romain.perier-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>
---

Changes in v3: None
Changes in v2: None

 Documentation/devicetree/bindings/sound/es8328.txt | 5 ++++-
 sound/soc/codecs/es8328-i2c.c                      | 2 ++
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/sound/es8328.txt b/Documentation/devicetree/bindings/sound/es8328.txt
index 33fbf058c997..86b6d6e99732 100644
--- a/Documentation/devicetree/bindings/sound/es8328.txt
+++ b/Documentation/devicetree/bindings/sound/es8328.txt
@@ -4,7 +4,10 @@ This device supports both I2C and SPI.
 
 Required properties:
 
-  - compatible  : Should be "everest,es8328" or "everest,es8388"
+  - compatible  : Should be one of the following:
+	- "everest,es8323"
+	- "everest,es8328"
+	- "everest,es8388"
   - DVDD-supply : Regulator providing digital core supply voltage 1.8 - 3.6V
   - AVDD-supply : Regulator providing analog supply voltage 3.3V
   - PVDD-supply : Regulator providing digital IO supply voltage 1.8 - 3.6V
diff --git a/sound/soc/codecs/es8328-i2c.c b/sound/soc/codecs/es8328-i2c.c
index 318ab28c5351..be3f03c35137 100644
--- a/sound/soc/codecs/es8328-i2c.c
+++ b/sound/soc/codecs/es8328-i2c.c
@@ -19,6 +19,7 @@
 #include "es8328.h"
 
 static const struct i2c_device_id es8328_id[] = {
+	{ "es8323", 0 },
 	{ "es8328", 0 },
 	{ "es8388", 0 },
 	{ }
@@ -26,6 +27,7 @@ static const struct i2c_device_id es8328_id[] = {
 MODULE_DEVICE_TABLE(i2c, es8328_id);
 
 static const struct of_device_id es8328_of_match[] = {
+	{ .compatible = "everest,es8323", },
 	{ .compatible = "everest,es8328", },
 	{ .compatible = "everest,es8388", },
 	{ }
-- 
2.11.0

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH v3 1/3] SoC: es8328-i2c: Add compatible for ES8323
@ 2017-05-12 13:22     ` Romain Perier
  0 siblings, 0 replies; 42+ messages in thread
From: Romain Perier @ 2017-05-12 13:22 UTC (permalink / raw)
  To: linux-arm-kernel

This commit adds a compatible string for everest,es8323. This is an
audio codec that is compatible with es8328 and can be found for example
on the Firefly-RK3288 board.

Signed-off-by: Romain Perier <romain.perier@collabora.com>
---

Changes in v3: None
Changes in v2: None

 Documentation/devicetree/bindings/sound/es8328.txt | 5 ++++-
 sound/soc/codecs/es8328-i2c.c                      | 2 ++
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/sound/es8328.txt b/Documentation/devicetree/bindings/sound/es8328.txt
index 33fbf058c997..86b6d6e99732 100644
--- a/Documentation/devicetree/bindings/sound/es8328.txt
+++ b/Documentation/devicetree/bindings/sound/es8328.txt
@@ -4,7 +4,10 @@ This device supports both I2C and SPI.
 
 Required properties:
 
-  - compatible  : Should be "everest,es8328" or "everest,es8388"
+  - compatible  : Should be one of the following:
+	- "everest,es8323"
+	- "everest,es8328"
+	- "everest,es8388"
   - DVDD-supply : Regulator providing digital core supply voltage 1.8 - 3.6V
   - AVDD-supply : Regulator providing analog supply voltage 3.3V
   - PVDD-supply : Regulator providing digital IO supply voltage 1.8 - 3.6V
diff --git a/sound/soc/codecs/es8328-i2c.c b/sound/soc/codecs/es8328-i2c.c
index 318ab28c5351..be3f03c35137 100644
--- a/sound/soc/codecs/es8328-i2c.c
+++ b/sound/soc/codecs/es8328-i2c.c
@@ -19,6 +19,7 @@
 #include "es8328.h"
 
 static const struct i2c_device_id es8328_id[] = {
+	{ "es8323", 0 },
 	{ "es8328", 0 },
 	{ "es8388", 0 },
 	{ }
@@ -26,6 +27,7 @@ static const struct i2c_device_id es8328_id[] = {
 MODULE_DEVICE_TABLE(i2c, es8328_id);
 
 static const struct of_device_id es8328_of_match[] = {
+	{ .compatible = "everest,es8323", },
 	{ .compatible = "everest,es8328", },
 	{ .compatible = "everest,es8388", },
 	{ }
-- 
2.11.0

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

* [PATCH v3 2/3] arm: dts: rockchip: Don't set otp-gpio pinctrl by default in rk3288.dtsi
  2017-05-12 13:22 ` Romain Perier
@ 2017-05-12 13:22     ` Romain Perier
  -1 siblings, 0 replies; 42+ messages in thread
From: Romain Perier @ 2017-05-12 13:22 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
	alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw, Heiko Stuebner
  Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Rob Herring, Ian Campbell,
	Pawel Moll, Mark Rutland, Kumar Gala,
	linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Romain Perier

The tsadc supports two reset methods: the cru and the otp_gpio. All
boards except veyron and the evb simply use the cru-method and reuse the
pin for something else. On the Firefly-RK3288 this is for example the
case with the headphone. To prevent pinctrl-conflicts with these don't
set the otp-gpio pinctrl by default but only in the boards using it.

Signed-off-by: Romain Perier <romain.perier-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>
---

Changes in v3: None
Changes in v2:
- Added this patch

 arch/arm/boot/dts/rk3288-evb.dtsi    | 4 ++++
 arch/arm/boot/dts/rk3288-veyron.dtsi | 4 ++++
 arch/arm/boot/dts/rk3288.dtsi        | 4 ----
 3 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/arch/arm/boot/dts/rk3288-evb.dtsi b/arch/arm/boot/dts/rk3288-evb.dtsi
index 0dec94c3583b..28a69334b2d1 100644
--- a/arch/arm/boot/dts/rk3288-evb.dtsi
+++ b/arch/arm/boot/dts/rk3288-evb.dtsi
@@ -290,6 +290,10 @@
 };
 
 &tsadc {
+	pinctrl-names = "init", "default", "sleep";
+	pinctrl-0 = <&otp_gpio>;
+	pinctrl-1 = <&otp_out>;
+	pinctrl-2 = <&otp_gpio>;
 	rockchip,hw-tshut-mode = <0>; /* tshut mode 0:CRU 1:GPIO */
 	rockchip,hw-tshut-polarity = <0>; /* tshut polarity 0:LOW 1:HIGH */
 	status = "okay";
diff --git a/arch/arm/boot/dts/rk3288-veyron.dtsi b/arch/arm/boot/dts/rk3288-veyron.dtsi
index 5d1eb0a25827..5603812494dd 100644
--- a/arch/arm/boot/dts/rk3288-veyron.dtsi
+++ b/arch/arm/boot/dts/rk3288-veyron.dtsi
@@ -393,6 +393,10 @@
 &tsadc {
 	status = "okay";
 
+	pinctrl-names = "init", "default", "sleep";
+	pinctrl-0 = <&otp_gpio>;
+	pinctrl-1 = <&otp_out>;
+	pinctrl-2 = <&otp_gpio>;
 	rockchip,hw-tshut-mode = <1>; /* tshut mode 0:CRU 1:GPIO */
 	rockchip,hw-tshut-polarity = <1>; /* tshut polarity 0:LOW 1:HIGH */
 };
diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi
index df8a0dbe9d91..c41aa4f9d9c4 100644
--- a/arch/arm/boot/dts/rk3288.dtsi
+++ b/arch/arm/boot/dts/rk3288.dtsi
@@ -532,10 +532,6 @@
 		clock-names = "tsadc", "apb_pclk";
 		resets = <&cru SRST_TSADC>;
 		reset-names = "tsadc-apb";
-		pinctrl-names = "init", "default", "sleep";
-		pinctrl-0 = <&otp_gpio>;
-		pinctrl-1 = <&otp_out>;
-		pinctrl-2 = <&otp_gpio>;
 		#thermal-sensor-cells = <1>;
 		rockchip,hw-tshut-temp = <95000>;
 		status = "disabled";
-- 
2.11.0

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH v3 2/3] arm: dts: rockchip: Don't set otp-gpio pinctrl by default in rk3288.dtsi
@ 2017-05-12 13:22     ` Romain Perier
  0 siblings, 0 replies; 42+ messages in thread
From: Romain Perier @ 2017-05-12 13:22 UTC (permalink / raw)
  To: linux-arm-kernel

The tsadc supports two reset methods: the cru and the otp_gpio. All
boards except veyron and the evb simply use the cru-method and reuse the
pin for something else. On the Firefly-RK3288 this is for example the
case with the headphone. To prevent pinctrl-conflicts with these don't
set the otp-gpio pinctrl by default but only in the boards using it.

Signed-off-by: Romain Perier <romain.perier@collabora.com>
---

Changes in v3: None
Changes in v2:
- Added this patch

 arch/arm/boot/dts/rk3288-evb.dtsi    | 4 ++++
 arch/arm/boot/dts/rk3288-veyron.dtsi | 4 ++++
 arch/arm/boot/dts/rk3288.dtsi        | 4 ----
 3 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/arch/arm/boot/dts/rk3288-evb.dtsi b/arch/arm/boot/dts/rk3288-evb.dtsi
index 0dec94c3583b..28a69334b2d1 100644
--- a/arch/arm/boot/dts/rk3288-evb.dtsi
+++ b/arch/arm/boot/dts/rk3288-evb.dtsi
@@ -290,6 +290,10 @@
 };
 
 &tsadc {
+	pinctrl-names = "init", "default", "sleep";
+	pinctrl-0 = <&otp_gpio>;
+	pinctrl-1 = <&otp_out>;
+	pinctrl-2 = <&otp_gpio>;
 	rockchip,hw-tshut-mode = <0>; /* tshut mode 0:CRU 1:GPIO */
 	rockchip,hw-tshut-polarity = <0>; /* tshut polarity 0:LOW 1:HIGH */
 	status = "okay";
diff --git a/arch/arm/boot/dts/rk3288-veyron.dtsi b/arch/arm/boot/dts/rk3288-veyron.dtsi
index 5d1eb0a25827..5603812494dd 100644
--- a/arch/arm/boot/dts/rk3288-veyron.dtsi
+++ b/arch/arm/boot/dts/rk3288-veyron.dtsi
@@ -393,6 +393,10 @@
 &tsadc {
 	status = "okay";
 
+	pinctrl-names = "init", "default", "sleep";
+	pinctrl-0 = <&otp_gpio>;
+	pinctrl-1 = <&otp_out>;
+	pinctrl-2 = <&otp_gpio>;
 	rockchip,hw-tshut-mode = <1>; /* tshut mode 0:CRU 1:GPIO */
 	rockchip,hw-tshut-polarity = <1>; /* tshut polarity 0:LOW 1:HIGH */
 };
diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi
index df8a0dbe9d91..c41aa4f9d9c4 100644
--- a/arch/arm/boot/dts/rk3288.dtsi
+++ b/arch/arm/boot/dts/rk3288.dtsi
@@ -532,10 +532,6 @@
 		clock-names = "tsadc", "apb_pclk";
 		resets = <&cru SRST_TSADC>;
 		reset-names = "tsadc-apb";
-		pinctrl-names = "init", "default", "sleep";
-		pinctrl-0 = <&otp_gpio>;
-		pinctrl-1 = <&otp_out>;
-		pinctrl-2 = <&otp_gpio>;
 		#thermal-sensor-cells = <1>;
 		rockchip,hw-tshut-temp = <95000>;
 		status = "disabled";
-- 
2.11.0

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

* [PATCH v3 3/3] arm: dts: Add support for ES8323 to the Firefly-RK3288
  2017-05-12 13:22 ` Romain Perier
@ 2017-05-12 13:22     ` Romain Perier
  -1 siblings, 0 replies; 42+ messages in thread
From: Romain Perier @ 2017-05-12 13:22 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
	alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw, Heiko Stuebner
  Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Rob Herring, Ian Campbell,
	Pawel Moll, Mark Rutland, Kumar Gala,
	linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Romain Perier

This commit adds the DT definition of the es8388 i2c device found at
address 0x10. It also adds the definition for connecting the Rockchip
I2S to the es8323 analog output.

Signed-off-by: Romain Perier <romain.perier-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>
---

Changes in v3:
- Renamed sound_i2s to sound-i2s
- Re-ordered properties in the right order
- Splitted headphone into phone_ctl and hp_det

Changes in v2:
- Add the pinctrl headphone, that was previously in conflict with otp pins
- Renamed sound_es8323 to sound_i2s
- Added the property rockchip,routing

 arch/arm/boot/dts/rk3288-firefly.dtsi | 38 +++++++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)

diff --git a/arch/arm/boot/dts/rk3288-firefly.dtsi b/arch/arm/boot/dts/rk3288-firefly.dtsi
index 10793ac18599..f80b17f0d1bf 100644
--- a/arch/arm/boot/dts/rk3288-firefly.dtsi
+++ b/arch/arm/boot/dts/rk3288-firefly.dtsi
@@ -103,6 +103,19 @@
 		};
 	};
 
+	sound-i2s {
+		compatible = "rockchip,rk3288-hdmi-analog";
+		pinctrl-names = "default";
+		pinctrl-0 = <&phone_ctl>, <&hp_det>;
+		rockchip,audio-codec = <&es8323>;
+		rockchip,hp-det-gpios = <&gpio7 15 GPIO_ACTIVE_HIGH>;
+		rockchip,hp-en-gpios = <&gpio0 10 GPIO_ACTIVE_HIGH>;
+		rockchip,i2s-controller = <&i2s>;
+		rockchip,model = "I2S";
+		rockchip,routing = "Analog", "LOUT2",
+				   "Analog", "ROUT2";
+	};
+
 	vbat_wl: vcc_sys: vsys-regulator {
 		compatible = "regulator-fixed";
 		regulator-name = "vcc_sys";
@@ -371,6 +384,17 @@
 
 &i2c2 {
 	status = "okay";
+
+	es8323: es8323@10 {
+		compatible = "everest,es8323", "everest,es8328";
+		reg = <0x10>;
+		AVDD-supply = <&vcca_33>;
+		DVDD-supply = <&vcca_33>;
+		HPVDD-supply = <&vcca_33>;
+		PVDD-supply = <&vcca_33>;
+		clocks = <&cru SCLK_I2S0_OUT>;
+		clock-names = "i2s_clk_out";
+	};
 };
 
 &i2c4 {
@@ -381,6 +405,10 @@
 	status = "okay";
 };
 
+&i2s {
+	status = "okay";
+};
+
 &io_domains {
 	status = "okay";
 
@@ -483,6 +511,16 @@
 		};
 	};
 
+	headphone {
+		hp_det: hp-det {
+			rockchip,pins = <7 15 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+
+		phone_ctl: phone-ctl {
+			rockchip,pins = <0 10 RK_FUNC_GPIO &pcfg_pull_up>;
+		};
+	};
+
 	usb_host {
 		host_vbus_drv: host-vbus-drv {
 			rockchip,pins = <0 14 RK_FUNC_GPIO &pcfg_pull_none>;
-- 
2.11.0

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH v3 3/3] arm: dts: Add support for ES8323 to the Firefly-RK3288
@ 2017-05-12 13:22     ` Romain Perier
  0 siblings, 0 replies; 42+ messages in thread
From: Romain Perier @ 2017-05-12 13:22 UTC (permalink / raw)
  To: linux-arm-kernel

This commit adds the DT definition of the es8388 i2c device found at
address 0x10. It also adds the definition for connecting the Rockchip
I2S to the es8323 analog output.

Signed-off-by: Romain Perier <romain.perier@collabora.com>
---

Changes in v3:
- Renamed sound_i2s to sound-i2s
- Re-ordered properties in the right order
- Splitted headphone into phone_ctl and hp_det

Changes in v2:
- Add the pinctrl headphone, that was previously in conflict with otp pins
- Renamed sound_es8323 to sound_i2s
- Added the property rockchip,routing

 arch/arm/boot/dts/rk3288-firefly.dtsi | 38 +++++++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)

diff --git a/arch/arm/boot/dts/rk3288-firefly.dtsi b/arch/arm/boot/dts/rk3288-firefly.dtsi
index 10793ac18599..f80b17f0d1bf 100644
--- a/arch/arm/boot/dts/rk3288-firefly.dtsi
+++ b/arch/arm/boot/dts/rk3288-firefly.dtsi
@@ -103,6 +103,19 @@
 		};
 	};
 
+	sound-i2s {
+		compatible = "rockchip,rk3288-hdmi-analog";
+		pinctrl-names = "default";
+		pinctrl-0 = <&phone_ctl>, <&hp_det>;
+		rockchip,audio-codec = <&es8323>;
+		rockchip,hp-det-gpios = <&gpio7 15 GPIO_ACTIVE_HIGH>;
+		rockchip,hp-en-gpios = <&gpio0 10 GPIO_ACTIVE_HIGH>;
+		rockchip,i2s-controller = <&i2s>;
+		rockchip,model = "I2S";
+		rockchip,routing = "Analog", "LOUT2",
+				   "Analog", "ROUT2";
+	};
+
 	vbat_wl: vcc_sys: vsys-regulator {
 		compatible = "regulator-fixed";
 		regulator-name = "vcc_sys";
@@ -371,6 +384,17 @@
 
 &i2c2 {
 	status = "okay";
+
+	es8323: es8323 at 10 {
+		compatible = "everest,es8323", "everest,es8328";
+		reg = <0x10>;
+		AVDD-supply = <&vcca_33>;
+		DVDD-supply = <&vcca_33>;
+		HPVDD-supply = <&vcca_33>;
+		PVDD-supply = <&vcca_33>;
+		clocks = <&cru SCLK_I2S0_OUT>;
+		clock-names = "i2s_clk_out";
+	};
 };
 
 &i2c4 {
@@ -381,6 +405,10 @@
 	status = "okay";
 };
 
+&i2s {
+	status = "okay";
+};
+
 &io_domains {
 	status = "okay";
 
@@ -483,6 +511,16 @@
 		};
 	};
 
+	headphone {
+		hp_det: hp-det {
+			rockchip,pins = <7 15 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+
+		phone_ctl: phone-ctl {
+			rockchip,pins = <0 10 RK_FUNC_GPIO &pcfg_pull_up>;
+		};
+	};
+
 	usb_host {
 		host_vbus_drv: host-vbus-drv {
 			rockchip,pins = <0 14 RK_FUNC_GPIO &pcfg_pull_none>;
-- 
2.11.0

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

* Re: [PATCH v3 1/3] SoC: es8328-i2c: Add compatible for ES8323
  2017-05-12 13:22     ` Romain Perier
@ 2017-05-15 21:41         ` Rob Herring
  -1 siblings, 0 replies; 42+ messages in thread
From: Rob Herring @ 2017-05-15 21:41 UTC (permalink / raw)
  To: Romain Perier
  Cc: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
	alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw, Heiko Stuebner,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Ian Campbell, Pawel Moll,
	Mark Rutland, Kumar Gala,
	linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

On Fri, May 12, 2017 at 03:22:25PM +0200, Romain Perier wrote:
> This commit adds a compatible string for everest,es8323. This is an
> audio codec that is compatible with es8328 and can be found for example
> on the Firefly-RK3288 board.

If it is compatible with the es8328, then that should be a fallback and 
you don't need the driver change.

> 
> Signed-off-by: Romain Perier <romain.perier-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>
> ---
> 
> Changes in v3: None
> Changes in v2: None
> 
>  Documentation/devicetree/bindings/sound/es8328.txt | 5 ++++-
>  sound/soc/codecs/es8328-i2c.c                      | 2 ++
>  2 files changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/sound/es8328.txt b/Documentation/devicetree/bindings/sound/es8328.txt
> index 33fbf058c997..86b6d6e99732 100644
> --- a/Documentation/devicetree/bindings/sound/es8328.txt
> +++ b/Documentation/devicetree/bindings/sound/es8328.txt
> @@ -4,7 +4,10 @@ This device supports both I2C and SPI.
>  
>  Required properties:
>  
> -  - compatible  : Should be "everest,es8328" or "everest,es8388"
> +  - compatible  : Should be one of the following:
> +	- "everest,es8323"

So this would be '"everest,es8323", "everest,es8328"' instead.

> +	- "everest,es8328"
> +	- "everest,es8388"
>    - DVDD-supply : Regulator providing digital core supply voltage 1.8 - 3.6V
>    - AVDD-supply : Regulator providing analog supply voltage 3.3V
>    - PVDD-supply : Regulator providing digital IO supply voltage 1.8 - 3.6V
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH v3 1/3] SoC: es8328-i2c: Add compatible for ES8323
@ 2017-05-15 21:41         ` Rob Herring
  0 siblings, 0 replies; 42+ messages in thread
From: Rob Herring @ 2017-05-15 21:41 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, May 12, 2017 at 03:22:25PM +0200, Romain Perier wrote:
> This commit adds a compatible string for everest,es8323. This is an
> audio codec that is compatible with es8328 and can be found for example
> on the Firefly-RK3288 board.

If it is compatible with the es8328, then that should be a fallback and 
you don't need the driver change.

> 
> Signed-off-by: Romain Perier <romain.perier@collabora.com>
> ---
> 
> Changes in v3: None
> Changes in v2: None
> 
>  Documentation/devicetree/bindings/sound/es8328.txt | 5 ++++-
>  sound/soc/codecs/es8328-i2c.c                      | 2 ++
>  2 files changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/sound/es8328.txt b/Documentation/devicetree/bindings/sound/es8328.txt
> index 33fbf058c997..86b6d6e99732 100644
> --- a/Documentation/devicetree/bindings/sound/es8328.txt
> +++ b/Documentation/devicetree/bindings/sound/es8328.txt
> @@ -4,7 +4,10 @@ This device supports both I2C and SPI.
>  
>  Required properties:
>  
> -  - compatible  : Should be "everest,es8328" or "everest,es8388"
> +  - compatible  : Should be one of the following:
> +	- "everest,es8323"

So this would be '"everest,es8323", "everest,es8328"' instead.

> +	- "everest,es8328"
> +	- "everest,es8388"
>    - DVDD-supply : Regulator providing digital core supply voltage 1.8 - 3.6V
>    - AVDD-supply : Regulator providing analog supply voltage 3.3V
>    - PVDD-supply : Regulator providing digital IO supply voltage 1.8 - 3.6V

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

* Re: [PATCH v3 1/3] SoC: es8328-i2c: Add compatible for ES8323
  2017-05-15 21:41         ` Rob Herring
@ 2017-05-16 11:18           ` Mark Brown
  -1 siblings, 0 replies; 42+ messages in thread
From: Mark Brown @ 2017-05-16 11:18 UTC (permalink / raw)
  To: Rob Herring
  Cc: Romain Perier, Liam Girdwood, Jaroslav Kysela, Takashi Iwai,
	alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw, Heiko Stuebner,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Ian Campbell, Pawel Moll,
	Mark Rutland, Kumar Gala,
	linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

[-- Attachment #1: Type: text/plain, Size: 1162 bytes --]

On Mon, May 15, 2017 at 04:41:38PM -0500, Rob Herring wrote:
> On Fri, May 12, 2017 at 03:22:25PM +0200, Romain Perier wrote:
> > This commit adds a compatible string for everest,es8323. This is an
> > audio codec that is compatible with es8328 and can be found for example
> > on the Firefly-RK3288 board.

> If it is compatible with the es8328, then that should be a fallback and 
> you don't need the driver change.

While people don't strictly need the driver change it doesn't do any
harm either and encourages people to get the information into the DT
that it's a different chip.  Thinking about it it might be good to have
a way for something to validate if fallback compatibles are being listed
when they should - the drivers could provide the information fairly
easily I guess, or it could go into the binding docs once we have a
schema format.

Even if it doesn't currently make a difference to software I'd rather
get the information in there for mixed signal devices like audio CODECs
- it's not that unknown to find later that supposedly register identical
chips have some differences in the analog which we want to care about.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* [PATCH v3 1/3] SoC: es8328-i2c: Add compatible for ES8323
@ 2017-05-16 11:18           ` Mark Brown
  0 siblings, 0 replies; 42+ messages in thread
From: Mark Brown @ 2017-05-16 11:18 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, May 15, 2017 at 04:41:38PM -0500, Rob Herring wrote:
> On Fri, May 12, 2017 at 03:22:25PM +0200, Romain Perier wrote:
> > This commit adds a compatible string for everest,es8323. This is an
> > audio codec that is compatible with es8328 and can be found for example
> > on the Firefly-RK3288 board.

> If it is compatible with the es8328, then that should be a fallback and 
> you don't need the driver change.

While people don't strictly need the driver change it doesn't do any
harm either and encourages people to get the information into the DT
that it's a different chip.  Thinking about it it might be good to have
a way for something to validate if fallback compatibles are being listed
when they should - the drivers could provide the information fairly
easily I guess, or it could go into the binding docs once we have a
schema format.

Even if it doesn't currently make a difference to software I'd rather
get the information in there for mixed signal devices like audio CODECs
- it's not that unknown to find later that supposedly register identical
chips have some differences in the analog which we want to care about.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20170516/7d7d62b6/attachment.sig>

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

* Re: [PATCH v3 1/3] SoC: es8328-i2c: Add compatible for ES8323
  2017-05-16 11:18           ` Mark Brown
@ 2017-05-19  6:56             ` Romain Perier
  -1 siblings, 0 replies; 42+ messages in thread
From: Romain Perier @ 2017-05-19  6:56 UTC (permalink / raw)
  To: Mark Brown, Rob Herring
  Cc: Mark Rutland, devicetree, alsa-devel, Heiko Stuebner, Pawel Moll,
	Ian Campbell, Takashi Iwai, Liam Girdwood, linux-rockchip,
	Kumar Gala, linux-arm-kernel

Hello,


Le 16/05/2017 à 13:18, Mark Brown a écrit :
> On Mon, May 15, 2017 at 04:41:38PM -0500, Rob Herring wrote:
>> On Fri, May 12, 2017 at 03:22:25PM +0200, Romain Perier wrote:
>>> This commit adds a compatible string for everest,es8323. This is an
>>> audio codec that is compatible with es8328 and can be found for example
>>> on the Firefly-RK3288 board.
>> If it is compatible with the es8328, then that should be a fallback and 
>> you don't need the driver change.
> While people don't strictly need the driver change it doesn't do any
> harm either and encourages people to get the information into the DT
> that it's a different chip.  Thinking about it it might be good to have
> a way for something to validate if fallback compatibles are being listed
> when they should - the drivers could provide the information fairly
> easily I guess, or it could go into the binding docs once we have a
> schema format.
>
> Even if it doesn't currently make a difference to software I'd rather
> get the information in there for mixed signal devices like audio CODECs
> - it's not that unknown to find later that supposedly register identical
> chips have some differences in the analog which we want to care about.
So, what should I do for this patch, finally ? fallback or driver change ?

Thanks,
Romain

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

* [PATCH v3 1/3] SoC: es8328-i2c: Add compatible for ES8323
@ 2017-05-19  6:56             ` Romain Perier
  0 siblings, 0 replies; 42+ messages in thread
From: Romain Perier @ 2017-05-19  6:56 UTC (permalink / raw)
  To: linux-arm-kernel

Hello,


Le 16/05/2017 ? 13:18, Mark Brown a ?crit :
> On Mon, May 15, 2017 at 04:41:38PM -0500, Rob Herring wrote:
>> On Fri, May 12, 2017 at 03:22:25PM +0200, Romain Perier wrote:
>>> This commit adds a compatible string for everest,es8323. This is an
>>> audio codec that is compatible with es8328 and can be found for example
>>> on the Firefly-RK3288 board.
>> If it is compatible with the es8328, then that should be a fallback and 
>> you don't need the driver change.
> While people don't strictly need the driver change it doesn't do any
> harm either and encourages people to get the information into the DT
> that it's a different chip.  Thinking about it it might be good to have
> a way for something to validate if fallback compatibles are being listed
> when they should - the drivers could provide the information fairly
> easily I guess, or it could go into the binding docs once we have a
> schema format.
>
> Even if it doesn't currently make a difference to software I'd rather
> get the information in there for mixed signal devices like audio CODECs
> - it's not that unknown to find later that supposedly register identical
> chips have some differences in the analog which we want to care about.
So, what should I do for this patch, finally ? fallback or driver change ?

Thanks,
Romain

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

* Re: [PATCH v3 1/3] SoC: es8328-i2c: Add compatible for ES8323
  2017-05-19  6:56             ` Romain Perier
@ 2017-05-19  7:00               ` Romain Perier
  -1 siblings, 0 replies; 42+ messages in thread
From: Romain Perier @ 2017-05-19  7:00 UTC (permalink / raw)
  To: Mark Brown, Rob Herring
  Cc: Mark Rutland, devicetree, alsa-devel, Heiko Stuebner, Pawel Moll,
	Ian Campbell, Takashi Iwai, Liam Girdwood, linux-rockchip,
	Kumar Gala, linux-arm-kernel



Le 19/05/2017 à 08:56, Romain Perier a écrit :
> Hello,
>
>
> Le 16/05/2017 à 13:18, Mark Brown a écrit :
>> On Mon, May 15, 2017 at 04:41:38PM -0500, Rob Herring wrote:
>>> On Fri, May 12, 2017 at 03:22:25PM +0200, Romain Perier wrote:
>>>> This commit adds a compatible string for everest,es8323. This is an
>>>> audio codec that is compatible with es8328 and can be found for example
>>>> on the Firefly-RK3288 board.
>>> If it is compatible with the es8328, then that should be a fallback and 
>>> you don't need the driver change.
>> While people don't strictly need the driver change it doesn't do any
>> harm either and encourages people to get the information into the DT
>> that it's a different chip.  Thinking about it it might be good to have
>> a way for something to validate if fallback compatibles are being listed
>> when they should - the drivers could provide the information fairly
>> easily I guess, or it could go into the binding docs once we have a
>> schema format.
>>
>> Even if it doesn't currently make a difference to software I'd rather
>> get the information in there for mixed signal devices like audio CODECs
>> - it's not that unknown to find later that supposedly register identical
>> chips have some differences in the analog which we want to care about.
> So, what should I do for this patch, finally ? fallback or driver change ?
>
> Thanks,
> Romain

To be honest, the doc is not really clear about this, both codecs seem
compatible but I think that's preferable to have a driver change for
this, just in case (Suppose that we discover a difference later...)

Romain

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

* [PATCH v3 1/3] SoC: es8328-i2c: Add compatible for ES8323
@ 2017-05-19  7:00               ` Romain Perier
  0 siblings, 0 replies; 42+ messages in thread
From: Romain Perier @ 2017-05-19  7:00 UTC (permalink / raw)
  To: linux-arm-kernel



Le 19/05/2017 ? 08:56, Romain Perier a ?crit :
> Hello,
>
>
> Le 16/05/2017 ? 13:18, Mark Brown a ?crit :
>> On Mon, May 15, 2017 at 04:41:38PM -0500, Rob Herring wrote:
>>> On Fri, May 12, 2017 at 03:22:25PM +0200, Romain Perier wrote:
>>>> This commit adds a compatible string for everest,es8323. This is an
>>>> audio codec that is compatible with es8328 and can be found for example
>>>> on the Firefly-RK3288 board.
>>> If it is compatible with the es8328, then that should be a fallback and 
>>> you don't need the driver change.
>> While people don't strictly need the driver change it doesn't do any
>> harm either and encourages people to get the information into the DT
>> that it's a different chip.  Thinking about it it might be good to have
>> a way for something to validate if fallback compatibles are being listed
>> when they should - the drivers could provide the information fairly
>> easily I guess, or it could go into the binding docs once we have a
>> schema format.
>>
>> Even if it doesn't currently make a difference to software I'd rather
>> get the information in there for mixed signal devices like audio CODECs
>> - it's not that unknown to find later that supposedly register identical
>> chips have some differences in the analog which we want to care about.
> So, what should I do for this patch, finally ? fallback or driver change ?
>
> Thanks,
> Romain

To be honest, the doc is not really clear about this, both codecs seem
compatible but I think that's preferable to have a driver change for
this, just in case (Suppose that we discover a difference later...)

Romain

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

* Re: [PATCH v3 1/3] SoC: es8328-i2c: Add compatible for ES8323
  2017-05-19  6:56             ` Romain Perier
@ 2017-05-19 12:35                 ` Rob Herring
  -1 siblings, 0 replies; 42+ messages in thread
From: Rob Herring @ 2017-05-19 12:35 UTC (permalink / raw)
  To: Romain Perier
  Cc: Mark Brown, Liam Girdwood, Jaroslav Kysela, Takashi Iwai,
	Linux-ALSA, Heiko Stuebner,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Ian Campbell, Pawel Moll,
	Mark Rutland, Kumar Gala, open list:ARM/Rockchip SoC...

On Fri, May 19, 2017 at 1:56 AM, Romain Perier
<romain.perier-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org> wrote:
> Hello,
>
>
> Le 16/05/2017 à 13:18, Mark Brown a écrit :
>> On Mon, May 15, 2017 at 04:41:38PM -0500, Rob Herring wrote:
>>> On Fri, May 12, 2017 at 03:22:25PM +0200, Romain Perier wrote:
>>>> This commit adds a compatible string for everest,es8323. This is an
>>>> audio codec that is compatible with es8328 and can be found for example
>>>> on the Firefly-RK3288 board.
>>> If it is compatible with the es8328, then that should be a fallback and
>>> you don't need the driver change.
>> While people don't strictly need the driver change it doesn't do any
>> harm either and encourages people to get the information into the DT
>> that it's a different chip.  Thinking about it it might be good to have
>> a way for something to validate if fallback compatibles are being listed
>> when they should - the drivers could provide the information fairly
>> easily I guess, or it could go into the binding docs once we have a
>> schema format.
>>
>> Even if it doesn't currently make a difference to software I'd rather
>> get the information in there for mixed signal devices like audio CODECs
>> - it's not that unknown to find later that supposedly register identical
>> chips have some differences in the analog which we want to care about.
> So, what should I do for this patch, finally ? fallback or driver change ?

Well, you could do both. However, there's not much point if you do the
driver change. So:

Acked-by: Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH v3 1/3] SoC: es8328-i2c: Add compatible for ES8323
@ 2017-05-19 12:35                 ` Rob Herring
  0 siblings, 0 replies; 42+ messages in thread
From: Rob Herring @ 2017-05-19 12:35 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, May 19, 2017 at 1:56 AM, Romain Perier
<romain.perier@collabora.com> wrote:
> Hello,
>
>
> Le 16/05/2017 ? 13:18, Mark Brown a ?crit :
>> On Mon, May 15, 2017 at 04:41:38PM -0500, Rob Herring wrote:
>>> On Fri, May 12, 2017 at 03:22:25PM +0200, Romain Perier wrote:
>>>> This commit adds a compatible string for everest,es8323. This is an
>>>> audio codec that is compatible with es8328 and can be found for example
>>>> on the Firefly-RK3288 board.
>>> If it is compatible with the es8328, then that should be a fallback and
>>> you don't need the driver change.
>> While people don't strictly need the driver change it doesn't do any
>> harm either and encourages people to get the information into the DT
>> that it's a different chip.  Thinking about it it might be good to have
>> a way for something to validate if fallback compatibles are being listed
>> when they should - the drivers could provide the information fairly
>> easily I guess, or it could go into the binding docs once we have a
>> schema format.
>>
>> Even if it doesn't currently make a difference to software I'd rather
>> get the information in there for mixed signal devices like audio CODECs
>> - it's not that unknown to find later that supposedly register identical
>> chips have some differences in the analog which we want to care about.
> So, what should I do for this patch, finally ? fallback or driver change ?

Well, you could do both. However, there's not much point if you do the
driver change. So:

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

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

* Re: [PATCH v3 0/3] Add support for es8323 and hdmi audio to the firefly-rk3288
  2017-05-12 13:22     ` Romain Perier
@ 2017-06-26 14:00       ` Romain Perier
  -1 siblings, 0 replies; 42+ messages in thread
From: Romain Perier @ 2017-06-26 14:00 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
	alsa-devel, Heiko Stuebner
  Cc: Mark Rutland, devicetree, Pawel Moll, Ian Campbell,
	Romain Perier, linux-rockchip, Rob Herring, Kumar Gala,
	linux-arm-kernel

Hello,

ping,

no other feedbacks (for 2/3 and 3/3)?

Romain


Le 12/05/2017 à 15:22, Romain Perier a écrit :
> This set of patches enables support for the es8323 codecs on the
> firefly-rk3288. It adds the required DT definitions to link rockchip-i2s
> to the es8388 analog output. As the support for HDMI audio is also
> built-in in the corresponding ASoC machine driver, HDMI audio output is
> also enabled.
>
> Changes in v3:
>  - Synced DT with the one of the Rock2, the properties have been
>    lexically re-ordered in the right order, I have splitted the
>    headphone pinctrl in two: phone_ctl and hp_det
> Changes in v2:
>  - Adapted DT for the firefly-rk3288 to the ASoC machine driver
>    rk3288-hdmi-analog
>  - Added patch 02/03 to this series
>  - Re-wrote this cover letter
>
> Romain Perier (3):
>   SoC: es8328-i2c: Add compatible for ES8323
>   arm: dts: rockchip: Don't set otp-gpio pinctrl by default in
>     rk3288.dtsi
>   arm: dts: Add support for ES8323 to the Firefly-RK3288
>
>  Documentation/devicetree/bindings/sound/es8328.txt |  5 ++-
>  arch/arm/boot/dts/rk3288-evb.dtsi                  |  4 +++
>  arch/arm/boot/dts/rk3288-firefly.dtsi              | 38 ++++++++++++++++++++++
>  arch/arm/boot/dts/rk3288-veyron.dtsi               |  4 +++
>  arch/arm/boot/dts/rk3288.dtsi                      |  4 ---
>  sound/soc/codecs/es8328-i2c.c                      |  2 ++
>  6 files changed, 52 insertions(+), 5 deletions(-)
>

_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

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

* [PATCH v3 0/3] Add support for es8323 and hdmi audio to the firefly-rk3288
@ 2017-06-26 14:00       ` Romain Perier
  0 siblings, 0 replies; 42+ messages in thread
From: Romain Perier @ 2017-06-26 14:00 UTC (permalink / raw)
  To: linux-arm-kernel

Hello,

ping,

no other feedbacks (for 2/3 and 3/3)?

Romain


Le 12/05/2017 ? 15:22, Romain Perier a ?crit :
> This set of patches enables support for the es8323 codecs on the
> firefly-rk3288. It adds the required DT definitions to link rockchip-i2s
> to the es8388 analog output. As the support for HDMI audio is also
> built-in in the corresponding ASoC machine driver, HDMI audio output is
> also enabled.
>
> Changes in v3:
>  - Synced DT with the one of the Rock2, the properties have been
>    lexically re-ordered in the right order, I have splitted the
>    headphone pinctrl in two: phone_ctl and hp_det
> Changes in v2:
>  - Adapted DT for the firefly-rk3288 to the ASoC machine driver
>    rk3288-hdmi-analog
>  - Added patch 02/03 to this series
>  - Re-wrote this cover letter
>
> Romain Perier (3):
>   SoC: es8328-i2c: Add compatible for ES8323
>   arm: dts: rockchip: Don't set otp-gpio pinctrl by default in
>     rk3288.dtsi
>   arm: dts: Add support for ES8323 to the Firefly-RK3288
>
>  Documentation/devicetree/bindings/sound/es8328.txt |  5 ++-
>  arch/arm/boot/dts/rk3288-evb.dtsi                  |  4 +++
>  arch/arm/boot/dts/rk3288-firefly.dtsi              | 38 ++++++++++++++++++++++
>  arch/arm/boot/dts/rk3288-veyron.dtsi               |  4 +++
>  arch/arm/boot/dts/rk3288.dtsi                      |  4 ---
>  sound/soc/codecs/es8328-i2c.c                      |  2 ++
>  6 files changed, 52 insertions(+), 5 deletions(-)
>

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

* Re: [PATCH v3 0/3] Add support for es8323 and hdmi audio to the firefly-rk3288
  2017-06-26 14:00       ` Romain Perier
@ 2017-06-26 14:07         ` Mark Brown
  -1 siblings, 0 replies; 42+ messages in thread
From: Mark Brown @ 2017-06-26 14:07 UTC (permalink / raw)
  To: Romain Perier
  Cc: Mark Rutland, devicetree, alsa-devel, Heiko Stuebner, Pawel Moll,
	Ian Campbell, Romain Perier, Takashi Iwai, Liam Girdwood,
	linux-rockchip, Rob Herring, Kumar Gala, linux-arm-kernel


[-- Attachment #1.1: Type: text/plain, Size: 1094 bytes --]

On Mon, Jun 26, 2017 at 04:00:17PM +0200, Romain Perier wrote:
> Hello,
> 
> ping,
> 
> no other feedbacks (for 2/3 and 3/3)?

Please don't send content free pings and please allow a reasonable time
for review.  People get busy, go on holiday, attend conferences and so 
on so unless there is some reason for urgency (like critical bug fixes)
please allow at least a couple of weeks for review.  If there have been
review comments then people may be waiting for those to be addressed.

Sending content free pings adds to the mail volume (if they are seen at
all) which is often the problem and since they can't be reviewed
directly if something has gone wrong you'll have to resend the patches
anyway, though there are some other maintainers who like them - if in
doubt look at how patches for the subsystem are normally handled.

Please don't top post, reply in line with needed context.  This allows
readers to readily follow the flow of conversation and understand what
you are talking about and also helps ensure that everything in the
discussion is being addressed.

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



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

* [PATCH v3 0/3] Add support for es8323 and hdmi audio to the firefly-rk3288
@ 2017-06-26 14:07         ` Mark Brown
  0 siblings, 0 replies; 42+ messages in thread
From: Mark Brown @ 2017-06-26 14:07 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Jun 26, 2017 at 04:00:17PM +0200, Romain Perier wrote:
> Hello,
> 
> ping,
> 
> no other feedbacks (for 2/3 and 3/3)?

Please don't send content free pings and please allow a reasonable time
for review.  People get busy, go on holiday, attend conferences and so 
on so unless there is some reason for urgency (like critical bug fixes)
please allow at least a couple of weeks for review.  If there have been
review comments then people may be waiting for those to be addressed.

Sending content free pings adds to the mail volume (if they are seen at
all) which is often the problem and since they can't be reviewed
directly if something has gone wrong you'll have to resend the patches
anyway, though there are some other maintainers who like them - if in
doubt look at how patches for the subsystem are normally handled.

Please don't top post, reply in line with needed context.  This allows
readers to readily follow the flow of conversation and understand what
you are talking about and also helps ensure that everything in the
discussion is being addressed.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20170626/91dab9ed/attachment-0001.sig>

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

* Re: [PATCH v3 0/3] Add support for es8323 and hdmi audio to the firefly-rk3288
  2017-06-26 14:07         ` Mark Brown
@ 2017-06-26 14:19             ` Romain Perier
  -1 siblings, 0 replies; 42+ messages in thread
From: Romain Perier @ 2017-06-26 14:19 UTC (permalink / raw)
  To: Mark Brown
  Cc: Liam Girdwood, Jaroslav Kysela, Takashi Iwai,
	alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw, Heiko Stuebner,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Rob Herring, Ian Campbell,
	Pawel Moll, Mark Rutland, Kumar Gala,
	linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Romain Perier

I did not kill a kitten or a puppy, I have just sent a ping 2 weeks
later for v3. The v2 was sent on Jan 23 2017... so that's not what I
call a top post or a flood ^^

anyway,
Have a nice day,
Romain

Le 26/06/2017 à 16:07, Mark Brown a écrit :
> On Mon, Jun 26, 2017 at 04:00:17PM +0200, Romain Perier wrote:
>> Hello,
>>
>> ping,
>>
>> no other feedbacks (for 2/3 and 3/3)?
> Please don't send content free pings and please allow a reasonable time
> for review.  People get busy, go on holiday, attend conferences and so 
> on so unless there is some reason for urgency (like critical bug fixes)
> please allow at least a couple of weeks for review.  If there have been
> review comments then people may be waiting for those to be addressed.
>
> Sending content free pings adds to the mail volume (if they are seen at
> all) which is often the problem and since they can't be reviewed
> directly if something has gone wrong you'll have to resend the patches
> anyway, though there are some other maintainers who like them - if in
> doubt look at how patches for the subsystem are normally handled.
>
> Please don't top post, reply in line with needed context.  This allows
> readers to readily follow the flow of conversation and understand what
> you are talking about and also helps ensure that everything in the
> discussion is being addressed.

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH v3 0/3] Add support for es8323 and hdmi audio to the firefly-rk3288
@ 2017-06-26 14:19             ` Romain Perier
  0 siblings, 0 replies; 42+ messages in thread
From: Romain Perier @ 2017-06-26 14:19 UTC (permalink / raw)
  To: linux-arm-kernel

I did not kill a kitten or a puppy, I have just sent a ping 2 weeks
later for v3. The v2 was sent on Jan 23 2017... so that's not what I
call a top post or a flood ^^

anyway,
Have a nice day,
Romain

Le 26/06/2017 ? 16:07, Mark Brown a ?crit :
> On Mon, Jun 26, 2017 at 04:00:17PM +0200, Romain Perier wrote:
>> Hello,
>>
>> ping,
>>
>> no other feedbacks (for 2/3 and 3/3)?
> Please don't send content free pings and please allow a reasonable time
> for review.  People get busy, go on holiday, attend conferences and so 
> on so unless there is some reason for urgency (like critical bug fixes)
> please allow at least a couple of weeks for review.  If there have been
> review comments then people may be waiting for those to be addressed.
>
> Sending content free pings adds to the mail volume (if they are seen at
> all) which is often the problem and since they can't be reviewed
> directly if something has gone wrong you'll have to resend the patches
> anyway, though there are some other maintainers who like them - if in
> doubt look at how patches for the subsystem are normally handled.
>
> Please don't top post, reply in line with needed context.  This allows
> readers to readily follow the flow of conversation and understand what
> you are talking about and also helps ensure that everything in the
> discussion is being addressed.

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

* Re: [PATCH v3 0/3] Add support for es8323 and hdmi audio to the firefly-rk3288
  2017-06-26 14:19             ` Romain Perier
@ 2017-06-27 16:07               ` Mark Brown
  -1 siblings, 0 replies; 42+ messages in thread
From: Mark Brown @ 2017-06-27 16:07 UTC (permalink / raw)
  To: Romain Perier
  Cc: Mark Rutland, devicetree, alsa-devel, Heiko Stuebner, Pawel Moll,
	Ian Campbell, Romain Perier, Takashi Iwai, Liam Girdwood,
	linux-rockchip, Rob Herring, Kumar Gala, linux-arm-kernel


[-- Attachment #1.1: Type: text/plain, Size: 672 bytes --]

On Mon, Jun 26, 2017 at 04:19:59PM +0200, Romain Perier wrote:
> I did not kill a kitten or a puppy, I have just sent a ping 2 weeks
> later for v3. The v2 was sent on Jan 23 2017... so that's not what I
> call a top post or a flood ^^
> 
> anyway,
> Have a nice day,
> Romain
> 
> Le 26/06/2017 à 16:07, Mark Brown a écrit :

You're top posting *again* in reply to a mail asking you not to do that
and explaining why.  The mail I sent also explained why I can't really
do anything with your content free ping and what you should do instead.  
The text I send for these things is fairly long as it's trying to be
clear about what needs to be done and why.

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



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

* [PATCH v3 0/3] Add support for es8323 and hdmi audio to the firefly-rk3288
@ 2017-06-27 16:07               ` Mark Brown
  0 siblings, 0 replies; 42+ messages in thread
From: Mark Brown @ 2017-06-27 16:07 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Jun 26, 2017 at 04:19:59PM +0200, Romain Perier wrote:
> I did not kill a kitten or a puppy, I have just sent a ping 2 weeks
> later for v3. The v2 was sent on Jan 23 2017... so that's not what I
> call a top post or a flood ^^
> 
> anyway,
> Have a nice day,
> Romain
> 
> Le 26/06/2017 ? 16:07, Mark Brown a ?crit :

You're top posting *again* in reply to a mail asking you not to do that
and explaining why.  The mail I sent also explained why I can't really
do anything with your content free ping and what you should do instead.  
The text I send for these things is fairly long as it's trying to be
clear about what needs to be done and why.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20170627/3c78afb5/attachment.sig>

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

end of thread, other threads:[~2017-06-27 16:07 UTC | newest]

Thread overview: 42+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-12 13:22 [PATCH v3 0/3] Add support for es8323 and hdmi audio to the firefly-rk3288 Romain Perier
2017-05-12 13:22 ` Romain Perier
     [not found] ` <20170512132227.24916-1-romain.perier-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>
2017-05-12 13:22   ` [PATCH v3 1/3] SoC: es8328-i2c: Add compatible for ES8323 Romain Perier
2017-05-12 13:22     ` Romain Perier
2017-05-12 13:22   ` [PATCH v3 2/3] arm: dts: rockchip: Don't set otp-gpio pinctrl by default in rk3288.dtsi Romain Perier
2017-05-12 13:22     ` Romain Perier
2017-05-12 13:22   ` [PATCH v3 3/3] arm: dts: Add support for ES8323 to the Firefly-RK3288 Romain Perier
2017-05-12 13:22     ` Romain Perier
2017-05-12 13:22   ` [PATCH v3 0/3] Add support for es8323 and hdmi audio to the firefly-rk3288 Romain Perier
2017-05-12 13:22     ` Romain Perier
2017-05-12 13:22   ` [PATCH v3 1/3] SoC: es8328-i2c: Add compatible for ES8323 Romain Perier
2017-05-12 13:22     ` Romain Perier
2017-05-12 13:22   ` [PATCH v3 2/3] arm: dts: rockchip: Don't set otp-gpio pinctrl by default in rk3288.dtsi Romain Perier
2017-05-12 13:22     ` Romain Perier
2017-05-12 13:22   ` [PATCH v3 3/3] arm: dts: Add support for ES8323 to the Firefly-RK3288 Romain Perier
2017-05-12 13:22     ` Romain Perier
2017-05-12 13:22   ` [PATCH v3 0/3] Add support for es8323 and hdmi audio to the firefly-rk3288 Romain Perier
2017-05-12 13:22     ` Romain Perier
2017-06-26 14:00     ` Romain Perier
2017-06-26 14:00       ` Romain Perier
2017-06-26 14:07       ` Mark Brown
2017-06-26 14:07         ` Mark Brown
     [not found]         ` <20170626140740.jlgtwaaivn3bvg2g-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2017-06-26 14:19           ` Romain Perier
2017-06-26 14:19             ` Romain Perier
2017-06-27 16:07             ` Mark Brown
2017-06-27 16:07               ` Mark Brown
2017-05-12 13:22   ` [PATCH v3 1/3] SoC: es8328-i2c: Add compatible for ES8323 Romain Perier
2017-05-12 13:22     ` Romain Perier
     [not found]     ` <20170512132227.24916-10-romain.perier-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>
2017-05-15 21:41       ` Rob Herring
2017-05-15 21:41         ` Rob Herring
2017-05-16 11:18         ` Mark Brown
2017-05-16 11:18           ` Mark Brown
2017-05-19  6:56           ` Romain Perier
2017-05-19  6:56             ` Romain Perier
2017-05-19  7:00             ` Romain Perier
2017-05-19  7:00               ` Romain Perier
     [not found]             ` <a052da20-d9c7-69f5-21d9-9111d45702e6-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>
2017-05-19 12:35               ` Rob Herring
2017-05-19 12:35                 ` Rob Herring
2017-05-12 13:22   ` [PATCH v3 2/3] arm: dts: rockchip: Don't set otp-gpio pinctrl by default in rk3288.dtsi Romain Perier
2017-05-12 13:22     ` Romain Perier
2017-05-12 13:22   ` [PATCH v3 3/3] arm: dts: Add support for ES8323 to the Firefly-RK3288 Romain Perier
2017-05-12 13:22     ` Romain Perier

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.