Message ID | 20221004-up-aml-fix-spi-v4-1-0342d8e10c49@baylibre.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | spi: amlogic: meson-spicc: Use pinctrl to drive CLK line when idle | expand |
On 21/10/2022 09:31, Amjad Ouled-Ameur wrote: > SPI pins of the SPICC Controller in Meson-GX needs to be controlled by > pin biais when idle. Therefore define three pinctrl names: > - default: SPI pins are controlled by spi function. > - idle-high: SCLK pin is pulled-up, but MOSI/MISO are still controlled > by spi function. > - idle-low: SCLK pin is pulled-down, but MOSI/MISO are still controlled > by spi function. > > Reported-by: Da Xue <da@libre.computer> > Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> > Signed-off-by: Amjad Ouled-Ameur <aouledameur@baylibre.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Best regards, Krzysztof
On Fri, Oct 21, 2022 at 3:31 PM Amjad Ouled-Ameur <aouledameur@baylibre.com> wrote: > > SPI pins of the SPICC Controller in Meson-GX needs to be controlled by > pin biais when idle. Therefore define three pinctrl names: s/biais/bias/ > - default: SPI pins are controlled by spi function. > - idle-high: SCLK pin is pulled-up, but MOSI/MISO are still controlled > by spi function. > - idle-low: SCLK pin is pulled-down, but MOSI/MISO are still controlled > by spi function. > > Reported-by: Da Xue <da@libre.computer> > Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> > Signed-off-by: Amjad Ouled-Ameur <aouledameur@baylibre.com> Other than the typo: Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Best regards, Martin
diff --git a/Documentation/devicetree/bindings/spi/amlogic,meson-gx-spicc.yaml b/Documentation/devicetree/bindings/spi/amlogic,meson-gx-spicc.yaml index 0c10f7678178..53eb6562b979 100644 --- a/Documentation/devicetree/bindings/spi/amlogic,meson-gx-spicc.yaml +++ b/Documentation/devicetree/bindings/spi/amlogic,meson-gx-spicc.yaml @@ -10,9 +10,6 @@ title: Amlogic Meson SPI Communication Controller maintainers: - Neil Armstrong <neil.armstrong@linaro.org> -allOf: - - $ref: "spi-controller.yaml#" - description: | The Meson SPICC is a generic SPI controller for general purpose Full-Duplex communications with dedicated 16 words RX/TX PIO FIFOs. @@ -43,31 +40,53 @@ properties: minItems: 1 maxItems: 2 -if: - properties: - compatible: - contains: - enum: - - amlogic,meson-g12a-spicc - -then: - properties: - clocks: - minItems: 2 - - clock-names: - items: - - const: core - - const: pclk - -else: - properties: - clocks: - maxItems: 1 - - clock-names: - items: - - const: core +allOf: + - $ref: "spi-controller.yaml#" + - if: + properties: + compatible: + contains: + enum: + - amlogic,meson-g12a-spicc + + then: + properties: + clocks: + minItems: 2 + + clock-names: + items: + - const: core + - const: pclk + + else: + properties: + clocks: + maxItems: 1 + + clock-names: + items: + - const: core + + - if: + properties: + compatible: + contains: + enum: + - amlogic,meson-gx-spicc + + then: + properties: + pinctrl-0: true + pinctrl-1: true + pinctrl-2: true + + pinctrl-names: + minItems: 1 + items: + - const: default + - const: idle-high + - const: idle-low required: - compatible