1c9ccf3a3SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 2c9ccf3a3SEmmanuel Vadot%YAML 1.2 3c9ccf3a3SEmmanuel Vadot--- 4c9ccf3a3SEmmanuel Vadot$id: http://devicetree.org/schemas/spi/samsung,spi.yaml# 5c9ccf3a3SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 6c9ccf3a3SEmmanuel Vadot 7c9ccf3a3SEmmanuel Vadottitle: Samsung S3C/S5P/Exynos SoC SPI controller 8c9ccf3a3SEmmanuel Vadot 9c9ccf3a3SEmmanuel Vadotmaintainers: 10c9ccf3a3SEmmanuel Vadot - Krzysztof Kozlowski <krzk@kernel.org> 11c9ccf3a3SEmmanuel Vadot 12c9ccf3a3SEmmanuel Vadotdescription: 13c9ccf3a3SEmmanuel Vadot All the SPI controller nodes should be represented in the aliases node using 14c9ccf3a3SEmmanuel Vadot the following format 'spi{n}' where n is a unique number for the alias. 15c9ccf3a3SEmmanuel Vadot 16c9ccf3a3SEmmanuel Vadotproperties: 17c9ccf3a3SEmmanuel Vadot compatible: 18c9ccf3a3SEmmanuel Vadot oneOf: 19c9ccf3a3SEmmanuel Vadot - enum: 20c9ccf3a3SEmmanuel Vadot - samsung,s3c2443-spi # for S3C2443, S3C2416 and S3C2450 21c9ccf3a3SEmmanuel Vadot - samsung,s3c6410-spi 22c9ccf3a3SEmmanuel Vadot - samsung,s5pv210-spi # for S5PV210 and S5PC110 23*b97ee269SEmmanuel Vadot - samsung,exynos4210-spi 24c9ccf3a3SEmmanuel Vadot - samsung,exynos5433-spi 25*b97ee269SEmmanuel Vadot - samsung,exynosautov9-spi 26c9ccf3a3SEmmanuel Vadot - tesla,fsd-spi 27c9ccf3a3SEmmanuel Vadot - const: samsung,exynos7-spi 28c9ccf3a3SEmmanuel Vadot deprecated: true 29c9ccf3a3SEmmanuel Vadot 30c9ccf3a3SEmmanuel Vadot clocks: 31c9ccf3a3SEmmanuel Vadot minItems: 2 32c9ccf3a3SEmmanuel Vadot maxItems: 3 33c9ccf3a3SEmmanuel Vadot 34c9ccf3a3SEmmanuel Vadot clock-names: 35c9ccf3a3SEmmanuel Vadot minItems: 2 36c9ccf3a3SEmmanuel Vadot maxItems: 3 37c9ccf3a3SEmmanuel Vadot 38c9ccf3a3SEmmanuel Vadot cs-gpios: true 39c9ccf3a3SEmmanuel Vadot 40c9ccf3a3SEmmanuel Vadot dmas: 41c9ccf3a3SEmmanuel Vadot minItems: 2 42c9ccf3a3SEmmanuel Vadot maxItems: 2 43c9ccf3a3SEmmanuel Vadot 44c9ccf3a3SEmmanuel Vadot dma-names: 45c9ccf3a3SEmmanuel Vadot items: 46c9ccf3a3SEmmanuel Vadot - const: tx 47c9ccf3a3SEmmanuel Vadot - const: rx 48c9ccf3a3SEmmanuel Vadot 49c9ccf3a3SEmmanuel Vadot interrupts: 50c9ccf3a3SEmmanuel Vadot maxItems: 1 51c9ccf3a3SEmmanuel Vadot 52c9ccf3a3SEmmanuel Vadot no-cs-readback: 53c9ccf3a3SEmmanuel Vadot description: 54c9ccf3a3SEmmanuel Vadot The CS line is disconnected, therefore the device should not operate 55c9ccf3a3SEmmanuel Vadot based on CS signalling. 56c9ccf3a3SEmmanuel Vadot type: boolean 57c9ccf3a3SEmmanuel Vadot 58c9ccf3a3SEmmanuel Vadot num-cs: 59c9ccf3a3SEmmanuel Vadot minimum: 1 60c9ccf3a3SEmmanuel Vadot maximum: 4 61c9ccf3a3SEmmanuel Vadot default: 1 62c9ccf3a3SEmmanuel Vadot 63c9ccf3a3SEmmanuel Vadot samsung,spi-src-clk: 64c9ccf3a3SEmmanuel Vadot description: 65c9ccf3a3SEmmanuel Vadot If the spi controller includes a internal clock mux to select the clock 66c9ccf3a3SEmmanuel Vadot source for the spi bus clock, this property can be used to indicate the 67c9ccf3a3SEmmanuel Vadot clock to be used for driving the spi bus clock. If not specified, the 68c9ccf3a3SEmmanuel Vadot clock number 0 is used as default. 69c9ccf3a3SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 70c9ccf3a3SEmmanuel Vadot default: 0 71c9ccf3a3SEmmanuel Vadot 72c9ccf3a3SEmmanuel Vadot reg: 73c9ccf3a3SEmmanuel Vadot maxItems: 1 74c9ccf3a3SEmmanuel Vadot 75c9ccf3a3SEmmanuel Vadotrequired: 76c9ccf3a3SEmmanuel Vadot - compatible 77c9ccf3a3SEmmanuel Vadot - clocks 78c9ccf3a3SEmmanuel Vadot - clock-names 79c9ccf3a3SEmmanuel Vadot - dmas 80c9ccf3a3SEmmanuel Vadot - dma-names 81c9ccf3a3SEmmanuel Vadot - interrupts 82c9ccf3a3SEmmanuel Vadot - reg 83c9ccf3a3SEmmanuel Vadot 84c9ccf3a3SEmmanuel VadotallOf: 85c9ccf3a3SEmmanuel Vadot - $ref: spi-controller.yaml# 86c9ccf3a3SEmmanuel Vadot - if: 87c9ccf3a3SEmmanuel Vadot properties: 88c9ccf3a3SEmmanuel Vadot compatible: 89c9ccf3a3SEmmanuel Vadot contains: 90*b97ee269SEmmanuel Vadot enum: 91*b97ee269SEmmanuel Vadot - samsung,exynos5433-spi 92*b97ee269SEmmanuel Vadot - samsung,exynosautov9-spi 93c9ccf3a3SEmmanuel Vadot then: 94c9ccf3a3SEmmanuel Vadot properties: 95c9ccf3a3SEmmanuel Vadot clocks: 96c9ccf3a3SEmmanuel Vadot minItems: 3 97c9ccf3a3SEmmanuel Vadot maxItems: 3 98c9ccf3a3SEmmanuel Vadot clock-names: 99c9ccf3a3SEmmanuel Vadot items: 100c9ccf3a3SEmmanuel Vadot - const: spi 101c9ccf3a3SEmmanuel Vadot - enum: 102c9ccf3a3SEmmanuel Vadot - spi_busclk0 103c9ccf3a3SEmmanuel Vadot - spi_busclk1 104c9ccf3a3SEmmanuel Vadot - spi_busclk2 105c9ccf3a3SEmmanuel Vadot - spi_busclk3 106c9ccf3a3SEmmanuel Vadot - const: spi_ioclk 107c9ccf3a3SEmmanuel Vadot else: 108c9ccf3a3SEmmanuel Vadot properties: 109c9ccf3a3SEmmanuel Vadot clocks: 110c9ccf3a3SEmmanuel Vadot minItems: 2 111c9ccf3a3SEmmanuel Vadot maxItems: 2 112c9ccf3a3SEmmanuel Vadot clock-names: 113c9ccf3a3SEmmanuel Vadot items: 114c9ccf3a3SEmmanuel Vadot - const: spi 115c9ccf3a3SEmmanuel Vadot - enum: 116c9ccf3a3SEmmanuel Vadot - spi_busclk0 117c9ccf3a3SEmmanuel Vadot - spi_busclk1 118c9ccf3a3SEmmanuel Vadot - spi_busclk2 119c9ccf3a3SEmmanuel Vadot - spi_busclk3 120c9ccf3a3SEmmanuel Vadot 121c9ccf3a3SEmmanuel VadotunevaluatedProperties: false 122c9ccf3a3SEmmanuel Vadot 123c9ccf3a3SEmmanuel Vadotexamples: 124c9ccf3a3SEmmanuel Vadot - | 125c9ccf3a3SEmmanuel Vadot #include <dt-bindings/clock/exynos5433.h> 126c9ccf3a3SEmmanuel Vadot #include <dt-bindings/clock/samsung,s2mps11.h> 127c9ccf3a3SEmmanuel Vadot #include <dt-bindings/interrupt-controller/arm-gic.h> 128c9ccf3a3SEmmanuel Vadot #include <dt-bindings/gpio/gpio.h> 129c9ccf3a3SEmmanuel Vadot 130c9ccf3a3SEmmanuel Vadot spi@14d30000 { 131c9ccf3a3SEmmanuel Vadot compatible = "samsung,exynos5433-spi"; 132c9ccf3a3SEmmanuel Vadot reg = <0x14d30000 0x100>; 133c9ccf3a3SEmmanuel Vadot interrupts = <GIC_SPI 433 IRQ_TYPE_LEVEL_HIGH>; 134c9ccf3a3SEmmanuel Vadot dmas = <&pdma0 11>, <&pdma0 10>; 135c9ccf3a3SEmmanuel Vadot dma-names = "tx", "rx"; 136c9ccf3a3SEmmanuel Vadot #address-cells = <1>; 137c9ccf3a3SEmmanuel Vadot #size-cells = <0>; 138c9ccf3a3SEmmanuel Vadot clocks = <&cmu_peric CLK_PCLK_SPI1>, 139c9ccf3a3SEmmanuel Vadot <&cmu_peric CLK_SCLK_SPI1>, 140c9ccf3a3SEmmanuel Vadot <&cmu_peric CLK_SCLK_IOCLK_SPI1>; 141c9ccf3a3SEmmanuel Vadot clock-names = "spi", 142c9ccf3a3SEmmanuel Vadot "spi_busclk0", 143c9ccf3a3SEmmanuel Vadot "spi_ioclk"; 144c9ccf3a3SEmmanuel Vadot samsung,spi-src-clk = <0>; 145c9ccf3a3SEmmanuel Vadot pinctrl-names = "default"; 146c9ccf3a3SEmmanuel Vadot pinctrl-0 = <&spi1_bus>; 147c9ccf3a3SEmmanuel Vadot num-cs = <1>; 148c9ccf3a3SEmmanuel Vadot 149c9ccf3a3SEmmanuel Vadot cs-gpios = <&gpd6 3 GPIO_ACTIVE_HIGH>; 150c9ccf3a3SEmmanuel Vadot 151c9ccf3a3SEmmanuel Vadot audio-codec@0 { 152c9ccf3a3SEmmanuel Vadot compatible = "wlf,wm5110"; 153c9ccf3a3SEmmanuel Vadot reg = <0x0>; 154c9ccf3a3SEmmanuel Vadot spi-max-frequency = <20000000>; 155c9ccf3a3SEmmanuel Vadot interrupt-parent = <&gpa0>; 156c9ccf3a3SEmmanuel Vadot interrupts = <4 IRQ_TYPE_NONE>; 157c9ccf3a3SEmmanuel Vadot clocks = <&pmu_system_controller 0>, 158c9ccf3a3SEmmanuel Vadot <&s2mps13_osc S2MPS11_CLK_BT>; 159c9ccf3a3SEmmanuel Vadot clock-names = "mclk1", "mclk2"; 160c9ccf3a3SEmmanuel Vadot 161c9ccf3a3SEmmanuel Vadot gpio-controller; 162c9ccf3a3SEmmanuel Vadot #gpio-cells = <2>; 163c9ccf3a3SEmmanuel Vadot interrupt-controller; 164c9ccf3a3SEmmanuel Vadot #interrupt-cells = <2>; 165c9ccf3a3SEmmanuel Vadot 166c9ccf3a3SEmmanuel Vadot wlf,micd-detect-debounce = <300>; 167c9ccf3a3SEmmanuel Vadot wlf,micd-bias-start-time = <0x1>; 168c9ccf3a3SEmmanuel Vadot wlf,micd-rate = <0x7>; 169c9ccf3a3SEmmanuel Vadot wlf,micd-dbtime = <0x2>; 170c9ccf3a3SEmmanuel Vadot wlf,micd-force-micbias; 171c9ccf3a3SEmmanuel Vadot wlf,micd-configs = <0x0 1 0>; 172c9ccf3a3SEmmanuel Vadot wlf,hpdet-channel = <1>; 173c9ccf3a3SEmmanuel Vadot wlf,gpsw = <0x1>; 174c9ccf3a3SEmmanuel Vadot wlf,inmode = <2 0 2 0>; 175c9ccf3a3SEmmanuel Vadot 176c9ccf3a3SEmmanuel Vadot wlf,reset = <&gpc0 7 GPIO_ACTIVE_HIGH>; 177c9ccf3a3SEmmanuel Vadot wlf,ldoena = <&gpf0 0 GPIO_ACTIVE_HIGH>; 178c9ccf3a3SEmmanuel Vadot 179c9ccf3a3SEmmanuel Vadot /* core supplies */ 180c9ccf3a3SEmmanuel Vadot AVDD-supply = <&ldo18_reg>; 181c9ccf3a3SEmmanuel Vadot DBVDD1-supply = <&ldo18_reg>; 182c9ccf3a3SEmmanuel Vadot CPVDD-supply = <&ldo18_reg>; 183c9ccf3a3SEmmanuel Vadot DBVDD2-supply = <&ldo18_reg>; 184c9ccf3a3SEmmanuel Vadot DBVDD3-supply = <&ldo18_reg>; 185c9ccf3a3SEmmanuel Vadot SPKVDDL-supply = <&ldo18_reg>; 186c9ccf3a3SEmmanuel Vadot SPKVDDR-supply = <&ldo18_reg>; 187c9ccf3a3SEmmanuel Vadot 188c9ccf3a3SEmmanuel Vadot controller-data { 189c9ccf3a3SEmmanuel Vadot samsung,spi-feedback-delay = <0>; 190c9ccf3a3SEmmanuel Vadot }; 191c9ccf3a3SEmmanuel Vadot }; 192c9ccf3a3SEmmanuel Vadot }; 193