diff options
| author | Pete Johanson <peter@peterjohanson.com> | 2020-12-30 15:44:03 -0500 | 
|---|---|---|
| committer | Pete Johanson <peter@peterjohanson.com> | 2020-12-31 14:46:15 -0500 | 
| commit | 39490552f2a84282143e0ec039fdaf4b2f309539 (patch) | |
| tree | f60cd83ada9111ed110e15537434f74bcf0dee4a /app/boards/arm/bdn9/bdn9_rev2.dts | |
| parent | 5072590af523cf25941e05945d490d350f148797 (diff) | |
feat(boards): Add BDN9 Rev2 board.
* Onboard stm32f072.
* 3 possible encoder positions.
* Underglow/per-key not yet support.
Diffstat (limited to 'app/boards/arm/bdn9/bdn9_rev2.dts')
| -rw-r--r-- | app/boards/arm/bdn9/bdn9_rev2.dts | 107 | 
1 files changed, 107 insertions, 0 deletions
| diff --git a/app/boards/arm/bdn9/bdn9_rev2.dts b/app/boards/arm/bdn9/bdn9_rev2.dts new file mode 100644 index 0000000..43854a1 --- /dev/null +++ b/app/boards/arm/bdn9/bdn9_rev2.dts @@ -0,0 +1,107 @@ +/* + * Copyright (c) 2020 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +/dts-v1/; +#include <st/f0/stm32f072Xb.dtsi> + +/ { +	model = "Keeb.io BDN9 rev2"; +	compatible = "keebio,bdn9", "st,stm32f072"; + +	chosen { +		zephyr,sram = &sram0; +		zephyr,flash = &flash0; +		zmk,kscan = &kscan; +		/* TODO: Enable once the GPIO bitbanging driver supports STM32 +		zmk,underglow = &led_strip; +		*/ +	}; +	 +	kscan: kscan { +		compatible = "zmk,kscan-gpio-direct"; +		label = "KSCAN"; + +		input-gpios +			= <&gpiob 12 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> +			, <&gpiob 5  (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> +			, <&gpiob 6  (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> +			, <&gpiob 14 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> +			, <&gpiob 4  (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> +			, <&gpiob 7  (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> +			, <&gpioa 3  (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> +			, <&gpiof 1  (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> +			, <&gpiof 0  (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> +			; +	}; + +	/* +	led_strip: ws2812 { +		compatible = "worldsemi,ws2812-gpio"; +		label = "WS2812"; + +		in-gpios = <&gpiob 15 0>; + +		chain-length = <9>; +	}; +	*/ + +	left_encoder: encoder_left { +		compatible = "alps,ec11"; +		label = "LEFT_ENCODER"; +		a-gpios = <&gpioa 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; +		b-gpios = <&gpioa 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; +		resolution = <4>; +		status = "disabled"; +	}; +	mid_encoder: encoder_mid { +		compatible = "alps,ec11"; +		label = "MID_ENCODER"; +		a-gpios = <&gpioa 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; +		b-gpios = <&gpioa 10 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; +		resolution = <4>; +		status = "disabled"; +	}; +	right_encoder: encoder_right { +		compatible = "alps,ec11"; +		label = "RIGHT_ENCODER"; +		a-gpios = <&gpioa 15 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; +		b-gpios = <&gpiob 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; +		resolution = <4>; +		status = "disabled"; +	}; + +	sensors: sensors { +		compatible = "zmk,keymap-sensors"; +		status = "disabled"; +		sensors = <>; +	}; +}; + +&usb { +	status = "okay"; +}; + +&rtc { +	status = "okay"; +}; + +&flash0 { +	/* +	 * For more information, see: +	 * http://docs.zephyrproject.org/latest/guides/dts/index.html#flash-partitions +	 */ +	partitions { +		compatible = "fixed-partitions"; +		#address-cells = <1>; +		#size-cells = <1>; + +		/* Set 6Kb of storage at the end of the 128Kb of flash */ +		storage_partition: partition@3e800 { +			label = "storage"; +			reg = <0x0001e800 0x00001800>; +		}; +	}; +}; | 
