Hi
The patchset tries to remove most of the dtschema warnings. Due to lack
of hardware it was not tested.
Best regards,
Krzysztof
Krzysztof Kozlowski (25):
dt-bindings: samsung: pmu: document S5Pv210
dt-bindings: iio: adc: exynos-adc: require second interrupt with touch
screen
dt-bindings: iio: adc: exynos-adc: do not require syscon on S5Pv210
ARM: dts: s5pv210: fix pinctrl property of "vibrator-en" regulator in
Aries
ARM: dts: s5pv210: remove DMA controller bus node name to fix dtschema
warnings
ARM: dts: s5pv210: move fixed clocks under root node
ARM: dts: s5pv210: move PMU node out of clock controller
ARM: dts: s5pv210: remove dedicated 'audio-subsystem' node
ARM: dts: s5pv210: fix number of I2S DAI cells
ARM: dts: s5pv210: add RTC 32 KHz clock in Aquilla
ARM: dts: s5pv210: add RTC 32 KHz clock in Aries family
ARM: dts: s5pv210: add RTC 32 KHz clock in Goni
ARM: dts: s5pv210: add RTC 32 KHz clock in SMDKC110
ARM: dts: s5pv210: add RTC 32 KHz clock in SMDKV210
ARM: dts: s5pv210: add RTC 32 KHz clock in Torbreck
ARM: dts: s5pv210: use defines for GPIO flags in Aquila
ARM: dts: s5pv210: use defines for GPIO flags in Goni
ARM: dts: s5pv210: use defines for IRQ flags in SMDKV210
ARM: dts: s5pv210: use defines for IRQ flags in Goni
ARM: dts: s5pv210: move fixed regulators under root node in Aquila
ARM: dts: s5pv210: move fixed regulators under root node in Goni
ARM: dts: s5pv210: replace deprecated "gpios" i2c-gpio property in
Aquila
ARM: dts: s5pv210: replace deprecated "gpios" i2c-gpio property in
Goni
ARM: dts: s5pv210: align SPI GPIO node name with dtschema in Aries
ARM: dts: s5pv210: align DMA channels with dtschema
.../devicetree/bindings/arm/samsung/pmu.yaml | 2 +
.../bindings/iio/adc/samsung,exynos-adc.yaml | 16 +-
arch/arm/boot/dts/s5pv210-aquila.dts | 73 ++++----
arch/arm/boot/dts/s5pv210-aries.dtsi | 16 +-
arch/arm/boot/dts/s5pv210-fascinate4g.dts | 2 +-
arch/arm/boot/dts/s5pv210-galaxys.dts | 2 +-
arch/arm/boot/dts/s5pv210-goni.dts | 97 +++++-----
arch/arm/boot/dts/s5pv210-smdkc110.dts | 9 +
arch/arm/boot/dts/s5pv210-smdkv210.dts | 12 +-
arch/arm/boot/dts/s5pv210-torbreck.dts | 9 +
arch/arm/boot/dts/s5pv210.dtsi | 175 ++++++++----------
11 files changed, 230 insertions(+), 183 deletions(-)
--
2.17.1
"gpios" property is deprecated. Update the Goni DTS to fix
dtbs_checks warnings like:
i2c-pmic: 'sda-gpios' is a required property
i2c-pmic: 'scl-gpios' is a required property
Signed-off-by: Krzysztof Kozlowski <[email protected]>
---
arch/arm/boot/dts/s5pv210-goni.dts | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/boot/dts/s5pv210-goni.dts b/arch/arm/boot/dts/s5pv210-goni.dts
index eec6531e6ef8..ad8d5d2fa32d 100644
--- a/arch/arm/boot/dts/s5pv210-goni.dts
+++ b/arch/arm/boot/dts/s5pv210-goni.dts
@@ -76,8 +76,8 @@
i2c_pmic: i2c-pmic {
compatible = "i2c-gpio";
- gpios = <&gpj4 0 GPIO_ACTIVE_HIGH>, /* sda */
- <&gpj4 3 GPIO_ACTIVE_HIGH>; /* scl */
+ sda-gpios = <&gpj4 0 GPIO_ACTIVE_HIGH>;
+ scl-gpios = <&gpj4 3 GPIO_ACTIVE_HIGH>;
i2c-gpio,delay-us = <2>; /* ~100 kHz */
#address-cells = <1>;
#size-cells = <0>;
--
2.17.1
dtschema expects DMA channels in specific order (tx, rx and tx-sec).
The order actually should not matter because dma-names is used however
let's make it aligned with dtschema to suppress warnings like:
i2s@eee30000: dma-names: ['rx', 'tx', 'tx-sec'] is not valid under any of the given schemas
Signed-off-by: Krzysztof Kozlowski <[email protected]>
---
arch/arm/boot/dts/s5pv210.dtsi | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/arch/arm/boot/dts/s5pv210.dtsi b/arch/arm/boot/dts/s5pv210.dtsi
index 96e667ba1c3f..72fb9d9f7ba3 100644
--- a/arch/arm/boot/dts/s5pv210.dtsi
+++ b/arch/arm/boot/dts/s5pv210.dtsi
@@ -240,8 +240,8 @@
reg = <0xeee30000 0x1000>;
interrupt-parent = <&vic2>;
interrupts = <16>;
- dma-names = "rx", "tx", "tx-sec";
- dmas = <&pdma1 9>, <&pdma1 10>, <&pdma1 11>;
+ dma-names = "tx", "rx", "tx-sec";
+ dmas = <&pdma1 10>, <&pdma1 9>, <&pdma1 11>;
clock-names = "iis",
"i2s_opclk0",
"i2s_opclk1";
@@ -260,8 +260,8 @@
reg = <0xe2100000 0x1000>;
interrupt-parent = <&vic2>;
interrupts = <17>;
- dma-names = "rx", "tx";
- dmas = <&pdma1 12>, <&pdma1 13>;
+ dma-names = "tx", "rx";
+ dmas = <&pdma1 13>, <&pdma1 12>;
clock-names = "iis", "i2s_opclk0";
clocks = <&clocks CLK_I2S1>, <&clocks SCLK_AUDIO1>;
pinctrl-names = "default";
@@ -275,8 +275,8 @@
reg = <0xe2a00000 0x1000>;
interrupt-parent = <&vic2>;
interrupts = <18>;
- dma-names = "rx", "tx";
- dmas = <&pdma1 14>, <&pdma1 15>;
+ dma-names = "tx", "rx";
+ dmas = <&pdma1 15>, <&pdma1 14>;
clock-names = "iis", "i2s_opclk0";
clocks = <&clocks CLK_I2S2>, <&clocks SCLK_AUDIO2>;
pinctrl-names = "default";
--
2.17.1
The device tree schema expects SPI controller to be named "spi",
otherwise dtbs_check complain with a warning like:
spi-gpio-0: $nodename:0: 'spi-gpio-0' does not match '^spi(@.*|-[0-9a-f])*$'
Signed-off-by: Krzysztof Kozlowski <[email protected]>
---
arch/arm/boot/dts/s5pv210-aries.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/boot/dts/s5pv210-aries.dtsi b/arch/arm/boot/dts/s5pv210-aries.dtsi
index 86c3b26fd21e..bd4450dbdcb6 100644
--- a/arch/arm/boot/dts/s5pv210-aries.dtsi
+++ b/arch/arm/boot/dts/s5pv210-aries.dtsi
@@ -545,7 +545,7 @@
value = <0x5200>;
};
- spi_lcd: spi-gpio-0 {
+ spi_lcd: spi-2 {
compatible = "spi-gpio";
#address-cells = <1>;
#size-cells = <0>;
--
2.17.1
Replace hard-coded flags with defines for readability. No functional
change.
Signed-off-by: Krzysztof Kozlowski <[email protected]>
---
arch/arm/boot/dts/s5pv210-goni.dts | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/arm/boot/dts/s5pv210-goni.dts b/arch/arm/boot/dts/s5pv210-goni.dts
index 77d1c5144afd..20f1c2773805 100644
--- a/arch/arm/boot/dts/s5pv210-goni.dts
+++ b/arch/arm/boot/dts/s5pv210-goni.dts
@@ -12,6 +12,7 @@
/dts-v1/;
#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/input/input.h>
#include "s5pv210.dtsi"
@@ -366,7 +367,7 @@
compatible = "atmel,maxtouch";
reg = <0x4a>;
interrupt-parent = <&gpj0>;
- interrupts = <5 2>;
+ interrupts = <5 IRQ_TYPE_EDGE_FALLING>;
atmel,x-line = <17>;
atmel,y-line = <11>;
--
2.17.1
Replace hard-coded flags with defines for readability. No functional
change.
Signed-off-by: Krzysztof Kozlowski <[email protected]>
---
arch/arm/boot/dts/s5pv210-smdkv210.dts | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/arm/boot/dts/s5pv210-smdkv210.dts b/arch/arm/boot/dts/s5pv210-smdkv210.dts
index 1f20622da719..1e1570d66d89 100644
--- a/arch/arm/boot/dts/s5pv210-smdkv210.dts
+++ b/arch/arm/boot/dts/s5pv210-smdkv210.dts
@@ -15,6 +15,7 @@
*/
/dts-v1/;
+#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/input/input.h>
#include "s5pv210.dtsi"
@@ -42,7 +43,7 @@
compatible = "davicom,dm9000";
reg = <0xA8000000 0x2 0xA8000002 0x2>;
interrupt-parent = <&gph1>;
- interrupts = <1 4>;
+ interrupts = <1 IRQ_TYPE_LEVEL_HIGH>;
local-mac-address = [00 00 de ad be ef];
davicom,no-eeprom;
};
--
2.17.1
"gpios" property is deprecated. Update the Aquila DTS to fix
dtbs_checks warnings like:
i2c-pmic: 'sda-gpios' is a required property
i2c-pmic: 'scl-gpios' is a required property
Signed-off-by: Krzysztof Kozlowski <[email protected]>
---
arch/arm/boot/dts/s5pv210-aquila.dts | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/boot/dts/s5pv210-aquila.dts b/arch/arm/boot/dts/s5pv210-aquila.dts
index 28e9e81bb2d1..8e57e5a1f0c5 100644
--- a/arch/arm/boot/dts/s5pv210-aquila.dts
+++ b/arch/arm/boot/dts/s5pv210-aquila.dts
@@ -65,8 +65,8 @@
i2c_pmic: i2c-pmic {
compatible = "i2c-gpio";
- gpios = <&gpj4 0 GPIO_ACTIVE_HIGH>, /* sda */
- <&gpj4 3 GPIO_ACTIVE_HIGH>; /* scl */
+ sda-gpios = <&gpj4 0 GPIO_ACTIVE_HIGH>;
+ scl-gpios = <&gpj4 3 GPIO_ACTIVE_HIGH>;
i2c-gpio,delay-us = <2>; /* ~100 kHz */
#address-cells = <1>;
#size-cells = <0>;
--
2.17.1
The S3C RTC requires 32768 Hz clock as input which is provided by PMIC.
However the PMIC is not described in DTS at all so at least add
a workaround to model its clock with a fixed-clock.
This fixes dtbs_check warnings:
rtc@e2800000: clocks: [[2, 145]] is too short
rtc@e2800000: clock-names: ['rtc'] is too short
Signed-off-by: Krzysztof Kozlowski <[email protected]>
---
arch/arm/boot/dts/s5pv210-smdkv210.dts | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/arch/arm/boot/dts/s5pv210-smdkv210.dts b/arch/arm/boot/dts/s5pv210-smdkv210.dts
index 84b38f185199..1f20622da719 100644
--- a/arch/arm/boot/dts/s5pv210-smdkv210.dts
+++ b/arch/arm/boot/dts/s5pv210-smdkv210.dts
@@ -31,6 +31,13 @@
reg = <0x20000000 0x40000000>;
};
+ pmic_ap_clk: clock-0 {
+ /* Workaround for missing PMIC and its clock */
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ clock-frequency = <32768>;
+ };
+
ethernet@18000000 {
compatible = "davicom,dm9000";
reg = <0xA8000000 0x2 0xA8000002 0x2>;
@@ -147,6 +154,8 @@
&rtc {
status = "okay";
+ clocks = <&clocks CLK_RTC>, <&pmic_ap_clk>;
+ clock-names = "rtc", "rtc_src";
};
&sdhci0 {
--
2.17.1
The fixed regulators are kept under dedicated "regulators" node but this
causes multiple dtschema warnings:
regulators: $nodename:0: 'regulators' does not match '^([a-z][a-z0-9\\-]+-bus|bus|soc|axi|ahb|apb)(@[0-9a-f]+)?$'
regulators: #size-cells:0:0: 0 is not one of [1, 2]
regulators: fixed-regulator@0:reg:0: [0] is too short
regulators: fixed-regulator@1:reg:0: [1] is too short
regulators: fixed-regulator@2:reg:0: [2] is too short
regulators: fixed-regulator@3:reg:0: [3] is too short
Signed-off-by: Krzysztof Kozlowski <[email protected]>
---
arch/arm/boot/dts/s5pv210-goni.dts | 64 +++++++++++++-----------------
1 file changed, 27 insertions(+), 37 deletions(-)
diff --git a/arch/arm/boot/dts/s5pv210-goni.dts b/arch/arm/boot/dts/s5pv210-goni.dts
index 20f1c2773805..eec6531e6ef8 100644
--- a/arch/arm/boot/dts/s5pv210-goni.dts
+++ b/arch/arm/boot/dts/s5pv210-goni.dts
@@ -42,46 +42,36 @@
clock-frequency = <32768>;
};
- regulators {
- compatible = "simple-bus";
- #address-cells = <1>;
- #size-cells = <0>;
-
- vtf_reg: fixed-regulator@0 {
- compatible = "regulator-fixed";
- regulator-name = "V_TF_2.8V";
- regulator-min-microvolt = <2800000>;
- regulator-max-microvolt = <2800000>;
- reg = <0>;
- gpio = <&mp05 4 GPIO_ACTIVE_HIGH>;
- enable-active-high;
- };
+ vtf_reg: regulator-0 {
+ compatible = "regulator-fixed";
+ regulator-name = "V_TF_2.8V";
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <2800000>;
+ gpio = <&mp05 4 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ };
- pda_reg: fixed-regulator@1 {
- compatible = "regulator-fixed";
- regulator-name = "VCC_1.8V_PDA";
- regulator-min-microvolt = <1800000>;
- regulator-max-microvolt = <1800000>;
- reg = <1>;
- };
+ pda_reg: regulator-1 {
+ compatible = "regulator-fixed";
+ regulator-name = "VCC_1.8V_PDA";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ };
- bat_reg: fixed-regulator@2 {
- compatible = "regulator-fixed";
- regulator-name = "V_BAT";
- regulator-min-microvolt = <3700000>;
- regulator-max-microvolt = <3700000>;
- reg = <2>;
- };
+ bat_reg: regulator-2 {
+ compatible = "regulator-fixed";
+ regulator-name = "V_BAT";
+ regulator-min-microvolt = <3700000>;
+ regulator-max-microvolt = <3700000>;
+ };
- tsp_reg: fixed-regulator@3 {
- compatible = "regulator-fixed";
- regulator-name = "TSP_VDD";
- regulator-min-microvolt = <2800000>;
- regulator-max-microvolt = <2800000>;
- reg = <3>;
- gpio = <&gpj1 3 GPIO_ACTIVE_HIGH>;
- enable-active-high;
- };
+ tsp_reg: regulator-3 {
+ compatible = "regulator-fixed";
+ regulator-name = "TSP_VDD";
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <2800000>;
+ gpio = <&gpj1 3 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
};
i2c_pmic: i2c-pmic {
--
2.17.1
The fixed regulators are kept under dedicated "regulators" node but this
causes multiple dtschema warnings:
regulators: $nodename:0: 'regulators' does not match '^([a-z][a-z0-9\\-]+-bus|bus|soc|axi|ahb|apb)(@[0-9a-f]+)?$'
regulators: #size-cells:0:0: 0 is not one of [1, 2]
regulators: fixed-regulator@0:reg:0: [0] is too short
regulators: fixed-regulator@1:reg:0: [1] is too short
regulators: fixed-regulator@2:reg:0: [2] is too short
Signed-off-by: Krzysztof Kozlowski <[email protected]>
---
arch/arm/boot/dts/s5pv210-aquila.dts | 47 +++++++++++-----------------
1 file changed, 19 insertions(+), 28 deletions(-)
diff --git a/arch/arm/boot/dts/s5pv210-aquila.dts b/arch/arm/boot/dts/s5pv210-aquila.dts
index 25d4ab4a52c5..28e9e81bb2d1 100644
--- a/arch/arm/boot/dts/s5pv210-aquila.dts
+++ b/arch/arm/boot/dts/s5pv210-aquila.dts
@@ -40,36 +40,27 @@
clock-frequency = <32768>;
};
- regulators {
- compatible = "simple-bus";
- #address-cells = <1>;
- #size-cells = <0>;
-
- vtf_reg: fixed-regulator@0 {
- compatible = "regulator-fixed";
- reg = <0>;
- regulator-name = "V_TF_2.8V";
- regulator-min-microvolt = <2800000>;
- regulator-max-microvolt = <2800000>;
- gpio = <&mp05 4 GPIO_ACTIVE_HIGH>;
- enable-active-high;
- };
+ vtf_reg: regulator-0 {
+ compatible = "regulator-fixed";
+ regulator-name = "V_TF_2.8V";
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <2800000>;
+ gpio = <&mp05 4 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ };
- pda_reg: fixed-regulator@1 {
- compatible = "regulator-fixed";
- regulator-name = "VCC_1.8V_PDA";
- regulator-min-microvolt = <1800000>;
- regulator-max-microvolt = <1800000>;
- reg = <1>;
- };
+ pda_reg: regulator-1 {
+ compatible = "regulator-fixed";
+ regulator-name = "VCC_1.8V_PDA";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ };
- bat_reg: fixed-regulator@2 {
- compatible = "regulator-fixed";
- regulator-name = "V_BAT";
- regulator-min-microvolt = <3700000>;
- regulator-max-microvolt = <3700000>;
- reg = <2>;
- };
+ bat_reg: regulator-2 {
+ compatible = "regulator-fixed";
+ regulator-name = "V_BAT";
+ regulator-min-microvolt = <3700000>;
+ regulator-max-microvolt = <3700000>;
};
i2c_pmic: i2c-pmic {
--
2.17.1
The S3C RTC requires 32768 Hz clock as input which is provided by PMIC.
However the PMIC is not described in DTS at all so at least add
a workaround to model its clock with a fixed-clock.
This fixes dtbs_check warnings:
rtc@e2800000: clocks: [[2, 145]] is too short
rtc@e2800000: clock-names: ['rtc'] is too short
Signed-off-by: Krzysztof Kozlowski <[email protected]>
---
arch/arm/boot/dts/s5pv210-torbreck.dts | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/arch/arm/boot/dts/s5pv210-torbreck.dts b/arch/arm/boot/dts/s5pv210-torbreck.dts
index cd25e72ccd84..e18259737684 100644
--- a/arch/arm/boot/dts/s5pv210-torbreck.dts
+++ b/arch/arm/boot/dts/s5pv210-torbreck.dts
@@ -30,6 +30,13 @@
device_type = "memory";
reg = <0x20000000 0x20000000>;
};
+
+ pmic_ap_clk: clock-0 {
+ /* Workaround for missing PMIC and its clock */
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ clock-frequency = <32768>;
+ };
};
&xusbxti {
@@ -54,6 +61,8 @@
&rtc {
status = "okay";
+ clocks = <&clocks CLK_RTC>, <&pmic_ap_clk>;
+ clock-names = "rtc", "rtc_src";
};
&sdhci0 {
--
2.17.1
Replace hard-coded flags with defines for readability. No functional
change.
Signed-off-by: Krzysztof Kozlowski <[email protected]>
---
arch/arm/boot/dts/s5pv210-aquila.dts | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/arch/arm/boot/dts/s5pv210-aquila.dts b/arch/arm/boot/dts/s5pv210-aquila.dts
index eaeb0e921aaa..25d4ab4a52c5 100644
--- a/arch/arm/boot/dts/s5pv210-aquila.dts
+++ b/arch/arm/boot/dts/s5pv210-aquila.dts
@@ -11,6 +11,7 @@
*/
/dts-v1/;
+#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include "s5pv210.dtsi"
@@ -50,7 +51,7 @@
regulator-name = "V_TF_2.8V";
regulator-min-microvolt = <2800000>;
regulator-max-microvolt = <2800000>;
- gpio = <&mp05 4 0>;
+ gpio = <&mp05 4 GPIO_ACTIVE_HIGH>;
enable-active-high;
};
@@ -73,8 +74,8 @@
i2c_pmic: i2c-pmic {
compatible = "i2c-gpio";
- gpios = <&gpj4 0 0>, /* sda */
- <&gpj4 3 0>; /* scl */
+ gpios = <&gpj4 0 GPIO_ACTIVE_HIGH>, /* sda */
+ <&gpj4 3 GPIO_ACTIVE_HIGH>; /* scl */
i2c-gpio,delay-us = <2>; /* ~100 kHz */
#address-cells = <1>;
#size-cells = <0>;
@@ -84,13 +85,13 @@
reg = <0x66>;
max8998,pmic-buck1-default-dvs-idx = <0>;
- max8998,pmic-buck1-dvs-gpios = <&gph0 3 0>,
- <&gph0 4 0>;
+ max8998,pmic-buck1-dvs-gpios = <&gph0 3 GPIO_ACTIVE_HIGH>,
+ <&gph0 4 GPIO_ACTIVE_HIGH>;
max8998,pmic-buck1-dvs-voltage = <1200000>, <1200000>,
<1200000>, <1200000>;
max8998,pmic-buck2-default-dvs-idx = <0>;
- max8998,pmic-buck2-dvs-gpio = <&gph0 5 0>;
+ max8998,pmic-buck2-dvs-gpio = <&gph0 5 GPIO_ACTIVE_HIGH>;
max8998,pmic-buck2-dvs-voltage = <1200000>, <1200000>;
regulators {
--
2.17.1
Replace hard-coded flags with defines for readability. No functional
change.
Signed-off-by: Krzysztof Kozlowski <[email protected]>
---
arch/arm/boot/dts/s5pv210-goni.dts | 19 ++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)
diff --git a/arch/arm/boot/dts/s5pv210-goni.dts b/arch/arm/boot/dts/s5pv210-goni.dts
index c8714bf0b6e4..77d1c5144afd 100644
--- a/arch/arm/boot/dts/s5pv210-goni.dts
+++ b/arch/arm/boot/dts/s5pv210-goni.dts
@@ -11,6 +11,7 @@
*/
/dts-v1/;
+#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include "s5pv210.dtsi"
@@ -51,7 +52,7 @@
regulator-min-microvolt = <2800000>;
regulator-max-microvolt = <2800000>;
reg = <0>;
- gpio = <&mp05 4 0>;
+ gpio = <&mp05 4 GPIO_ACTIVE_HIGH>;
enable-active-high;
};
@@ -77,15 +78,15 @@
regulator-min-microvolt = <2800000>;
regulator-max-microvolt = <2800000>;
reg = <3>;
- gpio = <&gpj1 3 0>;
+ gpio = <&gpj1 3 GPIO_ACTIVE_HIGH>;
enable-active-high;
};
};
i2c_pmic: i2c-pmic {
compatible = "i2c-gpio";
- gpios = <&gpj4 0 0>, /* sda */
- <&gpj4 3 0>; /* scl */
+ gpios = <&gpj4 0 GPIO_ACTIVE_HIGH>, /* sda */
+ <&gpj4 3 GPIO_ACTIVE_HIGH>; /* scl */
i2c-gpio,delay-us = <2>; /* ~100 kHz */
#address-cells = <1>;
#size-cells = <0>;
@@ -95,13 +96,13 @@
reg = <0x66>;
max8998,pmic-buck1-default-dvs-idx = <0>;
- max8998,pmic-buck1-dvs-gpios = <&gph0 3 0>,
- <&gph0 4 0>;
+ max8998,pmic-buck1-dvs-gpios = <&gph0 3 GPIO_ACTIVE_HIGH>,
+ <&gph0 4 GPIO_ACTIVE_HIGH>;
max8998,pmic-buck1-dvs-voltage = <1200000>, <1200000>,
<1200000>, <1200000>;
max8998,pmic-buck2-default-dvs-idx = <0>;
- max8998,pmic-buck2-dvs-gpio = <&gph0 5 0>;
+ max8998,pmic-buck2-dvs-gpio = <&gph0 5 GPIO_ACTIVE_HIGH>;
max8998,pmic-buck2-dvs-voltage = <1200000>, <1200000>;
regulators {
@@ -395,8 +396,8 @@
clock-frequency = <16000000>;
clocks = <&camera 0>;
clock-names = "mclk";
- nreset-gpios = <&gpb 2 0>;
- nstby-gpios = <&gpb 0 0>;
+ nreset-gpios = <&gpb 2 GPIO_ACTIVE_HIGH>;
+ nstby-gpios = <&gpb 0 GPIO_ACTIVE_HIGH>;
port {
noon010pc30_ep: endpoint {
--
2.17.1
The S3C RTC requires 32768 Hz clock as input which is provided by PMIC.
However the PMIC is not described in DTS at all so at least add
a workaround to model its clock with a fixed-clock.
This fixes dtbs_check warnings:
rtc@e2800000: clocks: [[2, 145]] is too short
rtc@e2800000: clock-names: ['rtc'] is too short
Signed-off-by: Krzysztof Kozlowski <[email protected]>
---
arch/arm/boot/dts/s5pv210-smdkc110.dts | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/arch/arm/boot/dts/s5pv210-smdkc110.dts b/arch/arm/boot/dts/s5pv210-smdkc110.dts
index e5aec6c526fb..0c623b78af72 100644
--- a/arch/arm/boot/dts/s5pv210-smdkc110.dts
+++ b/arch/arm/boot/dts/s5pv210-smdkc110.dts
@@ -30,6 +30,13 @@
device_type = "memory";
reg = <0x20000000 0x20000000>;
};
+
+ pmic_ap_clk: clock-0 {
+ /* Workaround for missing PMIC and its clock */
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ clock-frequency = <32768>;
+ };
};
&xusbxti {
@@ -54,6 +61,8 @@
&rtc {
status = "okay";
+ clocks = <&clocks CLK_RTC>, <&pmic_ap_clk>;
+ clock-names = "rtc", "rtc_src";
};
&i2c0 {
--
2.17.1
The S3C RTC requires 32768 Hz clock as input which is provided by PMIC.
However there is no such clock provider but rather a regulator driver
which registers the clock as a regulator. This is an old driver which
will not be updated so add a workaround - a fixed-clock to fill missing
clock phandle reference in S3C RTC.
This fixes dtbs_check warnings:
rtc@e2800000: clocks: [[2, 145]] is too short
rtc@e2800000: clock-names: ['rtc'] is too short
Signed-off-by: Krzysztof Kozlowski <[email protected]>
---
arch/arm/boot/dts/s5pv210-goni.dts | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/arch/arm/boot/dts/s5pv210-goni.dts b/arch/arm/boot/dts/s5pv210-goni.dts
index fbbd93707404..c8714bf0b6e4 100644
--- a/arch/arm/boot/dts/s5pv210-goni.dts
+++ b/arch/arm/boot/dts/s5pv210-goni.dts
@@ -33,6 +33,13 @@
0x50000000 0x08000000>;
};
+ pmic_ap_clk: clock-0 {
+ /* Workaround for missing clock on PMIC */
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ clock-frequency = <32768>;
+ };
+
regulators {
compatible = "simple-bus";
#address-cells = <1>;
@@ -224,6 +231,11 @@
regulator-max-microvolt = <1200000>;
regulator-always-on;
};
+
+ ap32khz_reg: EN32KHz-AP {
+ regulator-name = "32KHz AP";
+ regulator-always-on;
+ };
};
};
};
@@ -308,6 +320,11 @@
status = "okay";
};
+&rtc {
+ clocks = <&clocks CLK_RTC>, <&pmic_ap_clk>;
+ clock-names = "rtc", "rtc_src";
+};
+
&sdhci0 {
bus-width = <4>;
non-removable;
--
2.17.1
The S3C RTC requires 32768 Hz clock as input which is provided by PMIC.
However there is no such clock provider but rather a regulator driver
which registers the clock as a regulator. This is an old driver which
will not be updated so add a workaround - a fixed-clock to fill missing
clock phandle reference in S3C RTC.
This fixes dtbs_check warnings:
rtc@e2800000: clocks: [[2, 145]] is too short
rtc@e2800000: clock-names: ['rtc'] is too short
Signed-off-by: Krzysztof Kozlowski <[email protected]>
---
arch/arm/boot/dts/s5pv210-aquila.dts | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/arch/arm/boot/dts/s5pv210-aquila.dts b/arch/arm/boot/dts/s5pv210-aquila.dts
index 14969b6529e8..eaeb0e921aaa 100644
--- a/arch/arm/boot/dts/s5pv210-aquila.dts
+++ b/arch/arm/boot/dts/s5pv210-aquila.dts
@@ -32,6 +32,13 @@
0x40000000 0x18000000>;
};
+ pmic_ap_clk: clock-0 {
+ /* Workaround for missing clock on PMIC */
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ clock-frequency = <32768>;
+ };
+
regulators {
compatible = "simple-bus";
#address-cells = <1>;
@@ -228,6 +235,11 @@
regulator-always-on;
};
+ ap32khz_reg: EN32KHz-AP {
+ regulator-name = "32KHz AP";
+ regulator-always-on;
+ };
+
vichg_reg: ENVICHG {
regulator-name = "VICHG";
};
@@ -326,6 +338,11 @@
status = "okay";
};
+&rtc {
+ clocks = <&clocks CLK_RTC>, <&pmic_ap_clk>;
+ clock-names = "rtc", "rtc_src";
+};
+
&sdhci0 {
bus-width = <4>;
non-removable;
--
2.17.1
The 'audio-subsystem' node is an artificial creation, not representing
real hardware. The hardware is described by its nodes - AUDSS clock
controller and I2S0.
Remove the 'audio-subsystem' node along with its undocumented compatible
to fix dtbs_check warnings like:
audio-subsystem: $nodename:0: 'audio-subsystem' does not match '^([a-z][a-z0-9\\-]+-bus|bus|soc|axi|ahb|apb)(@[0-9a-f]+)?$'
Signed-off-by: Krzysztof Kozlowski <[email protected]>
---
arch/arm/boot/dts/s5pv210.dtsi | 65 +++++++++++++++-------------------
1 file changed, 29 insertions(+), 36 deletions(-)
diff --git a/arch/arm/boot/dts/s5pv210.dtsi b/arch/arm/boot/dts/s5pv210.dtsi
index 46221a5c8ce5..2871351ab907 100644
--- a/arch/arm/boot/dts/s5pv210.dtsi
+++ b/arch/arm/boot/dts/s5pv210.dtsi
@@ -223,43 +223,36 @@
status = "disabled";
};
- audio-subsystem {
- compatible = "samsung,s5pv210-audss", "simple-bus";
- #address-cells = <1>;
- #size-cells = <1>;
- ranges;
-
- clk_audss: clock-controller@eee10000 {
- compatible = "samsung,s5pv210-audss-clock";
- reg = <0xeee10000 0x1000>;
- clock-names = "hclk", "xxti",
- "fout_epll",
- "sclk_audio0";
- clocks = <&clocks DOUT_HCLKP>, <&xxti>,
- <&clocks FOUT_EPLL>,
- <&clocks SCLK_AUDIO0>;
- #clock-cells = <1>;
- };
+ clk_audss: clock-controller@eee10000 {
+ compatible = "samsung,s5pv210-audss-clock";
+ reg = <0xeee10000 0x1000>;
+ clock-names = "hclk", "xxti",
+ "fout_epll",
+ "sclk_audio0";
+ clocks = <&clocks DOUT_HCLKP>, <&xxti>,
+ <&clocks FOUT_EPLL>,
+ <&clocks SCLK_AUDIO0>;
+ #clock-cells = <1>;
+ };
- i2s0: i2s@eee30000 {
- compatible = "samsung,s5pv210-i2s";
- reg = <0xeee30000 0x1000>;
- interrupt-parent = <&vic2>;
- interrupts = <16>;
- dma-names = "rx", "tx", "tx-sec";
- dmas = <&pdma1 9>, <&pdma1 10>, <&pdma1 11>;
- clock-names = "iis",
- "i2s_opclk0",
- "i2s_opclk1";
- clocks = <&clk_audss CLK_I2S>,
- <&clk_audss CLK_I2S>,
- <&clk_audss CLK_DOUT_AUD_BUS>;
- samsung,idma-addr = <0xc0010000>;
- pinctrl-names = "default";
- pinctrl-0 = <&i2s0_bus>;
- #sound-dai-cells = <0>;
- status = "disabled";
- };
+ i2s0: i2s@eee30000 {
+ compatible = "samsung,s5pv210-i2s";
+ reg = <0xeee30000 0x1000>;
+ interrupt-parent = <&vic2>;
+ interrupts = <16>;
+ dma-names = "rx", "tx", "tx-sec";
+ dmas = <&pdma1 9>, <&pdma1 10>, <&pdma1 11>;
+ clock-names = "iis",
+ "i2s_opclk0",
+ "i2s_opclk1";
+ clocks = <&clk_audss CLK_I2S>,
+ <&clk_audss CLK_I2S>,
+ <&clk_audss CLK_DOUT_AUD_BUS>;
+ samsung,idma-addr = <0xc0010000>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2s0_bus>;
+ #sound-dai-cells = <0>;
+ status = "disabled";
};
i2s1: i2s@e2100000 {
--
2.17.1
The Power Management Unit (PMU) is a separate device which has little
common with clock controller. Moving it to one level up (from clock
controller child to SoC) allows to remove fake simple-bus compatible and
dtbs_check warnings like:
clock-controller@e0100000: $nodename:0:
'clock-controller@e0100000' does not match '^([a-z][a-z0-9\\-]+-bus|bus|soc|axi|ahb|apb)(@[0-9a-f]+)?$'
Signed-off-by: Krzysztof Kozlowski <[email protected]>
---
arch/arm/boot/dts/s5pv210.dtsi | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/arch/arm/boot/dts/s5pv210.dtsi b/arch/arm/boot/dts/s5pv210.dtsi
index 5c760a6d7955..46221a5c8ce5 100644
--- a/arch/arm/boot/dts/s5pv210.dtsi
+++ b/arch/arm/boot/dts/s5pv210.dtsi
@@ -92,19 +92,16 @@
};
clocks: clock-controller@e0100000 {
- compatible = "samsung,s5pv210-clock", "simple-bus";
+ compatible = "samsung,s5pv210-clock";
reg = <0xe0100000 0x10000>;
clock-names = "xxti", "xusbxti";
clocks = <&xxti>, <&xusbxti>;
#clock-cells = <1>;
- #address-cells = <1>;
- #size-cells = <1>;
- ranges;
+ };
- pmu_syscon: syscon@e0108000 {
- compatible = "samsung-s5pv210-pmu", "syscon";
- reg = <0xe0108000 0x8000>;
- };
+ pmu_syscon: syscon@e0108000 {
+ compatible = "samsung-s5pv210-pmu", "syscon";
+ reg = <0xe0108000 0x8000>;
};
pinctrl0: pinctrl@e0200000 {
--
2.17.1
The bindings describe I2S DAI has 1 cells. This makes especially sense
for i2s0 which registers two DAIs. Adjust the cells to fix dtbs_check
warnings like:
i2s@e2100000: #sound-dai-cells:0:0: 1 was expected
Signed-off-by: Krzysztof Kozlowski <[email protected]>
---
arch/arm/boot/dts/s5pv210-fascinate4g.dts | 2 +-
arch/arm/boot/dts/s5pv210-galaxys.dts | 2 +-
arch/arm/boot/dts/s5pv210.dtsi | 6 +++---
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/arch/arm/boot/dts/s5pv210-fascinate4g.dts b/arch/arm/boot/dts/s5pv210-fascinate4g.dts
index ca064359dd30..a6dc8a173af1 100644
--- a/arch/arm/boot/dts/s5pv210-fascinate4g.dts
+++ b/arch/arm/boot/dts/s5pv210-fascinate4g.dts
@@ -102,7 +102,7 @@
pinctrl-0 = <&headset_det &earpath_sel>;
cpu {
- sound-dai = <&i2s0>, <&bt_codec>;
+ sound-dai = <&i2s0 0>, <&bt_codec>;
};
codec {
diff --git a/arch/arm/boot/dts/s5pv210-galaxys.dts b/arch/arm/boot/dts/s5pv210-galaxys.dts
index 560f830b6f6b..0eba06f56ac7 100644
--- a/arch/arm/boot/dts/s5pv210-galaxys.dts
+++ b/arch/arm/boot/dts/s5pv210-galaxys.dts
@@ -132,7 +132,7 @@
pinctrl-0 = <&headset_det &earpath_sel>;
cpu {
- sound-dai = <&i2s0>, <&bt_codec>;
+ sound-dai = <&i2s0 0>, <&bt_codec>;
};
codec {
diff --git a/arch/arm/boot/dts/s5pv210.dtsi b/arch/arm/boot/dts/s5pv210.dtsi
index 2871351ab907..96e667ba1c3f 100644
--- a/arch/arm/boot/dts/s5pv210.dtsi
+++ b/arch/arm/boot/dts/s5pv210.dtsi
@@ -251,7 +251,7 @@
samsung,idma-addr = <0xc0010000>;
pinctrl-names = "default";
pinctrl-0 = <&i2s0_bus>;
- #sound-dai-cells = <0>;
+ #sound-dai-cells = <1>;
status = "disabled";
};
@@ -266,7 +266,7 @@
clocks = <&clocks CLK_I2S1>, <&clocks SCLK_AUDIO1>;
pinctrl-names = "default";
pinctrl-0 = <&i2s1_bus>;
- #sound-dai-cells = <0>;
+ #sound-dai-cells = <1>;
status = "disabled";
};
@@ -281,7 +281,7 @@
clocks = <&clocks CLK_I2S2>, <&clocks SCLK_AUDIO2>;
pinctrl-names = "default";
pinctrl-0 = <&i2s2_bus>;
- #sound-dai-cells = <0>;
+ #sound-dai-cells = <1>;
status = "disabled";
};
--
2.17.1
The ADC in S3C/S5P/Exynos SoCs can be used also for handling touch
screen. In such case the second interrupt is required. This second
interrupt can be anyway provided, even without touch screens. This
fixes dtbs_check warnings like:
arch/arm/boot/dts/s5pv210-aquila.dt.yaml: adc@e1700000: interrupts: [[23], [24]] is too long
Signed-off-by: Krzysztof Kozlowski <[email protected]>
---
.../bindings/iio/adc/samsung,exynos-adc.yaml | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/iio/adc/samsung,exynos-adc.yaml b/Documentation/devicetree/bindings/iio/adc/samsung,exynos-adc.yaml
index cc3c8ea6a894..89b4f9c252a6 100644
--- a/Documentation/devicetree/bindings/iio/adc/samsung,exynos-adc.yaml
+++ b/Documentation/devicetree/bindings/iio/adc/samsung,exynos-adc.yaml
@@ -41,7 +41,10 @@ properties:
maxItems: 2
interrupts:
- maxItems: 1
+ description:
+ ADC interrupt followed by optional touchscreen interrupt.
+ minItems: 1
+ maxItems: 2
"#io-channel-cells":
const: 1
@@ -107,6 +110,16 @@ allOf:
items:
- const: adc
+ - if:
+ properties:
+ has-touchscreen:
+ true
+ then:
+ properties:
+ interrupts:
+ minItems: 2
+ maxItems: 2
+
examples:
- |
adc: adc@12d10000 {
--
2.17.1
There is no need to keep DMA controller nodes under AMBA bus node.
Remove the "amba" node to fix dtschema warnings like:
amba: $nodename:0: 'amba' does not match '^([a-z][a-z0-9\\-]+-bus|bus|soc|axi|ahb|apb)(@[0-9a-f]+)?$'
Signed-off-by: Krzysztof Kozlowski <[email protected]>
---
arch/arm/boot/dts/s5pv210.dtsi | 49 +++++++++++++++-------------------
1 file changed, 21 insertions(+), 28 deletions(-)
diff --git a/arch/arm/boot/dts/s5pv210.dtsi b/arch/arm/boot/dts/s5pv210.dtsi
index 1b0ee884e91d..84e4447931de 100644
--- a/arch/arm/boot/dts/s5pv210.dtsi
+++ b/arch/arm/boot/dts/s5pv210.dtsi
@@ -128,35 +128,28 @@
};
};
- amba {
- #address-cells = <1>;
- #size-cells = <1>;
- compatible = "simple-bus";
- ranges;
-
- pdma0: dma@e0900000 {
- compatible = "arm,pl330", "arm,primecell";
- reg = <0xe0900000 0x1000>;
- interrupt-parent = <&vic0>;
- interrupts = <19>;
- clocks = <&clocks CLK_PDMA0>;
- clock-names = "apb_pclk";
- #dma-cells = <1>;
- #dma-channels = <8>;
- #dma-requests = <32>;
- };
+ pdma0: dma@e0900000 {
+ compatible = "arm,pl330", "arm,primecell";
+ reg = <0xe0900000 0x1000>;
+ interrupt-parent = <&vic0>;
+ interrupts = <19>;
+ clocks = <&clocks CLK_PDMA0>;
+ clock-names = "apb_pclk";
+ #dma-cells = <1>;
+ #dma-channels = <8>;
+ #dma-requests = <32>;
+ };
- pdma1: dma@e0a00000 {
- compatible = "arm,pl330", "arm,primecell";
- reg = <0xe0a00000 0x1000>;
- interrupt-parent = <&vic0>;
- interrupts = <20>;
- clocks = <&clocks CLK_PDMA1>;
- clock-names = "apb_pclk";
- #dma-cells = <1>;
- #dma-channels = <8>;
- #dma-requests = <32>;
- };
+ pdma1: dma@e0a00000 {
+ compatible = "arm,pl330", "arm,primecell";
+ reg = <0xe0a00000 0x1000>;
+ interrupt-parent = <&vic0>;
+ interrupts = <20>;
+ clocks = <&clocks CLK_PDMA1>;
+ clock-names = "apb_pclk";
+ #dma-cells = <1>;
+ #dma-channels = <8>;
+ #dma-requests = <32>;
};
adc: adc@e1700000 {
--
2.17.1
Add compatible for the Samsung S5Pv210 SoC PMU.
Signed-off-by: Krzysztof Kozlowski <[email protected]>
---
Documentation/devicetree/bindings/arm/samsung/pmu.yaml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Documentation/devicetree/bindings/arm/samsung/pmu.yaml b/Documentation/devicetree/bindings/arm/samsung/pmu.yaml
index edbe8c69387b..17678d9686c1 100644
--- a/Documentation/devicetree/bindings/arm/samsung/pmu.yaml
+++ b/Documentation/devicetree/bindings/arm/samsung/pmu.yaml
@@ -24,6 +24,7 @@ select:
- samsung,exynos5420-pmu
- samsung,exynos5433-pmu
- samsung,exynos7-pmu
+ - samsung-s5pv210-pmu
required:
- compatible
@@ -40,6 +41,7 @@ properties:
- samsung,exynos5420-pmu
- samsung,exynos5433-pmu
- samsung,exynos7-pmu
+ - samsung-s5pv210-pmu
- const: syscon
reg:
--
2.17.1
The ADC in S5Pv210 does not have ADC phy registers in separate block for
which syscon would be needed. Remove this requirement to fix dtbs_check
warnings like:
arch/arm/boot/dts/s5pv210-fascinate4g.dt.yaml: adc@e1700000: 'samsung,syscon-phandle' is a required property
Signed-off-by: Krzysztof Kozlowski <[email protected]>
---
.../devicetree/bindings/iio/adc/samsung,exynos-adc.yaml | 1 -
1 file changed, 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/iio/adc/samsung,exynos-adc.yaml b/Documentation/devicetree/bindings/iio/adc/samsung,exynos-adc.yaml
index 89b4f9c252a6..75174af72288 100644
--- a/Documentation/devicetree/bindings/iio/adc/samsung,exynos-adc.yaml
+++ b/Documentation/devicetree/bindings/iio/adc/samsung,exynos-adc.yaml
@@ -81,7 +81,6 @@ allOf:
- samsung,exynos-adc-v2
- samsung,exynos3250-adc
- samsung,exynos4212-adc
- - samsung,s5pv210-adc
then:
required:
- samsung,syscon-phandle
--
2.17.1
Fix typo in pinctrl property of "vibrator-en" fixed regulator in Aries
family of boards. The error caused lack of pin configuration for the
GPIO used in vibrator.
Fixes: 04568cb58a43 ("ARM: dts: s5pv210: Disable pull for vibrator enable GPIO on Aries boards")
Cc: <[email protected]>
Signed-off-by: Krzysztof Kozlowski <[email protected]>
---
arch/arm/boot/dts/s5pv210-aries.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/boot/dts/s5pv210-aries.dtsi b/arch/arm/boot/dts/s5pv210-aries.dtsi
index a3f83f668ce1..6ba23562da46 100644
--- a/arch/arm/boot/dts/s5pv210-aries.dtsi
+++ b/arch/arm/boot/dts/s5pv210-aries.dtsi
@@ -59,7 +59,7 @@
gpio = <&gpj1 1 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
- pinctr-0 = <&vibrator_ena>;
+ pinctrl-0 = <&vibrator_ena>;
};
touchkey_vdd: regulator-fixed-1 {
--
2.17.1
On Mon, 7 Sep 2020 18:11:18 +0200
Krzysztof Kozlowski <[email protected]> wrote:
> The ADC in S3C/S5P/Exynos SoCs can be used also for handling touch
> screen. In such case the second interrupt is required. This second
> interrupt can be anyway provided, even without touch screens. This
> fixes dtbs_check warnings like:
>
> arch/arm/boot/dts/s5pv210-aquila.dt.yaml: adc@e1700000: interrupts: [[23], [24]] is too long
>
> Signed-off-by: Krzysztof Kozlowski <[email protected]>
Acked-by: Jonathan Cameron <[email protected]>
Or I can pick this up through the IIO tree if that makes sense.
I doubt anything else will touch this binding this cycle, so either
way works for me.
Jonathan
> ---
> .../bindings/iio/adc/samsung,exynos-adc.yaml | 15 ++++++++++++++-
> 1 file changed, 14 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/devicetree/bindings/iio/adc/samsung,exynos-adc.yaml b/Documentation/devicetree/bindings/iio/adc/samsung,exynos-adc.yaml
> index cc3c8ea6a894..89b4f9c252a6 100644
> --- a/Documentation/devicetree/bindings/iio/adc/samsung,exynos-adc.yaml
> +++ b/Documentation/devicetree/bindings/iio/adc/samsung,exynos-adc.yaml
> @@ -41,7 +41,10 @@ properties:
> maxItems: 2
>
> interrupts:
> - maxItems: 1
> + description:
> + ADC interrupt followed by optional touchscreen interrupt.
> + minItems: 1
> + maxItems: 2
>
> "#io-channel-cells":
> const: 1
> @@ -107,6 +110,16 @@ allOf:
> items:
> - const: adc
>
> + - if:
> + properties:
> + has-touchscreen:
> + true
> + then:
> + properties:
> + interrupts:
> + minItems: 2
> + maxItems: 2
> +
> examples:
> - |
> adc: adc@12d10000 {
On Mon, 7 Sep 2020 18:11:19 +0200
Krzysztof Kozlowski <[email protected]> wrote:
> The ADC in S5Pv210 does not have ADC phy registers in separate block for
> which syscon would be needed. Remove this requirement to fix dtbs_check
> warnings like:
>
> arch/arm/boot/dts/s5pv210-fascinate4g.dt.yaml: adc@e1700000: 'samsung,syscon-phandle' is a required property
>
> Signed-off-by: Krzysztof Kozlowski <[email protected]>
Acked-by: Jonathan Cameron <[email protected]>
> ---
> .../devicetree/bindings/iio/adc/samsung,exynos-adc.yaml | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/Documentation/devicetree/bindings/iio/adc/samsung,exynos-adc.yaml b/Documentation/devicetree/bindings/iio/adc/samsung,exynos-adc.yaml
> index 89b4f9c252a6..75174af72288 100644
> --- a/Documentation/devicetree/bindings/iio/adc/samsung,exynos-adc.yaml
> +++ b/Documentation/devicetree/bindings/iio/adc/samsung,exynos-adc.yaml
> @@ -81,7 +81,6 @@ allOf:
> - samsung,exynos-adc-v2
> - samsung,exynos3250-adc
> - samsung,exynos4212-adc
> - - samsung,s5pv210-adc
> then:
> required:
> - samsung,syscon-phandle
On Mon, 7 Sep 2020 at 18:39, Jonathan Cameron
<[email protected]> wrote:
>
> On Mon, 7 Sep 2020 18:11:18 +0200
> Krzysztof Kozlowski <[email protected]> wrote:
>
> > The ADC in S3C/S5P/Exynos SoCs can be used also for handling touch
> > screen. In such case the second interrupt is required. This second
> > interrupt can be anyway provided, even without touch screens. This
> > fixes dtbs_check warnings like:
> >
> > arch/arm/boot/dts/s5pv210-aquila.dt.yaml: adc@e1700000: interrupts: [[23], [24]] is too long
> >
> > Signed-off-by: Krzysztof Kozlowski <[email protected]>
>
> Acked-by: Jonathan Cameron <[email protected]>
>
> Or I can pick this up through the IIO tree if that makes sense.
> I doubt anything else will touch this binding this cycle, so either
> way works for me.
Let's wait for Rob's review and then if you could, please pick it up.
Best regards,
Krzysztof
Looking at this again, it appears that there is actually control for
it at offset 0x6818 of pmu_syscon (0xe0108000) [1]. However, it defaults to
enabled so it's not required for proper use of the block. Whether it should
be present in the schema/DTS is up to you.
Thanks,
Jonathan
[1] https://android.googlesource.com/kernel/samsung/+/refs/heads/android-samsung-3.0-jb-mr0/arch/arm/mach-s5pv210/include/mach/regs-clock.h#325
On 2020-09-07 9:11 a.m., Krzysztof Kozlowski wrote:
> The ADC in S5Pv210 does not have ADC phy registers in separate block for
> which syscon would be needed. Remove this requirement to fix dtbs_check
> warnings like:
>
> arch/arm/boot/dts/s5pv210-fascinate4g.dt.yaml: adc@e1700000: 'samsung,syscon-phandle' is a required property
>
> Signed-off-by: Krzysztof Kozlowski <[email protected]>
> ---
> .../devicetree/bindings/iio/adc/samsung,exynos-adc.yaml | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/Documentation/devicetree/bindings/iio/adc/samsung,exynos-adc.yaml b/Documentation/devicetree/bindings/iio/adc/samsung,exynos-adc.yaml
> index 89b4f9c252a6..75174af72288 100644
> --- a/Documentation/devicetree/bindings/iio/adc/samsung,exynos-adc.yaml
> +++ b/Documentation/devicetree/bindings/iio/adc/samsung,exynos-adc.yaml
> @@ -81,7 +81,6 @@ allOf:
> - samsung,exynos-adc-v2
> - samsung,exynos3250-adc
> - samsung,exynos4212-adc
> - - samsung,s5pv210-adc
> then:
> required:
> - samsung,syscon-phandle
>
DMA still works for me on the Galaxy S.
Tested-by: Jonathan Bakker <[email protected]>
Thanks,
Jonathan
On 2020-09-07 9:11 a.m., Krzysztof Kozlowski wrote:
> There is no need to keep DMA controller nodes under AMBA bus node.
> Remove the "amba" node to fix dtschema warnings like:
>
> amba: $nodename:0: 'amba' does not match '^([a-z][a-z0-9\\-]+-bus|bus|soc|axi|ahb|apb)(@[0-9a-f]+)?$'
>
> Signed-off-by: Krzysztof Kozlowski <[email protected]>
> ---
> arch/arm/boot/dts/s5pv210.dtsi | 49 +++++++++++++++-------------------
> 1 file changed, 21 insertions(+), 28 deletions(-)
>
> diff --git a/arch/arm/boot/dts/s5pv210.dtsi b/arch/arm/boot/dts/s5pv210.dtsi
> index 1b0ee884e91d..84e4447931de 100644
> --- a/arch/arm/boot/dts/s5pv210.dtsi
> +++ b/arch/arm/boot/dts/s5pv210.dtsi
> @@ -128,35 +128,28 @@
> };
> };
>
> - amba {
> - #address-cells = <1>;
> - #size-cells = <1>;
> - compatible = "simple-bus";
> - ranges;
> -
> - pdma0: dma@e0900000 {
> - compatible = "arm,pl330", "arm,primecell";
> - reg = <0xe0900000 0x1000>;
> - interrupt-parent = <&vic0>;
> - interrupts = <19>;
> - clocks = <&clocks CLK_PDMA0>;
> - clock-names = "apb_pclk";
> - #dma-cells = <1>;
> - #dma-channels = <8>;
> - #dma-requests = <32>;
> - };
> + pdma0: dma@e0900000 {
> + compatible = "arm,pl330", "arm,primecell";
> + reg = <0xe0900000 0x1000>;
> + interrupt-parent = <&vic0>;
> + interrupts = <19>;
> + clocks = <&clocks CLK_PDMA0>;
> + clock-names = "apb_pclk";
> + #dma-cells = <1>;
> + #dma-channels = <8>;
> + #dma-requests = <32>;
> + };
>
> - pdma1: dma@e0a00000 {
> - compatible = "arm,pl330", "arm,primecell";
> - reg = <0xe0a00000 0x1000>;
> - interrupt-parent = <&vic0>;
> - interrupts = <20>;
> - clocks = <&clocks CLK_PDMA1>;
> - clock-names = "apb_pclk";
> - #dma-cells = <1>;
> - #dma-channels = <8>;
> - #dma-requests = <32>;
> - };
> + pdma1: dma@e0a00000 {
> + compatible = "arm,pl330", "arm,primecell";
> + reg = <0xe0a00000 0x1000>;
> + interrupt-parent = <&vic0>;
> + interrupts = <20>;
> + clocks = <&clocks CLK_PDMA1>;
> + clock-names = "apb_pclk";
> + #dma-cells = <1>;
> + #dma-channels = <8>;
> + #dma-requests = <32>;
> };
>
> adc: adc@e1700000 {
>
Works for me on the Galaxy S.
Tested-by: Jonathan Bakker <[email protected]>
Thanks,
Jonathan
On 2020-09-07 9:11 a.m., Krzysztof Kozlowski wrote:
> The Power Management Unit (PMU) is a separate device which has little
> common with clock controller. Moving it to one level up (from clock
> controller child to SoC) allows to remove fake simple-bus compatible and
> dtbs_check warnings like:
>
> clock-controller@e0100000: $nodename:0:
> 'clock-controller@e0100000' does not match '^([a-z][a-z0-9\\-]+-bus|bus|soc|axi|ahb|apb)(@[0-9a-f]+)?$'
>
> Signed-off-by: Krzysztof Kozlowski <[email protected]>
> ---
> arch/arm/boot/dts/s5pv210.dtsi | 13 +++++--------
> 1 file changed, 5 insertions(+), 8 deletions(-)
>
> diff --git a/arch/arm/boot/dts/s5pv210.dtsi b/arch/arm/boot/dts/s5pv210.dtsi
> index 5c760a6d7955..46221a5c8ce5 100644
> --- a/arch/arm/boot/dts/s5pv210.dtsi
> +++ b/arch/arm/boot/dts/s5pv210.dtsi
> @@ -92,19 +92,16 @@
> };
>
> clocks: clock-controller@e0100000 {
> - compatible = "samsung,s5pv210-clock", "simple-bus";
> + compatible = "samsung,s5pv210-clock";
> reg = <0xe0100000 0x10000>;
> clock-names = "xxti", "xusbxti";
> clocks = <&xxti>, <&xusbxti>;
> #clock-cells = <1>;
> - #address-cells = <1>;
> - #size-cells = <1>;
> - ranges;
> + };
>
> - pmu_syscon: syscon@e0108000 {
> - compatible = "samsung-s5pv210-pmu", "syscon";
> - reg = <0xe0108000 0x8000>;
> - };
> + pmu_syscon: syscon@e0108000 {
> + compatible = "samsung-s5pv210-pmu", "syscon";
> + reg = <0xe0108000 0x8000>;
> };
>
> pinctrl0: pinctrl@e0200000 {
>
Audio still works for me on the Galaxy S.
Tested-by: Jonathan Bakker <[email protected]>
Thanks,
Jonathan
On 2020-09-07 9:11 a.m., Krzysztof Kozlowski wrote:
> The 'audio-subsystem' node is an artificial creation, not representing
> real hardware. The hardware is described by its nodes - AUDSS clock
> controller and I2S0.
>
> Remove the 'audio-subsystem' node along with its undocumented compatible
> to fix dtbs_check warnings like:
>
> audio-subsystem: $nodename:0: 'audio-subsystem' does not match '^([a-z][a-z0-9\\-]+-bus|bus|soc|axi|ahb|apb)(@[0-9a-f]+)?$'
>
> Signed-off-by: Krzysztof Kozlowski <[email protected]>
> ---
> arch/arm/boot/dts/s5pv210.dtsi | 65 +++++++++++++++-------------------
> 1 file changed, 29 insertions(+), 36 deletions(-)
>
> diff --git a/arch/arm/boot/dts/s5pv210.dtsi b/arch/arm/boot/dts/s5pv210.dtsi
> index 46221a5c8ce5..2871351ab907 100644
> --- a/arch/arm/boot/dts/s5pv210.dtsi
> +++ b/arch/arm/boot/dts/s5pv210.dtsi
> @@ -223,43 +223,36 @@
> status = "disabled";
> };
>
> - audio-subsystem {
> - compatible = "samsung,s5pv210-audss", "simple-bus";
> - #address-cells = <1>;
> - #size-cells = <1>;
> - ranges;
> -
> - clk_audss: clock-controller@eee10000 {
> - compatible = "samsung,s5pv210-audss-clock";
> - reg = <0xeee10000 0x1000>;
> - clock-names = "hclk", "xxti",
> - "fout_epll",
> - "sclk_audio0";
> - clocks = <&clocks DOUT_HCLKP>, <&xxti>,
> - <&clocks FOUT_EPLL>,
> - <&clocks SCLK_AUDIO0>;
> - #clock-cells = <1>;
> - };
> + clk_audss: clock-controller@eee10000 {
> + compatible = "samsung,s5pv210-audss-clock";
> + reg = <0xeee10000 0x1000>;
> + clock-names = "hclk", "xxti",
> + "fout_epll",
> + "sclk_audio0";
> + clocks = <&clocks DOUT_HCLKP>, <&xxti>,
> + <&clocks FOUT_EPLL>,
> + <&clocks SCLK_AUDIO0>;
> + #clock-cells = <1>;
> + };
>
> - i2s0: i2s@eee30000 {
> - compatible = "samsung,s5pv210-i2s";
> - reg = <0xeee30000 0x1000>;
> - interrupt-parent = <&vic2>;
> - interrupts = <16>;
> - dma-names = "rx", "tx", "tx-sec";
> - dmas = <&pdma1 9>, <&pdma1 10>, <&pdma1 11>;
> - clock-names = "iis",
> - "i2s_opclk0",
> - "i2s_opclk1";
> - clocks = <&clk_audss CLK_I2S>,
> - <&clk_audss CLK_I2S>,
> - <&clk_audss CLK_DOUT_AUD_BUS>;
> - samsung,idma-addr = <0xc0010000>;
> - pinctrl-names = "default";
> - pinctrl-0 = <&i2s0_bus>;
> - #sound-dai-cells = <0>;
> - status = "disabled";
> - };
> + i2s0: i2s@eee30000 {
> + compatible = "samsung,s5pv210-i2s";
> + reg = <0xeee30000 0x1000>;
> + interrupt-parent = <&vic2>;
> + interrupts = <16>;
> + dma-names = "rx", "tx", "tx-sec";
> + dmas = <&pdma1 9>, <&pdma1 10>, <&pdma1 11>;
> + clock-names = "iis",
> + "i2s_opclk0",
> + "i2s_opclk1";
> + clocks = <&clk_audss CLK_I2S>,
> + <&clk_audss CLK_I2S>,
> + <&clk_audss CLK_DOUT_AUD_BUS>;
> + samsung,idma-addr = <0xc0010000>;
> + pinctrl-names = "default";
> + pinctrl-0 = <&i2s0_bus>;
> + #sound-dai-cells = <0>;
> + status = "disabled";
> };
>
> i2s1: i2s@e2100000 {
>
Works for me on the Galaxy S.
Tested-by: Jonathan Bakker <[email protected]>
Thanks,
Jonathan
On 2020-09-07 9:11 a.m., Krzysztof Kozlowski wrote:
> The device tree schema expects SPI controller to be named "spi",
> otherwise dtbs_check complain with a warning like:
>
> spi-gpio-0: $nodename:0: 'spi-gpio-0' does not match '^spi(@.*|-[0-9a-f])*$'
>
> Signed-off-by: Krzysztof Kozlowski <[email protected]>
> ---
> arch/arm/boot/dts/s5pv210-aries.dtsi | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm/boot/dts/s5pv210-aries.dtsi b/arch/arm/boot/dts/s5pv210-aries.dtsi
> index 86c3b26fd21e..bd4450dbdcb6 100644
> --- a/arch/arm/boot/dts/s5pv210-aries.dtsi
> +++ b/arch/arm/boot/dts/s5pv210-aries.dtsi
> @@ -545,7 +545,7 @@
> value = <0x5200>;
> };
>
> - spi_lcd: spi-gpio-0 {
> + spi_lcd: spi-2 {
> compatible = "spi-gpio";
> #address-cells = <1>;
> #size-cells = <0>;
>
Sadly, this is causing issues for me. The machine driver is no longer probing correctly
on the Galaxy S.
The failing call in sound/soc/samsung/aries_wm8994.c is
/* Set CPU of_node for BT DAI */
aries_dai[2].cpus->of_node = of_parse_phandle(cpu,
"sound-dai", 1);
where cpus->of_node is not set properly. Which is definitely weird because it doesn't
look like this should affect that.
Let me know if there's any specific test that you want me to do.
Thanks,
Jonathan
On 2020-09-07 9:11 a.m., Krzysztof Kozlowski wrote:
> The bindings describe I2S DAI has 1 cells. This makes especially sense
> for i2s0 which registers two DAIs. Adjust the cells to fix dtbs_check
> warnings like:
>
> i2s@e2100000: #sound-dai-cells:0:0: 1 was expected
>
> Signed-off-by: Krzysztof Kozlowski <[email protected]>
> ---
> arch/arm/boot/dts/s5pv210-fascinate4g.dts | 2 +-
> arch/arm/boot/dts/s5pv210-galaxys.dts | 2 +-
> arch/arm/boot/dts/s5pv210.dtsi | 6 +++---
> 3 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/arch/arm/boot/dts/s5pv210-fascinate4g.dts b/arch/arm/boot/dts/s5pv210-fascinate4g.dts
> index ca064359dd30..a6dc8a173af1 100644
> --- a/arch/arm/boot/dts/s5pv210-fascinate4g.dts
> +++ b/arch/arm/boot/dts/s5pv210-fascinate4g.dts
> @@ -102,7 +102,7 @@
> pinctrl-0 = <&headset_det &earpath_sel>;
>
> cpu {
> - sound-dai = <&i2s0>, <&bt_codec>;
> + sound-dai = <&i2s0 0>, <&bt_codec>;
> };
>
> codec {
> diff --git a/arch/arm/boot/dts/s5pv210-galaxys.dts b/arch/arm/boot/dts/s5pv210-galaxys.dts
> index 560f830b6f6b..0eba06f56ac7 100644
> --- a/arch/arm/boot/dts/s5pv210-galaxys.dts
> +++ b/arch/arm/boot/dts/s5pv210-galaxys.dts
> @@ -132,7 +132,7 @@
> pinctrl-0 = <&headset_det &earpath_sel>;
>
> cpu {
> - sound-dai = <&i2s0>, <&bt_codec>;
> + sound-dai = <&i2s0 0>, <&bt_codec>;
> };
>
> codec {
> diff --git a/arch/arm/boot/dts/s5pv210.dtsi b/arch/arm/boot/dts/s5pv210.dtsi
> index 2871351ab907..96e667ba1c3f 100644
> --- a/arch/arm/boot/dts/s5pv210.dtsi
> +++ b/arch/arm/boot/dts/s5pv210.dtsi
> @@ -251,7 +251,7 @@
> samsung,idma-addr = <0xc0010000>;
> pinctrl-names = "default";
> pinctrl-0 = <&i2s0_bus>;
> - #sound-dai-cells = <0>;
> + #sound-dai-cells = <1>;
> status = "disabled";
> };
>
> @@ -266,7 +266,7 @@
> clocks = <&clocks CLK_I2S1>, <&clocks SCLK_AUDIO1>;
> pinctrl-names = "default";
> pinctrl-0 = <&i2s1_bus>;
> - #sound-dai-cells = <0>;
> + #sound-dai-cells = <1>;
> status = "disabled";
> };
>
> @@ -281,7 +281,7 @@
> clocks = <&clocks CLK_I2S2>, <&clocks SCLK_AUDIO2>;
> pinctrl-names = "default";
> pinctrl-0 = <&i2s2_bus>;
> - #sound-dai-cells = <0>;
> + #sound-dai-cells = <1>;
> status = "disabled";
> };
>
>
Initial testing on both an i9000 and an SGH-T959P are showing that the audio has
stopped working with this. I'm not 100% convinced as I've had DMA issues in the
past. However trying to play something just results in a hang after 1.5s while
it works just fine without this patch.
Thanks,
Jonathan
On 2020-09-07 9:11 a.m., Krzysztof Kozlowski wrote:
> dtschema expects DMA channels in specific order (tx, rx and tx-sec).
> The order actually should not matter because dma-names is used however
> let's make it aligned with dtschema to suppress warnings like:
>
> i2s@eee30000: dma-names: ['rx', 'tx', 'tx-sec'] is not valid under any of the given schemas
>
> Signed-off-by: Krzysztof Kozlowski <[email protected]>
> ---
> arch/arm/boot/dts/s5pv210.dtsi | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/arch/arm/boot/dts/s5pv210.dtsi b/arch/arm/boot/dts/s5pv210.dtsi
> index 96e667ba1c3f..72fb9d9f7ba3 100644
> --- a/arch/arm/boot/dts/s5pv210.dtsi
> +++ b/arch/arm/boot/dts/s5pv210.dtsi
> @@ -240,8 +240,8 @@
> reg = <0xeee30000 0x1000>;
> interrupt-parent = <&vic2>;
> interrupts = <16>;
> - dma-names = "rx", "tx", "tx-sec";
> - dmas = <&pdma1 9>, <&pdma1 10>, <&pdma1 11>;
> + dma-names = "tx", "rx", "tx-sec";
> + dmas = <&pdma1 10>, <&pdma1 9>, <&pdma1 11>;
> clock-names = "iis",
> "i2s_opclk0",
> "i2s_opclk1";
> @@ -260,8 +260,8 @@
> reg = <0xe2100000 0x1000>;
> interrupt-parent = <&vic2>;
> interrupts = <17>;
> - dma-names = "rx", "tx";
> - dmas = <&pdma1 12>, <&pdma1 13>;
> + dma-names = "tx", "rx";
> + dmas = <&pdma1 13>, <&pdma1 12>;
> clock-names = "iis", "i2s_opclk0";
> clocks = <&clocks CLK_I2S1>, <&clocks SCLK_AUDIO1>;
> pinctrl-names = "default";
> @@ -275,8 +275,8 @@
> reg = <0xe2a00000 0x1000>;
> interrupt-parent = <&vic2>;
> interrupts = <18>;
> - dma-names = "rx", "tx";
> - dmas = <&pdma1 14>, <&pdma1 15>;
> + dma-names = "tx", "rx";
> + dmas = <&pdma1 15>, <&pdma1 14>;
> clock-names = "iis", "i2s_opclk0";
> clocks = <&clocks CLK_I2S2>, <&clocks SCLK_AUDIO2>;
> pinctrl-names = "default";
>
Ah, I figured out why the dma stopped working. In s5pv210-aries.dtsi the dma's for i2s0
are overriden to use pdma0 instead of pdma1. That also needs changing for this to
work properly.
Thanks,
Jonathan
On 2020-09-07 5:17 p.m., Jonathan Bakker wrote:
> Initial testing on both an i9000 and an SGH-T959P are showing that the audio has
> stopped working with this. I'm not 100% convinced as I've had DMA issues in the
> past. However trying to play something just results in a hang after 1.5s while
> it works just fine without this patch.
>
> Thanks,
> Jonathan
>
> On 2020-09-07 9:11 a.m., Krzysztof Kozlowski wrote:
>> dtschema expects DMA channels in specific order (tx, rx and tx-sec).
>> The order actually should not matter because dma-names is used however
>> let's make it aligned with dtschema to suppress warnings like:
>>
>> i2s@eee30000: dma-names: ['rx', 'tx', 'tx-sec'] is not valid under any of the given schemas
>>
>> Signed-off-by: Krzysztof Kozlowski <[email protected]>
>> ---
>> arch/arm/boot/dts/s5pv210.dtsi | 12 ++++++------
>> 1 file changed, 6 insertions(+), 6 deletions(-)
>>
>> diff --git a/arch/arm/boot/dts/s5pv210.dtsi b/arch/arm/boot/dts/s5pv210.dtsi
>> index 96e667ba1c3f..72fb9d9f7ba3 100644
>> --- a/arch/arm/boot/dts/s5pv210.dtsi
>> +++ b/arch/arm/boot/dts/s5pv210.dtsi
>> @@ -240,8 +240,8 @@
>> reg = <0xeee30000 0x1000>;
>> interrupt-parent = <&vic2>;
>> interrupts = <16>;
>> - dma-names = "rx", "tx", "tx-sec";
>> - dmas = <&pdma1 9>, <&pdma1 10>, <&pdma1 11>;
>> + dma-names = "tx", "rx", "tx-sec";
>> + dmas = <&pdma1 10>, <&pdma1 9>, <&pdma1 11>;
>> clock-names = "iis",
>> "i2s_opclk0",
>> "i2s_opclk1";
>> @@ -260,8 +260,8 @@
>> reg = <0xe2100000 0x1000>;
>> interrupt-parent = <&vic2>;
>> interrupts = <17>;
>> - dma-names = "rx", "tx";
>> - dmas = <&pdma1 12>, <&pdma1 13>;
>> + dma-names = "tx", "rx";
>> + dmas = <&pdma1 13>, <&pdma1 12>;
>> clock-names = "iis", "i2s_opclk0";
>> clocks = <&clocks CLK_I2S1>, <&clocks SCLK_AUDIO1>;
>> pinctrl-names = "default";
>> @@ -275,8 +275,8 @@
>> reg = <0xe2a00000 0x1000>;
>> interrupt-parent = <&vic2>;
>> interrupts = <18>;
>> - dma-names = "rx", "tx";
>> - dmas = <&pdma1 14>, <&pdma1 15>;
>> + dma-names = "tx", "rx";
>> + dmas = <&pdma1 15>, <&pdma1 14>;
>> clock-names = "iis", "i2s_opclk0";
>> clocks = <&clocks CLK_I2S2>, <&clocks SCLK_AUDIO2>;
>> pinctrl-names = "default";
>>
On Mon, Sep 07, 2020 at 02:49:49PM -0700, Jonathan Bakker wrote:
> Looking at this again, it appears that there is actually control for
> it at offset 0x6818 of pmu_syscon (0xe0108000) [1]. However, it defaults to
> enabled so it's not required for proper use of the block. Whether it should
> be present in the schema/DTS is up to you.
Indeed the driver could turn off the ADC phy via syscon however bindings
(before YAML conversion) explicitly were saying that it is not needed. I
am not going to add it as I am not able to test the change and also
adding such requirement would be a break of ABI (described by first TXT
bindings).
Best regards,
Krzysztof
>
> Thanks,
> Jonathan
>
> [1] https://android.googlesource.com/kernel/samsung/+/refs/heads/android-samsung-3.0-jb-mr0/arch/arm/mach-s5pv210/include/mach/regs-clock.h#325
>
> On 2020-09-07 9:11 a.m., Krzysztof Kozlowski wrote:
> > The ADC in S5Pv210 does not have ADC phy registers in separate block for
> > which syscon would be needed. Remove this requirement to fix dtbs_check
> > warnings like:
> >
> > arch/arm/boot/dts/s5pv210-fascinate4g.dt.yaml: adc@e1700000: 'samsung,syscon-phandle' is a required property
> >
> > Signed-off-by: Krzysztof Kozlowski <[email protected]>
> > ---
> > .../devicetree/bindings/iio/adc/samsung,exynos-adc.yaml | 1 -
> > 1 file changed, 1 deletion(-)
> >
> > diff --git a/Documentation/devicetree/bindings/iio/adc/samsung,exynos-adc.yaml b/Documentation/devicetree/bindings/iio/adc/samsung,exynos-adc.yaml
> > index 89b4f9c252a6..75174af72288 100644
> > --- a/Documentation/devicetree/bindings/iio/adc/samsung,exynos-adc.yaml
> > +++ b/Documentation/devicetree/bindings/iio/adc/samsung,exynos-adc.yaml
> > @@ -81,7 +81,6 @@ allOf:
> > - samsung,exynos-adc-v2
> > - samsung,exynos3250-adc
> > - samsung,exynos4212-adc
> > - - samsung,s5pv210-adc
> > then:
> > required:
> > - samsung,syscon-phandle
> >
On Mon, Sep 07, 2020 at 04:55:26PM -0700, Jonathan Bakker wrote:
> Sadly, this is causing issues for me. The machine driver is no longer probing correctly
> on the Galaxy S.
>
> The failing call in sound/soc/samsung/aries_wm8994.c is
>
> /* Set CPU of_node for BT DAI */
> aries_dai[2].cpus->of_node = of_parse_phandle(cpu,
> "sound-dai", 1);
>
> where cpus->of_node is not set properly. Which is definitely weird because it doesn't
> look like this should affect that.
>
> Let me know if there's any specific test that you want me to do.
Thanks for the tests. I wonder now if this was working before because
really my change should not break it... I'll think more about it.
Best regards,
Krzysztof
>
> Thanks,
> Jonathan
>
>
> On 2020-09-07 9:11 a.m., Krzysztof Kozlowski wrote:
> > The bindings describe I2S DAI has 1 cells. This makes especially sense
> > for i2s0 which registers two DAIs. Adjust the cells to fix dtbs_check
> > warnings like:
> >
> > i2s@e2100000: #sound-dai-cells:0:0: 1 was expected
> >
> > Signed-off-by: Krzysztof Kozlowski <[email protected]>
> > ---
> > arch/arm/boot/dts/s5pv210-fascinate4g.dts | 2 +-
> > arch/arm/boot/dts/s5pv210-galaxys.dts | 2 +-
> > arch/arm/boot/dts/s5pv210.dtsi | 6 +++---
> > 3 files changed, 5 insertions(+), 5 deletions(-)
> >
> > diff --git a/arch/arm/boot/dts/s5pv210-fascinate4g.dts b/arch/arm/boot/dts/s5pv210-fascinate4g.dts
> > index ca064359dd30..a6dc8a173af1 100644
> > --- a/arch/arm/boot/dts/s5pv210-fascinate4g.dts
> > +++ b/arch/arm/boot/dts/s5pv210-fascinate4g.dts
> > @@ -102,7 +102,7 @@
> > pinctrl-0 = <&headset_det &earpath_sel>;
> >
> > cpu {
> > - sound-dai = <&i2s0>, <&bt_codec>;
> > + sound-dai = <&i2s0 0>, <&bt_codec>;
> > };
> >
> > codec {
> > diff --git a/arch/arm/boot/dts/s5pv210-galaxys.dts b/arch/arm/boot/dts/s5pv210-galaxys.dts
> > index 560f830b6f6b..0eba06f56ac7 100644
> > --- a/arch/arm/boot/dts/s5pv210-galaxys.dts
> > +++ b/arch/arm/boot/dts/s5pv210-galaxys.dts
> > @@ -132,7 +132,7 @@
> > pinctrl-0 = <&headset_det &earpath_sel>;
> >
> > cpu {
> > - sound-dai = <&i2s0>, <&bt_codec>;
> > + sound-dai = <&i2s0 0>, <&bt_codec>;
> > };
> >
> > codec {
> > diff --git a/arch/arm/boot/dts/s5pv210.dtsi b/arch/arm/boot/dts/s5pv210.dtsi
> > index 2871351ab907..96e667ba1c3f 100644
> > --- a/arch/arm/boot/dts/s5pv210.dtsi
> > +++ b/arch/arm/boot/dts/s5pv210.dtsi
> > @@ -251,7 +251,7 @@
> > samsung,idma-addr = <0xc0010000>;
> > pinctrl-names = "default";
> > pinctrl-0 = <&i2s0_bus>;
> > - #sound-dai-cells = <0>;
> > + #sound-dai-cells = <1>;
> > status = "disabled";
> > };
> >
> > @@ -266,7 +266,7 @@
> > clocks = <&clocks CLK_I2S1>, <&clocks SCLK_AUDIO1>;
> > pinctrl-names = "default";
> > pinctrl-0 = <&i2s1_bus>;
> > - #sound-dai-cells = <0>;
> > + #sound-dai-cells = <1>;
> > status = "disabled";
> > };
> >
> > @@ -281,7 +281,7 @@
> > clocks = <&clocks CLK_I2S2>, <&clocks SCLK_AUDIO2>;
> > pinctrl-names = "default";
> > pinctrl-0 = <&i2s2_bus>;
> > - #sound-dai-cells = <0>;
> > + #sound-dai-cells = <1>;
> > status = "disabled";
> > };
> >
> >
On Mon, Sep 07, 2020 at 05:28:54PM -0700, Jonathan Bakker wrote:
> Ah, I figured out why the dma stopped working. In s5pv210-aries.dtsi the dma's for i2s0
> are overriden to use pdma0 instead of pdma1. That also needs changing for this to
> work properly.
Indeed I missed this, thanks for review and tests.
Best regards,
Krzysztof
>
> Thanks,
> Jonathan
>
> On 2020-09-07 5:17 p.m., Jonathan Bakker wrote:
> > Initial testing on both an i9000 and an SGH-T959P are showing that the audio has
> > stopped working with this. I'm not 100% convinced as I've had DMA issues in the
> > past. However trying to play something just results in a hang after 1.5s while
> > it works just fine without this patch.
> >
> > Thanks,
> > Jonathan
On 9/8/20 08:53, Krzysztof Kozlowski wrote:
> On Mon, Sep 07, 2020 at 04:55:26PM -0700, Jonathan Bakker wrote:
>> Sadly, this is causing issues for me. The machine driver is no longer probing correctly
>> on the Galaxy S.
>>
>> The failing call in sound/soc/samsung/aries_wm8994.c is
>>
>> /* Set CPU of_node for BT DAI */
>> aries_dai[2].cpus->of_node = of_parse_phandle(cpu,
>> "sound-dai", 1);
>>
>> where cpus->of_node is not set properly. Which is definitely weird because it doesn't
>> look like this should affect that.
>>
>> Let me know if there's any specific test that you want me to do.
> Thanks for the tests. I wonder now if this was working before because
> really my change should not break it... I'll think more about it.
I think of_parse_phandle_with_args() needs to be used instead of just
of_parse_phandle() for that to work, as AFAICS the latter assumes the
cells count == 0. We would need first to update the driver and then dts.
On Mon, 07 Sep 2020 18:11:18 +0200, Krzysztof Kozlowski wrote:
> The ADC in S3C/S5P/Exynos SoCs can be used also for handling touch
> screen. In such case the second interrupt is required. This second
> interrupt can be anyway provided, even without touch screens. This
> fixes dtbs_check warnings like:
>
> arch/arm/boot/dts/s5pv210-aquila.dt.yaml: adc@e1700000: interrupts: [[23], [24]] is too long
>
> Signed-off-by: Krzysztof Kozlowski <[email protected]>
> ---
> .../bindings/iio/adc/samsung,exynos-adc.yaml | 15 ++++++++++++++-
> 1 file changed, 14 insertions(+), 1 deletion(-)
>
My bot found errors running 'make dt_binding_check' on your patch:
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/iio/adc/samsung,exynos-adc.example.dt.yaml: adc@12d10000: interrupts: [[0, 106, 0]] is too short
From schema: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/iio/adc/samsung,exynos-adc.yaml
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/iio/adc/samsung,exynos-adc.example.dt.yaml: adc@126c0000: interrupts: [[0, 137, 0]] is too short
From schema: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/iio/adc/samsung,exynos-adc.yaml
See https://patchwork.ozlabs.org/patch/1359054
If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure dt-schema is up to date:
pip3 install git+https://github.com/devicetree-org/dt-schema.git@master --upgrade
Please check and re-submit.
On Mon, Sep 07, 2020 at 06:11:18PM +0200, Krzysztof Kozlowski wrote:
> The ADC in S3C/S5P/Exynos SoCs can be used also for handling touch
> screen. In such case the second interrupt is required. This second
> interrupt can be anyway provided, even without touch screens. This
> fixes dtbs_check warnings like:
>
> arch/arm/boot/dts/s5pv210-aquila.dt.yaml: adc@e1700000: interrupts: [[23], [24]] is too long
>
> Signed-off-by: Krzysztof Kozlowski <[email protected]>
> ---
> .../bindings/iio/adc/samsung,exynos-adc.yaml | 15 ++++++++++++++-
> 1 file changed, 14 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/devicetree/bindings/iio/adc/samsung,exynos-adc.yaml b/Documentation/devicetree/bindings/iio/adc/samsung,exynos-adc.yaml
> index cc3c8ea6a894..89b4f9c252a6 100644
> --- a/Documentation/devicetree/bindings/iio/adc/samsung,exynos-adc.yaml
> +++ b/Documentation/devicetree/bindings/iio/adc/samsung,exynos-adc.yaml
> @@ -41,7 +41,10 @@ properties:
> maxItems: 2
>
> interrupts:
> - maxItems: 1
> + description:
> + ADC interrupt followed by optional touchscreen interrupt.
> + minItems: 1
> + maxItems: 2
>
> "#io-channel-cells":
> const: 1
> @@ -107,6 +110,16 @@ allOf:
> items:
> - const: adc
>
> + - if:
> + properties:
> + has-touchscreen:
> + true
This evaluates as true if 'has-touchscreen' is not present too. You
should use 'required' here.
> + then:
> + properties:
> + interrupts:
> + minItems: 2
> + maxItems: 2
> +
> examples:
> - |
> adc: adc@12d10000 {
> --
> 2.17.1
>
On Mon, Sep 07, 2020 at 06:11:17PM +0200, Krzysztof Kozlowski wrote:
> Add compatible for the Samsung S5Pv210 SoC PMU.
>
> Signed-off-by: Krzysztof Kozlowski <[email protected]>
> ---
> Documentation/devicetree/bindings/arm/samsung/pmu.yaml | 2 ++
Applied.
Best regards,
Krzysztof
On Mon, Sep 07, 2020 at 06:11:20PM +0200, Krzysztof Kozlowski wrote:
> Fix typo in pinctrl property of "vibrator-en" fixed regulator in Aries
> family of boards. The error caused lack of pin configuration for the
> GPIO used in vibrator.
>
> Fixes: 04568cb58a43 ("ARM: dts: s5pv210: Disable pull for vibrator enable GPIO on Aries boards")
> Cc: <[email protected]>
> Signed-off-by: Krzysztof Kozlowski <[email protected]>
> ---
> arch/arm/boot/dts/s5pv210-aries.dtsi | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Applied 4-8.
Thanks Jonathan for testing.
Best regards,
Krzysztof
On Mon, Sep 07, 2020 at 06:11:26PM +0200, Krzysztof Kozlowski wrote:
> The S3C RTC requires 32768 Hz clock as input which is provided by PMIC.
> However there is no such clock provider but rather a regulator driver
> which registers the clock as a regulator. This is an old driver which
> will not be updated so add a workaround - a fixed-clock to fill missing
> clock phandle reference in S3C RTC.
>
> This fixes dtbs_check warnings:
>
> rtc@e2800000: clocks: [[2, 145]] is too short
> rtc@e2800000: clock-names: ['rtc'] is too short
>
> Signed-off-by: Krzysztof Kozlowski <[email protected]>
> ---
> arch/arm/boot/dts/s5pv210-aquila.dts | 17 +++++++++++++++++
Applied 10-19.
Best regards,
Krzysztof
On Mon, Sep 07, 2020 at 06:11:40PM +0200, Krzysztof Kozlowski wrote:
> The device tree schema expects SPI controller to be named "spi",
> otherwise dtbs_check complain with a warning like:
>
> spi-gpio-0: $nodename:0: 'spi-gpio-0' does not match '^spi(@.*|-[0-9a-f])*$'
>
> Signed-off-by: Krzysztof Kozlowski <[email protected]>
> ---
> arch/arm/boot/dts/s5pv210-aries.dtsi | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Applied.
Best regards,
Krzysztof
On Tue, 8 Sep 2020 at 22:25, Rob Herring <[email protected]> wrote:
>
> On Mon, Sep 07, 2020 at 06:11:18PM +0200, Krzysztof Kozlowski wrote:
> > The ADC in S3C/S5P/Exynos SoCs can be used also for handling touch
> > screen. In such case the second interrupt is required. This second
> > interrupt can be anyway provided, even without touch screens. This
> > fixes dtbs_check warnings like:
> >
> > arch/arm/boot/dts/s5pv210-aquila.dt.yaml: adc@e1700000: interrupts: [[23], [24]] is too long
> >
> > Signed-off-by: Krzysztof Kozlowski <[email protected]>
> > ---
> > .../bindings/iio/adc/samsung,exynos-adc.yaml | 15 ++++++++++++++-
> > 1 file changed, 14 insertions(+), 1 deletion(-)
> >
> > diff --git a/Documentation/devicetree/bindings/iio/adc/samsung,exynos-adc.yaml b/Documentation/devicetree/bindings/iio/adc/samsung,exynos-adc.yaml
> > index cc3c8ea6a894..89b4f9c252a6 100644
> > --- a/Documentation/devicetree/bindings/iio/adc/samsung,exynos-adc.yaml
> > +++ b/Documentation/devicetree/bindings/iio/adc/samsung,exynos-adc.yaml
> > @@ -41,7 +41,10 @@ properties:
> > maxItems: 2
> >
> > interrupts:
> > - maxItems: 1
> > + description:
> > + ADC interrupt followed by optional touchscreen interrupt.
> > + minItems: 1
> > + maxItems: 2
> >
> > "#io-channel-cells":
> > const: 1
> > @@ -107,6 +110,16 @@ allOf:
> > items:
> > - const: adc
> >
> > + - if:
> > + properties:
> > + has-touchscreen:
> > + true
>
> This evaluates as true if 'has-touchscreen' is not present too. You
> should use 'required' here.
I see, thanks. I'll send a v2.
Best regards,
Krzysztof
On Mon, Sep 07, 2020 at 06:11:37PM +0200, Krzysztof Kozlowski wrote:
> The fixed regulators are kept under dedicated "regulators" node but this
> causes multiple dtschema warnings:
>
> regulators: $nodename:0: 'regulators' does not match '^([a-z][a-z0-9\\-]+-bus|bus|soc|axi|ahb|apb)(@[0-9a-f]+)?$'
> regulators: #size-cells:0:0: 0 is not one of [1, 2]
> regulators: fixed-regulator@0:reg:0: [0] is too short
> regulators: fixed-regulator@1:reg:0: [1] is too short
> regulators: fixed-regulator@2:reg:0: [2] is too short
> regulators: fixed-regulator@3:reg:0: [3] is too short
>
> Signed-off-by: Krzysztof Kozlowski <[email protected]>
> ---
> arch/arm/boot/dts/s5pv210-goni.dts | 64 +++++++++++++-----------------
Applied.
Best regards,
Krzysztof
On Mon, Sep 07, 2020 at 06:11:36PM +0200, Krzysztof Kozlowski wrote:
> The fixed regulators are kept under dedicated "regulators" node but this
> causes multiple dtschema warnings:
>
> regulators: $nodename:0: 'regulators' does not match '^([a-z][a-z0-9\\-]+-bus|bus|soc|axi|ahb|apb)(@[0-9a-f]+)?$'
> regulators: #size-cells:0:0: 0 is not one of [1, 2]
> regulators: fixed-regulator@0:reg:0: [0] is too short
> regulators: fixed-regulator@1:reg:0: [1] is too short
> regulators: fixed-regulator@2:reg:0: [2] is too short
>
> Signed-off-by: Krzysztof Kozlowski <[email protected]>
> ---
> arch/arm/boot/dts/s5pv210-aquila.dts | 47 +++++++++++-----------------
Applied.
Best regards,
Krzysztof
On Mon, Sep 07, 2020 at 06:11:38PM +0200, Krzysztof Kozlowski wrote:
> "gpios" property is deprecated. Update the Aquila DTS to fix
> dtbs_checks warnings like:
>
> i2c-pmic: 'sda-gpios' is a required property
> i2c-pmic: 'scl-gpios' is a required property
>
> Signed-off-by: Krzysztof Kozlowski <[email protected]>
> ---
> arch/arm/boot/dts/s5pv210-aquila.dts | 4 ++--
Applied.
Best regards,
Krzysztof
On Mon, Sep 07, 2020 at 06:11:39PM +0200, Krzysztof Kozlowski wrote:
> "gpios" property is deprecated. Update the Goni DTS to fix
> dtbs_checks warnings like:
>
> i2c-pmic: 'sda-gpios' is a required property
> i2c-pmic: 'scl-gpios' is a required property
>
> Signed-off-by: Krzysztof Kozlowski <[email protected]>
> ---
> arch/arm/boot/dts/s5pv210-goni.dts | 4 ++--
Applied.
Best regards,
Krzysztof