Enable audio support for J721S2 EVM
Subsystems (2)
v3 cover Enable audio support for J721S2 EVM
This patch series, adds support for analog audio on J721S2 EVM using device tree overlays.
Earlier version of the patchset sent upstream[0] was rejected as its dependency[1], which resolves the DTBS check errors introduced by [0] also got rejected on the grounds of ABI breakage.
Another solution to fix the DTBS check errors introduced by [0] is to modify the ti,j721e-system-controller.yaml binding to allow audio-refclk as clock-controller child. This is done in the first patch of this series.
Changes since v2:
Link to v2: https://lore.kernel.org/all/[email protected]/
- Fix Makefile entries to follow alphabetical ordering
- Update model string from "j721e-cpb" to "j721s2-cpb"
- Fix gpio-line-names typo: "UBS926_PWR_SW_CNTRL" -> "UB926_PWR_SW_CNTRL"
Changes since v1:
Link to v1: https://lore.kernel.org/all/[email protected]/
- Convert the changes to an overlay
- Enumerate the I2C mux used
- Remove CANUART_MUX_SEL1 gpio hog
- Fix typos
- Add gpio-line-names
- Fix commit message to showcase the right idle-state for muxes
- Carry review from Rob and Hari
Test log: https://gist.github.com/Jamm02/4d4c00bf88fa76cddae6319124341c53
[0]: https://lore.kernel.org/linux-arm-kernel/[email protected]/
[1]: https://lore.kernel.org/all/[email protected]/
Jayesh Choudhary (1):
arm64: dts: ti: Add audio overlay for k3-j721s2-evm
Moteen Shah (1):
ti,j721e-system-controller.yaml: Allow audio-refclk as
clock-controller child
.../soc/ti/ti,j721e-system-controller.yaml | 6 +- arch/arm64/boot/dts/ti/Makefile | 4 + .../boot/dts/ti/k3-j721s2-evm-audio.dtso | 161 ++++++++++++++++++ 3 files changed, 169 insertions(+), 2 deletions(-) create mode 100644 arch/arm64/boot/dts/ti/k3-j721s2-evm-audio.dtso
Signature · 1 line
2.34.1
PATCH v3 1/2 ti,j721e-system-controller.yaml: Allow audio-refclk as clock-controller child
The ti,j721e-system-controller binding currently only allows clock-controller@ child nodes to reference the ti,am654-ehrpwm-tbclk schema. However, the system controller on J721S2 also contains audio reference clock controllers (ti,am62-audio-refclk) that use the same clock-controller@XXXX naming pattern.
Hence, extend the clock-controller pattern to accept either ehrpwm-tbclk or audio-refclk schemas using a oneOf constraint.
--- .../bindings/soc/ti/ti,j721e-system-controller.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/soc/ti/ti,j721e-system-controller.yaml +4 -2
@@ -53,9 +53,11 @@ patternProperties: "^clock-controller@[0-9a-f]+$": type: object - $ref: /schemas/clock/ti,am654-ehrpwm-tbclk.yaml# + oneOf: + - $ref: /schemas/clock/ti,am654-ehrpwm-tbclk.yaml# + - $ref: /schemas/clock/ti,am62-audio-refclk.yaml# description: - Clock provider for TI EHRPWM nodes. + Clock provider for TI EHRPWM or Audio Reference Clock nodes. "phy@[0-9a-f]+$": type: object
Signature · 1 line
2.34.1
Re: [PATCH v3 1/2] ti,j721e-system-controller.yaml: Allow audio-refclk as clock-controller child
Quoted 3 lines · Moteen Shah
The ti,j721e-system-controller binding currently only allows clock-controller@ child nodes to reference the ti,am654-ehrpwm-tbclk schema. However, the system controller on J721S2 also contains audio
J721S2 or AM62?
Quoted 16 lines
reference clock controllers (ti,am62-audio-refclk) that use the same clock-controller@XXXX naming pattern.
Hence, extend the clock-controller pattern to accept either ehrpwm-tbclk or audio-refclk schemas using a oneOf constraint.
Signed-off-by Moteen Shah <[email protected]>--- .../bindings/soc/ti/ti,j721e-system-controller.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)Documentation/devicetree/bindings/soc/ti/ti,j721e-system-controller.yaml +0
-0
Documentation/devicetree/bindings/soc/ti/ti,j721e-system-controller.yaml patternProperties: · line 58
Quoted 7 lines
Documentation/devicetree/bindings/soc/ti/ti,j721e-system-controller.yaml +3
-1@@ -53,9 +53,11 @@ patternProperties: "^clock-controller@[0-9a-f]+$": type: object - $ref: /schemas/clock/ti,am654-ehrpwm-tbclk.yaml# + oneOf: + - $ref: /schemas/clock/ti,am654-ehrpwm-tbclk.yaml# + - $ref: /schemas/clock/ti,am62-audio-refclk.yaml#
Alphanumerical order.
There is no ti,am62 in the top level compatibles, so why am62 is here? Top level has j721s2 but this ti,am62-audio-refclk.yaml only am62.
Best regards,
Krzysztof
Re: [PATCH v3 1/2] ti,j721e-system-controller.yaml: Allow audio-refclk as clock-controller child
Hey Krzysztof,
Quoted 31 lines · Krzysztof Kozlowski
Quoted 3 lines · Moteen Shah
The ti,j721e-system-controller binding currently only allows clock-controller@ child nodes to reference the ti,am654-ehrpwm-tbclk schema. However, the system controller on J721S2 also contains audio
J721S2 or AM62?
Quoted 16 lines
reference clock controllers (ti,am62-audio-refclk) that use the same clock-controller@XXXX naming pattern.
Hence, extend the clock-controller pattern to accept either ehrpwm-tbclk or audio-refclk schemas using a oneOf constraint.
Signed-off-by Moteen Shah <[email protected]>--- .../bindings/soc/ti/ti,j721e-system-controller.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)Documentation/devicetree/bindings/soc/ti/ti,j721e-system-controller.yaml +0
-0Documentation/devicetree/bindings/soc/ti/ti,j721e-system-controller.yaml patternProperties: · line 58
Quoted 7 lines
Documentation/devicetree/bindings/soc/ti/ti,j721e-system-controller.yaml +3
-1@@ -53,9 +53,11 @@ patternProperties: "^clock-controller@[0-9a-f]+$": type: object - $ref: /schemas/clock/ti,am654-ehrpwm-tbclk.yaml# + oneOf: + - $ref: /schemas/clock/ti,am654-ehrpwm-tbclk.yaml# + - $ref: /schemas/clock/ti,am62-audio-refclk.yaml#Alphanumerical order.
Quoted 5 lines
There is no ti,am62 in the top level compatibles, so why am62 is here? Top level has j721s2 but this ti,am62-audio-refclk.yaml only am62.
Best regards,
Krzysztof
The "ti,am62-audio-refclk" compatible refers to a shared audio reference clock IP block that was first introduced/named on AM62 but is present on other TI K3 SoCs as well, including J721S2. The compatible string identifies the IP block, not the SoC family.
This is already an established pattern — k3-j784s4-j742s2-main-common.dtsi uses the same compatible for the J784S4/J742S2 audio refclk node.
The ti,j721e-system-controller.yaml binding (which covers ti,j721s2-system-controller) already lists ti,am62-audio-refclk as an allowed clock-controller child, which was updated in patch 1/2 of this series to make room for this node.
Best regards,
Moteen Shah
Re: [PATCH v3 1/2] ti,j721e-system-controller.yaml: Allow audio-refclk as clock-controller child
Quoted 40 lines · Moteen Shah
Hey Krzysztof,
Quoted 31 lines · Krzysztof Kozlowski
Quoted 3 lines · Moteen Shah
The ti,j721e-system-controller binding currently only allows clock-controller@ child nodes to reference the ti,am654-ehrpwm-tbclk schema. However, the system controller on J721S2 also contains audio
J721S2 or AM62?
Quoted 16 lines
reference clock controllers (ti,am62-audio-refclk) that use the same clock-controller@XXXX naming pattern.
Hence, extend the clock-controller pattern to accept either ehrpwm-tbclk or audio-refclk schemas using a oneOf constraint.
Signed-off-by Moteen Shah <[email protected]>--- .../bindings/soc/ti/ti,j721e-system-controller.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)Documentation/devicetree/bindings/soc/ti/ti,j721e-system-controller.yaml +0
-0Documentation/devicetree/bindings/soc/ti/ti,j721e-system-controller.yaml patternProperties: · line 58
Quoted 7 lines
Documentation/devicetree/bindings/soc/ti/ti,j721e-system-controller.yaml +3
-1@@ -53,9 +53,11 @@ patternProperties: "^clock-controller@[0-9a-f]+$": type: object - $ref: /schemas/clock/ti,am654-ehrpwm-tbclk.yaml# + oneOf: + - $ref: /schemas/clock/ti,am654-ehrpwm-tbclk.yaml# + - $ref: /schemas/clock/ti,am62-audio-refclk.yaml#Alphanumerical order.
Quoted 5 lines
There is no ti,am62 in the top level compatibles, so why am62 is here? Top level has j721s2 but this ti,am62-audio-refclk.yaml only am62.
Best regards,
Krzysztof
Quoted 8 lines
The "ti,am62-audio-refclk" compatible refers to a shared audio reference clock IP block that was first introduced/named on AM62 but is present on other TI K3 SoCs as well, including J721S2. The compatible string identifies the IP block, not the SoC family.
This is already an established pattern —
k3-j784s4-j742s2-main-common.dtsiuses the same compatible for the J784S4/J742S2 audio refclk node.
Please read carefully writing-bindings doc.
Best regards,
Krzysztof
Re: [PATCH v3 1/2] ti,j721e-system-controller.yaml: Allow audio-refclk as clock-controller child
Hey Krzysztof,
Quoted 45 lines · Krzysztof Kozlowski
Quoted 44 lines · Moteen Shah
Hey Krzysztof,
Quoted 31 lines · Krzysztof Kozlowski
Quoted 3 lines · Moteen Shah
The ti,j721e-system-controller binding currently only allows clock-controller@ child nodes to reference the ti,am654-ehrpwm-tbclk schema. However, the system controller on J721S2 also contains audio
J721S2 or AM62?
Quoted 16 lines
reference clock controllers (ti,am62-audio-refclk) that use the same clock-controller@XXXX naming pattern.
Hence, extend the clock-controller pattern to accept either ehrpwm-tbclk or audio-refclk schemas using a oneOf constraint.
Signed-off-by Moteen Shah <[email protected]>--- .../bindings/soc/ti/ti,j721e-system-controller.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)Documentation/devicetree/bindings/soc/ti/ti,j721e-system-controller.yaml +0
-0Documentation/devicetree/bindings/soc/ti/ti,j721e-system-controller.yaml patternProperties: · line 58
Quoted 7 lines
Documentation/devicetree/bindings/soc/ti/ti,j721e-system-controller.yaml +3
-1@@ -53,9 +53,11 @@ patternProperties: "^clock-controller@[0-9a-f]+$": type: object - $ref: /schemas/clock/ti,am654-ehrpwm-tbclk.yaml# + oneOf: + - $ref: /schemas/clock/ti,am654-ehrpwm-tbclk.yaml# + - $ref: /schemas/clock/ti,am62-audio-refclk.yaml#Alphanumerical order.
Quoted 5 lines
There is no ti,am62 in the top level compatibles, so why am62 is here? Top level has j721s2 but this ti,am62-audio-refclk.yaml only am62.
Best regards,
KrzysztofThe "ti,am62-audio-refclk" compatible refers to a shared audio reference clock IP block that was first introduced/named on AM62 but is present on other TI K3 SoCs as well, including J721S2. The compatible string identifies the IP block, not the SoC family.
Quoted 5 lines
Quoted 3 lines
This is already an established pattern —
k3-j784s4-j742s2-main-common.dtsiuses the same compatible for the J784S4/J742S2 audio refclk node.Please read carefully writing-bindings doc.
I am planning add another compatible for j721s2: "compatible = "ti,j721s2-audio-refclk", "ti,am62-audio-refclk""
This will eventually be falling back to am62-audio-refclk's compatible for now, since we require the same functionality as "ti,am62-audio-refclk" but if in future someone wants j721s2 specific change only they can use the new compatible for j721s2 specific usecase. Does that sounds okay?
Regards,
Moteen
Quoted 2 lines
Best regards,
Krzysztof
PATCH v3 2/2 arm64: dts: ti: Add audio overlay for k3-j721s2-evm
In reply to Moteen ShahFrom: Jayesh Choudhary <[email protected]>
Add device tree overlay to enable analog audio support on J721S2-EVM using PCM3168A codec connected to McASP4 serializers.
- Add nodes for sound-card, audio codec, I2C3 and McASP4
- Add pinmux for I2C3, McASP4, AUDIO_EXT_REFCLK1 and WKUP_GPIO_0
- Add GPIO expander (TCA6408) for codec control
- Add GPIO hogs to route I2C3 lines and McASP serializers
- Set idle-state to 0 in mux0 and mux1 for McASP signal routing
--- arch/arm64/boot/dts/ti/Makefile | 4 + .../boot/dts/ti/k3-j721s2-evm-audio.dtso | 161 ++++++++++++++++++ 2 files changed, 165 insertions(+) create mode 100644 arch/arm64/boot/dts/ti/k3-j721s2-evm-audio.dtso
arch/arm64/boot/dts/ti/Makefile +4 -0
@@ -138,6 +138,7 @@ dtb-$(CONFIG_ARCH_K3) += k3-j721s2-common-proc-board.dtb dtb-$(CONFIG_ARCH_K3) += k3-j721s2-evm-gesi-exp-board.dtbo k3-j721s2-evm-dtbs := k3-j721s2-common-proc-board.dtb k3-j721s2-evm-gesi-exp-board.dtbo dtb-$(CONFIG_ARCH_K3) += k3-j721s2-evm.dtb +dtb-$(CONFIG_ARCH_K3) += k3-j721s2-evm-audio.dtbo dtb-$(CONFIG_ARCH_K3) += k3-j721s2-evm-pcie1-ep.dtbo dtb-$(CONFIG_ARCH_K3) += k3-j721s2-evm-usb0-type-a.dtbo
@@ -264,6 +265,8 @@ k3-j721e-evm-pcie1-ep-dtbs := k3-j721e-common-proc-board.dtb \ k3-j721e-evm-pcie1-ep.dtbo k3-j721e-sk-csi2-dual-imx219-dtbs := k3-j721e-sk.dtb \ k3-j721e-sk-csi2-dual-imx219.dtbo +k3-j721s2-evm-audio-dtbs := k3-j721s2-common-proc-board.dtb \ + k3-j721s2-evm-audio.dtbo k3-j721s2-evm-pcie1-ep-dtbs := k3-j721s2-common-proc-board.dtb \ k3-j721s2-evm-pcie1-ep.dtbo k3-j721s2-evm-usb0-type-a-dtbs := k3-j721s2-common-proc-board.dtb \
@@ -328,6 +331,7 @@ dtb- += k3-am625-beagleplay-csi2-ov5640.dtb \ k3-j721e-evm-pcie0-ep.dtb \ k3-j721e-evm-pcie1-ep.dtb \ k3-j721e-sk-csi2-dual-imx219.dtb \ + k3-j721s2-evm-audio.dtb \ k3-j721s2-evm-pcie1-ep.dtb \ k3-j721s2-evm-usb0-type-a.dtb \ k3-j722s-evm-csi2-quad-rpi-cam-imx219.dtb \
arch/arm64/boot/dts/ti/k3-j721s2-evm-audio.dtso new file +161 -0
161 lines not on this page · raw message
Signature · 1 line
2.34.1
Re: [PATCH v3 2/2] arm64: dts: ti: Add audio overlay for k3-j721s2-evm
Quoted 13 lines · Moteen Shah
arch/arm64/boot/dts/ti/k3-j721s2-evm-audio.dtso new file +13
-0+ p10-hog { + /* P10 - MCASP/TRACE_MUX_S1 */ + gpio-hog; + gpios = <10 GPIO_ACTIVE_HIGH>; + output-high; + line-name = "MCASP/TRACE_MUX_S1"; + }; +}; + +&mux0 { + idle-state = <0>; +}; +
arch/arm64/boot/dts/ti/k3-j721s2-evm-audio.dtso line 96
Quoted 10 lines
arch/arm64/boot/dts/ti/k3-j721s2-evm-audio.dtso new file +10
-0+&mux1 { + idle-state = <0>; +}; + +&scm_conf { + #address-cells = <1>; + #size-cells = <1>; + + audio_refclk1: clock-controller@42e4 { + compatible = "ti,am62-audio-refclk";
there is no am62 compatible or DTSI include in the parent SoC file, so am62n seems to be completely different device than j721s2.
Why does am62b appear here in this context?
Best regards,
Krzysztof