Message ID | 20230601131332.26877-1-francesco@dolcini.it |
---|---|
Headers | show |
Series | Add Toradex Verdin AM62 | expand |
On 01/06/23 18:43, Francesco Dolcini wrote: [...] > +/* Verdin I2C_1 */ > +&main_i2c1 { > + status = "okay"; > + > + /* Audio Codec */ > + nau8822_1a: audio-codec@1a { > + compatible = "nuvoton,nau8822"; > + reg = <0x1a>; > + pinctrl-names = "default"; > + pinctrl-0 = <&pinctrl_i2s1_mclk>; /* Configure AUDIO_EXT_REFCLK1 pin as output */ > + #sound-dai-cells = <0>; > + > + /* POSTDIV4_16FF_MAIN_2_HSDIVOUT8_CLK -> AUDIO_EXT_REFCLK1 */ > + assigned-clocks = <&k3_clks 157 10>; > + assigned-clock-parents = <&k3_clks 157 18>; > + assigned-clock-rates = <25000000>; /* for 48KHz ± 1.7% */ > + }; > + Oops, this node fails dtbs_check make ARCH=arm64 CROSS_COMPILE=$V8_CROSS CHECK_DTBS=y ti/k3-am625-verdin-nonwifi-dev.dtb /work/linux/arch/arm64/boot/dts/ti/k3-am625-verdin-nonwifi-dev.dtb: audio-codec@1a: '#sound-dai-cells', 'assigned-clock-parents', 'assigned-clock-rates', 'assigned-clocks' do not match any of the regexes: 'pinctrl-[0-9]+' From schema: /home/a0132425/workspace/k3-next/Documentation/devicetree/bindings/sound/nuvoton,nau8822.yaml /work/linux/arch/arm64/boot/dts/ti/k3-am625-verdin-nonwifi-dev.dtb: audio-codec@1a: 'anyOf' conditional failed, one must be fixed: 'clocks' is a required property '#clock-cells' is a required property From schema: /work/.local/lib/python3.10/site-packages/dtschema/schemas/clock/clock.yaml [...]
On 01/06/23 18:43, Francesco Dolcini wrote: [...] > +/* Verdin I2C_1 */ > +&main_i2c1 { > + status = "okay"; > + > + /* Audio Codec */ > + wm8904_1a: audio-codec@1a { > + compatible = "wlf,wm8904"; This node doesn't have YAML bindings :( > + reg = <0x1a>; > + pinctrl-names = "default"; > + pinctrl-0 = <&pinctrl_i2s1_mclk>; > + /* POSTDIV4_16FF_MAIN_2_HSDIVOUT8_CLK -> AUDIO_EXT_REFCLK1 */ > + assigned-clocks = <&k3_clks 157 10>; > + assigned-clock-parents = <&k3_clks 157 18>; > + assigned-clock-rates = <25000000>; /* for 48KHz ± 1.7% */ > + clocks = <&k3_clks 157 10>; > + clock-names = "mclk"; > + AVDD-supply = <®_1v8_sw>; > + CPVDD-supply = <®_1v8_sw>; > + DBVDD-supply = <®_1v8_sw>; > + DCVDD-supply = <®_1v8_sw>; > + MICVDD-supply = <®_1v8_sw>; I dont see these properties in .txt bindings either. > + #sound-dai-cells = <0>; > + }; > + [...]
On Thu, Jun 15, 2023 at 11:52:22AM +0530, Vignesh Raghavendra wrote: > > > On 01/06/23 18:43, Francesco Dolcini wrote: > > [...] > > > +/* Verdin I2C_1 */ > > +&main_i2c1 { > > + status = "okay"; > > + > > + /* Audio Codec */ > > + wm8904_1a: audio-codec@1a { > > + compatible = "wlf,wm8904"; > > This node doesn't have YAML bindings :( Correct. I do not see a problem with that for this specific patch. > > + AVDD-supply = <®_1v8_sw>; > > + CPVDD-supply = <®_1v8_sw>; > > + DBVDD-supply = <®_1v8_sw>; > > + DCVDD-supply = <®_1v8_sw>; > > + MICVDD-supply = <®_1v8_sw>; > > I dont see these properties in .txt bindings either. Yes, the .txt file is not correct. See here for more details https://lore.kernel.org/all/20230405200341.4911-1-danascape@gmail.com/ With that said they are required $ grep -A5 wm8904_supply_names sound/soc/codecs/wm8904.c static const char *wm8904_supply_names[WM8904_NUM_SUPPLIES] = { "DCVDD", "DBVDD", "AVDD", "CPVDD", "MICVDD", -- wm8904->supplies[i].supply = wm8904_supply_names[i]; ret = devm_regulator_bulk_get(&i2c->dev, ARRAY_SIZE(wm8904->supplies), wm8904->supplies); if (ret != 0) { dev_err(&i2c->dev, "Failed to request supplies: %d\n", ret); Francesco
On Thu, Jun 15, 2023 at 11:38:00AM +0530, Vignesh Raghavendra wrote: > > > On 01/06/23 18:43, Francesco Dolcini wrote: > > [...] > > > +/* Verdin I2C_1 */ > > +&main_i2c1 { > > + status = "okay"; > > + > > + /* Audio Codec */ > > + nau8822_1a: audio-codec@1a { > > + compatible = "nuvoton,nau8822"; > > + reg = <0x1a>; > > + pinctrl-names = "default"; > > + pinctrl-0 = <&pinctrl_i2s1_mclk>; /* Configure AUDIO_EXT_REFCLK1 pin as output */ > > + #sound-dai-cells = <0>; > > + > > + /* POSTDIV4_16FF_MAIN_2_HSDIVOUT8_CLK -> AUDIO_EXT_REFCLK1 */ > > + assigned-clocks = <&k3_clks 157 10>; > > + assigned-clock-parents = <&k3_clks 157 18>; > > + assigned-clock-rates = <25000000>; /* for 48KHz ± 1.7% */ > > + }; > > + > > Oops, this node fails dtbs_check > > make ARCH=arm64 CROSS_COMPILE=$V8_CROSS CHECK_DTBS=y ti/k3-am625-verdin-nonwifi-dev.dtb > > /work/linux/arch/arm64/boot/dts/ti/k3-am625-verdin-nonwifi-dev.dtb: audio-codec@1a: '#sound-dai-cells', 'assigned-clock-parents', 'assigned-clock-rates', 'assigned-clocks' do not match any of the regexes: 'pinctrl-[0-9]+' > From schema: /home/a0132425/workspace/k3-next/Documentation/devicetree/bindings/sound/nuvoton,nau8822.yaml > /work/linux/arch/arm64/boot/dts/ti/k3-am625-verdin-nonwifi-dev.dtb: audio-codec@1a: 'anyOf' conditional failed, one must be fixed: > 'clocks' is a required property > '#clock-cells' is a required property > From schema: /work/.local/lib/python3.10/site-packages/dtschema/schemas/clock/clock.yaml This properties are needed here, it will not work without. Not the expert on audio codec and sound cards DT binding, but to me this is just the yaml not being correct. Francesco
On 15/06/23 12:21, Francesco Dolcini wrote: > On Thu, Jun 15, 2023 at 11:38:00AM +0530, Vignesh Raghavendra wrote: >> >> >> On 01/06/23 18:43, Francesco Dolcini wrote: >> >> [...] >> >>> +/* Verdin I2C_1 */ >>> +&main_i2c1 { >>> + status = "okay"; >>> + >>> + /* Audio Codec */ >>> + nau8822_1a: audio-codec@1a { >>> + compatible = "nuvoton,nau8822"; >>> + reg = <0x1a>; >>> + pinctrl-names = "default"; >>> + pinctrl-0 = <&pinctrl_i2s1_mclk>; /* Configure AUDIO_EXT_REFCLK1 pin as output */ >>> + #sound-dai-cells = <0>; >>> + >>> + /* POSTDIV4_16FF_MAIN_2_HSDIVOUT8_CLK -> AUDIO_EXT_REFCLK1 */ >>> + assigned-clocks = <&k3_clks 157 10>; >>> + assigned-clock-parents = <&k3_clks 157 18>; >>> + assigned-clock-rates = <25000000>; /* for 48KHz ± 1.7% */ >>> + }; >>> + >> >> Oops, this node fails dtbs_check >> >> make ARCH=arm64 CROSS_COMPILE=$V8_CROSS CHECK_DTBS=y ti/k3-am625-verdin-nonwifi-dev.dtb >> >> /work/linux/arch/arm64/boot/dts/ti/k3-am625-verdin-nonwifi-dev.dtb: audio-codec@1a: '#sound-dai-cells', 'assigned-clock-parents', 'assigned-clock-rates', 'assigned-clocks' do not match any of the regexes: 'pinctrl-[0-9]+' >> From schema: /home/a0132425/workspace/k3-next/Documentation/devicetree/bindings/sound/nuvoton,nau8822.yaml >> /work/linux/arch/arm64/boot/dts/ti/k3-am625-verdin-nonwifi-dev.dtb: audio-codec@1a: 'anyOf' conditional failed, one must be fixed: >> 'clocks' is a required property >> '#clock-cells' is a required property >> From schema: /work/.local/lib/python3.10/site-packages/dtschema/schemas/clock/clock.yaml > > This properties are needed here, it will not work without. Agree on the need. But, I cannot take the patch w/o binding update. We will end up with messy dts files that would have deviated from bindings. Could you please post an update to bindings yaml? I suggest to drop audio codec support and add it back once bindings are updated/fixed. > > Not the expert on audio codec and sound cards DT binding, but to me this is > just the yaml not being correct. > > Francesco >
On Thu, Jun 15, 2023 at 01:08:11PM +0530, Vignesh Raghavendra wrote: > > > On 15/06/23 12:21, Francesco Dolcini wrote: > > On Thu, Jun 15, 2023 at 11:38:00AM +0530, Vignesh Raghavendra wrote: > >> > >> > >> On 01/06/23 18:43, Francesco Dolcini wrote: > >> > >> [...] > >> > >>> +/* Verdin I2C_1 */ > >>> +&main_i2c1 { > >>> + status = "okay"; > >>> + > >>> + /* Audio Codec */ > >>> + nau8822_1a: audio-codec@1a { > >>> + compatible = "nuvoton,nau8822"; > >>> + reg = <0x1a>; > >>> + pinctrl-names = "default"; > >>> + pinctrl-0 = <&pinctrl_i2s1_mclk>; /* Configure AUDIO_EXT_REFCLK1 pin as output */ > >>> + #sound-dai-cells = <0>; > >>> + > >>> + /* POSTDIV4_16FF_MAIN_2_HSDIVOUT8_CLK -> AUDIO_EXT_REFCLK1 */ > >>> + assigned-clocks = <&k3_clks 157 10>; > >>> + assigned-clock-parents = <&k3_clks 157 18>; > >>> + assigned-clock-rates = <25000000>; /* for 48KHz ± 1.7% */ > >>> + }; > >>> + > >> > >> Oops, this node fails dtbs_check > >> > >> make ARCH=arm64 CROSS_COMPILE=$V8_CROSS CHECK_DTBS=y ti/k3-am625-verdin-nonwifi-dev.dtb > >> > >> /work/linux/arch/arm64/boot/dts/ti/k3-am625-verdin-nonwifi-dev.dtb: audio-codec@1a: '#sound-dai-cells', 'assigned-clock-parents', 'assigned-clock-rates', 'assigned-clocks' do not match any of the regexes: 'pinctrl-[0-9]+' > >> From schema: /home/a0132425/workspace/k3-next/Documentation/devicetree/bindings/sound/nuvoton,nau8822.yaml > >> /work/linux/arch/arm64/boot/dts/ti/k3-am625-verdin-nonwifi-dev.dtb: audio-codec@1a: 'anyOf' conditional failed, one must be fixed: > >> 'clocks' is a required property > >> '#clock-cells' is a required property > >> From schema: /work/.local/lib/python3.10/site-packages/dtschema/schemas/clock/clock.yaml > > > > This properties are needed here, it will not work without. > > Agree on the need. But, I cannot take the patch w/o binding update. We > will end up with messy dts files that would have deviated from bindings. Fine, however, one question, is this a new policy? Or a specific TI branch policy? From what I can tell so far there was nothing mandatory while the DT binding conversion from txt to yaml is in progress. > Could you please post an update to bindings yaml? I suggest to drop > audio codec support and add it back once bindings are updated/fixed. I will proceed like that, thanks. I would be happy to see the verdin-am62 added in the next merge window. Thanks for the review, Francesco
On 15/06/23 13:18, Francesco Dolcini wrote: > On Thu, Jun 15, 2023 at 01:08:11PM +0530, Vignesh Raghavendra wrote: >> >> >> On 15/06/23 12:21, Francesco Dolcini wrote: >>> On Thu, Jun 15, 2023 at 11:38:00AM +0530, Vignesh Raghavendra wrote: >>>> >>>> >>>> On 01/06/23 18:43, Francesco Dolcini wrote: >>>> >>>> [...] >>>> >>>>> +/* Verdin I2C_1 */ >>>>> +&main_i2c1 { >>>>> + status = "okay"; >>>>> + >>>>> + /* Audio Codec */ >>>>> + nau8822_1a: audio-codec@1a { >>>>> + compatible = "nuvoton,nau8822"; >>>>> + reg = <0x1a>; >>>>> + pinctrl-names = "default"; >>>>> + pinctrl-0 = <&pinctrl_i2s1_mclk>; /* Configure AUDIO_EXT_REFCLK1 pin as output */ >>>>> + #sound-dai-cells = <0>; >>>>> + >>>>> + /* POSTDIV4_16FF_MAIN_2_HSDIVOUT8_CLK -> AUDIO_EXT_REFCLK1 */ >>>>> + assigned-clocks = <&k3_clks 157 10>; >>>>> + assigned-clock-parents = <&k3_clks 157 18>; >>>>> + assigned-clock-rates = <25000000>; /* for 48KHz ± 1.7% */ >>>>> + }; >>>>> + >>>> >>>> Oops, this node fails dtbs_check >>>> >>>> make ARCH=arm64 CROSS_COMPILE=$V8_CROSS CHECK_DTBS=y ti/k3-am625-verdin-nonwifi-dev.dtb >>>> >>>> /work/linux/arch/arm64/boot/dts/ti/k3-am625-verdin-nonwifi-dev.dtb: audio-codec@1a: '#sound-dai-cells', 'assigned-clock-parents', 'assigned-clock-rates', 'assigned-clocks' do not match any of the regexes: 'pinctrl-[0-9]+' >>>> From schema: /home/a0132425/workspace/k3-next/Documentation/devicetree/bindings/sound/nuvoton,nau8822.yaml >>>> /work/linux/arch/arm64/boot/dts/ti/k3-am625-verdin-nonwifi-dev.dtb: audio-codec@1a: 'anyOf' conditional failed, one must be fixed: >>>> 'clocks' is a required property >>>> '#clock-cells' is a required property >>>> From schema: /work/.local/lib/python3.10/site-packages/dtschema/schemas/clock/clock.yaml >>> >>> This properties are needed here, it will not work without. >> >> Agree on the need. But, I cannot take the patch w/o binding update. We >> will end up with messy dts files that would have deviated from bindings. > > Fine, however, one question, is this a new policy? Or a specific TI > branch policy? No, this isn't TI specific. In general if YAML binding exists, then the DT nodes need to confirm to that schema. > From what I can tell so far there was nothing mandatory > while the DT binding conversion from txt to yaml is in progress. > I understand if the bindings are still in .txt format. But, in this case, bindings are converted to YAML and prohibit other properties unfortunately. >> Could you please post an update to bindings yaml? I suggest to drop >> audio codec support and add it back once bindings are updated/fixed. > I will proceed like that, thanks. I would be happy to see the > verdin-am62 added in the next merge window. > Great, thanks! > Thanks for the review, > Francesco
From: Francesco Dolcini <francesco.dolcini@toradex.com> This series adds support for the Toradex Verdin AM62 SoM which can be used on different carrier boards (Verdin Development Board, Dahlia and Yavia). The module consists of an TI AM62 family SoC (either AM623 or AM625), a TPS65219 PMIC, a Gigabit Ethernet PHY, 512MB to 2GB of LPDDR4 RAM, an eMMC, a TLA2024 ADC, an I2C EEPROM, an RX8130 RTC, and optional Parallel RGB to MIPI DSI bridge plus an optional Bluetooth/Wi-Fi module. Link: https://www.toradex.com/computer-on-modules/verdin-arm-family/ti-am62 v2: - removed spurious new lines - removed TODO comment - fixed pinctrl format - added link to products in dts/dtsi - removed useless rs485-rts-active-high property Francesco Dolcini (5): dt-bindings: arm: ti: add toradex,verdin-am62 et al. arm64: defconfig: enable drivers for Verdin AM62 arm64: dts: ti: add verdin am62 arm64: dts: ti: add verdin am62 dahlia arm64: dts: ti: add verdin am62 yavia .../devicetree/bindings/arm/ti/k3.yaml | 20 + arch/arm64/boot/dts/ti/Makefile | 6 + .../boot/dts/ti/k3-am62-verdin-dahlia.dtsi | 219 +++ .../arm64/boot/dts/ti/k3-am62-verdin-dev.dtsi | 240 +++ .../boot/dts/ti/k3-am62-verdin-nonwifi.dtsi | 20 + .../boot/dts/ti/k3-am62-verdin-wifi.dtsi | 39 + .../boot/dts/ti/k3-am62-verdin-yavia.dtsi | 207 +++ arch/arm64/boot/dts/ti/k3-am62-verdin.dtsi | 1401 +++++++++++++++++ .../dts/ti/k3-am625-verdin-nonwifi-dahlia.dts | 22 + .../dts/ti/k3-am625-verdin-nonwifi-dev.dts | 22 + .../dts/ti/k3-am625-verdin-nonwifi-yavia.dts | 22 + .../dts/ti/k3-am625-verdin-wifi-dahlia.dts | 22 + .../boot/dts/ti/k3-am625-verdin-wifi-dev.dts | 22 + .../dts/ti/k3-am625-verdin-wifi-yavia.dts | 22 + arch/arm64/configs/defconfig | 3 + 15 files changed, 2287 insertions(+) create mode 100644 arch/arm64/boot/dts/ti/k3-am62-verdin-dahlia.dtsi create mode 100644 arch/arm64/boot/dts/ti/k3-am62-verdin-dev.dtsi create mode 100644 arch/arm64/boot/dts/ti/k3-am62-verdin-nonwifi.dtsi create mode 100644 arch/arm64/boot/dts/ti/k3-am62-verdin-wifi.dtsi create mode 100644 arch/arm64/boot/dts/ti/k3-am62-verdin-yavia.dtsi create mode 100644 arch/arm64/boot/dts/ti/k3-am62-verdin.dtsi create mode 100644 arch/arm64/boot/dts/ti/k3-am625-verdin-nonwifi-dahlia.dts create mode 100644 arch/arm64/boot/dts/ti/k3-am625-verdin-nonwifi-dev.dts create mode 100644 arch/arm64/boot/dts/ti/k3-am625-verdin-nonwifi-yavia.dts create mode 100644 arch/arm64/boot/dts/ti/k3-am625-verdin-wifi-dahlia.dts create mode 100644 arch/arm64/boot/dts/ti/k3-am625-verdin-wifi-dev.dts create mode 100644 arch/arm64/boot/dts/ti/k3-am625-verdin-wifi-yavia.dts